@smart-factor/gem-ui-components 0.0.3 → 0.0.4

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,2281 @@
1
+ import ht, { jsx as E, jsxs as de } from "react/jsx-runtime";
2
+ import { c as ne, P as n, _ as p, o as U, C as mt, a as V, b as bt, s as ve, u as ye, d as gt, e as vt, f as yt, g as Ee, h as Y, i as Et, j as xt, k as G, l as X, m as L, n as De, p as J, q as H, r as pe, t as q, v as Z, w as Tt, T as He, x as ze, y as le, z as We, A as Ke, B as kt, D as Se, E as Pt, F as Rt, G as Nt, S as ke, H as Ct, I as wt } from "./Stack-BOXYlkv1.js";
3
+ import * as d from "react";
4
+ import * as Ot from "react-dom";
5
+ var be = {};
6
+ function Mt(e) {
7
+ const {
8
+ prototype: t = {}
9
+ } = e;
10
+ return !!t.isReactComponent;
11
+ }
12
+ function Ye(e, t, r, o, i) {
13
+ const s = e[t], a = i || t;
14
+ if (s == null || // When server-side rendering React doesn't warn either.
15
+ // This is not an accurate check for SSR.
16
+ // This is only in place for Emotion compat.
17
+ // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
18
+ typeof window > "u")
19
+ return null;
20
+ let l;
21
+ const c = s.type;
22
+ return typeof c == "function" && !Mt(c) && (l = "Did you accidentally use a plain function component for an element instead?"), l !== void 0 ? new Error(`Invalid ${o} \`${a}\` supplied to \`${r}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
23
+ }
24
+ const oe = ne(n.element, Ye);
25
+ oe.isRequired = ne(n.element.isRequired, Ye);
26
+ const $t = "exact-prop: ​";
27
+ function Ge(e) {
28
+ return process.env.NODE_ENV === "production" ? e : p({}, e, {
29
+ [$t]: (t) => {
30
+ const r = Object.keys(t).filter((o) => !e.hasOwnProperty(o));
31
+ return r.length > 0 ? new Error(`The following props are not supported: ${r.map((o) => `\`${o}\``).join(", ")}. Please remove them.`) : null;
32
+ }
33
+ });
34
+ }
35
+ function Pe(e, t, r, o, i) {
36
+ if (process.env.NODE_ENV === "production")
37
+ return null;
38
+ const s = e[t], a = i || t;
39
+ return s == null ? null : s && s.nodeType !== 1 ? new Error(`Invalid ${o} \`${a}\` supplied to \`${r}\`. Expected an HTMLElement.`) : null;
40
+ }
41
+ function xe(...e) {
42
+ return e.reduce((t, r) => r == null ? t : function(...i) {
43
+ t.apply(this, i), r.apply(this, i);
44
+ }, () => {
45
+ });
46
+ }
47
+ function Xe(e, t = 166) {
48
+ let r;
49
+ function o(...i) {
50
+ const s = () => {
51
+ e.apply(this, i);
52
+ };
53
+ clearTimeout(r), r = setTimeout(s, t);
54
+ }
55
+ return o.clear = () => {
56
+ clearTimeout(r);
57
+ }, o;
58
+ }
59
+ function Dt(e, t) {
60
+ return process.env.NODE_ENV === "production" ? () => null : (r, o, i, s, a) => {
61
+ const l = i || "<<anonymous>>", c = a || o;
62
+ return typeof r[o] < "u" ? new Error(`The ${s} \`${c}\` of \`${l}\` is deprecated. ${t}`) : null;
63
+ };
64
+ }
65
+ function St(e, t) {
66
+ var r, o;
67
+ return /* @__PURE__ */ d.isValidElement(e) && t.indexOf(
68
+ // For server components `muiName` is avaialble in element.type._payload.value.muiName
69
+ // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
70
+ // eslint-disable-next-line no-underscore-dangle
71
+ (r = e.type.muiName) != null ? r : (o = e.type) == null || (o = o._payload) == null || (o = o.value) == null ? void 0 : o.muiName
72
+ ) !== -1;
73
+ }
74
+ function Q(e) {
75
+ return U(e).defaultView || window;
76
+ }
77
+ function It(e, t) {
78
+ if (process.env.NODE_ENV === "production")
79
+ return () => null;
80
+ const r = t ? p({}, t.propTypes) : null;
81
+ return (i) => (s, a, l, c, u, ...f) => {
82
+ const g = u || a, v = r == null ? void 0 : r[g];
83
+ if (v) {
84
+ const y = v(s, a, l, c, u, ...f);
85
+ if (y)
86
+ return y;
87
+ }
88
+ return typeof s[a] < "u" && !s[i] ? new Error(`The prop \`${g}\` of \`${e}\` can only be used together with the \`${i}\` prop.`) : null;
89
+ };
90
+ }
91
+ function _t(e) {
92
+ const t = e.documentElement.clientWidth;
93
+ return Math.abs(window.innerWidth - t);
94
+ }
95
+ function Bt(e) {
96
+ const t = typeof e;
97
+ switch (t) {
98
+ case "number":
99
+ return Number.isNaN(e) ? "NaN" : Number.isFinite(e) ? e !== Math.floor(e) ? "float" : "number" : "Infinity";
100
+ case "object":
101
+ return e === null ? "null" : e.constructor.name;
102
+ default:
103
+ return t;
104
+ }
105
+ }
106
+ function Ft(e) {
107
+ return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
108
+ }
109
+ const jt = Number.isInteger || Ft;
110
+ function Je(e, t, r, o) {
111
+ const i = e[t];
112
+ if (i == null || !jt(i)) {
113
+ const s = Bt(i);
114
+ return new RangeError(`Invalid ${o} \`${t}\` of type \`${s}\` supplied to \`${r}\`, expected \`integer\`.`);
115
+ }
116
+ return null;
117
+ }
118
+ function Ze(e, t, ...r) {
119
+ return e[t] === void 0 ? null : Je(e, t, ...r);
120
+ }
121
+ function Te() {
122
+ return null;
123
+ }
124
+ Ze.isRequired = Je;
125
+ Te.isRequired = Te;
126
+ const Qe = process.env.NODE_ENV === "production" ? Te : Ze, At = {
127
+ configure: (e) => {
128
+ process.env.NODE_ENV !== "production" && console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.", "", "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", "", "The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401", "", "The updated documentation: https://mui.com/guides/classname-generator/"].join(`
129
+ `)), mt.configure(e);
130
+ }
131
+ }, Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
132
+ __proto__: null,
133
+ capitalize: V,
134
+ createChainedFunction: xe,
135
+ createSvgIcon: bt,
136
+ debounce: Xe,
137
+ deprecatedPropType: Dt,
138
+ isMuiElement: St,
139
+ ownerDocument: U,
140
+ ownerWindow: Q,
141
+ requirePropFactory: It,
142
+ setRef: ve,
143
+ unstable_ClassNameGenerator: At,
144
+ unstable_useEnhancedEffect: ye,
145
+ unstable_useId: gt,
146
+ unsupportedProp: vt,
147
+ useControlled: yt,
148
+ useEventCallback: Ee,
149
+ useForkRef: Y,
150
+ useIsFocusVisible: Et
151
+ }, Symbol.toStringTag, { value: "Module" })), Lt = /* @__PURE__ */ xt(Vt);
152
+ var Ie;
153
+ function qt() {
154
+ return Ie || (Ie = 1, function(e) {
155
+ "use client";
156
+ Object.defineProperty(e, "__esModule", {
157
+ value: !0
158
+ }), Object.defineProperty(e, "default", {
159
+ enumerable: !0,
160
+ get: function() {
161
+ return t.createSvgIcon;
162
+ }
163
+ });
164
+ var t = Lt;
165
+ }(be)), be;
166
+ }
167
+ const _e = (e) => {
168
+ let t;
169
+ return e < 1 ? t = 5.11916 * e ** 2 : t = 4.5 * Math.log(e + 1) + 2, (t / 100).toFixed(2);
170
+ };
171
+ function Ut(e) {
172
+ return G("MuiPaper", e);
173
+ }
174
+ X("MuiPaper", ["root", "rounded", "outlined", "elevation", "elevation0", "elevation1", "elevation2", "elevation3", "elevation4", "elevation5", "elevation6", "elevation7", "elevation8", "elevation9", "elevation10", "elevation11", "elevation12", "elevation13", "elevation14", "elevation15", "elevation16", "elevation17", "elevation18", "elevation19", "elevation20", "elevation21", "elevation22", "elevation23", "elevation24"]);
175
+ const Ht = ["className", "component", "elevation", "square", "variant"], zt = (e) => {
176
+ const {
177
+ square: t,
178
+ elevation: r,
179
+ variant: o,
180
+ classes: i
181
+ } = e, s = {
182
+ root: ["root", o, !t && "rounded", o === "elevation" && `elevation${r}`]
183
+ };
184
+ return Z(s, Ut, i);
185
+ }, Wt = L("div", {
186
+ name: "MuiPaper",
187
+ slot: "Root",
188
+ overridesResolver: (e, t) => {
189
+ const {
190
+ ownerState: r
191
+ } = e;
192
+ return [t.root, t[r.variant], !r.square && t.rounded, r.variant === "elevation" && t[`elevation${r.elevation}`]];
193
+ }
194
+ })(({
195
+ theme: e,
196
+ ownerState: t
197
+ }) => {
198
+ var r;
199
+ return p({
200
+ backgroundColor: (e.vars || e).palette.background.paper,
201
+ color: (e.vars || e).palette.text.primary,
202
+ transition: e.transitions.create("box-shadow")
203
+ }, !t.square && {
204
+ borderRadius: e.shape.borderRadius
205
+ }, t.variant === "outlined" && {
206
+ border: `1px solid ${(e.vars || e).palette.divider}`
207
+ }, t.variant === "elevation" && p({
208
+ boxShadow: (e.vars || e).shadows[t.elevation]
209
+ }, !e.vars && e.palette.mode === "dark" && {
210
+ backgroundImage: `linear-gradient(${De("#fff", _e(t.elevation))}, ${De("#fff", _e(t.elevation))})`
211
+ }, e.vars && {
212
+ backgroundImage: (r = e.vars.overlays) == null ? void 0 : r[t.elevation]
213
+ }));
214
+ }), et = /* @__PURE__ */ d.forwardRef(function(t, r) {
215
+ const o = J({
216
+ props: t,
217
+ name: "MuiPaper"
218
+ }), {
219
+ className: i,
220
+ component: s = "div",
221
+ elevation: a = 1,
222
+ square: l = !1,
223
+ variant: c = "elevation"
224
+ } = o, u = H(o, Ht), f = p({}, o, {
225
+ component: s,
226
+ elevation: a,
227
+ square: l,
228
+ variant: c
229
+ }), g = zt(f);
230
+ return process.env.NODE_ENV !== "production" && pe().shadows[a] === void 0 && console.error([`MUI: The elevation provided <Paper elevation={${a}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${a}]\` is defined.`].join(`
231
+ `)), /* @__PURE__ */ E(Wt, p({
232
+ as: s,
233
+ ownerState: f,
234
+ className: q(g.root, i),
235
+ ref: r
236
+ }, u));
237
+ });
238
+ process.env.NODE_ENV !== "production" && (et.propTypes = {
239
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
240
+ // │ These PropTypes are generated from the TypeScript type definitions. │
241
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
242
+ // └─────────────────────────────────────────────────────────────────────┘
243
+ /**
244
+ * The content of the component.
245
+ */
246
+ children: n.node,
247
+ /**
248
+ * Override or extend the styles applied to the component.
249
+ */
250
+ classes: n.object,
251
+ /**
252
+ * @ignore
253
+ */
254
+ className: n.string,
255
+ /**
256
+ * The component used for the root node.
257
+ * Either a string to use a HTML element or a component.
258
+ */
259
+ component: n.elementType,
260
+ /**
261
+ * Shadow depth, corresponds to `dp` in the spec.
262
+ * It accepts values between 0 and 24 inclusive.
263
+ * @default 1
264
+ */
265
+ elevation: ne(Qe, (e) => {
266
+ const {
267
+ elevation: t,
268
+ variant: r
269
+ } = e;
270
+ return t > 0 && r === "outlined" ? new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${r}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`) : null;
271
+ }),
272
+ /**
273
+ * If `true`, rounded corners are disabled.
274
+ * @default false
275
+ */
276
+ square: n.bool,
277
+ /**
278
+ * The system prop that allows defining system overrides as well as additional CSS styles.
279
+ */
280
+ sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
281
+ /**
282
+ * The variant to use.
283
+ * @default 'elevation'
284
+ */
285
+ variant: n.oneOfType([n.oneOf(["elevation", "outlined"]), n.string])
286
+ });
287
+ function Kt(e) {
288
+ return G("MuiTypography", e);
289
+ }
290
+ X("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]);
291
+ const Yt = ["align", "className", "component", "gutterBottom", "noWrap", "paragraph", "variant", "variantMapping"], Gt = (e) => {
292
+ const {
293
+ align: t,
294
+ gutterBottom: r,
295
+ noWrap: o,
296
+ paragraph: i,
297
+ variant: s,
298
+ classes: a
299
+ } = e, l = {
300
+ root: ["root", s, e.align !== "inherit" && `align${V(t)}`, r && "gutterBottom", o && "noWrap", i && "paragraph"]
301
+ };
302
+ return Z(l, Kt, a);
303
+ }, Xt = L("span", {
304
+ name: "MuiTypography",
305
+ slot: "Root",
306
+ overridesResolver: (e, t) => {
307
+ const {
308
+ ownerState: r
309
+ } = e;
310
+ return [t.root, r.variant && t[r.variant], r.align !== "inherit" && t[`align${V(r.align)}`], r.noWrap && t.noWrap, r.gutterBottom && t.gutterBottom, r.paragraph && t.paragraph];
311
+ }
312
+ })(({
313
+ theme: e,
314
+ ownerState: t
315
+ }) => p({
316
+ margin: 0
317
+ }, t.variant === "inherit" && {
318
+ // Some elements, like <button> on Chrome have default font that doesn't inherit, reset this.
319
+ font: "inherit"
320
+ }, t.variant !== "inherit" && e.typography[t.variant], t.align !== "inherit" && {
321
+ textAlign: t.align
322
+ }, t.noWrap && {
323
+ overflow: "hidden",
324
+ textOverflow: "ellipsis",
325
+ whiteSpace: "nowrap"
326
+ }, t.gutterBottom && {
327
+ marginBottom: "0.35em"
328
+ }, t.paragraph && {
329
+ marginBottom: 16
330
+ })), Be = {
331
+ h1: "h1",
332
+ h2: "h2",
333
+ h3: "h3",
334
+ h4: "h4",
335
+ h5: "h5",
336
+ h6: "h6",
337
+ subtitle1: "h6",
338
+ subtitle2: "h6",
339
+ body1: "p",
340
+ body2: "p",
341
+ inherit: "p"
342
+ }, Jt = {
343
+ primary: "primary.main",
344
+ textPrimary: "text.primary",
345
+ secondary: "secondary.main",
346
+ textSecondary: "text.secondary",
347
+ error: "error.main"
348
+ }, Zt = (e) => Jt[e] || e, tt = /* @__PURE__ */ d.forwardRef(function(t, r) {
349
+ const o = J({
350
+ props: t,
351
+ name: "MuiTypography"
352
+ }), i = Zt(o.color), s = Tt(p({}, o, {
353
+ color: i
354
+ })), {
355
+ align: a = "inherit",
356
+ className: l,
357
+ component: c,
358
+ gutterBottom: u = !1,
359
+ noWrap: f = !1,
360
+ paragraph: g = !1,
361
+ variant: v = "body1",
362
+ variantMapping: y = Be
363
+ } = s, b = H(s, Yt), R = p({}, s, {
364
+ align: a,
365
+ color: i,
366
+ className: l,
367
+ component: c,
368
+ gutterBottom: u,
369
+ noWrap: f,
370
+ paragraph: g,
371
+ variant: v,
372
+ variantMapping: y
373
+ }), N = c || (g ? "p" : y[v] || Be[v]) || "span", w = Gt(R);
374
+ return /* @__PURE__ */ E(Xt, p({
375
+ as: N,
376
+ ref: r,
377
+ ownerState: R,
378
+ className: q(w.root, l)
379
+ }, b));
380
+ });
381
+ process.env.NODE_ENV !== "production" && (tt.propTypes = {
382
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
383
+ // │ These PropTypes are generated from the TypeScript type definitions. │
384
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
385
+ // └─────────────────────────────────────────────────────────────────────┘
386
+ /**
387
+ * Set the text-align on the component.
388
+ * @default 'inherit'
389
+ */
390
+ align: n.oneOf(["center", "inherit", "justify", "left", "right"]),
391
+ /**
392
+ * The content of the component.
393
+ */
394
+ children: n.node,
395
+ /**
396
+ * Override or extend the styles applied to the component.
397
+ */
398
+ classes: n.object,
399
+ /**
400
+ * @ignore
401
+ */
402
+ className: n.string,
403
+ /**
404
+ * The component used for the root node.
405
+ * Either a string to use a HTML element or a component.
406
+ */
407
+ component: n.elementType,
408
+ /**
409
+ * If `true`, the text will have a bottom margin.
410
+ * @default false
411
+ */
412
+ gutterBottom: n.bool,
413
+ /**
414
+ * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
415
+ *
416
+ * Note that text overflow can only happen with block or inline-block level elements
417
+ * (the element needs to have a width in order to overflow).
418
+ * @default false
419
+ */
420
+ noWrap: n.bool,
421
+ /**
422
+ * If `true`, the element will be a paragraph element.
423
+ * @default false
424
+ */
425
+ paragraph: n.bool,
426
+ /**
427
+ * The system prop that allows defining system overrides as well as additional CSS styles.
428
+ */
429
+ sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
430
+ /**
431
+ * Applies the theme typography styles.
432
+ * @default 'body1'
433
+ */
434
+ variant: n.oneOfType([n.oneOf(["body1", "body2", "button", "caption", "h1", "h2", "h3", "h4", "h5", "h6", "inherit", "overline", "subtitle1", "subtitle2"]), n.string]),
435
+ /**
436
+ * The component maps the variant prop to a range of different HTML element types.
437
+ * For instance, subtitle1 to `<h6>`.
438
+ * If you wish to change that mapping, you can provide your own.
439
+ * Alternatively, you can use the `component` prop.
440
+ * @default {
441
+ * h1: 'h1',
442
+ * h2: 'h2',
443
+ * h3: 'h3',
444
+ * h4: 'h4',
445
+ * h5: 'h5',
446
+ * h6: 'h6',
447
+ * subtitle1: 'h6',
448
+ * subtitle2: 'h6',
449
+ * body1: 'p',
450
+ * body2: 'p',
451
+ * inherit: 'p',
452
+ * }
453
+ */
454
+ variantMapping: n.object
455
+ });
456
+ function Qt(e) {
457
+ return typeof e == "function" ? e() : e;
458
+ }
459
+ const ce = /* @__PURE__ */ d.forwardRef(function(t, r) {
460
+ const {
461
+ children: o,
462
+ container: i,
463
+ disablePortal: s = !1
464
+ } = t, [a, l] = d.useState(null), c = Y(/* @__PURE__ */ d.isValidElement(o) ? o.ref : null, r);
465
+ if (ye(() => {
466
+ s || l(Qt(i) || document.body);
467
+ }, [i, s]), ye(() => {
468
+ if (a && !s)
469
+ return ve(r, a), () => {
470
+ ve(r, null);
471
+ };
472
+ }, [r, a, s]), s) {
473
+ if (/* @__PURE__ */ d.isValidElement(o)) {
474
+ const u = {
475
+ ref: c
476
+ };
477
+ return /* @__PURE__ */ d.cloneElement(o, u);
478
+ }
479
+ return /* @__PURE__ */ E(d.Fragment, {
480
+ children: o
481
+ });
482
+ }
483
+ return /* @__PURE__ */ E(d.Fragment, {
484
+ children: a && /* @__PURE__ */ Ot.createPortal(o, a)
485
+ });
486
+ });
487
+ process.env.NODE_ENV !== "production" && (ce.propTypes = {
488
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
489
+ // │ These PropTypes are generated from the TypeScript type definitions. │
490
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
491
+ // └─────────────────────────────────────────────────────────────────────┘
492
+ /**
493
+ * The children to render into the `container`.
494
+ */
495
+ children: n.node,
496
+ /**
497
+ * An HTML element or function that returns one.
498
+ * The `container` will have the portal children appended to it.
499
+ *
500
+ * You can also provide a callback, which is called in a React layout effect.
501
+ * This lets you set the container from a ref, and also makes server-side rendering possible.
502
+ *
503
+ * By default, it uses the body of the top-level document object,
504
+ * so it's simply `document.body` most of the time.
505
+ */
506
+ container: n.oneOfType([Pe, n.func]),
507
+ /**
508
+ * The `children` will be under the DOM hierarchy of the parent component.
509
+ * @default false
510
+ */
511
+ disablePortal: n.bool
512
+ });
513
+ process.env.NODE_ENV !== "production" && (ce.propTypes = Ge(ce.propTypes));
514
+ const en = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"], tn = {
515
+ entering: {
516
+ opacity: 1
517
+ },
518
+ entered: {
519
+ opacity: 1
520
+ }
521
+ }, nt = /* @__PURE__ */ d.forwardRef(function(t, r) {
522
+ const o = pe(), i = {
523
+ enter: o.transitions.duration.enteringScreen,
524
+ exit: o.transitions.duration.leavingScreen
525
+ }, {
526
+ addEndListener: s,
527
+ appear: a = !0,
528
+ children: l,
529
+ easing: c,
530
+ in: u,
531
+ onEnter: f,
532
+ onEntered: g,
533
+ onEntering: v,
534
+ onExit: y,
535
+ onExited: b,
536
+ onExiting: R,
537
+ style: N,
538
+ timeout: w = i,
539
+ // eslint-disable-next-line react/prop-types
540
+ TransitionComponent: D = He
541
+ } = t, h = H(t, en), T = d.useRef(null), O = Y(T, l.ref, r), M = (P) => (A) => {
542
+ if (P) {
543
+ const k = T.current;
544
+ A === void 0 ? P(k) : P(k, A);
545
+ }
546
+ }, x = M(v), I = M((P, A) => {
547
+ ze(P);
548
+ const k = le({
549
+ style: N,
550
+ timeout: w,
551
+ easing: c
552
+ }, {
553
+ mode: "enter"
554
+ });
555
+ P.style.webkitTransition = o.transitions.create("opacity", k), P.style.transition = o.transitions.create("opacity", k), f && f(P, A);
556
+ }), _ = M(g), $ = M(R), S = M((P) => {
557
+ const A = le({
558
+ style: N,
559
+ timeout: w,
560
+ easing: c
561
+ }, {
562
+ mode: "exit"
563
+ });
564
+ P.style.webkitTransition = o.transitions.create("opacity", A), P.style.transition = o.transitions.create("opacity", A), y && y(P);
565
+ }), F = M(b);
566
+ return /* @__PURE__ */ E(D, p({
567
+ appear: a,
568
+ in: u,
569
+ nodeRef: T,
570
+ onEnter: I,
571
+ onEntered: _,
572
+ onEntering: x,
573
+ onExit: S,
574
+ onExited: F,
575
+ onExiting: $,
576
+ addEndListener: (P) => {
577
+ s && s(T.current, P);
578
+ },
579
+ timeout: w
580
+ }, h, {
581
+ children: (P, A) => /* @__PURE__ */ d.cloneElement(l, p({
582
+ style: p({
583
+ opacity: 0,
584
+ visibility: P === "exited" && !u ? "hidden" : void 0
585
+ }, tn[P], N, l.props.style),
586
+ ref: O
587
+ }, A))
588
+ }));
589
+ });
590
+ process.env.NODE_ENV !== "production" && (nt.propTypes = {
591
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
592
+ // │ These PropTypes are generated from the TypeScript type definitions. │
593
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
594
+ // └─────────────────────────────────────────────────────────────────────┘
595
+ /**
596
+ * Add a custom transition end trigger. Called with the transitioning DOM
597
+ * node and a done callback. Allows for more fine grained transition end
598
+ * logic. Note: Timeouts are still used as a fallback if provided.
599
+ */
600
+ addEndListener: n.func,
601
+ /**
602
+ * Perform the enter transition when it first mounts if `in` is also `true`.
603
+ * Set this to `false` to disable this behavior.
604
+ * @default true
605
+ */
606
+ appear: n.bool,
607
+ /**
608
+ * A single child content element.
609
+ */
610
+ children: oe.isRequired,
611
+ /**
612
+ * The transition timing function.
613
+ * You may specify a single easing or a object containing enter and exit values.
614
+ */
615
+ easing: n.oneOfType([n.shape({
616
+ enter: n.string,
617
+ exit: n.string
618
+ }), n.string]),
619
+ /**
620
+ * If `true`, the component will transition in.
621
+ */
622
+ in: n.bool,
623
+ /**
624
+ * @ignore
625
+ */
626
+ onEnter: n.func,
627
+ /**
628
+ * @ignore
629
+ */
630
+ onEntered: n.func,
631
+ /**
632
+ * @ignore
633
+ */
634
+ onEntering: n.func,
635
+ /**
636
+ * @ignore
637
+ */
638
+ onExit: n.func,
639
+ /**
640
+ * @ignore
641
+ */
642
+ onExited: n.func,
643
+ /**
644
+ * @ignore
645
+ */
646
+ onExiting: n.func,
647
+ /**
648
+ * @ignore
649
+ */
650
+ style: n.object,
651
+ /**
652
+ * The duration for the transition, in milliseconds.
653
+ * You may specify a single timeout for all transitions, or individually with an object.
654
+ * @default {
655
+ * enter: theme.transitions.duration.enteringScreen,
656
+ * exit: theme.transitions.duration.leavingScreen,
657
+ * }
658
+ */
659
+ timeout: n.oneOfType([n.number, n.shape({
660
+ appear: n.number,
661
+ enter: n.number,
662
+ exit: n.number
663
+ })])
664
+ });
665
+ function nn(e) {
666
+ return G("MuiBackdrop", e);
667
+ }
668
+ X("MuiBackdrop", ["root", "invisible"]);
669
+ const on = ["children", "className", "component", "components", "componentsProps", "invisible", "open", "slotProps", "slots", "TransitionComponent", "transitionDuration"], rn = (e) => {
670
+ const {
671
+ classes: t,
672
+ invisible: r
673
+ } = e;
674
+ return Z({
675
+ root: ["root", r && "invisible"]
676
+ }, nn, t);
677
+ }, sn = L("div", {
678
+ name: "MuiBackdrop",
679
+ slot: "Root",
680
+ overridesResolver: (e, t) => {
681
+ const {
682
+ ownerState: r
683
+ } = e;
684
+ return [t.root, r.invisible && t.invisible];
685
+ }
686
+ })(({
687
+ ownerState: e
688
+ }) => p({
689
+ position: "fixed",
690
+ display: "flex",
691
+ alignItems: "center",
692
+ justifyContent: "center",
693
+ right: 0,
694
+ bottom: 0,
695
+ top: 0,
696
+ left: 0,
697
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
698
+ WebkitTapHighlightColor: "transparent"
699
+ }, e.invisible && {
700
+ backgroundColor: "transparent"
701
+ })), Re = /* @__PURE__ */ d.forwardRef(function(t, r) {
702
+ var o, i, s;
703
+ const a = J({
704
+ props: t,
705
+ name: "MuiBackdrop"
706
+ }), {
707
+ children: l,
708
+ className: c,
709
+ component: u = "div",
710
+ components: f = {},
711
+ componentsProps: g = {},
712
+ invisible: v = !1,
713
+ open: y,
714
+ slotProps: b = {},
715
+ slots: R = {},
716
+ TransitionComponent: N = nt,
717
+ transitionDuration: w
718
+ } = a, D = H(a, on), h = p({}, a, {
719
+ component: u,
720
+ invisible: v
721
+ }), T = rn(h), O = (o = b.root) != null ? o : g.root;
722
+ return /* @__PURE__ */ E(N, p({
723
+ in: y,
724
+ timeout: w
725
+ }, D, {
726
+ children: /* @__PURE__ */ E(sn, p({
727
+ "aria-hidden": !0
728
+ }, O, {
729
+ as: (i = (s = R.root) != null ? s : f.Root) != null ? i : u,
730
+ className: q(T.root, c, O == null ? void 0 : O.className),
731
+ ownerState: p({}, h, O == null ? void 0 : O.ownerState),
732
+ classes: T,
733
+ ref: r,
734
+ children: l
735
+ }))
736
+ }));
737
+ });
738
+ process.env.NODE_ENV !== "production" && (Re.propTypes = {
739
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
740
+ // │ These PropTypes are generated from the TypeScript type definitions. │
741
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
742
+ // └─────────────────────────────────────────────────────────────────────┘
743
+ /**
744
+ * The content of the component.
745
+ */
746
+ children: n.node,
747
+ /**
748
+ * Override or extend the styles applied to the component.
749
+ */
750
+ classes: n.object,
751
+ /**
752
+ * @ignore
753
+ */
754
+ className: n.string,
755
+ /**
756
+ * The component used for the root node.
757
+ * Either a string to use a HTML element or a component.
758
+ */
759
+ component: n.elementType,
760
+ /**
761
+ * The components used for each slot inside.
762
+ *
763
+ * This prop is an alias for the `slots` prop.
764
+ * It's recommended to use the `slots` prop instead.
765
+ *
766
+ * @default {}
767
+ */
768
+ components: n.shape({
769
+ Root: n.elementType
770
+ }),
771
+ /**
772
+ * The extra props for the slot components.
773
+ * You can override the existing props or add new ones.
774
+ *
775
+ * This prop is an alias for the `slotProps` prop.
776
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
777
+ *
778
+ * @default {}
779
+ */
780
+ componentsProps: n.shape({
781
+ root: n.object
782
+ }),
783
+ /**
784
+ * If `true`, the backdrop is invisible.
785
+ * It can be used when rendering a popover or a custom select component.
786
+ * @default false
787
+ */
788
+ invisible: n.bool,
789
+ /**
790
+ * If `true`, the component is shown.
791
+ */
792
+ open: n.bool.isRequired,
793
+ /**
794
+ * The extra props for the slot components.
795
+ * You can override the existing props or add new ones.
796
+ *
797
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
798
+ *
799
+ * @default {}
800
+ */
801
+ slotProps: n.shape({
802
+ root: n.object
803
+ }),
804
+ /**
805
+ * The components used for each slot inside.
806
+ *
807
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
808
+ *
809
+ * @default {}
810
+ */
811
+ slots: n.shape({
812
+ root: n.elementType
813
+ }),
814
+ /**
815
+ * The system prop that allows defining system overrides as well as additional CSS styles.
816
+ */
817
+ sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
818
+ /**
819
+ * The component used for the transition.
820
+ * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
821
+ * @default Fade
822
+ */
823
+ TransitionComponent: n.elementType,
824
+ /**
825
+ * The duration for the transition, in milliseconds.
826
+ * You may specify a single timeout for all transitions, or individually with an object.
827
+ */
828
+ transitionDuration: n.oneOfType([n.number, n.shape({
829
+ appear: n.number,
830
+ enter: n.number,
831
+ exit: n.number
832
+ })])
833
+ });
834
+ function an(e) {
835
+ return G("MuiCircularProgress", e);
836
+ }
837
+ X("MuiCircularProgress", ["root", "determinate", "indeterminate", "colorPrimary", "colorSecondary", "svg", "circle", "circleDeterminate", "circleIndeterminate", "circleDisableShrink"]);
838
+ const ln = ["className", "color", "disableShrink", "size", "style", "thickness", "value", "variant"];
839
+ let fe = (e) => e, Fe, je, Ae, Ve;
840
+ const z = 44, cn = We(Fe || (Fe = fe`
841
+ 0% {
842
+ transform: rotate(0deg);
843
+ }
844
+
845
+ 100% {
846
+ transform: rotate(360deg);
847
+ }
848
+ `)), un = We(je || (je = fe`
849
+ 0% {
850
+ stroke-dasharray: 1px, 200px;
851
+ stroke-dashoffset: 0;
852
+ }
853
+
854
+ 50% {
855
+ stroke-dasharray: 100px, 200px;
856
+ stroke-dashoffset: -15px;
857
+ }
858
+
859
+ 100% {
860
+ stroke-dasharray: 100px, 200px;
861
+ stroke-dashoffset: -125px;
862
+ }
863
+ `)), dn = (e) => {
864
+ const {
865
+ classes: t,
866
+ variant: r,
867
+ color: o,
868
+ disableShrink: i
869
+ } = e, s = {
870
+ root: ["root", r, `color${V(o)}`],
871
+ svg: ["svg"],
872
+ circle: ["circle", `circle${V(r)}`, i && "circleDisableShrink"]
873
+ };
874
+ return Z(s, an, t);
875
+ }, pn = L("span", {
876
+ name: "MuiCircularProgress",
877
+ slot: "Root",
878
+ overridesResolver: (e, t) => {
879
+ const {
880
+ ownerState: r
881
+ } = e;
882
+ return [t.root, t[r.variant], t[`color${V(r.color)}`]];
883
+ }
884
+ })(({
885
+ ownerState: e,
886
+ theme: t
887
+ }) => p({
888
+ display: "inline-block"
889
+ }, e.variant === "determinate" && {
890
+ transition: t.transitions.create("transform")
891
+ }, e.color !== "inherit" && {
892
+ color: (t.vars || t).palette[e.color].main
893
+ }), ({
894
+ ownerState: e
895
+ }) => e.variant === "indeterminate" && Ke(Ae || (Ae = fe`
896
+ animation: ${0} 1.4s linear infinite;
897
+ `), cn)), fn = L("svg", {
898
+ name: "MuiCircularProgress",
899
+ slot: "Svg",
900
+ overridesResolver: (e, t) => t.svg
901
+ })({
902
+ display: "block"
903
+ // Keeps the progress centered
904
+ }), hn = L("circle", {
905
+ name: "MuiCircularProgress",
906
+ slot: "Circle",
907
+ overridesResolver: (e, t) => {
908
+ const {
909
+ ownerState: r
910
+ } = e;
911
+ return [t.circle, t[`circle${V(r.variant)}`], r.disableShrink && t.circleDisableShrink];
912
+ }
913
+ })(({
914
+ ownerState: e,
915
+ theme: t
916
+ }) => p({
917
+ stroke: "currentColor"
918
+ }, e.variant === "determinate" && {
919
+ transition: t.transitions.create("stroke-dashoffset")
920
+ }, e.variant === "indeterminate" && {
921
+ // Some default value that looks fine waiting for the animation to kicks in.
922
+ strokeDasharray: "80px, 200px",
923
+ strokeDashoffset: 0
924
+ // Add the unit to fix a Edge 16 and below bug.
925
+ }), ({
926
+ ownerState: e
927
+ }) => e.variant === "indeterminate" && !e.disableShrink && Ke(Ve || (Ve = fe`
928
+ animation: ${0} 1.4s ease-in-out infinite;
929
+ `), un)), ot = /* @__PURE__ */ d.forwardRef(function(t, r) {
930
+ const o = J({
931
+ props: t,
932
+ name: "MuiCircularProgress"
933
+ }), {
934
+ className: i,
935
+ color: s = "primary",
936
+ disableShrink: a = !1,
937
+ size: l = 40,
938
+ style: c,
939
+ thickness: u = 3.6,
940
+ value: f = 0,
941
+ variant: g = "indeterminate"
942
+ } = o, v = H(o, ln), y = p({}, o, {
943
+ color: s,
944
+ disableShrink: a,
945
+ size: l,
946
+ thickness: u,
947
+ value: f,
948
+ variant: g
949
+ }), b = dn(y), R = {}, N = {}, w = {};
950
+ if (g === "determinate") {
951
+ const D = 2 * Math.PI * ((z - u) / 2);
952
+ R.strokeDasharray = D.toFixed(3), w["aria-valuenow"] = Math.round(f), R.strokeDashoffset = `${((100 - f) / 100 * D).toFixed(3)}px`, N.transform = "rotate(-90deg)";
953
+ }
954
+ return /* @__PURE__ */ E(pn, p({
955
+ className: q(b.root, i),
956
+ style: p({
957
+ width: l,
958
+ height: l
959
+ }, N, c),
960
+ ownerState: y,
961
+ ref: r,
962
+ role: "progressbar"
963
+ }, w, v, {
964
+ children: /* @__PURE__ */ E(fn, {
965
+ className: b.svg,
966
+ ownerState: y,
967
+ viewBox: `${z / 2} ${z / 2} ${z} ${z}`,
968
+ children: /* @__PURE__ */ E(hn, {
969
+ className: b.circle,
970
+ style: R,
971
+ ownerState: y,
972
+ cx: z,
973
+ cy: z,
974
+ r: (z - u) / 2,
975
+ fill: "none",
976
+ strokeWidth: u
977
+ })
978
+ })
979
+ }));
980
+ });
981
+ process.env.NODE_ENV !== "production" && (ot.propTypes = {
982
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
983
+ // │ These PropTypes are generated from the TypeScript type definitions. │
984
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
985
+ // └─────────────────────────────────────────────────────────────────────┘
986
+ /**
987
+ * Override or extend the styles applied to the component.
988
+ */
989
+ classes: n.object,
990
+ /**
991
+ * @ignore
992
+ */
993
+ className: n.string,
994
+ /**
995
+ * The color of the component.
996
+ * It supports both default and custom theme colors, which can be added as shown in the
997
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
998
+ * @default 'primary'
999
+ */
1000
+ color: n.oneOfType([n.oneOf(["inherit", "primary", "secondary", "error", "info", "success", "warning"]), n.string]),
1001
+ /**
1002
+ * If `true`, the shrink animation is disabled.
1003
+ * This only works if variant is `indeterminate`.
1004
+ * @default false
1005
+ */
1006
+ disableShrink: ne(n.bool, (e) => e.disableShrink && e.variant && e.variant !== "indeterminate" ? new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect.") : null),
1007
+ /**
1008
+ * The size of the component.
1009
+ * If using a number, the pixel unit is assumed.
1010
+ * If using a string, you need to provide the CSS unit, for example '3rem'.
1011
+ * @default 40
1012
+ */
1013
+ size: n.oneOfType([n.number, n.string]),
1014
+ /**
1015
+ * @ignore
1016
+ */
1017
+ style: n.object,
1018
+ /**
1019
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1020
+ */
1021
+ sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
1022
+ /**
1023
+ * The thickness of the circle.
1024
+ * @default 3.6
1025
+ */
1026
+ thickness: n.number,
1027
+ /**
1028
+ * The value of the progress indicator for the determinate variant.
1029
+ * Value between 0 and 100.
1030
+ * @default 0
1031
+ */
1032
+ value: n.number,
1033
+ /**
1034
+ * The variant to use.
1035
+ * Use indeterminate when there is no progress value.
1036
+ * @default 'indeterminate'
1037
+ */
1038
+ variant: n.oneOf(["determinate", "indeterminate"])
1039
+ });
1040
+ function mn(e) {
1041
+ const t = U(e);
1042
+ return t.body === e ? Q(e).innerWidth > t.documentElement.clientWidth : e.scrollHeight > e.clientHeight;
1043
+ }
1044
+ function te(e, t) {
1045
+ t ? e.setAttribute("aria-hidden", "true") : e.removeAttribute("aria-hidden");
1046
+ }
1047
+ function Le(e) {
1048
+ return parseInt(Q(e).getComputedStyle(e).paddingRight, 10) || 0;
1049
+ }
1050
+ function bn(e) {
1051
+ const r = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].indexOf(e.tagName) !== -1, o = e.tagName === "INPUT" && e.getAttribute("type") === "hidden";
1052
+ return r || o;
1053
+ }
1054
+ function qe(e, t, r, o, i) {
1055
+ const s = [t, r, ...o];
1056
+ [].forEach.call(e.children, (a) => {
1057
+ const l = s.indexOf(a) === -1, c = !bn(a);
1058
+ l && c && te(a, i);
1059
+ });
1060
+ }
1061
+ function ge(e, t) {
1062
+ let r = -1;
1063
+ return e.some((o, i) => t(o) ? (r = i, !0) : !1), r;
1064
+ }
1065
+ function gn(e, t) {
1066
+ const r = [], o = e.container;
1067
+ if (!t.disableScrollLock) {
1068
+ if (mn(o)) {
1069
+ const a = _t(U(o));
1070
+ r.push({
1071
+ value: o.style.paddingRight,
1072
+ property: "padding-right",
1073
+ el: o
1074
+ }), o.style.paddingRight = `${Le(o) + a}px`;
1075
+ const l = U(o).querySelectorAll(".mui-fixed");
1076
+ [].forEach.call(l, (c) => {
1077
+ r.push({
1078
+ value: c.style.paddingRight,
1079
+ property: "padding-right",
1080
+ el: c
1081
+ }), c.style.paddingRight = `${Le(c) + a}px`;
1082
+ });
1083
+ }
1084
+ let s;
1085
+ if (o.parentNode instanceof DocumentFragment)
1086
+ s = U(o).body;
1087
+ else {
1088
+ const a = o.parentElement, l = Q(o);
1089
+ s = (a == null ? void 0 : a.nodeName) === "HTML" && l.getComputedStyle(a).overflowY === "scroll" ? a : o;
1090
+ }
1091
+ r.push({
1092
+ value: s.style.overflow,
1093
+ property: "overflow",
1094
+ el: s
1095
+ }, {
1096
+ value: s.style.overflowX,
1097
+ property: "overflow-x",
1098
+ el: s
1099
+ }, {
1100
+ value: s.style.overflowY,
1101
+ property: "overflow-y",
1102
+ el: s
1103
+ }), s.style.overflow = "hidden";
1104
+ }
1105
+ return () => {
1106
+ r.forEach(({
1107
+ value: s,
1108
+ el: a,
1109
+ property: l
1110
+ }) => {
1111
+ s ? a.style.setProperty(l, s) : a.style.removeProperty(l);
1112
+ });
1113
+ };
1114
+ }
1115
+ function vn(e) {
1116
+ const t = [];
1117
+ return [].forEach.call(e.children, (r) => {
1118
+ r.getAttribute("aria-hidden") === "true" && t.push(r);
1119
+ }), t;
1120
+ }
1121
+ class yn {
1122
+ constructor() {
1123
+ this.containers = void 0, this.modals = void 0, this.modals = [], this.containers = [];
1124
+ }
1125
+ add(t, r) {
1126
+ let o = this.modals.indexOf(t);
1127
+ if (o !== -1)
1128
+ return o;
1129
+ o = this.modals.length, this.modals.push(t), t.modalRef && te(t.modalRef, !1);
1130
+ const i = vn(r);
1131
+ qe(r, t.mount, t.modalRef, i, !0);
1132
+ const s = ge(this.containers, (a) => a.container === r);
1133
+ return s !== -1 ? (this.containers[s].modals.push(t), o) : (this.containers.push({
1134
+ modals: [t],
1135
+ container: r,
1136
+ restore: null,
1137
+ hiddenSiblings: i
1138
+ }), o);
1139
+ }
1140
+ mount(t, r) {
1141
+ const o = ge(this.containers, (s) => s.modals.indexOf(t) !== -1), i = this.containers[o];
1142
+ i.restore || (i.restore = gn(i, r));
1143
+ }
1144
+ remove(t, r = !0) {
1145
+ const o = this.modals.indexOf(t);
1146
+ if (o === -1)
1147
+ return o;
1148
+ const i = ge(this.containers, (a) => a.modals.indexOf(t) !== -1), s = this.containers[i];
1149
+ if (s.modals.splice(s.modals.indexOf(t), 1), this.modals.splice(o, 1), s.modals.length === 0)
1150
+ s.restore && s.restore(), t.modalRef && te(t.modalRef, r), qe(s.container, t.mount, t.modalRef, s.hiddenSiblings, !1), this.containers.splice(i, 1);
1151
+ else {
1152
+ const a = s.modals[s.modals.length - 1];
1153
+ a.modalRef && te(a.modalRef, !1);
1154
+ }
1155
+ return o;
1156
+ }
1157
+ isTopModal(t) {
1158
+ return this.modals.length > 0 && this.modals[this.modals.length - 1] === t;
1159
+ }
1160
+ }
1161
+ const En = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
1162
+ function xn(e) {
1163
+ const t = parseInt(e.getAttribute("tabindex") || "", 10);
1164
+ return Number.isNaN(t) ? e.contentEditable === "true" || (e.nodeName === "AUDIO" || e.nodeName === "VIDEO" || e.nodeName === "DETAILS") && e.getAttribute("tabindex") === null ? 0 : e.tabIndex : t;
1165
+ }
1166
+ function Tn(e) {
1167
+ if (e.tagName !== "INPUT" || e.type !== "radio" || !e.name)
1168
+ return !1;
1169
+ const t = (o) => e.ownerDocument.querySelector(`input[type="radio"]${o}`);
1170
+ let r = t(`[name="${e.name}"]:checked`);
1171
+ return r || (r = t(`[name="${e.name}"]`)), r !== e;
1172
+ }
1173
+ function kn(e) {
1174
+ return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" || Tn(e));
1175
+ }
1176
+ function Pn(e) {
1177
+ const t = [], r = [];
1178
+ return Array.from(e.querySelectorAll(En)).forEach((o, i) => {
1179
+ const s = xn(o);
1180
+ s === -1 || !kn(o) || (s === 0 ? t.push(o) : r.push({
1181
+ documentOrder: i,
1182
+ tabIndex: s,
1183
+ node: o
1184
+ }));
1185
+ }), r.sort((o, i) => o.tabIndex === i.tabIndex ? o.documentOrder - i.documentOrder : o.tabIndex - i.tabIndex).map((o) => o.node).concat(t);
1186
+ }
1187
+ function Rn() {
1188
+ return !0;
1189
+ }
1190
+ function ue(e) {
1191
+ const {
1192
+ children: t,
1193
+ disableAutoFocus: r = !1,
1194
+ disableEnforceFocus: o = !1,
1195
+ disableRestoreFocus: i = !1,
1196
+ getTabbable: s = Pn,
1197
+ isEnabled: a = Rn,
1198
+ open: l
1199
+ } = e, c = d.useRef(!1), u = d.useRef(null), f = d.useRef(null), g = d.useRef(null), v = d.useRef(null), y = d.useRef(!1), b = d.useRef(null), R = Y(t.ref, b), N = d.useRef(null);
1200
+ d.useEffect(() => {
1201
+ !l || !b.current || (y.current = !r);
1202
+ }, [r, l]), d.useEffect(() => {
1203
+ if (!l || !b.current)
1204
+ return;
1205
+ const h = U(b.current);
1206
+ return b.current.contains(h.activeElement) || (b.current.hasAttribute("tabIndex") || (process.env.NODE_ENV !== "production" && console.error(["MUI: The modal content node does not accept focus.", 'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
1207
+ `)), b.current.setAttribute("tabIndex", "-1")), y.current && b.current.focus()), () => {
1208
+ i || (g.current && g.current.focus && (c.current = !0, g.current.focus()), g.current = null);
1209
+ };
1210
+ }, [l]), d.useEffect(() => {
1211
+ if (!l || !b.current)
1212
+ return;
1213
+ const h = U(b.current), T = (x) => {
1214
+ N.current = x, !(o || !a() || x.key !== "Tab") && h.activeElement === b.current && x.shiftKey && (c.current = !0, f.current && f.current.focus());
1215
+ }, O = () => {
1216
+ const x = b.current;
1217
+ if (x === null)
1218
+ return;
1219
+ if (!h.hasFocus() || !a() || c.current) {
1220
+ c.current = !1;
1221
+ return;
1222
+ }
1223
+ if (x.contains(h.activeElement) || o && h.activeElement !== u.current && h.activeElement !== f.current)
1224
+ return;
1225
+ if (h.activeElement !== v.current)
1226
+ v.current = null;
1227
+ else if (v.current !== null)
1228
+ return;
1229
+ if (!y.current)
1230
+ return;
1231
+ let I = [];
1232
+ if ((h.activeElement === u.current || h.activeElement === f.current) && (I = s(b.current)), I.length > 0) {
1233
+ var _, $;
1234
+ const S = !!((_ = N.current) != null && _.shiftKey && (($ = N.current) == null ? void 0 : $.key) === "Tab"), F = I[0], j = I[I.length - 1];
1235
+ typeof F != "string" && typeof j != "string" && (S ? j.focus() : F.focus());
1236
+ } else
1237
+ x.focus();
1238
+ };
1239
+ h.addEventListener("focusin", O), h.addEventListener("keydown", T, !0);
1240
+ const M = setInterval(() => {
1241
+ h.activeElement && h.activeElement.tagName === "BODY" && O();
1242
+ }, 50);
1243
+ return () => {
1244
+ clearInterval(M), h.removeEventListener("focusin", O), h.removeEventListener("keydown", T, !0);
1245
+ };
1246
+ }, [r, o, i, a, l, s]);
1247
+ const w = (h) => {
1248
+ g.current === null && (g.current = h.relatedTarget), y.current = !0, v.current = h.target;
1249
+ const T = t.props.onFocus;
1250
+ T && T(h);
1251
+ }, D = (h) => {
1252
+ g.current === null && (g.current = h.relatedTarget), y.current = !0;
1253
+ };
1254
+ return /* @__PURE__ */ de(d.Fragment, {
1255
+ children: [/* @__PURE__ */ E("div", {
1256
+ tabIndex: l ? 0 : -1,
1257
+ onFocus: D,
1258
+ ref: u,
1259
+ "data-testid": "sentinelStart"
1260
+ }), /* @__PURE__ */ d.cloneElement(t, {
1261
+ ref: R,
1262
+ onFocus: w
1263
+ }), /* @__PURE__ */ E("div", {
1264
+ tabIndex: l ? 0 : -1,
1265
+ onFocus: D,
1266
+ ref: f,
1267
+ "data-testid": "sentinelEnd"
1268
+ })]
1269
+ });
1270
+ }
1271
+ process.env.NODE_ENV !== "production" && (ue.propTypes = {
1272
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
1273
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1274
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
1275
+ // └─────────────────────────────────────────────────────────────────────┘
1276
+ /**
1277
+ * A single child content element.
1278
+ */
1279
+ children: oe,
1280
+ /**
1281
+ * If `true`, the focus trap will not automatically shift focus to itself when it opens, and
1282
+ * replace it to the last focused element when it closes.
1283
+ * This also works correctly with any focus trap children that have the `disableAutoFocus` prop.
1284
+ *
1285
+ * Generally this should never be set to `true` as it makes the focus trap less
1286
+ * accessible to assistive technologies, like screen readers.
1287
+ * @default false
1288
+ */
1289
+ disableAutoFocus: n.bool,
1290
+ /**
1291
+ * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.
1292
+ *
1293
+ * Generally this should never be set to `true` as it makes the focus trap less
1294
+ * accessible to assistive technologies, like screen readers.
1295
+ * @default false
1296
+ */
1297
+ disableEnforceFocus: n.bool,
1298
+ /**
1299
+ * If `true`, the focus trap will not restore focus to previously focused element once
1300
+ * focus trap is hidden or unmounted.
1301
+ * @default false
1302
+ */
1303
+ disableRestoreFocus: n.bool,
1304
+ /**
1305
+ * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.
1306
+ * For instance, you can provide the "tabbable" npm dependency.
1307
+ * @param {HTMLElement} root
1308
+ */
1309
+ getTabbable: n.func,
1310
+ /**
1311
+ * This prop extends the `open` prop.
1312
+ * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.
1313
+ * This prop should be memoized.
1314
+ * It can be used to support multiple focus trap mounted at the same time.
1315
+ * @default function defaultIsEnabled(): boolean {
1316
+ * return true;
1317
+ * }
1318
+ */
1319
+ isEnabled: n.func,
1320
+ /**
1321
+ * If `true`, focus is locked.
1322
+ */
1323
+ open: n.bool.isRequired
1324
+ });
1325
+ process.env.NODE_ENV !== "production" && (ue.propTypes = Ge(ue.propTypes));
1326
+ function Nn(e) {
1327
+ return typeof e == "function" ? e() : e;
1328
+ }
1329
+ function Cn(e) {
1330
+ return e ? e.props.hasOwnProperty("in") : !1;
1331
+ }
1332
+ const wn = new yn();
1333
+ function On(e) {
1334
+ const {
1335
+ container: t,
1336
+ disableEscapeKeyDown: r = !1,
1337
+ disableScrollLock: o = !1,
1338
+ // @ts-ignore internal logic - Base UI supports the manager as a prop too
1339
+ manager: i = wn,
1340
+ closeAfterTransition: s = !1,
1341
+ onTransitionEnter: a,
1342
+ onTransitionExited: l,
1343
+ children: c,
1344
+ onClose: u,
1345
+ open: f,
1346
+ rootRef: g
1347
+ } = e, v = d.useRef({}), y = d.useRef(null), b = d.useRef(null), R = Y(b, g), [N, w] = d.useState(!f), D = Cn(c);
1348
+ let h = !0;
1349
+ (e["aria-hidden"] === "false" || e["aria-hidden"] === !1) && (h = !1);
1350
+ const T = () => U(y.current), O = () => (v.current.modalRef = b.current, v.current.mount = y.current, v.current), M = () => {
1351
+ i.mount(O(), {
1352
+ disableScrollLock: o
1353
+ }), b.current && (b.current.scrollTop = 0);
1354
+ }, x = Ee(() => {
1355
+ const k = Nn(t) || T().body;
1356
+ i.add(O(), k), b.current && M();
1357
+ }), I = d.useCallback(() => i.isTopModal(O()), [i]), _ = Ee((k) => {
1358
+ y.current = k, k && (f && I() ? M() : b.current && te(b.current, h));
1359
+ }), $ = d.useCallback(() => {
1360
+ i.remove(O(), h);
1361
+ }, [h, i]);
1362
+ d.useEffect(() => () => {
1363
+ $();
1364
+ }, [$]), d.useEffect(() => {
1365
+ f ? x() : (!D || !s) && $();
1366
+ }, [f, $, D, s, x]);
1367
+ const S = (k) => (C) => {
1368
+ var m;
1369
+ (m = k.onKeyDown) == null || m.call(k, C), !(C.key !== "Escape" || C.which === 229 || // Wait until IME is settled.
1370
+ !I()) && (r || (C.stopPropagation(), u && u(C, "escapeKeyDown")));
1371
+ }, F = (k) => (C) => {
1372
+ var m;
1373
+ (m = k.onClick) == null || m.call(k, C), C.target === C.currentTarget && u && u(C, "backdropClick");
1374
+ };
1375
+ return {
1376
+ getRootProps: (k = {}) => {
1377
+ const C = kt(e);
1378
+ delete C.onTransitionEnter, delete C.onTransitionExited;
1379
+ const m = p({}, C, k);
1380
+ return p({
1381
+ role: "presentation"
1382
+ }, m, {
1383
+ onKeyDown: S(m),
1384
+ ref: R
1385
+ });
1386
+ },
1387
+ getBackdropProps: (k = {}) => {
1388
+ const C = k;
1389
+ return p({
1390
+ "aria-hidden": !0
1391
+ }, C, {
1392
+ onClick: F(C),
1393
+ open: f
1394
+ });
1395
+ },
1396
+ getTransitionProps: () => {
1397
+ const k = () => {
1398
+ w(!1), a && a();
1399
+ }, C = () => {
1400
+ w(!0), l && l(), s && $();
1401
+ };
1402
+ return {
1403
+ onEnter: xe(k, c == null ? void 0 : c.props.onEnter),
1404
+ onExited: xe(C, c == null ? void 0 : c.props.onExited)
1405
+ };
1406
+ },
1407
+ rootRef: R,
1408
+ portalRef: _,
1409
+ isTopModal: I,
1410
+ exited: N,
1411
+ hasTransition: D
1412
+ };
1413
+ }
1414
+ function Mn(e) {
1415
+ return G("MuiModal", e);
1416
+ }
1417
+ X("MuiModal", ["root", "hidden", "backdrop"]);
1418
+ const $n = ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onTransitionEnter", "onTransitionExited", "open", "slotProps", "slots", "theme"], Dn = (e) => {
1419
+ const {
1420
+ open: t,
1421
+ exited: r,
1422
+ classes: o
1423
+ } = e;
1424
+ return Z({
1425
+ root: ["root", !t && r && "hidden"],
1426
+ backdrop: ["backdrop"]
1427
+ }, Mn, o);
1428
+ }, Sn = L("div", {
1429
+ name: "MuiModal",
1430
+ slot: "Root",
1431
+ overridesResolver: (e, t) => {
1432
+ const {
1433
+ ownerState: r
1434
+ } = e;
1435
+ return [t.root, !r.open && r.exited && t.hidden];
1436
+ }
1437
+ })(({
1438
+ theme: e,
1439
+ ownerState: t
1440
+ }) => p({
1441
+ position: "fixed",
1442
+ zIndex: (e.vars || e).zIndex.modal,
1443
+ right: 0,
1444
+ bottom: 0,
1445
+ top: 0,
1446
+ left: 0
1447
+ }, !t.open && t.exited && {
1448
+ visibility: "hidden"
1449
+ })), In = L(Re, {
1450
+ name: "MuiModal",
1451
+ slot: "Backdrop",
1452
+ overridesResolver: (e, t) => t.backdrop
1453
+ })({
1454
+ zIndex: -1
1455
+ }), rt = /* @__PURE__ */ d.forwardRef(function(t, r) {
1456
+ var o, i, s, a, l, c;
1457
+ const u = J({
1458
+ name: "MuiModal",
1459
+ props: t
1460
+ }), {
1461
+ BackdropComponent: f = In,
1462
+ BackdropProps: g,
1463
+ className: v,
1464
+ closeAfterTransition: y = !1,
1465
+ children: b,
1466
+ container: R,
1467
+ component: N,
1468
+ components: w = {},
1469
+ componentsProps: D = {},
1470
+ disableAutoFocus: h = !1,
1471
+ disableEnforceFocus: T = !1,
1472
+ disableEscapeKeyDown: O = !1,
1473
+ disablePortal: M = !1,
1474
+ disableRestoreFocus: x = !1,
1475
+ disableScrollLock: I = !1,
1476
+ hideBackdrop: _ = !1,
1477
+ keepMounted: $ = !1,
1478
+ onBackdropClick: S,
1479
+ open: F,
1480
+ slotProps: j,
1481
+ slots: P
1482
+ // eslint-disable-next-line react/prop-types
1483
+ } = u, A = H(u, $n), k = p({}, u, {
1484
+ closeAfterTransition: y,
1485
+ disableAutoFocus: h,
1486
+ disableEnforceFocus: T,
1487
+ disableEscapeKeyDown: O,
1488
+ disablePortal: M,
1489
+ disableRestoreFocus: x,
1490
+ disableScrollLock: I,
1491
+ hideBackdrop: _,
1492
+ keepMounted: $
1493
+ }), {
1494
+ getRootProps: C,
1495
+ getBackdropProps: m,
1496
+ getTransitionProps: B,
1497
+ portalRef: re,
1498
+ isTopModal: dt,
1499
+ exited: we,
1500
+ hasTransition: Oe
1501
+ } = On(p({}, k, {
1502
+ rootRef: r
1503
+ })), ee = p({}, k, {
1504
+ exited: we
1505
+ }), W = Dn(ee), ie = {};
1506
+ if (b.props.tabIndex === void 0 && (ie.tabIndex = "-1"), Oe) {
1507
+ const {
1508
+ onEnter: K,
1509
+ onExited: se
1510
+ } = B();
1511
+ ie.onEnter = K, ie.onExited = se;
1512
+ }
1513
+ const Me = (o = (i = P == null ? void 0 : P.root) != null ? i : w.Root) != null ? o : Sn, $e = (s = (a = P == null ? void 0 : P.backdrop) != null ? a : w.Backdrop) != null ? s : f, he = (l = j == null ? void 0 : j.root) != null ? l : D.root, me = (c = j == null ? void 0 : j.backdrop) != null ? c : D.backdrop, pt = Se({
1514
+ elementType: Me,
1515
+ externalSlotProps: he,
1516
+ externalForwardedProps: A,
1517
+ getSlotProps: C,
1518
+ additionalProps: {
1519
+ ref: r,
1520
+ as: N
1521
+ },
1522
+ ownerState: ee,
1523
+ className: q(v, he == null ? void 0 : he.className, W == null ? void 0 : W.root, !ee.open && ee.exited && (W == null ? void 0 : W.hidden))
1524
+ }), ft = Se({
1525
+ elementType: $e,
1526
+ externalSlotProps: me,
1527
+ additionalProps: g,
1528
+ getSlotProps: (K) => m(p({}, K, {
1529
+ onClick: (se) => {
1530
+ S && S(se), K != null && K.onClick && K.onClick(se);
1531
+ }
1532
+ })),
1533
+ className: q(me == null ? void 0 : me.className, g == null ? void 0 : g.className, W == null ? void 0 : W.backdrop),
1534
+ ownerState: ee
1535
+ });
1536
+ return !$ && !F && (!Oe || we) ? null : /* @__PURE__ */ E(ce, {
1537
+ ref: re,
1538
+ container: R,
1539
+ disablePortal: M,
1540
+ children: /* @__PURE__ */ de(Me, p({}, pt, {
1541
+ children: [!_ && f ? /* @__PURE__ */ E($e, p({}, ft)) : null, /* @__PURE__ */ E(ue, {
1542
+ disableEnforceFocus: T,
1543
+ disableAutoFocus: h,
1544
+ disableRestoreFocus: x,
1545
+ isEnabled: dt,
1546
+ open: F,
1547
+ children: /* @__PURE__ */ d.cloneElement(b, ie)
1548
+ })]
1549
+ }))
1550
+ });
1551
+ });
1552
+ process.env.NODE_ENV !== "production" && (rt.propTypes = {
1553
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
1554
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1555
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1556
+ // └─────────────────────────────────────────────────────────────────────┘
1557
+ /**
1558
+ * A backdrop component. This prop enables custom backdrop rendering.
1559
+ * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
1560
+ * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.
1561
+ * @default styled(Backdrop, {
1562
+ * name: 'MuiModal',
1563
+ * slot: 'Backdrop',
1564
+ * overridesResolver: (props, styles) => {
1565
+ * return styles.backdrop;
1566
+ * },
1567
+ * })({
1568
+ * zIndex: -1,
1569
+ * })
1570
+ */
1571
+ BackdropComponent: n.elementType,
1572
+ /**
1573
+ * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.
1574
+ * @deprecated Use `slotProps.backdrop` instead.
1575
+ */
1576
+ BackdropProps: n.object,
1577
+ /**
1578
+ * A single child content element.
1579
+ */
1580
+ children: oe.isRequired,
1581
+ /**
1582
+ * Override or extend the styles applied to the component.
1583
+ */
1584
+ classes: n.object,
1585
+ /**
1586
+ * @ignore
1587
+ */
1588
+ className: n.string,
1589
+ /**
1590
+ * When set to true the Modal waits until a nested Transition is completed before closing.
1591
+ * @default false
1592
+ */
1593
+ closeAfterTransition: n.bool,
1594
+ /**
1595
+ * The component used for the root node.
1596
+ * Either a string to use a HTML element or a component.
1597
+ */
1598
+ component: n.elementType,
1599
+ /**
1600
+ * The components used for each slot inside.
1601
+ *
1602
+ * This prop is an alias for the `slots` prop.
1603
+ * It's recommended to use the `slots` prop instead.
1604
+ *
1605
+ * @default {}
1606
+ */
1607
+ components: n.shape({
1608
+ Backdrop: n.elementType,
1609
+ Root: n.elementType
1610
+ }),
1611
+ /**
1612
+ * The extra props for the slot components.
1613
+ * You can override the existing props or add new ones.
1614
+ *
1615
+ * This prop is an alias for the `slotProps` prop.
1616
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
1617
+ *
1618
+ * @default {}
1619
+ */
1620
+ componentsProps: n.shape({
1621
+ backdrop: n.oneOfType([n.func, n.object]),
1622
+ root: n.oneOfType([n.func, n.object])
1623
+ }),
1624
+ /**
1625
+ * An HTML element or function that returns one.
1626
+ * The `container` will have the portal children appended to it.
1627
+ *
1628
+ * You can also provide a callback, which is called in a React layout effect.
1629
+ * This lets you set the container from a ref, and also makes server-side rendering possible.
1630
+ *
1631
+ * By default, it uses the body of the top-level document object,
1632
+ * so it's simply `document.body` most of the time.
1633
+ */
1634
+ container: n.oneOfType([Pe, n.func]),
1635
+ /**
1636
+ * If `true`, the modal will not automatically shift focus to itself when it opens, and
1637
+ * replace it to the last focused element when it closes.
1638
+ * This also works correctly with any modal children that have the `disableAutoFocus` prop.
1639
+ *
1640
+ * Generally this should never be set to `true` as it makes the modal less
1641
+ * accessible to assistive technologies, like screen readers.
1642
+ * @default false
1643
+ */
1644
+ disableAutoFocus: n.bool,
1645
+ /**
1646
+ * If `true`, the modal will not prevent focus from leaving the modal while open.
1647
+ *
1648
+ * Generally this should never be set to `true` as it makes the modal less
1649
+ * accessible to assistive technologies, like screen readers.
1650
+ * @default false
1651
+ */
1652
+ disableEnforceFocus: n.bool,
1653
+ /**
1654
+ * If `true`, hitting escape will not fire the `onClose` callback.
1655
+ * @default false
1656
+ */
1657
+ disableEscapeKeyDown: n.bool,
1658
+ /**
1659
+ * The `children` will be under the DOM hierarchy of the parent component.
1660
+ * @default false
1661
+ */
1662
+ disablePortal: n.bool,
1663
+ /**
1664
+ * If `true`, the modal will not restore focus to previously focused element once
1665
+ * modal is hidden or unmounted.
1666
+ * @default false
1667
+ */
1668
+ disableRestoreFocus: n.bool,
1669
+ /**
1670
+ * Disable the scroll lock behavior.
1671
+ * @default false
1672
+ */
1673
+ disableScrollLock: n.bool,
1674
+ /**
1675
+ * If `true`, the backdrop is not rendered.
1676
+ * @default false
1677
+ */
1678
+ hideBackdrop: n.bool,
1679
+ /**
1680
+ * Always keep the children in the DOM.
1681
+ * This prop can be useful in SEO situation or
1682
+ * when you want to maximize the responsiveness of the Modal.
1683
+ * @default false
1684
+ */
1685
+ keepMounted: n.bool,
1686
+ /**
1687
+ * Callback fired when the backdrop is clicked.
1688
+ * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
1689
+ */
1690
+ onBackdropClick: n.func,
1691
+ /**
1692
+ * Callback fired when the component requests to be closed.
1693
+ * The `reason` parameter can optionally be used to control the response to `onClose`.
1694
+ *
1695
+ * @param {object} event The event source of the callback.
1696
+ * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
1697
+ */
1698
+ onClose: n.func,
1699
+ /**
1700
+ * A function called when a transition enters.
1701
+ */
1702
+ onTransitionEnter: n.func,
1703
+ /**
1704
+ * A function called when a transition has exited.
1705
+ */
1706
+ onTransitionExited: n.func,
1707
+ /**
1708
+ * If `true`, the component is shown.
1709
+ */
1710
+ open: n.bool.isRequired,
1711
+ /**
1712
+ * The props used for each slot inside the Modal.
1713
+ * @default {}
1714
+ */
1715
+ slotProps: n.shape({
1716
+ backdrop: n.oneOfType([n.func, n.object]),
1717
+ root: n.oneOfType([n.func, n.object])
1718
+ }),
1719
+ /**
1720
+ * The components used for each slot inside the Modal.
1721
+ * Either a string to use a HTML element or a component.
1722
+ * @default {}
1723
+ */
1724
+ slots: n.shape({
1725
+ backdrop: n.elementType,
1726
+ root: n.elementType
1727
+ }),
1728
+ /**
1729
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1730
+ */
1731
+ sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object])
1732
+ });
1733
+ const _n = ["addEndListener", "appear", "children", "container", "direction", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"];
1734
+ function Bn(e, t, r) {
1735
+ const o = t.getBoundingClientRect(), i = r && r.getBoundingClientRect(), s = Q(t);
1736
+ let a;
1737
+ if (t.fakeTransform)
1738
+ a = t.fakeTransform;
1739
+ else {
1740
+ const u = s.getComputedStyle(t);
1741
+ a = u.getPropertyValue("-webkit-transform") || u.getPropertyValue("transform");
1742
+ }
1743
+ let l = 0, c = 0;
1744
+ if (a && a !== "none" && typeof a == "string") {
1745
+ const u = a.split("(")[1].split(")")[0].split(",");
1746
+ l = parseInt(u[4], 10), c = parseInt(u[5], 10);
1747
+ }
1748
+ return e === "left" ? i ? `translateX(${i.right + l - o.left}px)` : `translateX(${s.innerWidth + l - o.left}px)` : e === "right" ? i ? `translateX(-${o.right - i.left - l}px)` : `translateX(-${o.left + o.width - l}px)` : e === "up" ? i ? `translateY(${i.bottom + c - o.top}px)` : `translateY(${s.innerHeight + c - o.top}px)` : i ? `translateY(-${o.top - i.top + o.height - c}px)` : `translateY(-${o.top + o.height - c}px)`;
1749
+ }
1750
+ function it(e) {
1751
+ return typeof e == "function" ? e() : e;
1752
+ }
1753
+ function ae(e, t, r) {
1754
+ const o = it(r), i = Bn(e, t, o);
1755
+ i && (t.style.webkitTransform = i, t.style.transform = i);
1756
+ }
1757
+ const st = /* @__PURE__ */ d.forwardRef(function(t, r) {
1758
+ const o = pe(), i = {
1759
+ enter: o.transitions.easing.easeOut,
1760
+ exit: o.transitions.easing.sharp
1761
+ }, s = {
1762
+ enter: o.transitions.duration.enteringScreen,
1763
+ exit: o.transitions.duration.leavingScreen
1764
+ }, {
1765
+ addEndListener: a,
1766
+ appear: l = !0,
1767
+ children: c,
1768
+ container: u,
1769
+ direction: f = "down",
1770
+ easing: g = i,
1771
+ in: v,
1772
+ onEnter: y,
1773
+ onEntered: b,
1774
+ onEntering: R,
1775
+ onExit: N,
1776
+ onExited: w,
1777
+ onExiting: D,
1778
+ style: h,
1779
+ timeout: T = s,
1780
+ // eslint-disable-next-line react/prop-types
1781
+ TransitionComponent: O = He
1782
+ } = t, M = H(t, _n), x = d.useRef(null), I = Y(c.ref, x, r), _ = (m) => (B) => {
1783
+ m && (B === void 0 ? m(x.current) : m(x.current, B));
1784
+ }, $ = _((m, B) => {
1785
+ ae(f, m, u), ze(m), y && y(m, B);
1786
+ }), S = _((m, B) => {
1787
+ const re = le({
1788
+ timeout: T,
1789
+ style: h,
1790
+ easing: g
1791
+ }, {
1792
+ mode: "enter"
1793
+ });
1794
+ m.style.webkitTransition = o.transitions.create("-webkit-transform", p({}, re)), m.style.transition = o.transitions.create("transform", p({}, re)), m.style.webkitTransform = "none", m.style.transform = "none", R && R(m, B);
1795
+ }), F = _(b), j = _(D), P = _((m) => {
1796
+ const B = le({
1797
+ timeout: T,
1798
+ style: h,
1799
+ easing: g
1800
+ }, {
1801
+ mode: "exit"
1802
+ });
1803
+ m.style.webkitTransition = o.transitions.create("-webkit-transform", B), m.style.transition = o.transitions.create("transform", B), ae(f, m, u), N && N(m);
1804
+ }), A = _((m) => {
1805
+ m.style.webkitTransition = "", m.style.transition = "", w && w(m);
1806
+ }), k = (m) => {
1807
+ a && a(x.current, m);
1808
+ }, C = d.useCallback(() => {
1809
+ x.current && ae(f, x.current, u);
1810
+ }, [f, u]);
1811
+ return d.useEffect(() => {
1812
+ if (v || f === "down" || f === "right")
1813
+ return;
1814
+ const m = Xe(() => {
1815
+ x.current && ae(f, x.current, u);
1816
+ }), B = Q(x.current);
1817
+ return B.addEventListener("resize", m), () => {
1818
+ m.clear(), B.removeEventListener("resize", m);
1819
+ };
1820
+ }, [f, v, u]), d.useEffect(() => {
1821
+ v || C();
1822
+ }, [v, C]), /* @__PURE__ */ E(O, p({
1823
+ nodeRef: x,
1824
+ onEnter: $,
1825
+ onEntered: F,
1826
+ onEntering: S,
1827
+ onExit: P,
1828
+ onExited: A,
1829
+ onExiting: j,
1830
+ addEndListener: k,
1831
+ appear: l,
1832
+ in: v,
1833
+ timeout: T
1834
+ }, M, {
1835
+ children: (m, B) => /* @__PURE__ */ d.cloneElement(c, p({
1836
+ ref: I,
1837
+ style: p({
1838
+ visibility: m === "exited" && !v ? "hidden" : void 0
1839
+ }, h, c.props.style)
1840
+ }, B))
1841
+ }));
1842
+ });
1843
+ process.env.NODE_ENV !== "production" && (st.propTypes = {
1844
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
1845
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1846
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1847
+ // └─────────────────────────────────────────────────────────────────────┘
1848
+ /**
1849
+ * Add a custom transition end trigger. Called with the transitioning DOM
1850
+ * node and a done callback. Allows for more fine grained transition end
1851
+ * logic. Note: Timeouts are still used as a fallback if provided.
1852
+ */
1853
+ addEndListener: n.func,
1854
+ /**
1855
+ * Perform the enter transition when it first mounts if `in` is also `true`.
1856
+ * Set this to `false` to disable this behavior.
1857
+ * @default true
1858
+ */
1859
+ appear: n.bool,
1860
+ /**
1861
+ * A single child content element.
1862
+ */
1863
+ children: oe.isRequired,
1864
+ /**
1865
+ * An HTML element, or a function that returns one.
1866
+ * It's used to set the container the Slide is transitioning from.
1867
+ */
1868
+ container: ne(n.oneOfType([Pe, n.func]), (e) => {
1869
+ if (e.open) {
1870
+ const t = it(e.container);
1871
+ if (t && t.nodeType === 1) {
1872
+ const r = t.getBoundingClientRect();
1873
+ if (process.env.NODE_ENV !== "test" && r.top === 0 && r.left === 0 && r.right === 0 && r.bottom === 0)
1874
+ return new Error(["MUI: The `container` 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(`
1875
+ `));
1876
+ } else if (!t || typeof t.getBoundingClientRect != "function" || t.contextElement != null && t.contextElement.nodeType !== 1)
1877
+ return new Error(["MUI: The `container` prop provided to the component is invalid.", "It should be an HTML element instance."].join(`
1878
+ `));
1879
+ }
1880
+ return null;
1881
+ }),
1882
+ /**
1883
+ * Direction the child node will enter from.
1884
+ * @default 'down'
1885
+ */
1886
+ direction: n.oneOf(["down", "left", "right", "up"]),
1887
+ /**
1888
+ * The transition timing function.
1889
+ * You may specify a single easing or a object containing enter and exit values.
1890
+ * @default {
1891
+ * enter: theme.transitions.easing.easeOut,
1892
+ * exit: theme.transitions.easing.sharp,
1893
+ * }
1894
+ */
1895
+ easing: n.oneOfType([n.shape({
1896
+ enter: n.string,
1897
+ exit: n.string
1898
+ }), n.string]),
1899
+ /**
1900
+ * If `true`, the component will transition in.
1901
+ */
1902
+ in: n.bool,
1903
+ /**
1904
+ * @ignore
1905
+ */
1906
+ onEnter: n.func,
1907
+ /**
1908
+ * @ignore
1909
+ */
1910
+ onEntered: n.func,
1911
+ /**
1912
+ * @ignore
1913
+ */
1914
+ onEntering: n.func,
1915
+ /**
1916
+ * @ignore
1917
+ */
1918
+ onExit: n.func,
1919
+ /**
1920
+ * @ignore
1921
+ */
1922
+ onExited: n.func,
1923
+ /**
1924
+ * @ignore
1925
+ */
1926
+ onExiting: n.func,
1927
+ /**
1928
+ * @ignore
1929
+ */
1930
+ style: n.object,
1931
+ /**
1932
+ * The duration for the transition, in milliseconds.
1933
+ * You may specify a single timeout for all transitions, or individually with an object.
1934
+ * @default {
1935
+ * enter: theme.transitions.duration.enteringScreen,
1936
+ * exit: theme.transitions.duration.leavingScreen,
1937
+ * }
1938
+ */
1939
+ timeout: n.oneOfType([n.number, n.shape({
1940
+ appear: n.number,
1941
+ enter: n.number,
1942
+ exit: n.number
1943
+ })])
1944
+ });
1945
+ function Fn(e) {
1946
+ return G("MuiDrawer", e);
1947
+ }
1948
+ X("MuiDrawer", ["root", "docked", "paper", "paperAnchorLeft", "paperAnchorRight", "paperAnchorTop", "paperAnchorBottom", "paperAnchorDockedLeft", "paperAnchorDockedRight", "paperAnchorDockedTop", "paperAnchorDockedBottom", "modal"]);
1949
+ const jn = ["BackdropProps"], An = ["anchor", "BackdropProps", "children", "className", "elevation", "hideBackdrop", "ModalProps", "onClose", "open", "PaperProps", "SlideProps", "TransitionComponent", "transitionDuration", "variant"], at = (e, t) => {
1950
+ const {
1951
+ ownerState: r
1952
+ } = e;
1953
+ return [t.root, (r.variant === "permanent" || r.variant === "persistent") && t.docked, t.modal];
1954
+ }, Vn = (e) => {
1955
+ const {
1956
+ classes: t,
1957
+ anchor: r,
1958
+ variant: o
1959
+ } = e, i = {
1960
+ root: ["root"],
1961
+ docked: [(o === "permanent" || o === "persistent") && "docked"],
1962
+ modal: ["modal"],
1963
+ paper: ["paper", `paperAnchor${V(r)}`, o !== "temporary" && `paperAnchorDocked${V(r)}`]
1964
+ };
1965
+ return Z(i, Fn, t);
1966
+ }, Ln = L(rt, {
1967
+ name: "MuiDrawer",
1968
+ slot: "Root",
1969
+ overridesResolver: at
1970
+ })(({
1971
+ theme: e
1972
+ }) => ({
1973
+ zIndex: (e.vars || e).zIndex.drawer
1974
+ })), Ue = L("div", {
1975
+ shouldForwardProp: Pt,
1976
+ name: "MuiDrawer",
1977
+ slot: "Docked",
1978
+ skipVariantsResolver: !1,
1979
+ overridesResolver: at
1980
+ })({
1981
+ flex: "0 0 auto"
1982
+ }), qn = L(et, {
1983
+ name: "MuiDrawer",
1984
+ slot: "Paper",
1985
+ overridesResolver: (e, t) => {
1986
+ const {
1987
+ ownerState: r
1988
+ } = e;
1989
+ return [t.paper, t[`paperAnchor${V(r.anchor)}`], r.variant !== "temporary" && t[`paperAnchorDocked${V(r.anchor)}`]];
1990
+ }
1991
+ })(({
1992
+ theme: e,
1993
+ ownerState: t
1994
+ }) => p({
1995
+ overflowY: "auto",
1996
+ display: "flex",
1997
+ flexDirection: "column",
1998
+ height: "100%",
1999
+ flex: "1 0 auto",
2000
+ zIndex: (e.vars || e).zIndex.drawer,
2001
+ // Add iOS momentum scrolling for iOS < 13.0
2002
+ WebkitOverflowScrolling: "touch",
2003
+ // temporary style
2004
+ position: "fixed",
2005
+ top: 0,
2006
+ // We disable the focus ring for mouse, touch and keyboard users.
2007
+ // At some point, it would be better to keep it for keyboard users.
2008
+ // :focus-ring CSS pseudo-class will help.
2009
+ outline: 0
2010
+ }, t.anchor === "left" && {
2011
+ left: 0
2012
+ }, t.anchor === "top" && {
2013
+ top: 0,
2014
+ left: 0,
2015
+ right: 0,
2016
+ height: "auto",
2017
+ maxHeight: "100%"
2018
+ }, t.anchor === "right" && {
2019
+ right: 0
2020
+ }, t.anchor === "bottom" && {
2021
+ top: "auto",
2022
+ left: 0,
2023
+ bottom: 0,
2024
+ right: 0,
2025
+ height: "auto",
2026
+ maxHeight: "100%"
2027
+ }, t.anchor === "left" && t.variant !== "temporary" && {
2028
+ borderRight: `1px solid ${(e.vars || e).palette.divider}`
2029
+ }, t.anchor === "top" && t.variant !== "temporary" && {
2030
+ borderBottom: `1px solid ${(e.vars || e).palette.divider}`
2031
+ }, t.anchor === "right" && t.variant !== "temporary" && {
2032
+ borderLeft: `1px solid ${(e.vars || e).palette.divider}`
2033
+ }, t.anchor === "bottom" && t.variant !== "temporary" && {
2034
+ borderTop: `1px solid ${(e.vars || e).palette.divider}`
2035
+ })), lt = {
2036
+ left: "right",
2037
+ right: "left",
2038
+ top: "down",
2039
+ bottom: "up"
2040
+ };
2041
+ function Un(e) {
2042
+ return ["left", "right"].indexOf(e) !== -1;
2043
+ }
2044
+ function Hn({
2045
+ direction: e
2046
+ }, t) {
2047
+ return e === "rtl" && Un(t) ? lt[t] : t;
2048
+ }
2049
+ const ct = /* @__PURE__ */ d.forwardRef(function(t, r) {
2050
+ const o = J({
2051
+ props: t,
2052
+ name: "MuiDrawer"
2053
+ }), i = pe(), s = Rt(), a = {
2054
+ enter: i.transitions.duration.enteringScreen,
2055
+ exit: i.transitions.duration.leavingScreen
2056
+ }, {
2057
+ anchor: l = "left",
2058
+ BackdropProps: c,
2059
+ children: u,
2060
+ className: f,
2061
+ elevation: g = 16,
2062
+ hideBackdrop: v = !1,
2063
+ ModalProps: {
2064
+ BackdropProps: y
2065
+ } = {},
2066
+ onClose: b,
2067
+ open: R = !1,
2068
+ PaperProps: N = {},
2069
+ SlideProps: w,
2070
+ // eslint-disable-next-line react/prop-types
2071
+ TransitionComponent: D = st,
2072
+ transitionDuration: h = a,
2073
+ variant: T = "temporary"
2074
+ } = o, O = H(o.ModalProps, jn), M = H(o, An), x = d.useRef(!1);
2075
+ d.useEffect(() => {
2076
+ x.current = !0;
2077
+ }, []);
2078
+ const I = Hn({
2079
+ direction: s ? "rtl" : "ltr"
2080
+ }, l), $ = p({}, o, {
2081
+ anchor: l,
2082
+ elevation: g,
2083
+ open: R,
2084
+ variant: T
2085
+ }, M), S = Vn($), F = /* @__PURE__ */ E(qn, p({
2086
+ elevation: T === "temporary" ? g : 0,
2087
+ square: !0
2088
+ }, N, {
2089
+ className: q(S.paper, N.className),
2090
+ ownerState: $,
2091
+ children: u
2092
+ }));
2093
+ if (T === "permanent")
2094
+ return /* @__PURE__ */ E(Ue, p({
2095
+ className: q(S.root, S.docked, f),
2096
+ ownerState: $,
2097
+ ref: r
2098
+ }, M, {
2099
+ children: F
2100
+ }));
2101
+ const j = /* @__PURE__ */ E(D, p({
2102
+ in: R,
2103
+ direction: lt[I],
2104
+ timeout: h,
2105
+ appear: x.current
2106
+ }, w, {
2107
+ children: F
2108
+ }));
2109
+ return T === "persistent" ? /* @__PURE__ */ E(Ue, p({
2110
+ className: q(S.root, S.docked, f),
2111
+ ownerState: $,
2112
+ ref: r
2113
+ }, M, {
2114
+ children: j
2115
+ })) : /* @__PURE__ */ E(Ln, p({
2116
+ BackdropProps: p({}, c, y, {
2117
+ transitionDuration: h
2118
+ }),
2119
+ className: q(S.root, S.modal, f),
2120
+ open: R,
2121
+ ownerState: $,
2122
+ onClose: b,
2123
+ hideBackdrop: v,
2124
+ ref: r
2125
+ }, M, O, {
2126
+ children: j
2127
+ }));
2128
+ });
2129
+ process.env.NODE_ENV !== "production" && (ct.propTypes = {
2130
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
2131
+ // │ These PropTypes are generated from the TypeScript type definitions. │
2132
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2133
+ // └─────────────────────────────────────────────────────────────────────┘
2134
+ /**
2135
+ * Side from which the drawer will appear.
2136
+ * @default 'left'
2137
+ */
2138
+ anchor: n.oneOf(["bottom", "left", "right", "top"]),
2139
+ /**
2140
+ * @ignore
2141
+ */
2142
+ BackdropProps: n.object,
2143
+ /**
2144
+ * The content of the component.
2145
+ */
2146
+ children: n.node,
2147
+ /**
2148
+ * Override or extend the styles applied to the component.
2149
+ */
2150
+ classes: n.object,
2151
+ /**
2152
+ * @ignore
2153
+ */
2154
+ className: n.string,
2155
+ /**
2156
+ * The elevation of the drawer.
2157
+ * @default 16
2158
+ */
2159
+ elevation: Qe,
2160
+ /**
2161
+ * If `true`, the backdrop is not rendered.
2162
+ * @default false
2163
+ */
2164
+ hideBackdrop: n.bool,
2165
+ /**
2166
+ * Props applied to the [`Modal`](/material-ui/api/modal/) element.
2167
+ * @default {}
2168
+ */
2169
+ ModalProps: n.object,
2170
+ /**
2171
+ * Callback fired when the component requests to be closed.
2172
+ * The `reason` parameter can optionally be used to control the response to `onClose`.
2173
+ *
2174
+ * @param {object} event The event source of the callback.
2175
+ * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
2176
+ */
2177
+ onClose: n.func,
2178
+ /**
2179
+ * If `true`, the component is shown.
2180
+ * @default false
2181
+ */
2182
+ open: n.bool,
2183
+ /**
2184
+ * Props applied to the [`Paper`](/material-ui/api/paper/) element.
2185
+ * @default {}
2186
+ */
2187
+ PaperProps: n.object,
2188
+ /**
2189
+ * Props applied to the [`Slide`](/material-ui/api/slide/) element.
2190
+ */
2191
+ SlideProps: n.object,
2192
+ /**
2193
+ * The system prop that allows defining system overrides as well as additional CSS styles.
2194
+ */
2195
+ sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
2196
+ /**
2197
+ * The duration for the transition, in milliseconds.
2198
+ * You may specify a single timeout for all transitions, or individually with an object.
2199
+ * @default {
2200
+ * enter: theme.transitions.duration.enteringScreen,
2201
+ * exit: theme.transitions.duration.leavingScreen,
2202
+ * }
2203
+ */
2204
+ transitionDuration: n.oneOfType([n.number, n.shape({
2205
+ appear: n.number,
2206
+ enter: n.number,
2207
+ exit: n.number
2208
+ })]),
2209
+ /**
2210
+ * The variant to use.
2211
+ * @default 'temporary'
2212
+ */
2213
+ variant: n.oneOf(["permanent", "persistent", "temporary"])
2214
+ });
2215
+ const zn = ({
2216
+ size: e = 36,
2217
+ ...t
2218
+ }) => /* @__PURE__ */ E(
2219
+ Re,
2220
+ {
2221
+ ...t,
2222
+ sx: { position: "absolute", backgroundColor: "rgba(0, 0, 0, 0.3)" },
2223
+ "data-testid": "loading-backdrop",
2224
+ children: /* @__PURE__ */ E(ot, { color: "secondary", size: e })
2225
+ }
2226
+ ), Wn = ({ children: e }) => /* @__PURE__ */ E(Nt, { flex: 1, children: e }), Kn = ({ children: e }) => /* @__PURE__ */ E(ke, { direction: "row", justifyContent: "end", columnGap: 1, pb: 2, children: e });
2227
+ var Ne = {}, Yn = Ct;
2228
+ Object.defineProperty(Ne, "__esModule", {
2229
+ value: !0
2230
+ });
2231
+ var ut = Ne.default = void 0, Gn = Yn(qt()), Xn = ht;
2232
+ ut = Ne.default = (0, Gn.default)(/* @__PURE__ */ (0, Xn.jsx)("path", {
2233
+ d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
2234
+ }), "Close");
2235
+ const Jn = ({ children: e, onClose: t }) => /* @__PURE__ */ de(
2236
+ ke,
2237
+ {
2238
+ direction: "row",
2239
+ justifyContent: "space-between",
2240
+ alignItems: "center",
2241
+ pb: 2,
2242
+ children: [
2243
+ /* @__PURE__ */ E(tt, { fontSize: 16, fontWeight: "bold", children: e }),
2244
+ /* @__PURE__ */ E(wt, { size: "small", onClick: t, "data-testid": "drawer-close", children: /* @__PURE__ */ E(ut, { fontSize: "inherit" }) })
2245
+ ]
2246
+ }
2247
+ ), Ce = ({
2248
+ anchor: e = "right",
2249
+ children: t,
2250
+ width: r,
2251
+ loading: o = !1,
2252
+ ...i
2253
+ }) => /* @__PURE__ */ E(ct, { anchor: e, "data-testid": "drawer", ...i, children: /* @__PURE__ */ de(ke, { height: "100%", p: 2, width: r, position: "relative", children: [
2254
+ t,
2255
+ /* @__PURE__ */ E(zn, { open: o })
2256
+ ] }) });
2257
+ Ce.Header = Jn;
2258
+ Ce.Content = Wn;
2259
+ Ce.Footer = Kn;
2260
+ export {
2261
+ Re as B,
2262
+ ot as C,
2263
+ Ce as D,
2264
+ nt as F,
2265
+ Pe as H,
2266
+ zn as L,
2267
+ rt as M,
2268
+ et as P,
2269
+ tt as T,
2270
+ ce as a,
2271
+ oe as b,
2272
+ St as c,
2273
+ Xe as d,
2274
+ Ge as e,
2275
+ It as f,
2276
+ _t as g,
2277
+ ue as h,
2278
+ Qe as i,
2279
+ Q as o,
2280
+ qt as r
2281
+ };