jcicl 0.0.57 → 0.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/.chunks/ButtonBase.js +202 -209
  2. package/.chunks/Input.js +6722 -0
  3. package/.chunks/Portal.js +824 -0
  4. package/.chunks/TransitionGroupContext.js +60 -78
  5. package/.chunks/elementTypeAcceptingRef.js +23 -0
  6. package/.chunks/isFocusVisible.js +12 -0
  7. package/animation/Spin/Spin.d.ts +5 -0
  8. package/animation/Spin/Spin.js +22 -0
  9. package/animation/Spin/index.d.ts +1 -0
  10. package/animation/Spin/index.js +4 -0
  11. package/animation/index.d.ts +1 -0
  12. package/animation/index.js +4 -2
  13. package/base/Button/Button.d.ts +1 -1
  14. package/base/Button/Button.js +66 -64
  15. package/base/Input/Input.d.ts +4 -1
  16. package/base/Input/Input.js +6 -7486
  17. package/base/Input/index.d.ts +1 -1
  18. package/base/Input/index.js +2 -2
  19. package/base/LabeledValue/LabeledValue.js +23 -12
  20. package/base/index.js +6 -6
  21. package/composite/Accordion/Accordion.d.ts +15 -0
  22. package/composite/Accordion/Accordion.js +65 -0
  23. package/composite/Accordion/index.d.ts +1 -0
  24. package/composite/Accordion/index.js +4 -0
  25. package/composite/InfoCard/InfoCard.d.ts +3 -0
  26. package/composite/InfoCard/InfoCard.js +13 -11
  27. package/composite/LabeledInput/LabeledInput.d.ts +9 -0
  28. package/composite/LabeledInput/LabeledInput.js +35 -0
  29. package/composite/LabeledInput/index.d.ts +1 -0
  30. package/composite/LabeledInput/index.js +4 -0
  31. package/composite/Tooltip/Tooltip.d.ts +7 -0
  32. package/composite/Tooltip/Tooltip.js +2092 -0
  33. package/composite/Tooltip/index.d.ts +1 -0
  34. package/composite/Tooltip/index.js +4 -0
  35. package/composite/index.d.ts +3 -0
  36. package/composite/index.js +16 -10
  37. package/index.d.ts +3 -3
  38. package/index.js +50 -40
  39. package/package.json +1 -1
  40. package/supercomposite/AppHeader/AppHeader.js +1 -1
  41. package/supercomposite/EditableInfoCard/EditableInfoCard.d.ts +29 -0
  42. package/supercomposite/EditableInfoCard/EditableInfoCard.js +223 -0
  43. package/supercomposite/EditableInfoCard/index.d.ts +1 -0
  44. package/supercomposite/EditableInfoCard/index.js +4 -0
  45. package/supercomposite/index.d.ts +1 -0
  46. package/supercomposite/index.js +6 -4
@@ -0,0 +1,2092 @@
1
+ import { jsx as re, jsxs as Et } from "react/jsx-runtime";
2
+ import * as C from "react";
3
+ import { a as Ht, g as Ut, P as r, d as Ft, s as et, u as qt, c as zt, e as Yt, b as qe } from "../../.chunks/DefaultPropsProvider.js";
4
+ import { o as Rt, P as fo, H as Qe, u as uo, a as Xt, b as vo, c as mo, d as ho, g as go, G as At, e as ze, f as bo } from "../../.chunks/Portal.js";
5
+ import { m as lt } from "../../.chunks/memoTheme.js";
6
+ import { c as yo } from "../../.chunks/chainPropTypes.js";
7
+ import { r as Gt, c as it, e as Ct, b as Ye, d as Mt, f as wo } from "../../.chunks/TransitionGroupContext.js";
8
+ import { i as jt } from "../../.chunks/isFocusVisible.js";
9
+ var W = "top", z = "bottom", Y = "right", I = "left", ct = "auto", Ie = [W, z, Y, I], Oe = "start", ke = "end", Oo = "clippingParents", Kt = "viewport", Se = "popper", xo = "reference", $t = /* @__PURE__ */ Ie.reduce(function(t, e) {
10
+ return t.concat([e + "-" + Oe, e + "-" + ke]);
11
+ }, []), Jt = /* @__PURE__ */ [].concat(Ie, [ct]).reduce(function(t, e) {
12
+ return t.concat([e, e + "-" + Oe, e + "-" + ke]);
13
+ }, []), To = "beforeRead", Po = "read", Eo = "afterRead", Ro = "beforeMain", Ao = "main", Co = "afterMain", Mo = "beforeWrite", jo = "write", $o = "afterWrite", Do = [To, Po, Eo, Ro, Ao, Co, Mo, jo, $o];
14
+ function ee(t) {
15
+ return t ? (t.nodeName || "").toLowerCase() : null;
16
+ }
17
+ function V(t) {
18
+ if (t == null)
19
+ return window;
20
+ if (t.toString() !== "[object Window]") {
21
+ var e = t.ownerDocument;
22
+ return e && e.defaultView || window;
23
+ }
24
+ return t;
25
+ }
26
+ function ue(t) {
27
+ var e = V(t).Element;
28
+ return t instanceof e || t instanceof Element;
29
+ }
30
+ function q(t) {
31
+ var e = V(t).HTMLElement;
32
+ return t instanceof e || t instanceof HTMLElement;
33
+ }
34
+ function ft(t) {
35
+ if (typeof ShadowRoot > "u")
36
+ return !1;
37
+ var e = V(t).ShadowRoot;
38
+ return t instanceof e || t instanceof ShadowRoot;
39
+ }
40
+ function So(t) {
41
+ var e = t.state;
42
+ Object.keys(e.elements).forEach(function(o) {
43
+ var n = e.styles[o] || {}, a = e.attributes[o] || {}, i = e.elements[o];
44
+ !q(i) || !ee(i) || (Object.assign(i.style, n), Object.keys(a).forEach(function(c) {
45
+ var p = a[c];
46
+ p === !1 ? i.removeAttribute(c) : i.setAttribute(c, p === !0 ? "" : p);
47
+ }));
48
+ });
49
+ }
50
+ function Bo(t) {
51
+ var e = t.state, o = {
52
+ popper: {
53
+ position: e.options.strategy,
54
+ left: "0",
55
+ top: "0",
56
+ margin: "0"
57
+ },
58
+ arrow: {
59
+ position: "absolute"
60
+ },
61
+ reference: {}
62
+ };
63
+ return Object.assign(e.elements.popper.style, o.popper), e.styles = o, e.elements.arrow && Object.assign(e.elements.arrow.style, o.arrow), function() {
64
+ Object.keys(e.elements).forEach(function(n) {
65
+ var a = e.elements[n], i = e.attributes[n] || {}, c = Object.keys(e.styles.hasOwnProperty(n) ? e.styles[n] : o[n]), p = c.reduce(function(s, f) {
66
+ return s[f] = "", s;
67
+ }, {});
68
+ !q(a) || !ee(a) || (Object.assign(a.style, p), Object.keys(i).forEach(function(s) {
69
+ a.removeAttribute(s);
70
+ }));
71
+ });
72
+ };
73
+ }
74
+ const No = {
75
+ name: "applyStyles",
76
+ enabled: !0,
77
+ phase: "write",
78
+ fn: So,
79
+ effect: Bo,
80
+ requires: ["computeStyles"]
81
+ };
82
+ function _(t) {
83
+ return t.split("-")[0];
84
+ }
85
+ var fe = Math.max, Ze = Math.min, xe = Math.round;
86
+ function st() {
87
+ var t = navigator.userAgentData;
88
+ return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
89
+ return e.brand + "/" + e.version;
90
+ }).join(" ") : navigator.userAgent;
91
+ }
92
+ function Qt() {
93
+ return !/^((?!chrome|android).)*safari/i.test(st());
94
+ }
95
+ function Te(t, e, o) {
96
+ e === void 0 && (e = !1), o === void 0 && (o = !1);
97
+ var n = t.getBoundingClientRect(), a = 1, i = 1;
98
+ e && q(t) && (a = t.offsetWidth > 0 && xe(n.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && xe(n.height) / t.offsetHeight || 1);
99
+ var c = ue(t) ? V(t) : window, p = c.visualViewport, s = !Qt() && o, f = (n.left + (s && p ? p.offsetLeft : 0)) / a, l = (n.top + (s && p ? p.offsetTop : 0)) / i, g = n.width / a, x = n.height / i;
100
+ return {
101
+ width: g,
102
+ height: x,
103
+ top: l,
104
+ right: f + g,
105
+ bottom: l + x,
106
+ left: f,
107
+ x: f,
108
+ y: l
109
+ };
110
+ }
111
+ function ut(t) {
112
+ var e = Te(t), o = t.offsetWidth, n = t.offsetHeight;
113
+ return Math.abs(e.width - o) <= 1 && (o = e.width), Math.abs(e.height - n) <= 1 && (n = e.height), {
114
+ x: t.offsetLeft,
115
+ y: t.offsetTop,
116
+ width: o,
117
+ height: n
118
+ };
119
+ }
120
+ function Zt(t, e) {
121
+ var o = e.getRootNode && e.getRootNode();
122
+ if (t.contains(e))
123
+ return !0;
124
+ if (o && ft(o)) {
125
+ var n = e;
126
+ do {
127
+ if (n && t.isSameNode(n))
128
+ return !0;
129
+ n = n.parentNode || n.host;
130
+ } while (n);
131
+ }
132
+ return !1;
133
+ }
134
+ function ne(t) {
135
+ return V(t).getComputedStyle(t);
136
+ }
137
+ function Lo(t) {
138
+ return ["table", "td", "th"].indexOf(ee(t)) >= 0;
139
+ }
140
+ function se(t) {
141
+ return ((ue(t) ? t.ownerDocument : (
142
+ // $FlowFixMe[prop-missing]
143
+ t.document
144
+ )) || window.document).documentElement;
145
+ }
146
+ function tt(t) {
147
+ return ee(t) === "html" ? t : (
148
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
149
+ // $FlowFixMe[incompatible-return]
150
+ // $FlowFixMe[prop-missing]
151
+ t.assignedSlot || // step into the shadow DOM of the parent of a slotted node
152
+ t.parentNode || // DOM Element detected
153
+ (ft(t) ? t.host : null) || // ShadowRoot detected
154
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
155
+ se(t)
156
+ );
157
+ }
158
+ function Dt(t) {
159
+ return !q(t) || // https://github.com/popperjs/popper-core/issues/837
160
+ ne(t).position === "fixed" ? null : t.offsetParent;
161
+ }
162
+ function ko(t) {
163
+ var e = /firefox/i.test(st()), o = /Trident/i.test(st());
164
+ if (o && q(t)) {
165
+ var n = ne(t);
166
+ if (n.position === "fixed")
167
+ return null;
168
+ }
169
+ var a = tt(t);
170
+ for (ft(a) && (a = a.host); q(a) && ["html", "body"].indexOf(ee(a)) < 0; ) {
171
+ var i = ne(a);
172
+ if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || e && i.willChange === "filter" || e && i.filter && i.filter !== "none")
173
+ return a;
174
+ a = a.parentNode;
175
+ }
176
+ return null;
177
+ }
178
+ function Ve(t) {
179
+ for (var e = V(t), o = Dt(t); o && Lo(o) && ne(o).position === "static"; )
180
+ o = Dt(o);
181
+ return o && (ee(o) === "html" || ee(o) === "body" && ne(o).position === "static") ? e : o || ko(t) || e;
182
+ }
183
+ function dt(t) {
184
+ return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
185
+ }
186
+ function Ne(t, e, o) {
187
+ return fe(t, Ze(e, o));
188
+ }
189
+ function Wo(t, e, o) {
190
+ var n = Ne(t, e, o);
191
+ return n > o ? o : n;
192
+ }
193
+ function _t() {
194
+ return {
195
+ top: 0,
196
+ right: 0,
197
+ bottom: 0,
198
+ left: 0
199
+ };
200
+ }
201
+ function eo(t) {
202
+ return Object.assign({}, _t(), t);
203
+ }
204
+ function to(t, e) {
205
+ return e.reduce(function(o, n) {
206
+ return o[n] = t, o;
207
+ }, {});
208
+ }
209
+ var Io = function(e, o) {
210
+ return e = typeof e == "function" ? e(Object.assign({}, o.rects, {
211
+ placement: o.placement
212
+ })) : e, eo(typeof e != "number" ? e : to(e, Ie));
213
+ };
214
+ function Vo(t) {
215
+ var e, o = t.state, n = t.name, a = t.options, i = o.elements.arrow, c = o.modifiersData.popperOffsets, p = _(o.placement), s = dt(p), f = [I, Y].indexOf(p) >= 0, l = f ? "height" : "width";
216
+ if (!(!i || !c)) {
217
+ var g = Io(a.padding, o), x = ut(i), u = s === "y" ? W : I, T = s === "y" ? z : Y, v = o.rects.reference[l] + o.rects.reference[s] - c[s] - o.rects.popper[l], m = c[s] - o.rects.reference[s], w = Ve(i), E = w ? s === "y" ? w.clientHeight || 0 : w.clientWidth || 0 : 0, O = v / 2 - m / 2, d = g[u], b = E - x[l] - g[T], y = E / 2 - x[l] / 2 + O, R = Ne(d, y, b), D = s;
218
+ o.modifiersData[n] = (e = {}, e[D] = R, e.centerOffset = R - y, e);
219
+ }
220
+ }
221
+ function Ho(t) {
222
+ var e = t.state, o = t.options, n = o.element, a = n === void 0 ? "[data-popper-arrow]" : n;
223
+ a != null && (typeof a == "string" && (a = e.elements.popper.querySelector(a), !a) || Zt(e.elements.popper, a) && (e.elements.arrow = a));
224
+ }
225
+ const Uo = {
226
+ name: "arrow",
227
+ enabled: !0,
228
+ phase: "main",
229
+ fn: Vo,
230
+ effect: Ho,
231
+ requires: ["popperOffsets"],
232
+ requiresIfExists: ["preventOverflow"]
233
+ };
234
+ function Pe(t) {
235
+ return t.split("-")[1];
236
+ }
237
+ var Fo = {
238
+ top: "auto",
239
+ right: "auto",
240
+ bottom: "auto",
241
+ left: "auto"
242
+ };
243
+ function qo(t, e) {
244
+ var o = t.x, n = t.y, a = e.devicePixelRatio || 1;
245
+ return {
246
+ x: xe(o * a) / a || 0,
247
+ y: xe(n * a) / a || 0
248
+ };
249
+ }
250
+ function St(t) {
251
+ var e, o = t.popper, n = t.popperRect, a = t.placement, i = t.variation, c = t.offsets, p = t.position, s = t.gpuAcceleration, f = t.adaptive, l = t.roundOffsets, g = t.isFixed, x = c.x, u = x === void 0 ? 0 : x, T = c.y, v = T === void 0 ? 0 : T, m = typeof l == "function" ? l({
252
+ x: u,
253
+ y: v
254
+ }) : {
255
+ x: u,
256
+ y: v
257
+ };
258
+ u = m.x, v = m.y;
259
+ var w = c.hasOwnProperty("x"), E = c.hasOwnProperty("y"), O = I, d = W, b = window;
260
+ if (f) {
261
+ var y = Ve(o), R = "clientHeight", D = "clientWidth";
262
+ if (y === V(o) && (y = se(o), ne(y).position !== "static" && p === "absolute" && (R = "scrollHeight", D = "scrollWidth")), y = y, a === W || (a === I || a === Y) && i === ke) {
263
+ d = z;
264
+ var A = g && y === b && b.visualViewport ? b.visualViewport.height : (
265
+ // $FlowFixMe[prop-missing]
266
+ y[R]
267
+ );
268
+ v -= A - n.height, v *= s ? 1 : -1;
269
+ }
270
+ if (a === I || (a === W || a === z) && i === ke) {
271
+ O = Y;
272
+ var P = g && y === b && b.visualViewport ? b.visualViewport.width : (
273
+ // $FlowFixMe[prop-missing]
274
+ y[D]
275
+ );
276
+ u -= P - n.width, u *= s ? 1 : -1;
277
+ }
278
+ }
279
+ var M = Object.assign({
280
+ position: p
281
+ }, f && Fo), N = l === !0 ? qo({
282
+ x: u,
283
+ y: v
284
+ }, V(o)) : {
285
+ x: u,
286
+ y: v
287
+ };
288
+ if (u = N.x, v = N.y, s) {
289
+ var j;
290
+ return Object.assign({}, M, (j = {}, j[d] = E ? "0" : "", j[O] = w ? "0" : "", j.transform = (b.devicePixelRatio || 1) <= 1 ? "translate(" + u + "px, " + v + "px)" : "translate3d(" + u + "px, " + v + "px, 0)", j));
291
+ }
292
+ return Object.assign({}, M, (e = {}, e[d] = E ? v + "px" : "", e[O] = w ? u + "px" : "", e.transform = "", e));
293
+ }
294
+ function zo(t) {
295
+ var e = t.state, o = t.options, n = o.gpuAcceleration, a = n === void 0 ? !0 : n, i = o.adaptive, c = i === void 0 ? !0 : i, p = o.roundOffsets, s = p === void 0 ? !0 : p, f = {
296
+ placement: _(e.placement),
297
+ variation: Pe(e.placement),
298
+ popper: e.elements.popper,
299
+ popperRect: e.rects.popper,
300
+ gpuAcceleration: a,
301
+ isFixed: e.options.strategy === "fixed"
302
+ };
303
+ e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, St(Object.assign({}, f, {
304
+ offsets: e.modifiersData.popperOffsets,
305
+ position: e.options.strategy,
306
+ adaptive: c,
307
+ roundOffsets: s
308
+ })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, St(Object.assign({}, f, {
309
+ offsets: e.modifiersData.arrow,
310
+ position: "absolute",
311
+ adaptive: !1,
312
+ roundOffsets: s
313
+ })))), e.attributes.popper = Object.assign({}, e.attributes.popper, {
314
+ "data-popper-placement": e.placement
315
+ });
316
+ }
317
+ const Yo = {
318
+ name: "computeStyles",
319
+ enabled: !0,
320
+ phase: "beforeWrite",
321
+ fn: zo,
322
+ data: {}
323
+ };
324
+ var Xe = {
325
+ passive: !0
326
+ };
327
+ function Xo(t) {
328
+ var e = t.state, o = t.instance, n = t.options, a = n.scroll, i = a === void 0 ? !0 : a, c = n.resize, p = c === void 0 ? !0 : c, s = V(e.elements.popper), f = [].concat(e.scrollParents.reference, e.scrollParents.popper);
329
+ return i && f.forEach(function(l) {
330
+ l.addEventListener("scroll", o.update, Xe);
331
+ }), p && s.addEventListener("resize", o.update, Xe), function() {
332
+ i && f.forEach(function(l) {
333
+ l.removeEventListener("scroll", o.update, Xe);
334
+ }), p && s.removeEventListener("resize", o.update, Xe);
335
+ };
336
+ }
337
+ const Go = {
338
+ name: "eventListeners",
339
+ enabled: !0,
340
+ phase: "write",
341
+ fn: function() {
342
+ },
343
+ effect: Xo,
344
+ data: {}
345
+ };
346
+ var Ko = {
347
+ left: "right",
348
+ right: "left",
349
+ bottom: "top",
350
+ top: "bottom"
351
+ };
352
+ function Je(t) {
353
+ return t.replace(/left|right|bottom|top/g, function(e) {
354
+ return Ko[e];
355
+ });
356
+ }
357
+ var Jo = {
358
+ start: "end",
359
+ end: "start"
360
+ };
361
+ function Bt(t) {
362
+ return t.replace(/start|end/g, function(e) {
363
+ return Jo[e];
364
+ });
365
+ }
366
+ function vt(t) {
367
+ var e = V(t), o = e.pageXOffset, n = e.pageYOffset;
368
+ return {
369
+ scrollLeft: o,
370
+ scrollTop: n
371
+ };
372
+ }
373
+ function mt(t) {
374
+ return Te(se(t)).left + vt(t).scrollLeft;
375
+ }
376
+ function Qo(t, e) {
377
+ var o = V(t), n = se(t), a = o.visualViewport, i = n.clientWidth, c = n.clientHeight, p = 0, s = 0;
378
+ if (a) {
379
+ i = a.width, c = a.height;
380
+ var f = Qt();
381
+ (f || !f && e === "fixed") && (p = a.offsetLeft, s = a.offsetTop);
382
+ }
383
+ return {
384
+ width: i,
385
+ height: c,
386
+ x: p + mt(t),
387
+ y: s
388
+ };
389
+ }
390
+ function Zo(t) {
391
+ var e, o = se(t), n = vt(t), a = (e = t.ownerDocument) == null ? void 0 : e.body, i = fe(o.scrollWidth, o.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), c = fe(o.scrollHeight, o.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), p = -n.scrollLeft + mt(t), s = -n.scrollTop;
392
+ return ne(a || o).direction === "rtl" && (p += fe(o.clientWidth, a ? a.clientWidth : 0) - i), {
393
+ width: i,
394
+ height: c,
395
+ x: p,
396
+ y: s
397
+ };
398
+ }
399
+ function ht(t) {
400
+ var e = ne(t), o = e.overflow, n = e.overflowX, a = e.overflowY;
401
+ return /auto|scroll|overlay|hidden/.test(o + a + n);
402
+ }
403
+ function oo(t) {
404
+ return ["html", "body", "#document"].indexOf(ee(t)) >= 0 ? t.ownerDocument.body : q(t) && ht(t) ? t : oo(tt(t));
405
+ }
406
+ function Le(t, e) {
407
+ var o;
408
+ e === void 0 && (e = []);
409
+ var n = oo(t), a = n === ((o = t.ownerDocument) == null ? void 0 : o.body), i = V(n), c = a ? [i].concat(i.visualViewport || [], ht(n) ? n : []) : n, p = e.concat(c);
410
+ return a ? p : (
411
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
412
+ p.concat(Le(tt(c)))
413
+ );
414
+ }
415
+ function pt(t) {
416
+ return Object.assign({}, t, {
417
+ left: t.x,
418
+ top: t.y,
419
+ right: t.x + t.width,
420
+ bottom: t.y + t.height
421
+ });
422
+ }
423
+ function _o(t, e) {
424
+ var o = Te(t, !1, e === "fixed");
425
+ return o.top = o.top + t.clientTop, o.left = o.left + t.clientLeft, o.bottom = o.top + t.clientHeight, o.right = o.left + t.clientWidth, o.width = t.clientWidth, o.height = t.clientHeight, o.x = o.left, o.y = o.top, o;
426
+ }
427
+ function Nt(t, e, o) {
428
+ return e === Kt ? pt(Qo(t, o)) : ue(e) ? _o(e, o) : pt(Zo(se(t)));
429
+ }
430
+ function er(t) {
431
+ var e = Le(tt(t)), o = ["absolute", "fixed"].indexOf(ne(t).position) >= 0, n = o && q(t) ? Ve(t) : t;
432
+ return ue(n) ? e.filter(function(a) {
433
+ return ue(a) && Zt(a, n) && ee(a) !== "body";
434
+ }) : [];
435
+ }
436
+ function tr(t, e, o, n) {
437
+ var a = e === "clippingParents" ? er(t) : [].concat(e), i = [].concat(a, [o]), c = i[0], p = i.reduce(function(s, f) {
438
+ var l = Nt(t, f, n);
439
+ return s.top = fe(l.top, s.top), s.right = Ze(l.right, s.right), s.bottom = Ze(l.bottom, s.bottom), s.left = fe(l.left, s.left), s;
440
+ }, Nt(t, c, n));
441
+ return p.width = p.right - p.left, p.height = p.bottom - p.top, p.x = p.left, p.y = p.top, p;
442
+ }
443
+ function ro(t) {
444
+ var e = t.reference, o = t.element, n = t.placement, a = n ? _(n) : null, i = n ? Pe(n) : null, c = e.x + e.width / 2 - o.width / 2, p = e.y + e.height / 2 - o.height / 2, s;
445
+ switch (a) {
446
+ case W:
447
+ s = {
448
+ x: c,
449
+ y: e.y - o.height
450
+ };
451
+ break;
452
+ case z:
453
+ s = {
454
+ x: c,
455
+ y: e.y + e.height
456
+ };
457
+ break;
458
+ case Y:
459
+ s = {
460
+ x: e.x + e.width,
461
+ y: p
462
+ };
463
+ break;
464
+ case I:
465
+ s = {
466
+ x: e.x - o.width,
467
+ y: p
468
+ };
469
+ break;
470
+ default:
471
+ s = {
472
+ x: e.x,
473
+ y: e.y
474
+ };
475
+ }
476
+ var f = a ? dt(a) : null;
477
+ if (f != null) {
478
+ var l = f === "y" ? "height" : "width";
479
+ switch (i) {
480
+ case Oe:
481
+ s[f] = s[f] - (e[l] / 2 - o[l] / 2);
482
+ break;
483
+ case ke:
484
+ s[f] = s[f] + (e[l] / 2 - o[l] / 2);
485
+ break;
486
+ }
487
+ }
488
+ return s;
489
+ }
490
+ function We(t, e) {
491
+ e === void 0 && (e = {});
492
+ var o = e, n = o.placement, a = n === void 0 ? t.placement : n, i = o.strategy, c = i === void 0 ? t.strategy : i, p = o.boundary, s = p === void 0 ? Oo : p, f = o.rootBoundary, l = f === void 0 ? Kt : f, g = o.elementContext, x = g === void 0 ? Se : g, u = o.altBoundary, T = u === void 0 ? !1 : u, v = o.padding, m = v === void 0 ? 0 : v, w = eo(typeof m != "number" ? m : to(m, Ie)), E = x === Se ? xo : Se, O = t.rects.popper, d = t.elements[T ? E : x], b = tr(ue(d) ? d : d.contextElement || se(t.elements.popper), s, l, c), y = Te(t.elements.reference), R = ro({
493
+ reference: y,
494
+ element: O,
495
+ strategy: "absolute",
496
+ placement: a
497
+ }), D = pt(Object.assign({}, O, R)), A = x === Se ? D : y, P = {
498
+ top: b.top - A.top + w.top,
499
+ bottom: A.bottom - b.bottom + w.bottom,
500
+ left: b.left - A.left + w.left,
501
+ right: A.right - b.right + w.right
502
+ }, M = t.modifiersData.offset;
503
+ if (x === Se && M) {
504
+ var N = M[a];
505
+ Object.keys(P).forEach(function(j) {
506
+ var X = [Y, z].indexOf(j) >= 0 ? 1 : -1, G = [W, z].indexOf(j) >= 0 ? "y" : "x";
507
+ P[j] += N[G] * X;
508
+ });
509
+ }
510
+ return P;
511
+ }
512
+ function or(t, e) {
513
+ e === void 0 && (e = {});
514
+ var o = e, n = o.placement, a = o.boundary, i = o.rootBoundary, c = o.padding, p = o.flipVariations, s = o.allowedAutoPlacements, f = s === void 0 ? Jt : s, l = Pe(n), g = l ? p ? $t : $t.filter(function(T) {
515
+ return Pe(T) === l;
516
+ }) : Ie, x = g.filter(function(T) {
517
+ return f.indexOf(T) >= 0;
518
+ });
519
+ x.length === 0 && (x = g);
520
+ var u = x.reduce(function(T, v) {
521
+ return T[v] = We(t, {
522
+ placement: v,
523
+ boundary: a,
524
+ rootBoundary: i,
525
+ padding: c
526
+ })[_(v)], T;
527
+ }, {});
528
+ return Object.keys(u).sort(function(T, v) {
529
+ return u[T] - u[v];
530
+ });
531
+ }
532
+ function rr(t) {
533
+ if (_(t) === ct)
534
+ return [];
535
+ var e = Je(t);
536
+ return [Bt(t), e, Bt(e)];
537
+ }
538
+ function nr(t) {
539
+ var e = t.state, o = t.options, n = t.name;
540
+ if (!e.modifiersData[n]._skip) {
541
+ for (var a = o.mainAxis, i = a === void 0 ? !0 : a, c = o.altAxis, p = c === void 0 ? !0 : c, s = o.fallbackPlacements, f = o.padding, l = o.boundary, g = o.rootBoundary, x = o.altBoundary, u = o.flipVariations, T = u === void 0 ? !0 : u, v = o.allowedAutoPlacements, m = e.options.placement, w = _(m), E = w === m, O = s || (E || !T ? [Je(m)] : rr(m)), d = [m].concat(O).reduce(function(K, H) {
542
+ return K.concat(_(H) === ct ? or(e, {
543
+ placement: H,
544
+ boundary: l,
545
+ rootBoundary: g,
546
+ padding: f,
547
+ flipVariations: T,
548
+ allowedAutoPlacements: v
549
+ }) : H);
550
+ }, []), b = e.rects.reference, y = e.rects.popper, R = /* @__PURE__ */ new Map(), D = !0, A = d[0], P = 0; P < d.length; P++) {
551
+ var M = d[P], N = _(M), j = Pe(M) === Oe, X = [W, z].indexOf(N) >= 0, G = X ? "width" : "height", S = We(e, {
552
+ placement: M,
553
+ boundary: l,
554
+ rootBoundary: g,
555
+ altBoundary: x,
556
+ padding: f
557
+ }), $ = X ? j ? Y : I : j ? z : W;
558
+ b[G] > y[G] && ($ = Je($));
559
+ var k = Je($), te = [];
560
+ if (i && te.push(S[N] <= 0), p && te.push(S[$] <= 0, S[k] <= 0), te.every(function(K) {
561
+ return K;
562
+ })) {
563
+ A = M, D = !1;
564
+ break;
565
+ }
566
+ R.set(M, te);
567
+ }
568
+ if (D)
569
+ for (var L = T ? 3 : 1, de = function(H) {
570
+ var ae = d.find(function(ie) {
571
+ var U = R.get(ie);
572
+ if (U)
573
+ return U.slice(0, H).every(function(me) {
574
+ return me;
575
+ });
576
+ });
577
+ if (ae)
578
+ return A = ae, "break";
579
+ }, oe = L; oe > 0; oe--) {
580
+ var ve = de(oe);
581
+ if (ve === "break") break;
582
+ }
583
+ e.placement !== A && (e.modifiersData[n]._skip = !0, e.placement = A, e.reset = !0);
584
+ }
585
+ }
586
+ const ar = {
587
+ name: "flip",
588
+ enabled: !0,
589
+ phase: "main",
590
+ fn: nr,
591
+ requiresIfExists: ["offset"],
592
+ data: {
593
+ _skip: !1
594
+ }
595
+ };
596
+ function Lt(t, e, o) {
597
+ return o === void 0 && (o = {
598
+ x: 0,
599
+ y: 0
600
+ }), {
601
+ top: t.top - e.height - o.y,
602
+ right: t.right - e.width + o.x,
603
+ bottom: t.bottom - e.height + o.y,
604
+ left: t.left - e.width - o.x
605
+ };
606
+ }
607
+ function kt(t) {
608
+ return [W, Y, z, I].some(function(e) {
609
+ return t[e] >= 0;
610
+ });
611
+ }
612
+ function ir(t) {
613
+ var e = t.state, o = t.name, n = e.rects.reference, a = e.rects.popper, i = e.modifiersData.preventOverflow, c = We(e, {
614
+ elementContext: "reference"
615
+ }), p = We(e, {
616
+ altBoundary: !0
617
+ }), s = Lt(c, n), f = Lt(p, a, i), l = kt(s), g = kt(f);
618
+ e.modifiersData[o] = {
619
+ referenceClippingOffsets: s,
620
+ popperEscapeOffsets: f,
621
+ isReferenceHidden: l,
622
+ hasPopperEscaped: g
623
+ }, e.attributes.popper = Object.assign({}, e.attributes.popper, {
624
+ "data-popper-reference-hidden": l,
625
+ "data-popper-escaped": g
626
+ });
627
+ }
628
+ const sr = {
629
+ name: "hide",
630
+ enabled: !0,
631
+ phase: "main",
632
+ requiresIfExists: ["preventOverflow"],
633
+ fn: ir
634
+ };
635
+ function pr(t, e, o) {
636
+ var n = _(t), a = [I, W].indexOf(n) >= 0 ? -1 : 1, i = typeof o == "function" ? o(Object.assign({}, e, {
637
+ placement: t
638
+ })) : o, c = i[0], p = i[1];
639
+ return c = c || 0, p = (p || 0) * a, [I, Y].indexOf(n) >= 0 ? {
640
+ x: p,
641
+ y: c
642
+ } : {
643
+ x: c,
644
+ y: p
645
+ };
646
+ }
647
+ function lr(t) {
648
+ var e = t.state, o = t.options, n = t.name, a = o.offset, i = a === void 0 ? [0, 0] : a, c = Jt.reduce(function(l, g) {
649
+ return l[g] = pr(g, e.rects, i), l;
650
+ }, {}), p = c[e.placement], s = p.x, f = p.y;
651
+ e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += s, e.modifiersData.popperOffsets.y += f), e.modifiersData[n] = c;
652
+ }
653
+ const cr = {
654
+ name: "offset",
655
+ enabled: !0,
656
+ phase: "main",
657
+ requires: ["popperOffsets"],
658
+ fn: lr
659
+ };
660
+ function fr(t) {
661
+ var e = t.state, o = t.name;
662
+ e.modifiersData[o] = ro({
663
+ reference: e.rects.reference,
664
+ element: e.rects.popper,
665
+ strategy: "absolute",
666
+ placement: e.placement
667
+ });
668
+ }
669
+ const ur = {
670
+ name: "popperOffsets",
671
+ enabled: !0,
672
+ phase: "read",
673
+ fn: fr,
674
+ data: {}
675
+ };
676
+ function dr(t) {
677
+ return t === "x" ? "y" : "x";
678
+ }
679
+ function vr(t) {
680
+ var e = t.state, o = t.options, n = t.name, a = o.mainAxis, i = a === void 0 ? !0 : a, c = o.altAxis, p = c === void 0 ? !1 : c, s = o.boundary, f = o.rootBoundary, l = o.altBoundary, g = o.padding, x = o.tether, u = x === void 0 ? !0 : x, T = o.tetherOffset, v = T === void 0 ? 0 : T, m = We(e, {
681
+ boundary: s,
682
+ rootBoundary: f,
683
+ padding: g,
684
+ altBoundary: l
685
+ }), w = _(e.placement), E = Pe(e.placement), O = !E, d = dt(w), b = dr(d), y = e.modifiersData.popperOffsets, R = e.rects.reference, D = e.rects.popper, A = typeof v == "function" ? v(Object.assign({}, e.rects, {
686
+ placement: e.placement
687
+ })) : v, P = typeof A == "number" ? {
688
+ mainAxis: A,
689
+ altAxis: A
690
+ } : Object.assign({
691
+ mainAxis: 0,
692
+ altAxis: 0
693
+ }, A), M = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, N = {
694
+ x: 0,
695
+ y: 0
696
+ };
697
+ if (y) {
698
+ if (i) {
699
+ var j, X = d === "y" ? W : I, G = d === "y" ? z : Y, S = d === "y" ? "height" : "width", $ = y[d], k = $ + m[X], te = $ - m[G], L = u ? -D[S] / 2 : 0, de = E === Oe ? R[S] : D[S], oe = E === Oe ? -D[S] : -R[S], ve = e.elements.arrow, K = u && ve ? ut(ve) : {
700
+ width: 0,
701
+ height: 0
702
+ }, H = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : _t(), ae = H[X], ie = H[G], U = Ne(0, R[S], K[S]), me = O ? R[S] / 2 - L - U - ae - P.mainAxis : de - U - ae - P.mainAxis, rt = O ? -R[S] / 2 + L + U + ie + P.mainAxis : oe + U + ie + P.mainAxis, he = e.elements.arrow && Ve(e.elements.arrow), J = he ? d === "y" ? he.clientTop || 0 : he.clientLeft || 0 : 0, ge = (j = M == null ? void 0 : M[d]) != null ? j : 0, pe = $ + me - ge - J, be = $ + rt - ge, Ee = Ne(u ? Ze(k, pe) : k, $, u ? fe(te, be) : te);
703
+ y[d] = Ee, N[d] = Ee - $;
704
+ }
705
+ if (p) {
706
+ var le, ye = d === "x" ? W : I, Re = d === "x" ? z : Y, Z = y[b], ce = b === "y" ? "height" : "width", Ae = Z + m[ye], Ce = Z - m[Re], Me = [W, I].indexOf(w) !== -1, He = (le = M == null ? void 0 : M[b]) != null ? le : 0, Ue = Me ? Ae : Z - R[ce] - D[ce] - He + P.altAxis, we = Me ? Z + R[ce] + D[ce] - He - P.altAxis : Ce, Fe = u && Me ? Wo(Ue, Z, we) : Ne(u ? Ue : Ae, Z, u ? we : Ce);
707
+ y[b] = Fe, N[b] = Fe - Z;
708
+ }
709
+ e.modifiersData[n] = N;
710
+ }
711
+ }
712
+ const mr = {
713
+ name: "preventOverflow",
714
+ enabled: !0,
715
+ phase: "main",
716
+ fn: vr,
717
+ requiresIfExists: ["offset"]
718
+ };
719
+ function hr(t) {
720
+ return {
721
+ scrollLeft: t.scrollLeft,
722
+ scrollTop: t.scrollTop
723
+ };
724
+ }
725
+ function gr(t) {
726
+ return t === V(t) || !q(t) ? vt(t) : hr(t);
727
+ }
728
+ function br(t) {
729
+ var e = t.getBoundingClientRect(), o = xe(e.width) / t.offsetWidth || 1, n = xe(e.height) / t.offsetHeight || 1;
730
+ return o !== 1 || n !== 1;
731
+ }
732
+ function yr(t, e, o) {
733
+ o === void 0 && (o = !1);
734
+ var n = q(e), a = q(e) && br(e), i = se(e), c = Te(t, a, o), p = {
735
+ scrollLeft: 0,
736
+ scrollTop: 0
737
+ }, s = {
738
+ x: 0,
739
+ y: 0
740
+ };
741
+ return (n || !n && !o) && ((ee(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
742
+ ht(i)) && (p = gr(e)), q(e) ? (s = Te(e, !0), s.x += e.clientLeft, s.y += e.clientTop) : i && (s.x = mt(i))), {
743
+ x: c.left + p.scrollLeft - s.x,
744
+ y: c.top + p.scrollTop - s.y,
745
+ width: c.width,
746
+ height: c.height
747
+ };
748
+ }
749
+ function wr(t) {
750
+ var e = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), n = [];
751
+ t.forEach(function(i) {
752
+ e.set(i.name, i);
753
+ });
754
+ function a(i) {
755
+ o.add(i.name);
756
+ var c = [].concat(i.requires || [], i.requiresIfExists || []);
757
+ c.forEach(function(p) {
758
+ if (!o.has(p)) {
759
+ var s = e.get(p);
760
+ s && a(s);
761
+ }
762
+ }), n.push(i);
763
+ }
764
+ return t.forEach(function(i) {
765
+ o.has(i.name) || a(i);
766
+ }), n;
767
+ }
768
+ function Or(t) {
769
+ var e = wr(t);
770
+ return Do.reduce(function(o, n) {
771
+ return o.concat(e.filter(function(a) {
772
+ return a.phase === n;
773
+ }));
774
+ }, []);
775
+ }
776
+ function xr(t) {
777
+ var e;
778
+ return function() {
779
+ return e || (e = new Promise(function(o) {
780
+ Promise.resolve().then(function() {
781
+ e = void 0, o(t());
782
+ });
783
+ })), e;
784
+ };
785
+ }
786
+ function Tr(t) {
787
+ var e = t.reduce(function(o, n) {
788
+ var a = o[n.name];
789
+ return o[n.name] = a ? Object.assign({}, a, n, {
790
+ options: Object.assign({}, a.options, n.options),
791
+ data: Object.assign({}, a.data, n.data)
792
+ }) : n, o;
793
+ }, {});
794
+ return Object.keys(e).map(function(o) {
795
+ return e[o];
796
+ });
797
+ }
798
+ var Wt = {
799
+ placement: "bottom",
800
+ modifiers: [],
801
+ strategy: "absolute"
802
+ };
803
+ function It() {
804
+ for (var t = arguments.length, e = new Array(t), o = 0; o < t; o++)
805
+ e[o] = arguments[o];
806
+ return !e.some(function(n) {
807
+ return !(n && typeof n.getBoundingClientRect == "function");
808
+ });
809
+ }
810
+ function Pr(t) {
811
+ t === void 0 && (t = {});
812
+ var e = t, o = e.defaultModifiers, n = o === void 0 ? [] : o, a = e.defaultOptions, i = a === void 0 ? Wt : a;
813
+ return function(p, s, f) {
814
+ f === void 0 && (f = i);
815
+ var l = {
816
+ placement: "bottom",
817
+ orderedModifiers: [],
818
+ options: Object.assign({}, Wt, i),
819
+ modifiersData: {},
820
+ elements: {
821
+ reference: p,
822
+ popper: s
823
+ },
824
+ attributes: {},
825
+ styles: {}
826
+ }, g = [], x = !1, u = {
827
+ state: l,
828
+ setOptions: function(w) {
829
+ var E = typeof w == "function" ? w(l.options) : w;
830
+ v(), l.options = Object.assign({}, i, l.options, E), l.scrollParents = {
831
+ reference: ue(p) ? Le(p) : p.contextElement ? Le(p.contextElement) : [],
832
+ popper: Le(s)
833
+ };
834
+ var O = Or(Tr([].concat(n, l.options.modifiers)));
835
+ return l.orderedModifiers = O.filter(function(d) {
836
+ return d.enabled;
837
+ }), T(), u.update();
838
+ },
839
+ // Sync update – it will always be executed, even if not necessary. This
840
+ // is useful for low frequency updates where sync behavior simplifies the
841
+ // logic.
842
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
843
+ // prefer the async Popper#update method
844
+ forceUpdate: function() {
845
+ if (!x) {
846
+ var w = l.elements, E = w.reference, O = w.popper;
847
+ if (It(E, O)) {
848
+ l.rects = {
849
+ reference: yr(E, Ve(O), l.options.strategy === "fixed"),
850
+ popper: ut(O)
851
+ }, l.reset = !1, l.placement = l.options.placement, l.orderedModifiers.forEach(function(P) {
852
+ return l.modifiersData[P.name] = Object.assign({}, P.data);
853
+ });
854
+ for (var d = 0; d < l.orderedModifiers.length; d++) {
855
+ if (l.reset === !0) {
856
+ l.reset = !1, d = -1;
857
+ continue;
858
+ }
859
+ var b = l.orderedModifiers[d], y = b.fn, R = b.options, D = R === void 0 ? {} : R, A = b.name;
860
+ typeof y == "function" && (l = y({
861
+ state: l,
862
+ options: D,
863
+ name: A,
864
+ instance: u
865
+ }) || l);
866
+ }
867
+ }
868
+ }
869
+ },
870
+ // Async and optimistically optimized update – it will not be executed if
871
+ // not necessary (debounced to run at most once-per-tick)
872
+ update: xr(function() {
873
+ return new Promise(function(m) {
874
+ u.forceUpdate(), m(l);
875
+ });
876
+ }),
877
+ destroy: function() {
878
+ v(), x = !0;
879
+ }
880
+ };
881
+ if (!It(p, s))
882
+ return u;
883
+ u.setOptions(f).then(function(m) {
884
+ !x && f.onFirstUpdate && f.onFirstUpdate(m);
885
+ });
886
+ function T() {
887
+ l.orderedModifiers.forEach(function(m) {
888
+ var w = m.name, E = m.options, O = E === void 0 ? {} : E, d = m.effect;
889
+ if (typeof d == "function") {
890
+ var b = d({
891
+ state: l,
892
+ name: w,
893
+ instance: u,
894
+ options: O
895
+ }), y = function() {
896
+ };
897
+ g.push(b || y);
898
+ }
899
+ });
900
+ }
901
+ function v() {
902
+ g.forEach(function(m) {
903
+ return m();
904
+ }), g = [];
905
+ }
906
+ return u;
907
+ };
908
+ }
909
+ var Er = [Go, ur, Yo, No, cr, ar, mr, Uo, sr], Rr = /* @__PURE__ */ Pr({
910
+ defaultModifiers: Er
911
+ });
912
+ function Ar(t) {
913
+ return Ut("MuiPopper", t);
914
+ }
915
+ Ht("MuiPopper", ["root"]);
916
+ function Cr(t, e) {
917
+ if (e === "ltr")
918
+ return t;
919
+ switch (t) {
920
+ case "bottom-end":
921
+ return "bottom-start";
922
+ case "bottom-start":
923
+ return "bottom-end";
924
+ case "top-end":
925
+ return "top-start";
926
+ case "top-start":
927
+ return "top-end";
928
+ default:
929
+ return t;
930
+ }
931
+ }
932
+ function _e(t) {
933
+ return typeof t == "function" ? t() : t;
934
+ }
935
+ function ot(t) {
936
+ return t.nodeType !== void 0;
937
+ }
938
+ function Mr(t) {
939
+ return !ot(t);
940
+ }
941
+ const jr = (t) => {
942
+ const {
943
+ classes: e
944
+ } = t;
945
+ return Ft({
946
+ root: ["root"]
947
+ }, Ar, e);
948
+ }, $r = {}, Dr = /* @__PURE__ */ C.forwardRef(function(e, o) {
949
+ const {
950
+ anchorEl: n,
951
+ children: a,
952
+ direction: i,
953
+ disablePortal: c,
954
+ modifiers: p,
955
+ open: s,
956
+ placement: f,
957
+ popperOptions: l,
958
+ popperRef: g,
959
+ slotProps: x = {},
960
+ slots: u = {},
961
+ TransitionProps: T,
962
+ // @ts-ignore internal logic
963
+ ownerState: v,
964
+ // prevent from spreading to DOM, it can come from the parent component e.g. Select.
965
+ ...m
966
+ } = e, w = C.useRef(null), E = it(w, o), O = C.useRef(null), d = it(O, g), b = C.useRef(d);
967
+ Ct(() => {
968
+ b.current = d;
969
+ }, [d]), C.useImperativeHandle(g, () => O.current, []);
970
+ const y = Cr(f, i), [R, D] = C.useState(y), [A, P] = C.useState(_e(n));
971
+ C.useEffect(() => {
972
+ O.current && O.current.forceUpdate();
973
+ }), C.useEffect(() => {
974
+ n && P(_e(n));
975
+ }, [n]), Ct(() => {
976
+ if (!A || !s)
977
+ return;
978
+ const G = (k) => {
979
+ D(k.placement);
980
+ };
981
+ if (process.env.NODE_ENV !== "production" && A && ot(A) && A.nodeType === 1) {
982
+ const k = A.getBoundingClientRect();
983
+ process.env.NODE_ENV !== "test" && k.top === 0 && k.left === 0 && k.right === 0 && k.bottom === 0 && console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
984
+ `));
985
+ }
986
+ let S = [{
987
+ name: "preventOverflow",
988
+ options: {
989
+ altBoundary: c
990
+ }
991
+ }, {
992
+ name: "flip",
993
+ options: {
994
+ altBoundary: c
995
+ }
996
+ }, {
997
+ name: "onUpdate",
998
+ enabled: !0,
999
+ phase: "afterWrite",
1000
+ fn: ({
1001
+ state: k
1002
+ }) => {
1003
+ G(k);
1004
+ }
1005
+ }];
1006
+ p != null && (S = S.concat(p)), l && l.modifiers != null && (S = S.concat(l.modifiers));
1007
+ const $ = Rr(A, w.current, {
1008
+ placement: y,
1009
+ ...l,
1010
+ modifiers: S
1011
+ });
1012
+ return b.current($), () => {
1013
+ $.destroy(), b.current(null);
1014
+ };
1015
+ }, [A, c, p, s, l, y]);
1016
+ const M = {
1017
+ placement: R
1018
+ };
1019
+ T !== null && (M.TransitionProps = T);
1020
+ const N = jr(e), j = u.root ?? "div", X = uo({
1021
+ elementType: j,
1022
+ externalSlotProps: x.root,
1023
+ externalForwardedProps: m,
1024
+ additionalProps: {
1025
+ role: "tooltip",
1026
+ ref: E
1027
+ },
1028
+ ownerState: e,
1029
+ className: N.root
1030
+ });
1031
+ return /* @__PURE__ */ re(j, {
1032
+ ...X,
1033
+ children: typeof a == "function" ? a(M) : a
1034
+ });
1035
+ }), no = /* @__PURE__ */ C.forwardRef(function(e, o) {
1036
+ const {
1037
+ anchorEl: n,
1038
+ children: a,
1039
+ container: i,
1040
+ direction: c = "ltr",
1041
+ disablePortal: p = !1,
1042
+ keepMounted: s = !1,
1043
+ modifiers: f,
1044
+ open: l,
1045
+ placement: g = "bottom",
1046
+ popperOptions: x = $r,
1047
+ popperRef: u,
1048
+ style: T,
1049
+ transition: v = !1,
1050
+ slotProps: m = {},
1051
+ slots: w = {},
1052
+ ...E
1053
+ } = e, [O, d] = C.useState(!0), b = () => {
1054
+ d(!1);
1055
+ }, y = () => {
1056
+ d(!0);
1057
+ };
1058
+ if (!s && !l && (!v || O))
1059
+ return null;
1060
+ let R;
1061
+ if (i)
1062
+ R = i;
1063
+ else if (n) {
1064
+ const P = _e(n);
1065
+ R = P && ot(P) ? Rt(P).body : Rt(null).body;
1066
+ }
1067
+ const D = !l && s && (!v || O) ? "none" : void 0, A = v ? {
1068
+ in: l,
1069
+ onEnter: b,
1070
+ onExited: y
1071
+ } : void 0;
1072
+ return /* @__PURE__ */ re(fo, {
1073
+ disablePortal: p,
1074
+ container: R,
1075
+ children: /* @__PURE__ */ re(Dr, {
1076
+ anchorEl: n,
1077
+ direction: c,
1078
+ disablePortal: p,
1079
+ modifiers: f,
1080
+ ref: o,
1081
+ open: v ? !O : l,
1082
+ placement: g,
1083
+ popperOptions: x,
1084
+ popperRef: u,
1085
+ slotProps: m,
1086
+ slots: w,
1087
+ ...E,
1088
+ style: {
1089
+ // Prevents scroll issue, waiting for Popper.js to add this style once initiated.
1090
+ position: "fixed",
1091
+ // Fix Popper.js display issue
1092
+ top: 0,
1093
+ left: 0,
1094
+ display: D,
1095
+ ...T
1096
+ },
1097
+ TransitionProps: A,
1098
+ children: a
1099
+ })
1100
+ });
1101
+ });
1102
+ process.env.NODE_ENV !== "production" && (no.propTypes = {
1103
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
1104
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1105
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
1106
+ // └─────────────────────────────────────────────────────────────────────┘
1107
+ /**
1108
+ * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
1109
+ * or a function that returns either.
1110
+ * It's used to set the position of the popper.
1111
+ * The return value will passed as the reference object of the Popper instance.
1112
+ */
1113
+ anchorEl: yo(r.oneOfType([Qe, r.object, r.func]), (t) => {
1114
+ if (t.open) {
1115
+ const e = _e(t.anchorEl);
1116
+ if (e && ot(e) && e.nodeType === 1) {
1117
+ const o = e.getBoundingClientRect();
1118
+ if (process.env.NODE_ENV !== "test" && o.top === 0 && o.left === 0 && o.right === 0 && o.bottom === 0)
1119
+ return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
1120
+ `));
1121
+ } else if (!e || typeof e.getBoundingClientRect != "function" || Mr(e) && e.contextElement != null && e.contextElement.nodeType !== 1)
1122
+ return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "It should be an HTML element instance or a virtualElement ", "(https://popper.js.org/docs/v2/virtual-elements/)."].join(`
1123
+ `));
1124
+ }
1125
+ return null;
1126
+ }),
1127
+ /**
1128
+ * Popper render function or node.
1129
+ */
1130
+ children: r.oneOfType([r.node, r.func]),
1131
+ /**
1132
+ * An HTML element or function that returns one.
1133
+ * The `container` will have the portal children appended to it.
1134
+ *
1135
+ * You can also provide a callback, which is called in a React layout effect.
1136
+ * This lets you set the container from a ref, and also makes server-side rendering possible.
1137
+ *
1138
+ * By default, it uses the body of the top-level document object,
1139
+ * so it's simply `document.body` most of the time.
1140
+ */
1141
+ container: r.oneOfType([Qe, r.func]),
1142
+ /**
1143
+ * Direction of the text.
1144
+ * @default 'ltr'
1145
+ */
1146
+ direction: r.oneOf(["ltr", "rtl"]),
1147
+ /**
1148
+ * The `children` will be under the DOM hierarchy of the parent component.
1149
+ * @default false
1150
+ */
1151
+ disablePortal: r.bool,
1152
+ /**
1153
+ * Always keep the children in the DOM.
1154
+ * This prop can be useful in SEO situation or
1155
+ * when you want to maximize the responsiveness of the Popper.
1156
+ * @default false
1157
+ */
1158
+ keepMounted: r.bool,
1159
+ /**
1160
+ * Popper.js is based on a "plugin-like" architecture,
1161
+ * most of its features are fully encapsulated "modifiers".
1162
+ *
1163
+ * A modifier is a function that is called each time Popper.js needs to
1164
+ * compute the position of the popper.
1165
+ * For this reason, modifiers should be very performant to avoid bottlenecks.
1166
+ * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
1167
+ */
1168
+ modifiers: r.arrayOf(r.shape({
1169
+ data: r.object,
1170
+ effect: r.func,
1171
+ enabled: r.bool,
1172
+ fn: r.func,
1173
+ name: r.any,
1174
+ options: r.object,
1175
+ phase: r.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]),
1176
+ requires: r.arrayOf(r.string),
1177
+ requiresIfExists: r.arrayOf(r.string)
1178
+ })),
1179
+ /**
1180
+ * If `true`, the component is shown.
1181
+ */
1182
+ open: r.bool.isRequired,
1183
+ /**
1184
+ * Popper placement.
1185
+ * @default 'bottom'
1186
+ */
1187
+ placement: r.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
1188
+ /**
1189
+ * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
1190
+ * @default {}
1191
+ */
1192
+ popperOptions: r.shape({
1193
+ modifiers: r.array,
1194
+ onFirstUpdate: r.func,
1195
+ placement: r.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
1196
+ strategy: r.oneOf(["absolute", "fixed"])
1197
+ }),
1198
+ /**
1199
+ * A ref that points to the used popper instance.
1200
+ */
1201
+ popperRef: Gt,
1202
+ /**
1203
+ * The props used for each slot inside the Popper.
1204
+ * @default {}
1205
+ */
1206
+ slotProps: r.shape({
1207
+ root: r.oneOfType([r.func, r.object])
1208
+ }),
1209
+ /**
1210
+ * The components used for each slot inside the Popper.
1211
+ * Either a string to use a HTML element or a component.
1212
+ * @default {}
1213
+ */
1214
+ slots: r.shape({
1215
+ root: r.elementType
1216
+ }),
1217
+ /**
1218
+ * Help supporting a react-transition-group/Transition component.
1219
+ * @default false
1220
+ */
1221
+ transition: r.bool
1222
+ });
1223
+ const Sr = et(no, {
1224
+ name: "MuiPopper",
1225
+ slot: "Root",
1226
+ overridesResolver: (t, e) => e.root
1227
+ })({}), gt = /* @__PURE__ */ C.forwardRef(function(e, o) {
1228
+ const n = Xt(), a = qt({
1229
+ props: e,
1230
+ name: "MuiPopper"
1231
+ }), {
1232
+ anchorEl: i,
1233
+ component: c,
1234
+ components: p,
1235
+ componentsProps: s,
1236
+ container: f,
1237
+ disablePortal: l,
1238
+ keepMounted: g,
1239
+ modifiers: x,
1240
+ open: u,
1241
+ placement: T,
1242
+ popperOptions: v,
1243
+ popperRef: m,
1244
+ transition: w,
1245
+ slots: E,
1246
+ slotProps: O,
1247
+ ...d
1248
+ } = a, b = (E == null ? void 0 : E.root) ?? (p == null ? void 0 : p.Root), y = {
1249
+ anchorEl: i,
1250
+ container: f,
1251
+ disablePortal: l,
1252
+ keepMounted: g,
1253
+ modifiers: x,
1254
+ open: u,
1255
+ placement: T,
1256
+ popperOptions: v,
1257
+ popperRef: m,
1258
+ transition: w,
1259
+ ...d
1260
+ };
1261
+ return /* @__PURE__ */ re(Sr, {
1262
+ as: c,
1263
+ direction: n ? "rtl" : "ltr",
1264
+ slots: {
1265
+ root: b
1266
+ },
1267
+ slotProps: O ?? s,
1268
+ ...y,
1269
+ ref: o
1270
+ });
1271
+ });
1272
+ process.env.NODE_ENV !== "production" && (gt.propTypes = {
1273
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
1274
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1275
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
1276
+ // └─────────────────────────────────────────────────────────────────────┘
1277
+ /**
1278
+ * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
1279
+ * or a function that returns either.
1280
+ * It's used to set the position of the popper.
1281
+ * The return value will passed as the reference object of the Popper instance.
1282
+ */
1283
+ anchorEl: r.oneOfType([Qe, r.object, r.func]),
1284
+ /**
1285
+ * Popper render function or node.
1286
+ */
1287
+ children: r.oneOfType([r.node, r.func]),
1288
+ /**
1289
+ * The component used for the root node.
1290
+ * Either a string to use a HTML element or a component.
1291
+ */
1292
+ component: r.elementType,
1293
+ /**
1294
+ * The components used for each slot inside the Popper.
1295
+ * Either a string to use a HTML element or a component.
1296
+ *
1297
+ * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
1298
+ * @default {}
1299
+ */
1300
+ components: r.shape({
1301
+ Root: r.elementType
1302
+ }),
1303
+ /**
1304
+ * The props used for each slot inside the Popper.
1305
+ *
1306
+ * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
1307
+ * @default {}
1308
+ */
1309
+ componentsProps: r.shape({
1310
+ root: r.oneOfType([r.func, r.object])
1311
+ }),
1312
+ /**
1313
+ * An HTML element or function that returns one.
1314
+ * The `container` will have the portal children appended to it.
1315
+ *
1316
+ * You can also provide a callback, which is called in a React layout effect.
1317
+ * This lets you set the container from a ref, and also makes server-side rendering possible.
1318
+ *
1319
+ * By default, it uses the body of the top-level document object,
1320
+ * so it's simply `document.body` most of the time.
1321
+ */
1322
+ container: r.oneOfType([Qe, r.func]),
1323
+ /**
1324
+ * The `children` will be under the DOM hierarchy of the parent component.
1325
+ * @default false
1326
+ */
1327
+ disablePortal: r.bool,
1328
+ /**
1329
+ * Always keep the children in the DOM.
1330
+ * This prop can be useful in SEO situation or
1331
+ * when you want to maximize the responsiveness of the Popper.
1332
+ * @default false
1333
+ */
1334
+ keepMounted: r.bool,
1335
+ /**
1336
+ * Popper.js is based on a "plugin-like" architecture,
1337
+ * most of its features are fully encapsulated "modifiers".
1338
+ *
1339
+ * A modifier is a function that is called each time Popper.js needs to
1340
+ * compute the position of the popper.
1341
+ * For this reason, modifiers should be very performant to avoid bottlenecks.
1342
+ * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
1343
+ */
1344
+ modifiers: r.arrayOf(r.shape({
1345
+ data: r.object,
1346
+ effect: r.func,
1347
+ enabled: r.bool,
1348
+ fn: r.func,
1349
+ name: r.any,
1350
+ options: r.object,
1351
+ phase: r.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]),
1352
+ requires: r.arrayOf(r.string),
1353
+ requiresIfExists: r.arrayOf(r.string)
1354
+ })),
1355
+ /**
1356
+ * If `true`, the component is shown.
1357
+ */
1358
+ open: r.bool.isRequired,
1359
+ /**
1360
+ * Popper placement.
1361
+ * @default 'bottom'
1362
+ */
1363
+ placement: r.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
1364
+ /**
1365
+ * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
1366
+ * @default {}
1367
+ */
1368
+ popperOptions: r.shape({
1369
+ modifiers: r.array,
1370
+ onFirstUpdate: r.func,
1371
+ placement: r.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
1372
+ strategy: r.oneOf(["absolute", "fixed"])
1373
+ }),
1374
+ /**
1375
+ * A ref that points to the used popper instance.
1376
+ */
1377
+ popperRef: Gt,
1378
+ /**
1379
+ * The props used for each slot inside the Popper.
1380
+ * @default {}
1381
+ */
1382
+ slotProps: r.shape({
1383
+ root: r.oneOfType([r.func, r.object])
1384
+ }),
1385
+ /**
1386
+ * The components used for each slot inside the Popper.
1387
+ * Either a string to use a HTML element or a component.
1388
+ * @default {}
1389
+ */
1390
+ slots: r.shape({
1391
+ root: r.elementType
1392
+ }),
1393
+ /**
1394
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1395
+ */
1396
+ sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
1397
+ /**
1398
+ * Help supporting a react-transition-group/Transition component.
1399
+ * @default false
1400
+ */
1401
+ transition: r.bool
1402
+ });
1403
+ function Br(t) {
1404
+ return Ut("MuiTooltip", t);
1405
+ }
1406
+ const B = Ht("MuiTooltip", ["popper", "popperInteractive", "popperArrow", "popperClose", "tooltip", "tooltipArrow", "touch", "tooltipPlacementLeft", "tooltipPlacementRight", "tooltipPlacementTop", "tooltipPlacementBottom", "arrow"]);
1407
+ function Nr(t) {
1408
+ return Math.round(t * 1e5) / 1e5;
1409
+ }
1410
+ const Lr = (t) => {
1411
+ const {
1412
+ classes: e,
1413
+ disableInteractive: o,
1414
+ arrow: n,
1415
+ touch: a,
1416
+ placement: i
1417
+ } = t, c = {
1418
+ popper: ["popper", !o && "popperInteractive", n && "popperArrow"],
1419
+ tooltip: ["tooltip", n && "tooltipArrow", a && "touch", `tooltipPlacement${zt(i.split("-")[0])}`],
1420
+ arrow: ["arrow"]
1421
+ };
1422
+ return Ft(c, Br, e);
1423
+ }, kr = et(gt, {
1424
+ name: "MuiTooltip",
1425
+ slot: "Popper",
1426
+ overridesResolver: (t, e) => {
1427
+ const {
1428
+ ownerState: o
1429
+ } = t;
1430
+ return [e.popper, !o.disableInteractive && e.popperInteractive, o.arrow && e.popperArrow, !o.open && e.popperClose];
1431
+ }
1432
+ })(lt(({
1433
+ theme: t
1434
+ }) => ({
1435
+ zIndex: (t.vars || t).zIndex.tooltip,
1436
+ pointerEvents: "none",
1437
+ variants: [{
1438
+ props: ({
1439
+ ownerState: e
1440
+ }) => !e.disableInteractive,
1441
+ style: {
1442
+ pointerEvents: "auto"
1443
+ }
1444
+ }, {
1445
+ props: ({
1446
+ open: e
1447
+ }) => !e,
1448
+ style: {
1449
+ pointerEvents: "none"
1450
+ }
1451
+ }, {
1452
+ props: ({
1453
+ ownerState: e
1454
+ }) => e.arrow,
1455
+ style: {
1456
+ [`&[data-popper-placement*="bottom"] .${B.arrow}`]: {
1457
+ top: 0,
1458
+ marginTop: "-0.71em",
1459
+ "&::before": {
1460
+ transformOrigin: "0 100%"
1461
+ }
1462
+ },
1463
+ [`&[data-popper-placement*="top"] .${B.arrow}`]: {
1464
+ bottom: 0,
1465
+ marginBottom: "-0.71em",
1466
+ "&::before": {
1467
+ transformOrigin: "100% 0"
1468
+ }
1469
+ },
1470
+ [`&[data-popper-placement*="right"] .${B.arrow}`]: {
1471
+ height: "1em",
1472
+ width: "0.71em",
1473
+ "&::before": {
1474
+ transformOrigin: "100% 100%"
1475
+ }
1476
+ },
1477
+ [`&[data-popper-placement*="left"] .${B.arrow}`]: {
1478
+ height: "1em",
1479
+ width: "0.71em",
1480
+ "&::before": {
1481
+ transformOrigin: "0 0"
1482
+ }
1483
+ }
1484
+ }
1485
+ }, {
1486
+ props: ({
1487
+ ownerState: e
1488
+ }) => e.arrow && !e.isRtl,
1489
+ style: {
1490
+ [`&[data-popper-placement*="right"] .${B.arrow}`]: {
1491
+ left: 0,
1492
+ marginLeft: "-0.71em"
1493
+ }
1494
+ }
1495
+ }, {
1496
+ props: ({
1497
+ ownerState: e
1498
+ }) => e.arrow && !!e.isRtl,
1499
+ style: {
1500
+ [`&[data-popper-placement*="right"] .${B.arrow}`]: {
1501
+ right: 0,
1502
+ marginRight: "-0.71em"
1503
+ }
1504
+ }
1505
+ }, {
1506
+ props: ({
1507
+ ownerState: e
1508
+ }) => e.arrow && !e.isRtl,
1509
+ style: {
1510
+ [`&[data-popper-placement*="left"] .${B.arrow}`]: {
1511
+ right: 0,
1512
+ marginRight: "-0.71em"
1513
+ }
1514
+ }
1515
+ }, {
1516
+ props: ({
1517
+ ownerState: e
1518
+ }) => e.arrow && !!e.isRtl,
1519
+ style: {
1520
+ [`&[data-popper-placement*="left"] .${B.arrow}`]: {
1521
+ left: 0,
1522
+ marginLeft: "-0.71em"
1523
+ }
1524
+ }
1525
+ }]
1526
+ }))), Wr = et("div", {
1527
+ name: "MuiTooltip",
1528
+ slot: "Tooltip",
1529
+ overridesResolver: (t, e) => {
1530
+ const {
1531
+ ownerState: o
1532
+ } = t;
1533
+ return [e.tooltip, o.touch && e.touch, o.arrow && e.tooltipArrow, e[`tooltipPlacement${zt(o.placement.split("-")[0])}`]];
1534
+ }
1535
+ })(lt(({
1536
+ theme: t
1537
+ }) => ({
1538
+ backgroundColor: t.vars ? t.vars.palette.Tooltip.bg : Yt(t.palette.grey[700], 0.92),
1539
+ borderRadius: (t.vars || t).shape.borderRadius,
1540
+ color: (t.vars || t).palette.common.white,
1541
+ fontFamily: t.typography.fontFamily,
1542
+ padding: "4px 8px",
1543
+ fontSize: t.typography.pxToRem(11),
1544
+ maxWidth: 300,
1545
+ margin: 2,
1546
+ wordWrap: "break-word",
1547
+ fontWeight: t.typography.fontWeightMedium,
1548
+ [`.${B.popper}[data-popper-placement*="left"] &`]: {
1549
+ transformOrigin: "right center"
1550
+ },
1551
+ [`.${B.popper}[data-popper-placement*="right"] &`]: {
1552
+ transformOrigin: "left center"
1553
+ },
1554
+ [`.${B.popper}[data-popper-placement*="top"] &`]: {
1555
+ transformOrigin: "center bottom",
1556
+ marginBottom: "14px"
1557
+ },
1558
+ [`.${B.popper}[data-popper-placement*="bottom"] &`]: {
1559
+ transformOrigin: "center top",
1560
+ marginTop: "14px"
1561
+ },
1562
+ variants: [{
1563
+ props: ({
1564
+ ownerState: e
1565
+ }) => e.arrow,
1566
+ style: {
1567
+ position: "relative",
1568
+ margin: 0
1569
+ }
1570
+ }, {
1571
+ props: ({
1572
+ ownerState: e
1573
+ }) => e.touch,
1574
+ style: {
1575
+ padding: "8px 16px",
1576
+ fontSize: t.typography.pxToRem(14),
1577
+ lineHeight: `${Nr(16 / 14)}em`,
1578
+ fontWeight: t.typography.fontWeightRegular
1579
+ }
1580
+ }, {
1581
+ props: ({
1582
+ ownerState: e
1583
+ }) => !e.isRtl,
1584
+ style: {
1585
+ [`.${B.popper}[data-popper-placement*="left"] &`]: {
1586
+ marginRight: "14px"
1587
+ },
1588
+ [`.${B.popper}[data-popper-placement*="right"] &`]: {
1589
+ marginLeft: "14px"
1590
+ }
1591
+ }
1592
+ }, {
1593
+ props: ({
1594
+ ownerState: e
1595
+ }) => !e.isRtl && e.touch,
1596
+ style: {
1597
+ [`.${B.popper}[data-popper-placement*="left"] &`]: {
1598
+ marginRight: "24px"
1599
+ },
1600
+ [`.${B.popper}[data-popper-placement*="right"] &`]: {
1601
+ marginLeft: "24px"
1602
+ }
1603
+ }
1604
+ }, {
1605
+ props: ({
1606
+ ownerState: e
1607
+ }) => !!e.isRtl,
1608
+ style: {
1609
+ [`.${B.popper}[data-popper-placement*="left"] &`]: {
1610
+ marginLeft: "14px"
1611
+ },
1612
+ [`.${B.popper}[data-popper-placement*="right"] &`]: {
1613
+ marginRight: "14px"
1614
+ }
1615
+ }
1616
+ }, {
1617
+ props: ({
1618
+ ownerState: e
1619
+ }) => !!e.isRtl && e.touch,
1620
+ style: {
1621
+ [`.${B.popper}[data-popper-placement*="left"] &`]: {
1622
+ marginLeft: "24px"
1623
+ },
1624
+ [`.${B.popper}[data-popper-placement*="right"] &`]: {
1625
+ marginRight: "24px"
1626
+ }
1627
+ }
1628
+ }, {
1629
+ props: ({
1630
+ ownerState: e
1631
+ }) => e.touch,
1632
+ style: {
1633
+ [`.${B.popper}[data-popper-placement*="top"] &`]: {
1634
+ marginBottom: "24px"
1635
+ }
1636
+ }
1637
+ }, {
1638
+ props: ({
1639
+ ownerState: e
1640
+ }) => e.touch,
1641
+ style: {
1642
+ [`.${B.popper}[data-popper-placement*="bottom"] &`]: {
1643
+ marginTop: "24px"
1644
+ }
1645
+ }
1646
+ }]
1647
+ }))), Ir = et("span", {
1648
+ name: "MuiTooltip",
1649
+ slot: "Arrow",
1650
+ overridesResolver: (t, e) => e.arrow
1651
+ })(lt(({
1652
+ theme: t
1653
+ }) => ({
1654
+ overflow: "hidden",
1655
+ position: "absolute",
1656
+ width: "1em",
1657
+ height: "0.71em",
1658
+ boxSizing: "border-box",
1659
+ color: t.vars ? t.vars.palette.Tooltip.bg : Yt(t.palette.grey[700], 0.9),
1660
+ "&::before": {
1661
+ content: '""',
1662
+ margin: "auto",
1663
+ display: "block",
1664
+ width: "100%",
1665
+ height: "100%",
1666
+ backgroundColor: "currentColor",
1667
+ transform: "rotate(45deg)"
1668
+ }
1669
+ })));
1670
+ let Ge = !1;
1671
+ const Vt = new wo();
1672
+ let Be = {
1673
+ x: 0,
1674
+ y: 0
1675
+ };
1676
+ function Ke(t, e) {
1677
+ return (o, ...n) => {
1678
+ e && e(o, ...n), t(o, ...n);
1679
+ };
1680
+ }
1681
+ const ao = /* @__PURE__ */ C.forwardRef(function(e, o) {
1682
+ var xt, Tt, Pt;
1683
+ const n = qt({
1684
+ props: e,
1685
+ name: "MuiTooltip"
1686
+ }), {
1687
+ arrow: a = !1,
1688
+ children: i,
1689
+ classes: c,
1690
+ components: p = {},
1691
+ componentsProps: s = {},
1692
+ describeChild: f = !1,
1693
+ disableFocusListener: l = !1,
1694
+ disableHoverListener: g = !1,
1695
+ disableInteractive: x = !1,
1696
+ disableTouchListener: u = !1,
1697
+ enterDelay: T = 100,
1698
+ enterNextDelay: v = 0,
1699
+ enterTouchDelay: m = 700,
1700
+ followCursor: w = !1,
1701
+ id: E,
1702
+ leaveDelay: O = 0,
1703
+ leaveTouchDelay: d = 1500,
1704
+ onClose: b,
1705
+ onOpen: y,
1706
+ open: R,
1707
+ placement: D = "bottom",
1708
+ PopperComponent: A,
1709
+ PopperProps: P = {},
1710
+ slotProps: M = {},
1711
+ slots: N = {},
1712
+ title: j,
1713
+ TransitionComponent: X = At,
1714
+ TransitionProps: G,
1715
+ ...S
1716
+ } = n, $ = /* @__PURE__ */ C.isValidElement(i) ? i : /* @__PURE__ */ re("span", {
1717
+ children: i
1718
+ }), k = vo(), te = Xt(), [L, de] = C.useState(), [oe, ve] = C.useState(null), K = C.useRef(!1), H = x || w, ae = Ye(), ie = Ye(), U = Ye(), me = Ye(), [rt, he] = mo({
1719
+ controlled: R,
1720
+ default: !1,
1721
+ name: "Tooltip",
1722
+ state: "open"
1723
+ });
1724
+ let J = rt;
1725
+ if (process.env.NODE_ENV !== "production") {
1726
+ const {
1727
+ current: h
1728
+ } = C.useRef(R !== void 0);
1729
+ C.useEffect(() => {
1730
+ L && L.disabled && !h && j !== "" && L.tagName.toLowerCase() === "button" && console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.", "A disabled element does not fire events.", "Tooltip needs to listen to the child element's events to display the title.", "", "Add a simple wrapper element, such as a `span`."].join(`
1731
+ `));
1732
+ }, [j, L, h]);
1733
+ }
1734
+ const ge = ho(E), pe = C.useRef(), be = Mt(() => {
1735
+ pe.current !== void 0 && (document.body.style.WebkitUserSelect = pe.current, pe.current = void 0), me.clear();
1736
+ });
1737
+ C.useEffect(() => be, [be]);
1738
+ const Ee = (h) => {
1739
+ Vt.clear(), Ge = !0, he(!0), y && !J && y(h);
1740
+ }, le = Mt(
1741
+ /**
1742
+ * @param {React.SyntheticEvent | Event} event
1743
+ */
1744
+ (h) => {
1745
+ Vt.start(800 + O, () => {
1746
+ Ge = !1;
1747
+ }), he(!1), b && J && b(h), ae.start(k.transitions.duration.shortest, () => {
1748
+ K.current = !1;
1749
+ });
1750
+ }
1751
+ ), ye = (h) => {
1752
+ K.current && h.type !== "touchstart" || (L && L.removeAttribute("title"), ie.clear(), U.clear(), T || Ge && v ? ie.start(Ge ? v : T, () => {
1753
+ Ee(h);
1754
+ }) : Ee(h));
1755
+ }, Re = (h) => {
1756
+ ie.clear(), U.start(O, () => {
1757
+ le(h);
1758
+ });
1759
+ }, [, Z] = C.useState(!1), ce = (h) => {
1760
+ jt(h.target) || (Z(!1), Re(h));
1761
+ }, Ae = (h) => {
1762
+ L || de(h.currentTarget), jt(h.target) && (Z(!0), ye(h));
1763
+ }, Ce = (h) => {
1764
+ K.current = !0;
1765
+ const Q = $.props;
1766
+ Q.onTouchStart && Q.onTouchStart(h);
1767
+ }, Me = (h) => {
1768
+ Ce(h), U.clear(), ae.clear(), be(), pe.current = document.body.style.WebkitUserSelect, document.body.style.WebkitUserSelect = "none", me.start(m, () => {
1769
+ document.body.style.WebkitUserSelect = pe.current, ye(h);
1770
+ });
1771
+ }, He = (h) => {
1772
+ $.props.onTouchEnd && $.props.onTouchEnd(h), be(), U.start(d, () => {
1773
+ le(h);
1774
+ });
1775
+ };
1776
+ C.useEffect(() => {
1777
+ if (!J)
1778
+ return;
1779
+ function h(Q) {
1780
+ Q.key === "Escape" && le(Q);
1781
+ }
1782
+ return document.addEventListener("keydown", h), () => {
1783
+ document.removeEventListener("keydown", h);
1784
+ };
1785
+ }, [le, J]);
1786
+ const Ue = it(go($), de, o);
1787
+ !j && j !== 0 && (J = !1);
1788
+ const we = C.useRef(), Fe = (h) => {
1789
+ const Q = $.props;
1790
+ Q.onMouseMove && Q.onMouseMove(h), Be = {
1791
+ x: h.clientX,
1792
+ y: h.clientY
1793
+ }, we.current && we.current.update();
1794
+ }, je = {}, nt = typeof j == "string";
1795
+ f ? (je.title = !J && nt && !g ? j : null, je["aria-describedby"] = J ? ge : null) : (je["aria-label"] = nt ? j : null, je["aria-labelledby"] = J && !nt ? ge : null);
1796
+ const F = {
1797
+ ...je,
1798
+ ...S,
1799
+ ...$.props,
1800
+ className: qe(S.className, $.props.className),
1801
+ onTouchStart: Ce,
1802
+ ref: Ue,
1803
+ ...w ? {
1804
+ onMouseMove: Fe
1805
+ } : {}
1806
+ };
1807
+ process.env.NODE_ENV !== "production" && (F["data-mui-internal-clone-element"] = !0, C.useEffect(() => {
1808
+ L && !L.getAttribute("data-mui-internal-clone-element") && console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.", "Please make sure that props are spread on the same element that the ref is applied to."].join(`
1809
+ `));
1810
+ }, [L]));
1811
+ const $e = {};
1812
+ u || (F.onTouchStart = Me, F.onTouchEnd = He), g || (F.onMouseOver = Ke(ye, F.onMouseOver), F.onMouseLeave = Ke(Re, F.onMouseLeave), H || ($e.onMouseOver = ye, $e.onMouseLeave = Re)), l || (F.onFocus = Ke(Ae, F.onFocus), F.onBlur = Ke(ce, F.onBlur), H || ($e.onFocus = Ae, $e.onBlur = ce)), process.env.NODE_ENV !== "production" && $.props.title && console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.", `Remove this title prop \`${$.props.title}\` or the Tooltip component.`].join(`
1813
+ `));
1814
+ const io = C.useMemo(() => {
1815
+ var Q;
1816
+ let h = [{
1817
+ name: "arrow",
1818
+ enabled: !!oe,
1819
+ options: {
1820
+ element: oe,
1821
+ padding: 4
1822
+ }
1823
+ }];
1824
+ return (Q = P.popperOptions) != null && Q.modifiers && (h = h.concat(P.popperOptions.modifiers)), {
1825
+ ...P.popperOptions,
1826
+ modifiers: h
1827
+ };
1828
+ }, [oe, P]), De = {
1829
+ ...n,
1830
+ isRtl: te,
1831
+ arrow: a,
1832
+ disableInteractive: H,
1833
+ placement: D,
1834
+ PopperComponentProp: A,
1835
+ touch: K.current
1836
+ }, at = Lr(De), bt = N.popper ?? p.Popper ?? kr, yt = N.transition ?? p.Transition ?? X ?? At, wt = N.tooltip ?? p.Tooltip ?? Wr, Ot = N.arrow ?? p.Arrow ?? Ir, so = ze(bt, {
1837
+ ...P,
1838
+ ...M.popper ?? s.popper,
1839
+ className: qe(at.popper, P == null ? void 0 : P.className, (xt = M.popper ?? s.popper) == null ? void 0 : xt.className)
1840
+ }, De), po = ze(yt, {
1841
+ ...G,
1842
+ ...M.transition ?? s.transition
1843
+ }, De), lo = ze(wt, {
1844
+ ...M.tooltip ?? s.tooltip,
1845
+ className: qe(at.tooltip, (Tt = M.tooltip ?? s.tooltip) == null ? void 0 : Tt.className)
1846
+ }, De), co = ze(Ot, {
1847
+ ...M.arrow ?? s.arrow,
1848
+ className: qe(at.arrow, (Pt = M.arrow ?? s.arrow) == null ? void 0 : Pt.className)
1849
+ }, De);
1850
+ return /* @__PURE__ */ Et(C.Fragment, {
1851
+ children: [/* @__PURE__ */ C.cloneElement($, F), /* @__PURE__ */ re(bt, {
1852
+ as: A ?? gt,
1853
+ placement: D,
1854
+ anchorEl: w ? {
1855
+ getBoundingClientRect: () => ({
1856
+ top: Be.y,
1857
+ left: Be.x,
1858
+ right: Be.x,
1859
+ bottom: Be.y,
1860
+ width: 0,
1861
+ height: 0
1862
+ })
1863
+ } : L,
1864
+ popperRef: we,
1865
+ open: L ? J : !1,
1866
+ id: ge,
1867
+ transition: !0,
1868
+ ...$e,
1869
+ ...so,
1870
+ popperOptions: io,
1871
+ children: ({
1872
+ TransitionProps: h
1873
+ }) => /* @__PURE__ */ re(yt, {
1874
+ timeout: k.transitions.duration.shorter,
1875
+ ...h,
1876
+ ...po,
1877
+ children: /* @__PURE__ */ Et(wt, {
1878
+ ...lo,
1879
+ children: [j, a ? /* @__PURE__ */ re(Ot, {
1880
+ ...co,
1881
+ ref: ve
1882
+ }) : null]
1883
+ })
1884
+ })
1885
+ })]
1886
+ });
1887
+ });
1888
+ process.env.NODE_ENV !== "production" && (ao.propTypes = {
1889
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
1890
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1891
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1892
+ // └─────────────────────────────────────────────────────────────────────┘
1893
+ /**
1894
+ * If `true`, adds an arrow to the tooltip.
1895
+ * @default false
1896
+ */
1897
+ arrow: r.bool,
1898
+ /**
1899
+ * Tooltip reference element.
1900
+ */
1901
+ children: bo.isRequired,
1902
+ /**
1903
+ * Override or extend the styles applied to the component.
1904
+ */
1905
+ classes: r.object,
1906
+ /**
1907
+ * @ignore
1908
+ */
1909
+ className: r.string,
1910
+ /**
1911
+ * The components used for each slot inside.
1912
+ *
1913
+ * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/).
1914
+ *
1915
+ * @default {}
1916
+ */
1917
+ components: r.shape({
1918
+ Arrow: r.elementType,
1919
+ Popper: r.elementType,
1920
+ Tooltip: r.elementType,
1921
+ Transition: r.elementType
1922
+ }),
1923
+ /**
1924
+ * The extra props for the slot components.
1925
+ * You can override the existing props or add new ones.
1926
+ *
1927
+ * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/).
1928
+ *
1929
+ * @default {}
1930
+ */
1931
+ componentsProps: r.shape({
1932
+ arrow: r.object,
1933
+ popper: r.object,
1934
+ tooltip: r.object,
1935
+ transition: r.object
1936
+ }),
1937
+ /**
1938
+ * Set to `true` if the `title` acts as an accessible description.
1939
+ * By default the `title` acts as an accessible label for the child.
1940
+ * @default false
1941
+ */
1942
+ describeChild: r.bool,
1943
+ /**
1944
+ * Do not respond to focus-visible events.
1945
+ * @default false
1946
+ */
1947
+ disableFocusListener: r.bool,
1948
+ /**
1949
+ * Do not respond to hover events.
1950
+ * @default false
1951
+ */
1952
+ disableHoverListener: r.bool,
1953
+ /**
1954
+ * Makes a tooltip not interactive, i.e. it will close when the user
1955
+ * hovers over the tooltip before the `leaveDelay` is expired.
1956
+ * @default false
1957
+ */
1958
+ disableInteractive: r.bool,
1959
+ /**
1960
+ * Do not respond to long press touch events.
1961
+ * @default false
1962
+ */
1963
+ disableTouchListener: r.bool,
1964
+ /**
1965
+ * The number of milliseconds to wait before showing the tooltip.
1966
+ * This prop won't impact the enter touch delay (`enterTouchDelay`).
1967
+ * @default 100
1968
+ */
1969
+ enterDelay: r.number,
1970
+ /**
1971
+ * The number of milliseconds to wait before showing the tooltip when one was already recently opened.
1972
+ * @default 0
1973
+ */
1974
+ enterNextDelay: r.number,
1975
+ /**
1976
+ * The number of milliseconds a user must touch the element before showing the tooltip.
1977
+ * @default 700
1978
+ */
1979
+ enterTouchDelay: r.number,
1980
+ /**
1981
+ * If `true`, the tooltip follow the cursor over the wrapped element.
1982
+ * @default false
1983
+ */
1984
+ followCursor: r.bool,
1985
+ /**
1986
+ * This prop is used to help implement the accessibility logic.
1987
+ * If you don't provide this prop. It falls back to a randomly generated id.
1988
+ */
1989
+ id: r.string,
1990
+ /**
1991
+ * The number of milliseconds to wait before hiding the tooltip.
1992
+ * This prop won't impact the leave touch delay (`leaveTouchDelay`).
1993
+ * @default 0
1994
+ */
1995
+ leaveDelay: r.number,
1996
+ /**
1997
+ * The number of milliseconds after the user stops touching an element before hiding the tooltip.
1998
+ * @default 1500
1999
+ */
2000
+ leaveTouchDelay: r.number,
2001
+ /**
2002
+ * Callback fired when the component requests to be closed.
2003
+ *
2004
+ * @param {React.SyntheticEvent} event The event source of the callback.
2005
+ */
2006
+ onClose: r.func,
2007
+ /**
2008
+ * Callback fired when the component requests to be open.
2009
+ *
2010
+ * @param {React.SyntheticEvent} event The event source of the callback.
2011
+ */
2012
+ onOpen: r.func,
2013
+ /**
2014
+ * If `true`, the component is shown.
2015
+ */
2016
+ open: r.bool,
2017
+ /**
2018
+ * Tooltip placement.
2019
+ * @default 'bottom'
2020
+ */
2021
+ placement: r.oneOf(["bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
2022
+ /**
2023
+ * The component used for the popper.
2024
+ * @default Popper
2025
+ */
2026
+ PopperComponent: r.elementType,
2027
+ /**
2028
+ * Props applied to the [`Popper`](https://mui.com/material-ui/api/popper/) element.
2029
+ * @default {}
2030
+ */
2031
+ PopperProps: r.object,
2032
+ /**
2033
+ * The extra props for the slot components.
2034
+ * You can override the existing props or add new ones.
2035
+ *
2036
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
2037
+ *
2038
+ * @default {}
2039
+ */
2040
+ slotProps: r.shape({
2041
+ arrow: r.object,
2042
+ popper: r.object,
2043
+ tooltip: r.object,
2044
+ transition: r.object
2045
+ }),
2046
+ /**
2047
+ * The components used for each slot inside.
2048
+ *
2049
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
2050
+ *
2051
+ * @default {}
2052
+ */
2053
+ slots: r.shape({
2054
+ arrow: r.elementType,
2055
+ popper: r.elementType,
2056
+ tooltip: r.elementType,
2057
+ transition: r.elementType
2058
+ }),
2059
+ /**
2060
+ * The system prop that allows defining system overrides as well as additional CSS styles.
2061
+ */
2062
+ sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
2063
+ /**
2064
+ * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.
2065
+ */
2066
+ title: r.node,
2067
+ /**
2068
+ * The component used for the transition.
2069
+ * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
2070
+ * @default Grow
2071
+ */
2072
+ TransitionComponent: r.elementType,
2073
+ /**
2074
+ * Props applied to the transition element.
2075
+ * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
2076
+ */
2077
+ TransitionProps: r.object
2078
+ });
2079
+ const Xr = ({
2080
+ title: t,
2081
+ children: e,
2082
+ arrow: o = !0,
2083
+ placement: n = "top",
2084
+ ...a
2085
+ }) => {
2086
+ const i = { title: t, arrow: o, placement: n, ...a };
2087
+ return /* @__PURE__ */ re(ao, { ...i, children: e });
2088
+ };
2089
+ export {
2090
+ Xr as Tooltip,
2091
+ Xr as default
2092
+ };