jcicl 0.0.151 → 0.0.155

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.
package/.chunks/Paper.js DELETED
@@ -1,1247 +0,0 @@
1
- import * as p from "react";
2
- import { P as e, a as Q, g as Z, s as G, u as ee, b as _, d as te, e as ae, h as ce } from "./DefaultPropsProvider.js";
3
- import { m as be } from "./memoTheme.js";
4
- import { o as L, g as me, e as ne, d as Ne, u as he, T as Ce, r as Oe, a as le, P as Se, H as Ie } from "./Portal.js";
5
- import { u as X, c as de } from "./TransitionGroupContext.js";
6
- import { e as Me } from "./resolveComponentProps.js";
7
- import { u as z, i as Fe } from "./useSlot.js";
8
- import { jsxs as ve, jsx as A } from "react/jsx-runtime";
9
- import { c as Ae } from "./chainPropTypes.js";
10
- function ue(...t) {
11
- return t.reduce((n, r) => r == null ? n : function(...i) {
12
- n.apply(this, i), r.apply(this, i);
13
- }, () => {
14
- });
15
- }
16
- function H(t) {
17
- return L(t).defaultView || window;
18
- }
19
- function De(t = window) {
20
- const n = t.document.documentElement.clientWidth;
21
- return t.innerWidth - n;
22
- }
23
- function je(t) {
24
- const n = L(t);
25
- return n.body === t ? H(t).innerWidth > n.documentElement.clientWidth : t.scrollHeight > t.clientHeight;
26
- }
27
- function q(t, n) {
28
- n ? t.setAttribute("aria-hidden", "true") : t.removeAttribute("aria-hidden");
29
- }
30
- function pe(t) {
31
- return parseInt(H(t).getComputedStyle(t).paddingRight, 10) || 0;
32
- }
33
- function Be(t) {
34
- const r = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].includes(t.tagName), o = t.tagName === "INPUT" && t.getAttribute("type") === "hidden";
35
- return r || o;
36
- }
37
- function fe(t, n, r, o, i) {
38
- const s = [n, r, ...o];
39
- [].forEach.call(t.children, (c) => {
40
- const a = !s.includes(c), f = !Be(c);
41
- a && f && q(c, i);
42
- });
43
- }
44
- function J(t, n) {
45
- let r = -1;
46
- return t.some((o, i) => n(o) ? (r = i, !0) : !1), r;
47
- }
48
- function Le(t, n) {
49
- const r = [], o = t.container;
50
- if (!n.disableScrollLock) {
51
- if (je(o)) {
52
- const c = De(H(o));
53
- r.push({
54
- value: o.style.paddingRight,
55
- property: "padding-right",
56
- el: o
57
- }), o.style.paddingRight = `${pe(o) + c}px`;
58
- const a = L(o).querySelectorAll(".mui-fixed");
59
- [].forEach.call(a, (f) => {
60
- r.push({
61
- value: f.style.paddingRight,
62
- property: "padding-right",
63
- el: f
64
- }), f.style.paddingRight = `${pe(f) + c}px`;
65
- });
66
- }
67
- let s;
68
- if (o.parentNode instanceof DocumentFragment)
69
- s = L(o).body;
70
- else {
71
- const c = o.parentElement, a = H(o);
72
- s = (c == null ? void 0 : c.nodeName) === "HTML" && a.getComputedStyle(c).overflowY === "scroll" ? c : o;
73
- }
74
- r.push({
75
- value: s.style.overflow,
76
- property: "overflow",
77
- el: s
78
- }, {
79
- value: s.style.overflowX,
80
- property: "overflow-x",
81
- el: s
82
- }, {
83
- value: s.style.overflowY,
84
- property: "overflow-y",
85
- el: s
86
- }), s.style.overflow = "hidden";
87
- }
88
- return () => {
89
- r.forEach(({
90
- value: s,
91
- el: c,
92
- property: a
93
- }) => {
94
- s ? c.style.setProperty(a, s) : c.style.removeProperty(a);
95
- });
96
- };
97
- }
98
- function Ue(t) {
99
- const n = [];
100
- return [].forEach.call(t.children, (r) => {
101
- r.getAttribute("aria-hidden") === "true" && n.push(r);
102
- }), n;
103
- }
104
- class $e {
105
- constructor() {
106
- this.modals = [], this.containers = [];
107
- }
108
- add(n, r) {
109
- let o = this.modals.indexOf(n);
110
- if (o !== -1)
111
- return o;
112
- o = this.modals.length, this.modals.push(n), n.modalRef && q(n.modalRef, !1);
113
- const i = Ue(r);
114
- fe(r, n.mount, n.modalRef, i, !0);
115
- const s = J(this.containers, (c) => c.container === r);
116
- return s !== -1 ? (this.containers[s].modals.push(n), o) : (this.containers.push({
117
- modals: [n],
118
- container: r,
119
- restore: null,
120
- hiddenSiblings: i
121
- }), o);
122
- }
123
- mount(n, r) {
124
- const o = J(this.containers, (s) => s.modals.includes(n)), i = this.containers[o];
125
- i.restore || (i.restore = Le(i, r));
126
- }
127
- remove(n, r = !0) {
128
- const o = this.modals.indexOf(n);
129
- if (o === -1)
130
- return o;
131
- const i = J(this.containers, (c) => c.modals.includes(n)), s = this.containers[i];
132
- if (s.modals.splice(s.modals.indexOf(n), 1), this.modals.splice(o, 1), s.modals.length === 0)
133
- s.restore && s.restore(), n.modalRef && q(n.modalRef, r), fe(s.container, n.mount, n.modalRef, s.hiddenSiblings, !1), this.containers.splice(i, 1);
134
- else {
135
- const c = s.modals[s.modals.length - 1];
136
- c.modalRef && q(c.modalRef, !1);
137
- }
138
- return o;
139
- }
140
- isTopModal(n) {
141
- return this.modals.length > 0 && this.modals[this.modals.length - 1] === n;
142
- }
143
- }
144
- const qe = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
145
- function Ke(t) {
146
- const n = parseInt(t.getAttribute("tabindex") || "", 10);
147
- return Number.isNaN(n) ? t.contentEditable === "true" || (t.nodeName === "AUDIO" || t.nodeName === "VIDEO" || t.nodeName === "DETAILS") && t.getAttribute("tabindex") === null ? 0 : t.tabIndex : n;
148
- }
149
- function Ve(t) {
150
- if (t.tagName !== "INPUT" || t.type !== "radio" || !t.name)
151
- return !1;
152
- const n = (o) => t.ownerDocument.querySelector(`input[type="radio"]${o}`);
153
- let r = n(`[name="${t.name}"]:checked`);
154
- return r || (r = n(`[name="${t.name}"]`)), r !== t;
155
- }
156
- function We(t) {
157
- return !(t.disabled || t.tagName === "INPUT" && t.type === "hidden" || Ve(t));
158
- }
159
- function _e(t) {
160
- const n = [], r = [];
161
- return Array.from(t.querySelectorAll(qe)).forEach((o, i) => {
162
- const s = Ke(o);
163
- s === -1 || !We(o) || (s === 0 ? n.push(o) : r.push({
164
- documentOrder: i,
165
- tabIndex: s,
166
- node: o
167
- }));
168
- }), r.sort((o, i) => o.tabIndex === i.tabIndex ? o.documentOrder - i.documentOrder : o.tabIndex - i.tabIndex).map((o) => o.node).concat(n);
169
- }
170
- function ze() {
171
- return !0;
172
- }
173
- function Y(t) {
174
- const {
175
- children: n,
176
- disableAutoFocus: r = !1,
177
- disableEnforceFocus: o = !1,
178
- disableRestoreFocus: i = !1,
179
- getTabbable: s = _e,
180
- isEnabled: c = ze,
181
- open: a
182
- } = t, f = p.useRef(!1), y = p.useRef(null), g = p.useRef(null), h = p.useRef(null), T = p.useRef(null), b = p.useRef(!1), m = p.useRef(null), S = X(me(n), m), x = p.useRef(null);
183
- p.useEffect(() => {
184
- !a || !m.current || (b.current = !r);
185
- }, [r, a]), p.useEffect(() => {
186
- if (!a || !m.current)
187
- return;
188
- const d = L(m.current);
189
- return m.current.contains(d.activeElement) || (m.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(`
190
- `)), m.current.setAttribute("tabIndex", "-1")), b.current && m.current.focus()), () => {
191
- i || (h.current && h.current.focus && (f.current = !0, h.current.focus()), h.current = null);
192
- };
193
- }, [a]), p.useEffect(() => {
194
- if (!a || !m.current)
195
- return;
196
- const d = L(m.current), v = (P) => {
197
- x.current = P, !(o || !c() || P.key !== "Tab") && d.activeElement === m.current && P.shiftKey && (f.current = !0, g.current && g.current.focus());
198
- }, N = () => {
199
- var C, M;
200
- const P = m.current;
201
- if (P === null)
202
- return;
203
- if (!d.hasFocus() || !c() || f.current) {
204
- f.current = !1;
205
- return;
206
- }
207
- if (P.contains(d.activeElement) || o && d.activeElement !== y.current && d.activeElement !== g.current)
208
- return;
209
- if (d.activeElement !== T.current)
210
- T.current = null;
211
- else if (T.current !== null)
212
- return;
213
- if (!b.current)
214
- return;
215
- let O = [];
216
- if ((d.activeElement === y.current || d.activeElement === g.current) && (O = s(m.current)), O.length > 0) {
217
- const D = !!((C = x.current) != null && C.shiftKey && ((M = x.current) == null ? void 0 : M.key) === "Tab"), j = O[0], U = O[O.length - 1];
218
- typeof j != "string" && typeof U != "string" && (D ? U.focus() : j.focus());
219
- } else
220
- P.focus();
221
- };
222
- d.addEventListener("focusin", N), d.addEventListener("keydown", v, !0);
223
- const R = setInterval(() => {
224
- d.activeElement && d.activeElement.tagName === "BODY" && N();
225
- }, 50);
226
- return () => {
227
- clearInterval(R), d.removeEventListener("focusin", N), d.removeEventListener("keydown", v, !0);
228
- };
229
- }, [r, o, i, c, a, s]);
230
- const k = (d) => {
231
- h.current === null && (h.current = d.relatedTarget), b.current = !0, T.current = d.target;
232
- const v = n.props.onFocus;
233
- v && v(d);
234
- }, w = (d) => {
235
- h.current === null && (h.current = d.relatedTarget), b.current = !0;
236
- };
237
- return /* @__PURE__ */ ve(p.Fragment, {
238
- children: [/* @__PURE__ */ A("div", {
239
- tabIndex: a ? 0 : -1,
240
- onFocus: w,
241
- ref: y,
242
- "data-testid": "sentinelStart"
243
- }), /* @__PURE__ */ p.cloneElement(n, {
244
- ref: S,
245
- onFocus: k
246
- }), /* @__PURE__ */ A("div", {
247
- tabIndex: a ? 0 : -1,
248
- onFocus: w,
249
- ref: g,
250
- "data-testid": "sentinelEnd"
251
- })]
252
- });
253
- }
254
- process.env.NODE_ENV !== "production" && (Y.propTypes = {
255
- // ┌────────────────────────────── Warning ──────────────────────────────┐
256
- // │ These PropTypes are generated from the TypeScript type definitions. │
257
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
258
- // └─────────────────────────────────────────────────────────────────────┘
259
- /**
260
- * A single child content element.
261
- */
262
- children: ne,
263
- /**
264
- * If `true`, the focus trap will not automatically shift focus to itself when it opens, and
265
- * replace it to the last focused element when it closes.
266
- * This also works correctly with any focus trap children that have the `disableAutoFocus` prop.
267
- *
268
- * Generally this should never be set to `true` as it makes the focus trap less
269
- * accessible to assistive technologies, like screen readers.
270
- * @default false
271
- */
272
- disableAutoFocus: e.bool,
273
- /**
274
- * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.
275
- *
276
- * Generally this should never be set to `true` as it makes the focus trap less
277
- * accessible to assistive technologies, like screen readers.
278
- * @default false
279
- */
280
- disableEnforceFocus: e.bool,
281
- /**
282
- * If `true`, the focus trap will not restore focus to previously focused element once
283
- * focus trap is hidden or unmounted.
284
- * @default false
285
- */
286
- disableRestoreFocus: e.bool,
287
- /**
288
- * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.
289
- * For instance, you can provide the "tabbable" npm dependency.
290
- * @param {HTMLElement} root
291
- */
292
- getTabbable: e.func,
293
- /**
294
- * This prop extends the `open` prop.
295
- * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.
296
- * This prop should be memoized.
297
- * It can be used to support multiple focus trap mounted at the same time.
298
- * @default function defaultIsEnabled(): boolean {
299
- * return true;
300
- * }
301
- */
302
- isEnabled: e.func,
303
- /**
304
- * If `true`, focus is locked.
305
- */
306
- open: e.bool.isRequired
307
- });
308
- process.env.NODE_ENV !== "production" && (Y.propTypes = Ne(Y.propTypes));
309
- const He = {
310
- entering: {
311
- opacity: 1
312
- },
313
- entered: {
314
- opacity: 1
315
- }
316
- }, ye = /* @__PURE__ */ p.forwardRef(function(n, r) {
317
- const o = he(), i = {
318
- enter: o.transitions.duration.enteringScreen,
319
- exit: o.transitions.duration.leavingScreen
320
- }, {
321
- addEndListener: s,
322
- appear: c = !0,
323
- children: a,
324
- easing: f,
325
- in: y,
326
- onEnter: g,
327
- onEntered: h,
328
- onEntering: T,
329
- onExit: b,
330
- onExited: m,
331
- onExiting: S,
332
- style: x,
333
- timeout: k = i,
334
- // eslint-disable-next-line react/prop-types
335
- TransitionComponent: w = Ce,
336
- ...d
337
- } = n, v = p.useRef(null), N = X(v, me(a), r), R = (E) => (l) => {
338
- if (E) {
339
- const u = v.current;
340
- l === void 0 ? E(u) : E(u, l);
341
- }
342
- }, P = R(T), O = R((E, l) => {
343
- Oe(E);
344
- const u = le({
345
- style: x,
346
- timeout: k,
347
- easing: f
348
- }, {
349
- mode: "enter"
350
- });
351
- E.style.webkitTransition = o.transitions.create("opacity", u), E.style.transition = o.transitions.create("opacity", u), g && g(E, l);
352
- }), C = R(h), M = R(S), D = R((E) => {
353
- const l = le({
354
- style: x,
355
- timeout: k,
356
- easing: f
357
- }, {
358
- mode: "exit"
359
- });
360
- E.style.webkitTransition = o.transitions.create("opacity", l), E.style.transition = o.transitions.create("opacity", l), b && b(E);
361
- }), j = R(m);
362
- return /* @__PURE__ */ A(w, {
363
- appear: c,
364
- in: y,
365
- nodeRef: v,
366
- onEnter: O,
367
- onEntered: C,
368
- onEntering: P,
369
- onExit: D,
370
- onExited: j,
371
- onExiting: M,
372
- addEndListener: (E) => {
373
- s && s(v.current, E);
374
- },
375
- timeout: k,
376
- ...d,
377
- children: (E, l) => /* @__PURE__ */ p.cloneElement(a, {
378
- style: {
379
- opacity: 0,
380
- visibility: E === "exited" && !y ? "hidden" : void 0,
381
- ...He[E],
382
- ...x,
383
- ...a.props.style
384
- },
385
- ref: N,
386
- ...l
387
- })
388
- });
389
- });
390
- process.env.NODE_ENV !== "production" && (ye.propTypes = {
391
- // ┌────────────────────────────── Warning ──────────────────────────────┐
392
- // │ These PropTypes are generated from the TypeScript type definitions. │
393
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
394
- // └─────────────────────────────────────────────────────────────────────┘
395
- /**
396
- * Add a custom transition end trigger. Called with the transitioning DOM
397
- * node and a done callback. Allows for more fine grained transition end
398
- * logic. Note: Timeouts are still used as a fallback if provided.
399
- */
400
- addEndListener: e.func,
401
- /**
402
- * Perform the enter transition when it first mounts if `in` is also `true`.
403
- * Set this to `false` to disable this behavior.
404
- * @default true
405
- */
406
- appear: e.bool,
407
- /**
408
- * A single child content element.
409
- */
410
- children: ne.isRequired,
411
- /**
412
- * The transition timing function.
413
- * You may specify a single easing or a object containing enter and exit values.
414
- */
415
- easing: e.oneOfType([e.shape({
416
- enter: e.string,
417
- exit: e.string
418
- }), e.string]),
419
- /**
420
- * If `true`, the component will transition in.
421
- */
422
- in: e.bool,
423
- /**
424
- * @ignore
425
- */
426
- onEnter: e.func,
427
- /**
428
- * @ignore
429
- */
430
- onEntered: e.func,
431
- /**
432
- * @ignore
433
- */
434
- onEntering: e.func,
435
- /**
436
- * @ignore
437
- */
438
- onExit: e.func,
439
- /**
440
- * @ignore
441
- */
442
- onExited: e.func,
443
- /**
444
- * @ignore
445
- */
446
- onExiting: e.func,
447
- /**
448
- * @ignore
449
- */
450
- style: e.object,
451
- /**
452
- * The duration for the transition, in milliseconds.
453
- * You may specify a single timeout for all transitions, or individually with an object.
454
- * @default {
455
- * enter: theme.transitions.duration.enteringScreen,
456
- * exit: theme.transitions.duration.leavingScreen,
457
- * }
458
- */
459
- timeout: e.oneOfType([e.number, e.shape({
460
- appear: e.number,
461
- enter: e.number,
462
- exit: e.number
463
- })])
464
- });
465
- function Ye(t) {
466
- return Z("MuiBackdrop", t);
467
- }
468
- Q("MuiBackdrop", ["root", "invisible"]);
469
- const Ge = (t) => {
470
- const {
471
- ownerState: n,
472
- ...r
473
- } = t;
474
- return r;
475
- }, Xe = (t) => {
476
- const {
477
- classes: n,
478
- invisible: r
479
- } = t;
480
- return te({
481
- root: ["root", r && "invisible"]
482
- }, Ye, n);
483
- }, Je = G("div", {
484
- name: "MuiBackdrop",
485
- slot: "Root",
486
- overridesResolver: (t, n) => {
487
- const {
488
- ownerState: r
489
- } = t;
490
- return [n.root, r.invisible && n.invisible];
491
- }
492
- })({
493
- position: "fixed",
494
- display: "flex",
495
- alignItems: "center",
496
- justifyContent: "center",
497
- right: 0,
498
- bottom: 0,
499
- top: 0,
500
- left: 0,
501
- backgroundColor: "rgba(0, 0, 0, 0.5)",
502
- WebkitTapHighlightColor: "transparent",
503
- variants: [{
504
- props: {
505
- invisible: !0
506
- },
507
- style: {
508
- backgroundColor: "transparent"
509
- }
510
- }]
511
- }), Ee = /* @__PURE__ */ p.forwardRef(function(n, r) {
512
- const o = ee({
513
- props: n,
514
- name: "MuiBackdrop"
515
- }), {
516
- children: i,
517
- className: s,
518
- component: c = "div",
519
- invisible: a = !1,
520
- open: f,
521
- components: y = {},
522
- componentsProps: g = {},
523
- slotProps: h = {},
524
- slots: T = {},
525
- TransitionComponent: b,
526
- transitionDuration: m,
527
- ...S
528
- } = o, x = {
529
- ...o,
530
- component: c,
531
- invisible: a
532
- }, k = Xe(x), w = {
533
- transition: b,
534
- root: y.Root,
535
- ...T
536
- }, d = {
537
- ...g,
538
- ...h
539
- }, v = {
540
- slots: w,
541
- slotProps: d
542
- }, [N, R] = z("root", {
543
- elementType: Je,
544
- externalForwardedProps: v,
545
- className: _(k.root, s),
546
- ownerState: x
547
- }), [P, O] = z("transition", {
548
- elementType: ye,
549
- externalForwardedProps: v,
550
- ownerState: x
551
- }), C = Ge(O);
552
- return /* @__PURE__ */ A(P, {
553
- in: f,
554
- timeout: m,
555
- ...S,
556
- ...C,
557
- children: /* @__PURE__ */ A(N, {
558
- "aria-hidden": !0,
559
- ...R,
560
- classes: k,
561
- ref: r,
562
- children: i
563
- })
564
- });
565
- });
566
- process.env.NODE_ENV !== "production" && (Ee.propTypes = {
567
- // ┌────────────────────────────── Warning ──────────────────────────────┐
568
- // │ These PropTypes are generated from the TypeScript type definitions. │
569
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
570
- // └─────────────────────────────────────────────────────────────────────┘
571
- /**
572
- * The content of the component.
573
- */
574
- children: e.node,
575
- /**
576
- * Override or extend the styles applied to the component.
577
- */
578
- classes: e.object,
579
- /**
580
- * @ignore
581
- */
582
- className: e.string,
583
- /**
584
- * The component used for the root node.
585
- * Either a string to use a HTML element or a component.
586
- */
587
- component: e.elementType,
588
- /**
589
- * The components used for each slot inside.
590
- *
591
- * @deprecated Use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
592
- *
593
- * @default {}
594
- */
595
- components: e.shape({
596
- Root: e.elementType
597
- }),
598
- /**
599
- * The extra props for the slot components.
600
- * You can override the existing props or add new ones.
601
- *
602
- * @deprecated Use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
603
- *
604
- * @default {}
605
- */
606
- componentsProps: e.shape({
607
- root: e.object
608
- }),
609
- /**
610
- * If `true`, the backdrop is invisible.
611
- * It can be used when rendering a popover or a custom select component.
612
- * @default false
613
- */
614
- invisible: e.bool,
615
- /**
616
- * If `true`, the component is shown.
617
- */
618
- open: e.bool.isRequired,
619
- /**
620
- * The props used for each slot inside.
621
- * @default {}
622
- */
623
- slotProps: e.shape({
624
- root: e.oneOfType([e.func, e.object]),
625
- transition: e.oneOfType([e.func, e.object])
626
- }),
627
- /**
628
- * The components used for each slot inside.
629
- * @default {}
630
- */
631
- slots: e.shape({
632
- root: e.elementType,
633
- transition: e.elementType
634
- }),
635
- /**
636
- * The system prop that allows defining system overrides as well as additional CSS styles.
637
- */
638
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
639
- /**
640
- * The component used for the transition.
641
- * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
642
- * @default Fade
643
- */
644
- TransitionComponent: e.elementType,
645
- /**
646
- * The duration for the transition, in milliseconds.
647
- * You may specify a single timeout for all transitions, or individually with an object.
648
- */
649
- transitionDuration: e.oneOfType([e.number, e.shape({
650
- appear: e.number,
651
- enter: e.number,
652
- exit: e.number
653
- })])
654
- });
655
- function Qe(t) {
656
- return typeof t == "function" ? t() : t;
657
- }
658
- function Ze(t) {
659
- return t ? t.props.hasOwnProperty("in") : !1;
660
- }
661
- const W = new $e();
662
- function et(t) {
663
- const {
664
- container: n,
665
- disableEscapeKeyDown: r = !1,
666
- disableScrollLock: o = !1,
667
- closeAfterTransition: i = !1,
668
- onTransitionEnter: s,
669
- onTransitionExited: c,
670
- children: a,
671
- onClose: f,
672
- open: y,
673
- rootRef: g
674
- } = t, h = p.useRef({}), T = p.useRef(null), b = p.useRef(null), m = X(b, g), [S, x] = p.useState(!y), k = Ze(a);
675
- let w = !0;
676
- (t["aria-hidden"] === "false" || t["aria-hidden"] === !1) && (w = !1);
677
- const d = () => L(T.current), v = () => (h.current.modalRef = b.current, h.current.mount = T.current, h.current), N = () => {
678
- W.mount(v(), {
679
- disableScrollLock: o
680
- }), b.current && (b.current.scrollTop = 0);
681
- }, R = de(() => {
682
- const l = Qe(n) || d().body;
683
- W.add(v(), l), b.current && N();
684
- }), P = () => W.isTopModal(v()), O = de((l) => {
685
- T.current = l, l && (y && P() ? N() : b.current && q(b.current, w));
686
- }), C = p.useCallback(() => {
687
- W.remove(v(), w);
688
- }, [w]);
689
- p.useEffect(() => () => {
690
- C();
691
- }, [C]), p.useEffect(() => {
692
- y ? R() : (!k || !i) && C();
693
- }, [y, C, k, i, R]);
694
- const M = (l) => (u) => {
695
- var I;
696
- (I = l.onKeyDown) == null || I.call(l, u), !(u.key !== "Escape" || u.which === 229 || // Wait until IME is settled.
697
- !P()) && (r || (u.stopPropagation(), f && f(u, "escapeKeyDown")));
698
- }, D = (l) => (u) => {
699
- var I;
700
- (I = l.onClick) == null || I.call(l, u), u.target === u.currentTarget && f && f(u, "backdropClick");
701
- };
702
- return {
703
- getRootProps: (l = {}) => {
704
- const u = Me(t);
705
- delete u.onTransitionEnter, delete u.onTransitionExited;
706
- const I = {
707
- ...u,
708
- ...l
709
- };
710
- return {
711
- /*
712
- * Marking an element with the role presentation indicates to assistive technology
713
- * that this element should be ignored; it exists to support the web application and
714
- * is not meant for humans to interact with directly.
715
- * https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
716
- */
717
- role: "presentation",
718
- ...I,
719
- onKeyDown: M(I),
720
- ref: m
721
- };
722
- },
723
- getBackdropProps: (l = {}) => {
724
- const u = l;
725
- return {
726
- "aria-hidden": !0,
727
- ...u,
728
- onClick: D(u),
729
- open: y
730
- };
731
- },
732
- getTransitionProps: () => {
733
- const l = () => {
734
- x(!1), s && s();
735
- }, u = () => {
736
- x(!0), c && c(), i && C();
737
- };
738
- return {
739
- onEnter: ue(l, a == null ? void 0 : a.props.onEnter),
740
- onExited: ue(u, a == null ? void 0 : a.props.onExited)
741
- };
742
- },
743
- rootRef: m,
744
- portalRef: O,
745
- isTopModal: P,
746
- exited: S,
747
- hasTransition: k
748
- };
749
- }
750
- function tt(t) {
751
- return Z("MuiModal", t);
752
- }
753
- Q("MuiModal", ["root", "hidden", "backdrop"]);
754
- const nt = (t) => {
755
- const {
756
- open: n,
757
- exited: r,
758
- classes: o
759
- } = t;
760
- return te({
761
- root: ["root", !n && r && "hidden"],
762
- backdrop: ["backdrop"]
763
- }, tt, o);
764
- }, ot = G("div", {
765
- name: "MuiModal",
766
- slot: "Root",
767
- overridesResolver: (t, n) => {
768
- const {
769
- ownerState: r
770
- } = t;
771
- return [n.root, !r.open && r.exited && n.hidden];
772
- }
773
- })(be(({
774
- theme: t
775
- }) => ({
776
- position: "fixed",
777
- zIndex: (t.vars || t).zIndex.modal,
778
- right: 0,
779
- bottom: 0,
780
- top: 0,
781
- left: 0,
782
- variants: [{
783
- props: ({
784
- ownerState: n
785
- }) => !n.open && n.exited,
786
- style: {
787
- visibility: "hidden"
788
- }
789
- }]
790
- }))), rt = G(Ee, {
791
- name: "MuiModal",
792
- slot: "Backdrop",
793
- overridesResolver: (t, n) => n.backdrop
794
- })({
795
- zIndex: -1
796
- }), st = /* @__PURE__ */ p.forwardRef(function(n, r) {
797
- const o = ee({
798
- name: "MuiModal",
799
- props: n
800
- }), {
801
- BackdropComponent: i = rt,
802
- BackdropProps: s,
803
- classes: c,
804
- className: a,
805
- closeAfterTransition: f = !1,
806
- children: y,
807
- container: g,
808
- component: h,
809
- components: T = {},
810
- componentsProps: b = {},
811
- disableAutoFocus: m = !1,
812
- disableEnforceFocus: S = !1,
813
- disableEscapeKeyDown: x = !1,
814
- disablePortal: k = !1,
815
- disableRestoreFocus: w = !1,
816
- disableScrollLock: d = !1,
817
- hideBackdrop: v = !1,
818
- keepMounted: N = !1,
819
- onBackdropClick: R,
820
- onClose: P,
821
- onTransitionEnter: O,
822
- onTransitionExited: C,
823
- open: M,
824
- slotProps: D = {},
825
- slots: j = {},
826
- // eslint-disable-next-line react/prop-types
827
- theme: U,
828
- ...E
829
- } = o, l = {
830
- ...o,
831
- closeAfterTransition: f,
832
- disableAutoFocus: m,
833
- disableEnforceFocus: S,
834
- disableEscapeKeyDown: x,
835
- disablePortal: k,
836
- disableRestoreFocus: w,
837
- disableScrollLock: d,
838
- hideBackdrop: v,
839
- keepMounted: N
840
- }, {
841
- getRootProps: u,
842
- getBackdropProps: I,
843
- getTransitionProps: ge,
844
- portalRef: Te,
845
- isTopModal: xe,
846
- exited: oe,
847
- hasTransition: re
848
- } = et({
849
- ...l,
850
- rootRef: r
851
- }), $ = {
852
- ...l,
853
- exited: oe
854
- }, F = nt($), K = {};
855
- if (y.props.tabIndex === void 0 && (K.tabIndex = "-1"), re) {
856
- const {
857
- onEnter: B,
858
- onExited: V
859
- } = ge();
860
- K.onEnter = B, K.onExited = V;
861
- }
862
- const se = {
863
- ...E,
864
- slots: {
865
- root: T.Root,
866
- backdrop: T.Backdrop,
867
- ...j
868
- },
869
- slotProps: {
870
- ...b,
871
- ...D
872
- }
873
- }, [Re, Pe] = z("root", {
874
- elementType: ot,
875
- externalForwardedProps: se,
876
- getSlotProps: u,
877
- additionalProps: {
878
- ref: r,
879
- as: h
880
- },
881
- ownerState: $,
882
- className: _(a, F == null ? void 0 : F.root, !$.open && $.exited && (F == null ? void 0 : F.hidden))
883
- }), [ke, ie] = z("backdrop", {
884
- elementType: i,
885
- externalForwardedProps: se,
886
- additionalProps: s,
887
- getSlotProps: (B) => I({
888
- ...B,
889
- onClick: (V) => {
890
- R && R(V), B != null && B.onClick && B.onClick(V);
891
- }
892
- }),
893
- className: _(s == null ? void 0 : s.className, F == null ? void 0 : F.backdrop),
894
- ownerState: $
895
- }), we = X(s == null ? void 0 : s.ref, ie.ref);
896
- return !N && !M && (!re || oe) ? null : /* @__PURE__ */ A(Se, {
897
- ref: Te,
898
- container: g,
899
- disablePortal: k,
900
- children: /* @__PURE__ */ ve(Re, {
901
- ...Pe,
902
- children: [!v && i ? /* @__PURE__ */ A(ke, {
903
- ...ie,
904
- ref: we
905
- }) : null, /* @__PURE__ */ A(Y, {
906
- disableEnforceFocus: S,
907
- disableAutoFocus: m,
908
- disableRestoreFocus: w,
909
- isEnabled: xe,
910
- open: M,
911
- children: /* @__PURE__ */ p.cloneElement(y, K)
912
- })]
913
- })
914
- });
915
- });
916
- process.env.NODE_ENV !== "production" && (st.propTypes = {
917
- // ┌────────────────────────────── Warning ──────────────────────────────┐
918
- // │ These PropTypes are generated from the TypeScript type definitions. │
919
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
920
- // └─────────────────────────────────────────────────────────────────────┘
921
- /**
922
- * A backdrop component. This prop enables custom backdrop rendering.
923
- * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
924
- * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.
925
- * @default styled(Backdrop, {
926
- * name: 'MuiModal',
927
- * slot: 'Backdrop',
928
- * overridesResolver: (props, styles) => {
929
- * return styles.backdrop;
930
- * },
931
- * })({
932
- * zIndex: -1,
933
- * })
934
- */
935
- BackdropComponent: e.elementType,
936
- /**
937
- * Props applied to the [`Backdrop`](https://mui.com/material-ui/api/backdrop/) element.
938
- * @deprecated Use `slotProps.backdrop` instead.
939
- */
940
- BackdropProps: e.object,
941
- /**
942
- * A single child content element.
943
- */
944
- children: ne.isRequired,
945
- /**
946
- * Override or extend the styles applied to the component.
947
- */
948
- classes: e.object,
949
- /**
950
- * @ignore
951
- */
952
- className: e.string,
953
- /**
954
- * When set to true the Modal waits until a nested Transition is completed before closing.
955
- * @default false
956
- */
957
- closeAfterTransition: e.bool,
958
- /**
959
- * The component used for the root node.
960
- * Either a string to use a HTML element or a component.
961
- */
962
- component: e.elementType,
963
- /**
964
- * The components used for each slot inside.
965
- *
966
- * @deprecated Use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
967
- *
968
- * @default {}
969
- */
970
- components: e.shape({
971
- Backdrop: e.elementType,
972
- Root: e.elementType
973
- }),
974
- /**
975
- * The extra props for the slot components.
976
- * You can override the existing props or add new ones.
977
- *
978
- * @deprecated Use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
979
- *
980
- * @default {}
981
- */
982
- componentsProps: e.shape({
983
- backdrop: e.oneOfType([e.func, e.object]),
984
- root: e.oneOfType([e.func, e.object])
985
- }),
986
- /**
987
- * An HTML element or function that returns one.
988
- * The `container` will have the portal children appended to it.
989
- *
990
- * You can also provide a callback, which is called in a React layout effect.
991
- * This lets you set the container from a ref, and also makes server-side rendering possible.
992
- *
993
- * By default, it uses the body of the top-level document object,
994
- * so it's simply `document.body` most of the time.
995
- */
996
- container: e.oneOfType([Ie, e.func]),
997
- /**
998
- * If `true`, the modal will not automatically shift focus to itself when it opens, and
999
- * replace it to the last focused element when it closes.
1000
- * This also works correctly with any modal children that have the `disableAutoFocus` prop.
1001
- *
1002
- * Generally this should never be set to `true` as it makes the modal less
1003
- * accessible to assistive technologies, like screen readers.
1004
- * @default false
1005
- */
1006
- disableAutoFocus: e.bool,
1007
- /**
1008
- * If `true`, the modal will not prevent focus from leaving the modal while open.
1009
- *
1010
- * Generally this should never be set to `true` as it makes the modal less
1011
- * accessible to assistive technologies, like screen readers.
1012
- * @default false
1013
- */
1014
- disableEnforceFocus: e.bool,
1015
- /**
1016
- * If `true`, hitting escape will not fire the `onClose` callback.
1017
- * @default false
1018
- */
1019
- disableEscapeKeyDown: e.bool,
1020
- /**
1021
- * The `children` will be under the DOM hierarchy of the parent component.
1022
- * @default false
1023
- */
1024
- disablePortal: e.bool,
1025
- /**
1026
- * If `true`, the modal will not restore focus to previously focused element once
1027
- * modal is hidden or unmounted.
1028
- * @default false
1029
- */
1030
- disableRestoreFocus: e.bool,
1031
- /**
1032
- * Disable the scroll lock behavior.
1033
- * @default false
1034
- */
1035
- disableScrollLock: e.bool,
1036
- /**
1037
- * If `true`, the backdrop is not rendered.
1038
- * @default false
1039
- */
1040
- hideBackdrop: e.bool,
1041
- /**
1042
- * Always keep the children in the DOM.
1043
- * This prop can be useful in SEO situation or
1044
- * when you want to maximize the responsiveness of the Modal.
1045
- * @default false
1046
- */
1047
- keepMounted: e.bool,
1048
- /**
1049
- * Callback fired when the backdrop is clicked.
1050
- * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
1051
- */
1052
- onBackdropClick: e.func,
1053
- /**
1054
- * Callback fired when the component requests to be closed.
1055
- * The `reason` parameter can optionally be used to control the response to `onClose`.
1056
- *
1057
- * @param {object} event The event source of the callback.
1058
- * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
1059
- */
1060
- onClose: e.func,
1061
- /**
1062
- * A function called when a transition enters.
1063
- */
1064
- onTransitionEnter: e.func,
1065
- /**
1066
- * A function called when a transition has exited.
1067
- */
1068
- onTransitionExited: e.func,
1069
- /**
1070
- * If `true`, the component is shown.
1071
- */
1072
- open: e.bool.isRequired,
1073
- /**
1074
- * The props used for each slot inside the Modal.
1075
- * @default {}
1076
- */
1077
- slotProps: e.shape({
1078
- backdrop: e.oneOfType([e.func, e.object]),
1079
- root: e.oneOfType([e.func, e.object])
1080
- }),
1081
- /**
1082
- * The components used for each slot inside the Modal.
1083
- * Either a string to use a HTML element or a component.
1084
- * @default {}
1085
- */
1086
- slots: e.shape({
1087
- backdrop: e.elementType,
1088
- root: e.elementType
1089
- }),
1090
- /**
1091
- * The system prop that allows defining system overrides as well as additional CSS styles.
1092
- */
1093
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
1094
- });
1095
- function it(t) {
1096
- return Z("MuiPaper", t);
1097
- }
1098
- Q("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"]);
1099
- const at = (t) => {
1100
- const {
1101
- square: n,
1102
- elevation: r,
1103
- variant: o,
1104
- classes: i
1105
- } = t, s = {
1106
- root: ["root", o, !n && "rounded", o === "elevation" && `elevation${r}`]
1107
- };
1108
- return te(s, it, i);
1109
- }, ct = G("div", {
1110
- name: "MuiPaper",
1111
- slot: "Root",
1112
- overridesResolver: (t, n) => {
1113
- const {
1114
- ownerState: r
1115
- } = t;
1116
- return [n.root, n[r.variant], !r.square && n.rounded, r.variant === "elevation" && n[`elevation${r.elevation}`]];
1117
- }
1118
- })(be(({
1119
- theme: t
1120
- }) => ({
1121
- backgroundColor: (t.vars || t).palette.background.paper,
1122
- color: (t.vars || t).palette.text.primary,
1123
- transition: t.transitions.create("box-shadow"),
1124
- variants: [{
1125
- props: ({
1126
- ownerState: n
1127
- }) => !n.square,
1128
- style: {
1129
- borderRadius: t.shape.borderRadius
1130
- }
1131
- }, {
1132
- props: {
1133
- variant: "outlined"
1134
- },
1135
- style: {
1136
- border: `1px solid ${(t.vars || t).palette.divider}`
1137
- }
1138
- }, {
1139
- props: {
1140
- variant: "elevation"
1141
- },
1142
- style: {
1143
- boxShadow: "var(--Paper-shadow)",
1144
- backgroundImage: "var(--Paper-overlay)"
1145
- }
1146
- }]
1147
- }))), lt = /* @__PURE__ */ p.forwardRef(function(n, r) {
1148
- var b;
1149
- const o = ee({
1150
- props: n,
1151
- name: "MuiPaper"
1152
- }), i = he(), {
1153
- className: s,
1154
- component: c = "div",
1155
- elevation: a = 1,
1156
- square: f = !1,
1157
- variant: y = "elevation",
1158
- ...g
1159
- } = o, h = {
1160
- ...o,
1161
- component: c,
1162
- elevation: a,
1163
- square: f,
1164
- variant: y
1165
- }, T = at(h);
1166
- return process.env.NODE_ENV !== "production" && i.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(`
1167
- `)), /* @__PURE__ */ A(ct, {
1168
- as: c,
1169
- ownerState: h,
1170
- className: _(T.root, s),
1171
- ref: r,
1172
- ...g,
1173
- style: {
1174
- ...y === "elevation" && {
1175
- "--Paper-shadow": (i.vars || i).shadows[a],
1176
- ...i.vars && {
1177
- "--Paper-overlay": (b = i.vars.overlays) == null ? void 0 : b[a]
1178
- },
1179
- ...!i.vars && i.palette.mode === "dark" && {
1180
- "--Paper-overlay": `linear-gradient(${ae("#fff", ce(a))}, ${ae("#fff", ce(a))})`
1181
- }
1182
- },
1183
- ...g.style
1184
- }
1185
- });
1186
- });
1187
- process.env.NODE_ENV !== "production" && (lt.propTypes = {
1188
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1189
- // │ These PropTypes are generated from the TypeScript type definitions. │
1190
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1191
- // └─────────────────────────────────────────────────────────────────────┘
1192
- /**
1193
- * The content of the component.
1194
- */
1195
- children: e.node,
1196
- /**
1197
- * Override or extend the styles applied to the component.
1198
- */
1199
- classes: e.object,
1200
- /**
1201
- * @ignore
1202
- */
1203
- className: e.string,
1204
- /**
1205
- * The component used for the root node.
1206
- * Either a string to use a HTML element or a component.
1207
- */
1208
- component: e.elementType,
1209
- /**
1210
- * Shadow depth, corresponds to `dp` in the spec.
1211
- * It accepts values between 0 and 24 inclusive.
1212
- * @default 1
1213
- */
1214
- elevation: Ae(Fe, (t) => {
1215
- const {
1216
- elevation: n,
1217
- variant: r
1218
- } = t;
1219
- return n > 0 && r === "outlined" ? new Error(`MUI: Combining \`elevation={${n}}\` with \`variant="${r}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`) : null;
1220
- }),
1221
- /**
1222
- * If `true`, rounded corners are disabled.
1223
- * @default false
1224
- */
1225
- square: e.bool,
1226
- /**
1227
- * @ignore
1228
- */
1229
- style: e.object,
1230
- /**
1231
- * The system prop that allows defining system overrides as well as additional CSS styles.
1232
- */
1233
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1234
- /**
1235
- * The variant to use.
1236
- * @default 'elevation'
1237
- */
1238
- variant: e.oneOfType([e.oneOf(["elevation", "outlined"]), e.string])
1239
- });
1240
- export {
1241
- Ee as B,
1242
- ye as F,
1243
- st as M,
1244
- lt as P,
1245
- De as g,
1246
- H as o
1247
- };