@loopr-ai/craft 0.5.0 → 0.5.2

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,3442 @@
1
+ import At, { jsx as _, jsxs as wt, Fragment as Hr } from "react/jsx-runtime";
2
+ import { o as Do, P as Fr, H as Pt, u as Zr, j as Ur, k as qr, G as No, n as dt, e as Kr, l as Rt, m as xt } from "./createSvgIcon-70f9f72b.js";
3
+ import * as R from "react";
4
+ import xe, { useRef as Tt, useImperativeHandle as Qr, useEffect as It, useContext as eo } from "react";
5
+ import { s as Gr, _ as Ne, a as C, g as Dt, c as Pe, e as Ie, P as u, f as Jr, C as Ir } from "./createTheme-a4db2989.js";
6
+ import { i as ei, u as ti, c as Ae, g as Nt, s as Me, a as Mt, b as _t } from "./styled-126c6a62.js";
7
+ import { u as oi } from "./useTheme-573c40a2.js";
8
+ import { c as Jo } from "./chainPropTypes-004bf492.js";
9
+ import { r as Io, u as qt, c as Mo, b as ri, a as ii } from "./TransitionGroupContext-fe9a562f.js";
10
+ import { c as ni, T as ai } from "./useThemeWithoutDefault-188598a8.js";
11
+ import { B as si } from "./ButtonBase-85c9347b.js";
12
+ import { e as li } from "./extendSxProp-db8b9da5.js";
13
+ const ui = ["className", "component"];
14
+ function pi(e = {}) {
15
+ const {
16
+ themeId: o,
17
+ defaultTheme: t,
18
+ defaultClassName: r = "MuiBox-root",
19
+ generateClassName: i
20
+ } = e, n = ei("div", {
21
+ shouldForwardProp: (s) => s !== "theme" && s !== "sx" && s !== "as"
22
+ })(Gr);
23
+ return /* @__PURE__ */ R.forwardRef(function(l, d) {
24
+ const p = ti(t), f = li(l), {
25
+ className: c,
26
+ component: v = "div"
27
+ } = f, h = Ne(f, ui);
28
+ return /* @__PURE__ */ _(n, C({
29
+ as: v,
30
+ ref: d,
31
+ className: Ae(c, i ? i(r) : r),
32
+ theme: o && p[o] || p
33
+ }, h));
34
+ });
35
+ }
36
+ function di(e) {
37
+ return Dt("MuiIconButton", e);
38
+ }
39
+ const fi = Nt("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge"]), ci = fi, vi = ["edge", "children", "className", "color", "disabled", "disableFocusRipple", "size"], mi = (e) => {
40
+ const {
41
+ classes: o,
42
+ disabled: t,
43
+ color: r,
44
+ edge: i,
45
+ size: n
46
+ } = e, a = {
47
+ root: ["root", t && "disabled", r !== "default" && `color${Pe(r)}`, i && `edge${Pe(i)}`, `size${Pe(n)}`]
48
+ };
49
+ return _t(a, di, o);
50
+ }, hi = Me(si, {
51
+ name: "MuiIconButton",
52
+ slot: "Root",
53
+ overridesResolver: (e, o) => {
54
+ const {
55
+ ownerState: t
56
+ } = e;
57
+ return [o.root, t.color !== "default" && o[`color${Pe(t.color)}`], t.edge && o[`edge${Pe(t.edge)}`], o[`size${Pe(t.size)}`]];
58
+ }
59
+ })(({
60
+ theme: e,
61
+ ownerState: o
62
+ }) => C({
63
+ textAlign: "center",
64
+ flex: "0 0 auto",
65
+ fontSize: e.typography.pxToRem(24),
66
+ padding: 8,
67
+ borderRadius: "50%",
68
+ overflow: "visible",
69
+ // Explicitly set the default value to solve a bug on IE11.
70
+ color: (e.vars || e).palette.action.active,
71
+ transition: e.transitions.create("background-color", {
72
+ duration: e.transitions.duration.shortest
73
+ })
74
+ }, !o.disableRipple && {
75
+ "&:hover": {
76
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})` : Ie(e.palette.action.active, e.palette.action.hoverOpacity),
77
+ // Reset on touch devices, it doesn't add specificity
78
+ "@media (hover: none)": {
79
+ backgroundColor: "transparent"
80
+ }
81
+ }
82
+ }, o.edge === "start" && {
83
+ marginLeft: o.size === "small" ? -3 : -12
84
+ }, o.edge === "end" && {
85
+ marginRight: o.size === "small" ? -3 : -12
86
+ }), ({
87
+ theme: e,
88
+ ownerState: o
89
+ }) => {
90
+ var t;
91
+ const r = (t = (e.vars || e).palette) == null ? void 0 : t[o.color];
92
+ return C({}, o.color === "inherit" && {
93
+ color: "inherit"
94
+ }, o.color !== "inherit" && o.color !== "default" && C({
95
+ color: r == null ? void 0 : r.main
96
+ }, !o.disableRipple && {
97
+ "&:hover": C({}, r && {
98
+ backgroundColor: e.vars ? `rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})` : Ie(r.main, e.palette.action.hoverOpacity)
99
+ }, {
100
+ // Reset on touch devices, it doesn't add specificity
101
+ "@media (hover: none)": {
102
+ backgroundColor: "transparent"
103
+ }
104
+ })
105
+ }), o.size === "small" && {
106
+ padding: 5,
107
+ fontSize: e.typography.pxToRem(18)
108
+ }, o.size === "large" && {
109
+ padding: 12,
110
+ fontSize: e.typography.pxToRem(28)
111
+ }, {
112
+ [`&.${ci.disabled}`]: {
113
+ backgroundColor: "transparent",
114
+ color: (e.vars || e).palette.action.disabled
115
+ }
116
+ });
117
+ }), er = /* @__PURE__ */ R.forwardRef(function(o, t) {
118
+ const r = Mt({
119
+ props: o,
120
+ name: "MuiIconButton"
121
+ }), {
122
+ edge: i = !1,
123
+ children: n,
124
+ className: a,
125
+ color: s = "default",
126
+ disabled: l = !1,
127
+ disableFocusRipple: d = !1,
128
+ size: p = "medium"
129
+ } = r, f = Ne(r, vi), c = C({}, r, {
130
+ edge: i,
131
+ color: s,
132
+ disabled: l,
133
+ disableFocusRipple: d,
134
+ size: p
135
+ }), v = mi(c);
136
+ return /* @__PURE__ */ _(hi, C({
137
+ className: Ae(v.root, a),
138
+ centerRipple: !0,
139
+ focusRipple: !d,
140
+ disabled: l,
141
+ ref: t,
142
+ ownerState: c
143
+ }, f, {
144
+ children: n
145
+ }));
146
+ });
147
+ process.env.NODE_ENV !== "production" && (er.propTypes = {
148
+ // ----------------------------- Warning --------------------------------
149
+ // | These PropTypes are generated from the TypeScript type definitions |
150
+ // | To update them edit the d.ts file and run "yarn proptypes" |
151
+ // ----------------------------------------------------------------------
152
+ /**
153
+ * The icon to display.
154
+ */
155
+ children: Jo(u.node, (e) => R.Children.toArray(e.children).some((t) => /* @__PURE__ */ R.isValidElement(t) && t.props.onClick) ? new Error(["MUI: You are providing an onClick event listener to a child of a button element.", "Prefer applying it to the IconButton directly.", "This guarantees that the whole <button> will be responsive to click events."].join(`
156
+ `)) : null),
157
+ /**
158
+ * Override or extend the styles applied to the component.
159
+ */
160
+ classes: u.object,
161
+ /**
162
+ * @ignore
163
+ */
164
+ className: u.string,
165
+ /**
166
+ * The color of the component.
167
+ * It supports both default and custom theme colors, which can be added as shown in the
168
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
169
+ * @default 'default'
170
+ */
171
+ color: u.oneOfType([u.oneOf(["inherit", "default", "primary", "secondary", "error", "info", "success", "warning"]), u.string]),
172
+ /**
173
+ * If `true`, the component is disabled.
174
+ * @default false
175
+ */
176
+ disabled: u.bool,
177
+ /**
178
+ * If `true`, the keyboard focus ripple is disabled.
179
+ * @default false
180
+ */
181
+ disableFocusRipple: u.bool,
182
+ /**
183
+ * If `true`, the ripple effect is disabled.
184
+ *
185
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
186
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
187
+ * @default false
188
+ */
189
+ disableRipple: u.bool,
190
+ /**
191
+ * If given, uses a negative margin to counteract the padding on one
192
+ * side (this is often helpful for aligning the left or right
193
+ * side of the icon with content above or below, without ruining the border
194
+ * size and shape).
195
+ * @default false
196
+ */
197
+ edge: u.oneOf(["end", "start", !1]),
198
+ /**
199
+ * The size of the component.
200
+ * `small` is equivalent to the dense button styling.
201
+ * @default 'medium'
202
+ */
203
+ size: u.oneOfType([u.oneOf(["small", "medium", "large"]), u.string]),
204
+ /**
205
+ * The system prop that allows defining system overrides as well as additional CSS styles.
206
+ */
207
+ sx: u.oneOfType([u.arrayOf(u.oneOfType([u.func, u.object, u.bool])), u.func, u.object])
208
+ });
209
+ const ft = er, gi = {
210
+ disableDefaultClasses: !1
211
+ }, bi = /* @__PURE__ */ R.createContext(gi);
212
+ function yi(e) {
213
+ const {
214
+ disableDefaultClasses: o
215
+ } = R.useContext(bi);
216
+ return (t) => o ? "" : e(t);
217
+ }
218
+ var H = "top", re = "bottom", ie = "right", F = "left", to = "auto", ot = [H, re, ie, F], $e = "start", et = "end", wi = "clippingParents", tr = "viewport", qe = "popper", Pi = "reference", _o = /* @__PURE__ */ ot.reduce(function(e, o) {
219
+ return e.concat([o + "-" + $e, o + "-" + et]);
220
+ }, []), or = /* @__PURE__ */ [].concat(ot, [to]).reduce(function(e, o) {
221
+ return e.concat([o, o + "-" + $e, o + "-" + et]);
222
+ }, []), Ti = "beforeRead", Ci = "read", Si = "afterRead", Oi = "beforeMain", Ei = "main", Ai = "afterMain", Ri = "beforeWrite", xi = "write", Di = "afterWrite", Ni = [Ti, Ci, Si, Oi, Ei, Ai, Ri, xi, Di];
223
+ function ce(e) {
224
+ return e ? (e.nodeName || "").toLowerCase() : null;
225
+ }
226
+ function J(e) {
227
+ if (e == null)
228
+ return window;
229
+ if (e.toString() !== "[object Window]") {
230
+ var o = e.ownerDocument;
231
+ return o && o.defaultView || window;
232
+ }
233
+ return e;
234
+ }
235
+ function De(e) {
236
+ var o = J(e).Element;
237
+ return e instanceof o || e instanceof Element;
238
+ }
239
+ function oe(e) {
240
+ var o = J(e).HTMLElement;
241
+ return e instanceof o || e instanceof HTMLElement;
242
+ }
243
+ function oo(e) {
244
+ if (typeof ShadowRoot > "u")
245
+ return !1;
246
+ var o = J(e).ShadowRoot;
247
+ return e instanceof o || e instanceof ShadowRoot;
248
+ }
249
+ function Mi(e) {
250
+ var o = e.state;
251
+ Object.keys(o.elements).forEach(function(t) {
252
+ var r = o.styles[t] || {}, i = o.attributes[t] || {}, n = o.elements[t];
253
+ !oe(n) || !ce(n) || (Object.assign(n.style, r), Object.keys(i).forEach(function(a) {
254
+ var s = i[a];
255
+ s === !1 ? n.removeAttribute(a) : n.setAttribute(a, s === !0 ? "" : s);
256
+ }));
257
+ });
258
+ }
259
+ function _i(e) {
260
+ var o = e.state, t = {
261
+ popper: {
262
+ position: o.options.strategy,
263
+ left: "0",
264
+ top: "0",
265
+ margin: "0"
266
+ },
267
+ arrow: {
268
+ position: "absolute"
269
+ },
270
+ reference: {}
271
+ };
272
+ return Object.assign(o.elements.popper.style, t.popper), o.styles = t, o.elements.arrow && Object.assign(o.elements.arrow.style, t.arrow), function() {
273
+ Object.keys(o.elements).forEach(function(r) {
274
+ var i = o.elements[r], n = o.attributes[r] || {}, a = Object.keys(o.styles.hasOwnProperty(r) ? o.styles[r] : t[r]), s = a.reduce(function(l, d) {
275
+ return l[d] = "", l;
276
+ }, {});
277
+ !oe(i) || !ce(i) || (Object.assign(i.style, s), Object.keys(n).forEach(function(l) {
278
+ i.removeAttribute(l);
279
+ }));
280
+ });
281
+ };
282
+ }
283
+ const Yi = {
284
+ name: "applyStyles",
285
+ enabled: !0,
286
+ phase: "write",
287
+ fn: Mi,
288
+ effect: _i,
289
+ requires: ["computeStyles"]
290
+ };
291
+ function fe(e) {
292
+ return e.split("-")[0];
293
+ }
294
+ var Re = Math.max, Ct = Math.min, We = Math.round;
295
+ function Kt() {
296
+ var e = navigator.userAgentData;
297
+ return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(o) {
298
+ return o.brand + "/" + o.version;
299
+ }).join(" ") : navigator.userAgent;
300
+ }
301
+ function rr() {
302
+ return !/^((?!chrome|android).)*safari/i.test(Kt());
303
+ }
304
+ function Xe(e, o, t) {
305
+ o === void 0 && (o = !1), t === void 0 && (t = !1);
306
+ var r = e.getBoundingClientRect(), i = 1, n = 1;
307
+ o && oe(e) && (i = e.offsetWidth > 0 && We(r.width) / e.offsetWidth || 1, n = e.offsetHeight > 0 && We(r.height) / e.offsetHeight || 1);
308
+ var a = De(e) ? J(e) : window, s = a.visualViewport, l = !rr() && t, d = (r.left + (l && s ? s.offsetLeft : 0)) / i, p = (r.top + (l && s ? s.offsetTop : 0)) / n, f = r.width / i, c = r.height / n;
309
+ return {
310
+ width: f,
311
+ height: c,
312
+ top: p,
313
+ right: d + f,
314
+ bottom: p + c,
315
+ left: d,
316
+ x: d,
317
+ y: p
318
+ };
319
+ }
320
+ function ro(e) {
321
+ var o = Xe(e), t = e.offsetWidth, r = e.offsetHeight;
322
+ return Math.abs(o.width - t) <= 1 && (t = o.width), Math.abs(o.height - r) <= 1 && (r = o.height), {
323
+ x: e.offsetLeft,
324
+ y: e.offsetTop,
325
+ width: t,
326
+ height: r
327
+ };
328
+ }
329
+ function ir(e, o) {
330
+ var t = o.getRootNode && o.getRootNode();
331
+ if (e.contains(o))
332
+ return !0;
333
+ if (t && oo(t)) {
334
+ var r = o;
335
+ do {
336
+ if (r && e.isSameNode(r))
337
+ return !0;
338
+ r = r.parentNode || r.host;
339
+ } while (r);
340
+ }
341
+ return !1;
342
+ }
343
+ function ge(e) {
344
+ return J(e).getComputedStyle(e);
345
+ }
346
+ function Bi(e) {
347
+ return ["table", "td", "th"].indexOf(ce(e)) >= 0;
348
+ }
349
+ function Ce(e) {
350
+ return ((De(e) ? e.ownerDocument : (
351
+ // $FlowFixMe[prop-missing]
352
+ e.document
353
+ )) || window.document).documentElement;
354
+ }
355
+ function Yt(e) {
356
+ return ce(e) === "html" ? e : (
357
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
358
+ // $FlowFixMe[incompatible-return]
359
+ // $FlowFixMe[prop-missing]
360
+ e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
361
+ e.parentNode || // DOM Element detected
362
+ (oo(e) ? e.host : null) || // ShadowRoot detected
363
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
364
+ Ce(e)
365
+ );
366
+ }
367
+ function Yo(e) {
368
+ return !oe(e) || // https://github.com/popperjs/popper-core/issues/837
369
+ ge(e).position === "fixed" ? null : e.offsetParent;
370
+ }
371
+ function zi(e) {
372
+ var o = /firefox/i.test(Kt()), t = /Trident/i.test(Kt());
373
+ if (t && oe(e)) {
374
+ var r = ge(e);
375
+ if (r.position === "fixed")
376
+ return null;
377
+ }
378
+ var i = Yt(e);
379
+ for (oo(i) && (i = i.host); oe(i) && ["html", "body"].indexOf(ce(i)) < 0; ) {
380
+ var n = ge(i);
381
+ if (n.transform !== "none" || n.perspective !== "none" || n.contain === "paint" || ["transform", "perspective"].indexOf(n.willChange) !== -1 || o && n.willChange === "filter" || o && n.filter && n.filter !== "none")
382
+ return i;
383
+ i = i.parentNode;
384
+ }
385
+ return null;
386
+ }
387
+ function rt(e) {
388
+ for (var o = J(e), t = Yo(e); t && Bi(t) && ge(t).position === "static"; )
389
+ t = Yo(t);
390
+ return t && (ce(t) === "html" || ce(t) === "body" && ge(t).position === "static") ? o : t || zi(e) || o;
391
+ }
392
+ function io(e) {
393
+ return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
394
+ }
395
+ function Ge(e, o, t) {
396
+ return Re(e, Ct(o, t));
397
+ }
398
+ function $i(e, o, t) {
399
+ var r = Ge(e, o, t);
400
+ return r > t ? t : r;
401
+ }
402
+ function nr() {
403
+ return {
404
+ top: 0,
405
+ right: 0,
406
+ bottom: 0,
407
+ left: 0
408
+ };
409
+ }
410
+ function ar(e) {
411
+ return Object.assign({}, nr(), e);
412
+ }
413
+ function sr(e, o) {
414
+ return o.reduce(function(t, r) {
415
+ return t[r] = e, t;
416
+ }, {});
417
+ }
418
+ var Wi = function(o, t) {
419
+ return o = typeof o == "function" ? o(Object.assign({}, t.rects, {
420
+ placement: t.placement
421
+ })) : o, ar(typeof o != "number" ? o : sr(o, ot));
422
+ };
423
+ function Xi(e) {
424
+ var o, t = e.state, r = e.name, i = e.options, n = t.elements.arrow, a = t.modifiersData.popperOffsets, s = fe(t.placement), l = io(s), d = [F, ie].indexOf(s) >= 0, p = d ? "height" : "width";
425
+ if (!(!n || !a)) {
426
+ var f = Wi(i.padding, t), c = ro(n), v = l === "y" ? H : F, h = l === "y" ? re : ie, m = t.rects.reference[p] + t.rects.reference[l] - a[l] - t.rects.popper[p], g = a[l] - t.rects.reference[l], P = rt(n), S = P ? l === "y" ? P.clientHeight || 0 : P.clientWidth || 0 : 0, y = m / 2 - g / 2, b = f[v], w = S - c[p] - f[h], T = S / 2 - c[p] / 2 + y, O = Ge(b, T, w), D = l;
427
+ t.modifiersData[r] = (o = {}, o[D] = O, o.centerOffset = O - T, o);
428
+ }
429
+ }
430
+ function ki(e) {
431
+ var o = e.state, t = e.options, r = t.element, i = r === void 0 ? "[data-popper-arrow]" : r;
432
+ i != null && (typeof i == "string" && (i = o.elements.popper.querySelector(i), !i) || ir(o.elements.popper, i) && (o.elements.arrow = i));
433
+ }
434
+ const ji = {
435
+ name: "arrow",
436
+ enabled: !0,
437
+ phase: "main",
438
+ fn: Xi,
439
+ effect: ki,
440
+ requires: ["popperOffsets"],
441
+ requiresIfExists: ["preventOverflow"]
442
+ };
443
+ function ke(e) {
444
+ return e.split("-")[1];
445
+ }
446
+ var Li = {
447
+ top: "auto",
448
+ right: "auto",
449
+ bottom: "auto",
450
+ left: "auto"
451
+ };
452
+ function Vi(e, o) {
453
+ var t = e.x, r = e.y, i = o.devicePixelRatio || 1;
454
+ return {
455
+ x: We(t * i) / i || 0,
456
+ y: We(r * i) / i || 0
457
+ };
458
+ }
459
+ function Bo(e) {
460
+ var o, t = e.popper, r = e.popperRect, i = e.placement, n = e.variation, a = e.offsets, s = e.position, l = e.gpuAcceleration, d = e.adaptive, p = e.roundOffsets, f = e.isFixed, c = a.x, v = c === void 0 ? 0 : c, h = a.y, m = h === void 0 ? 0 : h, g = typeof p == "function" ? p({
461
+ x: v,
462
+ y: m
463
+ }) : {
464
+ x: v,
465
+ y: m
466
+ };
467
+ v = g.x, m = g.y;
468
+ var P = a.hasOwnProperty("x"), S = a.hasOwnProperty("y"), y = F, b = H, w = window;
469
+ if (d) {
470
+ var T = rt(t), O = "clientHeight", D = "clientWidth";
471
+ if (T === J(t) && (T = Ce(t), ge(T).position !== "static" && s === "absolute" && (O = "scrollHeight", D = "scrollWidth")), T = T, i === H || (i === F || i === ie) && n === et) {
472
+ b = re;
473
+ var E = f && T === w && w.visualViewport ? w.visualViewport.height : (
474
+ // $FlowFixMe[prop-missing]
475
+ T[O]
476
+ );
477
+ m -= E - r.height, m *= l ? 1 : -1;
478
+ }
479
+ if (i === F || (i === H || i === re) && n === et) {
480
+ y = ie;
481
+ var A = f && T === w && w.visualViewport ? w.visualViewport.width : (
482
+ // $FlowFixMe[prop-missing]
483
+ T[D]
484
+ );
485
+ v -= A - r.width, v *= l ? 1 : -1;
486
+ }
487
+ }
488
+ var N = Object.assign({
489
+ position: s
490
+ }, d && Li), $ = p === !0 ? Vi({
491
+ x: v,
492
+ y: m
493
+ }, J(t)) : {
494
+ x: v,
495
+ y: m
496
+ };
497
+ if (v = $.x, m = $.y, l) {
498
+ var Y;
499
+ return Object.assign({}, N, (Y = {}, Y[b] = S ? "0" : "", Y[y] = P ? "0" : "", Y.transform = (w.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + m + "px)" : "translate3d(" + v + "px, " + m + "px, 0)", Y));
500
+ }
501
+ return Object.assign({}, N, (o = {}, o[b] = S ? m + "px" : "", o[y] = P ? v + "px" : "", o.transform = "", o));
502
+ }
503
+ function Hi(e) {
504
+ var o = e.state, t = e.options, r = t.gpuAcceleration, i = r === void 0 ? !0 : r, n = t.adaptive, a = n === void 0 ? !0 : n, s = t.roundOffsets, l = s === void 0 ? !0 : s, d = {
505
+ placement: fe(o.placement),
506
+ variation: ke(o.placement),
507
+ popper: o.elements.popper,
508
+ popperRect: o.rects.popper,
509
+ gpuAcceleration: i,
510
+ isFixed: o.options.strategy === "fixed"
511
+ };
512
+ o.modifiersData.popperOffsets != null && (o.styles.popper = Object.assign({}, o.styles.popper, Bo(Object.assign({}, d, {
513
+ offsets: o.modifiersData.popperOffsets,
514
+ position: o.options.strategy,
515
+ adaptive: a,
516
+ roundOffsets: l
517
+ })))), o.modifiersData.arrow != null && (o.styles.arrow = Object.assign({}, o.styles.arrow, Bo(Object.assign({}, d, {
518
+ offsets: o.modifiersData.arrow,
519
+ position: "absolute",
520
+ adaptive: !1,
521
+ roundOffsets: l
522
+ })))), o.attributes.popper = Object.assign({}, o.attributes.popper, {
523
+ "data-popper-placement": o.placement
524
+ });
525
+ }
526
+ const Fi = {
527
+ name: "computeStyles",
528
+ enabled: !0,
529
+ phase: "beforeWrite",
530
+ fn: Hi,
531
+ data: {}
532
+ };
533
+ var ct = {
534
+ passive: !0
535
+ };
536
+ function Zi(e) {
537
+ var o = e.state, t = e.instance, r = e.options, i = r.scroll, n = i === void 0 ? !0 : i, a = r.resize, s = a === void 0 ? !0 : a, l = J(o.elements.popper), d = [].concat(o.scrollParents.reference, o.scrollParents.popper);
538
+ return n && d.forEach(function(p) {
539
+ p.addEventListener("scroll", t.update, ct);
540
+ }), s && l.addEventListener("resize", t.update, ct), function() {
541
+ n && d.forEach(function(p) {
542
+ p.removeEventListener("scroll", t.update, ct);
543
+ }), s && l.removeEventListener("resize", t.update, ct);
544
+ };
545
+ }
546
+ const Ui = {
547
+ name: "eventListeners",
548
+ enabled: !0,
549
+ phase: "write",
550
+ fn: function() {
551
+ },
552
+ effect: Zi,
553
+ data: {}
554
+ };
555
+ var qi = {
556
+ left: "right",
557
+ right: "left",
558
+ bottom: "top",
559
+ top: "bottom"
560
+ };
561
+ function bt(e) {
562
+ return e.replace(/left|right|bottom|top/g, function(o) {
563
+ return qi[o];
564
+ });
565
+ }
566
+ var Ki = {
567
+ start: "end",
568
+ end: "start"
569
+ };
570
+ function zo(e) {
571
+ return e.replace(/start|end/g, function(o) {
572
+ return Ki[o];
573
+ });
574
+ }
575
+ function no(e) {
576
+ var o = J(e), t = o.pageXOffset, r = o.pageYOffset;
577
+ return {
578
+ scrollLeft: t,
579
+ scrollTop: r
580
+ };
581
+ }
582
+ function ao(e) {
583
+ return Xe(Ce(e)).left + no(e).scrollLeft;
584
+ }
585
+ function Qi(e, o) {
586
+ var t = J(e), r = Ce(e), i = t.visualViewport, n = r.clientWidth, a = r.clientHeight, s = 0, l = 0;
587
+ if (i) {
588
+ n = i.width, a = i.height;
589
+ var d = rr();
590
+ (d || !d && o === "fixed") && (s = i.offsetLeft, l = i.offsetTop);
591
+ }
592
+ return {
593
+ width: n,
594
+ height: a,
595
+ x: s + ao(e),
596
+ y: l
597
+ };
598
+ }
599
+ function Gi(e) {
600
+ var o, t = Ce(e), r = no(e), i = (o = e.ownerDocument) == null ? void 0 : o.body, n = Re(t.scrollWidth, t.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), a = Re(t.scrollHeight, t.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), s = -r.scrollLeft + ao(e), l = -r.scrollTop;
601
+ return ge(i || t).direction === "rtl" && (s += Re(t.clientWidth, i ? i.clientWidth : 0) - n), {
602
+ width: n,
603
+ height: a,
604
+ x: s,
605
+ y: l
606
+ };
607
+ }
608
+ function so(e) {
609
+ var o = ge(e), t = o.overflow, r = o.overflowX, i = o.overflowY;
610
+ return /auto|scroll|overlay|hidden/.test(t + i + r);
611
+ }
612
+ function lr(e) {
613
+ return ["html", "body", "#document"].indexOf(ce(e)) >= 0 ? e.ownerDocument.body : oe(e) && so(e) ? e : lr(Yt(e));
614
+ }
615
+ function Je(e, o) {
616
+ var t;
617
+ o === void 0 && (o = []);
618
+ var r = lr(e), i = r === ((t = e.ownerDocument) == null ? void 0 : t.body), n = J(r), a = i ? [n].concat(n.visualViewport || [], so(r) ? r : []) : r, s = o.concat(a);
619
+ return i ? s : (
620
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
621
+ s.concat(Je(Yt(a)))
622
+ );
623
+ }
624
+ function Qt(e) {
625
+ return Object.assign({}, e, {
626
+ left: e.x,
627
+ top: e.y,
628
+ right: e.x + e.width,
629
+ bottom: e.y + e.height
630
+ });
631
+ }
632
+ function Ji(e, o) {
633
+ var t = Xe(e, !1, o === "fixed");
634
+ return t.top = t.top + e.clientTop, t.left = t.left + e.clientLeft, t.bottom = t.top + e.clientHeight, t.right = t.left + e.clientWidth, t.width = e.clientWidth, t.height = e.clientHeight, t.x = t.left, t.y = t.top, t;
635
+ }
636
+ function $o(e, o, t) {
637
+ return o === tr ? Qt(Qi(e, t)) : De(o) ? Ji(o, t) : Qt(Gi(Ce(e)));
638
+ }
639
+ function Ii(e) {
640
+ var o = Je(Yt(e)), t = ["absolute", "fixed"].indexOf(ge(e).position) >= 0, r = t && oe(e) ? rt(e) : e;
641
+ return De(r) ? o.filter(function(i) {
642
+ return De(i) && ir(i, r) && ce(i) !== "body";
643
+ }) : [];
644
+ }
645
+ function en(e, o, t, r) {
646
+ var i = o === "clippingParents" ? Ii(e) : [].concat(o), n = [].concat(i, [t]), a = n[0], s = n.reduce(function(l, d) {
647
+ var p = $o(e, d, r);
648
+ return l.top = Re(p.top, l.top), l.right = Ct(p.right, l.right), l.bottom = Ct(p.bottom, l.bottom), l.left = Re(p.left, l.left), l;
649
+ }, $o(e, a, r));
650
+ return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
651
+ }
652
+ function ur(e) {
653
+ var o = e.reference, t = e.element, r = e.placement, i = r ? fe(r) : null, n = r ? ke(r) : null, a = o.x + o.width / 2 - t.width / 2, s = o.y + o.height / 2 - t.height / 2, l;
654
+ switch (i) {
655
+ case H:
656
+ l = {
657
+ x: a,
658
+ y: o.y - t.height
659
+ };
660
+ break;
661
+ case re:
662
+ l = {
663
+ x: a,
664
+ y: o.y + o.height
665
+ };
666
+ break;
667
+ case ie:
668
+ l = {
669
+ x: o.x + o.width,
670
+ y: s
671
+ };
672
+ break;
673
+ case F:
674
+ l = {
675
+ x: o.x - t.width,
676
+ y: s
677
+ };
678
+ break;
679
+ default:
680
+ l = {
681
+ x: o.x,
682
+ y: o.y
683
+ };
684
+ }
685
+ var d = i ? io(i) : null;
686
+ if (d != null) {
687
+ var p = d === "y" ? "height" : "width";
688
+ switch (n) {
689
+ case $e:
690
+ l[d] = l[d] - (o[p] / 2 - t[p] / 2);
691
+ break;
692
+ case et:
693
+ l[d] = l[d] + (o[p] / 2 - t[p] / 2);
694
+ break;
695
+ }
696
+ }
697
+ return l;
698
+ }
699
+ function tt(e, o) {
700
+ o === void 0 && (o = {});
701
+ var t = o, r = t.placement, i = r === void 0 ? e.placement : r, n = t.strategy, a = n === void 0 ? e.strategy : n, s = t.boundary, l = s === void 0 ? wi : s, d = t.rootBoundary, p = d === void 0 ? tr : d, f = t.elementContext, c = f === void 0 ? qe : f, v = t.altBoundary, h = v === void 0 ? !1 : v, m = t.padding, g = m === void 0 ? 0 : m, P = ar(typeof g != "number" ? g : sr(g, ot)), S = c === qe ? Pi : qe, y = e.rects.popper, b = e.elements[h ? S : c], w = en(De(b) ? b : b.contextElement || Ce(e.elements.popper), l, p, a), T = Xe(e.elements.reference), O = ur({
702
+ reference: T,
703
+ element: y,
704
+ strategy: "absolute",
705
+ placement: i
706
+ }), D = Qt(Object.assign({}, y, O)), E = c === qe ? D : T, A = {
707
+ top: w.top - E.top + P.top,
708
+ bottom: E.bottom - w.bottom + P.bottom,
709
+ left: w.left - E.left + P.left,
710
+ right: E.right - w.right + P.right
711
+ }, N = e.modifiersData.offset;
712
+ if (c === qe && N) {
713
+ var $ = N[i];
714
+ Object.keys(A).forEach(function(Y) {
715
+ var Z = [ie, re].indexOf(Y) >= 0 ? 1 : -1, U = [H, re].indexOf(Y) >= 0 ? "y" : "x";
716
+ A[Y] += $[U] * Z;
717
+ });
718
+ }
719
+ return A;
720
+ }
721
+ function tn(e, o) {
722
+ o === void 0 && (o = {});
723
+ var t = o, r = t.placement, i = t.boundary, n = t.rootBoundary, a = t.padding, s = t.flipVariations, l = t.allowedAutoPlacements, d = l === void 0 ? or : l, p = ke(r), f = p ? s ? _o : _o.filter(function(h) {
724
+ return ke(h) === p;
725
+ }) : ot, c = f.filter(function(h) {
726
+ return d.indexOf(h) >= 0;
727
+ });
728
+ c.length === 0 && (c = f);
729
+ var v = c.reduce(function(h, m) {
730
+ return h[m] = tt(e, {
731
+ placement: m,
732
+ boundary: i,
733
+ rootBoundary: n,
734
+ padding: a
735
+ })[fe(m)], h;
736
+ }, {});
737
+ return Object.keys(v).sort(function(h, m) {
738
+ return v[h] - v[m];
739
+ });
740
+ }
741
+ function on(e) {
742
+ if (fe(e) === to)
743
+ return [];
744
+ var o = bt(e);
745
+ return [zo(e), o, zo(o)];
746
+ }
747
+ function rn(e) {
748
+ var o = e.state, t = e.options, r = e.name;
749
+ if (!o.modifiersData[r]._skip) {
750
+ for (var i = t.mainAxis, n = i === void 0 ? !0 : i, a = t.altAxis, s = a === void 0 ? !0 : a, l = t.fallbackPlacements, d = t.padding, p = t.boundary, f = t.rootBoundary, c = t.altBoundary, v = t.flipVariations, h = v === void 0 ? !0 : v, m = t.allowedAutoPlacements, g = o.options.placement, P = fe(g), S = P === g, y = l || (S || !h ? [bt(g)] : on(g)), b = [g].concat(y).reduce(function(K, Q) {
751
+ return K.concat(fe(Q) === to ? tn(o, {
752
+ placement: Q,
753
+ boundary: p,
754
+ rootBoundary: f,
755
+ padding: d,
756
+ flipVariations: h,
757
+ allowedAutoPlacements: m
758
+ }) : Q);
759
+ }, []), w = o.rects.reference, T = o.rects.popper, O = /* @__PURE__ */ new Map(), D = !0, E = b[0], A = 0; A < b.length; A++) {
760
+ var N = b[A], $ = fe(N), Y = ke(N) === $e, Z = [H, re].indexOf($) >= 0, U = Z ? "width" : "height", B = tt(o, {
761
+ placement: N,
762
+ boundary: p,
763
+ rootBoundary: f,
764
+ altBoundary: c,
765
+ padding: d
766
+ }), W = Z ? Y ? ie : F : Y ? re : H;
767
+ w[U] > T[U] && (W = bt(W));
768
+ var X = bt(W), q = [];
769
+ if (n && q.push(B[$] <= 0), s && q.push(B[W] <= 0, B[X] <= 0), q.every(function(K) {
770
+ return K;
771
+ })) {
772
+ E = N, D = !1;
773
+ break;
774
+ }
775
+ O.set(N, q);
776
+ }
777
+ if (D)
778
+ for (var be = h ? 3 : 1, se = function(Q) {
779
+ var le = b.find(function(ue) {
780
+ var k = O.get(ue);
781
+ if (k)
782
+ return k.slice(0, Q).every(function(L) {
783
+ return L;
784
+ });
785
+ });
786
+ if (le)
787
+ return E = le, "break";
788
+ }, ve = be; ve > 0; ve--) {
789
+ var ne = se(ve);
790
+ if (ne === "break")
791
+ break;
792
+ }
793
+ o.placement !== E && (o.modifiersData[r]._skip = !0, o.placement = E, o.reset = !0);
794
+ }
795
+ }
796
+ const nn = {
797
+ name: "flip",
798
+ enabled: !0,
799
+ phase: "main",
800
+ fn: rn,
801
+ requiresIfExists: ["offset"],
802
+ data: {
803
+ _skip: !1
804
+ }
805
+ };
806
+ function Wo(e, o, t) {
807
+ return t === void 0 && (t = {
808
+ x: 0,
809
+ y: 0
810
+ }), {
811
+ top: e.top - o.height - t.y,
812
+ right: e.right - o.width + t.x,
813
+ bottom: e.bottom - o.height + t.y,
814
+ left: e.left - o.width - t.x
815
+ };
816
+ }
817
+ function Xo(e) {
818
+ return [H, ie, re, F].some(function(o) {
819
+ return e[o] >= 0;
820
+ });
821
+ }
822
+ function an(e) {
823
+ var o = e.state, t = e.name, r = o.rects.reference, i = o.rects.popper, n = o.modifiersData.preventOverflow, a = tt(o, {
824
+ elementContext: "reference"
825
+ }), s = tt(o, {
826
+ altBoundary: !0
827
+ }), l = Wo(a, r), d = Wo(s, i, n), p = Xo(l), f = Xo(d);
828
+ o.modifiersData[t] = {
829
+ referenceClippingOffsets: l,
830
+ popperEscapeOffsets: d,
831
+ isReferenceHidden: p,
832
+ hasPopperEscaped: f
833
+ }, o.attributes.popper = Object.assign({}, o.attributes.popper, {
834
+ "data-popper-reference-hidden": p,
835
+ "data-popper-escaped": f
836
+ });
837
+ }
838
+ const sn = {
839
+ name: "hide",
840
+ enabled: !0,
841
+ phase: "main",
842
+ requiresIfExists: ["preventOverflow"],
843
+ fn: an
844
+ };
845
+ function ln(e, o, t) {
846
+ var r = fe(e), i = [F, H].indexOf(r) >= 0 ? -1 : 1, n = typeof t == "function" ? t(Object.assign({}, o, {
847
+ placement: e
848
+ })) : t, a = n[0], s = n[1];
849
+ return a = a || 0, s = (s || 0) * i, [F, ie].indexOf(r) >= 0 ? {
850
+ x: s,
851
+ y: a
852
+ } : {
853
+ x: a,
854
+ y: s
855
+ };
856
+ }
857
+ function un(e) {
858
+ var o = e.state, t = e.options, r = e.name, i = t.offset, n = i === void 0 ? [0, 0] : i, a = or.reduce(function(p, f) {
859
+ return p[f] = ln(f, o.rects, n), p;
860
+ }, {}), s = a[o.placement], l = s.x, d = s.y;
861
+ o.modifiersData.popperOffsets != null && (o.modifiersData.popperOffsets.x += l, o.modifiersData.popperOffsets.y += d), o.modifiersData[r] = a;
862
+ }
863
+ const pn = {
864
+ name: "offset",
865
+ enabled: !0,
866
+ phase: "main",
867
+ requires: ["popperOffsets"],
868
+ fn: un
869
+ };
870
+ function dn(e) {
871
+ var o = e.state, t = e.name;
872
+ o.modifiersData[t] = ur({
873
+ reference: o.rects.reference,
874
+ element: o.rects.popper,
875
+ strategy: "absolute",
876
+ placement: o.placement
877
+ });
878
+ }
879
+ const fn = {
880
+ name: "popperOffsets",
881
+ enabled: !0,
882
+ phase: "read",
883
+ fn: dn,
884
+ data: {}
885
+ };
886
+ function cn(e) {
887
+ return e === "x" ? "y" : "x";
888
+ }
889
+ function vn(e) {
890
+ var o = e.state, t = e.options, r = e.name, i = t.mainAxis, n = i === void 0 ? !0 : i, a = t.altAxis, s = a === void 0 ? !1 : a, l = t.boundary, d = t.rootBoundary, p = t.altBoundary, f = t.padding, c = t.tether, v = c === void 0 ? !0 : c, h = t.tetherOffset, m = h === void 0 ? 0 : h, g = tt(o, {
891
+ boundary: l,
892
+ rootBoundary: d,
893
+ padding: f,
894
+ altBoundary: p
895
+ }), P = fe(o.placement), S = ke(o.placement), y = !S, b = io(P), w = cn(b), T = o.modifiersData.popperOffsets, O = o.rects.reference, D = o.rects.popper, E = typeof m == "function" ? m(Object.assign({}, o.rects, {
896
+ placement: o.placement
897
+ })) : m, A = typeof E == "number" ? {
898
+ mainAxis: E,
899
+ altAxis: E
900
+ } : Object.assign({
901
+ mainAxis: 0,
902
+ altAxis: 0
903
+ }, E), N = o.modifiersData.offset ? o.modifiersData.offset[o.placement] : null, $ = {
904
+ x: 0,
905
+ y: 0
906
+ };
907
+ if (T) {
908
+ if (n) {
909
+ var Y, Z = b === "y" ? H : F, U = b === "y" ? re : ie, B = b === "y" ? "height" : "width", W = T[b], X = W + g[Z], q = W - g[U], be = v ? -D[B] / 2 : 0, se = S === $e ? O[B] : D[B], ve = S === $e ? -D[B] : -O[B], ne = o.elements.arrow, K = v && ne ? ro(ne) : {
910
+ width: 0,
911
+ height: 0
912
+ }, Q = o.modifiersData["arrow#persistent"] ? o.modifiersData["arrow#persistent"].padding : nr(), le = Q[Z], ue = Q[U], k = Ge(0, O[B], K[B]), L = y ? O[B] / 2 - be - k - le - A.mainAxis : se - k - le - A.mainAxis, me = y ? -O[B] / 2 + be + k + ue + A.mainAxis : ve + k + ue + A.mainAxis, j = o.elements.arrow && rt(o.elements.arrow), Le = j ? b === "y" ? j.clientTop || 0 : j.clientLeft || 0 : 0, _e = (Y = N == null ? void 0 : N[b]) != null ? Y : 0, nt = W + L - _e - Le, I = W + me - _e, Ye = Ge(v ? Ct(X, nt) : X, W, v ? Re(q, I) : q);
913
+ T[b] = Ye, $[b] = Ye - W;
914
+ }
915
+ if (s) {
916
+ var at, V = b === "x" ? H : F, st = b === "x" ? re : ie, ae = T[w], Be = w === "y" ? "height" : "width", Oe = ae + g[V], ze = ae - g[st], ye = [H, F].indexOf(P) !== -1, Ee = (at = N == null ? void 0 : N[w]) != null ? at : 0, pe = ye ? Oe : ae - O[Be] - D[Be] - Ee + A.altAxis, Ve = ye ? ae + O[Be] + D[Be] - Ee - A.altAxis : ze, lt = v && ye ? $i(pe, ae, Ve) : Ge(v ? pe : Oe, ae, v ? Ve : ze);
917
+ T[w] = lt, $[w] = lt - ae;
918
+ }
919
+ o.modifiersData[r] = $;
920
+ }
921
+ }
922
+ const mn = {
923
+ name: "preventOverflow",
924
+ enabled: !0,
925
+ phase: "main",
926
+ fn: vn,
927
+ requiresIfExists: ["offset"]
928
+ };
929
+ function hn(e) {
930
+ return {
931
+ scrollLeft: e.scrollLeft,
932
+ scrollTop: e.scrollTop
933
+ };
934
+ }
935
+ function gn(e) {
936
+ return e === J(e) || !oe(e) ? no(e) : hn(e);
937
+ }
938
+ function bn(e) {
939
+ var o = e.getBoundingClientRect(), t = We(o.width) / e.offsetWidth || 1, r = We(o.height) / e.offsetHeight || 1;
940
+ return t !== 1 || r !== 1;
941
+ }
942
+ function yn(e, o, t) {
943
+ t === void 0 && (t = !1);
944
+ var r = oe(o), i = oe(o) && bn(o), n = Ce(o), a = Xe(e, i, t), s = {
945
+ scrollLeft: 0,
946
+ scrollTop: 0
947
+ }, l = {
948
+ x: 0,
949
+ y: 0
950
+ };
951
+ return (r || !r && !t) && ((ce(o) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
952
+ so(n)) && (s = gn(o)), oe(o) ? (l = Xe(o, !0), l.x += o.clientLeft, l.y += o.clientTop) : n && (l.x = ao(n))), {
953
+ x: a.left + s.scrollLeft - l.x,
954
+ y: a.top + s.scrollTop - l.y,
955
+ width: a.width,
956
+ height: a.height
957
+ };
958
+ }
959
+ function wn(e) {
960
+ var o = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), r = [];
961
+ e.forEach(function(n) {
962
+ o.set(n.name, n);
963
+ });
964
+ function i(n) {
965
+ t.add(n.name);
966
+ var a = [].concat(n.requires || [], n.requiresIfExists || []);
967
+ a.forEach(function(s) {
968
+ if (!t.has(s)) {
969
+ var l = o.get(s);
970
+ l && i(l);
971
+ }
972
+ }), r.push(n);
973
+ }
974
+ return e.forEach(function(n) {
975
+ t.has(n.name) || i(n);
976
+ }), r;
977
+ }
978
+ function Pn(e) {
979
+ var o = wn(e);
980
+ return Ni.reduce(function(t, r) {
981
+ return t.concat(o.filter(function(i) {
982
+ return i.phase === r;
983
+ }));
984
+ }, []);
985
+ }
986
+ function Tn(e) {
987
+ var o;
988
+ return function() {
989
+ return o || (o = new Promise(function(t) {
990
+ Promise.resolve().then(function() {
991
+ o = void 0, t(e());
992
+ });
993
+ })), o;
994
+ };
995
+ }
996
+ function Cn(e) {
997
+ var o = e.reduce(function(t, r) {
998
+ var i = t[r.name];
999
+ return t[r.name] = i ? Object.assign({}, i, r, {
1000
+ options: Object.assign({}, i.options, r.options),
1001
+ data: Object.assign({}, i.data, r.data)
1002
+ }) : r, t;
1003
+ }, {});
1004
+ return Object.keys(o).map(function(t) {
1005
+ return o[t];
1006
+ });
1007
+ }
1008
+ var ko = {
1009
+ placement: "bottom",
1010
+ modifiers: [],
1011
+ strategy: "absolute"
1012
+ };
1013
+ function jo() {
1014
+ for (var e = arguments.length, o = new Array(e), t = 0; t < e; t++)
1015
+ o[t] = arguments[t];
1016
+ return !o.some(function(r) {
1017
+ return !(r && typeof r.getBoundingClientRect == "function");
1018
+ });
1019
+ }
1020
+ function Sn(e) {
1021
+ e === void 0 && (e = {});
1022
+ var o = e, t = o.defaultModifiers, r = t === void 0 ? [] : t, i = o.defaultOptions, n = i === void 0 ? ko : i;
1023
+ return function(s, l, d) {
1024
+ d === void 0 && (d = n);
1025
+ var p = {
1026
+ placement: "bottom",
1027
+ orderedModifiers: [],
1028
+ options: Object.assign({}, ko, n),
1029
+ modifiersData: {},
1030
+ elements: {
1031
+ reference: s,
1032
+ popper: l
1033
+ },
1034
+ attributes: {},
1035
+ styles: {}
1036
+ }, f = [], c = !1, v = {
1037
+ state: p,
1038
+ setOptions: function(P) {
1039
+ var S = typeof P == "function" ? P(p.options) : P;
1040
+ m(), p.options = Object.assign({}, n, p.options, S), p.scrollParents = {
1041
+ reference: De(s) ? Je(s) : s.contextElement ? Je(s.contextElement) : [],
1042
+ popper: Je(l)
1043
+ };
1044
+ var y = Pn(Cn([].concat(r, p.options.modifiers)));
1045
+ return p.orderedModifiers = y.filter(function(b) {
1046
+ return b.enabled;
1047
+ }), h(), v.update();
1048
+ },
1049
+ // Sync update – it will always be executed, even if not necessary. This
1050
+ // is useful for low frequency updates where sync behavior simplifies the
1051
+ // logic.
1052
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
1053
+ // prefer the async Popper#update method
1054
+ forceUpdate: function() {
1055
+ if (!c) {
1056
+ var P = p.elements, S = P.reference, y = P.popper;
1057
+ if (jo(S, y)) {
1058
+ p.rects = {
1059
+ reference: yn(S, rt(y), p.options.strategy === "fixed"),
1060
+ popper: ro(y)
1061
+ }, p.reset = !1, p.placement = p.options.placement, p.orderedModifiers.forEach(function(A) {
1062
+ return p.modifiersData[A.name] = Object.assign({}, A.data);
1063
+ });
1064
+ for (var b = 0; b < p.orderedModifiers.length; b++) {
1065
+ if (p.reset === !0) {
1066
+ p.reset = !1, b = -1;
1067
+ continue;
1068
+ }
1069
+ var w = p.orderedModifiers[b], T = w.fn, O = w.options, D = O === void 0 ? {} : O, E = w.name;
1070
+ typeof T == "function" && (p = T({
1071
+ state: p,
1072
+ options: D,
1073
+ name: E,
1074
+ instance: v
1075
+ }) || p);
1076
+ }
1077
+ }
1078
+ }
1079
+ },
1080
+ // Async and optimistically optimized update – it will not be executed if
1081
+ // not necessary (debounced to run at most once-per-tick)
1082
+ update: Tn(function() {
1083
+ return new Promise(function(g) {
1084
+ v.forceUpdate(), g(p);
1085
+ });
1086
+ }),
1087
+ destroy: function() {
1088
+ m(), c = !0;
1089
+ }
1090
+ };
1091
+ if (!jo(s, l))
1092
+ return v;
1093
+ v.setOptions(d).then(function(g) {
1094
+ !c && d.onFirstUpdate && d.onFirstUpdate(g);
1095
+ });
1096
+ function h() {
1097
+ p.orderedModifiers.forEach(function(g) {
1098
+ var P = g.name, S = g.options, y = S === void 0 ? {} : S, b = g.effect;
1099
+ if (typeof b == "function") {
1100
+ var w = b({
1101
+ state: p,
1102
+ name: P,
1103
+ instance: v,
1104
+ options: y
1105
+ }), T = function() {
1106
+ };
1107
+ f.push(w || T);
1108
+ }
1109
+ });
1110
+ }
1111
+ function m() {
1112
+ f.forEach(function(g) {
1113
+ return g();
1114
+ }), f = [];
1115
+ }
1116
+ return v;
1117
+ };
1118
+ }
1119
+ var On = [Ui, fn, Fi, Yi, pn, nn, mn, ji, sn], En = /* @__PURE__ */ Sn({
1120
+ defaultModifiers: On
1121
+ });
1122
+ function An(e) {
1123
+ return Dt("MuiPopper", e);
1124
+ }
1125
+ Nt("MuiPopper", ["root"]);
1126
+ const Rn = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"], xn = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"];
1127
+ function Dn(e, o) {
1128
+ if (o === "ltr")
1129
+ return e;
1130
+ switch (e) {
1131
+ case "bottom-end":
1132
+ return "bottom-start";
1133
+ case "bottom-start":
1134
+ return "bottom-end";
1135
+ case "top-end":
1136
+ return "top-start";
1137
+ case "top-start":
1138
+ return "top-end";
1139
+ default:
1140
+ return e;
1141
+ }
1142
+ }
1143
+ function St(e) {
1144
+ return typeof e == "function" ? e() : e;
1145
+ }
1146
+ function Bt(e) {
1147
+ return e.nodeType !== void 0;
1148
+ }
1149
+ function Nn(e) {
1150
+ return !Bt(e);
1151
+ }
1152
+ const Mn = () => _t({
1153
+ root: ["root"]
1154
+ }, yi(An)), _n = {}, Yn = /* @__PURE__ */ R.forwardRef(function(o, t) {
1155
+ var r;
1156
+ const {
1157
+ anchorEl: i,
1158
+ children: n,
1159
+ direction: a,
1160
+ disablePortal: s,
1161
+ modifiers: l,
1162
+ open: d,
1163
+ placement: p,
1164
+ popperOptions: f,
1165
+ popperRef: c,
1166
+ slotProps: v = {},
1167
+ slots: h = {},
1168
+ TransitionProps: m
1169
+ // @ts-ignore internal logic
1170
+ // prevent from spreading to DOM, it can come from the parent component e.g. Select.
1171
+ } = o, g = Ne(o, Rn), P = R.useRef(null), S = qt(P, t), y = R.useRef(null), b = qt(y, c), w = R.useRef(b);
1172
+ Mo(() => {
1173
+ w.current = b;
1174
+ }, [b]), R.useImperativeHandle(c, () => y.current, []);
1175
+ const T = Dn(p, a), [O, D] = R.useState(T), [E, A] = R.useState(St(i));
1176
+ R.useEffect(() => {
1177
+ y.current && y.current.forceUpdate();
1178
+ }), R.useEffect(() => {
1179
+ i && A(St(i));
1180
+ }, [i]), Mo(() => {
1181
+ if (!E || !d)
1182
+ return;
1183
+ const U = (X) => {
1184
+ D(X.placement);
1185
+ };
1186
+ if (process.env.NODE_ENV !== "production" && E && Bt(E) && E.nodeType === 1) {
1187
+ const X = E.getBoundingClientRect();
1188
+ process.env.NODE_ENV !== "test" && X.top === 0 && X.left === 0 && X.right === 0 && X.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(`
1189
+ `));
1190
+ }
1191
+ let B = [{
1192
+ name: "preventOverflow",
1193
+ options: {
1194
+ altBoundary: s
1195
+ }
1196
+ }, {
1197
+ name: "flip",
1198
+ options: {
1199
+ altBoundary: s
1200
+ }
1201
+ }, {
1202
+ name: "onUpdate",
1203
+ enabled: !0,
1204
+ phase: "afterWrite",
1205
+ fn: ({
1206
+ state: X
1207
+ }) => {
1208
+ U(X);
1209
+ }
1210
+ }];
1211
+ l != null && (B = B.concat(l)), f && f.modifiers != null && (B = B.concat(f.modifiers));
1212
+ const W = En(E, P.current, C({
1213
+ placement: T
1214
+ }, f, {
1215
+ modifiers: B
1216
+ }));
1217
+ return w.current(W), () => {
1218
+ W.destroy(), w.current(null);
1219
+ };
1220
+ }, [E, s, l, d, f, T]);
1221
+ const N = {
1222
+ placement: O
1223
+ };
1224
+ m !== null && (N.TransitionProps = m);
1225
+ const $ = Mn(), Y = (r = h.root) != null ? r : "div", Z = Zr({
1226
+ elementType: Y,
1227
+ externalSlotProps: v.root,
1228
+ externalForwardedProps: g,
1229
+ additionalProps: {
1230
+ role: "tooltip",
1231
+ ref: S
1232
+ },
1233
+ ownerState: o,
1234
+ className: $.root
1235
+ });
1236
+ return /* @__PURE__ */ _(Y, C({}, Z, {
1237
+ children: typeof n == "function" ? n(N) : n
1238
+ }));
1239
+ }), pr = /* @__PURE__ */ R.forwardRef(function(o, t) {
1240
+ const {
1241
+ anchorEl: r,
1242
+ children: i,
1243
+ container: n,
1244
+ direction: a = "ltr",
1245
+ disablePortal: s = !1,
1246
+ keepMounted: l = !1,
1247
+ modifiers: d,
1248
+ open: p,
1249
+ placement: f = "bottom",
1250
+ popperOptions: c = _n,
1251
+ popperRef: v,
1252
+ style: h,
1253
+ transition: m = !1,
1254
+ slotProps: g = {},
1255
+ slots: P = {}
1256
+ } = o, S = Ne(o, xn), [y, b] = R.useState(!0), w = () => {
1257
+ b(!1);
1258
+ }, T = () => {
1259
+ b(!0);
1260
+ };
1261
+ if (!l && !p && (!m || y))
1262
+ return null;
1263
+ let O;
1264
+ if (n)
1265
+ O = n;
1266
+ else if (r) {
1267
+ const A = St(r);
1268
+ O = A && Bt(A) ? Do(A).body : Do(null).body;
1269
+ }
1270
+ const D = !p && l && (!m || y) ? "none" : void 0, E = m ? {
1271
+ in: p,
1272
+ onEnter: w,
1273
+ onExited: T
1274
+ } : void 0;
1275
+ return /* @__PURE__ */ _(Fr, {
1276
+ disablePortal: s,
1277
+ container: O,
1278
+ children: /* @__PURE__ */ _(Yn, C({
1279
+ anchorEl: r,
1280
+ direction: a,
1281
+ disablePortal: s,
1282
+ modifiers: d,
1283
+ ref: t,
1284
+ open: m ? !y : p,
1285
+ placement: f,
1286
+ popperOptions: c,
1287
+ popperRef: v,
1288
+ slotProps: g,
1289
+ slots: P
1290
+ }, S, {
1291
+ style: C({
1292
+ // Prevents scroll issue, waiting for Popper.js to add this style once initiated.
1293
+ position: "fixed",
1294
+ // Fix Popper.js display issue
1295
+ top: 0,
1296
+ left: 0,
1297
+ display: D
1298
+ }, h),
1299
+ TransitionProps: E,
1300
+ children: i
1301
+ }))
1302
+ });
1303
+ });
1304
+ process.env.NODE_ENV !== "production" && (pr.propTypes = {
1305
+ // ----------------------------- Warning --------------------------------
1306
+ // | These PropTypes are generated from the TypeScript type definitions |
1307
+ // | To update them edit TypeScript types and run "yarn proptypes" |
1308
+ // ----------------------------------------------------------------------
1309
+ /**
1310
+ * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
1311
+ * or a function that returns either.
1312
+ * It's used to set the position of the popper.
1313
+ * The return value will passed as the reference object of the Popper instance.
1314
+ */
1315
+ anchorEl: Jo(u.oneOfType([Pt, u.object, u.func]), (e) => {
1316
+ if (e.open) {
1317
+ const o = St(e.anchorEl);
1318
+ if (o && Bt(o) && o.nodeType === 1) {
1319
+ const t = o.getBoundingClientRect();
1320
+ if (process.env.NODE_ENV !== "test" && t.top === 0 && t.left === 0 && t.right === 0 && t.bottom === 0)
1321
+ 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(`
1322
+ `));
1323
+ } else if (!o || typeof o.getBoundingClientRect != "function" || Nn(o) && o.contextElement != null && o.contextElement.nodeType !== 1)
1324
+ 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(`
1325
+ `));
1326
+ }
1327
+ return null;
1328
+ }),
1329
+ /**
1330
+ * Popper render function or node.
1331
+ */
1332
+ children: u.oneOfType([u.node, u.func]),
1333
+ /**
1334
+ * An HTML element or function that returns one.
1335
+ * The `container` will have the portal children appended to it.
1336
+ *
1337
+ * By default, it uses the body of the top-level document object,
1338
+ * so it's simply `document.body` most of the time.
1339
+ */
1340
+ container: u.oneOfType([Pt, u.func]),
1341
+ /**
1342
+ * Direction of the text.
1343
+ * @default 'ltr'
1344
+ */
1345
+ direction: u.oneOf(["ltr", "rtl"]),
1346
+ /**
1347
+ * The `children` will be under the DOM hierarchy of the parent component.
1348
+ * @default false
1349
+ */
1350
+ disablePortal: u.bool,
1351
+ /**
1352
+ * Always keep the children in the DOM.
1353
+ * This prop can be useful in SEO situation or
1354
+ * when you want to maximize the responsiveness of the Popper.
1355
+ * @default false
1356
+ */
1357
+ keepMounted: u.bool,
1358
+ /**
1359
+ * Popper.js is based on a "plugin-like" architecture,
1360
+ * most of its features are fully encapsulated "modifiers".
1361
+ *
1362
+ * A modifier is a function that is called each time Popper.js needs to
1363
+ * compute the position of the popper.
1364
+ * For this reason, modifiers should be very performant to avoid bottlenecks.
1365
+ * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
1366
+ */
1367
+ modifiers: u.arrayOf(u.shape({
1368
+ data: u.object,
1369
+ effect: u.func,
1370
+ enabled: u.bool,
1371
+ fn: u.func,
1372
+ name: u.any,
1373
+ options: u.object,
1374
+ phase: u.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]),
1375
+ requires: u.arrayOf(u.string),
1376
+ requiresIfExists: u.arrayOf(u.string)
1377
+ })),
1378
+ /**
1379
+ * If `true`, the component is shown.
1380
+ */
1381
+ open: u.bool.isRequired,
1382
+ /**
1383
+ * Popper placement.
1384
+ * @default 'bottom'
1385
+ */
1386
+ placement: u.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"]),
1387
+ /**
1388
+ * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
1389
+ * @default {}
1390
+ */
1391
+ popperOptions: u.shape({
1392
+ modifiers: u.array,
1393
+ onFirstUpdate: u.func,
1394
+ placement: u.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"]),
1395
+ strategy: u.oneOf(["absolute", "fixed"])
1396
+ }),
1397
+ /**
1398
+ * A ref that points to the used popper instance.
1399
+ */
1400
+ popperRef: Io,
1401
+ /**
1402
+ * The props used for each slot inside the Popper.
1403
+ * @default {}
1404
+ */
1405
+ slotProps: u.shape({
1406
+ root: u.oneOfType([u.func, u.object])
1407
+ }),
1408
+ /**
1409
+ * The components used for each slot inside the Popper.
1410
+ * Either a string to use a HTML element or a component.
1411
+ * @default {}
1412
+ */
1413
+ slots: u.shape({
1414
+ root: u.elementType
1415
+ }),
1416
+ /**
1417
+ * Help supporting a react-transition-group/Transition component.
1418
+ * @default false
1419
+ */
1420
+ transition: u.bool
1421
+ });
1422
+ const Bn = ["anchorEl", "component", "components", "componentsProps", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "transition", "slots", "slotProps"], zn = Me(pr, {
1423
+ name: "MuiPopper",
1424
+ slot: "Root",
1425
+ overridesResolver: (e, o) => o.root
1426
+ })({}), dr = /* @__PURE__ */ R.forwardRef(function(o, t) {
1427
+ var r;
1428
+ const i = ni(), n = Mt({
1429
+ props: o,
1430
+ name: "MuiPopper"
1431
+ }), {
1432
+ anchorEl: a,
1433
+ component: s,
1434
+ components: l,
1435
+ componentsProps: d,
1436
+ container: p,
1437
+ disablePortal: f,
1438
+ keepMounted: c,
1439
+ modifiers: v,
1440
+ open: h,
1441
+ placement: m,
1442
+ popperOptions: g,
1443
+ popperRef: P,
1444
+ transition: S,
1445
+ slots: y,
1446
+ slotProps: b
1447
+ } = n, w = Ne(n, Bn), T = (r = y == null ? void 0 : y.root) != null ? r : l == null ? void 0 : l.Root, O = C({
1448
+ anchorEl: a,
1449
+ container: p,
1450
+ disablePortal: f,
1451
+ keepMounted: c,
1452
+ modifiers: v,
1453
+ open: h,
1454
+ placement: m,
1455
+ popperOptions: g,
1456
+ popperRef: P,
1457
+ transition: S
1458
+ }, w);
1459
+ return /* @__PURE__ */ _(zn, C({
1460
+ as: s,
1461
+ direction: i == null ? void 0 : i.direction,
1462
+ slots: {
1463
+ root: T
1464
+ },
1465
+ slotProps: b ?? d
1466
+ }, O, {
1467
+ ref: t
1468
+ }));
1469
+ });
1470
+ process.env.NODE_ENV !== "production" && (dr.propTypes = {
1471
+ // ----------------------------- Warning --------------------------------
1472
+ // | These PropTypes are generated from the TypeScript type definitions |
1473
+ // | To update them edit TypeScript types and run "yarn proptypes" |
1474
+ // ----------------------------------------------------------------------
1475
+ /**
1476
+ * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
1477
+ * or a function that returns either.
1478
+ * It's used to set the position of the popper.
1479
+ * The return value will passed as the reference object of the Popper instance.
1480
+ */
1481
+ anchorEl: u.oneOfType([Pt, u.object, u.func]),
1482
+ /**
1483
+ * Popper render function or node.
1484
+ */
1485
+ children: u.oneOfType([u.node, u.func]),
1486
+ /**
1487
+ * The component used for the root node.
1488
+ * Either a string to use a HTML element or a component.
1489
+ */
1490
+ component: u.elementType,
1491
+ /**
1492
+ * The components used for each slot inside the Popper.
1493
+ * Either a string to use a HTML element or a component.
1494
+ * @default {}
1495
+ */
1496
+ components: u.shape({
1497
+ Root: u.elementType
1498
+ }),
1499
+ /**
1500
+ * The props used for each slot inside the Popper.
1501
+ * @default {}
1502
+ */
1503
+ componentsProps: u.shape({
1504
+ root: u.oneOfType([u.func, u.object])
1505
+ }),
1506
+ /**
1507
+ * An HTML element or function that returns one.
1508
+ * The `container` will have the portal children appended to it.
1509
+ *
1510
+ * By default, it uses the body of the top-level document object,
1511
+ * so it's simply `document.body` most of the time.
1512
+ */
1513
+ container: u.oneOfType([Pt, u.func]),
1514
+ /**
1515
+ * The `children` will be under the DOM hierarchy of the parent component.
1516
+ * @default false
1517
+ */
1518
+ disablePortal: u.bool,
1519
+ /**
1520
+ * Always keep the children in the DOM.
1521
+ * This prop can be useful in SEO situation or
1522
+ * when you want to maximize the responsiveness of the Popper.
1523
+ * @default false
1524
+ */
1525
+ keepMounted: u.bool,
1526
+ /**
1527
+ * Popper.js is based on a "plugin-like" architecture,
1528
+ * most of its features are fully encapsulated "modifiers".
1529
+ *
1530
+ * A modifier is a function that is called each time Popper.js needs to
1531
+ * compute the position of the popper.
1532
+ * For this reason, modifiers should be very performant to avoid bottlenecks.
1533
+ * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
1534
+ */
1535
+ modifiers: u.arrayOf(u.shape({
1536
+ data: u.object,
1537
+ effect: u.func,
1538
+ enabled: u.bool,
1539
+ fn: u.func,
1540
+ name: u.any,
1541
+ options: u.object,
1542
+ phase: u.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]),
1543
+ requires: u.arrayOf(u.string),
1544
+ requiresIfExists: u.arrayOf(u.string)
1545
+ })),
1546
+ /**
1547
+ * If `true`, the component is shown.
1548
+ */
1549
+ open: u.bool.isRequired,
1550
+ /**
1551
+ * Popper placement.
1552
+ * @default 'bottom'
1553
+ */
1554
+ placement: u.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"]),
1555
+ /**
1556
+ * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
1557
+ * @default {}
1558
+ */
1559
+ popperOptions: u.shape({
1560
+ modifiers: u.array,
1561
+ onFirstUpdate: u.func,
1562
+ placement: u.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"]),
1563
+ strategy: u.oneOf(["absolute", "fixed"])
1564
+ }),
1565
+ /**
1566
+ * A ref that points to the used popper instance.
1567
+ */
1568
+ popperRef: Io,
1569
+ /**
1570
+ * The props used for each slot inside the Popper.
1571
+ * @default {}
1572
+ */
1573
+ slotProps: u.shape({
1574
+ root: u.oneOfType([u.func, u.object])
1575
+ }),
1576
+ /**
1577
+ * The components used for each slot inside the Popper.
1578
+ * Either a string to use a HTML element or a component.
1579
+ * @default {}
1580
+ */
1581
+ slots: u.shape({
1582
+ root: u.elementType
1583
+ }),
1584
+ /**
1585
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1586
+ */
1587
+ sx: u.oneOfType([u.arrayOf(u.oneOfType([u.func, u.object, u.bool])), u.func, u.object]),
1588
+ /**
1589
+ * Help supporting a react-transition-group/Transition component.
1590
+ * @default false
1591
+ */
1592
+ transition: u.bool
1593
+ });
1594
+ const fr = dr, $n = Jr(), cr = pi({
1595
+ themeId: ai,
1596
+ defaultTheme: $n,
1597
+ defaultClassName: "MuiBox-root",
1598
+ generateClassName: Ir.generate
1599
+ });
1600
+ process.env.NODE_ENV !== "production" && (cr.propTypes = {
1601
+ // ----------------------------- Warning --------------------------------
1602
+ // | These PropTypes are generated from the TypeScript type definitions |
1603
+ // | To update them edit the d.ts file and run "yarn proptypes" |
1604
+ // ----------------------------------------------------------------------
1605
+ /**
1606
+ * @ignore
1607
+ */
1608
+ children: u.node,
1609
+ /**
1610
+ * The component used for the root node.
1611
+ * Either a string to use a HTML element or a component.
1612
+ */
1613
+ component: u.elementType,
1614
+ /**
1615
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1616
+ */
1617
+ sx: u.oneOfType([u.arrayOf(u.oneOfType([u.func, u.object, u.bool])), u.func, u.object])
1618
+ });
1619
+ const Wn = cr;
1620
+ function Xn(e) {
1621
+ return Dt("MuiDivider", e);
1622
+ }
1623
+ Nt("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]);
1624
+ const kn = ["absolute", "children", "className", "component", "flexItem", "light", "orientation", "role", "textAlign", "variant"], jn = (e) => {
1625
+ const {
1626
+ absolute: o,
1627
+ children: t,
1628
+ classes: r,
1629
+ flexItem: i,
1630
+ light: n,
1631
+ orientation: a,
1632
+ textAlign: s,
1633
+ variant: l
1634
+ } = e;
1635
+ return _t({
1636
+ root: ["root", o && "absolute", l, n && "light", a === "vertical" && "vertical", i && "flexItem", t && "withChildren", t && a === "vertical" && "withChildrenVertical", s === "right" && a !== "vertical" && "textAlignRight", s === "left" && a !== "vertical" && "textAlignLeft"],
1637
+ wrapper: ["wrapper", a === "vertical" && "wrapperVertical"]
1638
+ }, Xn, r);
1639
+ }, Ln = Me("div", {
1640
+ name: "MuiDivider",
1641
+ slot: "Root",
1642
+ overridesResolver: (e, o) => {
1643
+ const {
1644
+ ownerState: t
1645
+ } = e;
1646
+ return [o.root, t.absolute && o.absolute, o[t.variant], t.light && o.light, t.orientation === "vertical" && o.vertical, t.flexItem && o.flexItem, t.children && o.withChildren, t.children && t.orientation === "vertical" && o.withChildrenVertical, t.textAlign === "right" && t.orientation !== "vertical" && o.textAlignRight, t.textAlign === "left" && t.orientation !== "vertical" && o.textAlignLeft];
1647
+ }
1648
+ })(({
1649
+ theme: e,
1650
+ ownerState: o
1651
+ }) => C({
1652
+ margin: 0,
1653
+ // Reset browser default style.
1654
+ flexShrink: 0,
1655
+ borderWidth: 0,
1656
+ borderStyle: "solid",
1657
+ borderColor: (e.vars || e).palette.divider,
1658
+ borderBottomWidth: "thin"
1659
+ }, o.absolute && {
1660
+ position: "absolute",
1661
+ bottom: 0,
1662
+ left: 0,
1663
+ width: "100%"
1664
+ }, o.light && {
1665
+ borderColor: e.vars ? `rgba(${e.vars.palette.dividerChannel} / 0.08)` : Ie(e.palette.divider, 0.08)
1666
+ }, o.variant === "inset" && {
1667
+ marginLeft: 72
1668
+ }, o.variant === "middle" && o.orientation === "horizontal" && {
1669
+ marginLeft: e.spacing(2),
1670
+ marginRight: e.spacing(2)
1671
+ }, o.variant === "middle" && o.orientation === "vertical" && {
1672
+ marginTop: e.spacing(1),
1673
+ marginBottom: e.spacing(1)
1674
+ }, o.orientation === "vertical" && {
1675
+ height: "100%",
1676
+ borderBottomWidth: 0,
1677
+ borderRightWidth: "thin"
1678
+ }, o.flexItem && {
1679
+ alignSelf: "stretch",
1680
+ height: "auto"
1681
+ }), ({
1682
+ ownerState: e
1683
+ }) => C({}, e.children && {
1684
+ display: "flex",
1685
+ whiteSpace: "nowrap",
1686
+ textAlign: "center",
1687
+ border: 0,
1688
+ "&::before, &::after": {
1689
+ content: '""',
1690
+ alignSelf: "center"
1691
+ }
1692
+ }), ({
1693
+ theme: e,
1694
+ ownerState: o
1695
+ }) => C({}, o.children && o.orientation !== "vertical" && {
1696
+ "&::before, &::after": {
1697
+ width: "100%",
1698
+ borderTop: `thin solid ${(e.vars || e).palette.divider}`
1699
+ }
1700
+ }), ({
1701
+ theme: e,
1702
+ ownerState: o
1703
+ }) => C({}, o.children && o.orientation === "vertical" && {
1704
+ flexDirection: "column",
1705
+ "&::before, &::after": {
1706
+ height: "100%",
1707
+ borderLeft: `thin solid ${(e.vars || e).palette.divider}`
1708
+ }
1709
+ }), ({
1710
+ ownerState: e
1711
+ }) => C({}, e.textAlign === "right" && e.orientation !== "vertical" && {
1712
+ "&::before": {
1713
+ width: "90%"
1714
+ },
1715
+ "&::after": {
1716
+ width: "10%"
1717
+ }
1718
+ }, e.textAlign === "left" && e.orientation !== "vertical" && {
1719
+ "&::before": {
1720
+ width: "10%"
1721
+ },
1722
+ "&::after": {
1723
+ width: "90%"
1724
+ }
1725
+ })), Vn = Me("span", {
1726
+ name: "MuiDivider",
1727
+ slot: "Wrapper",
1728
+ overridesResolver: (e, o) => {
1729
+ const {
1730
+ ownerState: t
1731
+ } = e;
1732
+ return [o.wrapper, t.orientation === "vertical" && o.wrapperVertical];
1733
+ }
1734
+ })(({
1735
+ theme: e,
1736
+ ownerState: o
1737
+ }) => C({
1738
+ display: "inline-block",
1739
+ paddingLeft: `calc(${e.spacing(1)} * 1.2)`,
1740
+ paddingRight: `calc(${e.spacing(1)} * 1.2)`
1741
+ }, o.orientation === "vertical" && {
1742
+ paddingTop: `calc(${e.spacing(1)} * 1.2)`,
1743
+ paddingBottom: `calc(${e.spacing(1)} * 1.2)`
1744
+ })), lo = /* @__PURE__ */ R.forwardRef(function(o, t) {
1745
+ const r = Mt({
1746
+ props: o,
1747
+ name: "MuiDivider"
1748
+ }), {
1749
+ absolute: i = !1,
1750
+ children: n,
1751
+ className: a,
1752
+ component: s = n ? "div" : "hr",
1753
+ flexItem: l = !1,
1754
+ light: d = !1,
1755
+ orientation: p = "horizontal",
1756
+ role: f = s !== "hr" ? "separator" : void 0,
1757
+ textAlign: c = "center",
1758
+ variant: v = "fullWidth"
1759
+ } = r, h = Ne(r, kn), m = C({}, r, {
1760
+ absolute: i,
1761
+ component: s,
1762
+ flexItem: l,
1763
+ light: d,
1764
+ orientation: p,
1765
+ role: f,
1766
+ textAlign: c,
1767
+ variant: v
1768
+ }), g = jn(m);
1769
+ return /* @__PURE__ */ _(Ln, C({
1770
+ as: s,
1771
+ className: Ae(g.root, a),
1772
+ role: f,
1773
+ ref: t,
1774
+ ownerState: m
1775
+ }, h, {
1776
+ children: n ? /* @__PURE__ */ _(Vn, {
1777
+ className: g.wrapper,
1778
+ ownerState: m,
1779
+ children: n
1780
+ }) : null
1781
+ }));
1782
+ });
1783
+ lo.muiSkipListHighlight = !0;
1784
+ process.env.NODE_ENV !== "production" && (lo.propTypes = {
1785
+ // ----------------------------- Warning --------------------------------
1786
+ // | These PropTypes are generated from the TypeScript type definitions |
1787
+ // | To update them edit the d.ts file and run "yarn proptypes" |
1788
+ // ----------------------------------------------------------------------
1789
+ /**
1790
+ * Absolutely position the element.
1791
+ * @default false
1792
+ */
1793
+ absolute: u.bool,
1794
+ /**
1795
+ * The content of the component.
1796
+ */
1797
+ children: u.node,
1798
+ /**
1799
+ * Override or extend the styles applied to the component.
1800
+ */
1801
+ classes: u.object,
1802
+ /**
1803
+ * @ignore
1804
+ */
1805
+ className: u.string,
1806
+ /**
1807
+ * The component used for the root node.
1808
+ * Either a string to use a HTML element or a component.
1809
+ */
1810
+ component: u.elementType,
1811
+ /**
1812
+ * If `true`, a vertical divider will have the correct height when used in flex container.
1813
+ * (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)
1814
+ * @default false
1815
+ */
1816
+ flexItem: u.bool,
1817
+ /**
1818
+ * If `true`, the divider will have a lighter color.
1819
+ * @default false
1820
+ */
1821
+ light: u.bool,
1822
+ /**
1823
+ * The component orientation.
1824
+ * @default 'horizontal'
1825
+ */
1826
+ orientation: u.oneOf(["horizontal", "vertical"]),
1827
+ /**
1828
+ * @ignore
1829
+ */
1830
+ role: u.string,
1831
+ /**
1832
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1833
+ */
1834
+ sx: u.oneOfType([u.arrayOf(u.oneOfType([u.func, u.object, u.bool])), u.func, u.object]),
1835
+ /**
1836
+ * The text alignment.
1837
+ * @default 'center'
1838
+ */
1839
+ textAlign: u.oneOf(["center", "left", "right"]),
1840
+ /**
1841
+ * The variant to use.
1842
+ * @default 'fullWidth'
1843
+ */
1844
+ variant: u.oneOfType([u.oneOf(["fullWidth", "inset", "middle"]), u.string])
1845
+ });
1846
+ const Lo = lo;
1847
+ function Hn(e) {
1848
+ return Dt("MuiTooltip", e);
1849
+ }
1850
+ const Fn = Nt("MuiTooltip", ["popper", "popperInteractive", "popperArrow", "popperClose", "tooltip", "tooltipArrow", "touch", "tooltipPlacementLeft", "tooltipPlacementRight", "tooltipPlacementTop", "tooltipPlacementBottom", "arrow"]), we = Fn, Zn = ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "slotProps", "slots", "title", "TransitionComponent", "TransitionProps"];
1851
+ function Un(e) {
1852
+ return Math.round(e * 1e5) / 1e5;
1853
+ }
1854
+ const qn = (e) => {
1855
+ const {
1856
+ classes: o,
1857
+ disableInteractive: t,
1858
+ arrow: r,
1859
+ touch: i,
1860
+ placement: n
1861
+ } = e, a = {
1862
+ popper: ["popper", !t && "popperInteractive", r && "popperArrow"],
1863
+ tooltip: ["tooltip", r && "tooltipArrow", i && "touch", `tooltipPlacement${Pe(n.split("-")[0])}`],
1864
+ arrow: ["arrow"]
1865
+ };
1866
+ return _t(a, Hn, o);
1867
+ }, Kn = Me(fr, {
1868
+ name: "MuiTooltip",
1869
+ slot: "Popper",
1870
+ overridesResolver: (e, o) => {
1871
+ const {
1872
+ ownerState: t
1873
+ } = e;
1874
+ return [o.popper, !t.disableInteractive && o.popperInteractive, t.arrow && o.popperArrow, !t.open && o.popperClose];
1875
+ }
1876
+ })(({
1877
+ theme: e,
1878
+ ownerState: o,
1879
+ open: t
1880
+ }) => C({
1881
+ zIndex: (e.vars || e).zIndex.tooltip,
1882
+ pointerEvents: "none"
1883
+ }, !o.disableInteractive && {
1884
+ pointerEvents: "auto"
1885
+ }, !t && {
1886
+ pointerEvents: "none"
1887
+ }, o.arrow && {
1888
+ [`&[data-popper-placement*="bottom"] .${we.arrow}`]: {
1889
+ top: 0,
1890
+ marginTop: "-0.71em",
1891
+ "&::before": {
1892
+ transformOrigin: "0 100%"
1893
+ }
1894
+ },
1895
+ [`&[data-popper-placement*="top"] .${we.arrow}`]: {
1896
+ bottom: 0,
1897
+ marginBottom: "-0.71em",
1898
+ "&::before": {
1899
+ transformOrigin: "100% 0"
1900
+ }
1901
+ },
1902
+ [`&[data-popper-placement*="right"] .${we.arrow}`]: C({}, o.isRtl ? {
1903
+ right: 0,
1904
+ marginRight: "-0.71em"
1905
+ } : {
1906
+ left: 0,
1907
+ marginLeft: "-0.71em"
1908
+ }, {
1909
+ height: "1em",
1910
+ width: "0.71em",
1911
+ "&::before": {
1912
+ transformOrigin: "100% 100%"
1913
+ }
1914
+ }),
1915
+ [`&[data-popper-placement*="left"] .${we.arrow}`]: C({}, o.isRtl ? {
1916
+ left: 0,
1917
+ marginLeft: "-0.71em"
1918
+ } : {
1919
+ right: 0,
1920
+ marginRight: "-0.71em"
1921
+ }, {
1922
+ height: "1em",
1923
+ width: "0.71em",
1924
+ "&::before": {
1925
+ transformOrigin: "0 0"
1926
+ }
1927
+ })
1928
+ })), Qn = Me("div", {
1929
+ name: "MuiTooltip",
1930
+ slot: "Tooltip",
1931
+ overridesResolver: (e, o) => {
1932
+ const {
1933
+ ownerState: t
1934
+ } = e;
1935
+ return [o.tooltip, t.touch && o.touch, t.arrow && o.tooltipArrow, o[`tooltipPlacement${Pe(t.placement.split("-")[0])}`]];
1936
+ }
1937
+ })(({
1938
+ theme: e,
1939
+ ownerState: o
1940
+ }) => C({
1941
+ backgroundColor: e.vars ? e.vars.palette.Tooltip.bg : Ie(e.palette.grey[700], 0.92),
1942
+ borderRadius: (e.vars || e).shape.borderRadius,
1943
+ color: (e.vars || e).palette.common.white,
1944
+ fontFamily: e.typography.fontFamily,
1945
+ padding: "4px 8px",
1946
+ fontSize: e.typography.pxToRem(11),
1947
+ maxWidth: 300,
1948
+ margin: 2,
1949
+ wordWrap: "break-word",
1950
+ fontWeight: e.typography.fontWeightMedium
1951
+ }, o.arrow && {
1952
+ position: "relative",
1953
+ margin: 0
1954
+ }, o.touch && {
1955
+ padding: "8px 16px",
1956
+ fontSize: e.typography.pxToRem(14),
1957
+ lineHeight: `${Un(16 / 14)}em`,
1958
+ fontWeight: e.typography.fontWeightRegular
1959
+ }, {
1960
+ [`.${we.popper}[data-popper-placement*="left"] &`]: C({
1961
+ transformOrigin: "right center"
1962
+ }, o.isRtl ? C({
1963
+ marginLeft: "14px"
1964
+ }, o.touch && {
1965
+ marginLeft: "24px"
1966
+ }) : C({
1967
+ marginRight: "14px"
1968
+ }, o.touch && {
1969
+ marginRight: "24px"
1970
+ })),
1971
+ [`.${we.popper}[data-popper-placement*="right"] &`]: C({
1972
+ transformOrigin: "left center"
1973
+ }, o.isRtl ? C({
1974
+ marginRight: "14px"
1975
+ }, o.touch && {
1976
+ marginRight: "24px"
1977
+ }) : C({
1978
+ marginLeft: "14px"
1979
+ }, o.touch && {
1980
+ marginLeft: "24px"
1981
+ })),
1982
+ [`.${we.popper}[data-popper-placement*="top"] &`]: C({
1983
+ transformOrigin: "center bottom",
1984
+ marginBottom: "14px"
1985
+ }, o.touch && {
1986
+ marginBottom: "24px"
1987
+ }),
1988
+ [`.${we.popper}[data-popper-placement*="bottom"] &`]: C({
1989
+ transformOrigin: "center top",
1990
+ marginTop: "14px"
1991
+ }, o.touch && {
1992
+ marginTop: "24px"
1993
+ })
1994
+ })), Gn = Me("span", {
1995
+ name: "MuiTooltip",
1996
+ slot: "Arrow",
1997
+ overridesResolver: (e, o) => o.arrow
1998
+ })(({
1999
+ theme: e
2000
+ }) => ({
2001
+ overflow: "hidden",
2002
+ position: "absolute",
2003
+ width: "1em",
2004
+ height: "0.71em",
2005
+ boxSizing: "border-box",
2006
+ color: e.vars ? e.vars.palette.Tooltip.bg : Ie(e.palette.grey[700], 0.9),
2007
+ "&::before": {
2008
+ content: '""',
2009
+ margin: "auto",
2010
+ display: "block",
2011
+ width: "100%",
2012
+ height: "100%",
2013
+ backgroundColor: "currentColor",
2014
+ transform: "rotate(45deg)"
2015
+ }
2016
+ }));
2017
+ let vt = !1, Ft = null, Ke = {
2018
+ x: 0,
2019
+ y: 0
2020
+ };
2021
+ function mt(e, o) {
2022
+ return (t) => {
2023
+ o && o(t), e(t);
2024
+ };
2025
+ }
2026
+ const vr = /* @__PURE__ */ R.forwardRef(function(o, t) {
2027
+ var r, i, n, a, s, l, d, p, f, c, v, h, m, g, P, S, y, b, w;
2028
+ const T = Mt({
2029
+ props: o,
2030
+ name: "MuiTooltip"
2031
+ }), {
2032
+ arrow: O = !1,
2033
+ children: D,
2034
+ components: E = {},
2035
+ componentsProps: A = {},
2036
+ describeChild: N = !1,
2037
+ disableFocusListener: $ = !1,
2038
+ disableHoverListener: Y = !1,
2039
+ disableInteractive: Z = !1,
2040
+ disableTouchListener: U = !1,
2041
+ enterDelay: B = 100,
2042
+ enterNextDelay: W = 0,
2043
+ enterTouchDelay: X = 700,
2044
+ followCursor: q = !1,
2045
+ id: be,
2046
+ leaveDelay: se = 0,
2047
+ leaveTouchDelay: ve = 1500,
2048
+ onClose: ne,
2049
+ onOpen: K,
2050
+ open: Q,
2051
+ placement: le = "bottom",
2052
+ PopperComponent: ue,
2053
+ PopperProps: k = {},
2054
+ slotProps: L = {},
2055
+ slots: me = {},
2056
+ title: j,
2057
+ TransitionComponent: Le = No,
2058
+ TransitionProps: _e
2059
+ } = T, nt = Ne(T, Zn), I = /* @__PURE__ */ R.isValidElement(D) ? D : /* @__PURE__ */ _("span", {
2060
+ children: D
2061
+ }), Ye = oi(), at = Ye.direction === "rtl", [V, st] = R.useState(), [ae, Be] = R.useState(null), Oe = R.useRef(!1), ze = Z || q, ye = R.useRef(), Ee = R.useRef(), pe = R.useRef(), Ve = R.useRef(), [lt, ho] = Ur({
2062
+ controlled: Q,
2063
+ default: !1,
2064
+ name: "Tooltip",
2065
+ state: "open"
2066
+ });
2067
+ let he = lt;
2068
+ if (process.env.NODE_ENV !== "production") {
2069
+ const {
2070
+ current: x
2071
+ } = R.useRef(Q !== void 0);
2072
+ R.useEffect(() => {
2073
+ V && V.disabled && !x && j !== "" && V.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(`
2074
+ `));
2075
+ }, [j, V, x]);
2076
+ }
2077
+ const kt = qr(be), He = R.useRef(), ut = R.useCallback(() => {
2078
+ He.current !== void 0 && (document.body.style.WebkitUserSelect = He.current, He.current = void 0), clearTimeout(Ve.current);
2079
+ }, []);
2080
+ R.useEffect(() => () => {
2081
+ clearTimeout(ye.current), clearTimeout(Ee.current), clearTimeout(pe.current), ut();
2082
+ }, [ut]);
2083
+ const go = (x) => {
2084
+ clearTimeout(Ft), vt = !0, ho(!0), K && !he && K(x);
2085
+ }, pt = ri(
2086
+ /**
2087
+ * @param {React.SyntheticEvent | Event} event
2088
+ */
2089
+ (x) => {
2090
+ clearTimeout(Ft), Ft = setTimeout(() => {
2091
+ vt = !1;
2092
+ }, 800 + se), ho(!1), ne && he && ne(x), clearTimeout(ye.current), ye.current = setTimeout(() => {
2093
+ Oe.current = !1;
2094
+ }, Ye.transitions.duration.shortest);
2095
+ }
2096
+ ), jt = (x) => {
2097
+ Oe.current && x.type !== "touchstart" || (V && V.removeAttribute("title"), clearTimeout(Ee.current), clearTimeout(pe.current), B || vt && W ? Ee.current = setTimeout(() => {
2098
+ go(x);
2099
+ }, vt ? W : B) : go(x));
2100
+ }, bo = (x) => {
2101
+ clearTimeout(Ee.current), clearTimeout(pe.current), pe.current = setTimeout(() => {
2102
+ pt(x);
2103
+ }, se);
2104
+ }, {
2105
+ isFocusVisibleRef: yo,
2106
+ onBlur: Mr,
2107
+ onFocus: _r,
2108
+ ref: Yr
2109
+ } = ii(), [, wo] = R.useState(!1), Po = (x) => {
2110
+ Mr(x), yo.current === !1 && (wo(!1), bo(x));
2111
+ }, To = (x) => {
2112
+ V || st(x.currentTarget), _r(x), yo.current === !0 && (wo(!0), jt(x));
2113
+ }, Co = (x) => {
2114
+ Oe.current = !0;
2115
+ const G = I.props;
2116
+ G.onTouchStart && G.onTouchStart(x);
2117
+ }, So = jt, Oo = bo, Br = (x) => {
2118
+ Co(x), clearTimeout(pe.current), clearTimeout(ye.current), ut(), He.current = document.body.style.WebkitUserSelect, document.body.style.WebkitUserSelect = "none", Ve.current = setTimeout(() => {
2119
+ document.body.style.WebkitUserSelect = He.current, jt(x);
2120
+ }, X);
2121
+ }, zr = (x) => {
2122
+ I.props.onTouchEnd && I.props.onTouchEnd(x), ut(), clearTimeout(pe.current), pe.current = setTimeout(() => {
2123
+ pt(x);
2124
+ }, ve);
2125
+ };
2126
+ R.useEffect(() => {
2127
+ if (!he)
2128
+ return;
2129
+ function x(G) {
2130
+ (G.key === "Escape" || G.key === "Esc") && pt(G);
2131
+ }
2132
+ return document.addEventListener("keydown", x), () => {
2133
+ document.removeEventListener("keydown", x);
2134
+ };
2135
+ }, [pt, he]);
2136
+ const $r = qt(I.ref, Yr, st, t);
2137
+ !j && j !== 0 && (he = !1);
2138
+ const Lt = R.useRef(), Wr = (x) => {
2139
+ const G = I.props;
2140
+ G.onMouseMove && G.onMouseMove(x), Ke = {
2141
+ x: x.clientX,
2142
+ y: x.clientY
2143
+ }, Lt.current && Lt.current.update();
2144
+ }, Fe = {}, Vt = typeof j == "string";
2145
+ N ? (Fe.title = !he && Vt && !Y ? j : null, Fe["aria-describedby"] = he ? kt : null) : (Fe["aria-label"] = Vt ? j : null, Fe["aria-labelledby"] = he && !Vt ? kt : null);
2146
+ const ee = C({}, Fe, nt, I.props, {
2147
+ className: Ae(nt.className, I.props.className),
2148
+ onTouchStart: Co,
2149
+ ref: $r
2150
+ }, q ? {
2151
+ onMouseMove: Wr
2152
+ } : {});
2153
+ process.env.NODE_ENV !== "production" && (ee["data-mui-internal-clone-element"] = !0, R.useEffect(() => {
2154
+ V && !V.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(`
2155
+ `));
2156
+ }, [V]));
2157
+ const Ze = {};
2158
+ U || (ee.onTouchStart = Br, ee.onTouchEnd = zr), Y || (ee.onMouseOver = mt(So, ee.onMouseOver), ee.onMouseLeave = mt(Oo, ee.onMouseLeave), ze || (Ze.onMouseOver = So, Ze.onMouseLeave = Oo)), $ || (ee.onFocus = mt(To, ee.onFocus), ee.onBlur = mt(Po, ee.onBlur), ze || (Ze.onFocus = To, Ze.onBlur = Po)), process.env.NODE_ENV !== "production" && I.props.title && console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.", `Remove this title prop \`${I.props.title}\` or the Tooltip component.`].join(`
2159
+ `));
2160
+ const Xr = R.useMemo(() => {
2161
+ var x;
2162
+ let G = [{
2163
+ name: "arrow",
2164
+ enabled: !!ae,
2165
+ options: {
2166
+ element: ae,
2167
+ padding: 4
2168
+ }
2169
+ }];
2170
+ return (x = k.popperOptions) != null && x.modifiers && (G = G.concat(k.popperOptions.modifiers)), C({}, k.popperOptions, {
2171
+ modifiers: G
2172
+ });
2173
+ }, [ae, k]), Ue = C({}, T, {
2174
+ isRtl: at,
2175
+ arrow: O,
2176
+ disableInteractive: ze,
2177
+ placement: le,
2178
+ PopperComponentProp: ue,
2179
+ touch: Oe.current
2180
+ }), Ht = qn(Ue), Eo = (r = (i = me.popper) != null ? i : E.Popper) != null ? r : Kn, Ao = (n = (a = (s = me.transition) != null ? s : E.Transition) != null ? a : Le) != null ? n : No, Ro = (l = (d = me.tooltip) != null ? d : E.Tooltip) != null ? l : Qn, xo = (p = (f = me.arrow) != null ? f : E.Arrow) != null ? p : Gn, kr = dt(Eo, C({}, k, (c = L.popper) != null ? c : A.popper, {
2181
+ className: Ae(Ht.popper, k == null ? void 0 : k.className, (v = (h = L.popper) != null ? h : A.popper) == null ? void 0 : v.className)
2182
+ }), Ue), jr = dt(Ao, C({}, _e, (m = L.transition) != null ? m : A.transition), Ue), Lr = dt(Ro, C({}, (g = L.tooltip) != null ? g : A.tooltip, {
2183
+ className: Ae(Ht.tooltip, (P = (S = L.tooltip) != null ? S : A.tooltip) == null ? void 0 : P.className)
2184
+ }), Ue), Vr = dt(xo, C({}, (y = L.arrow) != null ? y : A.arrow, {
2185
+ className: Ae(Ht.arrow, (b = (w = L.arrow) != null ? w : A.arrow) == null ? void 0 : b.className)
2186
+ }), Ue);
2187
+ return /* @__PURE__ */ wt(R.Fragment, {
2188
+ children: [/* @__PURE__ */ R.cloneElement(I, ee), /* @__PURE__ */ _(Eo, C({
2189
+ as: ue ?? fr,
2190
+ placement: le,
2191
+ anchorEl: q ? {
2192
+ getBoundingClientRect: () => ({
2193
+ top: Ke.y,
2194
+ left: Ke.x,
2195
+ right: Ke.x,
2196
+ bottom: Ke.y,
2197
+ width: 0,
2198
+ height: 0
2199
+ })
2200
+ } : V,
2201
+ popperRef: Lt,
2202
+ open: V ? he : !1,
2203
+ id: kt,
2204
+ transition: !0
2205
+ }, Ze, kr, {
2206
+ popperOptions: Xr,
2207
+ children: ({
2208
+ TransitionProps: x
2209
+ }) => /* @__PURE__ */ _(Ao, C({
2210
+ timeout: Ye.transitions.duration.shorter
2211
+ }, x, jr, {
2212
+ children: /* @__PURE__ */ wt(Ro, C({}, Lr, {
2213
+ children: [j, O ? /* @__PURE__ */ _(xo, C({}, Vr, {
2214
+ ref: Be
2215
+ })) : null]
2216
+ }))
2217
+ }))
2218
+ }))]
2219
+ });
2220
+ });
2221
+ process.env.NODE_ENV !== "production" && (vr.propTypes = {
2222
+ // ----------------------------- Warning --------------------------------
2223
+ // | These PropTypes are generated from the TypeScript type definitions |
2224
+ // | To update them edit the d.ts file and run "yarn proptypes" |
2225
+ // ----------------------------------------------------------------------
2226
+ /**
2227
+ * If `true`, adds an arrow to the tooltip.
2228
+ * @default false
2229
+ */
2230
+ arrow: u.bool,
2231
+ /**
2232
+ * Tooltip reference element.
2233
+ */
2234
+ children: Kr.isRequired,
2235
+ /**
2236
+ * Override or extend the styles applied to the component.
2237
+ */
2238
+ classes: u.object,
2239
+ /**
2240
+ * @ignore
2241
+ */
2242
+ className: u.string,
2243
+ /**
2244
+ * The components used for each slot inside.
2245
+ *
2246
+ * This prop is an alias for the `slots` prop.
2247
+ * It's recommended to use the `slots` prop instead.
2248
+ *
2249
+ * @default {}
2250
+ */
2251
+ components: u.shape({
2252
+ Arrow: u.elementType,
2253
+ Popper: u.elementType,
2254
+ Tooltip: u.elementType,
2255
+ Transition: u.elementType
2256
+ }),
2257
+ /**
2258
+ * The extra props for the slot components.
2259
+ * You can override the existing props or add new ones.
2260
+ *
2261
+ * This prop is an alias for the `slotProps` prop.
2262
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
2263
+ *
2264
+ * @default {}
2265
+ */
2266
+ componentsProps: u.shape({
2267
+ arrow: u.object,
2268
+ popper: u.object,
2269
+ tooltip: u.object,
2270
+ transition: u.object
2271
+ }),
2272
+ /**
2273
+ * Set to `true` if the `title` acts as an accessible description.
2274
+ * By default the `title` acts as an accessible label for the child.
2275
+ * @default false
2276
+ */
2277
+ describeChild: u.bool,
2278
+ /**
2279
+ * Do not respond to focus-visible events.
2280
+ * @default false
2281
+ */
2282
+ disableFocusListener: u.bool,
2283
+ /**
2284
+ * Do not respond to hover events.
2285
+ * @default false
2286
+ */
2287
+ disableHoverListener: u.bool,
2288
+ /**
2289
+ * Makes a tooltip not interactive, i.e. it will close when the user
2290
+ * hovers over the tooltip before the `leaveDelay` is expired.
2291
+ * @default false
2292
+ */
2293
+ disableInteractive: u.bool,
2294
+ /**
2295
+ * Do not respond to long press touch events.
2296
+ * @default false
2297
+ */
2298
+ disableTouchListener: u.bool,
2299
+ /**
2300
+ * The number of milliseconds to wait before showing the tooltip.
2301
+ * This prop won't impact the enter touch delay (`enterTouchDelay`).
2302
+ * @default 100
2303
+ */
2304
+ enterDelay: u.number,
2305
+ /**
2306
+ * The number of milliseconds to wait before showing the tooltip when one was already recently opened.
2307
+ * @default 0
2308
+ */
2309
+ enterNextDelay: u.number,
2310
+ /**
2311
+ * The number of milliseconds a user must touch the element before showing the tooltip.
2312
+ * @default 700
2313
+ */
2314
+ enterTouchDelay: u.number,
2315
+ /**
2316
+ * If `true`, the tooltip follow the cursor over the wrapped element.
2317
+ * @default false
2318
+ */
2319
+ followCursor: u.bool,
2320
+ /**
2321
+ * This prop is used to help implement the accessibility logic.
2322
+ * If you don't provide this prop. It falls back to a randomly generated id.
2323
+ */
2324
+ id: u.string,
2325
+ /**
2326
+ * The number of milliseconds to wait before hiding the tooltip.
2327
+ * This prop won't impact the leave touch delay (`leaveTouchDelay`).
2328
+ * @default 0
2329
+ */
2330
+ leaveDelay: u.number,
2331
+ /**
2332
+ * The number of milliseconds after the user stops touching an element before hiding the tooltip.
2333
+ * @default 1500
2334
+ */
2335
+ leaveTouchDelay: u.number,
2336
+ /**
2337
+ * Callback fired when the component requests to be closed.
2338
+ *
2339
+ * @param {React.SyntheticEvent} event The event source of the callback.
2340
+ */
2341
+ onClose: u.func,
2342
+ /**
2343
+ * Callback fired when the component requests to be open.
2344
+ *
2345
+ * @param {React.SyntheticEvent} event The event source of the callback.
2346
+ */
2347
+ onOpen: u.func,
2348
+ /**
2349
+ * If `true`, the component is shown.
2350
+ */
2351
+ open: u.bool,
2352
+ /**
2353
+ * Tooltip placement.
2354
+ * @default 'bottom'
2355
+ */
2356
+ placement: u.oneOf(["bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
2357
+ /**
2358
+ * The component used for the popper.
2359
+ * @default Popper
2360
+ */
2361
+ PopperComponent: u.elementType,
2362
+ /**
2363
+ * Props applied to the [`Popper`](/material-ui/api/popper/) element.
2364
+ * @default {}
2365
+ */
2366
+ PopperProps: u.object,
2367
+ /**
2368
+ * The extra props for the slot components.
2369
+ * You can override the existing props or add new ones.
2370
+ *
2371
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
2372
+ *
2373
+ * @default {}
2374
+ */
2375
+ slotProps: u.shape({
2376
+ arrow: u.object,
2377
+ popper: u.object,
2378
+ tooltip: u.object,
2379
+ transition: u.object
2380
+ }),
2381
+ /**
2382
+ * The components used for each slot inside.
2383
+ *
2384
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
2385
+ *
2386
+ * @default {}
2387
+ */
2388
+ slots: u.shape({
2389
+ arrow: u.elementType,
2390
+ popper: u.elementType,
2391
+ tooltip: u.elementType,
2392
+ transition: u.elementType
2393
+ }),
2394
+ /**
2395
+ * The system prop that allows defining system overrides as well as additional CSS styles.
2396
+ */
2397
+ sx: u.oneOfType([u.arrayOf(u.oneOfType([u.func, u.object, u.bool])), u.func, u.object]),
2398
+ /**
2399
+ * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.
2400
+ */
2401
+ title: u.node,
2402
+ /**
2403
+ * The component used for the transition.
2404
+ * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
2405
+ * @default Grow
2406
+ */
2407
+ TransitionComponent: u.elementType,
2408
+ /**
2409
+ * Props applied to the transition element.
2410
+ * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
2411
+ */
2412
+ TransitionProps: u.object
2413
+ });
2414
+ const ht = vr;
2415
+ var te = function(e, o) {
2416
+ return Number(e.toFixed(o));
2417
+ }, Jn = function(e, o) {
2418
+ return typeof e == "number" ? e : o;
2419
+ }, z = function(e, o, t) {
2420
+ t && typeof t == "function" && t(e, o);
2421
+ }, In = function(e) {
2422
+ return -Math.cos(e * Math.PI) / 2 + 0.5;
2423
+ }, ea = function(e) {
2424
+ return e;
2425
+ }, ta = function(e) {
2426
+ return e * e;
2427
+ }, oa = function(e) {
2428
+ return e * (2 - e);
2429
+ }, ra = function(e) {
2430
+ return e < 0.5 ? 2 * e * e : -1 + (4 - 2 * e) * e;
2431
+ }, ia = function(e) {
2432
+ return e * e * e;
2433
+ }, na = function(e) {
2434
+ return --e * e * e + 1;
2435
+ }, aa = function(e) {
2436
+ return e < 0.5 ? 4 * e * e * e : (e - 1) * (2 * e - 2) * (2 * e - 2) + 1;
2437
+ }, sa = function(e) {
2438
+ return e * e * e * e;
2439
+ }, la = function(e) {
2440
+ return 1 - --e * e * e * e;
2441
+ }, ua = function(e) {
2442
+ return e < 0.5 ? 8 * e * e * e * e : 1 - 8 * --e * e * e * e;
2443
+ }, pa = function(e) {
2444
+ return e * e * e * e * e;
2445
+ }, da = function(e) {
2446
+ return 1 + --e * e * e * e * e;
2447
+ }, fa = function(e) {
2448
+ return e < 0.5 ? 16 * e * e * e * e * e : 1 + 16 * --e * e * e * e * e;
2449
+ }, mr = {
2450
+ easeOut: In,
2451
+ linear: ea,
2452
+ easeInQuad: ta,
2453
+ easeOutQuad: oa,
2454
+ easeInOutQuad: ra,
2455
+ easeInCubic: ia,
2456
+ easeOutCubic: na,
2457
+ easeInOutCubic: aa,
2458
+ easeInQuart: sa,
2459
+ easeOutQuart: la,
2460
+ easeInOutQuart: ua,
2461
+ easeInQuint: pa,
2462
+ easeOutQuint: da,
2463
+ easeInOutQuint: fa
2464
+ }, hr = function(e) {
2465
+ typeof e == "number" && cancelAnimationFrame(e);
2466
+ }, de = function(e) {
2467
+ e.mounted && (hr(e.animation), e.animate = !1, e.animation = null, e.velocity = null);
2468
+ };
2469
+ function gr(e, o, t, r) {
2470
+ if (e.mounted) {
2471
+ var i = (/* @__PURE__ */ new Date()).getTime(), n = 1;
2472
+ de(e), e.animation = function() {
2473
+ if (!e.mounted)
2474
+ return hr(e.animation);
2475
+ var a = (/* @__PURE__ */ new Date()).getTime() - i, s = a / t, l = mr[o], d = l(s);
2476
+ a >= t ? (r(n), e.animation = null) : e.animation && (r(d), requestAnimationFrame(e.animation));
2477
+ }, requestAnimationFrame(e.animation);
2478
+ }
2479
+ }
2480
+ function ca(e) {
2481
+ var o = e.scale, t = e.positionX, r = e.positionY;
2482
+ return !(Number.isNaN(o) || Number.isNaN(t) || Number.isNaN(r));
2483
+ }
2484
+ function Se(e, o, t, r) {
2485
+ var i = ca(o);
2486
+ if (!(!e.mounted || !i)) {
2487
+ var n = e.setTransformState, a = e.transformState, s = a.scale, l = a.positionX, d = a.positionY, p = o.scale - s, f = o.positionX - l, c = o.positionY - d;
2488
+ t === 0 ? n(o.scale, o.positionX, o.positionY) : gr(e, r, t, function(v) {
2489
+ var h = s + p * v, m = l + f * v, g = d + c * v;
2490
+ n(h, m, g);
2491
+ });
2492
+ }
2493
+ }
2494
+ function va(e, o, t) {
2495
+ var r = e.offsetWidth, i = e.offsetHeight, n = o.offsetWidth, a = o.offsetHeight, s = n * t, l = a * t, d = r - s, p = i - l;
2496
+ return {
2497
+ wrapperWidth: r,
2498
+ wrapperHeight: i,
2499
+ newContentWidth: s,
2500
+ newDiffWidth: d,
2501
+ newContentHeight: l,
2502
+ newDiffHeight: p
2503
+ };
2504
+ }
2505
+ var ma = function(e, o, t, r, i, n, a) {
2506
+ var s = e > o ? t * (a ? 1 : 0.5) : 0, l = r > i ? n * (a ? 1 : 0.5) : 0, d = e - o - s, p = s, f = r - i - l, c = l;
2507
+ return { minPositionX: d, maxPositionX: p, minPositionY: f, maxPositionY: c };
2508
+ }, uo = function(e, o) {
2509
+ var t = e.wrapperComponent, r = e.contentComponent, i = e.setup.centerZoomedOut;
2510
+ if (!t || !r)
2511
+ throw new Error("Components are not mounted");
2512
+ var n = va(t, r, o), a = n.wrapperWidth, s = n.wrapperHeight, l = n.newContentWidth, d = n.newDiffWidth, p = n.newContentHeight, f = n.newDiffHeight, c = ma(a, l, d, s, p, f, !!i);
2513
+ return c;
2514
+ }, Gt = function(e, o, t, r) {
2515
+ return r ? e < o ? te(o, 2) : e > t ? te(t, 2) : te(e, 2) : te(e, 2);
2516
+ }, je = function(e, o) {
2517
+ var t = uo(e, o);
2518
+ return e.bounds = t, t;
2519
+ };
2520
+ function zt(e, o, t, r, i, n, a) {
2521
+ var s = t.minPositionX, l = t.minPositionY, d = t.maxPositionX, p = t.maxPositionY, f = 0, c = 0;
2522
+ a && (f = i, c = n);
2523
+ var v = Gt(e, s - f, d + f, r), h = Gt(o, l - c, p + c, r);
2524
+ return { x: v, y: h };
2525
+ }
2526
+ function $t(e, o, t, r, i, n) {
2527
+ var a = e.transformState, s = a.scale, l = a.positionX, d = a.positionY, p = r - s;
2528
+ if (typeof o != "number" || typeof t != "number")
2529
+ return console.error("Mouse X and Y position were not provided!"), { x: l, y: d };
2530
+ var f = l - o * p, c = d - t * p, v = zt(f, c, i, n, 0, 0, null);
2531
+ return v;
2532
+ }
2533
+ function it(e, o, t, r, i) {
2534
+ var n = i ? r : 0, a = o - n;
2535
+ return !Number.isNaN(t) && e >= t ? t : !Number.isNaN(o) && e <= a ? a : e;
2536
+ }
2537
+ var Vo = function(e, o) {
2538
+ var t = e.setup.panning.excluded, r = e.isInitialized, i = e.wrapperComponent, n = o.target, a = i == null ? void 0 : i.contains(n), s = r && n && a;
2539
+ if (!s)
2540
+ return !1;
2541
+ var l = Wt(n, t);
2542
+ return !l;
2543
+ }, Ho = function(e) {
2544
+ var o = e.isInitialized, t = e.isPanning, r = e.setup, i = r.panning.disabled, n = o && t && !i;
2545
+ return !!n;
2546
+ }, ha = function(e, o) {
2547
+ var t = e.transformState, r = t.positionX, i = t.positionY;
2548
+ e.isPanning = !0;
2549
+ var n = o.clientX, a = o.clientY;
2550
+ e.startCoords = { x: n - r, y: a - i };
2551
+ }, ga = function(e, o) {
2552
+ var t = o.touches, r = e.transformState, i = r.positionX, n = r.positionY;
2553
+ e.isPanning = !0;
2554
+ var a = t.length === 1;
2555
+ if (a) {
2556
+ var s = t[0].clientX, l = t[0].clientY;
2557
+ e.startCoords = { x: s - i, y: l - n };
2558
+ }
2559
+ };
2560
+ function ba(e) {
2561
+ var o = e.transformState, t = o.positionX, r = o.positionY, i = o.scale, n = e.setup, a = n.disabled, s = n.limitToBounds, l = n.centerZoomedOut, d = e.wrapperComponent;
2562
+ if (!(a || !d || !e.bounds)) {
2563
+ var p = e.bounds, f = p.maxPositionX, c = p.minPositionX, v = p.maxPositionY, h = p.minPositionY, m = t > f || t < c, g = r > v || r < h, P = t > f ? d.offsetWidth : e.setup.minPositionX || 0, S = r > v ? d.offsetHeight : e.setup.minPositionY || 0, y = $t(e, P, S, i, e.bounds, s || l), b = y.x, w = y.y;
2564
+ return {
2565
+ scale: i,
2566
+ positionX: m ? b : t,
2567
+ positionY: g ? w : r
2568
+ };
2569
+ }
2570
+ }
2571
+ function ya(e, o, t, r, i) {
2572
+ var n = e.setup.limitToBounds, a = e.wrapperComponent, s = e.bounds, l = e.transformState, d = l.scale, p = l.positionX, f = l.positionY;
2573
+ if (!(a === null || s === null || o === p && t === f)) {
2574
+ var c = zt(o, t, s, n, r, i, a), v = c.x, h = c.y;
2575
+ e.setTransformState(d, v, h);
2576
+ }
2577
+ }
2578
+ var wa = function(e, o, t) {
2579
+ var r = e.startCoords, i = e.transformState, n = e.setup.panning, a = n.lockAxisX, s = n.lockAxisY, l = i.positionX, d = i.positionY;
2580
+ if (!r)
2581
+ return { x: l, y: d };
2582
+ var p = o - r.x, f = t - r.y, c = a ? l : p, v = s ? d : f;
2583
+ return { x: c, y: v };
2584
+ }, Ot = function(e, o) {
2585
+ var t = e.setup, r = e.transformState, i = r.scale, n = t.minScale, a = t.disablePadding;
2586
+ return o > 0 && i >= n && !a ? o : 0;
2587
+ }, Pa = function(e) {
2588
+ var o = e.mounted, t = e.setup, r = t.disabled, i = t.velocityAnimation, n = e.transformState.scale, a = i.disabled, s = !a || n > 1 || !r || o;
2589
+ return !!s;
2590
+ }, Ta = function(e) {
2591
+ var o = e.mounted, t = e.velocity, r = e.bounds, i = e.setup, n = i.disabled, a = i.velocityAnimation, s = e.transformState.scale, l = a.disabled, d = !l || s > 1 || !n || o;
2592
+ return !(!d || !t || !r);
2593
+ };
2594
+ function Ca(e, o) {
2595
+ var t = e.setup.velocityAnimation, r = t.equalToMove, i = t.animationTime, n = t.sensitivity;
2596
+ return r ? i * o * n : i;
2597
+ }
2598
+ function Fo(e, o, t, r, i, n, a, s, l, d) {
2599
+ if (i) {
2600
+ if (o > a && t > a) {
2601
+ var p = a + (e - a) * d;
2602
+ return p > l ? l : p < a ? a : p;
2603
+ }
2604
+ if (o < n && t < n) {
2605
+ var p = n + (e - n) * d;
2606
+ return p < s ? s : p > n ? n : p;
2607
+ }
2608
+ }
2609
+ return r ? o : Gt(e, n, a, i);
2610
+ }
2611
+ function Sa(e, o) {
2612
+ var t = 1;
2613
+ return o ? Math.min(t, e.offsetWidth / window.innerWidth) : t;
2614
+ }
2615
+ function Oa(e, o) {
2616
+ var t = Pa(e);
2617
+ if (t) {
2618
+ var r = e.lastMousePosition, i = e.velocityTime, n = e.setup, a = e.wrapperComponent, s = n.velocityAnimation.equalToMove, l = Date.now();
2619
+ if (r && i && a) {
2620
+ var d = Sa(a, s), p = o.x - r.x, f = o.y - r.y, c = p / d, v = f / d, h = l - i, m = p * p + f * f, g = Math.sqrt(m) / h;
2621
+ e.velocity = { velocityX: c, velocityY: v, total: g };
2622
+ }
2623
+ e.lastMousePosition = o, e.velocityTime = l;
2624
+ }
2625
+ }
2626
+ function Ea(e) {
2627
+ var o = e.velocity, t = e.bounds, r = e.setup, i = e.wrapperComponent, n = Ta(e);
2628
+ if (!(!n || !o || !t || !i)) {
2629
+ var a = o.velocityX, s = o.velocityY, l = o.total, d = t.maxPositionX, p = t.minPositionX, f = t.maxPositionY, c = t.minPositionY, v = r.limitToBounds, h = r.alignmentAnimation, m = r.zoomAnimation, g = r.panning, P = g.lockAxisY, S = g.lockAxisX, y = m.animationType, b = h.sizeX, w = h.sizeY, T = h.velocityAlignmentTime, O = T, D = Ca(e, l), E = Math.max(D, O), A = Ot(e, b), N = Ot(e, w), $ = A * i.offsetWidth / 100, Y = N * i.offsetHeight / 100, Z = d + $, U = p - $, B = f + Y, W = c - Y, X = e.transformState, q = (/* @__PURE__ */ new Date()).getTime();
2630
+ gr(e, y, E, function(be) {
2631
+ var se = e.transformState, ve = se.scale, ne = se.positionX, K = se.positionY, Q = (/* @__PURE__ */ new Date()).getTime() - q, le = Q / O, ue = mr[h.animationType], k = 1 - ue(Math.min(1, le)), L = 1 - be, me = ne + a * L, j = K + s * L, Le = Fo(me, X.positionX, ne, S, v, p, d, U, Z, k), _e = Fo(j, X.positionY, K, P, v, c, f, W, B, k);
2632
+ (ne !== me || K !== j) && e.setTransformState(ve, Le, _e);
2633
+ });
2634
+ }
2635
+ }
2636
+ function Zo(e, o) {
2637
+ var t = e.transformState.scale;
2638
+ de(e), je(e, t), window.TouchEvent !== void 0 && o instanceof TouchEvent ? ga(e, o) : ha(e, o);
2639
+ }
2640
+ function br(e) {
2641
+ var o = e.transformState.scale, t = e.setup, r = t.minScale, i = t.alignmentAnimation, n = i.disabled, a = i.sizeX, s = i.sizeY, l = i.animationTime, d = i.animationType, p = n || o < r || !a && !s;
2642
+ if (!p) {
2643
+ var f = ba(e);
2644
+ f && Se(e, f, l, d);
2645
+ }
2646
+ }
2647
+ function Uo(e, o, t) {
2648
+ var r = e.startCoords, i = e.setup, n = i.alignmentAnimation, a = n.sizeX, s = n.sizeY;
2649
+ if (r) {
2650
+ var l = wa(e, o, t), d = l.x, p = l.y, f = Ot(e, a), c = Ot(e, s);
2651
+ Oa(e, { x: d, y: p }), ya(e, d, p, f, c);
2652
+ }
2653
+ }
2654
+ function Aa(e) {
2655
+ if (e.isPanning) {
2656
+ var o = e.setup.panning.velocityDisabled, t = e.velocity, r = e.wrapperComponent, i = e.contentComponent;
2657
+ e.isPanning = !1, e.animate = !1, e.animation = null;
2658
+ var n = r == null ? void 0 : r.getBoundingClientRect(), a = i == null ? void 0 : i.getBoundingClientRect(), s = (n == null ? void 0 : n.width) || 0, l = (n == null ? void 0 : n.height) || 0, d = (a == null ? void 0 : a.width) || 0, p = (a == null ? void 0 : a.height) || 0, f = s < d || l < p, c = !o && t && (t == null ? void 0 : t.total) > 0.1 && f;
2659
+ c ? Ea(e) : br(e);
2660
+ }
2661
+ }
2662
+ function po(e, o, t, r) {
2663
+ var i = e.setup, n = i.minScale, a = i.maxScale, s = i.limitToBounds, l = it(te(o, 2), n, a, 0, !1), d = je(e, l), p = $t(e, t, r, l, d, s), f = p.x, c = p.y;
2664
+ return { scale: l, positionX: f, positionY: c };
2665
+ }
2666
+ function yr(e, o, t) {
2667
+ var r = e.transformState.scale, i = e.wrapperComponent, n = e.setup, a = n.minScale, s = n.limitToBounds, l = n.zoomAnimation, d = l.disabled, p = l.animationTime, f = l.animationType, c = d || r >= a;
2668
+ if ((r >= 1 || s) && br(e), !(c || !i || !e.mounted)) {
2669
+ var v = o || i.offsetWidth / 2, h = t || i.offsetHeight / 2, m = po(e, a, v, h);
2670
+ m && Se(e, m, p, f);
2671
+ }
2672
+ }
2673
+ var Te = function() {
2674
+ return Te = Object.assign || function(o) {
2675
+ for (var t, r = 1, i = arguments.length; r < i; r++) {
2676
+ t = arguments[r];
2677
+ for (var n in t)
2678
+ Object.prototype.hasOwnProperty.call(t, n) && (o[n] = t[n]);
2679
+ }
2680
+ return o;
2681
+ }, Te.apply(this, arguments);
2682
+ };
2683
+ function qo(e, o, t) {
2684
+ if (t || arguments.length === 2)
2685
+ for (var r = 0, i = o.length, n; r < i; r++)
2686
+ (n || !(r in o)) && (n || (n = Array.prototype.slice.call(o, 0, r)), n[r] = o[r]);
2687
+ return e.concat(n || Array.prototype.slice.call(o));
2688
+ }
2689
+ var gt = {
2690
+ previousScale: 1,
2691
+ scale: 1,
2692
+ positionX: 0,
2693
+ positionY: 0
2694
+ }, Qe = {
2695
+ disabled: !1,
2696
+ minPositionX: null,
2697
+ maxPositionX: null,
2698
+ minPositionY: null,
2699
+ maxPositionY: null,
2700
+ minScale: 1,
2701
+ maxScale: 8,
2702
+ limitToBounds: !0,
2703
+ centerZoomedOut: !1,
2704
+ centerOnInit: !1,
2705
+ disablePadding: !1,
2706
+ smooth: !0,
2707
+ wheel: {
2708
+ step: 0.2,
2709
+ disabled: !1,
2710
+ smoothStep: 1e-3,
2711
+ wheelDisabled: !1,
2712
+ touchPadDisabled: !1,
2713
+ activationKeys: [],
2714
+ excluded: []
2715
+ },
2716
+ panning: {
2717
+ disabled: !1,
2718
+ velocityDisabled: !1,
2719
+ lockAxisX: !1,
2720
+ lockAxisY: !1,
2721
+ activationKeys: [],
2722
+ excluded: []
2723
+ },
2724
+ pinch: {
2725
+ step: 5,
2726
+ disabled: !1,
2727
+ excluded: []
2728
+ },
2729
+ doubleClick: {
2730
+ disabled: !1,
2731
+ step: 0.7,
2732
+ mode: "zoomIn",
2733
+ animationType: "easeOut",
2734
+ animationTime: 200,
2735
+ excluded: []
2736
+ },
2737
+ zoomAnimation: {
2738
+ disabled: !1,
2739
+ size: 0.4,
2740
+ animationTime: 200,
2741
+ animationType: "easeOut"
2742
+ },
2743
+ alignmentAnimation: {
2744
+ disabled: !1,
2745
+ sizeX: 100,
2746
+ sizeY: 100,
2747
+ animationTime: 200,
2748
+ velocityAlignmentTime: 400,
2749
+ animationType: "easeOut"
2750
+ },
2751
+ velocityAnimation: {
2752
+ disabled: !1,
2753
+ sensitivity: 1,
2754
+ animationTime: 400,
2755
+ animationType: "easeOut",
2756
+ equalToMove: !0
2757
+ }
2758
+ }, wr = function(e) {
2759
+ var o, t, r, i;
2760
+ return {
2761
+ previousScale: (o = e.initialScale) !== null && o !== void 0 ? o : gt.scale,
2762
+ scale: (t = e.initialScale) !== null && t !== void 0 ? t : gt.scale,
2763
+ positionX: (r = e.initialPositionX) !== null && r !== void 0 ? r : gt.positionX,
2764
+ positionY: (i = e.initialPositionY) !== null && i !== void 0 ? i : gt.positionY
2765
+ };
2766
+ }, Ko = function(e) {
2767
+ var o = Te({}, Qe);
2768
+ return Object.keys(e).forEach(function(t) {
2769
+ var r = typeof e[t] < "u", i = typeof Qe[t] < "u";
2770
+ if (i && r) {
2771
+ var n = Object.prototype.toString.call(Qe[t]), a = n === "[object Object]", s = n === "[object Array]";
2772
+ a ? o[t] = Te(Te({}, Qe[t]), e[t]) : s ? o[t] = qo(qo([], Qe[t], !0), e[t], !0) : o[t] = e[t];
2773
+ }
2774
+ }), o;
2775
+ }, Pr = function(e, o, t) {
2776
+ var r = e.transformState.scale, i = e.wrapperComponent, n = e.setup, a = n.maxScale, s = n.minScale, l = n.zoomAnimation, d = n.smooth, p = l.size;
2777
+ if (!i)
2778
+ throw new Error("Wrapper is not mounted");
2779
+ var f = d ? r * Math.exp(o * t) : r + o * t, c = it(te(f, 3), s, a, p, !1);
2780
+ return c;
2781
+ };
2782
+ function Tr(e, o, t, r, i) {
2783
+ var n = e.wrapperComponent, a = e.transformState, s = a.scale, l = a.positionX, d = a.positionY;
2784
+ if (!n)
2785
+ return console.error("No WrapperComponent found");
2786
+ var p = n.offsetWidth, f = n.offsetHeight, c = (p / 2 - l) / s, v = (f / 2 - d) / s, h = Pr(e, o, t), m = po(e, h, c, v);
2787
+ if (!m)
2788
+ return console.error("Error during zoom event. New transformation state was not calculated.");
2789
+ Se(e, m, r, i);
2790
+ }
2791
+ function Cr(e, o, t, r) {
2792
+ var i = e.setup, n = e.wrapperComponent, a = i.limitToBounds, s = wr(e.props), l = e.transformState, d = l.scale, p = l.positionX, f = l.positionY;
2793
+ if (n) {
2794
+ var c = uo(e, s.scale), v = zt(s.positionX, s.positionY, c, a, 0, 0, n), h = {
2795
+ scale: s.scale,
2796
+ positionX: v.x,
2797
+ positionY: v.y
2798
+ };
2799
+ d === s.scale && p === s.positionX && f === s.positionY || (r == null || r(), Se(e, h, o, t));
2800
+ }
2801
+ }
2802
+ function Ra(e, o, t, r) {
2803
+ var i = e.getBoundingClientRect(), n = o.getBoundingClientRect(), a = t.getBoundingClientRect(), s = n.x * r.scale, l = n.y * r.scale;
2804
+ return {
2805
+ x: (i.x - a.x + s) / r.scale,
2806
+ y: (i.y - a.y + l) / r.scale
2807
+ };
2808
+ }
2809
+ function xa(e, o, t) {
2810
+ var r = e.wrapperComponent, i = e.contentComponent, n = e.transformState, a = e.setup, s = a.limitToBounds, l = a.minScale, d = a.maxScale;
2811
+ if (!r || !i)
2812
+ return n;
2813
+ var p = r.getBoundingClientRect(), f = o.getBoundingClientRect(), c = Ra(o, r, i, n), v = c.x, h = c.y, m = f.width / n.scale, g = f.height / n.scale, P = r.offsetWidth / m, S = r.offsetHeight / g, y = it(t || Math.min(P, S), l, d, 0, !1), b = (p.width - m * y) / 2, w = (p.height - g * y) / 2, T = (p.left - v) * y + b, O = (p.top - h) * y + w, D = uo(e, y), E = zt(T, O, D, s, 0, 0, r), A = E.x, N = E.y;
2814
+ return { positionX: A, positionY: N, scale: y };
2815
+ }
2816
+ var Da = function(e) {
2817
+ return function(o, t, r) {
2818
+ o === void 0 && (o = 0.5), t === void 0 && (t = 300), r === void 0 && (r = "easeOut"), Tr(e, 1, o, t, r);
2819
+ };
2820
+ }, Na = function(e) {
2821
+ return function(o, t, r) {
2822
+ o === void 0 && (o = 0.5), t === void 0 && (t = 300), r === void 0 && (r = "easeOut"), Tr(e, -1, o, t, r);
2823
+ };
2824
+ }, Ma = function(e) {
2825
+ return function(o, t, r, i, n) {
2826
+ i === void 0 && (i = 300), n === void 0 && (n = "easeOut");
2827
+ var a = e.transformState, s = a.positionX, l = a.positionY, d = a.scale, p = e.wrapperComponent, f = e.contentComponent, c = e.setup.disabled;
2828
+ if (!(c || !p || !f)) {
2829
+ var v = {
2830
+ positionX: Number.isNaN(o) ? s : o,
2831
+ positionY: Number.isNaN(t) ? l : t,
2832
+ scale: Number.isNaN(r) ? d : r
2833
+ };
2834
+ Se(e, v, i, n);
2835
+ }
2836
+ };
2837
+ }, _a = function(e) {
2838
+ return function(o, t) {
2839
+ o === void 0 && (o = 200), t === void 0 && (t = "easeOut"), Cr(e, o, t);
2840
+ };
2841
+ }, Ya = function(e) {
2842
+ return function(o, t, r) {
2843
+ t === void 0 && (t = 200), r === void 0 && (r = "easeOut");
2844
+ var i = e.transformState, n = e.wrapperComponent, a = e.contentComponent;
2845
+ if (n && a) {
2846
+ var s = Sr(o || i.scale, n, a);
2847
+ Se(e, s, t, r);
2848
+ }
2849
+ };
2850
+ }, Ba = function(e) {
2851
+ return function(o, t, r, i) {
2852
+ r === void 0 && (r = 600), i === void 0 && (i = "easeOut"), de(e);
2853
+ var n = e.wrapperComponent, a = typeof o == "string" ? document.getElementById(o) : o;
2854
+ if (n && a && n.contains(a)) {
2855
+ var s = xa(e, a, t);
2856
+ Se(e, s, r, i);
2857
+ }
2858
+ };
2859
+ }, Et = function(e) {
2860
+ return {
2861
+ instance: e,
2862
+ zoomIn: Da(e),
2863
+ zoomOut: Na(e),
2864
+ setTransform: Ma(e),
2865
+ resetTransform: _a(e),
2866
+ centerView: Ya(e),
2867
+ zoomToElement: Ba(e)
2868
+ };
2869
+ }, za = function(e) {
2870
+ return {
2871
+ instance: e,
2872
+ state: e.transformState
2873
+ };
2874
+ }, M = function(e) {
2875
+ var o = {};
2876
+ return Object.assign(o, za(e)), Object.assign(o, Et(e)), o;
2877
+ }, Zt = !1;
2878
+ function Ut() {
2879
+ try {
2880
+ var e = {
2881
+ get passive() {
2882
+ return Zt = !0, !1;
2883
+ }
2884
+ };
2885
+ return e;
2886
+ } catch {
2887
+ return Zt = !1, Zt;
2888
+ }
2889
+ }
2890
+ var Wt = function(e, o) {
2891
+ var t = e.tagName.toUpperCase(), r = o.find(function(n) {
2892
+ return n.toUpperCase() === t;
2893
+ });
2894
+ if (r)
2895
+ return !0;
2896
+ var i = o.find(function(n) {
2897
+ return e.classList.contains(n);
2898
+ });
2899
+ return !!i;
2900
+ }, Jt = function(e) {
2901
+ e && clearTimeout(e);
2902
+ }, $a = function(e, o, t) {
2903
+ return "translate(".concat(e, "px, ").concat(o, "px) scale(").concat(t, ")");
2904
+ }, Sr = function(e, o, t) {
2905
+ var r = t.offsetWidth * e, i = t.offsetHeight * e, n = (o.offsetWidth - r) / 2, a = (o.offsetHeight - i) / 2;
2906
+ return {
2907
+ scale: e,
2908
+ positionX: n,
2909
+ positionY: a
2910
+ };
2911
+ };
2912
+ function Wa(e) {
2913
+ return function(o) {
2914
+ e.forEach(function(t) {
2915
+ typeof t == "function" ? t(o) : t != null && (t.current = o);
2916
+ });
2917
+ };
2918
+ }
2919
+ var Xa = function(e, o) {
2920
+ var t = e.setup.wheel, r = t.disabled, i = t.wheelDisabled, n = t.touchPadDisabled, a = t.excluded, s = e.isInitialized, l = e.isPanning, d = o.target, p = s && !l && !r && d;
2921
+ if (!p || i && !o.ctrlKey || n && o.ctrlKey)
2922
+ return !1;
2923
+ var f = Wt(d, a);
2924
+ return !f;
2925
+ }, ka = function(e) {
2926
+ return e ? e.deltaY < 0 ? 1 : -1 : 0;
2927
+ };
2928
+ function ja(e, o) {
2929
+ var t = ka(e), r = Jn(o, t);
2930
+ return r;
2931
+ }
2932
+ function Or(e, o, t) {
2933
+ var r = o.getBoundingClientRect(), i = 0, n = 0;
2934
+ if ("clientX" in e)
2935
+ i = (e.clientX - r.left) / t, n = (e.clientY - r.top) / t;
2936
+ else {
2937
+ var a = e.touches[0];
2938
+ i = (a.clientX - r.left) / t, n = (a.clientY - r.top) / t;
2939
+ }
2940
+ return (Number.isNaN(i) || Number.isNaN(n)) && console.error("No mouse or touch offset found"), {
2941
+ x: i,
2942
+ y: n
2943
+ };
2944
+ }
2945
+ var La = function(e, o, t, r, i) {
2946
+ var n = e.transformState.scale, a = e.wrapperComponent, s = e.setup, l = s.maxScale, d = s.minScale, p = s.zoomAnimation, f = s.disablePadding, c = p.size, v = p.disabled;
2947
+ if (!a)
2948
+ throw new Error("Wrapper is not mounted");
2949
+ var h = n + o * t;
2950
+ if (i)
2951
+ return h;
2952
+ var m = r ? !1 : !v, g = it(te(h, 3), d, l, c, m && !f);
2953
+ return g;
2954
+ }, Va = function(e, o) {
2955
+ var t = e.previousWheelEvent, r = e.transformState.scale, i = e.setup, n = i.maxScale, a = i.minScale;
2956
+ return t ? r < n || r > a || Math.sign(t.deltaY) !== Math.sign(o.deltaY) || t.deltaY > 0 && t.deltaY < o.deltaY || t.deltaY < 0 && t.deltaY > o.deltaY || Math.sign(t.deltaY) !== Math.sign(o.deltaY) : !1;
2957
+ }, Ha = function(e, o) {
2958
+ var t = e.setup.pinch, r = t.disabled, i = t.excluded, n = e.isInitialized, a = o.target, s = n && !r && a;
2959
+ if (!s)
2960
+ return !1;
2961
+ var l = Wt(a, i);
2962
+ return !l;
2963
+ }, Fa = function(e) {
2964
+ var o = e.setup.pinch.disabled, t = e.isInitialized, r = e.pinchStartDistance, i = t && !o && r;
2965
+ return !!i;
2966
+ }, Za = function(e, o, t) {
2967
+ var r = t.getBoundingClientRect(), i = e.touches, n = te(i[0].clientX - r.left, 5), a = te(i[0].clientY - r.top, 5), s = te(i[1].clientX - r.left, 5), l = te(i[1].clientY - r.top, 5);
2968
+ return {
2969
+ x: (n + s) / 2 / o,
2970
+ y: (a + l) / 2 / o
2971
+ };
2972
+ }, Er = function(e) {
2973
+ return Math.sqrt(Math.pow(e.touches[0].pageX - e.touches[1].pageX, 2) + Math.pow(e.touches[0].pageY - e.touches[1].pageY, 2));
2974
+ }, Ua = function(e, o) {
2975
+ var t = e.pinchStartScale, r = e.pinchStartDistance, i = e.setup, n = i.maxScale, a = i.minScale, s = i.zoomAnimation, l = i.disablePadding, d = s.size, p = s.disabled;
2976
+ if (!t || r === null || !o)
2977
+ throw new Error("Pinch touches distance was not provided");
2978
+ if (o < 0)
2979
+ return e.transformState.scale;
2980
+ var f = o / r, c = f * t;
2981
+ return it(te(c, 2), a, n, d, !p && !l);
2982
+ }, qa = 160, Ka = 100, Qa = function(e, o) {
2983
+ var t = e.props, r = t.onWheelStart, i = t.onZoomStart;
2984
+ e.wheelStopEventTimer || (de(e), z(M(e), o, r), z(M(e), o, i));
2985
+ }, Ga = function(e, o) {
2986
+ var t = e.props, r = t.onWheel, i = t.onZoom, n = e.contentComponent, a = e.setup, s = e.transformState, l = s.scale, d = a.limitToBounds, p = a.centerZoomedOut, f = a.zoomAnimation, c = a.wheel, v = a.disablePadding, h = a.smooth, m = f.size, g = f.disabled, P = c.step, S = c.smoothStep;
2987
+ if (!n)
2988
+ throw new Error("Component not mounted");
2989
+ o.preventDefault(), o.stopPropagation();
2990
+ var y = ja(o, null), b = h ? S * Math.abs(o.deltaY) : P, w = La(e, y, b, !o.ctrlKey);
2991
+ if (l !== w) {
2992
+ var T = je(e, w), O = Or(o, n, l), D = g || m === 0 || p || v, E = d && D, A = $t(e, O.x, O.y, w, T, E), N = A.x, $ = A.y;
2993
+ e.previousWheelEvent = o, e.setTransformState(w, N, $), z(M(e), o, r), z(M(e), o, i);
2994
+ }
2995
+ }, Ja = function(e, o) {
2996
+ var t = e.props, r = t.onWheelStop, i = t.onZoomStop;
2997
+ Jt(e.wheelAnimationTimer), e.wheelAnimationTimer = setTimeout(function() {
2998
+ e.mounted && (yr(e, o.x, o.y), e.wheelAnimationTimer = null);
2999
+ }, Ka);
3000
+ var n = Va(e, o);
3001
+ n && (Jt(e.wheelStopEventTimer), e.wheelStopEventTimer = setTimeout(function() {
3002
+ e.mounted && (e.wheelStopEventTimer = null, z(M(e), o, r), z(M(e), o, i));
3003
+ }, qa));
3004
+ }, Ia = function(e, o) {
3005
+ var t = Er(o);
3006
+ e.pinchStartDistance = t, e.lastDistance = t, e.pinchStartScale = e.transformState.scale, e.isPanning = !1, de(e);
3007
+ }, es = function(e, o) {
3008
+ var t = e.contentComponent, r = e.pinchStartDistance, i = e.transformState.scale, n = e.setup, a = n.limitToBounds, s = n.centerZoomedOut, l = n.zoomAnimation, d = l.disabled, p = l.size;
3009
+ if (!(r === null || !t)) {
3010
+ var f = Za(o, i, t);
3011
+ if (!(!Number.isFinite(f.x) || !Number.isFinite(f.y))) {
3012
+ var c = Er(o), v = Ua(e, c);
3013
+ if (v !== i) {
3014
+ var h = je(e, v), m = d || p === 0 || s, g = a && m, P = $t(e, f.x, f.y, v, h, g), S = P.x, y = P.y;
3015
+ e.pinchMidpoint = f, e.lastDistance = c, e.setTransformState(v, S, y);
3016
+ }
3017
+ }
3018
+ }
3019
+ }, ts = function(e) {
3020
+ var o = e.pinchMidpoint;
3021
+ e.velocity = null, e.lastDistance = null, e.pinchMidpoint = null, e.pinchStartScale = null, e.pinchStartDistance = null, yr(e, o == null ? void 0 : o.x, o == null ? void 0 : o.y);
3022
+ }, Ar = function(e, o) {
3023
+ var t = e.props.onZoomStop, r = e.setup.doubleClick.animationTime;
3024
+ Jt(e.doubleClickStopEventTimer), e.doubleClickStopEventTimer = setTimeout(function() {
3025
+ e.doubleClickStopEventTimer = null, z(M(e), o, t);
3026
+ }, r);
3027
+ }, os = function(e, o) {
3028
+ var t = e.props, r = t.onZoomStart, i = t.onZoom, n = e.setup.doubleClick, a = n.animationTime, s = n.animationType;
3029
+ z(M(e), o, r), Cr(e, a, s, function() {
3030
+ return z(M(e), o, i);
3031
+ }), Ar(e, o);
3032
+ };
3033
+ function rs(e, o) {
3034
+ var t = e.setup, r = e.doubleClickStopEventTimer, i = e.transformState, n = e.contentComponent, a = i.scale, s = e.props, l = s.onZoomStart, d = s.onZoom, p = t.doubleClick, f = p.disabled, c = p.mode, v = p.step, h = p.animationTime, m = p.animationType;
3035
+ if (!f && !r) {
3036
+ if (c === "reset")
3037
+ return os(e, o);
3038
+ if (!n)
3039
+ return console.error("No ContentComponent found");
3040
+ var g = c === "zoomOut" ? -1 : 1, P = Pr(e, g, v);
3041
+ if (a !== P) {
3042
+ z(M(e), o, l);
3043
+ var S = Or(o, n, a), y = po(e, P, S.x, S.y);
3044
+ if (!y)
3045
+ return console.error("Error during zoom event. New transformation state was not calculated.");
3046
+ z(M(e), o, d), Se(e, y, h, m), Ar(e, o);
3047
+ }
3048
+ }
3049
+ }
3050
+ var is = function(e, o) {
3051
+ var t = e.isInitialized, r = e.setup, i = e.wrapperComponent, n = r.doubleClick, a = n.disabled, s = n.excluded, l = o.target, d = i == null ? void 0 : i.contains(l), p = t && l && d && !a;
3052
+ if (!p)
3053
+ return !1;
3054
+ var f = Wt(l, s);
3055
+ return !f;
3056
+ }, ns = (
3057
+ /** @class */
3058
+ function() {
3059
+ function e(o) {
3060
+ var t = this;
3061
+ this.mounted = !0, this.onChangeCallbacks = /* @__PURE__ */ new Set(), this.onInitCallbacks = /* @__PURE__ */ new Set(), this.wrapperComponent = null, this.contentComponent = null, this.isInitialized = !1, this.bounds = null, this.previousWheelEvent = null, this.wheelStopEventTimer = null, this.wheelAnimationTimer = null, this.isPanning = !1, this.startCoords = null, this.lastTouch = null, this.distance = null, this.lastDistance = null, this.pinchStartDistance = null, this.pinchStartScale = null, this.pinchMidpoint = null, this.doubleClickStopEventTimer = null, this.velocity = null, this.velocityTime = null, this.lastMousePosition = null, this.animate = !1, this.animation = null, this.maxBounds = null, this.pressedKeys = {}, this.mount = function() {
3062
+ t.initializeWindowEvents();
3063
+ }, this.unmount = function() {
3064
+ t.cleanupWindowEvents();
3065
+ }, this.update = function(r) {
3066
+ je(t, t.transformState.scale), t.setup = Ko(r);
3067
+ }, this.initializeWindowEvents = function() {
3068
+ var r, i = Ut(), n = (r = t.wrapperComponent) === null || r === void 0 ? void 0 : r.ownerDocument, a = n == null ? void 0 : n.defaultView;
3069
+ a == null || a.addEventListener("mousedown", t.onPanningStart, i), a == null || a.addEventListener("mousemove", t.onPanning, i), a == null || a.addEventListener("mouseup", t.onPanningStop, i), n == null || n.addEventListener("mouseleave", t.clearPanning, i), a == null || a.addEventListener("keyup", t.setKeyUnPressed, i), a == null || a.addEventListener("keydown", t.setKeyPressed, i);
3070
+ }, this.cleanupWindowEvents = function() {
3071
+ var r, i, n = Ut(), a = (r = t.wrapperComponent) === null || r === void 0 ? void 0 : r.ownerDocument, s = a == null ? void 0 : a.defaultView;
3072
+ s == null || s.removeEventListener("mousedown", t.onPanningStart, n), s == null || s.removeEventListener("mousemove", t.onPanning, n), s == null || s.removeEventListener("mouseup", t.onPanningStop, n), a == null || a.removeEventListener("mouseleave", t.clearPanning, n), s == null || s.removeEventListener("keyup", t.setKeyUnPressed, n), s == null || s.removeEventListener("keydown", t.setKeyPressed, n), document.removeEventListener("mouseleave", t.clearPanning, n), de(t), (i = t.observer) === null || i === void 0 || i.disconnect();
3073
+ }, this.handleInitializeWrapperEvents = function(r) {
3074
+ var i = Ut();
3075
+ r.addEventListener("wheel", t.onWheelZoom, i), r.addEventListener("dblclick", t.onDoubleClick, i), r.addEventListener("touchstart", t.onTouchPanningStart, i), r.addEventListener("touchmove", t.onTouchPanning, i), r.addEventListener("touchend", t.onTouchPanningStop, i);
3076
+ }, this.handleInitialize = function(r) {
3077
+ var i = t.setup.centerOnInit;
3078
+ t.applyTransformation(), t.onInitCallbacks.forEach(function(n) {
3079
+ return n(M(t));
3080
+ }), i && (t.setCenter(), t.observer = new ResizeObserver(function() {
3081
+ var n;
3082
+ t.onInitCallbacks.forEach(function(a) {
3083
+ return a(M(t));
3084
+ }), t.setCenter(), (n = t.observer) === null || n === void 0 || n.disconnect();
3085
+ }), t.observer.observe(r));
3086
+ }, this.onWheelZoom = function(r) {
3087
+ var i = t.setup.disabled;
3088
+ if (!i) {
3089
+ var n = Xa(t, r);
3090
+ if (n) {
3091
+ var a = t.isPressingKeys(t.setup.wheel.activationKeys);
3092
+ a && (Qa(t, r), Ga(t, r), Ja(t, r));
3093
+ }
3094
+ }
3095
+ }, this.onPanningStart = function(r) {
3096
+ var i = t.setup.disabled, n = t.props.onPanningStart;
3097
+ if (!i) {
3098
+ var a = Vo(t, r);
3099
+ if (a) {
3100
+ var s = t.isPressingKeys(t.setup.panning.activationKeys);
3101
+ s && (r.preventDefault(), r.stopPropagation(), de(t), Zo(t, r), z(M(t), r, n));
3102
+ }
3103
+ }
3104
+ }, this.onPanning = function(r) {
3105
+ var i = t.setup.disabled, n = t.props.onPanning;
3106
+ if (!i) {
3107
+ var a = Ho(t);
3108
+ if (a) {
3109
+ var s = t.isPressingKeys(t.setup.panning.activationKeys);
3110
+ s && (r.preventDefault(), r.stopPropagation(), Uo(t, r.clientX, r.clientY), z(M(t), r, n));
3111
+ }
3112
+ }
3113
+ }, this.onPanningStop = function(r) {
3114
+ var i = t.props.onPanningStop;
3115
+ t.isPanning && (Aa(t), z(M(t), r, i));
3116
+ }, this.onPinchStart = function(r) {
3117
+ var i = t.setup.disabled, n = t.props, a = n.onPinchingStart, s = n.onZoomStart;
3118
+ if (!i) {
3119
+ var l = Ha(t, r);
3120
+ l && (Ia(t, r), de(t), z(M(t), r, a), z(M(t), r, s));
3121
+ }
3122
+ }, this.onPinch = function(r) {
3123
+ var i = t.setup.disabled, n = t.props, a = n.onPinching, s = n.onZoom;
3124
+ if (!i) {
3125
+ var l = Fa(t);
3126
+ l && (r.preventDefault(), r.stopPropagation(), es(t, r), z(M(t), r, a), z(M(t), r, s));
3127
+ }
3128
+ }, this.onPinchStop = function(r) {
3129
+ var i = t.props, n = i.onPinchingStop, a = i.onZoomStop;
3130
+ t.pinchStartScale && (ts(t), z(M(t), r, n), z(M(t), r, a));
3131
+ }, this.onTouchPanningStart = function(r) {
3132
+ var i = t.setup.disabled, n = t.props.onPanningStart;
3133
+ if (!i) {
3134
+ var a = Vo(t, r);
3135
+ if (a) {
3136
+ var s = t.lastTouch && +/* @__PURE__ */ new Date() - t.lastTouch < 200;
3137
+ if (s && r.touches.length === 1)
3138
+ t.onDoubleClick(r);
3139
+ else {
3140
+ t.lastTouch = +/* @__PURE__ */ new Date(), de(t);
3141
+ var l = r.touches, d = l.length === 1, p = l.length === 2;
3142
+ d && (de(t), Zo(t, r), z(M(t), r, n)), p && t.onPinchStart(r);
3143
+ }
3144
+ }
3145
+ }
3146
+ }, this.onTouchPanning = function(r) {
3147
+ var i = t.setup.disabled, n = t.props.onPanning;
3148
+ if (t.isPanning && r.touches.length === 1) {
3149
+ if (i)
3150
+ return;
3151
+ var a = Ho(t);
3152
+ if (!a)
3153
+ return;
3154
+ r.preventDefault(), r.stopPropagation();
3155
+ var s = r.touches[0];
3156
+ Uo(t, s.clientX, s.clientY), z(M(t), r, n);
3157
+ } else
3158
+ r.touches.length > 1 && t.onPinch(r);
3159
+ }, this.onTouchPanningStop = function(r) {
3160
+ t.onPanningStop(r), t.onPinchStop(r);
3161
+ }, this.onDoubleClick = function(r) {
3162
+ var i = t.setup.disabled;
3163
+ if (!i) {
3164
+ var n = is(t, r);
3165
+ n && rs(t, r);
3166
+ }
3167
+ }, this.clearPanning = function(r) {
3168
+ t.isPanning && t.onPanningStop(r);
3169
+ }, this.setKeyPressed = function(r) {
3170
+ t.pressedKeys[r.key] = !0;
3171
+ }, this.setKeyUnPressed = function(r) {
3172
+ t.pressedKeys[r.key] = !1;
3173
+ }, this.isPressingKeys = function(r) {
3174
+ return r.length ? !!r.find(function(i) {
3175
+ return t.pressedKeys[i];
3176
+ }) : !0;
3177
+ }, this.setTransformState = function(r, i, n) {
3178
+ var a = t.props.onTransformed;
3179
+ if (!Number.isNaN(r) && !Number.isNaN(i) && !Number.isNaN(n)) {
3180
+ r !== t.transformState.scale && (t.transformState.previousScale = t.transformState.scale, t.transformState.scale = r), t.transformState.positionX = i, t.transformState.positionY = n, t.applyTransformation();
3181
+ var s = M(t);
3182
+ t.onChangeCallbacks.forEach(function(l) {
3183
+ return l(s);
3184
+ }), z(s, { scale: r, positionX: i, positionY: n }, a);
3185
+ } else
3186
+ console.error("Detected NaN set state values");
3187
+ }, this.setCenter = function() {
3188
+ if (t.wrapperComponent && t.contentComponent) {
3189
+ var r = Sr(t.transformState.scale, t.wrapperComponent, t.contentComponent);
3190
+ t.setTransformState(r.scale, r.positionX, r.positionY);
3191
+ }
3192
+ }, this.handleTransformStyles = function(r, i, n) {
3193
+ return t.props.customTransform ? t.props.customTransform(r, i, n) : $a(r, i, n);
3194
+ }, this.applyTransformation = function() {
3195
+ if (!(!t.mounted || !t.contentComponent)) {
3196
+ var r = t.transformState, i = r.scale, n = r.positionX, a = r.positionY, s = t.handleTransformStyles(n, a, i);
3197
+ t.contentComponent.style.transform = s;
3198
+ }
3199
+ }, this.getContext = function() {
3200
+ return M(t);
3201
+ }, this.onChange = function(r) {
3202
+ return t.onChangeCallbacks.has(r) || t.onChangeCallbacks.add(r), function() {
3203
+ t.onChangeCallbacks.delete(r);
3204
+ };
3205
+ }, this.onInit = function(r) {
3206
+ return t.onInitCallbacks.has(r) || t.onInitCallbacks.add(r), function() {
3207
+ t.onInitCallbacks.delete(r);
3208
+ };
3209
+ }, this.init = function(r, i) {
3210
+ t.cleanupWindowEvents(), t.wrapperComponent = r, t.contentComponent = i, je(t, t.transformState.scale), t.handleInitializeWrapperEvents(r), t.handleInitialize(i), t.initializeWindowEvents(), t.isInitialized = !0;
3211
+ var n = M(t);
3212
+ z(n, void 0, t.props.onInit);
3213
+ }, this.props = o, this.setup = Ko(this.props), this.transformState = wr(this.props);
3214
+ }
3215
+ return e;
3216
+ }()
3217
+ ), Xt = xe.createContext(null), as = function(e, o) {
3218
+ return typeof e == "function" ? e(o) : e;
3219
+ }, ks = xe.forwardRef(function(e, o) {
3220
+ var t = Tt(new ns(e)).current, r = as(e.children, Et(t));
3221
+ return Qr(o, function() {
3222
+ return Et(t);
3223
+ }, [t]), It(function() {
3224
+ t.update(e);
3225
+ }, [t, e]), xe.createElement(Xt.Provider, { value: t }, r);
3226
+ });
3227
+ xe.forwardRef(function(e, o) {
3228
+ var t = Tt(null), r = eo(Xt);
3229
+ return It(function() {
3230
+ return r.onChange(function(i) {
3231
+ if (t.current) {
3232
+ var n = 0, a = 0;
3233
+ t.current.style.transform = r.handleTransformStyles(n, a, 1 / i.instance.transformState.scale);
3234
+ }
3235
+ });
3236
+ }, [r]), xe.createElement("div", Te({}, e, { ref: Wa([t, o]) }));
3237
+ });
3238
+ function ss(e, o) {
3239
+ o === void 0 && (o = {});
3240
+ var t = o.insertAt;
3241
+ if (!(!e || typeof document > "u")) {
3242
+ var r = document.head || document.getElementsByTagName("head")[0], i = document.createElement("style");
3243
+ i.type = "text/css", t === "top" && r.firstChild ? r.insertBefore(i, r.firstChild) : r.appendChild(i), i.styleSheet ? i.styleSheet.cssText = e : i.appendChild(document.createTextNode(e));
3244
+ }
3245
+ }
3246
+ var ls = `.transform-component-module_wrapper__SPB86 {
3247
+ position: relative;
3248
+ width: -moz-fit-content;
3249
+ width: fit-content;
3250
+ height: -moz-fit-content;
3251
+ height: fit-content;
3252
+ overflow: hidden;
3253
+ -webkit-touch-callout: none; /* iOS Safari */
3254
+ -webkit-user-select: none; /* Safari */
3255
+ -khtml-user-select: none; /* Konqueror HTML */
3256
+ -moz-user-select: none; /* Firefox */
3257
+ -ms-user-select: none; /* Internet Explorer/Edge */
3258
+ user-select: none;
3259
+ margin: 0;
3260
+ padding: 0;
3261
+ }
3262
+ .transform-component-module_content__FBWxo {
3263
+ display: flex;
3264
+ flex-wrap: wrap;
3265
+ width: -moz-fit-content;
3266
+ width: fit-content;
3267
+ height: -moz-fit-content;
3268
+ height: fit-content;
3269
+ margin: 0;
3270
+ padding: 0;
3271
+ transform-origin: 0% 0%;
3272
+ }
3273
+ .transform-component-module_content__FBWxo img {
3274
+ pointer-events: none;
3275
+ }
3276
+ `, Qo = { wrapper: "transform-component-module_wrapper__SPB86", content: "transform-component-module_content__FBWxo" };
3277
+ ss(ls);
3278
+ var js = function(e) {
3279
+ var o = e.children, t = e.wrapperClass, r = t === void 0 ? "" : t, i = e.contentClass, n = i === void 0 ? "" : i, a = e.wrapperStyle, s = e.contentStyle, l = e.wrapperProps, d = l === void 0 ? {} : l, p = e.contentProps, f = p === void 0 ? {} : p, c = eo(Xt).init, v = Tt(null), h = Tt(null);
3280
+ return It(function() {
3281
+ var m = v.current, g = h.current;
3282
+ m !== null && g !== null && c && c(m, g);
3283
+ }, []), xe.createElement(
3284
+ "div",
3285
+ Te({}, d, { ref: v, className: "react-transform-wrapper ".concat(Qo.wrapper, " ").concat(r), style: a }),
3286
+ xe.createElement("div", Te({}, f, { ref: h, className: "react-transform-component ".concat(Qo.content, " ").concat(n), style: s }), o)
3287
+ );
3288
+ }, us = function() {
3289
+ var e = eo(Xt);
3290
+ if (!e)
3291
+ throw new Error("Transform context must be placed inside TransformWrapper");
3292
+ return e;
3293
+ }, ps = function() {
3294
+ var e = us();
3295
+ return Et(e);
3296
+ }, fo = {}, ds = xt;
3297
+ Object.defineProperty(fo, "__esModule", {
3298
+ value: !0
3299
+ });
3300
+ var Rr = fo.default = void 0, fs = ds(Rt()), cs = At, vs = (0, fs.default)(/* @__PURE__ */ (0, cs.jsx)("path", {
3301
+ d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
3302
+ }), "Add");
3303
+ Rr = fo.default = vs;
3304
+ var co = {}, ms = xt;
3305
+ Object.defineProperty(co, "__esModule", {
3306
+ value: !0
3307
+ });
3308
+ var xr = co.default = void 0, hs = ms(Rt()), gs = At, bs = (0, hs.default)(/* @__PURE__ */ (0, gs.jsx)("path", {
3309
+ d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
3310
+ }), "Refresh");
3311
+ xr = co.default = bs;
3312
+ var vo = {}, ys = xt;
3313
+ Object.defineProperty(vo, "__esModule", {
3314
+ value: !0
3315
+ });
3316
+ var Dr = vo.default = void 0, ws = ys(Rt()), Ps = At, Ts = (0, ws.default)(/* @__PURE__ */ (0, Ps.jsx)("path", {
3317
+ d: "M19 13H5v-2h14v2z"
3318
+ }), "Remove");
3319
+ Dr = vo.default = Ts;
3320
+ var mo = {}, Cs = xt;
3321
+ Object.defineProperty(mo, "__esModule", {
3322
+ value: !0
3323
+ });
3324
+ var Nr = mo.default = void 0, Ss = Cs(Rt()), Os = At, Es = (0, Ss.default)(/* @__PURE__ */ (0, Os.jsx)("path", {
3325
+ d: "m4 7.59 5-5c.78-.78 2.05-.78 2.83 0L20.24 11h-2.83L10.4 4 5.41 9H8v2H2V5h2v2.59zM20 19h2v-6h-6v2h2.59l-4.99 5-7.01-7H3.76l8.41 8.41c.78.78 2.05.78 2.83 0l5-5V19z"
3326
+ }), "ScreenRotationAlt");
3327
+ Nr = mo.default = Es;
3328
+ const As = {
3329
+ position: "absolute",
3330
+ zIndex: 1,
3331
+ right: "2rem",
3332
+ bottom: "2rem",
3333
+ width: "fit-content",
3334
+ display: "flex",
3335
+ flexDirection: "column",
3336
+ justifyContent: "flex-end",
3337
+ backgroundColor: "#0F0E0E4D",
3338
+ borderRadius: "5rem"
3339
+ }, Go = {
3340
+ backgroundColor: "#0000000D",
3341
+ height: "0.0625rem"
3342
+ }, yt = {
3343
+ color: "white",
3344
+ "&:focus": {
3345
+ outline: "none"
3346
+ }
3347
+ }, Rs = {
3348
+ ...yt,
3349
+ position: "absolute",
3350
+ zIndex: 1,
3351
+ right: "2rem",
3352
+ bottom: "10rem",
3353
+ background: "#0F0E0E4D",
3354
+ color: "white",
3355
+ padding: "0.55rem"
3356
+ }, Ls = ({
3357
+ controllerContainerProps: e,
3358
+ zoomInButtonProps: o,
3359
+ zoomOutButtonProps: t,
3360
+ resetTransformButtonProps: r,
3361
+ dividerProps: i,
3362
+ handleRotate: n,
3363
+ rotateButtonProps: a
3364
+ }) => {
3365
+ const { zoomIn: s, zoomOut: l, resetTransform: d } = ps();
3366
+ function p() {
3367
+ s();
3368
+ }
3369
+ function f() {
3370
+ l();
3371
+ }
3372
+ function c() {
3373
+ d();
3374
+ }
3375
+ return /* @__PURE__ */ wt(Hr, { children: [
3376
+ /* @__PURE__ */ _(ht, { title: "Rotate", placement: "left", children: /* @__PURE__ */ _(
3377
+ ft,
3378
+ {
3379
+ disableRipple: !0,
3380
+ disableFocusRipple: !0,
3381
+ "aria-label": "Rotate",
3382
+ onClick: n,
3383
+ sx: Rs,
3384
+ ...a,
3385
+ children: /* @__PURE__ */ _(Nr, {})
3386
+ }
3387
+ ) }),
3388
+ /* @__PURE__ */ wt(
3389
+ Wn,
3390
+ {
3391
+ sx: As,
3392
+ ...e,
3393
+ children: [
3394
+ /* @__PURE__ */ _(ht, { title: "Zoom In", placement: "left", children: /* @__PURE__ */ _(
3395
+ ft,
3396
+ {
3397
+ disableRipple: !0,
3398
+ disableFocusRipple: !0,
3399
+ "aria-label": "Zoom In",
3400
+ onClick: p,
3401
+ sx: yt,
3402
+ ...o,
3403
+ children: /* @__PURE__ */ _(Rr, {})
3404
+ }
3405
+ ) }),
3406
+ /* @__PURE__ */ _(Lo, { sx: Go, ...i }),
3407
+ /* @__PURE__ */ _(ht, { title: "Zoom Out", placement: "left", children: /* @__PURE__ */ _(
3408
+ ft,
3409
+ {
3410
+ disableFocusRipple: !0,
3411
+ disableRipple: !0,
3412
+ "aria-label": "Zoom Out",
3413
+ onClick: f,
3414
+ sx: yt,
3415
+ ...t,
3416
+ children: /* @__PURE__ */ _(Dr, {})
3417
+ }
3418
+ ) }),
3419
+ /* @__PURE__ */ _(Lo, { sx: Go, ...i }),
3420
+ /* @__PURE__ */ _(ht, { title: "Reset", placement: "left", children: /* @__PURE__ */ _(
3421
+ ft,
3422
+ {
3423
+ disableFocusRipple: !0,
3424
+ disableRipple: !0,
3425
+ "aria-label": "Reset",
3426
+ onClick: c,
3427
+ sx: yt,
3428
+ ...r,
3429
+ children: /* @__PURE__ */ _(xr, {})
3430
+ }
3431
+ ) })
3432
+ ]
3433
+ }
3434
+ )
3435
+ ] });
3436
+ };
3437
+ export {
3438
+ Wn as B,
3439
+ ks as T,
3440
+ Ls as Z,
3441
+ js as a
3442
+ };