@yester/virtual-table 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2837 @@
1
+ import * as ee from "react";
2
+ import Ye, { version as xr, isValidElement as Tr, forwardRef as Pr, useMemo as ye, memo as Gt, useState as Me, useImperativeHandle as jr, useEffect as Je, createElement as At, useLayoutEffect as yt, useRef as Ae, useCallback as he } from "react";
3
+ import Mt from "react-dom";
4
+ function Ar(e) {
5
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6
+ }
7
+ var ut = { exports: {} }, We = {};
8
+ /**
9
+ * @license React
10
+ * react-jsx-runtime.production.min.js
11
+ *
12
+ * Copyright (c) Facebook, Inc. and its affiliates.
13
+ *
14
+ * This source code is licensed under the MIT license found in the
15
+ * LICENSE file in the root directory of this source tree.
16
+ */
17
+ var zt;
18
+ function Mr() {
19
+ if (zt)
20
+ return We;
21
+ zt = 1;
22
+ var e = Ye, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
23
+ function a(c, l, v) {
24
+ var u, m = {}, E = null, I = null;
25
+ v !== void 0 && (E = "" + v), l.key !== void 0 && (E = "" + l.key), l.ref !== void 0 && (I = l.ref);
26
+ for (u in l)
27
+ n.call(l, u) && !s.hasOwnProperty(u) && (m[u] = l[u]);
28
+ if (c && c.defaultProps)
29
+ for (u in l = c.defaultProps, l)
30
+ m[u] === void 0 && (m[u] = l[u]);
31
+ return { $$typeof: t, type: c, key: E, ref: I, props: m, _owner: i.current };
32
+ }
33
+ return We.Fragment = r, We.jsx = a, We.jsxs = a, We;
34
+ }
35
+ var Ve = {};
36
+ /**
37
+ * @license React
38
+ * react-jsx-runtime.development.js
39
+ *
40
+ * Copyright (c) Facebook, Inc. and its affiliates.
41
+ *
42
+ * This source code is licensed under the MIT license found in the
43
+ * LICENSE file in the root directory of this source tree.
44
+ */
45
+ var It;
46
+ function zr() {
47
+ return It || (It = 1, process.env.NODE_ENV !== "production" && function() {
48
+ var e = Ye, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), $ = Symbol.iterator, C = "@@iterator";
49
+ function d(o) {
50
+ if (o === null || typeof o != "object")
51
+ return null;
52
+ var f = $ && o[$] || o[C];
53
+ return typeof f == "function" ? f : null;
54
+ }
55
+ var k = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
56
+ function D(o) {
57
+ {
58
+ for (var f = arguments.length, p = new Array(f > 1 ? f - 1 : 0), M = 1; M < f; M++)
59
+ p[M - 1] = arguments[M];
60
+ ie("error", o, p);
61
+ }
62
+ }
63
+ function ie(o, f, p) {
64
+ {
65
+ var M = k.ReactDebugCurrentFrame, B = M.getStackAddendum();
66
+ B !== "" && (f += "%s", p = p.concat([B]));
67
+ var q = p.map(function(W) {
68
+ return String(W);
69
+ });
70
+ q.unshift("Warning: " + f), Function.prototype.apply.call(console[o], console, q);
71
+ }
72
+ }
73
+ var P = !1, S = !1, z = !1, T = !1, j = !1, V;
74
+ V = Symbol.for("react.module.reference");
75
+ function x(o) {
76
+ return !!(typeof o == "string" || typeof o == "function" || o === n || o === s || j || o === i || o === v || o === u || T || o === I || P || S || z || typeof o == "object" && o !== null && (o.$$typeof === E || o.$$typeof === m || o.$$typeof === a || o.$$typeof === c || o.$$typeof === l || // This needs to include all possible module reference object
77
+ // types supported by any Flight configuration anywhere since
78
+ // we don't know which Flight build this will end up being used
79
+ // with.
80
+ o.$$typeof === V || o.getModuleId !== void 0));
81
+ }
82
+ function F(o, f, p) {
83
+ var M = o.displayName;
84
+ if (M)
85
+ return M;
86
+ var B = f.displayName || f.name || "";
87
+ return B !== "" ? p + "(" + B + ")" : p;
88
+ }
89
+ function U(o) {
90
+ return o.displayName || "Context";
91
+ }
92
+ function G(o) {
93
+ if (o == null)
94
+ return null;
95
+ if (typeof o.tag == "number" && D("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
96
+ return o.displayName || o.name || null;
97
+ if (typeof o == "string")
98
+ return o;
99
+ switch (o) {
100
+ case n:
101
+ return "Fragment";
102
+ case r:
103
+ return "Portal";
104
+ case s:
105
+ return "Profiler";
106
+ case i:
107
+ return "StrictMode";
108
+ case v:
109
+ return "Suspense";
110
+ case u:
111
+ return "SuspenseList";
112
+ }
113
+ if (typeof o == "object")
114
+ switch (o.$$typeof) {
115
+ case c:
116
+ var f = o;
117
+ return U(f) + ".Consumer";
118
+ case a:
119
+ var p = o;
120
+ return U(p._context) + ".Provider";
121
+ case l:
122
+ return F(o, o.render, "ForwardRef");
123
+ case m:
124
+ var M = o.displayName || null;
125
+ return M !== null ? M : G(o.type) || "Memo";
126
+ case E: {
127
+ var B = o, q = B._payload, W = B._init;
128
+ try {
129
+ return G(W(q));
130
+ } catch {
131
+ return null;
132
+ }
133
+ }
134
+ }
135
+ return null;
136
+ }
137
+ var Q = Object.assign, le = 0, be, Re, Ee, fe, y, w, O;
138
+ function g() {
139
+ }
140
+ g.__reactDisabledLog = !0;
141
+ function h() {
142
+ {
143
+ if (le === 0) {
144
+ be = console.log, Re = console.info, Ee = console.warn, fe = console.error, y = console.group, w = console.groupCollapsed, O = console.groupEnd;
145
+ var o = {
146
+ configurable: !0,
147
+ enumerable: !0,
148
+ value: g,
149
+ writable: !0
150
+ };
151
+ Object.defineProperties(console, {
152
+ info: o,
153
+ log: o,
154
+ warn: o,
155
+ error: o,
156
+ group: o,
157
+ groupCollapsed: o,
158
+ groupEnd: o
159
+ });
160
+ }
161
+ le++;
162
+ }
163
+ }
164
+ function R() {
165
+ {
166
+ if (le--, le === 0) {
167
+ var o = {
168
+ configurable: !0,
169
+ enumerable: !0,
170
+ writable: !0
171
+ };
172
+ Object.defineProperties(console, {
173
+ log: Q({}, o, {
174
+ value: be
175
+ }),
176
+ info: Q({}, o, {
177
+ value: Re
178
+ }),
179
+ warn: Q({}, o, {
180
+ value: Ee
181
+ }),
182
+ error: Q({}, o, {
183
+ value: fe
184
+ }),
185
+ group: Q({}, o, {
186
+ value: y
187
+ }),
188
+ groupCollapsed: Q({}, o, {
189
+ value: w
190
+ }),
191
+ groupEnd: Q({}, o, {
192
+ value: O
193
+ })
194
+ });
195
+ }
196
+ le < 0 && D("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
197
+ }
198
+ }
199
+ var L = k.ReactCurrentDispatcher, _;
200
+ function A(o, f, p) {
201
+ {
202
+ if (_ === void 0)
203
+ try {
204
+ throw Error();
205
+ } catch (B) {
206
+ var M = B.stack.trim().match(/\n( *(at )?)/);
207
+ _ = M && M[1] || "";
208
+ }
209
+ return `
210
+ ` + _ + o;
211
+ }
212
+ }
213
+ var H = !1, X;
214
+ {
215
+ var we = typeof WeakMap == "function" ? WeakMap : Map;
216
+ X = new we();
217
+ }
218
+ function se(o, f) {
219
+ if (!o || H)
220
+ return "";
221
+ {
222
+ var p = X.get(o);
223
+ if (p !== void 0)
224
+ return p;
225
+ }
226
+ var M;
227
+ H = !0;
228
+ var B = Error.prepareStackTrace;
229
+ Error.prepareStackTrace = void 0;
230
+ var q;
231
+ q = L.current, L.current = null, h();
232
+ try {
233
+ if (f) {
234
+ var W = function() {
235
+ throw Error();
236
+ };
237
+ if (Object.defineProperty(W.prototype, "props", {
238
+ set: function() {
239
+ throw Error();
240
+ }
241
+ }), typeof Reflect == "object" && Reflect.construct) {
242
+ try {
243
+ Reflect.construct(W, []);
244
+ } catch (ue) {
245
+ M = ue;
246
+ }
247
+ Reflect.construct(o, [], W);
248
+ } else {
249
+ try {
250
+ W.call();
251
+ } catch (ue) {
252
+ M = ue;
253
+ }
254
+ o.call(W.prototype);
255
+ }
256
+ } else {
257
+ try {
258
+ throw Error();
259
+ } catch (ue) {
260
+ M = ue;
261
+ }
262
+ o();
263
+ }
264
+ } catch (ue) {
265
+ if (ue && M && typeof ue.stack == "string") {
266
+ for (var N = ue.stack.split(`
267
+ `), ce = M.stack.split(`
268
+ `), re = N.length - 1, oe = ce.length - 1; re >= 1 && oe >= 0 && N[re] !== ce[oe]; )
269
+ oe--;
270
+ for (; re >= 1 && oe >= 0; re--, oe--)
271
+ if (N[re] !== ce[oe]) {
272
+ if (re !== 1 || oe !== 1)
273
+ do
274
+ if (re--, oe--, oe < 0 || N[re] !== ce[oe]) {
275
+ var me = `
276
+ ` + N[re].replace(" at new ", " at ");
277
+ return o.displayName && me.includes("<anonymous>") && (me = me.replace("<anonymous>", o.displayName)), typeof o == "function" && X.set(o, me), me;
278
+ }
279
+ while (re >= 1 && oe >= 0);
280
+ break;
281
+ }
282
+ }
283
+ } finally {
284
+ H = !1, L.current = q, R(), Error.prepareStackTrace = B;
285
+ }
286
+ var Le = o ? o.displayName || o.name : "", je = Le ? A(Le) : "";
287
+ return typeof o == "function" && X.set(o, je), je;
288
+ }
289
+ function ae(o, f, p) {
290
+ return se(o, !1);
291
+ }
292
+ function b(o) {
293
+ var f = o.prototype;
294
+ return !!(f && f.isReactComponent);
295
+ }
296
+ function ne(o, f, p) {
297
+ if (o == null)
298
+ return "";
299
+ if (typeof o == "function")
300
+ return se(o, b(o));
301
+ if (typeof o == "string")
302
+ return A(o);
303
+ switch (o) {
304
+ case v:
305
+ return A("Suspense");
306
+ case u:
307
+ return A("SuspenseList");
308
+ }
309
+ if (typeof o == "object")
310
+ switch (o.$$typeof) {
311
+ case l:
312
+ return ae(o.render);
313
+ case m:
314
+ return ne(o.type, f, p);
315
+ case E: {
316
+ var M = o, B = M._payload, q = M._init;
317
+ try {
318
+ return ne(q(B), f, p);
319
+ } catch {
320
+ }
321
+ }
322
+ }
323
+ return "";
324
+ }
325
+ var te = Object.prototype.hasOwnProperty, Se = {}, pe = k.ReactDebugCurrentFrame;
326
+ function Z(o) {
327
+ if (o) {
328
+ var f = o._owner, p = ne(o.type, o._source, f ? f.type : null);
329
+ pe.setExtraStackFrame(p);
330
+ } else
331
+ pe.setExtraStackFrame(null);
332
+ }
333
+ function xe(o, f, p, M, B) {
334
+ {
335
+ var q = Function.call.bind(te);
336
+ for (var W in o)
337
+ if (q(o, W)) {
338
+ var N = void 0;
339
+ try {
340
+ if (typeof o[W] != "function") {
341
+ var ce = Error((M || "React class") + ": " + p + " type `" + W + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[W] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
342
+ throw ce.name = "Invariant Violation", ce;
343
+ }
344
+ N = o[W](f, W, M, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
345
+ } catch (re) {
346
+ N = re;
347
+ }
348
+ N && !(N instanceof Error) && (Z(B), D("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", M || "React class", p, W, typeof N), Z(null)), N instanceof Error && !(N.message in Se) && (Se[N.message] = !0, Z(B), D("Failed %s type: %s", p, N.message), Z(null));
349
+ }
350
+ }
351
+ }
352
+ var ze = Array.isArray;
353
+ function Pe(o) {
354
+ return ze(o);
355
+ }
356
+ function Ne(o) {
357
+ {
358
+ var f = typeof Symbol == "function" && Symbol.toStringTag, p = f && o[Symbol.toStringTag] || o.constructor.name || "Object";
359
+ return p;
360
+ }
361
+ }
362
+ function ve(o) {
363
+ try {
364
+ return Ie(o), !1;
365
+ } catch {
366
+ return !0;
367
+ }
368
+ }
369
+ function Ie(o) {
370
+ return "" + o;
371
+ }
372
+ function wt(o) {
373
+ if (ve(o))
374
+ return D("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ne(o)), Ie(o);
375
+ }
376
+ var Fe = k.ReactCurrentOwner, lr = {
377
+ key: !0,
378
+ ref: !0,
379
+ __self: !0,
380
+ __source: !0
381
+ }, _t, Rt, Ze;
382
+ Ze = {};
383
+ function ur(o) {
384
+ if (te.call(o, "ref")) {
385
+ var f = Object.getOwnPropertyDescriptor(o, "ref").get;
386
+ if (f && f.isReactWarning)
387
+ return !1;
388
+ }
389
+ return o.ref !== void 0;
390
+ }
391
+ function fr(o) {
392
+ if (te.call(o, "key")) {
393
+ var f = Object.getOwnPropertyDescriptor(o, "key").get;
394
+ if (f && f.isReactWarning)
395
+ return !1;
396
+ }
397
+ return o.key !== void 0;
398
+ }
399
+ function dr(o, f) {
400
+ if (typeof o.ref == "string" && Fe.current && f && Fe.current.stateNode !== f) {
401
+ var p = G(Fe.current.type);
402
+ Ze[p] || (D('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', G(Fe.current.type), o.ref), Ze[p] = !0);
403
+ }
404
+ }
405
+ function hr(o, f) {
406
+ {
407
+ var p = function() {
408
+ _t || (_t = !0, D("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
409
+ };
410
+ p.isReactWarning = !0, Object.defineProperty(o, "key", {
411
+ get: p,
412
+ configurable: !0
413
+ });
414
+ }
415
+ }
416
+ function pr(o, f) {
417
+ {
418
+ var p = function() {
419
+ Rt || (Rt = !0, D("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
420
+ };
421
+ p.isReactWarning = !0, Object.defineProperty(o, "ref", {
422
+ get: p,
423
+ configurable: !0
424
+ });
425
+ }
426
+ }
427
+ var vr = function(o, f, p, M, B, q, W) {
428
+ var N = {
429
+ // This tag allows us to uniquely identify this as a React Element
430
+ $$typeof: t,
431
+ // Built-in properties that belong on the element
432
+ type: o,
433
+ key: f,
434
+ ref: p,
435
+ props: W,
436
+ // Record the component responsible for creating this element.
437
+ _owner: q
438
+ };
439
+ return N._store = {}, Object.defineProperty(N._store, "validated", {
440
+ configurable: !1,
441
+ enumerable: !1,
442
+ writable: !0,
443
+ value: !1
444
+ }), Object.defineProperty(N, "_self", {
445
+ configurable: !1,
446
+ enumerable: !1,
447
+ writable: !1,
448
+ value: M
449
+ }), Object.defineProperty(N, "_source", {
450
+ configurable: !1,
451
+ enumerable: !1,
452
+ writable: !1,
453
+ value: B
454
+ }), Object.freeze && (Object.freeze(N.props), Object.freeze(N)), N;
455
+ };
456
+ function mr(o, f, p, M, B) {
457
+ {
458
+ var q, W = {}, N = null, ce = null;
459
+ p !== void 0 && (wt(p), N = "" + p), fr(f) && (wt(f.key), N = "" + f.key), ur(f) && (ce = f.ref, dr(f, B));
460
+ for (q in f)
461
+ te.call(f, q) && !lr.hasOwnProperty(q) && (W[q] = f[q]);
462
+ if (o && o.defaultProps) {
463
+ var re = o.defaultProps;
464
+ for (q in re)
465
+ W[q] === void 0 && (W[q] = re[q]);
466
+ }
467
+ if (N || ce) {
468
+ var oe = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
469
+ N && hr(W, oe), ce && pr(W, oe);
470
+ }
471
+ return vr(o, N, ce, B, M, Fe.current, W);
472
+ }
473
+ }
474
+ var Qe = k.ReactCurrentOwner, St = k.ReactDebugCurrentFrame;
475
+ function ke(o) {
476
+ if (o) {
477
+ var f = o._owner, p = ne(o.type, o._source, f ? f.type : null);
478
+ St.setExtraStackFrame(p);
479
+ } else
480
+ St.setExtraStackFrame(null);
481
+ }
482
+ var et;
483
+ et = !1;
484
+ function tt(o) {
485
+ return typeof o == "object" && o !== null && o.$$typeof === t;
486
+ }
487
+ function Ct() {
488
+ {
489
+ if (Qe.current) {
490
+ var o = G(Qe.current.type);
491
+ if (o)
492
+ return `
493
+
494
+ Check the render method of \`` + o + "`.";
495
+ }
496
+ return "";
497
+ }
498
+ }
499
+ function gr(o) {
500
+ {
501
+ if (o !== void 0) {
502
+ var f = o.fileName.replace(/^.*[\\\/]/, ""), p = o.lineNumber;
503
+ return `
504
+
505
+ Check your code at ` + f + ":" + p + ".";
506
+ }
507
+ return "";
508
+ }
509
+ }
510
+ var Ot = {};
511
+ function yr(o) {
512
+ {
513
+ var f = Ct();
514
+ if (!f) {
515
+ var p = typeof o == "string" ? o : o.displayName || o.name;
516
+ p && (f = `
517
+
518
+ Check the top-level render call using <` + p + ">.");
519
+ }
520
+ return f;
521
+ }
522
+ }
523
+ function xt(o, f) {
524
+ {
525
+ if (!o._store || o._store.validated || o.key != null)
526
+ return;
527
+ o._store.validated = !0;
528
+ var p = yr(f);
529
+ if (Ot[p])
530
+ return;
531
+ Ot[p] = !0;
532
+ var M = "";
533
+ o && o._owner && o._owner !== Qe.current && (M = " It was passed a child from " + G(o._owner.type) + "."), ke(o), D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, M), ke(null);
534
+ }
535
+ }
536
+ function Tt(o, f) {
537
+ {
538
+ if (typeof o != "object")
539
+ return;
540
+ if (Pe(o))
541
+ for (var p = 0; p < o.length; p++) {
542
+ var M = o[p];
543
+ tt(M) && xt(M, f);
544
+ }
545
+ else if (tt(o))
546
+ o._store && (o._store.validated = !0);
547
+ else if (o) {
548
+ var B = d(o);
549
+ if (typeof B == "function" && B !== o.entries)
550
+ for (var q = B.call(o), W; !(W = q.next()).done; )
551
+ tt(W.value) && xt(W.value, f);
552
+ }
553
+ }
554
+ }
555
+ function br(o) {
556
+ {
557
+ var f = o.type;
558
+ if (f == null || typeof f == "string")
559
+ return;
560
+ var p;
561
+ if (typeof f == "function")
562
+ p = f.propTypes;
563
+ else if (typeof f == "object" && (f.$$typeof === l || // Note: Memo only checks outer props here.
564
+ // Inner props are checked in the reconciler.
565
+ f.$$typeof === m))
566
+ p = f.propTypes;
567
+ else
568
+ return;
569
+ if (p) {
570
+ var M = G(f);
571
+ xe(p, o.props, "prop", M, o);
572
+ } else if (f.PropTypes !== void 0 && !et) {
573
+ et = !0;
574
+ var B = G(f);
575
+ D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", B || "Unknown");
576
+ }
577
+ typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
578
+ }
579
+ }
580
+ function Er(o) {
581
+ {
582
+ for (var f = Object.keys(o.props), p = 0; p < f.length; p++) {
583
+ var M = f[p];
584
+ if (M !== "children" && M !== "key") {
585
+ ke(o), D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", M), ke(null);
586
+ break;
587
+ }
588
+ }
589
+ o.ref !== null && (ke(o), D("Invalid attribute `ref` supplied to `React.Fragment`."), ke(null));
590
+ }
591
+ }
592
+ var Pt = {};
593
+ function jt(o, f, p, M, B, q) {
594
+ {
595
+ var W = x(o);
596
+ if (!W) {
597
+ var N = "";
598
+ (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (N += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
599
+ var ce = gr(B);
600
+ ce ? N += ce : N += Ct();
601
+ var re;
602
+ o === null ? re = "null" : Pe(o) ? re = "array" : o !== void 0 && o.$$typeof === t ? (re = "<" + (G(o.type) || "Unknown") + " />", N = " Did you accidentally export a JSX literal instead of a component?") : re = typeof o, D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", re, N);
603
+ }
604
+ var oe = mr(o, f, p, B, q);
605
+ if (oe == null)
606
+ return oe;
607
+ if (W) {
608
+ var me = f.children;
609
+ if (me !== void 0)
610
+ if (M)
611
+ if (Pe(me)) {
612
+ for (var Le = 0; Le < me.length; Le++)
613
+ Tt(me[Le], o);
614
+ Object.freeze && Object.freeze(me);
615
+ } else
616
+ D("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
617
+ else
618
+ Tt(me, o);
619
+ }
620
+ if (te.call(f, "key")) {
621
+ var je = G(o), ue = Object.keys(f).filter(function(Or) {
622
+ return Or !== "key";
623
+ }), rt = ue.length > 0 ? "{key: someKey, " + ue.join(": ..., ") + ": ...}" : "{key: someKey}";
624
+ if (!Pt[je + rt]) {
625
+ var Cr = ue.length > 0 ? "{" + ue.join(": ..., ") + ": ...}" : "{}";
626
+ D(`A props object containing a "key" prop is being spread into JSX:
627
+ let props = %s;
628
+ <%s {...props} />
629
+ React keys must be passed directly to JSX without using spread:
630
+ let props = %s;
631
+ <%s key={someKey} {...props} />`, rt, je, Cr, je), Pt[je + rt] = !0;
632
+ }
633
+ }
634
+ return o === n ? Er(oe) : br(oe), oe;
635
+ }
636
+ }
637
+ function wr(o, f, p) {
638
+ return jt(o, f, p, !0);
639
+ }
640
+ function _r(o, f, p) {
641
+ return jt(o, f, p, !1);
642
+ }
643
+ var Rr = _r, Sr = wr;
644
+ Ve.Fragment = n, Ve.jsx = Rr, Ve.jsxs = Sr;
645
+ }()), Ve;
646
+ }
647
+ process.env.NODE_ENV === "production" ? ut.exports = Mr() : ut.exports = zr();
648
+ var J = ut.exports;
649
+ function ft() {
650
+ return ft = Object.assign ? Object.assign.bind() : function(e) {
651
+ for (var t = 1; t < arguments.length; t++) {
652
+ var r = arguments[t];
653
+ for (var n in r)
654
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
655
+ }
656
+ return e;
657
+ }, ft.apply(null, arguments);
658
+ }
659
+ function _e(e) {
660
+ "@babel/helpers - typeof";
661
+ return _e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
662
+ return typeof t;
663
+ } : function(t) {
664
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
665
+ }, _e(e);
666
+ }
667
+ var Ir = Symbol.for("react.element"), kr = Symbol.for("react.transitional.element"), Lr = Symbol.for("react.fragment");
668
+ function Ut(e) {
669
+ return (
670
+ // Base object type
671
+ e && _e(e) === "object" && // React Element type
672
+ (e.$$typeof === Ir || e.$$typeof === kr) && // React Fragment type
673
+ e.type === Lr
674
+ );
675
+ }
676
+ function dt(e) {
677
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [];
678
+ return Ye.Children.forEach(e, function(n) {
679
+ n == null && !t.keepEmpty || (Array.isArray(n) ? r = r.concat(dt(n)) : Ut(n) && n.props ? r = r.concat(dt(n.props.children, t)) : r.push(n));
680
+ }), r;
681
+ }
682
+ var $r = [];
683
+ function kt(e, t) {
684
+ if (process.env.NODE_ENV !== "production" && !e && console !== void 0) {
685
+ var r = $r.reduce(function(n, i) {
686
+ return i(n ?? "", "warning");
687
+ }, t);
688
+ r && console.error("Warning: ".concat(r));
689
+ }
690
+ }
691
+ function Dr(e, t) {
692
+ if (_e(e) != "object" || !e)
693
+ return e;
694
+ var r = e[Symbol.toPrimitive];
695
+ if (r !== void 0) {
696
+ var n = r.call(e, t || "default");
697
+ if (_e(n) != "object")
698
+ return n;
699
+ throw new TypeError("@@toPrimitive must return a primitive value.");
700
+ }
701
+ return (t === "string" ? String : Number)(e);
702
+ }
703
+ function qt(e) {
704
+ var t = Dr(e, "string");
705
+ return _e(t) == "symbol" ? t : t + "";
706
+ }
707
+ function Nr(e, t, r) {
708
+ return (t = qt(t)) in e ? Object.defineProperty(e, t, {
709
+ value: r,
710
+ enumerable: !0,
711
+ configurable: !0,
712
+ writable: !0
713
+ }) : e[t] = r, e;
714
+ }
715
+ function Lt(e, t) {
716
+ var r = Object.keys(e);
717
+ if (Object.getOwnPropertySymbols) {
718
+ var n = Object.getOwnPropertySymbols(e);
719
+ t && (n = n.filter(function(i) {
720
+ return Object.getOwnPropertyDescriptor(e, i).enumerable;
721
+ })), r.push.apply(r, n);
722
+ }
723
+ return r;
724
+ }
725
+ function $t(e) {
726
+ for (var t = 1; t < arguments.length; t++) {
727
+ var r = arguments[t] != null ? arguments[t] : {};
728
+ t % 2 ? Lt(Object(r), !0).forEach(function(n) {
729
+ Nr(e, n, r[n]);
730
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Lt(Object(r)).forEach(function(n) {
731
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
732
+ });
733
+ }
734
+ return e;
735
+ }
736
+ function Dt(e) {
737
+ return e instanceof HTMLElement || e instanceof SVGElement;
738
+ }
739
+ function Fr(e) {
740
+ return e && _e(e) === "object" && Dt(e.nativeElement) ? e.nativeElement : Dt(e) ? e : null;
741
+ }
742
+ function nt(e) {
743
+ var t = Fr(e);
744
+ if (t)
745
+ return t;
746
+ if (e instanceof Ye.Component) {
747
+ var r;
748
+ return (r = Mt.findDOMNode) === null || r === void 0 ? void 0 : r.call(Mt, e);
749
+ }
750
+ return null;
751
+ }
752
+ var ht = { exports: {} }, Y = {};
753
+ /**
754
+ * @license React
755
+ * react-is.production.min.js
756
+ *
757
+ * Copyright (c) Facebook, Inc. and its affiliates.
758
+ *
759
+ * This source code is licensed under the MIT license found in the
760
+ * LICENSE file in the root directory of this source tree.
761
+ */
762
+ var Nt;
763
+ function Wr() {
764
+ if (Nt)
765
+ return Y;
766
+ Nt = 1;
767
+ var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), a = Symbol.for("react.context"), c = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), $;
768
+ $ = Symbol.for("react.module.reference");
769
+ function C(d) {
770
+ if (typeof d == "object" && d !== null) {
771
+ var k = d.$$typeof;
772
+ switch (k) {
773
+ case e:
774
+ switch (d = d.type, d) {
775
+ case r:
776
+ case i:
777
+ case n:
778
+ case v:
779
+ case u:
780
+ return d;
781
+ default:
782
+ switch (d = d && d.$$typeof, d) {
783
+ case c:
784
+ case a:
785
+ case l:
786
+ case E:
787
+ case m:
788
+ case s:
789
+ return d;
790
+ default:
791
+ return k;
792
+ }
793
+ }
794
+ case t:
795
+ return k;
796
+ }
797
+ }
798
+ }
799
+ return Y.ContextConsumer = a, Y.ContextProvider = s, Y.Element = e, Y.ForwardRef = l, Y.Fragment = r, Y.Lazy = E, Y.Memo = m, Y.Portal = t, Y.Profiler = i, Y.StrictMode = n, Y.Suspense = v, Y.SuspenseList = u, Y.isAsyncMode = function() {
800
+ return !1;
801
+ }, Y.isConcurrentMode = function() {
802
+ return !1;
803
+ }, Y.isContextConsumer = function(d) {
804
+ return C(d) === a;
805
+ }, Y.isContextProvider = function(d) {
806
+ return C(d) === s;
807
+ }, Y.isElement = function(d) {
808
+ return typeof d == "object" && d !== null && d.$$typeof === e;
809
+ }, Y.isForwardRef = function(d) {
810
+ return C(d) === l;
811
+ }, Y.isFragment = function(d) {
812
+ return C(d) === r;
813
+ }, Y.isLazy = function(d) {
814
+ return C(d) === E;
815
+ }, Y.isMemo = function(d) {
816
+ return C(d) === m;
817
+ }, Y.isPortal = function(d) {
818
+ return C(d) === t;
819
+ }, Y.isProfiler = function(d) {
820
+ return C(d) === i;
821
+ }, Y.isStrictMode = function(d) {
822
+ return C(d) === n;
823
+ }, Y.isSuspense = function(d) {
824
+ return C(d) === v;
825
+ }, Y.isSuspenseList = function(d) {
826
+ return C(d) === u;
827
+ }, Y.isValidElementType = function(d) {
828
+ return typeof d == "string" || typeof d == "function" || d === r || d === i || d === n || d === v || d === u || d === I || typeof d == "object" && d !== null && (d.$$typeof === E || d.$$typeof === m || d.$$typeof === s || d.$$typeof === a || d.$$typeof === l || d.$$typeof === $ || d.getModuleId !== void 0);
829
+ }, Y.typeOf = C, Y;
830
+ }
831
+ var K = {};
832
+ /**
833
+ * @license React
834
+ * react-is.development.js
835
+ *
836
+ * Copyright (c) Facebook, Inc. and its affiliates.
837
+ *
838
+ * This source code is licensed under the MIT license found in the
839
+ * LICENSE file in the root directory of this source tree.
840
+ */
841
+ var Ft;
842
+ function Vr() {
843
+ return Ft || (Ft = 1, process.env.NODE_ENV !== "production" && function() {
844
+ var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), a = Symbol.for("react.context"), c = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), $ = !1, C = !1, d = !1, k = !1, D = !1, ie;
845
+ ie = Symbol.for("react.module.reference");
846
+ function P(b) {
847
+ return !!(typeof b == "string" || typeof b == "function" || b === r || b === i || D || b === n || b === v || b === u || k || b === I || $ || C || d || typeof b == "object" && b !== null && (b.$$typeof === E || b.$$typeof === m || b.$$typeof === s || b.$$typeof === a || b.$$typeof === l || // This needs to include all possible module reference object
848
+ // types supported by any Flight configuration anywhere since
849
+ // we don't know which Flight build this will end up being used
850
+ // with.
851
+ b.$$typeof === ie || b.getModuleId !== void 0));
852
+ }
853
+ function S(b) {
854
+ if (typeof b == "object" && b !== null) {
855
+ var ne = b.$$typeof;
856
+ switch (ne) {
857
+ case e:
858
+ var te = b.type;
859
+ switch (te) {
860
+ case r:
861
+ case i:
862
+ case n:
863
+ case v:
864
+ case u:
865
+ return te;
866
+ default:
867
+ var Se = te && te.$$typeof;
868
+ switch (Se) {
869
+ case c:
870
+ case a:
871
+ case l:
872
+ case E:
873
+ case m:
874
+ case s:
875
+ return Se;
876
+ default:
877
+ return ne;
878
+ }
879
+ }
880
+ case t:
881
+ return ne;
882
+ }
883
+ }
884
+ }
885
+ var z = a, T = s, j = e, V = l, x = r, F = E, U = m, G = t, Q = i, le = n, be = v, Re = u, Ee = !1, fe = !1;
886
+ function y(b) {
887
+ return Ee || (Ee = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
888
+ }
889
+ function w(b) {
890
+ return fe || (fe = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
891
+ }
892
+ function O(b) {
893
+ return S(b) === a;
894
+ }
895
+ function g(b) {
896
+ return S(b) === s;
897
+ }
898
+ function h(b) {
899
+ return typeof b == "object" && b !== null && b.$$typeof === e;
900
+ }
901
+ function R(b) {
902
+ return S(b) === l;
903
+ }
904
+ function L(b) {
905
+ return S(b) === r;
906
+ }
907
+ function _(b) {
908
+ return S(b) === E;
909
+ }
910
+ function A(b) {
911
+ return S(b) === m;
912
+ }
913
+ function H(b) {
914
+ return S(b) === t;
915
+ }
916
+ function X(b) {
917
+ return S(b) === i;
918
+ }
919
+ function we(b) {
920
+ return S(b) === n;
921
+ }
922
+ function se(b) {
923
+ return S(b) === v;
924
+ }
925
+ function ae(b) {
926
+ return S(b) === u;
927
+ }
928
+ K.ContextConsumer = z, K.ContextProvider = T, K.Element = j, K.ForwardRef = V, K.Fragment = x, K.Lazy = F, K.Memo = U, K.Portal = G, K.Profiler = Q, K.StrictMode = le, K.Suspense = be, K.SuspenseList = Re, K.isAsyncMode = y, K.isConcurrentMode = w, K.isContextConsumer = O, K.isContextProvider = g, K.isElement = h, K.isForwardRef = R, K.isFragment = L, K.isLazy = _, K.isMemo = A, K.isPortal = H, K.isProfiler = X, K.isStrictMode = we, K.isSuspense = se, K.isSuspenseList = ae, K.isValidElementType = P, K.typeOf = S;
929
+ }()), K;
930
+ }
931
+ process.env.NODE_ENV === "production" ? ht.exports = Wr() : ht.exports = Vr();
932
+ var ot = ht.exports;
933
+ function Hr(e, t, r) {
934
+ var n = ee.useRef({});
935
+ return (!("value" in n.current) || r(n.current.condition, t)) && (n.current.value = e(), n.current.condition = t), n.current.value;
936
+ }
937
+ var Br = Number(xr.split(".")[0]), Yr = function(t, r) {
938
+ typeof t == "function" ? t(r) : _e(t) === "object" && t && "current" in t && (t.current = r);
939
+ }, Kr = function() {
940
+ for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
941
+ r[n] = arguments[n];
942
+ var i = r.filter(Boolean);
943
+ return i.length <= 1 ? i[0] : function(s) {
944
+ r.forEach(function(a) {
945
+ Yr(a, s);
946
+ });
947
+ };
948
+ }, Gr = function() {
949
+ for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
950
+ r[n] = arguments[n];
951
+ return Hr(function() {
952
+ return Kr.apply(void 0, r);
953
+ }, r, function(i, s) {
954
+ return i.length !== s.length || i.every(function(a, c) {
955
+ return a !== s[c];
956
+ });
957
+ });
958
+ }, Ur = function(t) {
959
+ var r, n;
960
+ if (!t)
961
+ return !1;
962
+ if (Jt(t) && Br >= 19)
963
+ return !0;
964
+ var i = ot.isMemo(t) ? t.type.type : t.type;
965
+ return !(typeof i == "function" && !((r = i.prototype) !== null && r !== void 0 && r.render) && i.$$typeof !== ot.ForwardRef || typeof t == "function" && !((n = t.prototype) !== null && n !== void 0 && n.render) && t.$$typeof !== ot.ForwardRef);
966
+ };
967
+ function Jt(e) {
968
+ return /* @__PURE__ */ Tr(e) && !Ut(e);
969
+ }
970
+ var qr = function(t) {
971
+ if (t && Jt(t)) {
972
+ var r = t;
973
+ return r.props.propertyIsEnumerable("ref") ? r.props.ref : r.ref;
974
+ }
975
+ return null;
976
+ }, pt = /* @__PURE__ */ ee.createContext(null);
977
+ function Jr(e) {
978
+ var t = e.children, r = e.onBatchResize, n = ee.useRef(0), i = ee.useRef([]), s = ee.useContext(pt), a = ee.useCallback(function(c, l, v) {
979
+ n.current += 1;
980
+ var u = n.current;
981
+ i.current.push({
982
+ size: c,
983
+ element: l,
984
+ data: v
985
+ }), Promise.resolve().then(function() {
986
+ u === n.current && (r == null || r(i.current), i.current = []);
987
+ }), s == null || s(c, l, v);
988
+ }, [r, s]);
989
+ return /* @__PURE__ */ ee.createElement(pt.Provider, {
990
+ value: a
991
+ }, t);
992
+ }
993
+ var Xt = function() {
994
+ if (typeof Map < "u")
995
+ return Map;
996
+ function e(t, r) {
997
+ var n = -1;
998
+ return t.some(function(i, s) {
999
+ return i[0] === r ? (n = s, !0) : !1;
1000
+ }), n;
1001
+ }
1002
+ return (
1003
+ /** @class */
1004
+ function() {
1005
+ function t() {
1006
+ this.__entries__ = [];
1007
+ }
1008
+ return Object.defineProperty(t.prototype, "size", {
1009
+ /**
1010
+ * @returns {boolean}
1011
+ */
1012
+ get: function() {
1013
+ return this.__entries__.length;
1014
+ },
1015
+ enumerable: !0,
1016
+ configurable: !0
1017
+ }), t.prototype.get = function(r) {
1018
+ var n = e(this.__entries__, r), i = this.__entries__[n];
1019
+ return i && i[1];
1020
+ }, t.prototype.set = function(r, n) {
1021
+ var i = e(this.__entries__, r);
1022
+ ~i ? this.__entries__[i][1] = n : this.__entries__.push([r, n]);
1023
+ }, t.prototype.delete = function(r) {
1024
+ var n = this.__entries__, i = e(n, r);
1025
+ ~i && n.splice(i, 1);
1026
+ }, t.prototype.has = function(r) {
1027
+ return !!~e(this.__entries__, r);
1028
+ }, t.prototype.clear = function() {
1029
+ this.__entries__.splice(0);
1030
+ }, t.prototype.forEach = function(r, n) {
1031
+ n === void 0 && (n = null);
1032
+ for (var i = 0, s = this.__entries__; i < s.length; i++) {
1033
+ var a = s[i];
1034
+ r.call(n, a[1], a[0]);
1035
+ }
1036
+ }, t;
1037
+ }()
1038
+ );
1039
+ }(), vt = typeof window < "u" && typeof document < "u" && window.document === document, Ke = function() {
1040
+ return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
1041
+ }(), Xr = function() {
1042
+ return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Ke) : function(e) {
1043
+ return setTimeout(function() {
1044
+ return e(Date.now());
1045
+ }, 1e3 / 60);
1046
+ };
1047
+ }(), Zr = 2;
1048
+ function Qr(e, t) {
1049
+ var r = !1, n = !1, i = 0;
1050
+ function s() {
1051
+ r && (r = !1, e()), n && c();
1052
+ }
1053
+ function a() {
1054
+ Xr(s);
1055
+ }
1056
+ function c() {
1057
+ var l = Date.now();
1058
+ if (r) {
1059
+ if (l - i < Zr)
1060
+ return;
1061
+ n = !0;
1062
+ } else
1063
+ r = !0, n = !1, setTimeout(a, t);
1064
+ i = l;
1065
+ }
1066
+ return c;
1067
+ }
1068
+ var en = 20, tn = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], rn = typeof MutationObserver < "u", nn = (
1069
+ /** @class */
1070
+ function() {
1071
+ function e() {
1072
+ this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = Qr(this.refresh.bind(this), en);
1073
+ }
1074
+ return e.prototype.addObserver = function(t) {
1075
+ ~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
1076
+ }, e.prototype.removeObserver = function(t) {
1077
+ var r = this.observers_, n = r.indexOf(t);
1078
+ ~n && r.splice(n, 1), !r.length && this.connected_ && this.disconnect_();
1079
+ }, e.prototype.refresh = function() {
1080
+ var t = this.updateObservers_();
1081
+ t && this.refresh();
1082
+ }, e.prototype.updateObservers_ = function() {
1083
+ var t = this.observers_.filter(function(r) {
1084
+ return r.gatherActive(), r.hasActive();
1085
+ });
1086
+ return t.forEach(function(r) {
1087
+ return r.broadcastActive();
1088
+ }), t.length > 0;
1089
+ }, e.prototype.connect_ = function() {
1090
+ !vt || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), rn ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
1091
+ attributes: !0,
1092
+ childList: !0,
1093
+ characterData: !0,
1094
+ subtree: !0
1095
+ })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
1096
+ }, e.prototype.disconnect_ = function() {
1097
+ !vt || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
1098
+ }, e.prototype.onTransitionEnd_ = function(t) {
1099
+ var r = t.propertyName, n = r === void 0 ? "" : r, i = tn.some(function(s) {
1100
+ return !!~n.indexOf(s);
1101
+ });
1102
+ i && this.refresh();
1103
+ }, e.getInstance = function() {
1104
+ return this.instance_ || (this.instance_ = new e()), this.instance_;
1105
+ }, e.instance_ = null, e;
1106
+ }()
1107
+ ), Zt = function(e, t) {
1108
+ for (var r = 0, n = Object.keys(t); r < n.length; r++) {
1109
+ var i = n[r];
1110
+ Object.defineProperty(e, i, {
1111
+ value: t[i],
1112
+ enumerable: !1,
1113
+ writable: !1,
1114
+ configurable: !0
1115
+ });
1116
+ }
1117
+ return e;
1118
+ }, De = function(e) {
1119
+ var t = e && e.ownerDocument && e.ownerDocument.defaultView;
1120
+ return t || Ke;
1121
+ }, Qt = Xe(0, 0, 0, 0);
1122
+ function Ge(e) {
1123
+ return parseFloat(e) || 0;
1124
+ }
1125
+ function Wt(e) {
1126
+ for (var t = [], r = 1; r < arguments.length; r++)
1127
+ t[r - 1] = arguments[r];
1128
+ return t.reduce(function(n, i) {
1129
+ var s = e["border-" + i + "-width"];
1130
+ return n + Ge(s);
1131
+ }, 0);
1132
+ }
1133
+ function on(e) {
1134
+ for (var t = ["top", "right", "bottom", "left"], r = {}, n = 0, i = t; n < i.length; n++) {
1135
+ var s = i[n], a = e["padding-" + s];
1136
+ r[s] = Ge(a);
1137
+ }
1138
+ return r;
1139
+ }
1140
+ function sn(e) {
1141
+ var t = e.getBBox();
1142
+ return Xe(0, 0, t.width, t.height);
1143
+ }
1144
+ function an(e) {
1145
+ var t = e.clientWidth, r = e.clientHeight;
1146
+ if (!t && !r)
1147
+ return Qt;
1148
+ var n = De(e).getComputedStyle(e), i = on(n), s = i.left + i.right, a = i.top + i.bottom, c = Ge(n.width), l = Ge(n.height);
1149
+ if (n.boxSizing === "border-box" && (Math.round(c + s) !== t && (c -= Wt(n, "left", "right") + s), Math.round(l + a) !== r && (l -= Wt(n, "top", "bottom") + a)), !ln(e)) {
1150
+ var v = Math.round(c + s) - t, u = Math.round(l + a) - r;
1151
+ Math.abs(v) !== 1 && (c -= v), Math.abs(u) !== 1 && (l -= u);
1152
+ }
1153
+ return Xe(i.left, i.top, c, l);
1154
+ }
1155
+ var cn = function() {
1156
+ return typeof SVGGraphicsElement < "u" ? function(e) {
1157
+ return e instanceof De(e).SVGGraphicsElement;
1158
+ } : function(e) {
1159
+ return e instanceof De(e).SVGElement && typeof e.getBBox == "function";
1160
+ };
1161
+ }();
1162
+ function ln(e) {
1163
+ return e === De(e).document.documentElement;
1164
+ }
1165
+ function un(e) {
1166
+ return vt ? cn(e) ? sn(e) : an(e) : Qt;
1167
+ }
1168
+ function fn(e) {
1169
+ var t = e.x, r = e.y, n = e.width, i = e.height, s = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, a = Object.create(s.prototype);
1170
+ return Zt(a, {
1171
+ x: t,
1172
+ y: r,
1173
+ width: n,
1174
+ height: i,
1175
+ top: r,
1176
+ right: t + n,
1177
+ bottom: i + r,
1178
+ left: t
1179
+ }), a;
1180
+ }
1181
+ function Xe(e, t, r, n) {
1182
+ return { x: e, y: t, width: r, height: n };
1183
+ }
1184
+ var dn = (
1185
+ /** @class */
1186
+ function() {
1187
+ function e(t) {
1188
+ this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = Xe(0, 0, 0, 0), this.target = t;
1189
+ }
1190
+ return e.prototype.isActive = function() {
1191
+ var t = un(this.target);
1192
+ return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
1193
+ }, e.prototype.broadcastRect = function() {
1194
+ var t = this.contentRect_;
1195
+ return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
1196
+ }, e;
1197
+ }()
1198
+ ), hn = (
1199
+ /** @class */
1200
+ function() {
1201
+ function e(t, r) {
1202
+ var n = fn(r);
1203
+ Zt(this, { target: t, contentRect: n });
1204
+ }
1205
+ return e;
1206
+ }()
1207
+ ), pn = (
1208
+ /** @class */
1209
+ function() {
1210
+ function e(t, r, n) {
1211
+ if (this.activeObservations_ = [], this.observations_ = new Xt(), typeof t != "function")
1212
+ throw new TypeError("The callback provided as parameter 1 is not a function.");
1213
+ this.callback_ = t, this.controller_ = r, this.callbackCtx_ = n;
1214
+ }
1215
+ return e.prototype.observe = function(t) {
1216
+ if (!arguments.length)
1217
+ throw new TypeError("1 argument required, but only 0 present.");
1218
+ if (!(typeof Element > "u" || !(Element instanceof Object))) {
1219
+ if (!(t instanceof De(t).Element))
1220
+ throw new TypeError('parameter 1 is not of type "Element".');
1221
+ var r = this.observations_;
1222
+ r.has(t) || (r.set(t, new dn(t)), this.controller_.addObserver(this), this.controller_.refresh());
1223
+ }
1224
+ }, e.prototype.unobserve = function(t) {
1225
+ if (!arguments.length)
1226
+ throw new TypeError("1 argument required, but only 0 present.");
1227
+ if (!(typeof Element > "u" || !(Element instanceof Object))) {
1228
+ if (!(t instanceof De(t).Element))
1229
+ throw new TypeError('parameter 1 is not of type "Element".');
1230
+ var r = this.observations_;
1231
+ r.has(t) && (r.delete(t), r.size || this.controller_.removeObserver(this));
1232
+ }
1233
+ }, e.prototype.disconnect = function() {
1234
+ this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
1235
+ }, e.prototype.gatherActive = function() {
1236
+ var t = this;
1237
+ this.clearActive(), this.observations_.forEach(function(r) {
1238
+ r.isActive() && t.activeObservations_.push(r);
1239
+ });
1240
+ }, e.prototype.broadcastActive = function() {
1241
+ if (this.hasActive()) {
1242
+ var t = this.callbackCtx_, r = this.activeObservations_.map(function(n) {
1243
+ return new hn(n.target, n.broadcastRect());
1244
+ });
1245
+ this.callback_.call(t, r, t), this.clearActive();
1246
+ }
1247
+ }, e.prototype.clearActive = function() {
1248
+ this.activeObservations_.splice(0);
1249
+ }, e.prototype.hasActive = function() {
1250
+ return this.activeObservations_.length > 0;
1251
+ }, e;
1252
+ }()
1253
+ ), er = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Xt(), tr = (
1254
+ /** @class */
1255
+ function() {
1256
+ function e(t) {
1257
+ if (!(this instanceof e))
1258
+ throw new TypeError("Cannot call a class as a function.");
1259
+ if (!arguments.length)
1260
+ throw new TypeError("1 argument required, but only 0 present.");
1261
+ var r = nn.getInstance(), n = new pn(t, r, this);
1262
+ er.set(this, n);
1263
+ }
1264
+ return e;
1265
+ }()
1266
+ );
1267
+ [
1268
+ "observe",
1269
+ "unobserve",
1270
+ "disconnect"
1271
+ ].forEach(function(e) {
1272
+ tr.prototype[e] = function() {
1273
+ var t;
1274
+ return (t = er.get(this))[e].apply(t, arguments);
1275
+ };
1276
+ });
1277
+ var vn = function() {
1278
+ return typeof Ke.ResizeObserver < "u" ? Ke.ResizeObserver : tr;
1279
+ }(), Oe = /* @__PURE__ */ new Map();
1280
+ function rr(e) {
1281
+ e.forEach(function(t) {
1282
+ var r, n = t.target;
1283
+ (r = Oe.get(n)) === null || r === void 0 || r.forEach(function(i) {
1284
+ return i(n);
1285
+ });
1286
+ });
1287
+ }
1288
+ var nr = new vn(rr);
1289
+ process.env.NODE_ENV;
1290
+ process.env.NODE_ENV;
1291
+ function mn(e, t) {
1292
+ Oe.has(e) || (Oe.set(e, /* @__PURE__ */ new Set()), nr.observe(e)), Oe.get(e).add(t);
1293
+ }
1294
+ function gn(e, t) {
1295
+ Oe.has(e) && (Oe.get(e).delete(t), Oe.get(e).size || (nr.unobserve(e), Oe.delete(e)));
1296
+ }
1297
+ function yn(e, t) {
1298
+ if (!(e instanceof t))
1299
+ throw new TypeError("Cannot call a class as a function");
1300
+ }
1301
+ function Vt(e, t) {
1302
+ for (var r = 0; r < t.length; r++) {
1303
+ var n = t[r];
1304
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, qt(n.key), n);
1305
+ }
1306
+ }
1307
+ function bn(e, t, r) {
1308
+ return t && Vt(e.prototype, t), r && Vt(e, r), Object.defineProperty(e, "prototype", {
1309
+ writable: !1
1310
+ }), e;
1311
+ }
1312
+ function mt(e, t) {
1313
+ return mt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
1314
+ return r.__proto__ = n, r;
1315
+ }, mt(e, t);
1316
+ }
1317
+ function En(e, t) {
1318
+ if (typeof t != "function" && t !== null)
1319
+ throw new TypeError("Super expression must either be null or a function");
1320
+ e.prototype = Object.create(t && t.prototype, {
1321
+ constructor: {
1322
+ value: e,
1323
+ writable: !0,
1324
+ configurable: !0
1325
+ }
1326
+ }), Object.defineProperty(e, "prototype", {
1327
+ writable: !1
1328
+ }), t && mt(e, t);
1329
+ }
1330
+ function Ue(e) {
1331
+ return Ue = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
1332
+ return t.__proto__ || Object.getPrototypeOf(t);
1333
+ }, Ue(e);
1334
+ }
1335
+ function or() {
1336
+ try {
1337
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1338
+ }));
1339
+ } catch {
1340
+ }
1341
+ return (or = function() {
1342
+ return !!e;
1343
+ })();
1344
+ }
1345
+ function wn(e) {
1346
+ if (e === void 0)
1347
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1348
+ return e;
1349
+ }
1350
+ function _n(e, t) {
1351
+ if (t && (_e(t) == "object" || typeof t == "function"))
1352
+ return t;
1353
+ if (t !== void 0)
1354
+ throw new TypeError("Derived constructors may only return object or undefined");
1355
+ return wn(e);
1356
+ }
1357
+ function Rn(e) {
1358
+ var t = or();
1359
+ return function() {
1360
+ var r, n = Ue(e);
1361
+ if (t) {
1362
+ var i = Ue(this).constructor;
1363
+ r = Reflect.construct(n, arguments, i);
1364
+ } else
1365
+ r = n.apply(this, arguments);
1366
+ return _n(this, r);
1367
+ };
1368
+ }
1369
+ var Sn = /* @__PURE__ */ function(e) {
1370
+ En(r, e);
1371
+ var t = Rn(r);
1372
+ function r() {
1373
+ return yn(this, r), t.apply(this, arguments);
1374
+ }
1375
+ return bn(r, [{
1376
+ key: "render",
1377
+ value: function() {
1378
+ return this.props.children;
1379
+ }
1380
+ }]), r;
1381
+ }(ee.Component);
1382
+ function Cn(e, t) {
1383
+ var r = e.children, n = e.disabled, i = ee.useRef(null), s = ee.useRef(null), a = ee.useContext(pt), c = typeof r == "function", l = c ? r(i) : r, v = ee.useRef({
1384
+ width: -1,
1385
+ height: -1,
1386
+ offsetWidth: -1,
1387
+ offsetHeight: -1
1388
+ }), u = !c && /* @__PURE__ */ ee.isValidElement(l) && Ur(l), m = u ? qr(l) : null, E = Gr(m, i), I = function() {
1389
+ var k;
1390
+ return nt(i.current) || // Support `nativeElement` format
1391
+ (i.current && _e(i.current) === "object" ? nt((k = i.current) === null || k === void 0 ? void 0 : k.nativeElement) : null) || nt(s.current);
1392
+ };
1393
+ ee.useImperativeHandle(t, function() {
1394
+ return I();
1395
+ });
1396
+ var $ = ee.useRef(e);
1397
+ $.current = e;
1398
+ var C = ee.useCallback(function(d) {
1399
+ var k = $.current, D = k.onResize, ie = k.data, P = d.getBoundingClientRect(), S = P.width, z = P.height, T = d.offsetWidth, j = d.offsetHeight, V = Math.floor(S), x = Math.floor(z);
1400
+ if (v.current.width !== V || v.current.height !== x || v.current.offsetWidth !== T || v.current.offsetHeight !== j) {
1401
+ var F = {
1402
+ width: V,
1403
+ height: x,
1404
+ offsetWidth: T,
1405
+ offsetHeight: j
1406
+ };
1407
+ v.current = F;
1408
+ var U = T === Math.round(S) ? S : T, G = j === Math.round(z) ? z : j, Q = $t($t({}, F), {}, {
1409
+ offsetWidth: U,
1410
+ offsetHeight: G
1411
+ });
1412
+ a == null || a(Q, d, ie), D && Promise.resolve().then(function() {
1413
+ D(Q, d);
1414
+ });
1415
+ }
1416
+ }, []);
1417
+ return ee.useEffect(function() {
1418
+ var d = I();
1419
+ return d && !n && mn(d, C), function() {
1420
+ return gn(d, C);
1421
+ };
1422
+ }, [i.current, n]), /* @__PURE__ */ ee.createElement(Sn, {
1423
+ ref: s
1424
+ }, u ? /* @__PURE__ */ ee.cloneElement(l, {
1425
+ ref: E
1426
+ }) : l);
1427
+ }
1428
+ var ir = /* @__PURE__ */ ee.forwardRef(Cn);
1429
+ process.env.NODE_ENV !== "production" && (ir.displayName = "SingleObserver");
1430
+ var On = "rc-observer-key";
1431
+ function xn(e, t) {
1432
+ var r = e.children, n = typeof r == "function" ? [r] : dt(r);
1433
+ return process.env.NODE_ENV !== "production" && (n.length > 1 ? kt(!1, "Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.") : n.length === 0 && kt(!1, "`children` of ResizeObserver is empty. Nothing is in observe.")), n.map(function(i, s) {
1434
+ var a = (i == null ? void 0 : i.key) || "".concat(On, "-").concat(s);
1435
+ return /* @__PURE__ */ ee.createElement(ir, ft({}, e, {
1436
+ key: a,
1437
+ ref: s === 0 ? t : void 0
1438
+ }), i);
1439
+ });
1440
+ }
1441
+ var bt = /* @__PURE__ */ ee.forwardRef(xn);
1442
+ process.env.NODE_ENV !== "production" && (bt.displayName = "ResizeObserver");
1443
+ bt.Collection = Jr;
1444
+ var sr = { exports: {} };
1445
+ /*!
1446
+ Copyright (c) 2018 Jed Watson.
1447
+ Licensed under the MIT License (MIT), see
1448
+ http://jedwatson.github.io/classnames
1449
+ */
1450
+ (function(e) {
1451
+ (function() {
1452
+ var t = {}.hasOwnProperty;
1453
+ function r() {
1454
+ for (var s = "", a = 0; a < arguments.length; a++) {
1455
+ var c = arguments[a];
1456
+ c && (s = i(s, n(c)));
1457
+ }
1458
+ return s;
1459
+ }
1460
+ function n(s) {
1461
+ if (typeof s == "string" || typeof s == "number")
1462
+ return s;
1463
+ if (typeof s != "object")
1464
+ return "";
1465
+ if (Array.isArray(s))
1466
+ return r.apply(null, s);
1467
+ if (s.toString !== Object.prototype.toString && !s.toString.toString().includes("[native code]"))
1468
+ return s.toString();
1469
+ var a = "";
1470
+ for (var c in s)
1471
+ t.call(s, c) && s[c] && (a = i(a, c));
1472
+ return a;
1473
+ }
1474
+ function i(s, a) {
1475
+ return a ? s ? s + " " + a : s + a : s;
1476
+ }
1477
+ e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1478
+ })();
1479
+ })(sr);
1480
+ var Tn = sr.exports;
1481
+ const Et = /* @__PURE__ */ Ar(Tn);
1482
+ const Pn = Pr(({ columns: e, width: t, onScroll: r }, n) => {
1483
+ const i = ye(() => {
1484
+ const s = [], a = (v) => {
1485
+ let u = 0;
1486
+ return v.forEach((m) => {
1487
+ if (m.children && m.children.length > 0) {
1488
+ const E = a(m.children);
1489
+ E > u && (u = E);
1490
+ }
1491
+ }), u + 1;
1492
+ }, c = a(e), l = (v, u) => {
1493
+ s[u] || (s[u] = []), v.forEach((m) => {
1494
+ var I;
1495
+ const E = {
1496
+ key: m.field || m.dataIndex || m.title || String(Math.random()),
1497
+ title: m.title,
1498
+ width: m.width,
1499
+ align: ((I = m.style) == null ? void 0 : I.textAlign) || "center",
1500
+ className: void 0,
1501
+ // col.className not in type, ignore
1502
+ colSpan: 1,
1503
+ rowSpan: 1
1504
+ };
1505
+ if (m.children && m.children.length > 0) {
1506
+ const $ = (C) => C.children && C.children.length > 0 ? C.children.reduce((d, k) => d + $(k), 0) : 1;
1507
+ E.colSpan = $(m), s[u].push(E), l(m.children, u + 1);
1508
+ } else
1509
+ E.rowSpan = c - u, s[u].push(E);
1510
+ });
1511
+ };
1512
+ return l(e, 0), s;
1513
+ }, [e]);
1514
+ return /* @__PURE__ */ J.jsx(
1515
+ "div",
1516
+ {
1517
+ ref: n,
1518
+ className: "virtual-table-header hide-scrollbar",
1519
+ style: { overflow: "auto", width: t },
1520
+ onScroll: r,
1521
+ children: /* @__PURE__ */ J.jsxs("table", { style: { tableLayout: "fixed", width: "100%" }, children: [
1522
+ /* @__PURE__ */ J.jsx("colgroup", { children: e.map((s, a) => {
1523
+ const c = (l) => l.children && l.children.length > 0 ? l.children.flatMap(c) : [l.width];
1524
+ return c(s).map((l, v) => /* @__PURE__ */ J.jsx("col", { style: { width: l, minWidth: l } }, `${a}-${v}`));
1525
+ }).flat() }),
1526
+ /* @__PURE__ */ J.jsx("thead", { className: "virtual-table-thead", children: i.map((s, a) => /* @__PURE__ */ J.jsx("tr", { className: "virtual-table-row", children: s.map((c, l) => /* @__PURE__ */ J.jsx(
1527
+ "th",
1528
+ {
1529
+ className: Et("virtual-table-cell", c.className),
1530
+ colSpan: c.colSpan,
1531
+ rowSpan: c.rowSpan,
1532
+ title: c.title,
1533
+ style: {
1534
+ textAlign: c.align
1535
+ },
1536
+ children: c.title
1537
+ },
1538
+ l
1539
+ )) }, a)) })
1540
+ ] })
1541
+ }
1542
+ );
1543
+ }), gt = (e) => {
1544
+ if (e === null || typeof e != "object")
1545
+ return e;
1546
+ if (Array.isArray(e))
1547
+ return e.map((r) => gt(r));
1548
+ const t = {};
1549
+ for (const r in e)
1550
+ Object.prototype.hasOwnProperty.call(e, r) && (t[r] = gt(e[r]));
1551
+ return t;
1552
+ }, ar = 43, jn = 100, Ce = "-", Ht = "合计";
1553
+ function An(e) {
1554
+ let t = e;
1555
+ for (; t; ) {
1556
+ if (t.dir)
1557
+ return t.dir === "rtl";
1558
+ t = t.parentElement;
1559
+ }
1560
+ return !1;
1561
+ }
1562
+ function Mn(e, t) {
1563
+ const [r, n] = Me(t === "rtl");
1564
+ return yt(() => {
1565
+ e && (t || n(An(e)));
1566
+ }, [t, e]), r;
1567
+ }
1568
+ const qe = typeof window < "u" ? yt : Je;
1569
+ function Bt(e) {
1570
+ if (e !== void 0)
1571
+ switch (typeof e) {
1572
+ case "number":
1573
+ return e;
1574
+ case "string": {
1575
+ if (e.endsWith("px"))
1576
+ return parseFloat(e);
1577
+ break;
1578
+ }
1579
+ }
1580
+ }
1581
+ function zn({
1582
+ box: e,
1583
+ defaultHeight: t,
1584
+ defaultWidth: r,
1585
+ disabled: n,
1586
+ element: i,
1587
+ mode: s,
1588
+ style: a
1589
+ }) {
1590
+ const { styleHeight: c, styleWidth: l } = ye(
1591
+ () => ({
1592
+ styleHeight: Bt(a == null ? void 0 : a.height),
1593
+ styleWidth: Bt(a == null ? void 0 : a.width)
1594
+ }),
1595
+ [a == null ? void 0 : a.height, a == null ? void 0 : a.width]
1596
+ ), [v, u] = Me({
1597
+ height: t,
1598
+ width: r
1599
+ }), m = n || s === "only-height" && c !== void 0 || s === "only-width" && l !== void 0 || c !== void 0 && l !== void 0;
1600
+ return qe(() => {
1601
+ if (i === null || m)
1602
+ return;
1603
+ const E = new ResizeObserver((I) => {
1604
+ for (const $ of I) {
1605
+ const { contentRect: C, target: d } = $;
1606
+ i === d && u((k) => k.height === C.height && k.width === C.width ? k : {
1607
+ height: C.height,
1608
+ width: C.width
1609
+ });
1610
+ }
1611
+ });
1612
+ return E.observe(i, { box: e }), () => {
1613
+ E == null || E.unobserve(i);
1614
+ };
1615
+ }, [e, m, i, c, l]), ye(
1616
+ () => ({
1617
+ height: c ?? v.height,
1618
+ width: l ?? v.width
1619
+ }),
1620
+ [v, c, l]
1621
+ );
1622
+ }
1623
+ function In(e) {
1624
+ const t = Ae(() => {
1625
+ throw new Error("Cannot call during render.");
1626
+ });
1627
+ return qe(() => {
1628
+ t.current = e;
1629
+ }, [e]), he((r) => {
1630
+ var n;
1631
+ return (n = t.current) == null ? void 0 : n.call(t, r);
1632
+ }, [t]);
1633
+ }
1634
+ let $e = null;
1635
+ function kn(e = !1) {
1636
+ if ($e === null || e) {
1637
+ const t = document.createElement("div"), r = t.style;
1638
+ r.width = "50px", r.height = "50px", r.overflow = "scroll", r.direction = "rtl";
1639
+ const n = document.createElement("div"), i = n.style;
1640
+ return i.width = "100px", i.height = "100px", t.appendChild(n), document.body.appendChild(t), t.scrollLeft > 0 ? $e = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? $e = "negative" : $e = "positive-ascending"), document.body.removeChild(t), $e;
1641
+ }
1642
+ return $e;
1643
+ }
1644
+ function it({
1645
+ containerElement: e,
1646
+ direction: t,
1647
+ isRtl: r,
1648
+ scrollOffset: n
1649
+ }) {
1650
+ if (t === "horizontal" && r)
1651
+ switch (kn()) {
1652
+ case "negative":
1653
+ return -n;
1654
+ case "positive-descending": {
1655
+ if (e) {
1656
+ const { clientWidth: i, scrollLeft: s, scrollWidth: a } = e;
1657
+ return a - i - s;
1658
+ }
1659
+ break;
1660
+ }
1661
+ }
1662
+ return n;
1663
+ }
1664
+ function Te(e, t = "Assertion error") {
1665
+ if (!e)
1666
+ throw console.error(t), Error(t);
1667
+ }
1668
+ function Be(e, t) {
1669
+ if (e === t)
1670
+ return !0;
1671
+ if (!!e != !!t || (Te(e !== void 0), Te(t !== void 0), Object.keys(e).length !== Object.keys(t).length))
1672
+ return !1;
1673
+ for (const r in e)
1674
+ if (!Object.is(t[r], e[r]))
1675
+ return !1;
1676
+ return !0;
1677
+ }
1678
+ function cr({
1679
+ cachedBounds: e,
1680
+ itemCount: t,
1681
+ itemSize: r
1682
+ }) {
1683
+ if (t === 0)
1684
+ return 0;
1685
+ if (typeof r == "number")
1686
+ return t * r;
1687
+ {
1688
+ const n = e.get(
1689
+ e.size === 0 ? 0 : e.size - 1
1690
+ );
1691
+ Te(n !== void 0, "Unexpected bounds cache miss");
1692
+ const i = (n.scrollOffset + n.size) / e.size;
1693
+ return t * i;
1694
+ }
1695
+ }
1696
+ function Ln({
1697
+ align: e,
1698
+ cachedBounds: t,
1699
+ index: r,
1700
+ itemCount: n,
1701
+ itemSize: i,
1702
+ containerScrollOffset: s,
1703
+ containerSize: a
1704
+ }) {
1705
+ if (r < 0 || r >= n)
1706
+ throw RangeError(`Invalid index specified: ${r}`, {
1707
+ cause: `Index ${r} is not within the range of 0 - ${n - 1}`
1708
+ });
1709
+ const c = cr({
1710
+ cachedBounds: t,
1711
+ itemCount: n,
1712
+ itemSize: i
1713
+ }), l = t.get(r), v = Math.max(
1714
+ 0,
1715
+ Math.min(c - a, l.scrollOffset)
1716
+ ), u = Math.max(
1717
+ 0,
1718
+ l.scrollOffset - a + l.size
1719
+ );
1720
+ switch (e === "smart" && (s >= u && s <= v ? e = "auto" : e = "center"), e) {
1721
+ case "start":
1722
+ return v;
1723
+ case "end":
1724
+ return u;
1725
+ case "center":
1726
+ return l.scrollOffset <= a / 2 ? 0 : l.scrollOffset + l.size / 2 >= c - a / 2 ? c - a : l.scrollOffset + l.size / 2 - a / 2;
1727
+ case "auto":
1728
+ default:
1729
+ return s >= u && s <= v ? s : s < u ? u : v;
1730
+ }
1731
+ }
1732
+ function st({
1733
+ cachedBounds: e,
1734
+ containerScrollOffset: t,
1735
+ containerSize: r,
1736
+ itemCount: n,
1737
+ overscanCount: i
1738
+ }) {
1739
+ const s = n - 1;
1740
+ let a = 0, c = -1, l = 0, v = -1, u = 0;
1741
+ for (; u < s; ) {
1742
+ const m = e.get(u);
1743
+ if (m.scrollOffset + m.size > t)
1744
+ break;
1745
+ u++;
1746
+ }
1747
+ for (a = u, l = Math.max(0, a - i); u < s; ) {
1748
+ const m = e.get(u);
1749
+ if (m.scrollOffset + m.size >= t + r)
1750
+ break;
1751
+ u++;
1752
+ }
1753
+ return c = Math.min(s, u), v = Math.min(n - 1, c + i), a < 0 && (a = 0, c = -1, l = 0, v = -1), {
1754
+ startIndexVisible: a,
1755
+ stopIndexVisible: c,
1756
+ startIndexOverscan: l,
1757
+ stopIndexOverscan: v
1758
+ };
1759
+ }
1760
+ function $n({
1761
+ itemCount: e,
1762
+ itemProps: t,
1763
+ itemSize: r
1764
+ }) {
1765
+ const n = /* @__PURE__ */ new Map();
1766
+ return {
1767
+ get(i) {
1768
+ for (Te(i < e, `Invalid index ${i}`); n.size - 1 < i; ) {
1769
+ const a = n.size;
1770
+ let c;
1771
+ switch (typeof r) {
1772
+ case "function": {
1773
+ c = r(a, t);
1774
+ break;
1775
+ }
1776
+ case "number": {
1777
+ c = r;
1778
+ break;
1779
+ }
1780
+ }
1781
+ if (a === 0)
1782
+ n.set(a, {
1783
+ size: c,
1784
+ scrollOffset: 0
1785
+ });
1786
+ else {
1787
+ const l = n.get(a - 1);
1788
+ Te(
1789
+ l !== void 0,
1790
+ `Unexpected bounds cache miss for index ${i}`
1791
+ ), n.set(a, {
1792
+ scrollOffset: l.scrollOffset + l.size,
1793
+ size: c
1794
+ });
1795
+ }
1796
+ }
1797
+ const s = n.get(i);
1798
+ return Te(
1799
+ s !== void 0,
1800
+ `Unexpected bounds cache miss for index ${i}`
1801
+ ), s;
1802
+ },
1803
+ set(i, s) {
1804
+ n.set(i, s);
1805
+ },
1806
+ get size() {
1807
+ return n.size;
1808
+ }
1809
+ };
1810
+ }
1811
+ function Dn({
1812
+ itemCount: e,
1813
+ itemProps: t,
1814
+ itemSize: r
1815
+ }) {
1816
+ return ye(
1817
+ () => $n({
1818
+ itemCount: e,
1819
+ itemProps: t,
1820
+ itemSize: r
1821
+ }),
1822
+ [e, t, r]
1823
+ );
1824
+ }
1825
+ function Nn({
1826
+ containerSize: e,
1827
+ itemSize: t
1828
+ }) {
1829
+ let r;
1830
+ switch (typeof t) {
1831
+ case "string": {
1832
+ Te(
1833
+ t.endsWith("%"),
1834
+ `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`
1835
+ ), Te(
1836
+ e !== void 0,
1837
+ "Container size must be defined if a percentage item size is specified"
1838
+ ), r = e * parseInt(t) / 100;
1839
+ break;
1840
+ }
1841
+ default: {
1842
+ r = t;
1843
+ break;
1844
+ }
1845
+ }
1846
+ return r;
1847
+ }
1848
+ function Yt({
1849
+ containerElement: e,
1850
+ containerStyle: t,
1851
+ defaultContainerSize: r = 0,
1852
+ direction: n,
1853
+ isRtl: i = !1,
1854
+ itemCount: s,
1855
+ itemProps: a,
1856
+ itemSize: c,
1857
+ onResize: l,
1858
+ overscanCount: v
1859
+ }) {
1860
+ const { height: u = r, width: m = r } = zn({
1861
+ defaultHeight: n === "vertical" ? r : void 0,
1862
+ defaultWidth: n === "horizontal" ? r : void 0,
1863
+ element: e,
1864
+ mode: n === "vertical" ? "only-height" : "only-width",
1865
+ style: t
1866
+ }), E = Ae({
1867
+ height: 0,
1868
+ width: 0
1869
+ }), I = n === "vertical" ? u : m, $ = Nn({ containerSize: I, itemSize: c });
1870
+ yt(() => {
1871
+ if (typeof l == "function") {
1872
+ const x = E.current;
1873
+ (x.height !== u || x.width !== m) && (l({ height: u, width: m }, { ...x }), x.height = u, x.width = m);
1874
+ }
1875
+ }, [u, l, m]);
1876
+ const C = Dn({
1877
+ itemCount: s,
1878
+ itemProps: a,
1879
+ itemSize: $
1880
+ }), d = he(
1881
+ (x) => C.get(x),
1882
+ [C]
1883
+ ), [k, D] = Me(
1884
+ () => st({
1885
+ cachedBounds: C,
1886
+ // TODO Potentially support a defaultScrollOffset prop?
1887
+ containerScrollOffset: 0,
1888
+ containerSize: I,
1889
+ itemCount: s,
1890
+ overscanCount: v
1891
+ })
1892
+ ), {
1893
+ startIndexVisible: ie,
1894
+ startIndexOverscan: P,
1895
+ stopIndexVisible: S,
1896
+ stopIndexOverscan: z
1897
+ } = {
1898
+ startIndexVisible: Math.min(s - 1, k.startIndexVisible),
1899
+ startIndexOverscan: Math.min(s - 1, k.startIndexOverscan),
1900
+ stopIndexVisible: Math.min(s - 1, k.stopIndexVisible),
1901
+ stopIndexOverscan: Math.min(s - 1, k.stopIndexOverscan)
1902
+ }, T = he(
1903
+ () => cr({
1904
+ cachedBounds: C,
1905
+ itemCount: s,
1906
+ itemSize: $
1907
+ }),
1908
+ [C, s, $]
1909
+ ), j = he(
1910
+ (x) => {
1911
+ const F = it({
1912
+ containerElement: e,
1913
+ direction: n,
1914
+ isRtl: i,
1915
+ scrollOffset: x
1916
+ });
1917
+ return st({
1918
+ cachedBounds: C,
1919
+ containerScrollOffset: F,
1920
+ containerSize: I,
1921
+ itemCount: s,
1922
+ overscanCount: v
1923
+ });
1924
+ },
1925
+ [
1926
+ C,
1927
+ e,
1928
+ I,
1929
+ n,
1930
+ i,
1931
+ s,
1932
+ v
1933
+ ]
1934
+ );
1935
+ qe(() => {
1936
+ const x = (n === "vertical" ? e == null ? void 0 : e.scrollTop : e == null ? void 0 : e.scrollLeft) ?? 0;
1937
+ D(j(x));
1938
+ }, [e, n, j]), qe(() => {
1939
+ if (!e)
1940
+ return;
1941
+ const x = () => {
1942
+ D((F) => {
1943
+ const { scrollLeft: U, scrollTop: G } = e, Q = it({
1944
+ containerElement: e,
1945
+ direction: n,
1946
+ isRtl: i,
1947
+ scrollOffset: n === "vertical" ? G : U
1948
+ }), le = st({
1949
+ cachedBounds: C,
1950
+ containerScrollOffset: Q,
1951
+ containerSize: I,
1952
+ itemCount: s,
1953
+ overscanCount: v
1954
+ });
1955
+ return Be(le, F) ? F : le;
1956
+ });
1957
+ };
1958
+ return e.addEventListener("scroll", x), () => {
1959
+ e.removeEventListener("scroll", x);
1960
+ };
1961
+ }, [
1962
+ C,
1963
+ e,
1964
+ I,
1965
+ n,
1966
+ s,
1967
+ v
1968
+ ]);
1969
+ const V = In(
1970
+ ({
1971
+ align: x = "auto",
1972
+ containerScrollOffset: F,
1973
+ index: U
1974
+ }) => {
1975
+ let G = Ln({
1976
+ align: x,
1977
+ cachedBounds: C,
1978
+ containerScrollOffset: F,
1979
+ containerSize: I,
1980
+ index: U,
1981
+ itemCount: s,
1982
+ itemSize: $
1983
+ });
1984
+ if (e) {
1985
+ if (G = it({
1986
+ containerElement: e,
1987
+ direction: n,
1988
+ isRtl: i,
1989
+ scrollOffset: G
1990
+ }), typeof e.scrollTo != "function") {
1991
+ const Q = j(G);
1992
+ Be(k, Q) || D(Q);
1993
+ }
1994
+ return G;
1995
+ }
1996
+ }
1997
+ );
1998
+ return {
1999
+ getCellBounds: d,
2000
+ getEstimatedSize: T,
2001
+ scrollToIndex: V,
2002
+ startIndexOverscan: P,
2003
+ startIndexVisible: ie,
2004
+ stopIndexOverscan: z,
2005
+ stopIndexVisible: S
2006
+ };
2007
+ }
2008
+ function Fn(e) {
2009
+ return ye(() => e, Object.values(e));
2010
+ }
2011
+ function Wn(e, t) {
2012
+ const {
2013
+ ariaAttributes: r,
2014
+ style: n,
2015
+ ...i
2016
+ } = e, {
2017
+ ariaAttributes: s,
2018
+ style: a,
2019
+ ...c
2020
+ } = t;
2021
+ return Be(r, s) && Be(n, a) && Be(i, c);
2022
+ }
2023
+ function Vn({
2024
+ cellComponent: e,
2025
+ cellProps: t,
2026
+ children: r,
2027
+ className: n,
2028
+ columnCount: i,
2029
+ columnWidth: s,
2030
+ defaultHeight: a = 0,
2031
+ defaultWidth: c = 0,
2032
+ dir: l,
2033
+ gridRef: v,
2034
+ onCellsRendered: u,
2035
+ onResize: m,
2036
+ overscanCount: E = 3,
2037
+ rowCount: I,
2038
+ rowHeight: $,
2039
+ style: C,
2040
+ tagName: d = "div",
2041
+ ...k
2042
+ }) {
2043
+ const D = Fn(t), ie = ye(
2044
+ () => Gt(e, Wn),
2045
+ [e]
2046
+ ), [P, S] = Me(null), z = Mn(P, l), {
2047
+ getCellBounds: T,
2048
+ getEstimatedSize: j,
2049
+ startIndexOverscan: V,
2050
+ startIndexVisible: x,
2051
+ scrollToIndex: F,
2052
+ stopIndexOverscan: U,
2053
+ stopIndexVisible: G
2054
+ } = Yt({
2055
+ containerElement: P,
2056
+ containerStyle: C,
2057
+ defaultContainerSize: c,
2058
+ direction: "horizontal",
2059
+ isRtl: z,
2060
+ itemCount: i,
2061
+ itemProps: D,
2062
+ itemSize: s,
2063
+ onResize: m,
2064
+ overscanCount: E
2065
+ }), {
2066
+ getCellBounds: Q,
2067
+ getEstimatedSize: le,
2068
+ startIndexOverscan: be,
2069
+ startIndexVisible: Re,
2070
+ scrollToIndex: Ee,
2071
+ stopIndexOverscan: fe,
2072
+ stopIndexVisible: y
2073
+ } = Yt({
2074
+ containerElement: P,
2075
+ containerStyle: C,
2076
+ defaultContainerSize: a,
2077
+ direction: "vertical",
2078
+ itemCount: I,
2079
+ itemProps: D,
2080
+ itemSize: $,
2081
+ onResize: m,
2082
+ overscanCount: E
2083
+ });
2084
+ jr(
2085
+ v,
2086
+ () => ({
2087
+ get element() {
2088
+ return P;
2089
+ },
2090
+ scrollToCell({
2091
+ behavior: g = "auto",
2092
+ columnAlign: h = "auto",
2093
+ columnIndex: R,
2094
+ rowAlign: L = "auto",
2095
+ rowIndex: _
2096
+ }) {
2097
+ const A = F({
2098
+ align: h,
2099
+ containerScrollOffset: (P == null ? void 0 : P.scrollLeft) ?? 0,
2100
+ index: R
2101
+ }), H = Ee({
2102
+ align: L,
2103
+ containerScrollOffset: (P == null ? void 0 : P.scrollTop) ?? 0,
2104
+ index: _
2105
+ });
2106
+ typeof (P == null ? void 0 : P.scrollTo) == "function" && P.scrollTo({
2107
+ behavior: g,
2108
+ left: A,
2109
+ top: H
2110
+ });
2111
+ },
2112
+ scrollToColumn({
2113
+ align: g = "auto",
2114
+ behavior: h = "auto",
2115
+ index: R
2116
+ }) {
2117
+ const L = F({
2118
+ align: g,
2119
+ containerScrollOffset: (P == null ? void 0 : P.scrollLeft) ?? 0,
2120
+ index: R
2121
+ });
2122
+ typeof (P == null ? void 0 : P.scrollTo) == "function" && P.scrollTo({
2123
+ behavior: h,
2124
+ left: L
2125
+ });
2126
+ },
2127
+ scrollToRow({
2128
+ align: g = "auto",
2129
+ behavior: h = "auto",
2130
+ index: R
2131
+ }) {
2132
+ const L = Ee({
2133
+ align: g,
2134
+ containerScrollOffset: (P == null ? void 0 : P.scrollTop) ?? 0,
2135
+ index: R
2136
+ });
2137
+ typeof (P == null ? void 0 : P.scrollTo) == "function" && P.scrollTo({
2138
+ behavior: h,
2139
+ top: L
2140
+ });
2141
+ }
2142
+ }),
2143
+ [P, F, Ee]
2144
+ ), Je(() => {
2145
+ V >= 0 && U >= 0 && be >= 0 && fe >= 0 && u && u(
2146
+ {
2147
+ columnStartIndex: x,
2148
+ columnStopIndex: G,
2149
+ rowStartIndex: Re,
2150
+ rowStopIndex: y
2151
+ },
2152
+ {
2153
+ columnStartIndex: V,
2154
+ columnStopIndex: U,
2155
+ rowStartIndex: be,
2156
+ rowStopIndex: fe
2157
+ }
2158
+ );
2159
+ }, [
2160
+ u,
2161
+ V,
2162
+ x,
2163
+ U,
2164
+ G,
2165
+ be,
2166
+ Re,
2167
+ fe,
2168
+ y
2169
+ ]);
2170
+ const w = ye(() => {
2171
+ const g = [];
2172
+ if (i > 0 && I > 0)
2173
+ for (let h = be; h <= fe; h++) {
2174
+ const R = Q(h), L = [];
2175
+ for (let _ = V; _ <= U; _++) {
2176
+ const A = T(_);
2177
+ L.push(
2178
+ /* @__PURE__ */ At(
2179
+ ie,
2180
+ {
2181
+ ...D,
2182
+ ariaAttributes: {
2183
+ "aria-colindex": _ + 1,
2184
+ role: "gridcell"
2185
+ },
2186
+ columnIndex: _,
2187
+ key: _,
2188
+ rowIndex: h,
2189
+ style: {
2190
+ position: "absolute",
2191
+ left: z ? void 0 : 0,
2192
+ right: z ? 0 : void 0,
2193
+ transform: `translate(${z ? -A.scrollOffset : A.scrollOffset}px, ${R.scrollOffset}px)`,
2194
+ height: R.size,
2195
+ width: A.size
2196
+ }
2197
+ }
2198
+ )
2199
+ );
2200
+ }
2201
+ g.push(
2202
+ /* @__PURE__ */ J.jsx("div", { role: "row", "aria-rowindex": h + 1, children: L }, h)
2203
+ );
2204
+ }
2205
+ return g;
2206
+ }, [
2207
+ ie,
2208
+ D,
2209
+ i,
2210
+ V,
2211
+ U,
2212
+ T,
2213
+ Q,
2214
+ z,
2215
+ I,
2216
+ be,
2217
+ fe
2218
+ ]), O = /* @__PURE__ */ J.jsx(
2219
+ "div",
2220
+ {
2221
+ "aria-hidden": !0,
2222
+ style: {
2223
+ height: le(),
2224
+ width: j(),
2225
+ zIndex: -1
2226
+ }
2227
+ }
2228
+ );
2229
+ return At(
2230
+ d,
2231
+ {
2232
+ "aria-colcount": i,
2233
+ "aria-rowcount": I,
2234
+ role: "grid",
2235
+ ...k,
2236
+ className: n,
2237
+ dir: l,
2238
+ ref: S,
2239
+ style: {
2240
+ position: "relative",
2241
+ maxHeight: "100%",
2242
+ maxWidth: "100%",
2243
+ flexGrow: 1,
2244
+ overflow: "auto",
2245
+ ...C
2246
+ }
2247
+ },
2248
+ w,
2249
+ r,
2250
+ O
2251
+ );
2252
+ }
2253
+ const Hn = (e) => /* @__PURE__ */ J.jsxs("svg", { viewBox: "64 64 896 896", focusable: "false", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", ...e, children: [
2254
+ /* @__PURE__ */ J.jsx("path", { d: "M518.5 360.3a7.95 7.95 0 00-12.9 0l-178 246c-3.8 5.3 0 12.7 6.5 12.7H381c10.2 0 19.9-4.9 25.9-13.2L512 460.4l105.2 145.4c6 8.3 15.6 13.2 25.9 13.2H690c6.5 0 10.3-7.4 6.5-12.7l-178-246z" }),
2255
+ /* @__PURE__ */ J.jsx("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" })
2256
+ ] }), Bn = (e) => /* @__PURE__ */ J.jsxs("svg", { viewBox: "64 64 896 896", focusable: "false", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", ...e, children: [
2257
+ /* @__PURE__ */ J.jsx("path", { d: "M690 405h-46.9c-10.2 0-19.9 4.9-25.9 13.2L512 563.6 406.8 418.2c-6-8.3-15.6-13.2-25.9-13.2H334c-6.5 0-10.3 7.4-6.5 12.7l178 246c3.2 4.4 9.7 4.4 12.9 0l178-246c3.9-5.3.1-12.7-6.4-12.7z" }),
2258
+ /* @__PURE__ */ J.jsx("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" })
2259
+ ] }), Yn = (e, t, r) => {
2260
+ var i;
2261
+ const n = (i = r[e]) == null ? void 0 : i[t];
2262
+ return !n || n.rowspan === 0 || n.colspan === 0;
2263
+ }, Kn = (e, t, r, n, i) => {
2264
+ var l, v, u;
2265
+ const s = (l = n[e]) == null ? void 0 : l[t];
2266
+ if (!s || s.rowspan === 0 || s.colspan === 0)
2267
+ return;
2268
+ const a = { ...r }, c = i[t];
2269
+ if (s.colspan > 1) {
2270
+ let m = 0;
2271
+ for (let E = t; E < t + s.colspan; E++)
2272
+ m += Number((v = i[E]) == null ? void 0 : v.width) || 100;
2273
+ a.width = m;
2274
+ }
2275
+ return s.rowspan > 1 && (a.height = s.rowspan * ar), (u = c == null ? void 0 : c.style) != null && u.textAlign && (a.textAlign = c.style.textAlign, c.style.textAlign === "right" && (a.justifyContent = "flex-end"), c.style.textAlign === "center" && (a.justifyContent = "center")), a.border = "1px solid #f0f0f0", a.padding = "8px 16px", a.display = "flex", a.alignItems = "center", a.backgroundColor = "#fff", a;
2276
+ }, Gn = ({ columnIndex: e, rowIndex: t, style: r, mergedData: n, columns: i, handleExpand: s, meta: a }) => {
2277
+ if (Yn(t, e, n))
2278
+ return null;
2279
+ const c = n[t][e], l = Kn(t, e, r, n, i), v = i[e], u = a == null ? void 0 : a.find((I) => I.field === v.field), m = Ye.isValidElement(c.content);
2280
+ let E;
2281
+ if (E = c.content, u != null && u.clickHandler && !m && E !== null && E !== void 0) {
2282
+ const I = c.data;
2283
+ E = /* @__PURE__ */ J.jsx(
2284
+ "a",
2285
+ {
2286
+ href: "javascript:void(0)",
2287
+ onClick: ($) => {
2288
+ $.preventDefault(), $.stopPropagation(), u.clickHandler(I);
2289
+ },
2290
+ style: { cursor: "pointer", textDecoration: "underline", color: "#1890ff" },
2291
+ children: E
2292
+ }
2293
+ );
2294
+ }
2295
+ return /* @__PURE__ */ J.jsxs(
2296
+ "div",
2297
+ {
2298
+ style: l,
2299
+ className: Et("table-cell", "virtual-table-cell", {
2300
+ "virtual-table-cell-last": e === i.length - 1
2301
+ }),
2302
+ title: typeof E == "string" ? E : void 0,
2303
+ children: [
2304
+ /* @__PURE__ */ J.jsx("span", { className: "expand-icon", children: c.expandable ? c.expanded ? /* @__PURE__ */ J.jsx(Bn, { onClick: () => {
2305
+ console.log("DownCircleOutlined onClick", c), c.onClick && c.onClick(c), s(c);
2306
+ } }) : /* @__PURE__ */ J.jsx(Hn, { onClick: () => {
2307
+ console.log("UpCircleOutlined onClick", c), c.onClick && c.onClick(c), s(c);
2308
+ } }) : null }),
2309
+ E
2310
+ ]
2311
+ }
2312
+ );
2313
+ }, Un = (e) => {
2314
+ const { data: t, info: r, scroll: n, columns: i, tableWidth: s } = e, { ref: a, onScroll: c } = r, l = Ae(), v = ye(() => {
2315
+ const S = {};
2316
+ return Object.defineProperty(S, "scrollLeft", {
2317
+ get: () => {
2318
+ var z, T;
2319
+ return ((T = (z = l.current) == null ? void 0 : z.element) == null ? void 0 : T.scrollLeft) || 0;
2320
+ },
2321
+ set: (z) => {
2322
+ var T;
2323
+ (T = l.current) != null && T.element && (l.current.element.scrollLeft = z);
2324
+ }
2325
+ }), Object.defineProperty(S, "scrollTop", {
2326
+ get: () => {
2327
+ var z, T;
2328
+ return ((T = (z = l.current) == null ? void 0 : z.element) == null ? void 0 : T.scrollTop) || 0;
2329
+ },
2330
+ set: (z) => {
2331
+ var T;
2332
+ (T = l.current) != null && T.element && (l.current.element.scrollTop = z);
2333
+ }
2334
+ }), S;
2335
+ }, []);
2336
+ Je(() => {
2337
+ a && (a.current = v);
2338
+ }, [a, v]);
2339
+ const u = t, m = u.length, E = he((S) => {
2340
+ let z = 0;
2341
+ return S.forEach((T) => {
2342
+ T != null && T.children && T.children.length > 0 ? z += E(T.children) : z += 1;
2343
+ }), z;
2344
+ }, []), I = E(i), $ = he((S) => {
2345
+ let z = [];
2346
+ return S.forEach((T) => {
2347
+ T != null && T.children && T.children.length > 0 ? z = [...z, ...$(T.children)] : z.push(T);
2348
+ }), z;
2349
+ }, []), C = $(i), d = he((S) => {
2350
+ const z = C[S];
2351
+ let T = (z == null ? void 0 : z.width) || 100;
2352
+ return typeof T == "string" && (T = parseInt(T.replace("px", "")) || 100), T;
2353
+ }, [C]), k = he((S) => ar, []), D = ye(() => u.map((S) => S.cells), [u]), ie = he((S) => {
2354
+ if (S && typeof S.scrollLeft == "number") {
2355
+ c && c(S);
2356
+ return;
2357
+ }
2358
+ if (S && S.target) {
2359
+ const { scrollLeft: z, scrollTop: T } = S.target;
2360
+ c && c({ scrollLeft: z, scrollTop: T });
2361
+ }
2362
+ }, [c]), P = (typeof (n == null ? void 0 : n.y) == "number" ? n.y : parseInt((n == null ? void 0 : n.y) || "400")) || 400;
2363
+ return /* @__PURE__ */ J.jsx(
2364
+ Vn,
2365
+ {
2366
+ gridRef: l,
2367
+ columnCount: I,
2368
+ columnWidth: d,
2369
+ rowCount: m,
2370
+ rowHeight: k,
2371
+ style: { height: P - 40, width: s },
2372
+ onScroll: ie,
2373
+ className: "virtual-grid",
2374
+ overscanCount: 20,
2375
+ cellComponent: Gn,
2376
+ cellProps: {
2377
+ mergedData: D,
2378
+ columns: C,
2379
+ data: u,
2380
+ handleExpand: e.handleExpand,
2381
+ meta: e.meta
2382
+ }
2383
+ }
2384
+ );
2385
+ }, He = (e) => {
2386
+ const t = [], r = (n) => {
2387
+ n.children && n.children.length > 0 ? n.children.forEach((i) => r(i)) : t.push(n);
2388
+ };
2389
+ return e.forEach((n) => r(n)), t;
2390
+ }, de = (e, t) => {
2391
+ const r = t.split(".");
2392
+ let n = e;
2393
+ for (const i of r) {
2394
+ if (n == null)
2395
+ return n;
2396
+ n = n[i];
2397
+ }
2398
+ return n == null && (n = Ce), n;
2399
+ }, at = (e, t) => "|" + t.map((n) => de(e, n)).join("|"), Kt = {
2400
+ sum: (e) => e.reduce((t, r) => t + (Number(r) || 0), 0),
2401
+ avg: (e) => {
2402
+ const t = e.filter((r) => !isNaN(Number(r)));
2403
+ return t.length > 0 ? t.reduce((r, n) => r + Number(n), 0) / t.length : 0;
2404
+ },
2405
+ count: (e) => e.length,
2406
+ min: (e) => Math.min(...e.map((t) => Number(t) || 1 / 0)),
2407
+ max: (e) => Math.max(...e.map((t) => Number(t) || -1 / 0)),
2408
+ d_count: (e) => new Set(e).size,
2409
+ variance: (e) => {
2410
+ const t = e.map((i) => Number(i)).filter((i) => !isNaN(i));
2411
+ if (t.length === 0)
2412
+ return 0;
2413
+ const r = t.reduce((i, s) => i + s, 0) / t.length;
2414
+ return t.map((i) => Math.pow(i - r, 2)).reduce((i, s) => i + s, 0) / t.length;
2415
+ },
2416
+ stddev: (e) => {
2417
+ const t = e.map((s) => Number(s)).filter((s) => !isNaN(s));
2418
+ if (t.length === 0)
2419
+ return 0;
2420
+ const r = t.reduce((s, a) => s + a, 0) / t.length, i = t.map((s) => Math.pow(s - r, 2)).reduce((s, a) => s + a, 0) / t.length;
2421
+ return Math.sqrt(i);
2422
+ }
2423
+ }, ge = /* @__PURE__ */ new Map(), ct = /* @__PURE__ */ new Map(), lt = /* @__PURE__ */ new Map(), qn = (e) => {
2424
+ const { data: t, sortParams: r, fields: n } = e, { rows: i, columns: s, values: a } = n;
2425
+ if (!t || t.length === 0 || !i.length && !s.length && !a.length)
2426
+ return {
2427
+ list: [],
2428
+ dataExpandFilter: (y) => y
2429
+ };
2430
+ console.group("透视表数据处理");
2431
+ const c = He(i), l = He(s), v = He(a), u = c.map((y) => y.field), m = l.map((y) => y.field), E = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map();
2432
+ t.forEach((y) => {
2433
+ const w = at(y, u);
2434
+ E.has(w) || E.set(w, []), E.get(w).push(y);
2435
+ const O = at(y, m);
2436
+ I.has(O) || I.set(O, []), I.get(O).push(y);
2437
+ const g = `${w}||${O}`;
2438
+ $.has(g) || $.set(g, []), $.get(g).push(y);
2439
+ });
2440
+ const C = () => Array.from(E.entries()).sort(([y, w], [O, g]) => {
2441
+ if (r && r.length > 0)
2442
+ for (const h of r) {
2443
+ const { field: R, sortType: L } = h, _ = L === "asc", A = de(w[0], R), H = de(g[0], R);
2444
+ if (A < H)
2445
+ return _ ? -1 : 1;
2446
+ if (A > H)
2447
+ return _ ? 1 : -1;
2448
+ }
2449
+ for (let h = 0; h < u.length; h++) {
2450
+ const R = u[h], L = c[h], _ = de(w[0], R), A = de(g[0], R);
2451
+ if (_ !== A)
2452
+ if (L.sort && L.sort.enabled) {
2453
+ const H = L.sort.type === "asc";
2454
+ if (_ < A)
2455
+ return H ? -1 : 1;
2456
+ if (_ > A)
2457
+ return H ? 1 : -1;
2458
+ } else {
2459
+ if (_ < A)
2460
+ return -1;
2461
+ if (_ > A)
2462
+ return 1;
2463
+ }
2464
+ }
2465
+ return 0;
2466
+ }), d = () => Array.from(I.entries()).sort(([y, w], [O, g]) => {
2467
+ for (let h = 0; h < m.length; h++) {
2468
+ const R = m[h], L = l[h], _ = de(w[0], R), A = de(g[0], R);
2469
+ if (_ !== A)
2470
+ if (L.sort && L.sort.enabled) {
2471
+ const H = L.sort.type === "asc";
2472
+ if (_ < A)
2473
+ return H ? -1 : 1;
2474
+ if (_ > A)
2475
+ return H ? 1 : -1;
2476
+ } else {
2477
+ if (_ < A)
2478
+ return -1;
2479
+ if (_ > A)
2480
+ return 1;
2481
+ }
2482
+ }
2483
+ return 0;
2484
+ }), k = () => {
2485
+ const y = [], w = He(i);
2486
+ for (let O = 1; O <= w.length; O++)
2487
+ y.push(w.slice(0, O));
2488
+ return y;
2489
+ }, D = () => {
2490
+ const y = k(), w = /* @__PURE__ */ new Set();
2491
+ return y.forEach((O, g) => {
2492
+ const h = O[O.length - 1];
2493
+ h.total && h.total.enabled && w.add(g);
2494
+ }), w;
2495
+ }, ie = () => {
2496
+ const y = k(), w = [], O = D();
2497
+ return O.size === 0 || O.forEach((g) => {
2498
+ let h = [];
2499
+ g > 0 && (h = y[g - 1]);
2500
+ const R = {};
2501
+ t.forEach((L) => {
2502
+ let _ = "";
2503
+ if (g > 0 ? _ = h.map((A) => de(L, A.field)).join("|") : _ = "__GLOBAL__", !R[_]) {
2504
+ const H = y[g][g].total;
2505
+ R[_] = {
2506
+ records: [],
2507
+ config: H
2508
+ };
2509
+ }
2510
+ R[_].records.push(L);
2511
+ }), w.push({ level: g, data: R });
2512
+ }), w;
2513
+ }, P = d(), S = /* @__PURE__ */ new Map(), z = (y, w) => {
2514
+ if (console.log("toggleExpand", y, w), ge.has(y)) {
2515
+ const O = ge.get(y), g = O.get(w);
2516
+ O.set(w, !g), ct.set("rowKey", w), ct.set("level", y), ct.set("expanded", !g);
2517
+ }
2518
+ }, T = (y) => {
2519
+ const w = ie(), O = [...y];
2520
+ if (w.length === 0)
2521
+ return O;
2522
+ for (let g = 0; g < w.length; g++) {
2523
+ const { level: h, data: R } = w[g];
2524
+ Object.keys(R).forEach((L) => {
2525
+ const { records: _, config: A } = R[L], { label: H = Ht, position: X = "bottom" } = A || {}, we = L.split("|");
2526
+ let se = -1, ae = -1;
2527
+ if (h === 0)
2528
+ se = 0, ae = O.length - 1;
2529
+ else
2530
+ for (let b = 0; b < O.length; b++) {
2531
+ const ne = O[b];
2532
+ u.slice(0, h).every((Se, pe) => {
2533
+ var Z;
2534
+ return ((Z = ne[pe]) == null ? void 0 : Z.content) === we[pe];
2535
+ }) && (se === -1 && (se = b), ae = b);
2536
+ }
2537
+ if (se !== -1) {
2538
+ const b = [];
2539
+ let ne = "";
2540
+ u.forEach((Se, pe) => {
2541
+ let Z = Ce;
2542
+ const xe = pe + 1, ze = xe < u.length, Pe = c[pe];
2543
+ pe <= h && (pe === h ? Z = H : Z = we[pe], ne += `|${Z}`);
2544
+ const Ne = ge.has(xe) && ge.get(xe).get(ne) || !0;
2545
+ (Z === Ce || Z === null || Z === void 0) && Pe.emptyReplace && (Z = Pe.emptyReplace), b.push({
2546
+ content: Z,
2547
+ rowspan: 1,
2548
+ colspan: 1,
2549
+ data: null,
2550
+ rowKey: ne,
2551
+ expandable: X === "top" && ze && Z !== Ce && Z !== Ht,
2552
+ expanded: X === "top" ? Ne : !1,
2553
+ level: xe,
2554
+ onClick: X === "top" && ze ? (ve) => z(ve.level, ve.rowKey) : void 0
2555
+ });
2556
+ }), P.forEach(([Se, pe]) => {
2557
+ v.forEach((Z) => {
2558
+ const xe = Z.field, ze = Z.calculateType || "sum", Ne = _.filter((Ie) => at(Ie, m) === Se).map((Ie) => de(Ie, xe));
2559
+ let ve = Kt[ze](Ne);
2560
+ (ve === Ce || ve === null || ve === void 0 || typeof ve == "number" && isNaN(ve)) && Z.emptyReplace && (ve = Z.emptyReplace), b.push({
2561
+ content: ve,
2562
+ rowspan: 1,
2563
+ colspan: 1,
2564
+ data: null
2565
+ });
2566
+ });
2567
+ });
2568
+ const te = X === "top" ? se : ae + 1;
2569
+ lt.has(ne) || (O.splice(te, 0, b), lt.set(ne, 1), X === "top" && h > 0 && S.set(L, ne));
2570
+ }
2571
+ });
2572
+ }
2573
+ return O;
2574
+ }, j = He(i);
2575
+ ge.clear(), t.forEach((y) => {
2576
+ let w = "";
2577
+ u.forEach((O, g) => {
2578
+ const h = g + 1, R = de(y, O);
2579
+ w += `|${R}`, ge.has(h) || ge.set(h, /* @__PURE__ */ new Map()), ge.get(h).set(w, !0);
2580
+ });
2581
+ });
2582
+ const V = C();
2583
+ let x = [];
2584
+ const F = /* @__PURE__ */ new Map();
2585
+ V.forEach(([y, w]) => {
2586
+ const O = w[0];
2587
+ let g = "";
2588
+ u.forEach((h, R) => {
2589
+ const L = de(O, h), _ = R + 1;
2590
+ g += `|${L}`, F.has(_) || F.set(_, /* @__PURE__ */ new Map());
2591
+ const A = F.get(_);
2592
+ A.set(g, (A.get(g) || 0) + 1);
2593
+ });
2594
+ }), V.forEach(([y, w]) => {
2595
+ const O = w[0], g = [];
2596
+ let h = "";
2597
+ u.forEach((R, L) => {
2598
+ var ne;
2599
+ let _ = de(O, R);
2600
+ const A = L + 1, H = A < u.length, X = c[L];
2601
+ h += `|${_}`;
2602
+ let we = y;
2603
+ const se = j.find((te) => te.field === R);
2604
+ if ((ne = se == null ? void 0 : se.total) != null && ne.enabled && se.total.label && (we = `${h}|${se.total.label}`), H) {
2605
+ const te = h;
2606
+ S.has(te) || S.set(te, we);
2607
+ }
2608
+ const ae = ge.has(A) && ge.get(A).get(h) || !0, b = A < u.length ? (F.get(A).get(h) || 0) > 1 : !1;
2609
+ (_ === Ce || _ === null || _ === void 0) && X.emptyReplace && (_ = X.emptyReplace), g.push({
2610
+ content: _,
2611
+ rowspan: 1,
2612
+ colspan: 1,
2613
+ data: O,
2614
+ expandable: H && b,
2615
+ expanded: ae,
2616
+ level: A,
2617
+ rowKey: h,
2618
+ onClick: H && b ? (te) => z(te.level, te.rowKey) : void 0
2619
+ });
2620
+ }), P.forEach(([R, L]) => {
2621
+ v.forEach((_) => {
2622
+ const A = _.field, H = _.calculateType || "sum", X = `${y}||${R}`, se = ($.get(X) || []).map((b) => de(b, A));
2623
+ let ae = Kt[H](se);
2624
+ (ae === Ce || ae === null || ae === void 0 || typeof ae == "number" && isNaN(ae)) && _.emptyReplace && (ae = _.emptyReplace), g.push({
2625
+ content: ae,
2626
+ rowspan: 1,
2627
+ colspan: 1,
2628
+ data: O
2629
+ });
2630
+ });
2631
+ }), x.push({ cells: g, rowKey: h });
2632
+ });
2633
+ const U = (y) => {
2634
+ const O = y.split("|").filter(Boolean).length;
2635
+ for (let g = 1; g < O; g++)
2636
+ if (ge.has(g)) {
2637
+ const h = ge.get(g), R = y.split("|").slice(0, g + 1).join("|");
2638
+ if (h.has(R) && !h.get(R)) {
2639
+ const L = R, _ = S.get(L);
2640
+ if (y !== _)
2641
+ return !1;
2642
+ }
2643
+ }
2644
+ return !0;
2645
+ }, G = (y) => {
2646
+ var w, O;
2647
+ if (!y || y.length === 0)
2648
+ return y;
2649
+ for (let g = 0; g < c.length; g++) {
2650
+ let h = y[0][g].content, R = 0, L = c[g], _ = (w = L.total) == null ? void 0 : w.enabled, A = ((O = L.total) == null ? void 0 : O.label) || "";
2651
+ for (let H = 1; H < y.length; H++) {
2652
+ const X = y[H][g];
2653
+ X.content !== Ce && (!_ || X.content !== A) && X.content === h ? (X.rowspan = 0, y[R][g].rowspan++) : (h = X.content, R = H);
2654
+ }
2655
+ }
2656
+ return y;
2657
+ }, Q = (y) => {
2658
+ console.group("透视表数据处理 - 过滤可见行");
2659
+ const w = y.filter((h) => U(h.rowKey)), O = w.map((h) => h.cells.map((R) => ({ ...R })));
2660
+ G(O);
2661
+ const g = w.map((h, R) => ({
2662
+ rowKey: h.rowKey,
2663
+ cells: O[R]
2664
+ }));
2665
+ return console.groupEnd(), g;
2666
+ };
2667
+ lt.clear();
2668
+ const le = x.map((y) => y.cells), Re = T(le).map((y, w) => {
2669
+ let O = "";
2670
+ return y.forEach((g, h) => {
2671
+ h < u.length && g.rowKey && (O = g.rowKey);
2672
+ }), { cells: y, rowKey: O };
2673
+ }), fe = (() => {
2674
+ const y = [];
2675
+ return c.forEach((w) => {
2676
+ y.push({
2677
+ ...w,
2678
+ width: w.width || 100,
2679
+ fixed: "left",
2680
+ key: w.field
2681
+ });
2682
+ }), l.length === 0 ? v.forEach((w) => {
2683
+ y.push({
2684
+ ...w,
2685
+ width: w.width || 100,
2686
+ key: w.field
2687
+ });
2688
+ }) : P.forEach(([w, O]) => {
2689
+ const g = w.split("|").filter((h) => h !== "");
2690
+ v.forEach((h) => {
2691
+ let R = g.join(" - ");
2692
+ R ? R += ` - ${h.title || h.field}` : R = h.title || h.field, y.push({
2693
+ ...h,
2694
+ field: `${w}||${h.field}`,
2695
+ // Unique identifier for the column in data handling
2696
+ title: R,
2697
+ width: h.width || 100,
2698
+ key: `${w}||${h.field}`
2699
+ });
2700
+ });
2701
+ }), y;
2702
+ })();
2703
+ return console.groupEnd(), {
2704
+ list: Re,
2705
+ dataExpandFilter: Q,
2706
+ tableColumns: fe
2707
+ };
2708
+ }, Jn = (e) => {
2709
+ const { data: t, fields: r } = e, { rows: n, columns: i, values: s } = r;
2710
+ if (!s || s.length === 0)
2711
+ return { list: [], dataExpandFilter: (a) => a };
2712
+ if (!t || t.length === 0)
2713
+ return { list: [], dataExpandFilter: (a) => a };
2714
+ if (n.length === 0 && i.length === 0) {
2715
+ const a = s.map((l) => ({
2716
+ ...l,
2717
+ width: l.width || 100,
2718
+ key: l.field
2719
+ }));
2720
+ return {
2721
+ list: t.map((l, v) => ({ cells: s.map((m) => ({
2722
+ content: l[m.field] ?? Ce,
2723
+ rowspan: 1,
2724
+ colspan: 1,
2725
+ style: m.style
2726
+ })), rowKey: v.toString() })),
2727
+ dataExpandFilter: (l) => l,
2728
+ tableColumns: a
2729
+ };
2730
+ }
2731
+ return qn(e);
2732
+ }, Qn = Gt((e) => {
2733
+ const { scroll: t, data: r, meta: n, sortParams: i, fields: s } = e, [a, c] = Me(0), [l, v] = Me([]), [u, m] = Me([]);
2734
+ console.log("list", l);
2735
+ const E = Ae(null), I = he(() => {
2736
+ if (E.current) {
2737
+ let j = E.current;
2738
+ if (console.log("rs=", j), !j || !j.list || !j.dataExpandFilter)
2739
+ return;
2740
+ v(j.dataExpandFilter(j.list));
2741
+ }
2742
+ }, []);
2743
+ Je(() => {
2744
+ let V = Jn({
2745
+ data: r,
2746
+ meta: n,
2747
+ sortParams: i,
2748
+ fields: s
2749
+ });
2750
+ E.current = V, V.tableColumns && m(V.tableColumns), I();
2751
+ }, [r, n, i, s, I]);
2752
+ const $ = he((j) => j ? typeof j == "string" ? parseInt(j.replace("px", "")) || 0 : typeof j == "number" ? j : 0 : 0, []), { baseWidth: C, colCount: d } = ye(() => {
2753
+ let j = 0, V = 0;
2754
+ const x = (F) => {
2755
+ F.forEach((U) => {
2756
+ U.type !== "group" && (j += $(U.width), V += 1), U != null && U.children && U.children.length > 0 && x(U.children);
2757
+ });
2758
+ };
2759
+ return x(u), { baseWidth: j, colCount: V };
2760
+ }, [u, $]), k = ye(() => {
2761
+ const j = (V) => V.map((x) => {
2762
+ let F = 0;
2763
+ C < a && d > 0 && (F = Math.floor((a - C) / d));
2764
+ const G = (x.width ? $(x.width) : jn) + F;
2765
+ return x.colSpan && x.colSpan > 1 ? x.width = G * x.colSpan : x.width = G, x.fixed && (x.fixed = !1), x != null && x.children && x.children.length > 0 && (x.children = j(x.children)), x;
2766
+ });
2767
+ return j(gt(u));
2768
+ }, [u, C, a, d, $]), D = ye(() => {
2769
+ let j = 0;
2770
+ const V = (x) => {
2771
+ x.forEach((F) => {
2772
+ F.type !== "group" && (j += $(F.width)), F != null && F.children && F.children.length > 0 && V(F.children);
2773
+ });
2774
+ };
2775
+ return V(k), j;
2776
+ }, [k, $]), ie = Ae(null), P = Ae(null), S = Ae(!1), z = he(({ scrollLeft: j }) => {
2777
+ S.current || (S.current = !0, ie.current && (ie.current.scrollLeft = j), requestAnimationFrame(() => {
2778
+ S.current = !1;
2779
+ }));
2780
+ }, []), T = he((j) => {
2781
+ if (S.current)
2782
+ return;
2783
+ S.current = !0;
2784
+ const V = j.currentTarget.scrollLeft;
2785
+ P.current && (P.current.scrollLeft = V), requestAnimationFrame(() => {
2786
+ S.current = !1;
2787
+ });
2788
+ }, []);
2789
+ return /* @__PURE__ */ J.jsx(
2790
+ bt,
2791
+ {
2792
+ onResize: ({ width: j }) => {
2793
+ j && j !== a && c(j);
2794
+ },
2795
+ children: /* @__PURE__ */ J.jsxs(
2796
+ "div",
2797
+ {
2798
+ className: Et("virtual-table", e.className),
2799
+ style: { width: "100%", ...e.style },
2800
+ children: [
2801
+ /* @__PURE__ */ J.jsx(
2802
+ Pn,
2803
+ {
2804
+ ref: ie,
2805
+ columns: k,
2806
+ width: a,
2807
+ onScroll: T
2808
+ }
2809
+ ),
2810
+ /* @__PURE__ */ J.jsx("div", { className: "virtual-table-body", style: { width: "100%" }, children: /* @__PURE__ */ J.jsx(
2811
+ Un,
2812
+ {
2813
+ data: l,
2814
+ info: {
2815
+ ref: P,
2816
+ onScroll: z
2817
+ },
2818
+ scroll: t,
2819
+ columns: k,
2820
+ tableWidth: a,
2821
+ gridWidth: D,
2822
+ handleExpand: I,
2823
+ meta: n
2824
+ }
2825
+ ) })
2826
+ ]
2827
+ }
2828
+ )
2829
+ }
2830
+ );
2831
+ });
2832
+ export {
2833
+ Qn as VirtualTable,
2834
+ Jn as dataHandler,
2835
+ qn as pivotDataHandler
2836
+ };
2837
+ //# sourceMappingURL=virtual-table.es.js.map