@amateescu/portal-ui-components 0.0.12-beta1 → 0.0.13-beta0

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,2469 @@
1
+ import { V as Kr, W as Tr, X as Lr, Y as Ar, Z as $n, j as lr, $ as Gn, e as $r, b as T, t as zr, F as Jn, D as ya, K as Lt, k as ke, c as Ke, w as Ht, a0 as Vr, a as O, i as Kt, a1 as ot, l as ur, a2 as cr, a3 as ba, a4 as Zn, a5 as Wr, _ as Rt, a6 as Qn, G as pa, P as Fr, h as lt, f as me, a7 as Ca, a8 as Hr, n as un, p as Dn, o as fr, I as wa } from "./useId-D0OLY2mt.js";
2
+ import * as i from "react";
3
+ import qe, { useState as qn, useMemo as Yn, useCallback as Tt, forwardRef as Ma, useRef as xn, useImperativeHandle as Ra } from "react";
4
+ import { a as ne } from "./objectWithoutPropertiesLoose-CIT-1_kH.js";
5
+ var Xn = /* @__PURE__ */ i.createContext(null);
6
+ function Ea(e) {
7
+ var n = e.children, t = e.onBatchResize, r = i.useRef(0), a = i.useRef([]), o = i.useContext(Xn), s = i.useCallback(function(l, u, c) {
8
+ r.current += 1;
9
+ var b = r.current;
10
+ a.current.push({
11
+ size: l,
12
+ element: u,
13
+ data: c
14
+ }), Promise.resolve().then(function() {
15
+ b === r.current && (t == null || t(a.current), a.current = []);
16
+ }), o == null || o(l, u, c);
17
+ }, [t, o]);
18
+ return /* @__PURE__ */ i.createElement(Xn.Provider, {
19
+ value: s
20
+ }, n);
21
+ }
22
+ var Br = function() {
23
+ if (typeof Map < "u")
24
+ return Map;
25
+ function e(n, t) {
26
+ var r = -1;
27
+ return n.some(function(a, o) {
28
+ return a[0] === t ? (r = o, !0) : !1;
29
+ }), r;
30
+ }
31
+ return (
32
+ /** @class */
33
+ function() {
34
+ function n() {
35
+ this.__entries__ = [];
36
+ }
37
+ return Object.defineProperty(n.prototype, "size", {
38
+ /**
39
+ * @returns {boolean}
40
+ */
41
+ get: function() {
42
+ return this.__entries__.length;
43
+ },
44
+ enumerable: !0,
45
+ configurable: !0
46
+ }), n.prototype.get = function(t) {
47
+ var r = e(this.__entries__, t), a = this.__entries__[r];
48
+ return a && a[1];
49
+ }, n.prototype.set = function(t, r) {
50
+ var a = e(this.__entries__, t);
51
+ ~a ? this.__entries__[a][1] = r : this.__entries__.push([t, r]);
52
+ }, n.prototype.delete = function(t) {
53
+ var r = this.__entries__, a = e(r, t);
54
+ ~a && r.splice(a, 1);
55
+ }, n.prototype.has = function(t) {
56
+ return !!~e(this.__entries__, t);
57
+ }, n.prototype.clear = function() {
58
+ this.__entries__.splice(0);
59
+ }, n.prototype.forEach = function(t, r) {
60
+ r === void 0 && (r = null);
61
+ for (var a = 0, o = this.__entries__; a < o.length; a++) {
62
+ var s = o[a];
63
+ t.call(r, s[1], s[0]);
64
+ }
65
+ }, n;
66
+ }()
67
+ );
68
+ }(), er = typeof window < "u" && typeof document < "u" && window.document === document, Kn = function() {
69
+ 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")();
70
+ }(), Sa = function() {
71
+ return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Kn) : function(e) {
72
+ return setTimeout(function() {
73
+ return e(Date.now());
74
+ }, 1e3 / 60);
75
+ };
76
+ }(), Pa = 2;
77
+ function Na(e, n) {
78
+ var t = !1, r = !1, a = 0;
79
+ function o() {
80
+ t && (t = !1, e()), r && l();
81
+ }
82
+ function s() {
83
+ Sa(o);
84
+ }
85
+ function l() {
86
+ var u = Date.now();
87
+ if (t) {
88
+ if (u - a < Pa)
89
+ return;
90
+ r = !0;
91
+ } else
92
+ t = !0, r = !1, setTimeout(s, n);
93
+ a = u;
94
+ }
95
+ return l;
96
+ }
97
+ var _a = 20, Ia = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], xa = typeof MutationObserver < "u", Da = (
98
+ /** @class */
99
+ function() {
100
+ function e() {
101
+ this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = Na(this.refresh.bind(this), _a);
102
+ }
103
+ return e.prototype.addObserver = function(n) {
104
+ ~this.observers_.indexOf(n) || this.observers_.push(n), this.connected_ || this.connect_();
105
+ }, e.prototype.removeObserver = function(n) {
106
+ var t = this.observers_, r = t.indexOf(n);
107
+ ~r && t.splice(r, 1), !t.length && this.connected_ && this.disconnect_();
108
+ }, e.prototype.refresh = function() {
109
+ var n = this.updateObservers_();
110
+ n && this.refresh();
111
+ }, e.prototype.updateObservers_ = function() {
112
+ var n = this.observers_.filter(function(t) {
113
+ return t.gatherActive(), t.hasActive();
114
+ });
115
+ return n.forEach(function(t) {
116
+ return t.broadcastActive();
117
+ }), n.length > 0;
118
+ }, e.prototype.connect_ = function() {
119
+ !er || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), xa ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
120
+ attributes: !0,
121
+ childList: !0,
122
+ characterData: !0,
123
+ subtree: !0
124
+ })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
125
+ }, e.prototype.disconnect_ = function() {
126
+ !er || !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);
127
+ }, e.prototype.onTransitionEnd_ = function(n) {
128
+ var t = n.propertyName, r = t === void 0 ? "" : t, a = Ia.some(function(o) {
129
+ return !!~r.indexOf(o);
130
+ });
131
+ a && this.refresh();
132
+ }, e.getInstance = function() {
133
+ return this.instance_ || (this.instance_ = new e()), this.instance_;
134
+ }, e.instance_ = null, e;
135
+ }()
136
+ ), Ur = function(e, n) {
137
+ for (var t = 0, r = Object.keys(n); t < r.length; t++) {
138
+ var a = r[t];
139
+ Object.defineProperty(e, a, {
140
+ value: n[a],
141
+ enumerable: !1,
142
+ writable: !1,
143
+ configurable: !0
144
+ });
145
+ }
146
+ return e;
147
+ }, ln = function(e) {
148
+ var n = e && e.ownerDocument && e.ownerDocument.defaultView;
149
+ return n || Kn;
150
+ }, jr = zn(0, 0, 0, 0);
151
+ function Tn(e) {
152
+ return parseFloat(e) || 0;
153
+ }
154
+ function Cr(e) {
155
+ for (var n = [], t = 1; t < arguments.length; t++)
156
+ n[t - 1] = arguments[t];
157
+ return n.reduce(function(r, a) {
158
+ var o = e["border-" + a + "-width"];
159
+ return r + Tn(o);
160
+ }, 0);
161
+ }
162
+ function Oa(e) {
163
+ for (var n = ["top", "right", "bottom", "left"], t = {}, r = 0, a = n; r < a.length; r++) {
164
+ var o = a[r], s = e["padding-" + o];
165
+ t[o] = Tn(s);
166
+ }
167
+ return t;
168
+ }
169
+ function ka(e) {
170
+ var n = e.getBBox();
171
+ return zn(0, 0, n.width, n.height);
172
+ }
173
+ function Ka(e) {
174
+ var n = e.clientWidth, t = e.clientHeight;
175
+ if (!n && !t)
176
+ return jr;
177
+ var r = ln(e).getComputedStyle(e), a = Oa(r), o = a.left + a.right, s = a.top + a.bottom, l = Tn(r.width), u = Tn(r.height);
178
+ if (r.boxSizing === "border-box" && (Math.round(l + o) !== n && (l -= Cr(r, "left", "right") + o), Math.round(u + s) !== t && (u -= Cr(r, "top", "bottom") + s)), !La(e)) {
179
+ var c = Math.round(l + o) - n, b = Math.round(u + s) - t;
180
+ Math.abs(c) !== 1 && (l -= c), Math.abs(b) !== 1 && (u -= b);
181
+ }
182
+ return zn(a.left, a.top, l, u);
183
+ }
184
+ var Ta = /* @__PURE__ */ function() {
185
+ return typeof SVGGraphicsElement < "u" ? function(e) {
186
+ return e instanceof ln(e).SVGGraphicsElement;
187
+ } : function(e) {
188
+ return e instanceof ln(e).SVGElement && typeof e.getBBox == "function";
189
+ };
190
+ }();
191
+ function La(e) {
192
+ return e === ln(e).document.documentElement;
193
+ }
194
+ function Aa(e) {
195
+ return er ? Ta(e) ? ka(e) : Ka(e) : jr;
196
+ }
197
+ function $a(e) {
198
+ var n = e.x, t = e.y, r = e.width, a = e.height, o = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, s = Object.create(o.prototype);
199
+ return Ur(s, {
200
+ x: n,
201
+ y: t,
202
+ width: r,
203
+ height: a,
204
+ top: t,
205
+ right: n + r,
206
+ bottom: a + t,
207
+ left: n
208
+ }), s;
209
+ }
210
+ function zn(e, n, t, r) {
211
+ return { x: e, y: n, width: t, height: r };
212
+ }
213
+ var za = (
214
+ /** @class */
215
+ function() {
216
+ function e(n) {
217
+ this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = zn(0, 0, 0, 0), this.target = n;
218
+ }
219
+ return e.prototype.isActive = function() {
220
+ var n = Aa(this.target);
221
+ return this.contentRect_ = n, n.width !== this.broadcastWidth || n.height !== this.broadcastHeight;
222
+ }, e.prototype.broadcastRect = function() {
223
+ var n = this.contentRect_;
224
+ return this.broadcastWidth = n.width, this.broadcastHeight = n.height, n;
225
+ }, e;
226
+ }()
227
+ ), Va = (
228
+ /** @class */
229
+ /* @__PURE__ */ function() {
230
+ function e(n, t) {
231
+ var r = $a(t);
232
+ Ur(this, { target: n, contentRect: r });
233
+ }
234
+ return e;
235
+ }()
236
+ ), Wa = (
237
+ /** @class */
238
+ function() {
239
+ function e(n, t, r) {
240
+ if (this.activeObservations_ = [], this.observations_ = new Br(), typeof n != "function")
241
+ throw new TypeError("The callback provided as parameter 1 is not a function.");
242
+ this.callback_ = n, this.controller_ = t, this.callbackCtx_ = r;
243
+ }
244
+ return e.prototype.observe = function(n) {
245
+ if (!arguments.length)
246
+ throw new TypeError("1 argument required, but only 0 present.");
247
+ if (!(typeof Element > "u" || !(Element instanceof Object))) {
248
+ if (!(n instanceof ln(n).Element))
249
+ throw new TypeError('parameter 1 is not of type "Element".');
250
+ var t = this.observations_;
251
+ t.has(n) || (t.set(n, new za(n)), this.controller_.addObserver(this), this.controller_.refresh());
252
+ }
253
+ }, e.prototype.unobserve = function(n) {
254
+ if (!arguments.length)
255
+ throw new TypeError("1 argument required, but only 0 present.");
256
+ if (!(typeof Element > "u" || !(Element instanceof Object))) {
257
+ if (!(n instanceof ln(n).Element))
258
+ throw new TypeError('parameter 1 is not of type "Element".');
259
+ var t = this.observations_;
260
+ t.has(n) && (t.delete(n), t.size || this.controller_.removeObserver(this));
261
+ }
262
+ }, e.prototype.disconnect = function() {
263
+ this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
264
+ }, e.prototype.gatherActive = function() {
265
+ var n = this;
266
+ this.clearActive(), this.observations_.forEach(function(t) {
267
+ t.isActive() && n.activeObservations_.push(t);
268
+ });
269
+ }, e.prototype.broadcastActive = function() {
270
+ if (this.hasActive()) {
271
+ var n = this.callbackCtx_, t = this.activeObservations_.map(function(r) {
272
+ return new Va(r.target, r.broadcastRect());
273
+ });
274
+ this.callback_.call(n, t, n), this.clearActive();
275
+ }
276
+ }, e.prototype.clearActive = function() {
277
+ this.activeObservations_.splice(0);
278
+ }, e.prototype.hasActive = function() {
279
+ return this.activeObservations_.length > 0;
280
+ }, e;
281
+ }()
282
+ ), Gr = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Br(), qr = (
283
+ /** @class */
284
+ /* @__PURE__ */ function() {
285
+ function e(n) {
286
+ if (!(this instanceof e))
287
+ throw new TypeError("Cannot call a class as a function.");
288
+ if (!arguments.length)
289
+ throw new TypeError("1 argument required, but only 0 present.");
290
+ var t = Da.getInstance(), r = new Wa(n, t, this);
291
+ Gr.set(this, r);
292
+ }
293
+ return e;
294
+ }()
295
+ );
296
+ [
297
+ "observe",
298
+ "unobserve",
299
+ "disconnect"
300
+ ].forEach(function(e) {
301
+ qr.prototype[e] = function() {
302
+ var n;
303
+ return (n = Gr.get(this))[e].apply(n, arguments);
304
+ };
305
+ });
306
+ var Fa = function() {
307
+ return typeof Kn.ResizeObserver < "u" ? Kn.ResizeObserver : qr;
308
+ }(), wt = /* @__PURE__ */ new Map();
309
+ function Jr(e) {
310
+ e.forEach(function(n) {
311
+ var t, r = n.target;
312
+ (t = wt.get(r)) === null || t === void 0 || t.forEach(function(a) {
313
+ return a(r);
314
+ });
315
+ });
316
+ }
317
+ var Zr = new Fa(Jr);
318
+ process.env.NODE_ENV;
319
+ process.env.NODE_ENV;
320
+ function Ha(e, n) {
321
+ wt.has(e) || (wt.set(e, /* @__PURE__ */ new Set()), Zr.observe(e)), wt.get(e).add(n);
322
+ }
323
+ function Ba(e, n) {
324
+ wt.has(e) && (wt.get(e).delete(n), wt.get(e).size || (Zr.unobserve(e), wt.delete(e)));
325
+ }
326
+ var Ua = /* @__PURE__ */ function(e) {
327
+ Kr(t, e);
328
+ var n = Lr(t);
329
+ function t() {
330
+ return Tr(this, t), n.apply(this, arguments);
331
+ }
332
+ return Ar(t, [{
333
+ key: "render",
334
+ value: function() {
335
+ return this.props.children;
336
+ }
337
+ }]), t;
338
+ }(i.Component);
339
+ function ja(e, n) {
340
+ var t = e.children, r = e.disabled, a = i.useRef(null), o = i.useRef(null), s = i.useContext(Xn), l = typeof t == "function", u = l ? t(a) : t, c = i.useRef({
341
+ width: -1,
342
+ height: -1,
343
+ offsetWidth: -1,
344
+ offsetHeight: -1
345
+ }), b = !l && /* @__PURE__ */ i.isValidElement(u) && $n(u), f = b ? u.ref : null, d = lr(f, a), m = function() {
346
+ var M;
347
+ return Gn(a.current) || // Support `nativeElement` format
348
+ (a.current && $r(a.current) === "object" ? Gn((M = a.current) === null || M === void 0 ? void 0 : M.nativeElement) : null) || Gn(o.current);
349
+ };
350
+ i.useImperativeHandle(n, function() {
351
+ return m();
352
+ });
353
+ var g = i.useRef(e);
354
+ g.current = e;
355
+ var E = i.useCallback(function(h) {
356
+ var M = g.current, S = M.onResize, y = M.data, w = h.getBoundingClientRect(), C = w.width, v = w.height, N = h.offsetWidth, k = h.offsetHeight, D = Math.floor(C), H = Math.floor(v);
357
+ if (c.current.width !== D || c.current.height !== H || c.current.offsetWidth !== N || c.current.offsetHeight !== k) {
358
+ var $ = {
359
+ width: D,
360
+ height: H,
361
+ offsetWidth: N,
362
+ offsetHeight: k
363
+ };
364
+ c.current = $;
365
+ var z = N === Math.round(C) ? C : N, L = k === Math.round(v) ? v : k, j = T(T({}, $), {}, {
366
+ offsetWidth: z,
367
+ offsetHeight: L
368
+ });
369
+ s == null || s(j, h, y), S && Promise.resolve().then(function() {
370
+ S(j, h);
371
+ });
372
+ }
373
+ }, []);
374
+ return i.useEffect(function() {
375
+ var h = m();
376
+ return h && !r && Ha(h, E), function() {
377
+ return Ba(h, E);
378
+ };
379
+ }, [a.current, r]), /* @__PURE__ */ i.createElement(Ua, {
380
+ ref: o
381
+ }, b ? /* @__PURE__ */ i.cloneElement(u, {
382
+ ref: d
383
+ }) : u);
384
+ }
385
+ var Qr = /* @__PURE__ */ i.forwardRef(ja);
386
+ process.env.NODE_ENV !== "production" && (Qr.displayName = "SingleObserver");
387
+ var Ga = "rc-observer-key";
388
+ function qa(e, n) {
389
+ var t = e.children, r = typeof t == "function" ? [t] : zr(t);
390
+ return process.env.NODE_ENV !== "production" && (r.length > 1 ? Jn(!1, "Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.") : r.length === 0 && Jn(!1, "`children` of ResizeObserver is empty. Nothing is in observe.")), r.map(function(a, o) {
391
+ var s = (a == null ? void 0 : a.key) || "".concat(Ga, "-").concat(o);
392
+ return /* @__PURE__ */ i.createElement(Qr, ne({}, e, {
393
+ key: s,
394
+ ref: o === 0 ? n : void 0
395
+ }), a);
396
+ });
397
+ }
398
+ var cn = /* @__PURE__ */ i.forwardRef(qa);
399
+ process.env.NODE_ENV !== "production" && (cn.displayName = "ResizeObserver");
400
+ cn.Collection = Ea;
401
+ const Ja = new Lt("antSlideUpIn", {
402
+ "0%": {
403
+ transform: "scaleY(0.8)",
404
+ transformOrigin: "0% 0%",
405
+ opacity: 0
406
+ },
407
+ "100%": {
408
+ transform: "scaleY(1)",
409
+ transformOrigin: "0% 0%",
410
+ opacity: 1
411
+ }
412
+ }), Za = new Lt("antSlideUpOut", {
413
+ "0%": {
414
+ transform: "scaleY(1)",
415
+ transformOrigin: "0% 0%",
416
+ opacity: 1
417
+ },
418
+ "100%": {
419
+ transform: "scaleY(0.8)",
420
+ transformOrigin: "0% 0%",
421
+ opacity: 0
422
+ }
423
+ }), Qa = new Lt("antSlideDownIn", {
424
+ "0%": {
425
+ transform: "scaleY(0.8)",
426
+ transformOrigin: "100% 100%",
427
+ opacity: 0
428
+ },
429
+ "100%": {
430
+ transform: "scaleY(1)",
431
+ transformOrigin: "100% 100%",
432
+ opacity: 1
433
+ }
434
+ }), Ya = new Lt("antSlideDownOut", {
435
+ "0%": {
436
+ transform: "scaleY(1)",
437
+ transformOrigin: "100% 100%",
438
+ opacity: 1
439
+ },
440
+ "100%": {
441
+ transform: "scaleY(0.8)",
442
+ transformOrigin: "100% 100%",
443
+ opacity: 0
444
+ }
445
+ }), Xa = new Lt("antSlideLeftIn", {
446
+ "0%": {
447
+ transform: "scaleX(0.8)",
448
+ transformOrigin: "0% 0%",
449
+ opacity: 0
450
+ },
451
+ "100%": {
452
+ transform: "scaleX(1)",
453
+ transformOrigin: "0% 0%",
454
+ opacity: 1
455
+ }
456
+ }), ei = new Lt("antSlideLeftOut", {
457
+ "0%": {
458
+ transform: "scaleX(1)",
459
+ transformOrigin: "0% 0%",
460
+ opacity: 1
461
+ },
462
+ "100%": {
463
+ transform: "scaleX(0.8)",
464
+ transformOrigin: "0% 0%",
465
+ opacity: 0
466
+ }
467
+ }), ti = new Lt("antSlideRightIn", {
468
+ "0%": {
469
+ transform: "scaleX(0.8)",
470
+ transformOrigin: "100% 0%",
471
+ opacity: 0
472
+ },
473
+ "100%": {
474
+ transform: "scaleX(1)",
475
+ transformOrigin: "100% 0%",
476
+ opacity: 1
477
+ }
478
+ }), ni = new Lt("antSlideRightOut", {
479
+ "0%": {
480
+ transform: "scaleX(1)",
481
+ transformOrigin: "100% 0%",
482
+ opacity: 1
483
+ },
484
+ "100%": {
485
+ transform: "scaleX(0.8)",
486
+ transformOrigin: "100% 0%",
487
+ opacity: 0
488
+ }
489
+ }), ri = {
490
+ "slide-up": {
491
+ inKeyframes: Ja,
492
+ outKeyframes: Za
493
+ },
494
+ "slide-down": {
495
+ inKeyframes: Qa,
496
+ outKeyframes: Ya
497
+ },
498
+ "slide-left": {
499
+ inKeyframes: Xa,
500
+ outKeyframes: ei
501
+ },
502
+ "slide-right": {
503
+ inKeyframes: ti,
504
+ outKeyframes: ni
505
+ }
506
+ }, wo = (e, n) => {
507
+ const {
508
+ antCls: t
509
+ } = e, r = `${t}-${n}`, {
510
+ inKeyframes: a,
511
+ outKeyframes: o
512
+ } = ri[n];
513
+ return [ya(r, a, o, e.motionDurationMid), {
514
+ [`
515
+ ${r}-enter,
516
+ ${r}-appear
517
+ `]: {
518
+ transform: "scale(0)",
519
+ transformOrigin: "0% 0%",
520
+ opacity: 0,
521
+ animationTimingFunction: e.motionEaseOutQuint,
522
+ "&-prepare": {
523
+ transform: "scale(1)"
524
+ }
525
+ },
526
+ [`${r}-leave`]: {
527
+ animationTimingFunction: e.motionEaseInQuint
528
+ }
529
+ }];
530
+ }, ai = function() {
531
+ if (typeof navigator > "u" || typeof window > "u")
532
+ return !1;
533
+ var e = navigator.userAgent || navigator.vendor || window.opera;
534
+ return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e == null ? void 0 : e.substr(0, 4));
535
+ };
536
+ var ii = ["prefixCls", "invalidate", "item", "renderItem", "responsive", "responsiveDisabled", "registerSize", "itemKey", "className", "style", "children", "display", "order", "component"], rn = void 0;
537
+ function oi(e, n) {
538
+ var t = e.prefixCls, r = e.invalidate, a = e.item, o = e.renderItem, s = e.responsive, l = e.responsiveDisabled, u = e.registerSize, c = e.itemKey, b = e.className, f = e.style, d = e.children, m = e.display, g = e.order, E = e.component, h = E === void 0 ? "div" : E, M = ke(e, ii), S = s && !m;
539
+ function y(k) {
540
+ u(c, k);
541
+ }
542
+ i.useEffect(function() {
543
+ return function() {
544
+ y(null);
545
+ };
546
+ }, []);
547
+ var w = o && a !== rn ? o(a) : d, C;
548
+ r || (C = {
549
+ opacity: S ? 0 : 1,
550
+ height: S ? 0 : rn,
551
+ overflowY: S ? "hidden" : rn,
552
+ order: s ? g : rn,
553
+ pointerEvents: S ? "none" : rn,
554
+ position: S ? "absolute" : rn
555
+ });
556
+ var v = {};
557
+ S && (v["aria-hidden"] = !0);
558
+ var N = /* @__PURE__ */ i.createElement(h, ne({
559
+ className: Ke(!r && t, b),
560
+ style: T(T({}, C), f)
561
+ }, v, M, {
562
+ ref: n
563
+ }), w);
564
+ return s && (N = /* @__PURE__ */ i.createElement(cn, {
565
+ onResize: function(D) {
566
+ var H = D.offsetWidth;
567
+ y(H);
568
+ },
569
+ disabled: l
570
+ }, N)), N;
571
+ }
572
+ var wn = /* @__PURE__ */ i.forwardRef(oi);
573
+ wn.displayName = "Item";
574
+ function si(e) {
575
+ if (typeof MessageChannel > "u")
576
+ Ht(e);
577
+ else {
578
+ var n = new MessageChannel();
579
+ n.port1.onmessage = function() {
580
+ return e();
581
+ }, n.port2.postMessage(void 0);
582
+ }
583
+ }
584
+ function li() {
585
+ var e = i.useRef(null), n = function(r) {
586
+ e.current || (e.current = [], si(function() {
587
+ Vr.unstable_batchedUpdates(function() {
588
+ e.current.forEach(function(a) {
589
+ a();
590
+ }), e.current = null;
591
+ });
592
+ })), e.current.push(r);
593
+ };
594
+ return n;
595
+ }
596
+ function gn(e, n) {
597
+ var t = i.useState(n), r = O(t, 2), a = r[0], o = r[1], s = Kt(function(l) {
598
+ e(function() {
599
+ o(l);
600
+ });
601
+ });
602
+ return [a, s];
603
+ }
604
+ var Ln = /* @__PURE__ */ qe.createContext(null), ui = ["component"], ci = ["className"], fi = ["className"], vi = function(n, t) {
605
+ var r = i.useContext(Ln);
606
+ if (!r) {
607
+ var a = n.component, o = a === void 0 ? "div" : a, s = ke(n, ui);
608
+ return /* @__PURE__ */ i.createElement(o, ne({}, s, {
609
+ ref: t
610
+ }));
611
+ }
612
+ var l = r.className, u = ke(r, ci), c = n.className, b = ke(n, fi);
613
+ return /* @__PURE__ */ i.createElement(Ln.Provider, {
614
+ value: null
615
+ }, /* @__PURE__ */ i.createElement(wn, ne({
616
+ ref: t,
617
+ className: Ke(l, c)
618
+ }, u, b)));
619
+ }, Yr = /* @__PURE__ */ i.forwardRef(vi);
620
+ Yr.displayName = "RawItem";
621
+ var di = ["prefixCls", "data", "renderItem", "renderRawItem", "itemKey", "itemWidth", "ssr", "style", "className", "maxCount", "renderRest", "renderRawRest", "suffix", "component", "itemComponent", "onVisibleChange"], Xr = "responsive", ea = "invalidate";
622
+ function mi(e) {
623
+ return "+ ".concat(e.length, " ...");
624
+ }
625
+ function hi(e, n) {
626
+ var t = e.prefixCls, r = t === void 0 ? "rc-overflow" : t, a = e.data, o = a === void 0 ? [] : a, s = e.renderItem, l = e.renderRawItem, u = e.itemKey, c = e.itemWidth, b = c === void 0 ? 10 : c, f = e.ssr, d = e.style, m = e.className, g = e.maxCount, E = e.renderRest, h = e.renderRawRest, M = e.suffix, S = e.component, y = S === void 0 ? "div" : S, w = e.itemComponent, C = e.onVisibleChange, v = ke(e, di), N = f === "full", k = li(), D = gn(k, null), H = O(D, 2), $ = H[0], z = H[1], L = $ || 0, j = gn(k, /* @__PURE__ */ new Map()), Z = O(j, 2), G = Z[0], Q = Z[1], V = gn(k, 0), A = O(V, 2), x = A[0], we = A[1], le = gn(k, 0), q = O(le, 2), K = q[0], B = q[1], re = gn(k, 0), ye = O(re, 2), W = ye[0], Y = ye[1], ae = qn(null), be = O(ae, 2), ie = be[0], Pe = be[1], Me = qn(null), oe = O(Me, 2), Be = oe[0], Ue = oe[1], ue = i.useMemo(function() {
627
+ return Be === null && N ? Number.MAX_SAFE_INTEGER : Be || 0;
628
+ }, [Be, $]), Ne = qn(!1), We = O(Ne, 2), de = We[0], ht = We[1], F = "".concat(r, "-item"), Je = Math.max(x, K), pe = g === Xr, J = o.length && pe, Fe = g === ea, Ae = J || typeof g == "number" && o.length > g, $e = Yn(function() {
629
+ var P = o;
630
+ return J ? $ === null && N ? P = o : P = o.slice(0, Math.min(o.length, L / b)) : typeof g == "number" && (P = o.slice(0, g)), P;
631
+ }, [o, b, $, g, J]), Ze = Yn(function() {
632
+ return J ? o.slice(ue + 1) : o.slice($e.length);
633
+ }, [o, $e, J, ue]), _e = Tt(function(P, R) {
634
+ var I;
635
+ return typeof u == "function" ? u(P) : (I = u && (P == null ? void 0 : P[u])) !== null && I !== void 0 ? I : R;
636
+ }, [u]), Ce = Tt(s || function(P) {
637
+ return P;
638
+ }, [s]);
639
+ function ce(P, R, I) {
640
+ Be === P && (R === void 0 || R === ie) || (Ue(P), I || (ht(P < o.length - 1), C == null || C(P)), R !== void 0 && Pe(R));
641
+ }
642
+ function Re(P, R) {
643
+ z(R.clientWidth);
644
+ }
645
+ function Ie(P, R) {
646
+ Q(function(I) {
647
+ var se = new Map(I);
648
+ return R === null ? se.delete(P) : se.set(P, R), se;
649
+ });
650
+ }
651
+ function X(P, R) {
652
+ B(R), we(K);
653
+ }
654
+ function Te(P, R) {
655
+ Y(R);
656
+ }
657
+ function ze(P) {
658
+ return G.get(_e($e[P], P));
659
+ }
660
+ ot(function() {
661
+ if (L && typeof Je == "number" && $e) {
662
+ var P = W, R = $e.length, I = R - 1;
663
+ if (!R) {
664
+ ce(0, null);
665
+ return;
666
+ }
667
+ for (var se = 0; se < R; se += 1) {
668
+ var he = ze(se);
669
+ if (N && (he = he || 0), he === void 0) {
670
+ ce(se - 1, void 0, !0);
671
+ break;
672
+ }
673
+ if (P += he, // Only one means `totalWidth` is the final width
674
+ I === 0 && P <= L || // Last two width will be the final width
675
+ se === I - 1 && P + ze(I) <= L) {
676
+ ce(I, null);
677
+ break;
678
+ } else if (P + Je > L) {
679
+ ce(se - 1, P - he - W + K);
680
+ break;
681
+ }
682
+ }
683
+ M && ze(0) + W > L && Pe(null);
684
+ }
685
+ }, [L, G, K, W, _e, $e]);
686
+ var Et = de && !!Ze.length, ut = {};
687
+ ie !== null && J && (ut = {
688
+ position: "absolute",
689
+ left: ie,
690
+ top: 0
691
+ });
692
+ var at = {
693
+ prefixCls: F,
694
+ responsive: J,
695
+ component: w,
696
+ invalidate: Fe
697
+ }, At = l ? function(P, R) {
698
+ var I = _e(P, R);
699
+ return /* @__PURE__ */ i.createElement(Ln.Provider, {
700
+ key: I,
701
+ value: T(T({}, at), {}, {
702
+ order: R,
703
+ item: P,
704
+ itemKey: I,
705
+ registerSize: Ie,
706
+ display: R <= ue
707
+ })
708
+ }, l(P, R));
709
+ } : function(P, R) {
710
+ var I = _e(P, R);
711
+ return /* @__PURE__ */ i.createElement(wn, ne({}, at, {
712
+ order: R,
713
+ key: I,
714
+ item: P,
715
+ renderItem: Ce,
716
+ itemKey: I,
717
+ registerSize: Ie,
718
+ display: R <= ue
719
+ }));
720
+ }, xe, De = {
721
+ order: Et ? ue : Number.MAX_SAFE_INTEGER,
722
+ className: "".concat(F, "-rest"),
723
+ registerSize: X,
724
+ display: Et
725
+ };
726
+ if (h)
727
+ h && (xe = /* @__PURE__ */ i.createElement(Ln.Provider, {
728
+ value: T(T({}, at), De)
729
+ }, h(Ze)));
730
+ else {
731
+ var Ye = E || mi;
732
+ xe = /* @__PURE__ */ i.createElement(wn, ne({}, at, De), typeof Ye == "function" ? Ye(Ze) : Ye);
733
+ }
734
+ var fe = /* @__PURE__ */ i.createElement(y, ne({
735
+ className: Ke(!Fe && r, m),
736
+ style: d,
737
+ ref: n
738
+ }, v), $e.map(At), Ae ? xe : null, M && /* @__PURE__ */ i.createElement(wn, ne({}, at, {
739
+ responsive: pe,
740
+ responsiveDisabled: !J,
741
+ order: ue,
742
+ className: "".concat(F, "-suffix"),
743
+ registerSize: Te,
744
+ display: !0,
745
+ style: ut
746
+ }), M));
747
+ return pe && (fe = /* @__PURE__ */ i.createElement(cn, {
748
+ onResize: Re,
749
+ disabled: !J
750
+ }, fe)), fe;
751
+ }
752
+ var Mt = /* @__PURE__ */ i.forwardRef(hi);
753
+ Mt.displayName = "Overflow";
754
+ Mt.Item = Yr;
755
+ Mt.RESPONSIVE = Xr;
756
+ Mt.INVALIDATE = ea;
757
+ function gi(e) {
758
+ var n = e.prefixCls, t = e.align, r = e.arrow, a = e.arrowPos, o = r || {}, s = o.className, l = o.content, u = a.x, c = u === void 0 ? 0 : u, b = a.y, f = b === void 0 ? 0 : b, d = i.useRef();
759
+ if (!t || !t.points)
760
+ return null;
761
+ var m = {
762
+ position: "absolute"
763
+ };
764
+ if (t.autoArrow !== !1) {
765
+ var g = t.points[0], E = t.points[1], h = g[0], M = g[1], S = E[0], y = E[1];
766
+ h === S || !["t", "b"].includes(h) ? m.top = f : h === "t" ? m.top = 0 : m.bottom = 0, M === y || !["l", "r"].includes(M) ? m.left = c : M === "l" ? m.left = 0 : m.right = 0;
767
+ }
768
+ return /* @__PURE__ */ i.createElement("div", {
769
+ ref: d,
770
+ className: Ke("".concat(n, "-arrow"), s),
771
+ style: m
772
+ }, l);
773
+ }
774
+ function yi(e) {
775
+ var n = e.prefixCls, t = e.open, r = e.zIndex, a = e.mask, o = e.motion;
776
+ return a ? /* @__PURE__ */ i.createElement(ur, ne({}, o, {
777
+ motionAppear: !0,
778
+ visible: t,
779
+ removeOnLeave: !0
780
+ }), function(s) {
781
+ var l = s.className;
782
+ return /* @__PURE__ */ i.createElement("div", {
783
+ style: {
784
+ zIndex: r
785
+ },
786
+ className: Ke("".concat(n, "-mask"), l)
787
+ });
788
+ }) : null;
789
+ }
790
+ var ta = /* @__PURE__ */ i.memo(function(e) {
791
+ var n = e.children;
792
+ return n;
793
+ }, function(e, n) {
794
+ return n.cache;
795
+ });
796
+ process.env.NODE_ENV !== "production" && (ta.displayName = "PopupContent");
797
+ var na = /* @__PURE__ */ i.forwardRef(function(e, n) {
798
+ var t = e.popup, r = e.className, a = e.prefixCls, o = e.style, s = e.target, l = e.onVisibleChanged, u = e.open, c = e.keepDom, b = e.fresh, f = e.onClick, d = e.mask, m = e.arrow, g = e.arrowPos, E = e.align, h = e.motion, M = e.maskMotion, S = e.forceRender, y = e.getPopupContainer, w = e.autoDestroy, C = e.portal, v = e.zIndex, N = e.onMouseEnter, k = e.onMouseLeave, D = e.onPointerEnter, H = e.onPointerDownCapture, $ = e.ready, z = e.offsetX, L = e.offsetY, j = e.offsetR, Z = e.offsetB, G = e.onAlign, Q = e.onPrepare, V = e.stretch, A = e.targetWidth, x = e.targetHeight, we = typeof t == "function" ? t() : t, le = u || c, q = (y == null ? void 0 : y.length) > 0, K = i.useState(!y || !q), B = O(K, 2), re = B[0], ye = B[1];
799
+ if (ot(function() {
800
+ !re && q && s && ye(!0);
801
+ }, [re, q, s]), !re)
802
+ return null;
803
+ var W = "auto", Y = {
804
+ left: "-1000vw",
805
+ top: "-1000vh",
806
+ right: W,
807
+ bottom: W
808
+ };
809
+ if ($ || !u) {
810
+ var ae, be = E.points, ie = E.dynamicInset || ((ae = E._experimental) === null || ae === void 0 ? void 0 : ae.dynamicInset), Pe = ie && be[0][1] === "r", Me = ie && be[0][0] === "b";
811
+ Pe ? (Y.right = j, Y.left = W) : (Y.left = z, Y.right = W), Me ? (Y.bottom = Z, Y.top = W) : (Y.top = L, Y.bottom = W);
812
+ }
813
+ var oe = {};
814
+ return V && (V.includes("height") && x ? oe.height = x : V.includes("minHeight") && x && (oe.minHeight = x), V.includes("width") && A ? oe.width = A : V.includes("minWidth") && A && (oe.minWidth = A)), u || (oe.pointerEvents = "none"), /* @__PURE__ */ i.createElement(C, {
815
+ open: S || le,
816
+ getContainer: y && function() {
817
+ return y(s);
818
+ },
819
+ autoDestroy: w
820
+ }, /* @__PURE__ */ i.createElement(yi, {
821
+ prefixCls: a,
822
+ open: u,
823
+ zIndex: v,
824
+ mask: d,
825
+ motion: M
826
+ }), /* @__PURE__ */ i.createElement(cn, {
827
+ onResize: G,
828
+ disabled: !u
829
+ }, function(Be) {
830
+ return /* @__PURE__ */ i.createElement(ur, ne({
831
+ motionAppear: !0,
832
+ motionEnter: !0,
833
+ motionLeave: !0,
834
+ removeOnLeave: !1,
835
+ forceRender: S,
836
+ leavedClassName: "".concat(a, "-hidden")
837
+ }, h, {
838
+ onAppearPrepare: Q,
839
+ onEnterPrepare: Q,
840
+ visible: u,
841
+ onVisibleChanged: function(ue) {
842
+ var Ne;
843
+ h == null || (Ne = h.onVisibleChanged) === null || Ne === void 0 || Ne.call(h, ue), l(ue);
844
+ }
845
+ }), function(Ue, ue) {
846
+ var Ne = Ue.className, We = Ue.style, de = Ke(a, Ne, r);
847
+ return /* @__PURE__ */ i.createElement("div", {
848
+ ref: cr(Be, n, ue),
849
+ className: de,
850
+ style: T(T(T(T({
851
+ "--arrow-x": "".concat(g.x || 0, "px"),
852
+ "--arrow-y": "".concat(g.y || 0, "px")
853
+ }, Y), oe), We), {}, {
854
+ boxSizing: "border-box",
855
+ zIndex: v
856
+ }, o),
857
+ onMouseEnter: N,
858
+ onMouseLeave: k,
859
+ onPointerEnter: D,
860
+ onClick: f,
861
+ onPointerDownCapture: H
862
+ }, m && /* @__PURE__ */ i.createElement(gi, {
863
+ prefixCls: a,
864
+ arrow: m,
865
+ arrowPos: g,
866
+ align: E
867
+ }), /* @__PURE__ */ i.createElement(ta, {
868
+ cache: !u && !b
869
+ }, we));
870
+ });
871
+ }));
872
+ });
873
+ process.env.NODE_ENV !== "production" && (na.displayName = "Popup");
874
+ var ra = /* @__PURE__ */ i.forwardRef(function(e, n) {
875
+ var t = e.children, r = e.getTriggerDOMNode, a = $n(t), o = i.useCallback(function(l) {
876
+ ba(n, r ? r(l) : l);
877
+ }, [r]), s = lr(o, t.ref);
878
+ return a ? /* @__PURE__ */ i.cloneElement(t, {
879
+ ref: s
880
+ }) : t;
881
+ });
882
+ process.env.NODE_ENV !== "production" && (ra.displayName = "TriggerWrapper");
883
+ var wr = /* @__PURE__ */ i.createContext(null);
884
+ function Mr(e) {
885
+ return e ? Array.isArray(e) ? e : [e] : [];
886
+ }
887
+ function bi(e, n, t, r) {
888
+ return i.useMemo(function() {
889
+ var a = Mr(t ?? n), o = Mr(r ?? n), s = new Set(a), l = new Set(o);
890
+ return e && (s.has("hover") && (s.delete("hover"), s.add("click")), l.has("hover") && (l.delete("hover"), l.add("click"))), [s, l];
891
+ }, [e, n, t, r]);
892
+ }
893
+ function pi() {
894
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], t = arguments.length > 2 ? arguments[2] : void 0;
895
+ return t ? e[0] === n[0] : e[0] === n[0] && e[1] === n[1];
896
+ }
897
+ function Ci(e, n, t, r) {
898
+ for (var a = t.points, o = Object.keys(e), s = 0; s < o.length; s += 1) {
899
+ var l, u = o[s];
900
+ if (pi((l = e[u]) === null || l === void 0 ? void 0 : l.points, a, r))
901
+ return "".concat(n, "-placement-").concat(u);
902
+ }
903
+ return "";
904
+ }
905
+ function Rr(e, n, t, r) {
906
+ return n || (t ? {
907
+ motionName: "".concat(e, "-").concat(t)
908
+ } : r ? {
909
+ motionName: r
910
+ } : null);
911
+ }
912
+ function En(e) {
913
+ return e.ownerDocument.defaultView;
914
+ }
915
+ function tr(e) {
916
+ for (var n = [], t = e == null ? void 0 : e.parentElement, r = ["hidden", "scroll", "clip", "auto"]; t; ) {
917
+ var a = En(t).getComputedStyle(t), o = a.overflowX, s = a.overflowY, l = a.overflow;
918
+ [o, s, l].some(function(u) {
919
+ return r.includes(u);
920
+ }) && n.push(t), t = t.parentElement;
921
+ }
922
+ return n;
923
+ }
924
+ function Mn(e) {
925
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
926
+ return Number.isNaN(e) ? n : e;
927
+ }
928
+ function yn(e) {
929
+ return Mn(parseFloat(e), 0);
930
+ }
931
+ function Er(e, n) {
932
+ var t = T({}, e);
933
+ return (n || []).forEach(function(r) {
934
+ if (!(r instanceof HTMLBodyElement || r instanceof HTMLHtmlElement)) {
935
+ var a = En(r).getComputedStyle(r), o = a.overflow, s = a.overflowClipMargin, l = a.borderTopWidth, u = a.borderBottomWidth, c = a.borderLeftWidth, b = a.borderRightWidth, f = r.getBoundingClientRect(), d = r.offsetHeight, m = r.clientHeight, g = r.offsetWidth, E = r.clientWidth, h = yn(l), M = yn(u), S = yn(c), y = yn(b), w = Mn(Math.round(f.width / g * 1e3) / 1e3), C = Mn(Math.round(f.height / d * 1e3) / 1e3), v = (g - E - S - y) * w, N = (d - m - h - M) * C, k = h * C, D = M * C, H = S * w, $ = y * w, z = 0, L = 0;
936
+ if (o === "clip") {
937
+ var j = yn(s);
938
+ z = j * w, L = j * C;
939
+ }
940
+ var Z = f.x + H - z, G = f.y + k - L, Q = Z + f.width + 2 * z - H - $ - v, V = G + f.height + 2 * L - k - D - N;
941
+ t.left = Math.max(t.left, Z), t.top = Math.max(t.top, G), t.right = Math.min(t.right, Q), t.bottom = Math.min(t.bottom, V);
942
+ }
943
+ }), t;
944
+ }
945
+ function Sr(e) {
946
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = "".concat(n), r = t.match(/^(.*)\%$/);
947
+ return r ? e * (parseFloat(r[1]) / 100) : parseFloat(t);
948
+ }
949
+ function Pr(e, n) {
950
+ var t = n || [], r = O(t, 2), a = r[0], o = r[1];
951
+ return [Sr(e.width, a), Sr(e.height, o)];
952
+ }
953
+ function Nr() {
954
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
955
+ return [e[0], e[1]];
956
+ }
957
+ function an(e, n) {
958
+ var t = n[0], r = n[1], a, o;
959
+ return t === "t" ? o = e.y : t === "b" ? o = e.y + e.height : o = e.y + e.height / 2, r === "l" ? a = e.x : r === "r" ? a = e.x + e.width : a = e.x + e.width / 2, {
960
+ x: a,
961
+ y: o
962
+ };
963
+ }
964
+ function kt(e, n) {
965
+ var t = {
966
+ t: "b",
967
+ b: "t",
968
+ l: "r",
969
+ r: "l"
970
+ };
971
+ return e.map(function(r, a) {
972
+ return a === n ? t[r] || "c" : r;
973
+ }).join("");
974
+ }
975
+ function wi(e, n, t, r, a, o, s) {
976
+ var l = i.useState({
977
+ ready: !1,
978
+ offsetX: 0,
979
+ offsetY: 0,
980
+ offsetR: 0,
981
+ offsetB: 0,
982
+ arrowX: 0,
983
+ arrowY: 0,
984
+ scaleX: 1,
985
+ scaleY: 1,
986
+ align: a[r] || {}
987
+ }), u = O(l, 2), c = u[0], b = u[1], f = i.useRef(0), d = i.useMemo(function() {
988
+ return n ? tr(n) : [];
989
+ }, [n]), m = i.useRef({}), g = function() {
990
+ m.current = {};
991
+ };
992
+ e || g();
993
+ var E = Kt(function() {
994
+ if (n && t && e) {
995
+ let rt = function(nn, Dt) {
996
+ var Ot = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Je, hn = K.x + nn, Nn = K.y + Dt, Hn = hn + Pe, Bn = Nn + ie, Un = Math.max(hn, Ot.left), p = Math.max(Nn, Ot.top), _ = Math.min(Hn, Ot.right), ve = Math.min(Bn, Ot.bottom);
997
+ return Math.max(0, (_ - Un) * (ve - p));
998
+ }, Pn = function() {
999
+ He = K.y + I, vt = He + ie, Xe = K.x + R, Pt = Xe + Pe;
1000
+ };
1001
+ var S, y, w, C, v = n, N = v.ownerDocument, k = En(v), D = k.getComputedStyle(v), H = D.width, $ = D.height, z = D.position, L = v.style.left, j = v.style.top, Z = v.style.right, G = v.style.bottom, Q = v.style.overflow, V = T(T({}, a[r]), o), A = N.createElement("div");
1002
+ (S = v.parentElement) === null || S === void 0 || S.appendChild(A), A.style.left = "".concat(v.offsetLeft, "px"), A.style.top = "".concat(v.offsetTop, "px"), A.style.position = z, A.style.height = "".concat(v.offsetHeight, "px"), A.style.width = "".concat(v.offsetWidth, "px"), v.style.left = "0", v.style.top = "0", v.style.right = "auto", v.style.bottom = "auto", v.style.overflow = "hidden";
1003
+ var x;
1004
+ if (Array.isArray(t))
1005
+ x = {
1006
+ x: t[0],
1007
+ y: t[1],
1008
+ width: 0,
1009
+ height: 0
1010
+ };
1011
+ else {
1012
+ var we, le, q = t.getBoundingClientRect();
1013
+ q.x = (we = q.x) !== null && we !== void 0 ? we : q.left, q.y = (le = q.y) !== null && le !== void 0 ? le : q.top, x = {
1014
+ x: q.x,
1015
+ y: q.y,
1016
+ width: q.width,
1017
+ height: q.height
1018
+ };
1019
+ }
1020
+ var K = v.getBoundingClientRect();
1021
+ K.x = (y = K.x) !== null && y !== void 0 ? y : K.left, K.y = (w = K.y) !== null && w !== void 0 ? w : K.top;
1022
+ var B = N.documentElement, re = B.clientWidth, ye = B.clientHeight, W = B.scrollWidth, Y = B.scrollHeight, ae = B.scrollTop, be = B.scrollLeft, ie = K.height, Pe = K.width, Me = x.height, oe = x.width, Be = {
1023
+ left: 0,
1024
+ top: 0,
1025
+ right: re,
1026
+ bottom: ye
1027
+ }, Ue = {
1028
+ left: -be,
1029
+ top: -ae,
1030
+ right: W - be,
1031
+ bottom: Y - ae
1032
+ }, ue = V.htmlRegion, Ne = "visible", We = "visibleFirst";
1033
+ ue !== "scroll" && ue !== We && (ue = Ne);
1034
+ var de = ue === We, ht = Er(Ue, d), F = Er(Be, d), Je = ue === Ne ? F : ht, pe = de ? F : Je;
1035
+ v.style.left = "auto", v.style.top = "auto", v.style.right = "0", v.style.bottom = "0";
1036
+ var J = v.getBoundingClientRect();
1037
+ v.style.left = L, v.style.top = j, v.style.right = Z, v.style.bottom = G, v.style.overflow = Q, (C = v.parentElement) === null || C === void 0 || C.removeChild(A);
1038
+ var Fe = Mn(Math.round(Pe / parseFloat(H) * 1e3) / 1e3), Ae = Mn(Math.round(ie / parseFloat($) * 1e3) / 1e3);
1039
+ if (Fe === 0 || Ae === 0 || Zn(t) && !Wr(t))
1040
+ return;
1041
+ var $e = V.offset, Ze = V.targetOffset, _e = Pr(K, $e), Ce = O(_e, 2), ce = Ce[0], Re = Ce[1], Ie = Pr(x, Ze), X = O(Ie, 2), Te = X[0], ze = X[1];
1042
+ x.x -= Te, x.y -= ze;
1043
+ var Et = V.points || [], ut = O(Et, 2), at = ut[0], At = ut[1], xe = Nr(At), De = Nr(at), Ye = an(x, xe), fe = an(K, De), P = T({}, V), R = Ye.x - fe.x + ce, I = Ye.y - fe.y + Re, se = rt(R, I), he = rt(R, I, F), $t = an(x, ["t", "l"]), je = an(K, ["t", "l"]), zt = an(x, ["b", "r"]), Vt = an(K, ["b", "r"]), ct = V.overflow || {}, Bt = ct.adjustX, Ut = ct.adjustY, ft = ct.shiftX, St = ct.shiftY, gt = function(Dt) {
1044
+ return typeof Dt == "boolean" ? Dt : Dt >= 0;
1045
+ }, He, vt, Xe, Pt;
1046
+ Pn();
1047
+ var dt = gt(Ut), jt = De[0] === xe[0];
1048
+ if (dt && De[0] === "t" && (vt > pe.bottom || m.current.bt)) {
1049
+ var Ee = I;
1050
+ jt ? Ee -= ie - Me : Ee = $t.y - Vt.y - Re;
1051
+ var Gt = rt(R, Ee), fn = rt(R, Ee, F);
1052
+ // Of course use larger one
1053
+ Gt > se || Gt === se && (!de || // Choose recommend one
1054
+ fn >= he) ? (m.current.bt = !0, I = Ee, Re = -Re, P.points = [kt(De, 0), kt(xe, 0)]) : m.current.bt = !1;
1055
+ }
1056
+ if (dt && De[0] === "b" && (He < pe.top || m.current.tb)) {
1057
+ var yt = I;
1058
+ jt ? yt += ie - Me : yt = zt.y - je.y - Re;
1059
+ var qt = rt(R, yt), Jt = rt(R, yt, F);
1060
+ // Of course use larger one
1061
+ qt > se || qt === se && (!de || // Choose recommend one
1062
+ Jt >= he) ? (m.current.tb = !0, I = yt, Re = -Re, P.points = [kt(De, 0), kt(xe, 0)]) : m.current.tb = !1;
1063
+ }
1064
+ var mt = gt(Bt), Nt = De[1] === xe[1];
1065
+ if (mt && De[1] === "l" && (Pt > pe.right || m.current.rl)) {
1066
+ var bt = R;
1067
+ Nt ? bt -= Pe - oe : bt = $t.x - Vt.x - ce;
1068
+ var Zt = rt(bt, I), _t = rt(bt, I, F);
1069
+ // Of course use larger one
1070
+ Zt > se || Zt === se && (!de || // Choose recommend one
1071
+ _t >= he) ? (m.current.rl = !0, R = bt, ce = -ce, P.points = [kt(De, 1), kt(xe, 1)]) : m.current.rl = !1;
1072
+ }
1073
+ if (mt && De[1] === "r" && (Xe < pe.left || m.current.lr)) {
1074
+ var et = R;
1075
+ Nt ? et += Pe - oe : et = zt.x - je.x - ce;
1076
+ var pt = rt(et, I), Qt = rt(et, I, F);
1077
+ // Of course use larger one
1078
+ pt > se || pt === se && (!de || // Choose recommend one
1079
+ Qt >= he) ? (m.current.lr = !0, R = et, ce = -ce, P.points = [kt(De, 1), kt(xe, 1)]) : m.current.lr = !1;
1080
+ }
1081
+ Pn();
1082
+ var tt = ft === !0 ? 0 : ft;
1083
+ typeof tt == "number" && (Xe < F.left && (R -= Xe - F.left - ce, x.x + oe < F.left + tt && (R += x.x - F.left + oe - tt)), Pt > F.right && (R -= Pt - F.right - ce, x.x > F.right - tt && (R += x.x - F.right + tt)));
1084
+ var Qe = St === !0 ? 0 : St;
1085
+ typeof Qe == "number" && (He < F.top && (I -= He - F.top - Re, x.y + Me < F.top + Qe && (I += x.y - F.top + Me - Qe)), vt > F.bottom && (I -= vt - F.bottom - Re, x.y > F.bottom - Qe && (I += x.y - F.bottom + Qe)));
1086
+ var Ct = K.x + R, It = Ct + Pe, nt = K.y + I, vn = nt + ie, Yt = x.x, dn = Yt + oe, ee = x.y, U = ee + Me, te = Math.max(Ct, Yt), Le = Math.min(It, dn), Oe = (te + Le) / 2, xt = Oe - Ct, Wt = Math.max(nt, ee), Xt = Math.min(vn, U), en = (Wt + Xt) / 2, tn = en - nt;
1087
+ s == null || s(n, P);
1088
+ var it = J.right - K.x - (R + K.width), Ge = J.bottom - K.y - (I + K.height);
1089
+ Fe === 1 && (R = Math.round(R), it = Math.round(it)), Ae === 1 && (I = Math.round(I), Ge = Math.round(Ge));
1090
+ var mn = {
1091
+ ready: !0,
1092
+ offsetX: R / Fe,
1093
+ offsetY: I / Ae,
1094
+ offsetR: it / Fe,
1095
+ offsetB: Ge / Ae,
1096
+ arrowX: xt / Fe,
1097
+ arrowY: tn / Ae,
1098
+ scaleX: Fe,
1099
+ scaleY: Ae,
1100
+ align: P
1101
+ };
1102
+ b(mn);
1103
+ }
1104
+ }), h = function() {
1105
+ f.current += 1;
1106
+ var y = f.current;
1107
+ Promise.resolve().then(function() {
1108
+ f.current === y && E();
1109
+ });
1110
+ }, M = function() {
1111
+ b(function(y) {
1112
+ return T(T({}, y), {}, {
1113
+ ready: !1
1114
+ });
1115
+ });
1116
+ };
1117
+ return ot(M, [r]), ot(function() {
1118
+ e || M();
1119
+ }, [e]), [c.ready, c.offsetX, c.offsetY, c.offsetR, c.offsetB, c.arrowX, c.arrowY, c.scaleX, c.scaleY, c.align, h];
1120
+ }
1121
+ function Mi(e, n, t, r, a) {
1122
+ ot(function() {
1123
+ if (e && n && t) {
1124
+ let f = function() {
1125
+ r(), a();
1126
+ };
1127
+ var o = n, s = t, l = tr(o), u = tr(s), c = En(s), b = new Set([c].concat(Rt(l), Rt(u)));
1128
+ return b.forEach(function(d) {
1129
+ d.addEventListener("scroll", f, {
1130
+ passive: !0
1131
+ });
1132
+ }), c.addEventListener("resize", f, {
1133
+ passive: !0
1134
+ }), r(), function() {
1135
+ b.forEach(function(d) {
1136
+ d.removeEventListener("scroll", f), c.removeEventListener("resize", f);
1137
+ });
1138
+ };
1139
+ }
1140
+ }, [e, n, t]);
1141
+ }
1142
+ function Ri(e, n, t, r, a, o, s, l) {
1143
+ var u = i.useRef(e);
1144
+ u.current = e;
1145
+ var c = i.useRef(!1);
1146
+ i.useEffect(function() {
1147
+ if (n && r && (!a || o)) {
1148
+ var f = function() {
1149
+ c.current = !1;
1150
+ }, d = function(w) {
1151
+ var C;
1152
+ u.current && !s(((C = w.composedPath) === null || C === void 0 || (C = C.call(w)) === null || C === void 0 ? void 0 : C[0]) || w.target) && !c.current && l(!1);
1153
+ }, m = En(r);
1154
+ m.addEventListener("pointerdown", f, !0), m.addEventListener("mousedown", d, !0), m.addEventListener("contextmenu", d, !0);
1155
+ var g = Qn(t);
1156
+ if (g && (g.addEventListener("mousedown", d, !0), g.addEventListener("contextmenu", d, !0)), process.env.NODE_ENV !== "production") {
1157
+ var E, h, M = t == null || (E = t.getRootNode) === null || E === void 0 ? void 0 : E.call(t), S = (h = r.getRootNode) === null || h === void 0 ? void 0 : h.call(r);
1158
+ Jn(M === S, "trigger element and popup element should in same shadow root.");
1159
+ }
1160
+ return function() {
1161
+ m.removeEventListener("pointerdown", f, !0), m.removeEventListener("mousedown", d, !0), m.removeEventListener("contextmenu", d, !0), g && (g.removeEventListener("mousedown", d, !0), g.removeEventListener("contextmenu", d, !0));
1162
+ };
1163
+ }
1164
+ }, [n, t, r, a, o]);
1165
+ function b() {
1166
+ c.current = !0;
1167
+ }
1168
+ return b;
1169
+ }
1170
+ var Ei = ["prefixCls", "children", "action", "showAction", "hideAction", "popupVisible", "defaultPopupVisible", "onPopupVisibleChange", "afterPopupVisibleChange", "mouseEnterDelay", "mouseLeaveDelay", "focusDelay", "blurDelay", "mask", "maskClosable", "getPopupContainer", "forceRender", "autoDestroy", "destroyPopupOnHide", "popup", "popupClassName", "popupStyle", "popupPlacement", "builtinPlacements", "popupAlign", "zIndex", "stretch", "getPopupClassNameFromAlign", "fresh", "alignPoint", "onPopupClick", "onPopupAlign", "arrow", "popupMotion", "maskMotion", "popupTransitionName", "popupAnimation", "maskTransitionName", "maskAnimation", "className", "getTriggerDOMNode"];
1171
+ function Si() {
1172
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Fr, n = /* @__PURE__ */ i.forwardRef(function(t, r) {
1173
+ var a = t.prefixCls, o = a === void 0 ? "rc-trigger-popup" : a, s = t.children, l = t.action, u = l === void 0 ? "hover" : l, c = t.showAction, b = t.hideAction, f = t.popupVisible, d = t.defaultPopupVisible, m = t.onPopupVisibleChange, g = t.afterPopupVisibleChange, E = t.mouseEnterDelay, h = t.mouseLeaveDelay, M = h === void 0 ? 0.1 : h, S = t.focusDelay, y = t.blurDelay, w = t.mask, C = t.maskClosable, v = C === void 0 ? !0 : C, N = t.getPopupContainer, k = t.forceRender, D = t.autoDestroy, H = t.destroyPopupOnHide, $ = t.popup, z = t.popupClassName, L = t.popupStyle, j = t.popupPlacement, Z = t.builtinPlacements, G = Z === void 0 ? {} : Z, Q = t.popupAlign, V = t.zIndex, A = t.stretch, x = t.getPopupClassNameFromAlign, we = t.fresh, le = t.alignPoint, q = t.onPopupClick, K = t.onPopupAlign, B = t.arrow, re = t.popupMotion, ye = t.maskMotion, W = t.popupTransitionName, Y = t.popupAnimation, ae = t.maskTransitionName, be = t.maskAnimation, ie = t.className, Pe = t.getTriggerDOMNode, Me = ke(t, Ei), oe = D || H || !1, Be = i.useState(!1), Ue = O(Be, 2), ue = Ue[0], Ne = Ue[1];
1174
+ ot(function() {
1175
+ Ne(ai());
1176
+ }, []);
1177
+ var We = i.useRef({}), de = i.useContext(wr), ht = i.useMemo(function() {
1178
+ return {
1179
+ registerSubPopup: function(_, ve) {
1180
+ We.current[_] = ve, de == null || de.registerSubPopup(_, ve);
1181
+ }
1182
+ };
1183
+ }, [de]), F = pa(), Je = i.useState(null), pe = O(Je, 2), J = pe[0], Fe = pe[1], Ae = i.useRef(null), $e = Kt(function(p) {
1184
+ Ae.current = p, Zn(p) && J !== p && Fe(p), de == null || de.registerSubPopup(F, p);
1185
+ }), Ze = i.useState(null), _e = O(Ze, 2), Ce = _e[0], ce = _e[1], Re = i.useRef(null), Ie = Kt(function(p) {
1186
+ Zn(p) && Ce !== p && (ce(p), Re.current = p);
1187
+ }), X = i.Children.only(s), Te = (X == null ? void 0 : X.props) || {}, ze = {}, Et = Kt(function(p) {
1188
+ var _, ve, Se = Ce;
1189
+ return (Se == null ? void 0 : Se.contains(p)) || ((_ = Qn(Se)) === null || _ === void 0 ? void 0 : _.host) === p || p === Se || (J == null ? void 0 : J.contains(p)) || ((ve = Qn(J)) === null || ve === void 0 ? void 0 : ve.host) === p || p === J || Object.values(We.current).some(function(ge) {
1190
+ return (ge == null ? void 0 : ge.contains(p)) || p === ge;
1191
+ });
1192
+ }), ut = Rr(o, re, Y, W), at = Rr(o, ye, be, ae), At = i.useState(d || !1), xe = O(At, 2), De = xe[0], Ye = xe[1], fe = f ?? De, P = Kt(function(p) {
1193
+ f === void 0 && Ye(p);
1194
+ });
1195
+ ot(function() {
1196
+ Ye(f || !1);
1197
+ }, [f]);
1198
+ var R = i.useRef(fe);
1199
+ R.current = fe;
1200
+ var I = i.useRef([]);
1201
+ I.current = [];
1202
+ var se = Kt(function(p) {
1203
+ var _;
1204
+ P(p), ((_ = I.current[I.current.length - 1]) !== null && _ !== void 0 ? _ : fe) !== p && (I.current.push(p), m == null || m(p));
1205
+ }), he = i.useRef(), $t = function() {
1206
+ clearTimeout(he.current);
1207
+ }, je = function(_) {
1208
+ var ve = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1209
+ $t(), ve === 0 ? se(_) : he.current = setTimeout(function() {
1210
+ se(_);
1211
+ }, ve * 1e3);
1212
+ };
1213
+ i.useEffect(function() {
1214
+ return $t;
1215
+ }, []);
1216
+ var zt = i.useState(!1), Vt = O(zt, 2), ct = Vt[0], Bt = Vt[1];
1217
+ ot(function(p) {
1218
+ (!p || fe) && Bt(!0);
1219
+ }, [fe]);
1220
+ var Ut = i.useState(null), ft = O(Ut, 2), St = ft[0], gt = ft[1], He = i.useState(null), vt = O(He, 2), Xe = vt[0], Pt = vt[1], dt = function(_) {
1221
+ Pt([_.clientX, _.clientY]);
1222
+ }, jt = wi(fe, J, le && Xe !== null ? Xe : Ce, j, G, Q, K), Ee = O(jt, 11), Gt = Ee[0], fn = Ee[1], yt = Ee[2], qt = Ee[3], Jt = Ee[4], mt = Ee[5], Nt = Ee[6], bt = Ee[7], Zt = Ee[8], _t = Ee[9], et = Ee[10], pt = bi(ue, u, c, b), Qt = O(pt, 2), tt = Qt[0], Qe = Qt[1], Ct = tt.has("click"), It = Qe.has("click") || Qe.has("contextMenu"), nt = Kt(function() {
1223
+ ct || et();
1224
+ }), vn = function() {
1225
+ R.current && le && It && je(!1);
1226
+ };
1227
+ Mi(fe, Ce, J, nt, vn), ot(function() {
1228
+ nt();
1229
+ }, [Xe, j]), ot(function() {
1230
+ fe && !(G != null && G[j]) && nt();
1231
+ }, [JSON.stringify(Q)]);
1232
+ var Yt = i.useMemo(function() {
1233
+ var p = Ci(G, o, _t, le);
1234
+ return Ke(p, x == null ? void 0 : x(_t));
1235
+ }, [_t, x, G, o, le]);
1236
+ i.useImperativeHandle(r, function() {
1237
+ return {
1238
+ nativeElement: Re.current,
1239
+ popupElement: Ae.current,
1240
+ forceAlign: nt
1241
+ };
1242
+ });
1243
+ var dn = i.useState(0), ee = O(dn, 2), U = ee[0], te = ee[1], Le = i.useState(0), Oe = O(Le, 2), xt = Oe[0], Wt = Oe[1], Xt = function() {
1244
+ if (A && Ce) {
1245
+ var _ = Ce.getBoundingClientRect();
1246
+ te(_.width), Wt(_.height);
1247
+ }
1248
+ }, en = function() {
1249
+ Xt(), nt();
1250
+ }, tn = function(_) {
1251
+ Bt(!1), et(), g == null || g(_);
1252
+ }, it = function() {
1253
+ return new Promise(function(_) {
1254
+ Xt(), gt(function() {
1255
+ return _;
1256
+ });
1257
+ });
1258
+ };
1259
+ ot(function() {
1260
+ St && (et(), St(), gt(null));
1261
+ }, [St]);
1262
+ function Ge(p, _, ve, Se) {
1263
+ ze[p] = function(ge) {
1264
+ var _n;
1265
+ Se == null || Se(ge), je(_, ve);
1266
+ for (var jn = arguments.length, pr = new Array(jn > 1 ? jn - 1 : 0), In = 1; In < jn; In++)
1267
+ pr[In - 1] = arguments[In];
1268
+ (_n = Te[p]) === null || _n === void 0 || _n.call.apply(_n, [Te, ge].concat(pr));
1269
+ };
1270
+ }
1271
+ (Ct || It) && (ze.onClick = function(p) {
1272
+ var _;
1273
+ R.current && It ? je(!1) : !R.current && Ct && (dt(p), je(!0));
1274
+ for (var ve = arguments.length, Se = new Array(ve > 1 ? ve - 1 : 0), ge = 1; ge < ve; ge++)
1275
+ Se[ge - 1] = arguments[ge];
1276
+ (_ = Te.onClick) === null || _ === void 0 || _.call.apply(_, [Te, p].concat(Se));
1277
+ });
1278
+ var mn = Ri(fe, It, Ce, J, w, v, Et, je), rt = tt.has("hover"), Pn = Qe.has("hover"), nn, Dt;
1279
+ rt && (Ge("onMouseEnter", !0, E, function(p) {
1280
+ dt(p);
1281
+ }), Ge("onPointerEnter", !0, E, function(p) {
1282
+ dt(p);
1283
+ }), nn = function(_) {
1284
+ (fe || ct) && J !== null && J !== void 0 && J.contains(_.target) && je(!0, E);
1285
+ }, le && (ze.onMouseMove = function(p) {
1286
+ var _;
1287
+ (_ = Te.onMouseMove) === null || _ === void 0 || _.call(Te, p);
1288
+ })), Pn && (Ge("onMouseLeave", !1, M), Ge("onPointerLeave", !1, M), Dt = function() {
1289
+ je(!1, M);
1290
+ }), tt.has("focus") && Ge("onFocus", !0, S), Qe.has("focus") && Ge("onBlur", !1, y), tt.has("contextMenu") && (ze.onContextMenu = function(p) {
1291
+ var _;
1292
+ R.current && Qe.has("contextMenu") ? je(!1) : (dt(p), je(!0)), p.preventDefault();
1293
+ for (var ve = arguments.length, Se = new Array(ve > 1 ? ve - 1 : 0), ge = 1; ge < ve; ge++)
1294
+ Se[ge - 1] = arguments[ge];
1295
+ (_ = Te.onContextMenu) === null || _ === void 0 || _.call.apply(_, [Te, p].concat(Se));
1296
+ }), ie && (ze.className = Ke(Te.className, ie));
1297
+ var Ot = T(T({}, Te), ze), hn = {}, Nn = ["onContextMenu", "onClick", "onMouseDown", "onTouchStart", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur"];
1298
+ Nn.forEach(function(p) {
1299
+ Me[p] && (hn[p] = function() {
1300
+ for (var _, ve = arguments.length, Se = new Array(ve), ge = 0; ge < ve; ge++)
1301
+ Se[ge] = arguments[ge];
1302
+ (_ = Ot[p]) === null || _ === void 0 || _.call.apply(_, [Ot].concat(Se)), Me[p].apply(Me, Se);
1303
+ });
1304
+ });
1305
+ var Hn = /* @__PURE__ */ i.cloneElement(X, T(T({}, Ot), hn)), Bn = {
1306
+ x: mt,
1307
+ y: Nt
1308
+ }, Un = B ? T({}, B !== !0 ? B : {}) : null;
1309
+ return /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(cn, {
1310
+ disabled: !fe,
1311
+ ref: Ie,
1312
+ onResize: en
1313
+ }, /* @__PURE__ */ i.createElement(ra, {
1314
+ getTriggerDOMNode: Pe
1315
+ }, Hn)), /* @__PURE__ */ i.createElement(wr.Provider, {
1316
+ value: ht
1317
+ }, /* @__PURE__ */ i.createElement(na, {
1318
+ portal: e,
1319
+ ref: $e,
1320
+ prefixCls: o,
1321
+ popup: $,
1322
+ className: Ke(z, Yt),
1323
+ style: L,
1324
+ target: Ce,
1325
+ onMouseEnter: nn,
1326
+ onMouseLeave: Dt,
1327
+ onPointerEnter: nn,
1328
+ zIndex: V,
1329
+ open: fe,
1330
+ keepDom: ct,
1331
+ fresh: we,
1332
+ onClick: q,
1333
+ onPointerDownCapture: mn,
1334
+ mask: w,
1335
+ motion: ut,
1336
+ maskMotion: at,
1337
+ onVisibleChanged: tn,
1338
+ onPrepare: it,
1339
+ forceRender: k,
1340
+ autoDestroy: oe,
1341
+ getPopupContainer: N,
1342
+ align: _t,
1343
+ arrow: Un,
1344
+ arrowPos: Bn,
1345
+ ready: Gt,
1346
+ offsetX: fn,
1347
+ offsetY: yt,
1348
+ offsetR: qt,
1349
+ offsetB: Jt,
1350
+ onAlign: nt,
1351
+ stretch: A,
1352
+ targetWidth: U / bt,
1353
+ targetHeight: xt / Zt
1354
+ })));
1355
+ });
1356
+ return process.env.NODE_ENV !== "production" && (n.displayName = "Trigger"), n;
1357
+ }
1358
+ const aa = Si(Fr);
1359
+ var Pi = lt.ESC, Ni = lt.TAB;
1360
+ function _i(e) {
1361
+ var n = e.visible, t = e.triggerRef, r = e.onVisibleChange, a = e.autoFocus, o = e.overlayRef, s = i.useRef(!1), l = function() {
1362
+ if (n) {
1363
+ var f, d;
1364
+ (f = t.current) === null || f === void 0 || (d = f.focus) === null || d === void 0 || d.call(f), r == null || r(!1);
1365
+ }
1366
+ }, u = function() {
1367
+ var f;
1368
+ return (f = o.current) !== null && f !== void 0 && f.focus ? (o.current.focus(), s.current = !0, !0) : !1;
1369
+ }, c = function(f) {
1370
+ switch (f.keyCode) {
1371
+ case Pi:
1372
+ l();
1373
+ break;
1374
+ case Ni: {
1375
+ var d = !1;
1376
+ s.current || (d = u()), d ? f.preventDefault() : l();
1377
+ break;
1378
+ }
1379
+ }
1380
+ };
1381
+ i.useEffect(function() {
1382
+ return n ? (window.addEventListener("keydown", c), a && Ht(u, 3), function() {
1383
+ window.removeEventListener("keydown", c), s.current = !1;
1384
+ }) : function() {
1385
+ s.current = !1;
1386
+ };
1387
+ }, [n]);
1388
+ }
1389
+ var Ii = /* @__PURE__ */ Ma(function(e, n) {
1390
+ var t = e.overlay, r = e.arrow, a = e.prefixCls, o = Yn(function() {
1391
+ var l;
1392
+ return typeof t == "function" ? l = t() : l = t, l;
1393
+ }, [t]), s = cr(n, o == null ? void 0 : o.ref);
1394
+ return /* @__PURE__ */ qe.createElement(qe.Fragment, null, r && /* @__PURE__ */ qe.createElement("div", {
1395
+ className: "".concat(a, "-arrow")
1396
+ }), /* @__PURE__ */ qe.cloneElement(o, {
1397
+ ref: $n(o) ? s : void 0
1398
+ }));
1399
+ }), on = {
1400
+ adjustX: 1,
1401
+ adjustY: 1
1402
+ }, sn = [0, 0], xi = {
1403
+ topLeft: {
1404
+ points: ["bl", "tl"],
1405
+ overflow: on,
1406
+ offset: [0, -4],
1407
+ targetOffset: sn
1408
+ },
1409
+ top: {
1410
+ points: ["bc", "tc"],
1411
+ overflow: on,
1412
+ offset: [0, -4],
1413
+ targetOffset: sn
1414
+ },
1415
+ topRight: {
1416
+ points: ["br", "tr"],
1417
+ overflow: on,
1418
+ offset: [0, -4],
1419
+ targetOffset: sn
1420
+ },
1421
+ bottomLeft: {
1422
+ points: ["tl", "bl"],
1423
+ overflow: on,
1424
+ offset: [0, 4],
1425
+ targetOffset: sn
1426
+ },
1427
+ bottom: {
1428
+ points: ["tc", "bc"],
1429
+ overflow: on,
1430
+ offset: [0, 4],
1431
+ targetOffset: sn
1432
+ },
1433
+ bottomRight: {
1434
+ points: ["tr", "br"],
1435
+ overflow: on,
1436
+ offset: [0, 4],
1437
+ targetOffset: sn
1438
+ }
1439
+ }, Di = ["arrow", "prefixCls", "transitionName", "animation", "align", "placement", "placements", "getPopupContainer", "showAction", "hideAction", "overlayClassName", "overlayStyle", "visible", "trigger", "autoFocus", "overlay", "children", "onVisibleChange"];
1440
+ function Oi(e, n) {
1441
+ var t, r = e.arrow, a = r === void 0 ? !1 : r, o = e.prefixCls, s = o === void 0 ? "rc-dropdown" : o, l = e.transitionName, u = e.animation, c = e.align, b = e.placement, f = b === void 0 ? "bottomLeft" : b, d = e.placements, m = d === void 0 ? xi : d, g = e.getPopupContainer, E = e.showAction, h = e.hideAction, M = e.overlayClassName, S = e.overlayStyle, y = e.visible, w = e.trigger, C = w === void 0 ? ["hover"] : w, v = e.autoFocus, N = e.overlay, k = e.children, D = e.onVisibleChange, H = ke(e, Di), $ = qe.useState(), z = O($, 2), L = z[0], j = z[1], Z = "visible" in e ? y : L, G = qe.useRef(null), Q = qe.useRef(null), V = qe.useRef(null);
1442
+ qe.useImperativeHandle(n, function() {
1443
+ return G.current;
1444
+ });
1445
+ var A = function(W) {
1446
+ j(W), D == null || D(W);
1447
+ };
1448
+ _i({
1449
+ visible: Z,
1450
+ triggerRef: V,
1451
+ onVisibleChange: A,
1452
+ autoFocus: v,
1453
+ overlayRef: Q
1454
+ });
1455
+ var x = function(W) {
1456
+ var Y = e.onOverlayClick;
1457
+ j(!1), Y && Y(W);
1458
+ }, we = function() {
1459
+ return /* @__PURE__ */ qe.createElement(Ii, {
1460
+ ref: Q,
1461
+ overlay: N,
1462
+ prefixCls: s,
1463
+ arrow: a
1464
+ });
1465
+ }, le = function() {
1466
+ return typeof N == "function" ? we : we();
1467
+ }, q = function() {
1468
+ var W = e.minOverlayWidthMatchTrigger, Y = e.alignPoint;
1469
+ return "minOverlayWidthMatchTrigger" in e ? W : !Y;
1470
+ }, K = function() {
1471
+ var W = e.openClassName;
1472
+ return W !== void 0 ? W : "".concat(s, "-open");
1473
+ }, B = /* @__PURE__ */ qe.cloneElement(k, {
1474
+ className: Ke((t = k.props) === null || t === void 0 ? void 0 : t.className, Z && K()),
1475
+ ref: $n(k) ? cr(V, k.ref) : void 0
1476
+ }), re = h;
1477
+ return !re && C.indexOf("contextMenu") !== -1 && (re = ["click"]), /* @__PURE__ */ qe.createElement(aa, ne({
1478
+ builtinPlacements: m
1479
+ }, H, {
1480
+ prefixCls: s,
1481
+ ref: G,
1482
+ popupClassName: Ke(M, me({}, "".concat(s, "-show-arrow"), a)),
1483
+ popupStyle: S,
1484
+ action: C,
1485
+ showAction: E,
1486
+ hideAction: re,
1487
+ popupPlacement: f,
1488
+ popupAlign: c,
1489
+ popupTransitionName: l,
1490
+ popupAnimation: u,
1491
+ popupVisible: Z,
1492
+ stretch: q() ? "minWidth" : "",
1493
+ popup: le(),
1494
+ onPopupVisibleChange: A,
1495
+ onPopupClick: x,
1496
+ getPopupContainer: g
1497
+ }), B);
1498
+ }
1499
+ const Mo = /* @__PURE__ */ qe.forwardRef(Oi);
1500
+ var ia = /* @__PURE__ */ i.createContext(null);
1501
+ function oa(e, n) {
1502
+ return e === void 0 ? null : "".concat(e, "-").concat(n);
1503
+ }
1504
+ function sa(e) {
1505
+ var n = i.useContext(ia);
1506
+ return oa(n, e);
1507
+ }
1508
+ var ki = ["children", "locked"], st = /* @__PURE__ */ i.createContext(null);
1509
+ function Ki(e, n) {
1510
+ var t = T({}, e);
1511
+ return Object.keys(n).forEach(function(r) {
1512
+ var a = n[r];
1513
+ a !== void 0 && (t[r] = a);
1514
+ }), t;
1515
+ }
1516
+ function Rn(e) {
1517
+ var n = e.children, t = e.locked, r = ke(e, ki), a = i.useContext(st), o = Ca(function() {
1518
+ return Ki(a, r);
1519
+ }, [a, r], function(s, l) {
1520
+ return !t && (s[0] !== l[0] || !Hr(s[1], l[1], !0));
1521
+ });
1522
+ return /* @__PURE__ */ i.createElement(st.Provider, {
1523
+ value: o
1524
+ }, n);
1525
+ }
1526
+ var Ti = [], la = /* @__PURE__ */ i.createContext(null);
1527
+ function Vn() {
1528
+ return i.useContext(la);
1529
+ }
1530
+ var ua = /* @__PURE__ */ i.createContext(Ti);
1531
+ function Sn(e) {
1532
+ var n = i.useContext(ua);
1533
+ return i.useMemo(function() {
1534
+ return e !== void 0 ? [].concat(Rt(n), [e]) : n;
1535
+ }, [n, e]);
1536
+ }
1537
+ var ca = /* @__PURE__ */ i.createContext(null), vr = /* @__PURE__ */ i.createContext({});
1538
+ function _r(e) {
1539
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
1540
+ if (Wr(e)) {
1541
+ var t = e.nodeName.toLowerCase(), r = (
1542
+ // Focusable element
1543
+ ["input", "select", "textarea", "button"].includes(t) || // Editable element
1544
+ e.isContentEditable || // Anchor with href element
1545
+ t === "a" && !!e.getAttribute("href")
1546
+ ), a = e.getAttribute("tabindex"), o = Number(a), s = null;
1547
+ return a && !Number.isNaN(o) ? s = o : r && s === null && (s = 0), r && e.disabled && (s = null), s !== null && (s >= 0 || n && s < 0);
1548
+ }
1549
+ return !1;
1550
+ }
1551
+ function Li(e) {
1552
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, t = Rt(e.querySelectorAll("*")).filter(function(r) {
1553
+ return _r(r, n);
1554
+ });
1555
+ return _r(e, n) && t.unshift(e), t;
1556
+ }
1557
+ var nr = lt.LEFT, rr = lt.RIGHT, ar = lt.UP, On = lt.DOWN, kn = lt.ENTER, fa = lt.ESC, bn = lt.HOME, pn = lt.END, Ir = [ar, On, nr, rr];
1558
+ function Ai(e, n, t, r) {
1559
+ var a, o = "prev", s = "next", l = "children", u = "parent";
1560
+ if (e === "inline" && r === kn)
1561
+ return {
1562
+ inlineTrigger: !0
1563
+ };
1564
+ var c = me(me({}, ar, o), On, s), b = me(me(me(me({}, nr, t ? s : o), rr, t ? o : s), On, l), kn, l), f = me(me(me(me(me(me({}, ar, o), On, s), kn, l), fa, u), nr, t ? l : u), rr, t ? u : l), d = {
1565
+ inline: c,
1566
+ horizontal: b,
1567
+ vertical: f,
1568
+ inlineSub: c,
1569
+ horizontalSub: f,
1570
+ verticalSub: f
1571
+ }, m = (a = d["".concat(e).concat(n ? "" : "Sub")]) === null || a === void 0 ? void 0 : a[r];
1572
+ switch (m) {
1573
+ case o:
1574
+ return {
1575
+ offset: -1,
1576
+ sibling: !0
1577
+ };
1578
+ case s:
1579
+ return {
1580
+ offset: 1,
1581
+ sibling: !0
1582
+ };
1583
+ case u:
1584
+ return {
1585
+ offset: -1,
1586
+ sibling: !1
1587
+ };
1588
+ case l:
1589
+ return {
1590
+ offset: 1,
1591
+ sibling: !1
1592
+ };
1593
+ default:
1594
+ return null;
1595
+ }
1596
+ }
1597
+ function $i(e) {
1598
+ for (var n = e; n; ) {
1599
+ if (n.getAttribute("data-menu-list"))
1600
+ return n;
1601
+ n = n.parentElement;
1602
+ }
1603
+ return null;
1604
+ }
1605
+ function zi(e, n) {
1606
+ for (var t = e || document.activeElement; t; ) {
1607
+ if (n.has(t))
1608
+ return t;
1609
+ t = t.parentElement;
1610
+ }
1611
+ return null;
1612
+ }
1613
+ function dr(e, n) {
1614
+ var t = Li(e, !0);
1615
+ return t.filter(function(r) {
1616
+ return n.has(r);
1617
+ });
1618
+ }
1619
+ function xr(e, n, t) {
1620
+ var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1;
1621
+ if (!e)
1622
+ return null;
1623
+ var a = dr(e, n), o = a.length, s = a.findIndex(function(l) {
1624
+ return t === l;
1625
+ });
1626
+ return r < 0 ? s === -1 ? s = o - 1 : s -= 1 : r > 0 && (s += 1), s = (s + o) % o, a[s];
1627
+ }
1628
+ var ir = function(n, t) {
1629
+ var r = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
1630
+ return n.forEach(function(s) {
1631
+ var l = document.querySelector("[data-menu-id='".concat(oa(t, s), "']"));
1632
+ l && (r.add(l), o.set(l, s), a.set(s, l));
1633
+ }), {
1634
+ elements: r,
1635
+ key2element: a,
1636
+ element2key: o
1637
+ };
1638
+ };
1639
+ function Vi(e, n, t, r, a, o, s, l, u, c) {
1640
+ var b = i.useRef(), f = i.useRef();
1641
+ f.current = n;
1642
+ var d = function() {
1643
+ Ht.cancel(b.current);
1644
+ };
1645
+ return i.useEffect(function() {
1646
+ return function() {
1647
+ d();
1648
+ };
1649
+ }, []), function(m) {
1650
+ var g = m.which;
1651
+ if ([].concat(Ir, [kn, fa, bn, pn]).includes(g)) {
1652
+ var E = o(), h = ir(E, r), M = h, S = M.elements, y = M.key2element, w = M.element2key, C = y.get(n), v = zi(C, S), N = w.get(v), k = Ai(e, s(N, !0).length === 1, t, g);
1653
+ if (!k && g !== bn && g !== pn)
1654
+ return;
1655
+ (Ir.includes(g) || [bn, pn].includes(g)) && m.preventDefault();
1656
+ var D = function(Q) {
1657
+ if (Q) {
1658
+ var V = Q, A = Q.querySelector("a");
1659
+ A != null && A.getAttribute("href") && (V = A);
1660
+ var x = w.get(Q);
1661
+ l(x), d(), b.current = Ht(function() {
1662
+ f.current === x && V.focus();
1663
+ });
1664
+ }
1665
+ };
1666
+ if ([bn, pn].includes(g) || k.sibling || !v) {
1667
+ var H;
1668
+ !v || e === "inline" ? H = a.current : H = $i(v);
1669
+ var $, z = dr(H, S);
1670
+ g === bn ? $ = z[0] : g === pn ? $ = z[z.length - 1] : $ = xr(H, S, v, k.offset), D($);
1671
+ } else if (k.inlineTrigger)
1672
+ u(N);
1673
+ else if (k.offset > 0)
1674
+ u(N, !0), d(), b.current = Ht(function() {
1675
+ h = ir(E, r);
1676
+ var G = v.getAttribute("aria-controls"), Q = document.getElementById(G), V = xr(Q, h.elements);
1677
+ D(V);
1678
+ }, 5);
1679
+ else if (k.offset < 0) {
1680
+ var L = s(N, !0), j = L[L.length - 2], Z = y.get(j);
1681
+ u(j, !1), D(Z);
1682
+ }
1683
+ }
1684
+ c == null || c(m);
1685
+ };
1686
+ }
1687
+ function Wi(e) {
1688
+ Promise.resolve().then(e);
1689
+ }
1690
+ var mr = "__RC_UTIL_PATH_SPLIT__", Dr = function(n) {
1691
+ return n.join(mr);
1692
+ }, Fi = function(n) {
1693
+ return n.split(mr);
1694
+ }, or = "rc-menu-more";
1695
+ function Hi() {
1696
+ var e = i.useState({}), n = O(e, 2), t = n[1], r = xn(/* @__PURE__ */ new Map()), a = xn(/* @__PURE__ */ new Map()), o = i.useState([]), s = O(o, 2), l = s[0], u = s[1], c = xn(0), b = xn(!1), f = function() {
1697
+ b.current || t({});
1698
+ }, d = Tt(function(y, w) {
1699
+ process.env.NODE_ENV !== "production" && un(!r.current.has(y), "Duplicated key '".concat(y, "' used in Menu by path [").concat(w.join(" > "), "]"));
1700
+ var C = Dr(w);
1701
+ a.current.set(C, y), r.current.set(y, C), c.current += 1;
1702
+ var v = c.current;
1703
+ Wi(function() {
1704
+ v === c.current && f();
1705
+ });
1706
+ }, []), m = Tt(function(y, w) {
1707
+ var C = Dr(w);
1708
+ a.current.delete(C), r.current.delete(y);
1709
+ }, []), g = Tt(function(y) {
1710
+ u(y);
1711
+ }, []), E = Tt(function(y, w) {
1712
+ var C = r.current.get(y) || "", v = Fi(C);
1713
+ return w && l.includes(v[0]) && v.unshift(or), v;
1714
+ }, [l]), h = Tt(function(y, w) {
1715
+ return y.filter(function(C) {
1716
+ return C !== void 0;
1717
+ }).some(function(C) {
1718
+ var v = E(C, !0);
1719
+ return v.includes(w);
1720
+ });
1721
+ }, [E]), M = function() {
1722
+ var w = Rt(r.current.keys());
1723
+ return l.length && w.push(or), w;
1724
+ }, S = Tt(function(y) {
1725
+ var w = "".concat(r.current.get(y)).concat(mr), C = /* @__PURE__ */ new Set();
1726
+ return Rt(a.current.keys()).forEach(function(v) {
1727
+ v.startsWith(w) && C.add(a.current.get(v));
1728
+ }), C;
1729
+ }, []);
1730
+ return i.useEffect(function() {
1731
+ return function() {
1732
+ b.current = !0;
1733
+ };
1734
+ }, []), {
1735
+ // Register
1736
+ registerPath: d,
1737
+ unregisterPath: m,
1738
+ refreshOverflowKeys: g,
1739
+ // Util
1740
+ isSubPathKey: h,
1741
+ getKeyPath: E,
1742
+ getKeys: M,
1743
+ getSubPathKeys: S
1744
+ };
1745
+ }
1746
+ function Cn(e) {
1747
+ var n = i.useRef(e);
1748
+ n.current = e;
1749
+ var t = i.useCallback(function() {
1750
+ for (var r, a = arguments.length, o = new Array(a), s = 0; s < a; s++)
1751
+ o[s] = arguments[s];
1752
+ return (r = n.current) === null || r === void 0 ? void 0 : r.call.apply(r, [n].concat(o));
1753
+ }, []);
1754
+ return e ? t : void 0;
1755
+ }
1756
+ var Bi = Math.random().toFixed(5).toString().slice(2), Or = 0;
1757
+ function Ui(e) {
1758
+ var n = Dn(e, {
1759
+ value: e
1760
+ }), t = O(n, 2), r = t[0], a = t[1];
1761
+ return i.useEffect(function() {
1762
+ Or += 1;
1763
+ var o = process.env.NODE_ENV === "test" ? "test" : "".concat(Bi, "-").concat(Or);
1764
+ a("rc-menu-uuid-".concat(o));
1765
+ }, []), r;
1766
+ }
1767
+ function va(e, n, t, r) {
1768
+ var a = i.useContext(st), o = a.activeKey, s = a.onActive, l = a.onInactive, u = {
1769
+ active: o === e
1770
+ };
1771
+ return n || (u.onMouseEnter = function(c) {
1772
+ t == null || t({
1773
+ key: e,
1774
+ domEvent: c
1775
+ }), s(e);
1776
+ }, u.onMouseLeave = function(c) {
1777
+ r == null || r({
1778
+ key: e,
1779
+ domEvent: c
1780
+ }), l(e);
1781
+ }), u;
1782
+ }
1783
+ function da(e) {
1784
+ var n = i.useContext(st), t = n.mode, r = n.rtl, a = n.inlineIndent;
1785
+ if (t !== "inline")
1786
+ return null;
1787
+ var o = e;
1788
+ return r ? {
1789
+ paddingRight: o * a
1790
+ } : {
1791
+ paddingLeft: o * a
1792
+ };
1793
+ }
1794
+ function ma(e) {
1795
+ var n = e.icon, t = e.props, r = e.children, a;
1796
+ return n === null || n === !1 ? null : (typeof n == "function" ? a = /* @__PURE__ */ i.createElement(n, T({}, t)) : typeof n != "boolean" && (a = n), a || r || null);
1797
+ }
1798
+ var ji = ["item"];
1799
+ function An(e) {
1800
+ var n = e.item, t = ke(e, ji);
1801
+ return Object.defineProperty(t, "item", {
1802
+ get: function() {
1803
+ return un(!1, "`info.item` is deprecated since we will move to function component that not provides React Node instance in future."), n;
1804
+ }
1805
+ }), t;
1806
+ }
1807
+ var Gi = ["title", "attribute", "elementRef"], qi = ["style", "className", "eventKey", "warnKey", "disabled", "itemIcon", "children", "role", "onMouseEnter", "onMouseLeave", "onClick", "onKeyDown", "onFocus"], Ji = ["active"], Zi = /* @__PURE__ */ function(e) {
1808
+ Kr(t, e);
1809
+ var n = Lr(t);
1810
+ function t() {
1811
+ return Tr(this, t), n.apply(this, arguments);
1812
+ }
1813
+ return Ar(t, [{
1814
+ key: "render",
1815
+ value: function() {
1816
+ var a = this.props, o = a.title, s = a.attribute, l = a.elementRef, u = ke(a, Gi), c = fr(u, ["eventKey", "popupClassName", "popupOffset", "onTitleClick"]);
1817
+ return un(!s, "`attribute` of Menu.Item is deprecated. Please pass attribute directly."), /* @__PURE__ */ i.createElement(Mt.Item, ne({}, s, {
1818
+ title: typeof o == "string" ? o : void 0
1819
+ }, c, {
1820
+ ref: l
1821
+ }));
1822
+ }
1823
+ }]), t;
1824
+ }(i.Component), Qi = /* @__PURE__ */ i.forwardRef(function(e, n) {
1825
+ var t = e.style, r = e.className, a = e.eventKey, o = e.warnKey, s = e.disabled, l = e.itemIcon, u = e.children, c = e.role, b = e.onMouseEnter, f = e.onMouseLeave, d = e.onClick, m = e.onKeyDown, g = e.onFocus, E = ke(e, qi), h = sa(a), M = i.useContext(st), S = M.prefixCls, y = M.onItemClick, w = M.disabled, C = M.overflowDisabled, v = M.itemIcon, N = M.selectedKeys, k = M.onActive, D = i.useContext(vr), H = D._internalRenderMenuItem, $ = "".concat(S, "-item"), z = i.useRef(), L = i.useRef(), j = w || s, Z = lr(n, L), G = Sn(a);
1826
+ process.env.NODE_ENV !== "production" && o && un(!1, "MenuItem should not leave undefined `key`.");
1827
+ var Q = function(ae) {
1828
+ return {
1829
+ key: a,
1830
+ // Note: For legacy code is reversed which not like other antd component
1831
+ keyPath: Rt(G).reverse(),
1832
+ item: z.current,
1833
+ domEvent: ae
1834
+ };
1835
+ }, V = l || v, A = va(a, j, b, f), x = A.active, we = ke(A, Ji), le = N.includes(a), q = da(G.length), K = function(ae) {
1836
+ if (!j) {
1837
+ var be = Q(ae);
1838
+ d == null || d(An(be)), y(be);
1839
+ }
1840
+ }, B = function(ae) {
1841
+ if (m == null || m(ae), ae.which === lt.ENTER) {
1842
+ var be = Q(ae);
1843
+ d == null || d(An(be)), y(be);
1844
+ }
1845
+ }, re = function(ae) {
1846
+ k(a), g == null || g(ae);
1847
+ }, ye = {};
1848
+ e.role === "option" && (ye["aria-selected"] = le);
1849
+ var W = /* @__PURE__ */ i.createElement(Zi, ne({
1850
+ ref: z,
1851
+ elementRef: Z,
1852
+ role: c === null ? "none" : c || "menuitem",
1853
+ tabIndex: s ? null : -1,
1854
+ "data-menu-id": C && h ? null : h
1855
+ }, fr(E, ["extra"]), we, ye, {
1856
+ component: "li",
1857
+ "aria-disabled": s,
1858
+ style: T(T({}, q), t),
1859
+ className: Ke($, me(me(me({}, "".concat($, "-active"), x), "".concat($, "-selected"), le), "".concat($, "-disabled"), j), r),
1860
+ onClick: K,
1861
+ onKeyDown: B,
1862
+ onFocus: re
1863
+ }), u, /* @__PURE__ */ i.createElement(ma, {
1864
+ props: T(T({}, e), {}, {
1865
+ isSelected: le
1866
+ }),
1867
+ icon: V
1868
+ }));
1869
+ return H && (W = H(W, e, {
1870
+ selected: le
1871
+ })), W;
1872
+ });
1873
+ function Yi(e, n) {
1874
+ var t = e.eventKey, r = Vn(), a = Sn(t);
1875
+ return i.useEffect(function() {
1876
+ if (r)
1877
+ return r.registerPath(t, a), function() {
1878
+ r.unregisterPath(t, a);
1879
+ };
1880
+ }, [a]), r ? null : /* @__PURE__ */ i.createElement(Qi, ne({}, e, {
1881
+ ref: n
1882
+ }));
1883
+ }
1884
+ const hr = /* @__PURE__ */ i.forwardRef(Yi);
1885
+ var Xi = ["className", "children"], eo = function(n, t) {
1886
+ var r = n.className, a = n.children, o = ke(n, Xi), s = i.useContext(st), l = s.prefixCls, u = s.mode, c = s.rtl;
1887
+ return /* @__PURE__ */ i.createElement("ul", ne({
1888
+ className: Ke(l, c && "".concat(l, "-rtl"), "".concat(l, "-sub"), "".concat(l, "-").concat(u === "inline" ? "inline" : "vertical"), r),
1889
+ role: "menu"
1890
+ }, o, {
1891
+ "data-menu-list": !0,
1892
+ ref: t
1893
+ }), a);
1894
+ }, gr = /* @__PURE__ */ i.forwardRef(eo);
1895
+ gr.displayName = "SubMenuList";
1896
+ function yr(e, n) {
1897
+ return zr(e).map(function(t, r) {
1898
+ if (/* @__PURE__ */ i.isValidElement(t)) {
1899
+ var a, o, s = t.key, l = (a = (o = t.props) === null || o === void 0 ? void 0 : o.eventKey) !== null && a !== void 0 ? a : s, u = l == null;
1900
+ u && (l = "tmp_key-".concat([].concat(Rt(n), [r]).join("-")));
1901
+ var c = {
1902
+ key: l,
1903
+ eventKey: l
1904
+ };
1905
+ return process.env.NODE_ENV !== "production" && u && (c.warnKey = !0), /* @__PURE__ */ i.cloneElement(t, c);
1906
+ }
1907
+ return t;
1908
+ });
1909
+ }
1910
+ var Ve = {
1911
+ adjustX: 1,
1912
+ adjustY: 1
1913
+ }, to = {
1914
+ topLeft: {
1915
+ points: ["bl", "tl"],
1916
+ overflow: Ve
1917
+ },
1918
+ topRight: {
1919
+ points: ["br", "tr"],
1920
+ overflow: Ve
1921
+ },
1922
+ bottomLeft: {
1923
+ points: ["tl", "bl"],
1924
+ overflow: Ve
1925
+ },
1926
+ bottomRight: {
1927
+ points: ["tr", "br"],
1928
+ overflow: Ve
1929
+ },
1930
+ leftTop: {
1931
+ points: ["tr", "tl"],
1932
+ overflow: Ve
1933
+ },
1934
+ leftBottom: {
1935
+ points: ["br", "bl"],
1936
+ overflow: Ve
1937
+ },
1938
+ rightTop: {
1939
+ points: ["tl", "tr"],
1940
+ overflow: Ve
1941
+ },
1942
+ rightBottom: {
1943
+ points: ["bl", "br"],
1944
+ overflow: Ve
1945
+ }
1946
+ }, no = {
1947
+ topLeft: {
1948
+ points: ["bl", "tl"],
1949
+ overflow: Ve
1950
+ },
1951
+ topRight: {
1952
+ points: ["br", "tr"],
1953
+ overflow: Ve
1954
+ },
1955
+ bottomLeft: {
1956
+ points: ["tl", "bl"],
1957
+ overflow: Ve
1958
+ },
1959
+ bottomRight: {
1960
+ points: ["tr", "br"],
1961
+ overflow: Ve
1962
+ },
1963
+ rightTop: {
1964
+ points: ["tr", "tl"],
1965
+ overflow: Ve
1966
+ },
1967
+ rightBottom: {
1968
+ points: ["br", "bl"],
1969
+ overflow: Ve
1970
+ },
1971
+ leftTop: {
1972
+ points: ["tl", "tr"],
1973
+ overflow: Ve
1974
+ },
1975
+ leftBottom: {
1976
+ points: ["bl", "br"],
1977
+ overflow: Ve
1978
+ }
1979
+ };
1980
+ function ha(e, n, t) {
1981
+ if (n)
1982
+ return n;
1983
+ if (t)
1984
+ return t[e] || t.other;
1985
+ }
1986
+ var ro = {
1987
+ horizontal: "bottomLeft",
1988
+ vertical: "rightTop",
1989
+ "vertical-left": "rightTop",
1990
+ "vertical-right": "leftTop"
1991
+ };
1992
+ function ao(e) {
1993
+ var n = e.prefixCls, t = e.visible, r = e.children, a = e.popup, o = e.popupStyle, s = e.popupClassName, l = e.popupOffset, u = e.disabled, c = e.mode, b = e.onVisibleChange, f = i.useContext(st), d = f.getPopupContainer, m = f.rtl, g = f.subMenuOpenDelay, E = f.subMenuCloseDelay, h = f.builtinPlacements, M = f.triggerSubMenuAction, S = f.forceSubMenuRender, y = f.rootClassName, w = f.motion, C = f.defaultMotions, v = i.useState(!1), N = O(v, 2), k = N[0], D = N[1], H = m ? T(T({}, no), h) : T(T({}, to), h), $ = ro[c], z = ha(c, w, C), L = i.useRef(z);
1994
+ c !== "inline" && (L.current = z);
1995
+ var j = T(T({}, L.current), {}, {
1996
+ leavedClassName: "".concat(n, "-hidden"),
1997
+ removeOnLeave: !1,
1998
+ motionAppear: !0
1999
+ }), Z = i.useRef();
2000
+ return i.useEffect(function() {
2001
+ return Z.current = Ht(function() {
2002
+ D(t);
2003
+ }), function() {
2004
+ Ht.cancel(Z.current);
2005
+ };
2006
+ }, [t]), /* @__PURE__ */ i.createElement(aa, {
2007
+ prefixCls: n,
2008
+ popupClassName: Ke("".concat(n, "-popup"), me({}, "".concat(n, "-rtl"), m), s, y),
2009
+ stretch: c === "horizontal" ? "minWidth" : null,
2010
+ getPopupContainer: d,
2011
+ builtinPlacements: H,
2012
+ popupPlacement: $,
2013
+ popupVisible: k,
2014
+ popup: a,
2015
+ popupStyle: o,
2016
+ popupAlign: l && {
2017
+ offset: l
2018
+ },
2019
+ action: u ? [] : [M],
2020
+ mouseEnterDelay: g,
2021
+ mouseLeaveDelay: E,
2022
+ onPopupVisibleChange: b,
2023
+ forceRender: S,
2024
+ popupMotion: j,
2025
+ fresh: !0
2026
+ }, r);
2027
+ }
2028
+ function io(e) {
2029
+ var n = e.id, t = e.open, r = e.keyPath, a = e.children, o = "inline", s = i.useContext(st), l = s.prefixCls, u = s.forceSubMenuRender, c = s.motion, b = s.defaultMotions, f = s.mode, d = i.useRef(!1);
2030
+ d.current = f === o;
2031
+ var m = i.useState(!d.current), g = O(m, 2), E = g[0], h = g[1], M = d.current ? t : !1;
2032
+ i.useEffect(function() {
2033
+ d.current && h(!1);
2034
+ }, [f]);
2035
+ var S = T({}, ha(o, c, b));
2036
+ r.length > 1 && (S.motionAppear = !1);
2037
+ var y = S.onVisibleChanged;
2038
+ return S.onVisibleChanged = function(w) {
2039
+ return !d.current && !w && h(!0), y == null ? void 0 : y(w);
2040
+ }, E ? null : /* @__PURE__ */ i.createElement(Rn, {
2041
+ mode: o,
2042
+ locked: !d.current
2043
+ }, /* @__PURE__ */ i.createElement(ur, ne({
2044
+ visible: M
2045
+ }, S, {
2046
+ forceRender: u,
2047
+ removeOnLeave: !1,
2048
+ leavedClassName: "".concat(l, "-hidden")
2049
+ }), function(w) {
2050
+ var C = w.className, v = w.style;
2051
+ return /* @__PURE__ */ i.createElement(gr, {
2052
+ id: n,
2053
+ className: C,
2054
+ style: v
2055
+ }, a);
2056
+ }));
2057
+ }
2058
+ var oo = ["style", "className", "title", "eventKey", "warnKey", "disabled", "internalPopupClose", "children", "itemIcon", "expandIcon", "popupClassName", "popupOffset", "popupStyle", "onClick", "onMouseEnter", "onMouseLeave", "onTitleClick", "onTitleMouseEnter", "onTitleMouseLeave"], so = ["active"], lo = /* @__PURE__ */ i.forwardRef(function(e, n) {
2059
+ var t = e.style, r = e.className, a = e.title, o = e.eventKey, s = e.warnKey, l = e.disabled, u = e.internalPopupClose, c = e.children, b = e.itemIcon, f = e.expandIcon, d = e.popupClassName, m = e.popupOffset, g = e.popupStyle, E = e.onClick, h = e.onMouseEnter, M = e.onMouseLeave, S = e.onTitleClick, y = e.onTitleMouseEnter, w = e.onTitleMouseLeave, C = ke(e, oo), v = sa(o), N = i.useContext(st), k = N.prefixCls, D = N.mode, H = N.openKeys, $ = N.disabled, z = N.overflowDisabled, L = N.activeKey, j = N.selectedKeys, Z = N.itemIcon, G = N.expandIcon, Q = N.onItemClick, V = N.onOpenChange, A = N.onActive, x = i.useContext(vr), we = x._internalRenderSubMenuItem, le = i.useContext(ca), q = le.isSubPathKey, K = Sn(), B = "".concat(k, "-submenu"), re = $ || l, ye = i.useRef(), W = i.useRef();
2060
+ process.env.NODE_ENV !== "production" && s && un(!1, "SubMenu should not leave undefined `key`.");
2061
+ var Y = b ?? Z, ae = f ?? G, be = H.includes(o), ie = !z && be, Pe = q(j, o), Me = va(o, re, y, w), oe = Me.active, Be = ke(Me, so), Ue = i.useState(!1), ue = O(Ue, 2), Ne = ue[0], We = ue[1], de = function(X) {
2062
+ re || We(X);
2063
+ }, ht = function(X) {
2064
+ de(!0), h == null || h({
2065
+ key: o,
2066
+ domEvent: X
2067
+ });
2068
+ }, F = function(X) {
2069
+ de(!1), M == null || M({
2070
+ key: o,
2071
+ domEvent: X
2072
+ });
2073
+ }, Je = i.useMemo(function() {
2074
+ return oe || (D !== "inline" ? Ne || q([L], o) : !1);
2075
+ }, [D, oe, L, Ne, o, q]), pe = da(K.length), J = function(X) {
2076
+ re || (S == null || S({
2077
+ key: o,
2078
+ domEvent: X
2079
+ }), D === "inline" && V(o, !be));
2080
+ }, Fe = Cn(function(Ie) {
2081
+ E == null || E(An(Ie)), Q(Ie);
2082
+ }), Ae = function(X) {
2083
+ D !== "inline" && V(o, X);
2084
+ }, $e = function() {
2085
+ A(o);
2086
+ }, Ze = v && "".concat(v, "-popup"), _e = /* @__PURE__ */ i.createElement("div", ne({
2087
+ role: "menuitem",
2088
+ style: pe,
2089
+ className: "".concat(B, "-title"),
2090
+ tabIndex: re ? null : -1,
2091
+ ref: ye,
2092
+ title: typeof a == "string" ? a : null,
2093
+ "data-menu-id": z && v ? null : v,
2094
+ "aria-expanded": ie,
2095
+ "aria-haspopup": !0,
2096
+ "aria-controls": Ze,
2097
+ "aria-disabled": re,
2098
+ onClick: J,
2099
+ onFocus: $e
2100
+ }, Be), a, /* @__PURE__ */ i.createElement(ma, {
2101
+ icon: D !== "horizontal" ? ae : void 0,
2102
+ props: T(T({}, e), {}, {
2103
+ isOpen: ie,
2104
+ // [Legacy] Not sure why need this mark
2105
+ isSubMenu: !0
2106
+ })
2107
+ }, /* @__PURE__ */ i.createElement("i", {
2108
+ className: "".concat(B, "-arrow")
2109
+ }))), Ce = i.useRef(D);
2110
+ if (D !== "inline" && K.length > 1 ? Ce.current = "vertical" : Ce.current = D, !z) {
2111
+ var ce = Ce.current;
2112
+ _e = /* @__PURE__ */ i.createElement(ao, {
2113
+ mode: ce,
2114
+ prefixCls: B,
2115
+ visible: !u && ie && D !== "inline",
2116
+ popupClassName: d,
2117
+ popupOffset: m,
2118
+ popupStyle: g,
2119
+ popup: /* @__PURE__ */ i.createElement(
2120
+ Rn,
2121
+ {
2122
+ mode: ce === "horizontal" ? "vertical" : ce
2123
+ },
2124
+ /* @__PURE__ */ i.createElement(gr, {
2125
+ id: Ze,
2126
+ ref: W
2127
+ }, c)
2128
+ ),
2129
+ disabled: re,
2130
+ onVisibleChange: Ae
2131
+ }, _e);
2132
+ }
2133
+ var Re = /* @__PURE__ */ i.createElement(Mt.Item, ne({
2134
+ ref: n,
2135
+ role: "none"
2136
+ }, C, {
2137
+ component: "li",
2138
+ style: t,
2139
+ className: Ke(B, "".concat(B, "-").concat(D), r, me(me(me(me({}, "".concat(B, "-open"), ie), "".concat(B, "-active"), Je), "".concat(B, "-selected"), Pe), "".concat(B, "-disabled"), re)),
2140
+ onMouseEnter: ht,
2141
+ onMouseLeave: F
2142
+ }), _e, !z && /* @__PURE__ */ i.createElement(io, {
2143
+ id: Ze,
2144
+ open: ie,
2145
+ keyPath: K
2146
+ }, c));
2147
+ return we && (Re = we(Re, e, {
2148
+ selected: Pe,
2149
+ active: Je,
2150
+ open: ie,
2151
+ disabled: re
2152
+ })), /* @__PURE__ */ i.createElement(Rn, {
2153
+ onItemClick: Fe,
2154
+ mode: D === "horizontal" ? "vertical" : D,
2155
+ itemIcon: Y,
2156
+ expandIcon: ae
2157
+ }, Re);
2158
+ }), Wn = /* @__PURE__ */ i.forwardRef(function(e, n) {
2159
+ var t = e.eventKey, r = e.children, a = Sn(t), o = yr(r, a), s = Vn();
2160
+ i.useEffect(function() {
2161
+ if (s)
2162
+ return s.registerPath(t, a), function() {
2163
+ s.unregisterPath(t, a);
2164
+ };
2165
+ }, [a]);
2166
+ var l;
2167
+ return s ? l = o : l = /* @__PURE__ */ i.createElement(lo, ne({
2168
+ ref: n
2169
+ }, e), o), /* @__PURE__ */ i.createElement(ua.Provider, {
2170
+ value: a
2171
+ }, l);
2172
+ });
2173
+ process.env.NODE_ENV !== "production" && (Wn.displayName = "SubMenu");
2174
+ function ga(e) {
2175
+ var n = e.className, t = e.style, r = i.useContext(st), a = r.prefixCls, o = Vn();
2176
+ return o ? null : /* @__PURE__ */ i.createElement("li", {
2177
+ role: "separator",
2178
+ className: Ke("".concat(a, "-item-divider"), n),
2179
+ style: t
2180
+ });
2181
+ }
2182
+ var uo = ["className", "title", "eventKey", "children"], co = /* @__PURE__ */ i.forwardRef(function(e, n) {
2183
+ var t = e.className, r = e.title;
2184
+ e.eventKey;
2185
+ var a = e.children, o = ke(e, uo), s = i.useContext(st), l = s.prefixCls, u = "".concat(l, "-item-group");
2186
+ return /* @__PURE__ */ i.createElement("li", ne({
2187
+ ref: n,
2188
+ role: "presentation"
2189
+ }, o, {
2190
+ onClick: function(b) {
2191
+ return b.stopPropagation();
2192
+ },
2193
+ className: Ke(u, t)
2194
+ }), /* @__PURE__ */ i.createElement("div", {
2195
+ role: "presentation",
2196
+ className: "".concat(u, "-title"),
2197
+ title: typeof r == "string" ? r : void 0
2198
+ }, r), /* @__PURE__ */ i.createElement("ul", {
2199
+ role: "group",
2200
+ className: "".concat(u, "-list")
2201
+ }, a));
2202
+ }), br = /* @__PURE__ */ i.forwardRef(function(e, n) {
2203
+ var t = e.eventKey, r = e.children, a = Sn(t), o = yr(r, a), s = Vn();
2204
+ return s ? o : /* @__PURE__ */ i.createElement(co, ne({
2205
+ ref: n
2206
+ }, fr(e, ["warnKey"])), o);
2207
+ });
2208
+ process.env.NODE_ENV !== "production" && (br.displayName = "MenuItemGroup");
2209
+ var fo = ["label", "children", "key", "type", "extra"];
2210
+ function sr(e, n, t) {
2211
+ var r = n.item, a = n.group, o = n.submenu, s = n.divider;
2212
+ return (e || []).map(function(l, u) {
2213
+ if (l && $r(l) === "object") {
2214
+ var c = l, b = c.label, f = c.children, d = c.key, m = c.type, g = c.extra, E = ke(c, fo), h = d ?? "tmp-".concat(u);
2215
+ return f || m === "group" ? m === "group" ? /* @__PURE__ */ i.createElement(a, ne({
2216
+ key: h
2217
+ }, E, {
2218
+ title: b
2219
+ }), sr(f, n, t)) : /* @__PURE__ */ i.createElement(o, ne({
2220
+ key: h
2221
+ }, E, {
2222
+ title: b
2223
+ }), sr(f, n, t)) : m === "divider" ? /* @__PURE__ */ i.createElement(s, ne({
2224
+ key: h
2225
+ }, E)) : /* @__PURE__ */ i.createElement(r, ne({
2226
+ key: h
2227
+ }, E, {
2228
+ extra: g
2229
+ }), b, (!!g || g === 0) && /* @__PURE__ */ i.createElement("span", {
2230
+ className: "".concat(t, "-item-extra")
2231
+ }, g));
2232
+ }
2233
+ return null;
2234
+ }).filter(function(l) {
2235
+ return l;
2236
+ });
2237
+ }
2238
+ function kr(e, n, t, r, a) {
2239
+ var o = e, s = T({
2240
+ divider: ga,
2241
+ item: hr,
2242
+ group: br,
2243
+ submenu: Wn
2244
+ }, r);
2245
+ return n && (o = sr(n, s, a)), yr(o, t);
2246
+ }
2247
+ var vo = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items", "children", "direction", "id", "mode", "inlineCollapsed", "disabled", "disabledOverflow", "subMenuOpenDelay", "subMenuCloseDelay", "forceSubMenuRender", "defaultOpenKeys", "openKeys", "activeKey", "defaultActiveFirst", "selectable", "multiple", "defaultSelectedKeys", "selectedKeys", "onSelect", "onDeselect", "inlineIndent", "motion", "defaultMotions", "triggerSubMenuAction", "builtinPlacements", "itemIcon", "expandIcon", "overflowedIndicator", "overflowedIndicatorPopupClassName", "getPopupContainer", "onClick", "onOpenChange", "onKeyDown", "openAnimation", "openTransitionName", "_internalRenderMenuItem", "_internalRenderSubMenuItem", "_internalComponents"], Ft = [], mo = /* @__PURE__ */ i.forwardRef(function(e, n) {
2248
+ var t, r = e, a = r.prefixCls, o = a === void 0 ? "rc-menu" : a, s = r.rootClassName, l = r.style, u = r.className, c = r.tabIndex, b = c === void 0 ? 0 : c, f = r.items, d = r.children, m = r.direction, g = r.id, E = r.mode, h = E === void 0 ? "vertical" : E, M = r.inlineCollapsed, S = r.disabled, y = r.disabledOverflow, w = r.subMenuOpenDelay, C = w === void 0 ? 0.1 : w, v = r.subMenuCloseDelay, N = v === void 0 ? 0.1 : v, k = r.forceSubMenuRender, D = r.defaultOpenKeys, H = r.openKeys, $ = r.activeKey, z = r.defaultActiveFirst, L = r.selectable, j = L === void 0 ? !0 : L, Z = r.multiple, G = Z === void 0 ? !1 : Z, Q = r.defaultSelectedKeys, V = r.selectedKeys, A = r.onSelect, x = r.onDeselect, we = r.inlineIndent, le = we === void 0 ? 24 : we, q = r.motion, K = r.defaultMotions, B = r.triggerSubMenuAction, re = B === void 0 ? "hover" : B, ye = r.builtinPlacements, W = r.itemIcon, Y = r.expandIcon, ae = r.overflowedIndicator, be = ae === void 0 ? "..." : ae, ie = r.overflowedIndicatorPopupClassName, Pe = r.getPopupContainer, Me = r.onClick, oe = r.onOpenChange, Be = r.onKeyDown, Ue = r.openAnimation, ue = r.openTransitionName, Ne = r._internalRenderMenuItem, We = r._internalRenderSubMenuItem, de = r._internalComponents, ht = ke(r, vo), F = i.useMemo(function() {
2249
+ return [kr(d, f, Ft, de, o), kr(d, f, Ft, {}, o)];
2250
+ }, [d, f, de]), Je = O(F, 2), pe = Je[0], J = Je[1], Fe = i.useState(!1), Ae = O(Fe, 2), $e = Ae[0], Ze = Ae[1], _e = i.useRef(), Ce = Ui(g), ce = m === "rtl";
2251
+ process.env.NODE_ENV !== "production" && un(!Ue && !ue, "`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");
2252
+ var Re = Dn(D, {
2253
+ value: H,
2254
+ postState: function(U) {
2255
+ return U || Ft;
2256
+ }
2257
+ }), Ie = O(Re, 2), X = Ie[0], Te = Ie[1], ze = function(U) {
2258
+ var te = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2259
+ function Le() {
2260
+ Te(U), oe == null || oe(U);
2261
+ }
2262
+ te ? Vr.flushSync(Le) : Le();
2263
+ }, Et = i.useState(X), ut = O(Et, 2), at = ut[0], At = ut[1], xe = i.useRef(!1), De = i.useMemo(function() {
2264
+ return (h === "inline" || h === "vertical") && M ? ["vertical", M] : [h, !1];
2265
+ }, [h, M]), Ye = O(De, 2), fe = Ye[0], P = Ye[1], R = fe === "inline", I = i.useState(fe), se = O(I, 2), he = se[0], $t = se[1], je = i.useState(P), zt = O(je, 2), Vt = zt[0], ct = zt[1];
2266
+ i.useEffect(function() {
2267
+ $t(fe), ct(P), xe.current && (R ? Te(at) : ze(Ft));
2268
+ }, [fe, P]);
2269
+ var Bt = i.useState(0), Ut = O(Bt, 2), ft = Ut[0], St = Ut[1], gt = ft >= pe.length - 1 || he !== "horizontal" || y;
2270
+ i.useEffect(function() {
2271
+ R && At(X);
2272
+ }, [X]), i.useEffect(function() {
2273
+ return xe.current = !0, function() {
2274
+ xe.current = !1;
2275
+ };
2276
+ }, []);
2277
+ var He = Hi(), vt = He.registerPath, Xe = He.unregisterPath, Pt = He.refreshOverflowKeys, dt = He.isSubPathKey, jt = He.getKeyPath, Ee = He.getKeys, Gt = He.getSubPathKeys, fn = i.useMemo(function() {
2278
+ return {
2279
+ registerPath: vt,
2280
+ unregisterPath: Xe
2281
+ };
2282
+ }, [vt, Xe]), yt = i.useMemo(function() {
2283
+ return {
2284
+ isSubPathKey: dt
2285
+ };
2286
+ }, [dt]);
2287
+ i.useEffect(function() {
2288
+ Pt(gt ? Ft : pe.slice(ft + 1).map(function(ee) {
2289
+ return ee.key;
2290
+ }));
2291
+ }, [ft, gt]);
2292
+ var qt = Dn($ || z && ((t = pe[0]) === null || t === void 0 ? void 0 : t.key), {
2293
+ value: $
2294
+ }), Jt = O(qt, 2), mt = Jt[0], Nt = Jt[1], bt = Cn(function(ee) {
2295
+ Nt(ee);
2296
+ }), Zt = Cn(function() {
2297
+ Nt(void 0);
2298
+ });
2299
+ Ra(n, function() {
2300
+ return {
2301
+ list: _e.current,
2302
+ focus: function(U) {
2303
+ var te, Le = Ee(), Oe = ir(Le, Ce), xt = Oe.elements, Wt = Oe.key2element, Xt = Oe.element2key, en = dr(_e.current, xt), tn = mt ?? (en[0] ? Xt.get(en[0]) : (te = pe.find(function(mn) {
2304
+ return !mn.props.disabled;
2305
+ })) === null || te === void 0 ? void 0 : te.key), it = Wt.get(tn);
2306
+ if (tn && it) {
2307
+ var Ge;
2308
+ it == null || (Ge = it.focus) === null || Ge === void 0 || Ge.call(it, U);
2309
+ }
2310
+ }
2311
+ };
2312
+ });
2313
+ var _t = Dn(Q || [], {
2314
+ value: V,
2315
+ // Legacy convert key to array
2316
+ postState: function(U) {
2317
+ return Array.isArray(U) ? U : U == null ? Ft : [U];
2318
+ }
2319
+ }), et = O(_t, 2), pt = et[0], Qt = et[1], tt = function(U) {
2320
+ if (j) {
2321
+ var te = U.key, Le = pt.includes(te), Oe;
2322
+ G ? Le ? Oe = pt.filter(function(Wt) {
2323
+ return Wt !== te;
2324
+ }) : Oe = [].concat(Rt(pt), [te]) : Oe = [te], Qt(Oe);
2325
+ var xt = T(T({}, U), {}, {
2326
+ selectedKeys: Oe
2327
+ });
2328
+ Le ? x == null || x(xt) : A == null || A(xt);
2329
+ }
2330
+ !G && X.length && he !== "inline" && ze(Ft);
2331
+ }, Qe = Cn(function(ee) {
2332
+ Me == null || Me(An(ee)), tt(ee);
2333
+ }), Ct = Cn(function(ee, U) {
2334
+ var te = X.filter(function(Oe) {
2335
+ return Oe !== ee;
2336
+ });
2337
+ if (U)
2338
+ te.push(ee);
2339
+ else if (he !== "inline") {
2340
+ var Le = Gt(ee);
2341
+ te = te.filter(function(Oe) {
2342
+ return !Le.has(Oe);
2343
+ });
2344
+ }
2345
+ Hr(X, te, !0) || ze(te, !0);
2346
+ }), It = function(U, te) {
2347
+ var Le = te ?? !X.includes(U);
2348
+ Ct(U, Le);
2349
+ }, nt = Vi(he, mt, ce, Ce, _e, Ee, jt, Nt, It, Be);
2350
+ i.useEffect(function() {
2351
+ Ze(!0);
2352
+ }, []);
2353
+ var vn = i.useMemo(function() {
2354
+ return {
2355
+ _internalRenderMenuItem: Ne,
2356
+ _internalRenderSubMenuItem: We
2357
+ };
2358
+ }, [Ne, We]), Yt = he !== "horizontal" || y ? pe : (
2359
+ // Need wrap for overflow dropdown that do not response for open
2360
+ pe.map(function(ee, U) {
2361
+ return (
2362
+ // Always wrap provider to avoid sub node re-mount
2363
+ /* @__PURE__ */ i.createElement(Rn, {
2364
+ key: ee.key,
2365
+ overflowDisabled: U > ft
2366
+ }, ee)
2367
+ );
2368
+ })
2369
+ ), dn = /* @__PURE__ */ i.createElement(Mt, ne({
2370
+ id: g,
2371
+ ref: _e,
2372
+ prefixCls: "".concat(o, "-overflow"),
2373
+ component: "ul",
2374
+ itemComponent: hr,
2375
+ className: Ke(o, "".concat(o, "-root"), "".concat(o, "-").concat(he), u, me(me({}, "".concat(o, "-inline-collapsed"), Vt), "".concat(o, "-rtl"), ce), s),
2376
+ dir: m,
2377
+ style: l,
2378
+ role: "menu",
2379
+ tabIndex: b,
2380
+ data: Yt,
2381
+ renderRawItem: function(U) {
2382
+ return U;
2383
+ },
2384
+ renderRawRest: function(U) {
2385
+ var te = U.length, Le = te ? pe.slice(-te) : null;
2386
+ return /* @__PURE__ */ i.createElement(Wn, {
2387
+ eventKey: or,
2388
+ title: be,
2389
+ disabled: gt,
2390
+ internalPopupClose: te === 0,
2391
+ popupClassName: ie
2392
+ }, Le);
2393
+ },
2394
+ maxCount: he !== "horizontal" || y ? Mt.INVALIDATE : Mt.RESPONSIVE,
2395
+ ssr: "full",
2396
+ "data-menu-list": !0,
2397
+ onVisibleChange: function(U) {
2398
+ St(U);
2399
+ },
2400
+ onKeyDown: nt
2401
+ }, ht));
2402
+ return /* @__PURE__ */ i.createElement(vr.Provider, {
2403
+ value: vn
2404
+ }, /* @__PURE__ */ i.createElement(ia.Provider, {
2405
+ value: Ce
2406
+ }, /* @__PURE__ */ i.createElement(Rn, {
2407
+ prefixCls: o,
2408
+ rootClassName: s,
2409
+ mode: he,
2410
+ openKeys: X,
2411
+ rtl: ce,
2412
+ disabled: S,
2413
+ motion: $e ? q : null,
2414
+ defaultMotions: $e ? K : null,
2415
+ activeKey: mt,
2416
+ onActive: bt,
2417
+ onInactive: Zt,
2418
+ selectedKeys: pt,
2419
+ inlineIndent: le,
2420
+ subMenuOpenDelay: C,
2421
+ subMenuCloseDelay: N,
2422
+ forceSubMenuRender: k,
2423
+ builtinPlacements: ye,
2424
+ triggerSubMenuAction: re,
2425
+ getPopupContainer: Pe,
2426
+ itemIcon: W,
2427
+ expandIcon: Y,
2428
+ onItemClick: Qe,
2429
+ onOpenChange: Ct
2430
+ }, /* @__PURE__ */ i.createElement(ca.Provider, {
2431
+ value: yt
2432
+ }, dn), /* @__PURE__ */ i.createElement("div", {
2433
+ style: {
2434
+ display: "none"
2435
+ },
2436
+ "aria-hidden": !0
2437
+ }, /* @__PURE__ */ i.createElement(la.Provider, {
2438
+ value: fn
2439
+ }, J)))));
2440
+ }), Fn = mo;
2441
+ Fn.Item = hr;
2442
+ Fn.SubMenu = Wn;
2443
+ Fn.ItemGroup = br;
2444
+ Fn.Divider = ga;
2445
+ var ho = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "ellipsis", theme: "outlined" }, go = function(n, t) {
2446
+ return /* @__PURE__ */ i.createElement(wa, ne({}, n, {
2447
+ ref: t,
2448
+ icon: ho
2449
+ }));
2450
+ }, yo = /* @__PURE__ */ i.forwardRef(go);
2451
+ process.env.NODE_ENV !== "production" && (yo.displayName = "EllipsisOutlined");
2452
+ export {
2453
+ Mo as D,
2454
+ Fn as E,
2455
+ hr as M,
2456
+ cn as R,
2457
+ Wn as S,
2458
+ aa as T,
2459
+ wo as a,
2460
+ yo as b,
2461
+ ga as c,
2462
+ br as d,
2463
+ Za as e,
2464
+ Qa as f,
2465
+ Ja as g,
2466
+ ai as i,
2467
+ Ya as s,
2468
+ Sn as u
2469
+ };