@hiver/connector-admin 0.0.1
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/README.md +50 -0
- package/dist/Typography-CW9ecUn7.js +174 -0
- package/dist/app/connectors/index.d.ts +3 -0
- package/dist/app/connectors/index.d.ts.map +1 -0
- package/dist/app/connectors/pages/connector-view/agent/index.d.ts +2 -0
- package/dist/app/connectors/pages/connector-view/agent/index.d.ts.map +1 -0
- package/dist/app/connectors/pages/connector-view/dashboard/__tests__/dashboard.test.d.ts +2 -0
- package/dist/app/connectors/pages/connector-view/dashboard/__tests__/dashboard.test.d.ts.map +1 -0
- package/dist/app/connectors/pages/connector-view/dashboard/index.d.ts +3 -0
- package/dist/app/connectors/pages/connector-view/dashboard/index.d.ts.map +1 -0
- package/dist/app/connectors/pages/connector-view/dashboard/styles.d.ts +24 -0
- package/dist/app/connectors/pages/connector-view/dashboard/styles.d.ts.map +1 -0
- package/dist/app/connectors/pages/connector-view/index.d.ts +3 -0
- package/dist/app/connectors/pages/connector-view/index.d.ts.map +1 -0
- package/dist/app/connectors/pages/settings/connector-config/__tests__/connector-config.test.d.ts +2 -0
- package/dist/app/connectors/pages/settings/connector-config/__tests__/connector-config.test.d.ts.map +1 -0
- package/dist/app/connectors/pages/settings/connector-config/index.d.ts +2 -0
- package/dist/app/connectors/pages/settings/connector-config/index.d.ts.map +1 -0
- package/dist/app/connectors/pages/settings/connector-config/style.d.ts +5 -0
- package/dist/app/connectors/pages/settings/connector-config/style.d.ts.map +1 -0
- package/dist/app/connectors/pages/settings/index.d.ts +2 -0
- package/dist/app/connectors/pages/settings/index.d.ts.map +1 -0
- package/dist/app/connectors/pages/settings/styles.d.ts +4 -0
- package/dist/app/connectors/pages/settings/styles.d.ts.map +1 -0
- package/dist/app/connectors/provider.d.ts +7 -0
- package/dist/app/connectors/provider.d.ts.map +1 -0
- package/dist/app/connectors/router.d.ts +3 -0
- package/dist/app/connectors/router.d.ts.map +1 -0
- package/dist/app/index.d.ts +2 -0
- package/dist/app/index.d.ts.map +1 -0
- package/dist/components/layouts/__tests__/sidebar.test.d.ts +2 -0
- package/dist/components/layouts/__tests__/sidebar.test.d.ts.map +1 -0
- package/dist/components/layouts/sidebar/index.d.ts +7 -0
- package/dist/components/layouts/sidebar/index.d.ts.map +1 -0
- package/dist/components/layouts/sidebar/styles.d.ts +7 -0
- package/dist/components/layouts/sidebar/styles.d.ts.map +1 -0
- package/dist/components/ui/bread-crumbs/__tests__/bread-crumb.test.d.ts +2 -0
- package/dist/components/ui/bread-crumbs/__tests__/bread-crumb.test.d.ts.map +1 -0
- package/dist/components/ui/bread-crumbs/index.d.ts +3 -0
- package/dist/components/ui/bread-crumbs/index.d.ts.map +1 -0
- package/dist/components/ui/bread-crumbs/styles.d.ts +6 -0
- package/dist/components/ui/bread-crumbs/styles.d.ts.map +1 -0
- package/dist/components/ui/modal/__tests__/modal.test.d.ts +2 -0
- package/dist/components/ui/modal/__tests__/modal.test.d.ts.map +1 -0
- package/dist/components/ui/modal/index.d.ts +10 -0
- package/dist/components/ui/modal/index.d.ts.map +1 -0
- package/dist/components/ui/styled-ui-components.d.ts +6 -0
- package/dist/components/ui/styled-ui-components.d.ts.map +1 -0
- package/dist/components/ui/text-field/index.d.ts +3 -0
- package/dist/components/ui/text-field/index.d.ts.map +1 -0
- package/dist/constants/api.d.ts +12 -0
- package/dist/constants/api.d.ts.map +1 -0
- package/dist/constants/bread-crumbs.d.ts +5 -0
- package/dist/constants/bread-crumbs.d.ts.map +1 -0
- package/dist/constants/modal.d.ts +4 -0
- package/dist/constants/modal.d.ts.map +1 -0
- package/dist/constants/router-paths.d.ts +9 -0
- package/dist/constants/router-paths.d.ts.map +1 -0
- package/dist/constants/sidebar.d.ts +7 -0
- package/dist/constants/sidebar.d.ts.map +1 -0
- package/dist/context/index.d.ts +24 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/main-app-provider/index.d.ts +7 -0
- package/dist/context/main-app-provider/index.d.ts.map +1 -0
- package/dist/features/auth/components/auth.d.ts +2 -0
- package/dist/features/auth/components/auth.d.ts.map +1 -0
- package/dist/features/auth/constants/index.d.ts +2 -0
- package/dist/features/auth/constants/index.d.ts.map +1 -0
- package/dist/features/connector-library/api/index.d.ts +9 -0
- package/dist/features/connector-library/api/index.d.ts.map +1 -0
- package/dist/features/connector-library/components/api-library/index.d.ts +7 -0
- package/dist/features/connector-library/components/api-library/index.d.ts.map +1 -0
- package/dist/features/connector-library/components/api-library/styles.d.ts +4 -0
- package/dist/features/connector-library/components/api-library/styles.d.ts.map +1 -0
- package/dist/features/connector-library/components/api-library-skeleton/index.d.ts +2 -0
- package/dist/features/connector-library/components/api-library-skeleton/index.d.ts.map +1 -0
- package/dist/features/connector-library/components/api-library-skeleton/styles.d.ts +4 -0
- package/dist/features/connector-library/components/api-library-skeleton/styles.d.ts.map +1 -0
- package/dist/features/connector-library/components/connector-enabled-modal/index.d.ts +9 -0
- package/dist/features/connector-library/components/connector-enabled-modal/index.d.ts.map +1 -0
- package/dist/features/connector-library/components/connector-enabled-modal/styles.d.ts +4 -0
- package/dist/features/connector-library/components/connector-enabled-modal/styles.d.ts.map +1 -0
- package/dist/features/connector-library/components/library-card-list/__tests__/library-card-list.test.d.ts +2 -0
- package/dist/features/connector-library/components/library-card-list/__tests__/library-card-list.test.d.ts.map +1 -0
- package/dist/features/connector-library/components/library-card-list/index.d.ts +3 -0
- package/dist/features/connector-library/components/library-card-list/index.d.ts.map +1 -0
- package/dist/features/connector-library/components/library-card-list/styles.d.ts +10 -0
- package/dist/features/connector-library/components/library-card-list/styles.d.ts.map +1 -0
- package/dist/features/connector-library/components/library-card-skeleton/index.d.ts +2 -0
- package/dist/features/connector-library/components/library-card-skeleton/index.d.ts.map +1 -0
- package/dist/features/connector-library/components/library-card-skeleton/styles.d.ts +4 -0
- package/dist/features/connector-library/components/library-card-skeleton/styles.d.ts.map +1 -0
- package/dist/features/connector-library/components/library-edit-list/index.d.ts +2 -0
- package/dist/features/connector-library/components/library-edit-list/index.d.ts.map +1 -0
- package/dist/features/connector-library/components/library-edit-list/styles.d.ts +2 -0
- package/dist/features/connector-library/components/library-edit-list/styles.d.ts.map +1 -0
- package/dist/features/connector-library/constants/api-library.d.ts +3 -0
- package/dist/features/connector-library/constants/api-library.d.ts.map +1 -0
- package/dist/features/connector-library/constants/api.d.ts +5 -0
- package/dist/features/connector-library/constants/api.d.ts.map +1 -0
- package/dist/features/connector-library/constants/content-page.d.ts +5 -0
- package/dist/features/connector-library/constants/content-page.d.ts.map +1 -0
- package/dist/features/connector-library/store/initial-state.d.ts +22 -0
- package/dist/features/connector-library/store/initial-state.d.ts.map +1 -0
- package/dist/features/connector-library/store/selectors.d.ts +18 -0
- package/dist/features/connector-library/store/selectors.d.ts.map +1 -0
- package/dist/features/connector-library/store/slice.d.ts +78 -0
- package/dist/features/connector-library/store/slice.d.ts.map +1 -0
- package/dist/features/connector-library/types/connector.d.ts +54 -0
- package/dist/features/connector-library/types/connector.d.ts.map +1 -0
- package/dist/features/connector-library/utils/type-guards.d.ts +7 -0
- package/dist/features/connector-library/utils/type-guards.d.ts.map +1 -0
- package/dist/features/request-new-connector/components/custom-connector-card/__tests__/custom-connector-card.test.d.ts +2 -0
- package/dist/features/request-new-connector/components/custom-connector-card/__tests__/custom-connector-card.test.d.ts.map +1 -0
- package/dist/features/request-new-connector/components/custom-connector-card/index.d.ts +9 -0
- package/dist/features/request-new-connector/components/custom-connector-card/index.d.ts.map +1 -0
- package/dist/features/request-new-connector/components/custom-connector-card/style.d.ts +10 -0
- package/dist/features/request-new-connector/components/custom-connector-card/style.d.ts.map +1 -0
- package/dist/features/request-new-connector/components/request-new-card/index.d.ts +7 -0
- package/dist/features/request-new-connector/components/request-new-card/index.d.ts.map +1 -0
- package/dist/features/request-new-connector/components/request-new-card/styles.d.ts +22 -0
- package/dist/features/request-new-connector/components/request-new-card/styles.d.ts.map +1 -0
- package/dist/features/request-new-connector/components/request-new-modal/__tests__/request-new-modal.test.d.ts +2 -0
- package/dist/features/request-new-connector/components/request-new-modal/__tests__/request-new-modal.test.d.ts.map +1 -0
- package/dist/features/request-new-connector/components/request-new-modal/index.d.ts +8 -0
- package/dist/features/request-new-connector/components/request-new-modal/index.d.ts.map +1 -0
- package/dist/features/request-new-connector/components/request-new-modal/request-panel.d.ts +13 -0
- package/dist/features/request-new-connector/components/request-new-modal/request-panel.d.ts.map +1 -0
- package/dist/features/request-new-connector/components/request-new-modal/styles.d.ts +4 -0
- package/dist/features/request-new-connector/components/request-new-modal/styles.d.ts.map +1 -0
- package/dist/features/request-new-connector/components/request-new-modal/submitted-panel.d.ts +7 -0
- package/dist/features/request-new-connector/components/request-new-modal/submitted-panel.d.ts.map +1 -0
- package/dist/features/request-new-connector/constants/index.d.ts +21 -0
- package/dist/features/request-new-connector/constants/index.d.ts.map +1 -0
- package/dist/features/request-new-connector/types/index.d.ts +5 -0
- package/dist/features/request-new-connector/types/index.d.ts.map +1 -0
- package/dist/features/settings/components/auth/auth.d.ts +2 -0
- package/dist/features/settings/components/auth/auth.d.ts.map +1 -0
- package/dist/features/settings/constants/auth.d.ts +2 -0
- package/dist/features/settings/constants/auth.d.ts.map +1 -0
- package/dist/index-BaRBVtu0.js +39 -0
- package/dist/index-C47HiJVp.js +68 -0
- package/dist/index-CJMPXxRz.js +52 -0
- package/dist/index-DTpk0Iib.js +29155 -0
- package/dist/index-Dji7oatk.js +3356 -0
- package/dist/index-DxrxS1sg.js +5 -0
- package/dist/index-IXLZm0uz.js +2954 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +7 -0
- package/dist/index.umd.js +2549 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/mockServiceWorker.js +280 -0
- package/dist/store/counter/initial-state.d.ts +6 -0
- package/dist/store/counter/initial-state.d.ts.map +1 -0
- package/dist/store/counter/selectors.d.ts +4 -0
- package/dist/store/counter/selectors.d.ts.map +1 -0
- package/dist/store/counter/slice.d.ts +23 -0
- package/dist/store/counter/slice.d.ts.map +1 -0
- package/dist/store/hooks.d.ts +9 -0
- package/dist/store/hooks.d.ts.map +1 -0
- package/dist/store/index.d.ts +22 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/testing/mocks/browser.d.ts +2 -0
- package/dist/testing/mocks/browser.d.ts.map +1 -0
- package/dist/testing/mocks/handlers/bifrost-token.d.ts +2 -0
- package/dist/testing/mocks/handlers/bifrost-token.d.ts.map +1 -0
- package/dist/testing/mocks/handlers/connector-template.d.ts +2 -0
- package/dist/testing/mocks/handlers/connector-template.d.ts.map +1 -0
- package/dist/testing/mocks/handlers/update-connector.d.ts +2 -0
- package/dist/testing/mocks/handlers/update-connector.d.ts.map +1 -0
- package/dist/testing/mocks/handlers.d.ts +2 -0
- package/dist/testing/mocks/handlers.d.ts.map +1 -0
- package/dist/testing/mocks/server.d.ts +2 -0
- package/dist/testing/mocks/server.d.ts.map +1 -0
- package/dist/testing/setup-store.d.ts +11 -0
- package/dist/testing/setup-store.d.ts.map +1 -0
- package/dist/testing/setup-test.d.ts +1 -0
- package/dist/testing/setup-test.d.ts.map +1 -0
- package/dist/testing/test-utils.d.ts +69 -0
- package/dist/testing/test-utils.d.ts.map +1 -0
- package/dist/theme.d.ts +3 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/types/api.d.ts +2 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/router.d.ts +4 -0
- package/dist/types/router.d.ts.map +1 -0
- package/dist/types/sidebar.d.ts +8 -0
- package/dist/types/sidebar.d.ts.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,2954 @@
|
|
|
1
|
+
import { $ as Jo, a0 as eo, a1 as er, f as qe, g as ze, k as Oe, a2 as to, j as R, a3 as tr, _ as T, y as or, P as r, a4 as ut, E as bt, o as kt, a5 as oo, a6 as rr, m as Xe, s as M, i as yt, p as nr, D as ar, b as xo, a7 as ir, l as ye, h as le, a8 as Oo, a9 as ro, n as ft, H as sr, aa as cr, ab as nt, u as lr, d as no, ac as pr, ad as ao, ae as at, af as dr, ag as ur, ah as fr, ai as hr, aj as mr, ak as vr, B as At, K as Lt, S as ht, W as To, L as gr, Z as br, Y as yr, U as it, I as wr, R as xr, al as Or, T as Tr, V as Er } from "./index-DTpk0Iib.js";
|
|
2
|
+
import * as j from "react";
|
|
3
|
+
import Cr, { useRef as Pr, useEffect as Rr } from "react";
|
|
4
|
+
import { T as Eo } from "./Typography-CW9ecUn7.js";
|
|
5
|
+
function kr(e, t = 0, o = 1) {
|
|
6
|
+
return process.env.NODE_ENV !== "production" && (e < t || e > o) && console.error(`MUI: The value provided ${e} is out of range [${t}, ${o}].`), Jo(e, t, o);
|
|
7
|
+
}
|
|
8
|
+
function Lr(e) {
|
|
9
|
+
e = e.slice(1);
|
|
10
|
+
const t = new RegExp(`.{1,${e.length >= 6 ? 2 : 1}}`, "g");
|
|
11
|
+
let o = e.match(t);
|
|
12
|
+
return o && o[0].length === 1 && (o = o.map((n) => n + n)), o ? `rgb${o.length === 4 ? "a" : ""}(${o.map((n, a) => a < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1e3) / 1e3).join(", ")})` : "";
|
|
13
|
+
}
|
|
14
|
+
function Co(e) {
|
|
15
|
+
if (e.type)
|
|
16
|
+
return e;
|
|
17
|
+
if (e.charAt(0) === "#")
|
|
18
|
+
return Co(Lr(e));
|
|
19
|
+
const t = e.indexOf("("), o = e.substring(0, t);
|
|
20
|
+
if (["rgb", "rgba", "hsl", "hsla", "color"].indexOf(o) === -1)
|
|
21
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: Unsupported \`${e}\` color.
|
|
22
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : eo(9, e));
|
|
23
|
+
let n = e.substring(t + 1, e.length - 1), a;
|
|
24
|
+
if (o === "color") {
|
|
25
|
+
if (n = n.split(" "), a = n.shift(), n.length === 4 && n[3].charAt(0) === "/" && (n[3] = n[3].slice(1)), ["srgb", "display-p3", "a98-rgb", "prophoto-rgb", "rec-2020"].indexOf(a) === -1)
|
|
26
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: unsupported \`${a}\` color space.
|
|
27
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : eo(10, a));
|
|
28
|
+
} else
|
|
29
|
+
n = n.split(",");
|
|
30
|
+
return n = n.map((i) => parseFloat(i)), {
|
|
31
|
+
type: o,
|
|
32
|
+
values: n,
|
|
33
|
+
colorSpace: a
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function $r(e) {
|
|
37
|
+
const {
|
|
38
|
+
type: t,
|
|
39
|
+
colorSpace: o
|
|
40
|
+
} = e;
|
|
41
|
+
let {
|
|
42
|
+
values: n
|
|
43
|
+
} = e;
|
|
44
|
+
return t.indexOf("rgb") !== -1 ? n = n.map((a, i) => i < 3 ? parseInt(a, 10) : a) : t.indexOf("hsl") !== -1 && (n[1] = `${n[1]}%`, n[2] = `${n[2]}%`), t.indexOf("color") !== -1 ? n = `${o} ${n.join(" ")}` : n = `${n.join(", ")}`, `${t}(${n})`;
|
|
45
|
+
}
|
|
46
|
+
function jr(e, t) {
|
|
47
|
+
return e = Co(e), t = kr(t), (e.type === "rgb" || e.type === "hsl") && (e.type += "a"), e.type === "color" ? e.values[3] = `/${t}` : e.values[3] = t, $r(e);
|
|
48
|
+
}
|
|
49
|
+
function Sr(e) {
|
|
50
|
+
return String(e).match(/[\d.\-+]*\s*(.*)/)[1] || "";
|
|
51
|
+
}
|
|
52
|
+
function Ar(e) {
|
|
53
|
+
return parseFloat(e);
|
|
54
|
+
}
|
|
55
|
+
var Dt = {};
|
|
56
|
+
Object.defineProperty(Dt, "__esModule", {
|
|
57
|
+
value: !0
|
|
58
|
+
});
|
|
59
|
+
var Po = Dt.default = void 0, Dr = _r(Cr), Nr = er;
|
|
60
|
+
function Ro(e) {
|
|
61
|
+
if (typeof WeakMap != "function") return null;
|
|
62
|
+
var t = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap();
|
|
63
|
+
return (Ro = function(n) {
|
|
64
|
+
return n ? o : t;
|
|
65
|
+
})(e);
|
|
66
|
+
}
|
|
67
|
+
function _r(e, t) {
|
|
68
|
+
if (e && e.__esModule) return e;
|
|
69
|
+
if (e === null || typeof e != "object" && typeof e != "function") return { default: e };
|
|
70
|
+
var o = Ro(t);
|
|
71
|
+
if (o && o.has(e)) return o.get(e);
|
|
72
|
+
var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
73
|
+
for (var i in e) if (i !== "default" && Object.prototype.hasOwnProperty.call(e, i)) {
|
|
74
|
+
var l = a ? Object.getOwnPropertyDescriptor(e, i) : null;
|
|
75
|
+
l && (l.get || l.set) ? Object.defineProperty(n, i, l) : n[i] = e[i];
|
|
76
|
+
}
|
|
77
|
+
return n.default = e, o && o.set(e, n), n;
|
|
78
|
+
}
|
|
79
|
+
function Mr(e) {
|
|
80
|
+
return Object.keys(e).length === 0;
|
|
81
|
+
}
|
|
82
|
+
function Br(e = null) {
|
|
83
|
+
const t = Dr.useContext(Nr.ThemeContext);
|
|
84
|
+
return !t || Mr(t) ? e : t;
|
|
85
|
+
}
|
|
86
|
+
Po = Dt.default = Br;
|
|
87
|
+
var H = "top", J = "bottom", ee = "right", q = "left", Nt = "auto", Ye = [H, J, ee, q], Le = "start", Ve = "end", Ir = "clippingParents", ko = "viewport", Ie = "popper", Wr = "reference", io = /* @__PURE__ */ Ye.reduce(function(e, t) {
|
|
88
|
+
return e.concat([t + "-" + Le, t + "-" + Ve]);
|
|
89
|
+
}, []), Lo = /* @__PURE__ */ [].concat(Ye, [Nt]).reduce(function(e, t) {
|
|
90
|
+
return e.concat([t, t + "-" + Le, t + "-" + Ve]);
|
|
91
|
+
}, []), Ur = "beforeRead", Fr = "read", Vr = "afterRead", Hr = "beforeMain", qr = "main", zr = "afterMain", Xr = "beforeWrite", Yr = "write", Qr = "afterWrite", Gr = [Ur, Fr, Vr, Hr, qr, zr, Xr, Yr, Qr];
|
|
92
|
+
function ae(e) {
|
|
93
|
+
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
94
|
+
}
|
|
95
|
+
function Y(e) {
|
|
96
|
+
if (e == null)
|
|
97
|
+
return window;
|
|
98
|
+
if (e.toString() !== "[object Window]") {
|
|
99
|
+
var t = e.ownerDocument;
|
|
100
|
+
return t && t.defaultView || window;
|
|
101
|
+
}
|
|
102
|
+
return e;
|
|
103
|
+
}
|
|
104
|
+
function xe(e) {
|
|
105
|
+
var t = Y(e).Element;
|
|
106
|
+
return e instanceof t || e instanceof Element;
|
|
107
|
+
}
|
|
108
|
+
function K(e) {
|
|
109
|
+
var t = Y(e).HTMLElement;
|
|
110
|
+
return e instanceof t || e instanceof HTMLElement;
|
|
111
|
+
}
|
|
112
|
+
function _t(e) {
|
|
113
|
+
if (typeof ShadowRoot > "u")
|
|
114
|
+
return !1;
|
|
115
|
+
var t = Y(e).ShadowRoot;
|
|
116
|
+
return e instanceof t || e instanceof ShadowRoot;
|
|
117
|
+
}
|
|
118
|
+
function Zr(e) {
|
|
119
|
+
var t = e.state;
|
|
120
|
+
Object.keys(t.elements).forEach(function(o) {
|
|
121
|
+
var n = t.styles[o] || {}, a = t.attributes[o] || {}, i = t.elements[o];
|
|
122
|
+
!K(i) || !ae(i) || (Object.assign(i.style, n), Object.keys(a).forEach(function(l) {
|
|
123
|
+
var c = a[l];
|
|
124
|
+
c === !1 ? i.removeAttribute(l) : i.setAttribute(l, c === !0 ? "" : c);
|
|
125
|
+
}));
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function Kr(e) {
|
|
129
|
+
var t = e.state, o = {
|
|
130
|
+
popper: {
|
|
131
|
+
position: t.options.strategy,
|
|
132
|
+
left: "0",
|
|
133
|
+
top: "0",
|
|
134
|
+
margin: "0"
|
|
135
|
+
},
|
|
136
|
+
arrow: {
|
|
137
|
+
position: "absolute"
|
|
138
|
+
},
|
|
139
|
+
reference: {}
|
|
140
|
+
};
|
|
141
|
+
return Object.assign(t.elements.popper.style, o.popper), t.styles = o, t.elements.arrow && Object.assign(t.elements.arrow.style, o.arrow), function() {
|
|
142
|
+
Object.keys(t.elements).forEach(function(n) {
|
|
143
|
+
var a = t.elements[n], i = t.attributes[n] || {}, l = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : o[n]), c = l.reduce(function(s, d) {
|
|
144
|
+
return s[d] = "", s;
|
|
145
|
+
}, {});
|
|
146
|
+
!K(a) || !ae(a) || (Object.assign(a.style, c), Object.keys(i).forEach(function(s) {
|
|
147
|
+
a.removeAttribute(s);
|
|
148
|
+
}));
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
const Jr = {
|
|
153
|
+
name: "applyStyles",
|
|
154
|
+
enabled: !0,
|
|
155
|
+
phase: "write",
|
|
156
|
+
fn: Zr,
|
|
157
|
+
effect: Kr,
|
|
158
|
+
requires: ["computeStyles"]
|
|
159
|
+
};
|
|
160
|
+
function ne(e) {
|
|
161
|
+
return e.split("-")[0];
|
|
162
|
+
}
|
|
163
|
+
var we = Math.max, mt = Math.min, $e = Math.round;
|
|
164
|
+
function $t() {
|
|
165
|
+
var e = navigator.userAgentData;
|
|
166
|
+
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
167
|
+
return t.brand + "/" + t.version;
|
|
168
|
+
}).join(" ") : navigator.userAgent;
|
|
169
|
+
}
|
|
170
|
+
function $o() {
|
|
171
|
+
return !/^((?!chrome|android).)*safari/i.test($t());
|
|
172
|
+
}
|
|
173
|
+
function je(e, t, o) {
|
|
174
|
+
t === void 0 && (t = !1), o === void 0 && (o = !1);
|
|
175
|
+
var n = e.getBoundingClientRect(), a = 1, i = 1;
|
|
176
|
+
t && K(e) && (a = e.offsetWidth > 0 && $e(n.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && $e(n.height) / e.offsetHeight || 1);
|
|
177
|
+
var l = xe(e) ? Y(e) : window, c = l.visualViewport, s = !$o() && o, d = (n.left + (s && c ? c.offsetLeft : 0)) / a, p = (n.top + (s && c ? c.offsetTop : 0)) / i, f = n.width / a, y = n.height / i;
|
|
178
|
+
return {
|
|
179
|
+
width: f,
|
|
180
|
+
height: y,
|
|
181
|
+
top: p,
|
|
182
|
+
right: d + f,
|
|
183
|
+
bottom: p + y,
|
|
184
|
+
left: d,
|
|
185
|
+
x: d,
|
|
186
|
+
y: p
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function Mt(e) {
|
|
190
|
+
var t = je(e), o = e.offsetWidth, n = e.offsetHeight;
|
|
191
|
+
return Math.abs(t.width - o) <= 1 && (o = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
|
|
192
|
+
x: e.offsetLeft,
|
|
193
|
+
y: e.offsetTop,
|
|
194
|
+
width: o,
|
|
195
|
+
height: n
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function jo(e, t) {
|
|
199
|
+
var o = t.getRootNode && t.getRootNode();
|
|
200
|
+
if (e.contains(t))
|
|
201
|
+
return !0;
|
|
202
|
+
if (o && _t(o)) {
|
|
203
|
+
var n = t;
|
|
204
|
+
do {
|
|
205
|
+
if (n && e.isSameNode(n))
|
|
206
|
+
return !0;
|
|
207
|
+
n = n.parentNode || n.host;
|
|
208
|
+
} while (n);
|
|
209
|
+
}
|
|
210
|
+
return !1;
|
|
211
|
+
}
|
|
212
|
+
function pe(e) {
|
|
213
|
+
return Y(e).getComputedStyle(e);
|
|
214
|
+
}
|
|
215
|
+
function en(e) {
|
|
216
|
+
return ["table", "td", "th"].indexOf(ae(e)) >= 0;
|
|
217
|
+
}
|
|
218
|
+
function he(e) {
|
|
219
|
+
return ((xe(e) ? e.ownerDocument : (
|
|
220
|
+
// $FlowFixMe[prop-missing]
|
|
221
|
+
e.document
|
|
222
|
+
)) || window.document).documentElement;
|
|
223
|
+
}
|
|
224
|
+
function wt(e) {
|
|
225
|
+
return ae(e) === "html" ? e : (
|
|
226
|
+
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
227
|
+
// $FlowFixMe[incompatible-return]
|
|
228
|
+
// $FlowFixMe[prop-missing]
|
|
229
|
+
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
230
|
+
e.parentNode || // DOM Element detected
|
|
231
|
+
(_t(e) ? e.host : null) || // ShadowRoot detected
|
|
232
|
+
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
233
|
+
he(e)
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
function so(e) {
|
|
237
|
+
return !K(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
238
|
+
pe(e).position === "fixed" ? null : e.offsetParent;
|
|
239
|
+
}
|
|
240
|
+
function tn(e) {
|
|
241
|
+
var t = /firefox/i.test($t()), o = /Trident/i.test($t());
|
|
242
|
+
if (o && K(e)) {
|
|
243
|
+
var n = pe(e);
|
|
244
|
+
if (n.position === "fixed")
|
|
245
|
+
return null;
|
|
246
|
+
}
|
|
247
|
+
var a = wt(e);
|
|
248
|
+
for (_t(a) && (a = a.host); K(a) && ["html", "body"].indexOf(ae(a)) < 0; ) {
|
|
249
|
+
var i = pe(a);
|
|
250
|
+
if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || t && i.willChange === "filter" || t && i.filter && i.filter !== "none")
|
|
251
|
+
return a;
|
|
252
|
+
a = a.parentNode;
|
|
253
|
+
}
|
|
254
|
+
return null;
|
|
255
|
+
}
|
|
256
|
+
function Qe(e) {
|
|
257
|
+
for (var t = Y(e), o = so(e); o && en(o) && pe(o).position === "static"; )
|
|
258
|
+
o = so(o);
|
|
259
|
+
return o && (ae(o) === "html" || ae(o) === "body" && pe(o).position === "static") ? t : o || tn(e) || t;
|
|
260
|
+
}
|
|
261
|
+
function Bt(e) {
|
|
262
|
+
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
263
|
+
}
|
|
264
|
+
function Ue(e, t, o) {
|
|
265
|
+
return we(e, mt(t, o));
|
|
266
|
+
}
|
|
267
|
+
function on(e, t, o) {
|
|
268
|
+
var n = Ue(e, t, o);
|
|
269
|
+
return n > o ? o : n;
|
|
270
|
+
}
|
|
271
|
+
function So() {
|
|
272
|
+
return {
|
|
273
|
+
top: 0,
|
|
274
|
+
right: 0,
|
|
275
|
+
bottom: 0,
|
|
276
|
+
left: 0
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
function Ao(e) {
|
|
280
|
+
return Object.assign({}, So(), e);
|
|
281
|
+
}
|
|
282
|
+
function Do(e, t) {
|
|
283
|
+
return t.reduce(function(o, n) {
|
|
284
|
+
return o[n] = e, o;
|
|
285
|
+
}, {});
|
|
286
|
+
}
|
|
287
|
+
var rn = function(t, o) {
|
|
288
|
+
return t = typeof t == "function" ? t(Object.assign({}, o.rects, {
|
|
289
|
+
placement: o.placement
|
|
290
|
+
})) : t, Ao(typeof t != "number" ? t : Do(t, Ye));
|
|
291
|
+
};
|
|
292
|
+
function nn(e) {
|
|
293
|
+
var t, o = e.state, n = e.name, a = e.options, i = o.elements.arrow, l = o.modifiersData.popperOffsets, c = ne(o.placement), s = Bt(c), d = [q, ee].indexOf(c) >= 0, p = d ? "height" : "width";
|
|
294
|
+
if (!(!i || !l)) {
|
|
295
|
+
var f = rn(a.padding, o), y = Mt(i), m = s === "y" ? H : q, P = s === "y" ? J : ee, g = o.rects.reference[p] + o.rects.reference[s] - l[s] - o.rects.popper[p], w = l[s] - o.rects.reference[s], O = Qe(i), u = O ? s === "y" ? O.clientHeight || 0 : O.clientWidth || 0 : 0, v = g / 2 - w / 2, h = f[m], x = u - y[p] - f[P], b = u / 2 - y[p] / 2 + v, C = Ue(h, b, x), L = s;
|
|
296
|
+
o.modifiersData[n] = (t = {}, t[L] = C, t.centerOffset = C - b, t);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
function an(e) {
|
|
300
|
+
var t = e.state, o = e.options, n = o.element, a = n === void 0 ? "[data-popper-arrow]" : n;
|
|
301
|
+
a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || jo(t.elements.popper, a) && (t.elements.arrow = a));
|
|
302
|
+
}
|
|
303
|
+
const sn = {
|
|
304
|
+
name: "arrow",
|
|
305
|
+
enabled: !0,
|
|
306
|
+
phase: "main",
|
|
307
|
+
fn: nn,
|
|
308
|
+
effect: an,
|
|
309
|
+
requires: ["popperOffsets"],
|
|
310
|
+
requiresIfExists: ["preventOverflow"]
|
|
311
|
+
};
|
|
312
|
+
function Se(e) {
|
|
313
|
+
return e.split("-")[1];
|
|
314
|
+
}
|
|
315
|
+
var cn = {
|
|
316
|
+
top: "auto",
|
|
317
|
+
right: "auto",
|
|
318
|
+
bottom: "auto",
|
|
319
|
+
left: "auto"
|
|
320
|
+
};
|
|
321
|
+
function ln(e, t) {
|
|
322
|
+
var o = e.x, n = e.y, a = t.devicePixelRatio || 1;
|
|
323
|
+
return {
|
|
324
|
+
x: $e(o * a) / a || 0,
|
|
325
|
+
y: $e(n * a) / a || 0
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
function co(e) {
|
|
329
|
+
var t, o = e.popper, n = e.popperRect, a = e.placement, i = e.variation, l = e.offsets, c = e.position, s = e.gpuAcceleration, d = e.adaptive, p = e.roundOffsets, f = e.isFixed, y = l.x, m = y === void 0 ? 0 : y, P = l.y, g = P === void 0 ? 0 : P, w = typeof p == "function" ? p({
|
|
330
|
+
x: m,
|
|
331
|
+
y: g
|
|
332
|
+
}) : {
|
|
333
|
+
x: m,
|
|
334
|
+
y: g
|
|
335
|
+
};
|
|
336
|
+
m = w.x, g = w.y;
|
|
337
|
+
var O = l.hasOwnProperty("x"), u = l.hasOwnProperty("y"), v = q, h = H, x = window;
|
|
338
|
+
if (d) {
|
|
339
|
+
var b = Qe(o), C = "clientHeight", L = "clientWidth";
|
|
340
|
+
if (b === Y(o) && (b = he(o), pe(b).position !== "static" && c === "absolute" && (C = "scrollHeight", L = "scrollWidth")), b = b, a === H || (a === q || a === ee) && i === Ve) {
|
|
341
|
+
h = J;
|
|
342
|
+
var k = f && b === x && x.visualViewport ? x.visualViewport.height : (
|
|
343
|
+
// $FlowFixMe[prop-missing]
|
|
344
|
+
b[C]
|
|
345
|
+
);
|
|
346
|
+
g -= k - n.height, g *= s ? 1 : -1;
|
|
347
|
+
}
|
|
348
|
+
if (a === q || (a === H || a === J) && i === Ve) {
|
|
349
|
+
v = ee;
|
|
350
|
+
var $ = f && b === x && x.visualViewport ? x.visualViewport.width : (
|
|
351
|
+
// $FlowFixMe[prop-missing]
|
|
352
|
+
b[L]
|
|
353
|
+
);
|
|
354
|
+
m -= $ - n.width, m *= s ? 1 : -1;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
var S = Object.assign({
|
|
358
|
+
position: c
|
|
359
|
+
}, d && cn), I = p === !0 ? ln({
|
|
360
|
+
x: m,
|
|
361
|
+
y: g
|
|
362
|
+
}, Y(o)) : {
|
|
363
|
+
x: m,
|
|
364
|
+
y: g
|
|
365
|
+
};
|
|
366
|
+
if (m = I.x, g = I.y, s) {
|
|
367
|
+
var D;
|
|
368
|
+
return Object.assign({}, S, (D = {}, D[h] = u ? "0" : "", D[v] = O ? "0" : "", D.transform = (x.devicePixelRatio || 1) <= 1 ? "translate(" + m + "px, " + g + "px)" : "translate3d(" + m + "px, " + g + "px, 0)", D));
|
|
369
|
+
}
|
|
370
|
+
return Object.assign({}, S, (t = {}, t[h] = u ? g + "px" : "", t[v] = O ? m + "px" : "", t.transform = "", t));
|
|
371
|
+
}
|
|
372
|
+
function pn(e) {
|
|
373
|
+
var t = e.state, o = e.options, n = o.gpuAcceleration, a = n === void 0 ? !0 : n, i = o.adaptive, l = i === void 0 ? !0 : i, c = o.roundOffsets, s = c === void 0 ? !0 : c, d = {
|
|
374
|
+
placement: ne(t.placement),
|
|
375
|
+
variation: Se(t.placement),
|
|
376
|
+
popper: t.elements.popper,
|
|
377
|
+
popperRect: t.rects.popper,
|
|
378
|
+
gpuAcceleration: a,
|
|
379
|
+
isFixed: t.options.strategy === "fixed"
|
|
380
|
+
};
|
|
381
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, co(Object.assign({}, d, {
|
|
382
|
+
offsets: t.modifiersData.popperOffsets,
|
|
383
|
+
position: t.options.strategy,
|
|
384
|
+
adaptive: l,
|
|
385
|
+
roundOffsets: s
|
|
386
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, co(Object.assign({}, d, {
|
|
387
|
+
offsets: t.modifiersData.arrow,
|
|
388
|
+
position: "absolute",
|
|
389
|
+
adaptive: !1,
|
|
390
|
+
roundOffsets: s
|
|
391
|
+
})))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
392
|
+
"data-popper-placement": t.placement
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
const dn = {
|
|
396
|
+
name: "computeStyles",
|
|
397
|
+
enabled: !0,
|
|
398
|
+
phase: "beforeWrite",
|
|
399
|
+
fn: pn,
|
|
400
|
+
data: {}
|
|
401
|
+
};
|
|
402
|
+
var st = {
|
|
403
|
+
passive: !0
|
|
404
|
+
};
|
|
405
|
+
function un(e) {
|
|
406
|
+
var t = e.state, o = e.instance, n = e.options, a = n.scroll, i = a === void 0 ? !0 : a, l = n.resize, c = l === void 0 ? !0 : l, s = Y(t.elements.popper), d = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
407
|
+
return i && d.forEach(function(p) {
|
|
408
|
+
p.addEventListener("scroll", o.update, st);
|
|
409
|
+
}), c && s.addEventListener("resize", o.update, st), function() {
|
|
410
|
+
i && d.forEach(function(p) {
|
|
411
|
+
p.removeEventListener("scroll", o.update, st);
|
|
412
|
+
}), c && s.removeEventListener("resize", o.update, st);
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
const fn = {
|
|
416
|
+
name: "eventListeners",
|
|
417
|
+
enabled: !0,
|
|
418
|
+
phase: "write",
|
|
419
|
+
fn: function() {
|
|
420
|
+
},
|
|
421
|
+
effect: un,
|
|
422
|
+
data: {}
|
|
423
|
+
};
|
|
424
|
+
var hn = {
|
|
425
|
+
left: "right",
|
|
426
|
+
right: "left",
|
|
427
|
+
bottom: "top",
|
|
428
|
+
top: "bottom"
|
|
429
|
+
};
|
|
430
|
+
function dt(e) {
|
|
431
|
+
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
432
|
+
return hn[t];
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
var mn = {
|
|
436
|
+
start: "end",
|
|
437
|
+
end: "start"
|
|
438
|
+
};
|
|
439
|
+
function lo(e) {
|
|
440
|
+
return e.replace(/start|end/g, function(t) {
|
|
441
|
+
return mn[t];
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
function It(e) {
|
|
445
|
+
var t = Y(e), o = t.pageXOffset, n = t.pageYOffset;
|
|
446
|
+
return {
|
|
447
|
+
scrollLeft: o,
|
|
448
|
+
scrollTop: n
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
function Wt(e) {
|
|
452
|
+
return je(he(e)).left + It(e).scrollLeft;
|
|
453
|
+
}
|
|
454
|
+
function vn(e, t) {
|
|
455
|
+
var o = Y(e), n = he(e), a = o.visualViewport, i = n.clientWidth, l = n.clientHeight, c = 0, s = 0;
|
|
456
|
+
if (a) {
|
|
457
|
+
i = a.width, l = a.height;
|
|
458
|
+
var d = $o();
|
|
459
|
+
(d || !d && t === "fixed") && (c = a.offsetLeft, s = a.offsetTop);
|
|
460
|
+
}
|
|
461
|
+
return {
|
|
462
|
+
width: i,
|
|
463
|
+
height: l,
|
|
464
|
+
x: c + Wt(e),
|
|
465
|
+
y: s
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
function gn(e) {
|
|
469
|
+
var t, o = he(e), n = It(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, i = we(o.scrollWidth, o.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), l = we(o.scrollHeight, o.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), c = -n.scrollLeft + Wt(e), s = -n.scrollTop;
|
|
470
|
+
return pe(a || o).direction === "rtl" && (c += we(o.clientWidth, a ? a.clientWidth : 0) - i), {
|
|
471
|
+
width: i,
|
|
472
|
+
height: l,
|
|
473
|
+
x: c,
|
|
474
|
+
y: s
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
function Ut(e) {
|
|
478
|
+
var t = pe(e), o = t.overflow, n = t.overflowX, a = t.overflowY;
|
|
479
|
+
return /auto|scroll|overlay|hidden/.test(o + a + n);
|
|
480
|
+
}
|
|
481
|
+
function No(e) {
|
|
482
|
+
return ["html", "body", "#document"].indexOf(ae(e)) >= 0 ? e.ownerDocument.body : K(e) && Ut(e) ? e : No(wt(e));
|
|
483
|
+
}
|
|
484
|
+
function Fe(e, t) {
|
|
485
|
+
var o;
|
|
486
|
+
t === void 0 && (t = []);
|
|
487
|
+
var n = No(e), a = n === ((o = e.ownerDocument) == null ? void 0 : o.body), i = Y(n), l = a ? [i].concat(i.visualViewport || [], Ut(n) ? n : []) : n, c = t.concat(l);
|
|
488
|
+
return a ? c : (
|
|
489
|
+
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
490
|
+
c.concat(Fe(wt(l)))
|
|
491
|
+
);
|
|
492
|
+
}
|
|
493
|
+
function jt(e) {
|
|
494
|
+
return Object.assign({}, e, {
|
|
495
|
+
left: e.x,
|
|
496
|
+
top: e.y,
|
|
497
|
+
right: e.x + e.width,
|
|
498
|
+
bottom: e.y + e.height
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
function bn(e, t) {
|
|
502
|
+
var o = je(e, !1, t === "fixed");
|
|
503
|
+
return o.top = o.top + e.clientTop, o.left = o.left + e.clientLeft, o.bottom = o.top + e.clientHeight, o.right = o.left + e.clientWidth, o.width = e.clientWidth, o.height = e.clientHeight, o.x = o.left, o.y = o.top, o;
|
|
504
|
+
}
|
|
505
|
+
function po(e, t, o) {
|
|
506
|
+
return t === ko ? jt(vn(e, o)) : xe(t) ? bn(t, o) : jt(gn(he(e)));
|
|
507
|
+
}
|
|
508
|
+
function yn(e) {
|
|
509
|
+
var t = Fe(wt(e)), o = ["absolute", "fixed"].indexOf(pe(e).position) >= 0, n = o && K(e) ? Qe(e) : e;
|
|
510
|
+
return xe(n) ? t.filter(function(a) {
|
|
511
|
+
return xe(a) && jo(a, n) && ae(a) !== "body";
|
|
512
|
+
}) : [];
|
|
513
|
+
}
|
|
514
|
+
function wn(e, t, o, n) {
|
|
515
|
+
var a = t === "clippingParents" ? yn(e) : [].concat(t), i = [].concat(a, [o]), l = i[0], c = i.reduce(function(s, d) {
|
|
516
|
+
var p = po(e, d, n);
|
|
517
|
+
return s.top = we(p.top, s.top), s.right = mt(p.right, s.right), s.bottom = mt(p.bottom, s.bottom), s.left = we(p.left, s.left), s;
|
|
518
|
+
}, po(e, l, n));
|
|
519
|
+
return c.width = c.right - c.left, c.height = c.bottom - c.top, c.x = c.left, c.y = c.top, c;
|
|
520
|
+
}
|
|
521
|
+
function _o(e) {
|
|
522
|
+
var t = e.reference, o = e.element, n = e.placement, a = n ? ne(n) : null, i = n ? Se(n) : null, l = t.x + t.width / 2 - o.width / 2, c = t.y + t.height / 2 - o.height / 2, s;
|
|
523
|
+
switch (a) {
|
|
524
|
+
case H:
|
|
525
|
+
s = {
|
|
526
|
+
x: l,
|
|
527
|
+
y: t.y - o.height
|
|
528
|
+
};
|
|
529
|
+
break;
|
|
530
|
+
case J:
|
|
531
|
+
s = {
|
|
532
|
+
x: l,
|
|
533
|
+
y: t.y + t.height
|
|
534
|
+
};
|
|
535
|
+
break;
|
|
536
|
+
case ee:
|
|
537
|
+
s = {
|
|
538
|
+
x: t.x + t.width,
|
|
539
|
+
y: c
|
|
540
|
+
};
|
|
541
|
+
break;
|
|
542
|
+
case q:
|
|
543
|
+
s = {
|
|
544
|
+
x: t.x - o.width,
|
|
545
|
+
y: c
|
|
546
|
+
};
|
|
547
|
+
break;
|
|
548
|
+
default:
|
|
549
|
+
s = {
|
|
550
|
+
x: t.x,
|
|
551
|
+
y: t.y
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
var d = a ? Bt(a) : null;
|
|
555
|
+
if (d != null) {
|
|
556
|
+
var p = d === "y" ? "height" : "width";
|
|
557
|
+
switch (i) {
|
|
558
|
+
case Le:
|
|
559
|
+
s[d] = s[d] - (t[p] / 2 - o[p] / 2);
|
|
560
|
+
break;
|
|
561
|
+
case Ve:
|
|
562
|
+
s[d] = s[d] + (t[p] / 2 - o[p] / 2);
|
|
563
|
+
break;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
return s;
|
|
567
|
+
}
|
|
568
|
+
function He(e, t) {
|
|
569
|
+
t === void 0 && (t = {});
|
|
570
|
+
var o = t, n = o.placement, a = n === void 0 ? e.placement : n, i = o.strategy, l = i === void 0 ? e.strategy : i, c = o.boundary, s = c === void 0 ? Ir : c, d = o.rootBoundary, p = d === void 0 ? ko : d, f = o.elementContext, y = f === void 0 ? Ie : f, m = o.altBoundary, P = m === void 0 ? !1 : m, g = o.padding, w = g === void 0 ? 0 : g, O = Ao(typeof w != "number" ? w : Do(w, Ye)), u = y === Ie ? Wr : Ie, v = e.rects.popper, h = e.elements[P ? u : y], x = wn(xe(h) ? h : h.contextElement || he(e.elements.popper), s, p, l), b = je(e.elements.reference), C = _o({
|
|
571
|
+
reference: b,
|
|
572
|
+
element: v,
|
|
573
|
+
strategy: "absolute",
|
|
574
|
+
placement: a
|
|
575
|
+
}), L = jt(Object.assign({}, v, C)), k = y === Ie ? L : b, $ = {
|
|
576
|
+
top: x.top - k.top + O.top,
|
|
577
|
+
bottom: k.bottom - x.bottom + O.bottom,
|
|
578
|
+
left: x.left - k.left + O.left,
|
|
579
|
+
right: k.right - x.right + O.right
|
|
580
|
+
}, S = e.modifiersData.offset;
|
|
581
|
+
if (y === Ie && S) {
|
|
582
|
+
var I = S[a];
|
|
583
|
+
Object.keys($).forEach(function(D) {
|
|
584
|
+
var z = [ee, J].indexOf(D) >= 0 ? 1 : -1, W = [H, J].indexOf(D) >= 0 ? "y" : "x";
|
|
585
|
+
$[D] += I[W] * z;
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
return $;
|
|
589
|
+
}
|
|
590
|
+
function xn(e, t) {
|
|
591
|
+
t === void 0 && (t = {});
|
|
592
|
+
var o = t, n = o.placement, a = o.boundary, i = o.rootBoundary, l = o.padding, c = o.flipVariations, s = o.allowedAutoPlacements, d = s === void 0 ? Lo : s, p = Se(n), f = p ? c ? io : io.filter(function(P) {
|
|
593
|
+
return Se(P) === p;
|
|
594
|
+
}) : Ye, y = f.filter(function(P) {
|
|
595
|
+
return d.indexOf(P) >= 0;
|
|
596
|
+
});
|
|
597
|
+
y.length === 0 && (y = f);
|
|
598
|
+
var m = y.reduce(function(P, g) {
|
|
599
|
+
return P[g] = He(e, {
|
|
600
|
+
placement: g,
|
|
601
|
+
boundary: a,
|
|
602
|
+
rootBoundary: i,
|
|
603
|
+
padding: l
|
|
604
|
+
})[ne(g)], P;
|
|
605
|
+
}, {});
|
|
606
|
+
return Object.keys(m).sort(function(P, g) {
|
|
607
|
+
return m[P] - m[g];
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
function On(e) {
|
|
611
|
+
if (ne(e) === Nt)
|
|
612
|
+
return [];
|
|
613
|
+
var t = dt(e);
|
|
614
|
+
return [lo(e), t, lo(t)];
|
|
615
|
+
}
|
|
616
|
+
function Tn(e) {
|
|
617
|
+
var t = e.state, o = e.options, n = e.name;
|
|
618
|
+
if (!t.modifiersData[n]._skip) {
|
|
619
|
+
for (var a = o.mainAxis, i = a === void 0 ? !0 : a, l = o.altAxis, c = l === void 0 ? !0 : l, s = o.fallbackPlacements, d = o.padding, p = o.boundary, f = o.rootBoundary, y = o.altBoundary, m = o.flipVariations, P = m === void 0 ? !0 : m, g = o.allowedAutoPlacements, w = t.options.placement, O = ne(w), u = O === w, v = s || (u || !P ? [dt(w)] : On(w)), h = [w].concat(v).reduce(function(se, te) {
|
|
620
|
+
return se.concat(ne(te) === Nt ? xn(t, {
|
|
621
|
+
placement: te,
|
|
622
|
+
boundary: p,
|
|
623
|
+
rootBoundary: f,
|
|
624
|
+
padding: d,
|
|
625
|
+
flipVariations: P,
|
|
626
|
+
allowedAutoPlacements: g
|
|
627
|
+
}) : te);
|
|
628
|
+
}, []), x = t.rects.reference, b = t.rects.popper, C = /* @__PURE__ */ new Map(), L = !0, k = h[0], $ = 0; $ < h.length; $++) {
|
|
629
|
+
var S = h[$], I = ne(S), D = Se(S) === Le, z = [H, J].indexOf(I) >= 0, W = z ? "width" : "height", A = He(t, {
|
|
630
|
+
placement: S,
|
|
631
|
+
boundary: p,
|
|
632
|
+
rootBoundary: f,
|
|
633
|
+
altBoundary: y,
|
|
634
|
+
padding: d
|
|
635
|
+
}), N = z ? D ? ee : q : D ? J : H;
|
|
636
|
+
x[W] > b[W] && (N = dt(N));
|
|
637
|
+
var B = dt(N), _ = [];
|
|
638
|
+
if (i && _.push(A[I] <= 0), c && _.push(A[N] <= 0, A[B] <= 0), _.every(function(se) {
|
|
639
|
+
return se;
|
|
640
|
+
})) {
|
|
641
|
+
k = S, L = !1;
|
|
642
|
+
break;
|
|
643
|
+
}
|
|
644
|
+
C.set(S, _);
|
|
645
|
+
}
|
|
646
|
+
if (L)
|
|
647
|
+
for (var ie = P ? 3 : 1, Te = function(te) {
|
|
648
|
+
var de = h.find(function(ue) {
|
|
649
|
+
var U = C.get(ue);
|
|
650
|
+
if (U)
|
|
651
|
+
return U.slice(0, te).every(function(oe) {
|
|
652
|
+
return oe;
|
|
653
|
+
});
|
|
654
|
+
});
|
|
655
|
+
if (de)
|
|
656
|
+
return k = de, "break";
|
|
657
|
+
}, me = ie; me > 0; me--) {
|
|
658
|
+
var ve = Te(me);
|
|
659
|
+
if (ve === "break") break;
|
|
660
|
+
}
|
|
661
|
+
t.placement !== k && (t.modifiersData[n]._skip = !0, t.placement = k, t.reset = !0);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
const En = {
|
|
665
|
+
name: "flip",
|
|
666
|
+
enabled: !0,
|
|
667
|
+
phase: "main",
|
|
668
|
+
fn: Tn,
|
|
669
|
+
requiresIfExists: ["offset"],
|
|
670
|
+
data: {
|
|
671
|
+
_skip: !1
|
|
672
|
+
}
|
|
673
|
+
};
|
|
674
|
+
function uo(e, t, o) {
|
|
675
|
+
return o === void 0 && (o = {
|
|
676
|
+
x: 0,
|
|
677
|
+
y: 0
|
|
678
|
+
}), {
|
|
679
|
+
top: e.top - t.height - o.y,
|
|
680
|
+
right: e.right - t.width + o.x,
|
|
681
|
+
bottom: e.bottom - t.height + o.y,
|
|
682
|
+
left: e.left - t.width - o.x
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
function fo(e) {
|
|
686
|
+
return [H, ee, J, q].some(function(t) {
|
|
687
|
+
return e[t] >= 0;
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
function Cn(e) {
|
|
691
|
+
var t = e.state, o = e.name, n = t.rects.reference, a = t.rects.popper, i = t.modifiersData.preventOverflow, l = He(t, {
|
|
692
|
+
elementContext: "reference"
|
|
693
|
+
}), c = He(t, {
|
|
694
|
+
altBoundary: !0
|
|
695
|
+
}), s = uo(l, n), d = uo(c, a, i), p = fo(s), f = fo(d);
|
|
696
|
+
t.modifiersData[o] = {
|
|
697
|
+
referenceClippingOffsets: s,
|
|
698
|
+
popperEscapeOffsets: d,
|
|
699
|
+
isReferenceHidden: p,
|
|
700
|
+
hasPopperEscaped: f
|
|
701
|
+
}, t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
702
|
+
"data-popper-reference-hidden": p,
|
|
703
|
+
"data-popper-escaped": f
|
|
704
|
+
});
|
|
705
|
+
}
|
|
706
|
+
const Pn = {
|
|
707
|
+
name: "hide",
|
|
708
|
+
enabled: !0,
|
|
709
|
+
phase: "main",
|
|
710
|
+
requiresIfExists: ["preventOverflow"],
|
|
711
|
+
fn: Cn
|
|
712
|
+
};
|
|
713
|
+
function Rn(e, t, o) {
|
|
714
|
+
var n = ne(e), a = [q, H].indexOf(n) >= 0 ? -1 : 1, i = typeof o == "function" ? o(Object.assign({}, t, {
|
|
715
|
+
placement: e
|
|
716
|
+
})) : o, l = i[0], c = i[1];
|
|
717
|
+
return l = l || 0, c = (c || 0) * a, [q, ee].indexOf(n) >= 0 ? {
|
|
718
|
+
x: c,
|
|
719
|
+
y: l
|
|
720
|
+
} : {
|
|
721
|
+
x: l,
|
|
722
|
+
y: c
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
function kn(e) {
|
|
726
|
+
var t = e.state, o = e.options, n = e.name, a = o.offset, i = a === void 0 ? [0, 0] : a, l = Lo.reduce(function(p, f) {
|
|
727
|
+
return p[f] = Rn(f, t.rects, i), p;
|
|
728
|
+
}, {}), c = l[t.placement], s = c.x, d = c.y;
|
|
729
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += s, t.modifiersData.popperOffsets.y += d), t.modifiersData[n] = l;
|
|
730
|
+
}
|
|
731
|
+
const Ln = {
|
|
732
|
+
name: "offset",
|
|
733
|
+
enabled: !0,
|
|
734
|
+
phase: "main",
|
|
735
|
+
requires: ["popperOffsets"],
|
|
736
|
+
fn: kn
|
|
737
|
+
};
|
|
738
|
+
function $n(e) {
|
|
739
|
+
var t = e.state, o = e.name;
|
|
740
|
+
t.modifiersData[o] = _o({
|
|
741
|
+
reference: t.rects.reference,
|
|
742
|
+
element: t.rects.popper,
|
|
743
|
+
strategy: "absolute",
|
|
744
|
+
placement: t.placement
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
const jn = {
|
|
748
|
+
name: "popperOffsets",
|
|
749
|
+
enabled: !0,
|
|
750
|
+
phase: "read",
|
|
751
|
+
fn: $n,
|
|
752
|
+
data: {}
|
|
753
|
+
};
|
|
754
|
+
function Sn(e) {
|
|
755
|
+
return e === "x" ? "y" : "x";
|
|
756
|
+
}
|
|
757
|
+
function An(e) {
|
|
758
|
+
var t = e.state, o = e.options, n = e.name, a = o.mainAxis, i = a === void 0 ? !0 : a, l = o.altAxis, c = l === void 0 ? !1 : l, s = o.boundary, d = o.rootBoundary, p = o.altBoundary, f = o.padding, y = o.tether, m = y === void 0 ? !0 : y, P = o.tetherOffset, g = P === void 0 ? 0 : P, w = He(t, {
|
|
759
|
+
boundary: s,
|
|
760
|
+
rootBoundary: d,
|
|
761
|
+
padding: f,
|
|
762
|
+
altBoundary: p
|
|
763
|
+
}), O = ne(t.placement), u = Se(t.placement), v = !u, h = Bt(O), x = Sn(h), b = t.modifiersData.popperOffsets, C = t.rects.reference, L = t.rects.popper, k = typeof g == "function" ? g(Object.assign({}, t.rects, {
|
|
764
|
+
placement: t.placement
|
|
765
|
+
})) : g, $ = typeof k == "number" ? {
|
|
766
|
+
mainAxis: k,
|
|
767
|
+
altAxis: k
|
|
768
|
+
} : Object.assign({
|
|
769
|
+
mainAxis: 0,
|
|
770
|
+
altAxis: 0
|
|
771
|
+
}, k), S = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, I = {
|
|
772
|
+
x: 0,
|
|
773
|
+
y: 0
|
|
774
|
+
};
|
|
775
|
+
if (b) {
|
|
776
|
+
if (i) {
|
|
777
|
+
var D, z = h === "y" ? H : q, W = h === "y" ? J : ee, A = h === "y" ? "height" : "width", N = b[h], B = N + w[z], _ = N - w[W], ie = m ? -L[A] / 2 : 0, Te = u === Le ? C[A] : L[A], me = u === Le ? -L[A] : -C[A], ve = t.elements.arrow, se = m && ve ? Mt(ve) : {
|
|
778
|
+
width: 0,
|
|
779
|
+
height: 0
|
|
780
|
+
}, te = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : So(), de = te[z], ue = te[W], U = Ue(0, C[A], se[A]), oe = v ? C[A] / 2 - ie - U - de - $.mainAxis : Te - U - de - $.mainAxis, Ee = v ? -C[A] / 2 + ie + U + ue + $.mainAxis : me + U + ue + $.mainAxis, Q = t.elements.arrow && Qe(t.elements.arrow), Ot = Q ? h === "y" ? Q.clientTop || 0 : Q.clientLeft || 0 : 0, Ge = (D = S == null ? void 0 : S[h]) != null ? D : 0, Ze = N + oe - Ge - Ot, G = N + Ee - Ge, Ae = Ue(m ? mt(B, Ze) : B, N, m ? we(_, G) : _);
|
|
781
|
+
b[h] = Ae, I[h] = Ae - N;
|
|
782
|
+
}
|
|
783
|
+
if (c) {
|
|
784
|
+
var Ke, V = h === "x" ? H : q, Je = h === "x" ? J : ee, re = b[x], Ce = x === "y" ? "height" : "width", ge = re + w[V], Pe = re - w[Je], Re = [H, q].indexOf(O) !== -1, ke = (Ke = S == null ? void 0 : S[x]) != null ? Ke : 0, be = Re ? ge : re - C[Ce] - L[Ce] - ke + $.altAxis, De = Re ? re + C[Ce] + L[Ce] - ke - $.altAxis : Pe, et = m && Re ? on(be, re, De) : Ue(m ? be : ge, re, m ? De : Pe);
|
|
785
|
+
b[x] = et, I[x] = et - re;
|
|
786
|
+
}
|
|
787
|
+
t.modifiersData[n] = I;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
const Dn = {
|
|
791
|
+
name: "preventOverflow",
|
|
792
|
+
enabled: !0,
|
|
793
|
+
phase: "main",
|
|
794
|
+
fn: An,
|
|
795
|
+
requiresIfExists: ["offset"]
|
|
796
|
+
};
|
|
797
|
+
function Nn(e) {
|
|
798
|
+
return {
|
|
799
|
+
scrollLeft: e.scrollLeft,
|
|
800
|
+
scrollTop: e.scrollTop
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
function _n(e) {
|
|
804
|
+
return e === Y(e) || !K(e) ? It(e) : Nn(e);
|
|
805
|
+
}
|
|
806
|
+
function Mn(e) {
|
|
807
|
+
var t = e.getBoundingClientRect(), o = $e(t.width) / e.offsetWidth || 1, n = $e(t.height) / e.offsetHeight || 1;
|
|
808
|
+
return o !== 1 || n !== 1;
|
|
809
|
+
}
|
|
810
|
+
function Bn(e, t, o) {
|
|
811
|
+
o === void 0 && (o = !1);
|
|
812
|
+
var n = K(t), a = K(t) && Mn(t), i = he(t), l = je(e, a, o), c = {
|
|
813
|
+
scrollLeft: 0,
|
|
814
|
+
scrollTop: 0
|
|
815
|
+
}, s = {
|
|
816
|
+
x: 0,
|
|
817
|
+
y: 0
|
|
818
|
+
};
|
|
819
|
+
return (n || !n && !o) && ((ae(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
820
|
+
Ut(i)) && (c = _n(t)), K(t) ? (s = je(t, !0), s.x += t.clientLeft, s.y += t.clientTop) : i && (s.x = Wt(i))), {
|
|
821
|
+
x: l.left + c.scrollLeft - s.x,
|
|
822
|
+
y: l.top + c.scrollTop - s.y,
|
|
823
|
+
width: l.width,
|
|
824
|
+
height: l.height
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
function In(e) {
|
|
828
|
+
var t = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), n = [];
|
|
829
|
+
e.forEach(function(i) {
|
|
830
|
+
t.set(i.name, i);
|
|
831
|
+
});
|
|
832
|
+
function a(i) {
|
|
833
|
+
o.add(i.name);
|
|
834
|
+
var l = [].concat(i.requires || [], i.requiresIfExists || []);
|
|
835
|
+
l.forEach(function(c) {
|
|
836
|
+
if (!o.has(c)) {
|
|
837
|
+
var s = t.get(c);
|
|
838
|
+
s && a(s);
|
|
839
|
+
}
|
|
840
|
+
}), n.push(i);
|
|
841
|
+
}
|
|
842
|
+
return e.forEach(function(i) {
|
|
843
|
+
o.has(i.name) || a(i);
|
|
844
|
+
}), n;
|
|
845
|
+
}
|
|
846
|
+
function Wn(e) {
|
|
847
|
+
var t = In(e);
|
|
848
|
+
return Gr.reduce(function(o, n) {
|
|
849
|
+
return o.concat(t.filter(function(a) {
|
|
850
|
+
return a.phase === n;
|
|
851
|
+
}));
|
|
852
|
+
}, []);
|
|
853
|
+
}
|
|
854
|
+
function Un(e) {
|
|
855
|
+
var t;
|
|
856
|
+
return function() {
|
|
857
|
+
return t || (t = new Promise(function(o) {
|
|
858
|
+
Promise.resolve().then(function() {
|
|
859
|
+
t = void 0, o(e());
|
|
860
|
+
});
|
|
861
|
+
})), t;
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
function Fn(e) {
|
|
865
|
+
var t = e.reduce(function(o, n) {
|
|
866
|
+
var a = o[n.name];
|
|
867
|
+
return o[n.name] = a ? Object.assign({}, a, n, {
|
|
868
|
+
options: Object.assign({}, a.options, n.options),
|
|
869
|
+
data: Object.assign({}, a.data, n.data)
|
|
870
|
+
}) : n, o;
|
|
871
|
+
}, {});
|
|
872
|
+
return Object.keys(t).map(function(o) {
|
|
873
|
+
return t[o];
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
var ho = {
|
|
877
|
+
placement: "bottom",
|
|
878
|
+
modifiers: [],
|
|
879
|
+
strategy: "absolute"
|
|
880
|
+
};
|
|
881
|
+
function mo() {
|
|
882
|
+
for (var e = arguments.length, t = new Array(e), o = 0; o < e; o++)
|
|
883
|
+
t[o] = arguments[o];
|
|
884
|
+
return !t.some(function(n) {
|
|
885
|
+
return !(n && typeof n.getBoundingClientRect == "function");
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
function Vn(e) {
|
|
889
|
+
e === void 0 && (e = {});
|
|
890
|
+
var t = e, o = t.defaultModifiers, n = o === void 0 ? [] : o, a = t.defaultOptions, i = a === void 0 ? ho : a;
|
|
891
|
+
return function(c, s, d) {
|
|
892
|
+
d === void 0 && (d = i);
|
|
893
|
+
var p = {
|
|
894
|
+
placement: "bottom",
|
|
895
|
+
orderedModifiers: [],
|
|
896
|
+
options: Object.assign({}, ho, i),
|
|
897
|
+
modifiersData: {},
|
|
898
|
+
elements: {
|
|
899
|
+
reference: c,
|
|
900
|
+
popper: s
|
|
901
|
+
},
|
|
902
|
+
attributes: {},
|
|
903
|
+
styles: {}
|
|
904
|
+
}, f = [], y = !1, m = {
|
|
905
|
+
state: p,
|
|
906
|
+
setOptions: function(O) {
|
|
907
|
+
var u = typeof O == "function" ? O(p.options) : O;
|
|
908
|
+
g(), p.options = Object.assign({}, i, p.options, u), p.scrollParents = {
|
|
909
|
+
reference: xe(c) ? Fe(c) : c.contextElement ? Fe(c.contextElement) : [],
|
|
910
|
+
popper: Fe(s)
|
|
911
|
+
};
|
|
912
|
+
var v = Wn(Fn([].concat(n, p.options.modifiers)));
|
|
913
|
+
return p.orderedModifiers = v.filter(function(h) {
|
|
914
|
+
return h.enabled;
|
|
915
|
+
}), P(), m.update();
|
|
916
|
+
},
|
|
917
|
+
// Sync update – it will always be executed, even if not necessary. This
|
|
918
|
+
// is useful for low frequency updates where sync behavior simplifies the
|
|
919
|
+
// logic.
|
|
920
|
+
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
921
|
+
// prefer the async Popper#update method
|
|
922
|
+
forceUpdate: function() {
|
|
923
|
+
if (!y) {
|
|
924
|
+
var O = p.elements, u = O.reference, v = O.popper;
|
|
925
|
+
if (mo(u, v)) {
|
|
926
|
+
p.rects = {
|
|
927
|
+
reference: Bn(u, Qe(v), p.options.strategy === "fixed"),
|
|
928
|
+
popper: Mt(v)
|
|
929
|
+
}, p.reset = !1, p.placement = p.options.placement, p.orderedModifiers.forEach(function($) {
|
|
930
|
+
return p.modifiersData[$.name] = Object.assign({}, $.data);
|
|
931
|
+
});
|
|
932
|
+
for (var h = 0; h < p.orderedModifiers.length; h++) {
|
|
933
|
+
if (p.reset === !0) {
|
|
934
|
+
p.reset = !1, h = -1;
|
|
935
|
+
continue;
|
|
936
|
+
}
|
|
937
|
+
var x = p.orderedModifiers[h], b = x.fn, C = x.options, L = C === void 0 ? {} : C, k = x.name;
|
|
938
|
+
typeof b == "function" && (p = b({
|
|
939
|
+
state: p,
|
|
940
|
+
options: L,
|
|
941
|
+
name: k,
|
|
942
|
+
instance: m
|
|
943
|
+
}) || p);
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
// Async and optimistically optimized update – it will not be executed if
|
|
949
|
+
// not necessary (debounced to run at most once-per-tick)
|
|
950
|
+
update: Un(function() {
|
|
951
|
+
return new Promise(function(w) {
|
|
952
|
+
m.forceUpdate(), w(p);
|
|
953
|
+
});
|
|
954
|
+
}),
|
|
955
|
+
destroy: function() {
|
|
956
|
+
g(), y = !0;
|
|
957
|
+
}
|
|
958
|
+
};
|
|
959
|
+
if (!mo(c, s))
|
|
960
|
+
return m;
|
|
961
|
+
m.setOptions(d).then(function(w) {
|
|
962
|
+
!y && d.onFirstUpdate && d.onFirstUpdate(w);
|
|
963
|
+
});
|
|
964
|
+
function P() {
|
|
965
|
+
p.orderedModifiers.forEach(function(w) {
|
|
966
|
+
var O = w.name, u = w.options, v = u === void 0 ? {} : u, h = w.effect;
|
|
967
|
+
if (typeof h == "function") {
|
|
968
|
+
var x = h({
|
|
969
|
+
state: p,
|
|
970
|
+
name: O,
|
|
971
|
+
instance: m,
|
|
972
|
+
options: v
|
|
973
|
+
}), b = function() {
|
|
974
|
+
};
|
|
975
|
+
f.push(x || b);
|
|
976
|
+
}
|
|
977
|
+
});
|
|
978
|
+
}
|
|
979
|
+
function g() {
|
|
980
|
+
f.forEach(function(w) {
|
|
981
|
+
return w();
|
|
982
|
+
}), f = [];
|
|
983
|
+
}
|
|
984
|
+
return m;
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
var Hn = [fn, jn, dn, Jr, Ln, En, Dn, sn, Pn], qn = /* @__PURE__ */ Vn({
|
|
988
|
+
defaultModifiers: Hn
|
|
989
|
+
});
|
|
990
|
+
function zn(e) {
|
|
991
|
+
return ze("MuiPopper", e);
|
|
992
|
+
}
|
|
993
|
+
qe("MuiPopper", ["root"]);
|
|
994
|
+
const Xn = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"], Yn = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"];
|
|
995
|
+
function Qn(e, t) {
|
|
996
|
+
if (t === "ltr")
|
|
997
|
+
return e;
|
|
998
|
+
switch (e) {
|
|
999
|
+
case "bottom-end":
|
|
1000
|
+
return "bottom-start";
|
|
1001
|
+
case "bottom-start":
|
|
1002
|
+
return "bottom-end";
|
|
1003
|
+
case "top-end":
|
|
1004
|
+
return "top-start";
|
|
1005
|
+
case "top-start":
|
|
1006
|
+
return "top-end";
|
|
1007
|
+
default:
|
|
1008
|
+
return e;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
function vt(e) {
|
|
1012
|
+
return typeof e == "function" ? e() : e;
|
|
1013
|
+
}
|
|
1014
|
+
function xt(e) {
|
|
1015
|
+
return e.nodeType !== void 0;
|
|
1016
|
+
}
|
|
1017
|
+
function Gn(e) {
|
|
1018
|
+
return !xt(e);
|
|
1019
|
+
}
|
|
1020
|
+
const Zn = (e) => {
|
|
1021
|
+
const {
|
|
1022
|
+
classes: t
|
|
1023
|
+
} = e;
|
|
1024
|
+
return Xe({
|
|
1025
|
+
root: ["root"]
|
|
1026
|
+
}, zn, t);
|
|
1027
|
+
}, Kn = {}, Jn = /* @__PURE__ */ j.forwardRef(function(t, o) {
|
|
1028
|
+
var n;
|
|
1029
|
+
const {
|
|
1030
|
+
anchorEl: a,
|
|
1031
|
+
children: i,
|
|
1032
|
+
direction: l,
|
|
1033
|
+
disablePortal: c,
|
|
1034
|
+
modifiers: s,
|
|
1035
|
+
open: d,
|
|
1036
|
+
placement: p,
|
|
1037
|
+
popperOptions: f,
|
|
1038
|
+
popperRef: y,
|
|
1039
|
+
slotProps: m = {},
|
|
1040
|
+
slots: P = {},
|
|
1041
|
+
TransitionProps: g
|
|
1042
|
+
// @ts-ignore internal logic
|
|
1043
|
+
// prevent from spreading to DOM, it can come from the parent component e.g. Select.
|
|
1044
|
+
} = t, w = Oe(t, Xn), O = j.useRef(null), u = kt(O, o), v = j.useRef(null), h = kt(v, y), x = j.useRef(h);
|
|
1045
|
+
oo(() => {
|
|
1046
|
+
x.current = h;
|
|
1047
|
+
}, [h]), j.useImperativeHandle(y, () => v.current, []);
|
|
1048
|
+
const b = Qn(p, l), [C, L] = j.useState(b), [k, $] = j.useState(vt(a));
|
|
1049
|
+
j.useEffect(() => {
|
|
1050
|
+
v.current && v.current.forceUpdate();
|
|
1051
|
+
}), j.useEffect(() => {
|
|
1052
|
+
a && $(vt(a));
|
|
1053
|
+
}, [a]), oo(() => {
|
|
1054
|
+
if (!k || !d)
|
|
1055
|
+
return;
|
|
1056
|
+
const W = (B) => {
|
|
1057
|
+
L(B.placement);
|
|
1058
|
+
};
|
|
1059
|
+
if (process.env.NODE_ENV !== "production" && k && xt(k) && k.nodeType === 1) {
|
|
1060
|
+
const B = k.getBoundingClientRect();
|
|
1061
|
+
process.env.NODE_ENV !== "test" && B.top === 0 && B.left === 0 && B.right === 0 && B.bottom === 0 && console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
|
|
1062
|
+
`));
|
|
1063
|
+
}
|
|
1064
|
+
let A = [{
|
|
1065
|
+
name: "preventOverflow",
|
|
1066
|
+
options: {
|
|
1067
|
+
altBoundary: c
|
|
1068
|
+
}
|
|
1069
|
+
}, {
|
|
1070
|
+
name: "flip",
|
|
1071
|
+
options: {
|
|
1072
|
+
altBoundary: c
|
|
1073
|
+
}
|
|
1074
|
+
}, {
|
|
1075
|
+
name: "onUpdate",
|
|
1076
|
+
enabled: !0,
|
|
1077
|
+
phase: "afterWrite",
|
|
1078
|
+
fn: ({
|
|
1079
|
+
state: B
|
|
1080
|
+
}) => {
|
|
1081
|
+
W(B);
|
|
1082
|
+
}
|
|
1083
|
+
}];
|
|
1084
|
+
s != null && (A = A.concat(s)), f && f.modifiers != null && (A = A.concat(f.modifiers));
|
|
1085
|
+
const N = qn(k, O.current, T({
|
|
1086
|
+
placement: b
|
|
1087
|
+
}, f, {
|
|
1088
|
+
modifiers: A
|
|
1089
|
+
}));
|
|
1090
|
+
return x.current(N), () => {
|
|
1091
|
+
N.destroy(), x.current(null);
|
|
1092
|
+
};
|
|
1093
|
+
}, [k, c, s, d, f, b]);
|
|
1094
|
+
const S = {
|
|
1095
|
+
placement: C
|
|
1096
|
+
};
|
|
1097
|
+
g !== null && (S.TransitionProps = g);
|
|
1098
|
+
const I = Zn(t), D = (n = P.root) != null ? n : "div", z = rr({
|
|
1099
|
+
elementType: D,
|
|
1100
|
+
externalSlotProps: m.root,
|
|
1101
|
+
externalForwardedProps: w,
|
|
1102
|
+
additionalProps: {
|
|
1103
|
+
role: "tooltip",
|
|
1104
|
+
ref: u
|
|
1105
|
+
},
|
|
1106
|
+
ownerState: t,
|
|
1107
|
+
className: I.root
|
|
1108
|
+
});
|
|
1109
|
+
return /* @__PURE__ */ R.jsx(D, T({}, z, {
|
|
1110
|
+
children: typeof i == "function" ? i(S) : i
|
|
1111
|
+
}));
|
|
1112
|
+
}), Mo = /* @__PURE__ */ j.forwardRef(function(t, o) {
|
|
1113
|
+
const {
|
|
1114
|
+
anchorEl: n,
|
|
1115
|
+
children: a,
|
|
1116
|
+
container: i,
|
|
1117
|
+
direction: l = "ltr",
|
|
1118
|
+
disablePortal: c = !1,
|
|
1119
|
+
keepMounted: s = !1,
|
|
1120
|
+
modifiers: d,
|
|
1121
|
+
open: p,
|
|
1122
|
+
placement: f = "bottom",
|
|
1123
|
+
popperOptions: y = Kn,
|
|
1124
|
+
popperRef: m,
|
|
1125
|
+
style: P,
|
|
1126
|
+
transition: g = !1,
|
|
1127
|
+
slotProps: w = {},
|
|
1128
|
+
slots: O = {}
|
|
1129
|
+
} = t, u = Oe(t, Yn), [v, h] = j.useState(!0), x = () => {
|
|
1130
|
+
h(!1);
|
|
1131
|
+
}, b = () => {
|
|
1132
|
+
h(!0);
|
|
1133
|
+
};
|
|
1134
|
+
if (!s && !p && (!g || v))
|
|
1135
|
+
return null;
|
|
1136
|
+
let C;
|
|
1137
|
+
if (i)
|
|
1138
|
+
C = i;
|
|
1139
|
+
else if (n) {
|
|
1140
|
+
const $ = vt(n);
|
|
1141
|
+
C = $ && xt($) ? to($).body : to(null).body;
|
|
1142
|
+
}
|
|
1143
|
+
const L = !p && s && (!g || v) ? "none" : void 0, k = g ? {
|
|
1144
|
+
in: p,
|
|
1145
|
+
onEnter: x,
|
|
1146
|
+
onExited: b
|
|
1147
|
+
} : void 0;
|
|
1148
|
+
return /* @__PURE__ */ R.jsx(tr, {
|
|
1149
|
+
disablePortal: c,
|
|
1150
|
+
container: C,
|
|
1151
|
+
children: /* @__PURE__ */ R.jsx(Jn, T({
|
|
1152
|
+
anchorEl: n,
|
|
1153
|
+
direction: l,
|
|
1154
|
+
disablePortal: c,
|
|
1155
|
+
modifiers: d,
|
|
1156
|
+
ref: o,
|
|
1157
|
+
open: g ? !v : p,
|
|
1158
|
+
placement: f,
|
|
1159
|
+
popperOptions: y,
|
|
1160
|
+
popperRef: m,
|
|
1161
|
+
slotProps: w,
|
|
1162
|
+
slots: O
|
|
1163
|
+
}, u, {
|
|
1164
|
+
style: T({
|
|
1165
|
+
// Prevents scroll issue, waiting for Popper.js to add this style once initiated.
|
|
1166
|
+
position: "fixed",
|
|
1167
|
+
// Fix Popper.js display issue
|
|
1168
|
+
top: 0,
|
|
1169
|
+
left: 0,
|
|
1170
|
+
display: L
|
|
1171
|
+
}, P),
|
|
1172
|
+
TransitionProps: k,
|
|
1173
|
+
children: a
|
|
1174
|
+
}))
|
|
1175
|
+
});
|
|
1176
|
+
});
|
|
1177
|
+
process.env.NODE_ENV !== "production" && (Mo.propTypes = {
|
|
1178
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
1179
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
1180
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
1181
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
1182
|
+
/**
|
|
1183
|
+
* An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
|
|
1184
|
+
* or a function that returns either.
|
|
1185
|
+
* It's used to set the position of the popper.
|
|
1186
|
+
* The return value will passed as the reference object of the Popper instance.
|
|
1187
|
+
*/
|
|
1188
|
+
anchorEl: or(r.oneOfType([ut, r.object, r.func]), (e) => {
|
|
1189
|
+
if (e.open) {
|
|
1190
|
+
const t = vt(e.anchorEl);
|
|
1191
|
+
if (t && xt(t) && t.nodeType === 1) {
|
|
1192
|
+
const o = t.getBoundingClientRect();
|
|
1193
|
+
if (process.env.NODE_ENV !== "test" && o.top === 0 && o.left === 0 && o.right === 0 && o.bottom === 0)
|
|
1194
|
+
return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
|
|
1195
|
+
`));
|
|
1196
|
+
} else if (!t || typeof t.getBoundingClientRect != "function" || Gn(t) && t.contextElement != null && t.contextElement.nodeType !== 1)
|
|
1197
|
+
return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "It should be an HTML element instance or a virtualElement ", "(https://popper.js.org/docs/v2/virtual-elements/)."].join(`
|
|
1198
|
+
`));
|
|
1199
|
+
}
|
|
1200
|
+
return null;
|
|
1201
|
+
}),
|
|
1202
|
+
/**
|
|
1203
|
+
* Popper render function or node.
|
|
1204
|
+
*/
|
|
1205
|
+
children: r.oneOfType([r.node, r.func]),
|
|
1206
|
+
/**
|
|
1207
|
+
* An HTML element or function that returns one.
|
|
1208
|
+
* The `container` will have the portal children appended to it.
|
|
1209
|
+
*
|
|
1210
|
+
* You can also provide a callback, which is called in a React layout effect.
|
|
1211
|
+
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
|
1212
|
+
*
|
|
1213
|
+
* By default, it uses the body of the top-level document object,
|
|
1214
|
+
* so it's simply `document.body` most of the time.
|
|
1215
|
+
*/
|
|
1216
|
+
container: r.oneOfType([ut, r.func]),
|
|
1217
|
+
/**
|
|
1218
|
+
* Direction of the text.
|
|
1219
|
+
* @default 'ltr'
|
|
1220
|
+
*/
|
|
1221
|
+
direction: r.oneOf(["ltr", "rtl"]),
|
|
1222
|
+
/**
|
|
1223
|
+
* The `children` will be under the DOM hierarchy of the parent component.
|
|
1224
|
+
* @default false
|
|
1225
|
+
*/
|
|
1226
|
+
disablePortal: r.bool,
|
|
1227
|
+
/**
|
|
1228
|
+
* Always keep the children in the DOM.
|
|
1229
|
+
* This prop can be useful in SEO situation or
|
|
1230
|
+
* when you want to maximize the responsiveness of the Popper.
|
|
1231
|
+
* @default false
|
|
1232
|
+
*/
|
|
1233
|
+
keepMounted: r.bool,
|
|
1234
|
+
/**
|
|
1235
|
+
* Popper.js is based on a "plugin-like" architecture,
|
|
1236
|
+
* most of its features are fully encapsulated "modifiers".
|
|
1237
|
+
*
|
|
1238
|
+
* A modifier is a function that is called each time Popper.js needs to
|
|
1239
|
+
* compute the position of the popper.
|
|
1240
|
+
* For this reason, modifiers should be very performant to avoid bottlenecks.
|
|
1241
|
+
* To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
|
|
1242
|
+
*/
|
|
1243
|
+
modifiers: r.arrayOf(r.shape({
|
|
1244
|
+
data: r.object,
|
|
1245
|
+
effect: r.func,
|
|
1246
|
+
enabled: r.bool,
|
|
1247
|
+
fn: r.func,
|
|
1248
|
+
name: r.any,
|
|
1249
|
+
options: r.object,
|
|
1250
|
+
phase: r.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]),
|
|
1251
|
+
requires: r.arrayOf(r.string),
|
|
1252
|
+
requiresIfExists: r.arrayOf(r.string)
|
|
1253
|
+
})),
|
|
1254
|
+
/**
|
|
1255
|
+
* If `true`, the component is shown.
|
|
1256
|
+
*/
|
|
1257
|
+
open: r.bool.isRequired,
|
|
1258
|
+
/**
|
|
1259
|
+
* Popper placement.
|
|
1260
|
+
* @default 'bottom'
|
|
1261
|
+
*/
|
|
1262
|
+
placement: r.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
1263
|
+
/**
|
|
1264
|
+
* Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
|
|
1265
|
+
* @default {}
|
|
1266
|
+
*/
|
|
1267
|
+
popperOptions: r.shape({
|
|
1268
|
+
modifiers: r.array,
|
|
1269
|
+
onFirstUpdate: r.func,
|
|
1270
|
+
placement: r.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
1271
|
+
strategy: r.oneOf(["absolute", "fixed"])
|
|
1272
|
+
}),
|
|
1273
|
+
/**
|
|
1274
|
+
* A ref that points to the used popper instance.
|
|
1275
|
+
*/
|
|
1276
|
+
popperRef: bt,
|
|
1277
|
+
/**
|
|
1278
|
+
* The props used for each slot inside the Popper.
|
|
1279
|
+
* @default {}
|
|
1280
|
+
*/
|
|
1281
|
+
slotProps: r.shape({
|
|
1282
|
+
root: r.oneOfType([r.func, r.object])
|
|
1283
|
+
}),
|
|
1284
|
+
/**
|
|
1285
|
+
* The components used for each slot inside the Popper.
|
|
1286
|
+
* Either a string to use a HTML element or a component.
|
|
1287
|
+
* @default {}
|
|
1288
|
+
*/
|
|
1289
|
+
slots: r.shape({
|
|
1290
|
+
root: r.elementType
|
|
1291
|
+
}),
|
|
1292
|
+
/**
|
|
1293
|
+
* Help supporting a react-transition-group/Transition component.
|
|
1294
|
+
* @default false
|
|
1295
|
+
*/
|
|
1296
|
+
transition: r.bool
|
|
1297
|
+
});
|
|
1298
|
+
const ea = ["anchorEl", "component", "components", "componentsProps", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "transition", "slots", "slotProps"], ta = M(Mo, {
|
|
1299
|
+
name: "MuiPopper",
|
|
1300
|
+
slot: "Root",
|
|
1301
|
+
overridesResolver: (e, t) => t.root
|
|
1302
|
+
})({}), Ft = /* @__PURE__ */ j.forwardRef(function(t, o) {
|
|
1303
|
+
var n;
|
|
1304
|
+
const a = Po(), i = yt({
|
|
1305
|
+
props: t,
|
|
1306
|
+
name: "MuiPopper"
|
|
1307
|
+
}), {
|
|
1308
|
+
anchorEl: l,
|
|
1309
|
+
component: c,
|
|
1310
|
+
components: s,
|
|
1311
|
+
componentsProps: d,
|
|
1312
|
+
container: p,
|
|
1313
|
+
disablePortal: f,
|
|
1314
|
+
keepMounted: y,
|
|
1315
|
+
modifiers: m,
|
|
1316
|
+
open: P,
|
|
1317
|
+
placement: g,
|
|
1318
|
+
popperOptions: w,
|
|
1319
|
+
popperRef: O,
|
|
1320
|
+
transition: u,
|
|
1321
|
+
slots: v,
|
|
1322
|
+
slotProps: h
|
|
1323
|
+
} = i, x = Oe(i, ea), b = (n = v == null ? void 0 : v.root) != null ? n : s == null ? void 0 : s.Root, C = T({
|
|
1324
|
+
anchorEl: l,
|
|
1325
|
+
container: p,
|
|
1326
|
+
disablePortal: f,
|
|
1327
|
+
keepMounted: y,
|
|
1328
|
+
modifiers: m,
|
|
1329
|
+
open: P,
|
|
1330
|
+
placement: g,
|
|
1331
|
+
popperOptions: w,
|
|
1332
|
+
popperRef: O,
|
|
1333
|
+
transition: u
|
|
1334
|
+
}, x);
|
|
1335
|
+
return /* @__PURE__ */ R.jsx(ta, T({
|
|
1336
|
+
as: c,
|
|
1337
|
+
direction: a == null ? void 0 : a.direction,
|
|
1338
|
+
slots: {
|
|
1339
|
+
root: b
|
|
1340
|
+
},
|
|
1341
|
+
slotProps: h ?? d
|
|
1342
|
+
}, C, {
|
|
1343
|
+
ref: o
|
|
1344
|
+
}));
|
|
1345
|
+
});
|
|
1346
|
+
process.env.NODE_ENV !== "production" && (Ft.propTypes = {
|
|
1347
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
1348
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
1349
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
1350
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
1351
|
+
/**
|
|
1352
|
+
* An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
|
|
1353
|
+
* or a function that returns either.
|
|
1354
|
+
* It's used to set the position of the popper.
|
|
1355
|
+
* The return value will passed as the reference object of the Popper instance.
|
|
1356
|
+
*/
|
|
1357
|
+
anchorEl: r.oneOfType([ut, r.object, r.func]),
|
|
1358
|
+
/**
|
|
1359
|
+
* Popper render function or node.
|
|
1360
|
+
*/
|
|
1361
|
+
children: r.oneOfType([r.node, r.func]),
|
|
1362
|
+
/**
|
|
1363
|
+
* The component used for the root node.
|
|
1364
|
+
* Either a string to use a HTML element or a component.
|
|
1365
|
+
*/
|
|
1366
|
+
component: r.elementType,
|
|
1367
|
+
/**
|
|
1368
|
+
* The components used for each slot inside the Popper.
|
|
1369
|
+
* Either a string to use a HTML element or a component.
|
|
1370
|
+
* @default {}
|
|
1371
|
+
*/
|
|
1372
|
+
components: r.shape({
|
|
1373
|
+
Root: r.elementType
|
|
1374
|
+
}),
|
|
1375
|
+
/**
|
|
1376
|
+
* The props used for each slot inside the Popper.
|
|
1377
|
+
* @default {}
|
|
1378
|
+
*/
|
|
1379
|
+
componentsProps: r.shape({
|
|
1380
|
+
root: r.oneOfType([r.func, r.object])
|
|
1381
|
+
}),
|
|
1382
|
+
/**
|
|
1383
|
+
* An HTML element or function that returns one.
|
|
1384
|
+
* The `container` will have the portal children appended to it.
|
|
1385
|
+
*
|
|
1386
|
+
* You can also provide a callback, which is called in a React layout effect.
|
|
1387
|
+
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
|
1388
|
+
*
|
|
1389
|
+
* By default, it uses the body of the top-level document object,
|
|
1390
|
+
* so it's simply `document.body` most of the time.
|
|
1391
|
+
*/
|
|
1392
|
+
container: r.oneOfType([ut, r.func]),
|
|
1393
|
+
/**
|
|
1394
|
+
* The `children` will be under the DOM hierarchy of the parent component.
|
|
1395
|
+
* @default false
|
|
1396
|
+
*/
|
|
1397
|
+
disablePortal: r.bool,
|
|
1398
|
+
/**
|
|
1399
|
+
* Always keep the children in the DOM.
|
|
1400
|
+
* This prop can be useful in SEO situation or
|
|
1401
|
+
* when you want to maximize the responsiveness of the Popper.
|
|
1402
|
+
* @default false
|
|
1403
|
+
*/
|
|
1404
|
+
keepMounted: r.bool,
|
|
1405
|
+
/**
|
|
1406
|
+
* Popper.js is based on a "plugin-like" architecture,
|
|
1407
|
+
* most of its features are fully encapsulated "modifiers".
|
|
1408
|
+
*
|
|
1409
|
+
* A modifier is a function that is called each time Popper.js needs to
|
|
1410
|
+
* compute the position of the popper.
|
|
1411
|
+
* For this reason, modifiers should be very performant to avoid bottlenecks.
|
|
1412
|
+
* To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
|
|
1413
|
+
*/
|
|
1414
|
+
modifiers: r.arrayOf(r.shape({
|
|
1415
|
+
data: r.object,
|
|
1416
|
+
effect: r.func,
|
|
1417
|
+
enabled: r.bool,
|
|
1418
|
+
fn: r.func,
|
|
1419
|
+
name: r.any,
|
|
1420
|
+
options: r.object,
|
|
1421
|
+
phase: r.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]),
|
|
1422
|
+
requires: r.arrayOf(r.string),
|
|
1423
|
+
requiresIfExists: r.arrayOf(r.string)
|
|
1424
|
+
})),
|
|
1425
|
+
/**
|
|
1426
|
+
* If `true`, the component is shown.
|
|
1427
|
+
*/
|
|
1428
|
+
open: r.bool.isRequired,
|
|
1429
|
+
/**
|
|
1430
|
+
* Popper placement.
|
|
1431
|
+
* @default 'bottom'
|
|
1432
|
+
*/
|
|
1433
|
+
placement: r.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
1434
|
+
/**
|
|
1435
|
+
* Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
|
|
1436
|
+
* @default {}
|
|
1437
|
+
*/
|
|
1438
|
+
popperOptions: r.shape({
|
|
1439
|
+
modifiers: r.array,
|
|
1440
|
+
onFirstUpdate: r.func,
|
|
1441
|
+
placement: r.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
1442
|
+
strategy: r.oneOf(["absolute", "fixed"])
|
|
1443
|
+
}),
|
|
1444
|
+
/**
|
|
1445
|
+
* A ref that points to the used popper instance.
|
|
1446
|
+
*/
|
|
1447
|
+
popperRef: bt,
|
|
1448
|
+
/**
|
|
1449
|
+
* The props used for each slot inside the Popper.
|
|
1450
|
+
* @default {}
|
|
1451
|
+
*/
|
|
1452
|
+
slotProps: r.shape({
|
|
1453
|
+
root: r.oneOfType([r.func, r.object])
|
|
1454
|
+
}),
|
|
1455
|
+
/**
|
|
1456
|
+
* The components used for each slot inside the Popper.
|
|
1457
|
+
* Either a string to use a HTML element or a component.
|
|
1458
|
+
* @default {}
|
|
1459
|
+
*/
|
|
1460
|
+
slots: r.shape({
|
|
1461
|
+
root: r.elementType
|
|
1462
|
+
}),
|
|
1463
|
+
/**
|
|
1464
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1465
|
+
*/
|
|
1466
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
|
|
1467
|
+
/**
|
|
1468
|
+
* Help supporting a react-transition-group/Transition component.
|
|
1469
|
+
* @default false
|
|
1470
|
+
*/
|
|
1471
|
+
transition: r.bool
|
|
1472
|
+
});
|
|
1473
|
+
function oa(e) {
|
|
1474
|
+
return ze("PrivateSwitchBase", e);
|
|
1475
|
+
}
|
|
1476
|
+
qe("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
|
|
1477
|
+
const ra = ["autoFocus", "checked", "checkedIcon", "className", "defaultChecked", "disabled", "disableFocusRipple", "edge", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"], na = (e) => {
|
|
1478
|
+
const {
|
|
1479
|
+
classes: t,
|
|
1480
|
+
checked: o,
|
|
1481
|
+
disabled: n,
|
|
1482
|
+
edge: a
|
|
1483
|
+
} = e, i = {
|
|
1484
|
+
root: ["root", o && "checked", n && "disabled", a && `edge${le(a)}`],
|
|
1485
|
+
input: ["input"]
|
|
1486
|
+
};
|
|
1487
|
+
return Xe(i, oa, t);
|
|
1488
|
+
}, aa = M(nr)(({
|
|
1489
|
+
ownerState: e
|
|
1490
|
+
}) => T({
|
|
1491
|
+
padding: 9,
|
|
1492
|
+
borderRadius: "50%"
|
|
1493
|
+
}, e.edge === "start" && {
|
|
1494
|
+
marginLeft: e.size === "small" ? -3 : -12
|
|
1495
|
+
}, e.edge === "end" && {
|
|
1496
|
+
marginRight: e.size === "small" ? -3 : -12
|
|
1497
|
+
})), ia = M("input", {
|
|
1498
|
+
shouldForwardProp: ar
|
|
1499
|
+
})({
|
|
1500
|
+
cursor: "inherit",
|
|
1501
|
+
position: "absolute",
|
|
1502
|
+
opacity: 0,
|
|
1503
|
+
width: "100%",
|
|
1504
|
+
height: "100%",
|
|
1505
|
+
top: 0,
|
|
1506
|
+
left: 0,
|
|
1507
|
+
margin: 0,
|
|
1508
|
+
padding: 0,
|
|
1509
|
+
zIndex: 1
|
|
1510
|
+
}), Bo = /* @__PURE__ */ j.forwardRef(function(t, o) {
|
|
1511
|
+
const {
|
|
1512
|
+
autoFocus: n,
|
|
1513
|
+
checked: a,
|
|
1514
|
+
checkedIcon: i,
|
|
1515
|
+
className: l,
|
|
1516
|
+
defaultChecked: c,
|
|
1517
|
+
disabled: s,
|
|
1518
|
+
disableFocusRipple: d = !1,
|
|
1519
|
+
edge: p = !1,
|
|
1520
|
+
icon: f,
|
|
1521
|
+
id: y,
|
|
1522
|
+
inputProps: m,
|
|
1523
|
+
inputRef: P,
|
|
1524
|
+
name: g,
|
|
1525
|
+
onBlur: w,
|
|
1526
|
+
onChange: O,
|
|
1527
|
+
onFocus: u,
|
|
1528
|
+
readOnly: v,
|
|
1529
|
+
required: h = !1,
|
|
1530
|
+
tabIndex: x,
|
|
1531
|
+
type: b,
|
|
1532
|
+
value: C
|
|
1533
|
+
} = t, L = Oe(t, ra), [k, $] = xo({
|
|
1534
|
+
controlled: a,
|
|
1535
|
+
default: !!c,
|
|
1536
|
+
name: "SwitchBase",
|
|
1537
|
+
state: "checked"
|
|
1538
|
+
}), S = ir(), I = (_) => {
|
|
1539
|
+
u && u(_), S && S.onFocus && S.onFocus(_);
|
|
1540
|
+
}, D = (_) => {
|
|
1541
|
+
w && w(_), S && S.onBlur && S.onBlur(_);
|
|
1542
|
+
}, z = (_) => {
|
|
1543
|
+
if (_.nativeEvent.defaultPrevented)
|
|
1544
|
+
return;
|
|
1545
|
+
const ie = _.target.checked;
|
|
1546
|
+
$(ie), O && O(_, ie);
|
|
1547
|
+
};
|
|
1548
|
+
let W = s;
|
|
1549
|
+
S && typeof W > "u" && (W = S.disabled);
|
|
1550
|
+
const A = b === "checkbox" || b === "radio", N = T({}, t, {
|
|
1551
|
+
checked: k,
|
|
1552
|
+
disabled: W,
|
|
1553
|
+
disableFocusRipple: d,
|
|
1554
|
+
edge: p
|
|
1555
|
+
}), B = na(N);
|
|
1556
|
+
return /* @__PURE__ */ R.jsxs(aa, T({
|
|
1557
|
+
component: "span",
|
|
1558
|
+
className: ye(B.root, l),
|
|
1559
|
+
centerRipple: !0,
|
|
1560
|
+
focusRipple: !d,
|
|
1561
|
+
disabled: W,
|
|
1562
|
+
tabIndex: null,
|
|
1563
|
+
role: void 0,
|
|
1564
|
+
onFocus: I,
|
|
1565
|
+
onBlur: D,
|
|
1566
|
+
ownerState: N,
|
|
1567
|
+
ref: o
|
|
1568
|
+
}, L, {
|
|
1569
|
+
children: [/* @__PURE__ */ R.jsx(ia, T({
|
|
1570
|
+
autoFocus: n,
|
|
1571
|
+
checked: a,
|
|
1572
|
+
defaultChecked: c,
|
|
1573
|
+
className: B.input,
|
|
1574
|
+
disabled: W,
|
|
1575
|
+
id: A ? y : void 0,
|
|
1576
|
+
name: g,
|
|
1577
|
+
onChange: z,
|
|
1578
|
+
readOnly: v,
|
|
1579
|
+
ref: P,
|
|
1580
|
+
required: h,
|
|
1581
|
+
ownerState: N,
|
|
1582
|
+
tabIndex: x,
|
|
1583
|
+
type: b
|
|
1584
|
+
}, b === "checkbox" && C === void 0 ? {} : {
|
|
1585
|
+
value: C
|
|
1586
|
+
}, m)), k ? i : f]
|
|
1587
|
+
}));
|
|
1588
|
+
});
|
|
1589
|
+
process.env.NODE_ENV !== "production" && (Bo.propTypes = {
|
|
1590
|
+
/**
|
|
1591
|
+
* If `true`, the `input` element is focused during the first mount.
|
|
1592
|
+
*/
|
|
1593
|
+
autoFocus: r.bool,
|
|
1594
|
+
/**
|
|
1595
|
+
* If `true`, the component is checked.
|
|
1596
|
+
*/
|
|
1597
|
+
checked: r.bool,
|
|
1598
|
+
/**
|
|
1599
|
+
* The icon to display when the component is checked.
|
|
1600
|
+
*/
|
|
1601
|
+
checkedIcon: r.node.isRequired,
|
|
1602
|
+
/**
|
|
1603
|
+
* Override or extend the styles applied to the component.
|
|
1604
|
+
*/
|
|
1605
|
+
classes: r.object,
|
|
1606
|
+
/**
|
|
1607
|
+
* @ignore
|
|
1608
|
+
*/
|
|
1609
|
+
className: r.string,
|
|
1610
|
+
/**
|
|
1611
|
+
* @ignore
|
|
1612
|
+
*/
|
|
1613
|
+
defaultChecked: r.bool,
|
|
1614
|
+
/**
|
|
1615
|
+
* If `true`, the component is disabled.
|
|
1616
|
+
*/
|
|
1617
|
+
disabled: r.bool,
|
|
1618
|
+
/**
|
|
1619
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
1620
|
+
* @default false
|
|
1621
|
+
*/
|
|
1622
|
+
disableFocusRipple: r.bool,
|
|
1623
|
+
/**
|
|
1624
|
+
* If given, uses a negative margin to counteract the padding on one
|
|
1625
|
+
* side (this is often helpful for aligning the left or right
|
|
1626
|
+
* side of the icon with content above or below, without ruining the border
|
|
1627
|
+
* size and shape).
|
|
1628
|
+
* @default false
|
|
1629
|
+
*/
|
|
1630
|
+
edge: r.oneOf(["end", "start", !1]),
|
|
1631
|
+
/**
|
|
1632
|
+
* The icon to display when the component is unchecked.
|
|
1633
|
+
*/
|
|
1634
|
+
icon: r.node.isRequired,
|
|
1635
|
+
/**
|
|
1636
|
+
* The id of the `input` element.
|
|
1637
|
+
*/
|
|
1638
|
+
id: r.string,
|
|
1639
|
+
/**
|
|
1640
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
1641
|
+
*/
|
|
1642
|
+
inputProps: r.object,
|
|
1643
|
+
/**
|
|
1644
|
+
* Pass a ref to the `input` element.
|
|
1645
|
+
*/
|
|
1646
|
+
inputRef: bt,
|
|
1647
|
+
/*
|
|
1648
|
+
* @ignore
|
|
1649
|
+
*/
|
|
1650
|
+
name: r.string,
|
|
1651
|
+
/**
|
|
1652
|
+
* @ignore
|
|
1653
|
+
*/
|
|
1654
|
+
onBlur: r.func,
|
|
1655
|
+
/**
|
|
1656
|
+
* Callback fired when the state is changed.
|
|
1657
|
+
*
|
|
1658
|
+
* @param {object} event The event source of the callback.
|
|
1659
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
1660
|
+
*/
|
|
1661
|
+
onChange: r.func,
|
|
1662
|
+
/**
|
|
1663
|
+
* @ignore
|
|
1664
|
+
*/
|
|
1665
|
+
onFocus: r.func,
|
|
1666
|
+
/**
|
|
1667
|
+
* It prevents the user from changing the value of the field
|
|
1668
|
+
* (not from interacting with the field).
|
|
1669
|
+
*/
|
|
1670
|
+
readOnly: r.bool,
|
|
1671
|
+
/**
|
|
1672
|
+
* If `true`, the `input` element is required.
|
|
1673
|
+
*/
|
|
1674
|
+
required: r.bool,
|
|
1675
|
+
/**
|
|
1676
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1677
|
+
*/
|
|
1678
|
+
sx: r.object,
|
|
1679
|
+
/**
|
|
1680
|
+
* @ignore
|
|
1681
|
+
*/
|
|
1682
|
+
tabIndex: r.oneOfType([r.number, r.string]),
|
|
1683
|
+
/**
|
|
1684
|
+
* The input component prop `type`.
|
|
1685
|
+
*/
|
|
1686
|
+
type: r.string.isRequired,
|
|
1687
|
+
/**
|
|
1688
|
+
* The value of the component.
|
|
1689
|
+
*/
|
|
1690
|
+
value: r.any
|
|
1691
|
+
});
|
|
1692
|
+
function sa(e) {
|
|
1693
|
+
return ze("MuiSkeleton", e);
|
|
1694
|
+
}
|
|
1695
|
+
qe("MuiSkeleton", ["root", "text", "rectangular", "rounded", "circular", "pulse", "wave", "withChildren", "fitContent", "heightAuto"]);
|
|
1696
|
+
const ca = ["animation", "className", "component", "height", "style", "variant", "width"];
|
|
1697
|
+
let gt = (e) => e, vo, go, bo, yo;
|
|
1698
|
+
const la = (e) => {
|
|
1699
|
+
const {
|
|
1700
|
+
classes: t,
|
|
1701
|
+
variant: o,
|
|
1702
|
+
animation: n,
|
|
1703
|
+
hasChildren: a,
|
|
1704
|
+
width: i,
|
|
1705
|
+
height: l
|
|
1706
|
+
} = e;
|
|
1707
|
+
return Xe({
|
|
1708
|
+
root: ["root", o, n, a && "withChildren", a && !i && "fitContent", a && !l && "heightAuto"]
|
|
1709
|
+
}, sa, t);
|
|
1710
|
+
}, pa = Oo(vo || (vo = gt`
|
|
1711
|
+
0% {
|
|
1712
|
+
opacity: 1;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
50% {
|
|
1716
|
+
opacity: 0.4;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
100% {
|
|
1720
|
+
opacity: 1;
|
|
1721
|
+
}
|
|
1722
|
+
`)), da = Oo(go || (go = gt`
|
|
1723
|
+
0% {
|
|
1724
|
+
transform: translateX(-100%);
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
50% {
|
|
1728
|
+
/* +0.5s of delay between each loop */
|
|
1729
|
+
transform: translateX(100%);
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
100% {
|
|
1733
|
+
transform: translateX(100%);
|
|
1734
|
+
}
|
|
1735
|
+
`)), ua = M("span", {
|
|
1736
|
+
name: "MuiSkeleton",
|
|
1737
|
+
slot: "Root",
|
|
1738
|
+
overridesResolver: (e, t) => {
|
|
1739
|
+
const {
|
|
1740
|
+
ownerState: o
|
|
1741
|
+
} = e;
|
|
1742
|
+
return [t.root, t[o.variant], o.animation !== !1 && t[o.animation], o.hasChildren && t.withChildren, o.hasChildren && !o.width && t.fitContent, o.hasChildren && !o.height && t.heightAuto];
|
|
1743
|
+
}
|
|
1744
|
+
})(({
|
|
1745
|
+
theme: e,
|
|
1746
|
+
ownerState: t
|
|
1747
|
+
}) => {
|
|
1748
|
+
const o = Sr(e.shape.borderRadius) || "px", n = Ar(e.shape.borderRadius);
|
|
1749
|
+
return T({
|
|
1750
|
+
display: "block",
|
|
1751
|
+
// Create a "on paper" color with sufficient contrast retaining the color
|
|
1752
|
+
backgroundColor: e.vars ? e.vars.palette.Skeleton.bg : jr(e.palette.text.primary, e.palette.mode === "light" ? 0.11 : 0.13),
|
|
1753
|
+
height: "1.2em"
|
|
1754
|
+
}, t.variant === "text" && {
|
|
1755
|
+
marginTop: 0,
|
|
1756
|
+
marginBottom: 0,
|
|
1757
|
+
height: "auto",
|
|
1758
|
+
transformOrigin: "0 55%",
|
|
1759
|
+
transform: "scale(1, 0.60)",
|
|
1760
|
+
borderRadius: `${n}${o}/${Math.round(n / 0.6 * 10) / 10}${o}`,
|
|
1761
|
+
"&:empty:before": {
|
|
1762
|
+
content: '"\\00a0"'
|
|
1763
|
+
}
|
|
1764
|
+
}, t.variant === "circular" && {
|
|
1765
|
+
borderRadius: "50%"
|
|
1766
|
+
}, t.variant === "rounded" && {
|
|
1767
|
+
borderRadius: (e.vars || e).shape.borderRadius
|
|
1768
|
+
}, t.hasChildren && {
|
|
1769
|
+
"& > *": {
|
|
1770
|
+
visibility: "hidden"
|
|
1771
|
+
}
|
|
1772
|
+
}, t.hasChildren && !t.width && {
|
|
1773
|
+
maxWidth: "fit-content"
|
|
1774
|
+
}, t.hasChildren && !t.height && {
|
|
1775
|
+
height: "auto"
|
|
1776
|
+
});
|
|
1777
|
+
}, ({
|
|
1778
|
+
ownerState: e
|
|
1779
|
+
}) => e.animation === "pulse" && ro(bo || (bo = gt`
|
|
1780
|
+
animation: ${0} 2s ease-in-out 0.5s infinite;
|
|
1781
|
+
`), pa), ({
|
|
1782
|
+
ownerState: e,
|
|
1783
|
+
theme: t
|
|
1784
|
+
}) => e.animation === "wave" && ro(yo || (yo = gt`
|
|
1785
|
+
position: relative;
|
|
1786
|
+
overflow: hidden;
|
|
1787
|
+
|
|
1788
|
+
/* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
|
|
1789
|
+
-webkit-mask-image: -webkit-radial-gradient(white, black);
|
|
1790
|
+
|
|
1791
|
+
&::after {
|
|
1792
|
+
animation: ${0} 2s linear 0.5s infinite;
|
|
1793
|
+
background: linear-gradient(
|
|
1794
|
+
90deg,
|
|
1795
|
+
transparent,
|
|
1796
|
+
${0},
|
|
1797
|
+
transparent
|
|
1798
|
+
);
|
|
1799
|
+
content: '';
|
|
1800
|
+
position: absolute;
|
|
1801
|
+
transform: translateX(-100%); /* Avoid flash during server-side hydration */
|
|
1802
|
+
bottom: 0;
|
|
1803
|
+
left: 0;
|
|
1804
|
+
right: 0;
|
|
1805
|
+
top: 0;
|
|
1806
|
+
}
|
|
1807
|
+
`), da, (t.vars || t).palette.action.hover)), Io = /* @__PURE__ */ j.forwardRef(function(t, o) {
|
|
1808
|
+
const n = yt({
|
|
1809
|
+
props: t,
|
|
1810
|
+
name: "MuiSkeleton"
|
|
1811
|
+
}), {
|
|
1812
|
+
animation: a = "pulse",
|
|
1813
|
+
className: i,
|
|
1814
|
+
component: l = "span",
|
|
1815
|
+
height: c,
|
|
1816
|
+
style: s,
|
|
1817
|
+
variant: d = "text",
|
|
1818
|
+
width: p
|
|
1819
|
+
} = n, f = Oe(n, ca), y = T({}, n, {
|
|
1820
|
+
animation: a,
|
|
1821
|
+
component: l,
|
|
1822
|
+
variant: d,
|
|
1823
|
+
hasChildren: !!f.children
|
|
1824
|
+
}), m = la(y);
|
|
1825
|
+
return /* @__PURE__ */ R.jsx(ua, T({
|
|
1826
|
+
as: l,
|
|
1827
|
+
ref: o,
|
|
1828
|
+
className: ye(m.root, i),
|
|
1829
|
+
ownerState: y
|
|
1830
|
+
}, f, {
|
|
1831
|
+
style: T({
|
|
1832
|
+
width: p,
|
|
1833
|
+
height: c
|
|
1834
|
+
}, s)
|
|
1835
|
+
}));
|
|
1836
|
+
});
|
|
1837
|
+
process.env.NODE_ENV !== "production" && (Io.propTypes = {
|
|
1838
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
1839
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
1840
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
1841
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
1842
|
+
/**
|
|
1843
|
+
* The animation.
|
|
1844
|
+
* If `false` the animation effect is disabled.
|
|
1845
|
+
* @default 'pulse'
|
|
1846
|
+
*/
|
|
1847
|
+
animation: r.oneOf(["pulse", "wave", !1]),
|
|
1848
|
+
/**
|
|
1849
|
+
* Optional children to infer width and height from.
|
|
1850
|
+
*/
|
|
1851
|
+
children: r.node,
|
|
1852
|
+
/**
|
|
1853
|
+
* Override or extend the styles applied to the component.
|
|
1854
|
+
*/
|
|
1855
|
+
classes: r.object,
|
|
1856
|
+
/**
|
|
1857
|
+
* @ignore
|
|
1858
|
+
*/
|
|
1859
|
+
className: r.string,
|
|
1860
|
+
/**
|
|
1861
|
+
* The component used for the root node.
|
|
1862
|
+
* Either a string to use a HTML element or a component.
|
|
1863
|
+
*/
|
|
1864
|
+
component: r.elementType,
|
|
1865
|
+
/**
|
|
1866
|
+
* Height of the skeleton.
|
|
1867
|
+
* Useful when you don't want to adapt the skeleton to a text element but for instance a card.
|
|
1868
|
+
*/
|
|
1869
|
+
height: r.oneOfType([r.number, r.string]),
|
|
1870
|
+
/**
|
|
1871
|
+
* @ignore
|
|
1872
|
+
*/
|
|
1873
|
+
style: r.object,
|
|
1874
|
+
/**
|
|
1875
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1876
|
+
*/
|
|
1877
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
|
|
1878
|
+
/**
|
|
1879
|
+
* The type of content that will be rendered.
|
|
1880
|
+
* @default 'text'
|
|
1881
|
+
*/
|
|
1882
|
+
variant: r.oneOfType([r.oneOf(["circular", "rectangular", "rounded", "text"]), r.string]),
|
|
1883
|
+
/**
|
|
1884
|
+
* Width of the skeleton.
|
|
1885
|
+
* Useful when the skeleton is inside an inline element with no width of its own.
|
|
1886
|
+
*/
|
|
1887
|
+
width: r.oneOfType([r.number, r.string])
|
|
1888
|
+
});
|
|
1889
|
+
function fa(e) {
|
|
1890
|
+
return ze("MuiTooltip", e);
|
|
1891
|
+
}
|
|
1892
|
+
const fe = qe("MuiTooltip", ["popper", "popperInteractive", "popperArrow", "popperClose", "tooltip", "tooltipArrow", "touch", "tooltipPlacementLeft", "tooltipPlacementRight", "tooltipPlacementTop", "tooltipPlacementBottom", "arrow"]), ha = ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "slotProps", "slots", "title", "TransitionComponent", "TransitionProps"];
|
|
1893
|
+
function ma(e) {
|
|
1894
|
+
return Math.round(e * 1e5) / 1e5;
|
|
1895
|
+
}
|
|
1896
|
+
const va = (e) => {
|
|
1897
|
+
const {
|
|
1898
|
+
classes: t,
|
|
1899
|
+
disableInteractive: o,
|
|
1900
|
+
arrow: n,
|
|
1901
|
+
touch: a,
|
|
1902
|
+
placement: i
|
|
1903
|
+
} = e, l = {
|
|
1904
|
+
popper: ["popper", !o && "popperInteractive", n && "popperArrow"],
|
|
1905
|
+
tooltip: ["tooltip", n && "tooltipArrow", a && "touch", `tooltipPlacement${le(i.split("-")[0])}`],
|
|
1906
|
+
arrow: ["arrow"]
|
|
1907
|
+
};
|
|
1908
|
+
return Xe(l, fa, t);
|
|
1909
|
+
}, ga = M(Ft, {
|
|
1910
|
+
name: "MuiTooltip",
|
|
1911
|
+
slot: "Popper",
|
|
1912
|
+
overridesResolver: (e, t) => {
|
|
1913
|
+
const {
|
|
1914
|
+
ownerState: o
|
|
1915
|
+
} = e;
|
|
1916
|
+
return [t.popper, !o.disableInteractive && t.popperInteractive, o.arrow && t.popperArrow, !o.open && t.popperClose];
|
|
1917
|
+
}
|
|
1918
|
+
})(({
|
|
1919
|
+
theme: e,
|
|
1920
|
+
ownerState: t,
|
|
1921
|
+
open: o
|
|
1922
|
+
}) => T({
|
|
1923
|
+
zIndex: (e.vars || e).zIndex.tooltip,
|
|
1924
|
+
pointerEvents: "none"
|
|
1925
|
+
}, !t.disableInteractive && {
|
|
1926
|
+
pointerEvents: "auto"
|
|
1927
|
+
}, !o && {
|
|
1928
|
+
pointerEvents: "none"
|
|
1929
|
+
}, t.arrow && {
|
|
1930
|
+
[`&[data-popper-placement*="bottom"] .${fe.arrow}`]: {
|
|
1931
|
+
top: 0,
|
|
1932
|
+
marginTop: "-0.71em",
|
|
1933
|
+
"&::before": {
|
|
1934
|
+
transformOrigin: "0 100%"
|
|
1935
|
+
}
|
|
1936
|
+
},
|
|
1937
|
+
[`&[data-popper-placement*="top"] .${fe.arrow}`]: {
|
|
1938
|
+
bottom: 0,
|
|
1939
|
+
marginBottom: "-0.71em",
|
|
1940
|
+
"&::before": {
|
|
1941
|
+
transformOrigin: "100% 0"
|
|
1942
|
+
}
|
|
1943
|
+
},
|
|
1944
|
+
[`&[data-popper-placement*="right"] .${fe.arrow}`]: T({}, t.isRtl ? {
|
|
1945
|
+
right: 0,
|
|
1946
|
+
marginRight: "-0.71em"
|
|
1947
|
+
} : {
|
|
1948
|
+
left: 0,
|
|
1949
|
+
marginLeft: "-0.71em"
|
|
1950
|
+
}, {
|
|
1951
|
+
height: "1em",
|
|
1952
|
+
width: "0.71em",
|
|
1953
|
+
"&::before": {
|
|
1954
|
+
transformOrigin: "100% 100%"
|
|
1955
|
+
}
|
|
1956
|
+
}),
|
|
1957
|
+
[`&[data-popper-placement*="left"] .${fe.arrow}`]: T({}, t.isRtl ? {
|
|
1958
|
+
left: 0,
|
|
1959
|
+
marginLeft: "-0.71em"
|
|
1960
|
+
} : {
|
|
1961
|
+
right: 0,
|
|
1962
|
+
marginRight: "-0.71em"
|
|
1963
|
+
}, {
|
|
1964
|
+
height: "1em",
|
|
1965
|
+
width: "0.71em",
|
|
1966
|
+
"&::before": {
|
|
1967
|
+
transformOrigin: "0 0"
|
|
1968
|
+
}
|
|
1969
|
+
})
|
|
1970
|
+
})), ba = M("div", {
|
|
1971
|
+
name: "MuiTooltip",
|
|
1972
|
+
slot: "Tooltip",
|
|
1973
|
+
overridesResolver: (e, t) => {
|
|
1974
|
+
const {
|
|
1975
|
+
ownerState: o
|
|
1976
|
+
} = e;
|
|
1977
|
+
return [t.tooltip, o.touch && t.touch, o.arrow && t.tooltipArrow, t[`tooltipPlacement${le(o.placement.split("-")[0])}`]];
|
|
1978
|
+
}
|
|
1979
|
+
})(({
|
|
1980
|
+
theme: e,
|
|
1981
|
+
ownerState: t
|
|
1982
|
+
}) => T({
|
|
1983
|
+
backgroundColor: e.vars ? e.vars.palette.Tooltip.bg : ft(e.palette.grey[700], 0.92),
|
|
1984
|
+
borderRadius: (e.vars || e).shape.borderRadius,
|
|
1985
|
+
color: (e.vars || e).palette.common.white,
|
|
1986
|
+
fontFamily: e.typography.fontFamily,
|
|
1987
|
+
padding: "4px 8px",
|
|
1988
|
+
fontSize: e.typography.pxToRem(11),
|
|
1989
|
+
maxWidth: 300,
|
|
1990
|
+
margin: 2,
|
|
1991
|
+
wordWrap: "break-word",
|
|
1992
|
+
fontWeight: e.typography.fontWeightMedium
|
|
1993
|
+
}, t.arrow && {
|
|
1994
|
+
position: "relative",
|
|
1995
|
+
margin: 0
|
|
1996
|
+
}, t.touch && {
|
|
1997
|
+
padding: "8px 16px",
|
|
1998
|
+
fontSize: e.typography.pxToRem(14),
|
|
1999
|
+
lineHeight: `${ma(16 / 14)}em`,
|
|
2000
|
+
fontWeight: e.typography.fontWeightRegular
|
|
2001
|
+
}, {
|
|
2002
|
+
[`.${fe.popper}[data-popper-placement*="left"] &`]: T({
|
|
2003
|
+
transformOrigin: "right center"
|
|
2004
|
+
}, t.isRtl ? T({
|
|
2005
|
+
marginLeft: "14px"
|
|
2006
|
+
}, t.touch && {
|
|
2007
|
+
marginLeft: "24px"
|
|
2008
|
+
}) : T({
|
|
2009
|
+
marginRight: "14px"
|
|
2010
|
+
}, t.touch && {
|
|
2011
|
+
marginRight: "24px"
|
|
2012
|
+
})),
|
|
2013
|
+
[`.${fe.popper}[data-popper-placement*="right"] &`]: T({
|
|
2014
|
+
transformOrigin: "left center"
|
|
2015
|
+
}, t.isRtl ? T({
|
|
2016
|
+
marginRight: "14px"
|
|
2017
|
+
}, t.touch && {
|
|
2018
|
+
marginRight: "24px"
|
|
2019
|
+
}) : T({
|
|
2020
|
+
marginLeft: "14px"
|
|
2021
|
+
}, t.touch && {
|
|
2022
|
+
marginLeft: "24px"
|
|
2023
|
+
})),
|
|
2024
|
+
[`.${fe.popper}[data-popper-placement*="top"] &`]: T({
|
|
2025
|
+
transformOrigin: "center bottom",
|
|
2026
|
+
marginBottom: "14px"
|
|
2027
|
+
}, t.touch && {
|
|
2028
|
+
marginBottom: "24px"
|
|
2029
|
+
}),
|
|
2030
|
+
[`.${fe.popper}[data-popper-placement*="bottom"] &`]: T({
|
|
2031
|
+
transformOrigin: "center top",
|
|
2032
|
+
marginTop: "14px"
|
|
2033
|
+
}, t.touch && {
|
|
2034
|
+
marginTop: "24px"
|
|
2035
|
+
})
|
|
2036
|
+
})), ya = M("span", {
|
|
2037
|
+
name: "MuiTooltip",
|
|
2038
|
+
slot: "Arrow",
|
|
2039
|
+
overridesResolver: (e, t) => t.arrow
|
|
2040
|
+
})(({
|
|
2041
|
+
theme: e
|
|
2042
|
+
}) => ({
|
|
2043
|
+
overflow: "hidden",
|
|
2044
|
+
position: "absolute",
|
|
2045
|
+
width: "1em",
|
|
2046
|
+
height: "0.71em",
|
|
2047
|
+
boxSizing: "border-box",
|
|
2048
|
+
color: e.vars ? e.vars.palette.Tooltip.bg : ft(e.palette.grey[700], 0.9),
|
|
2049
|
+
"&::before": {
|
|
2050
|
+
content: '""',
|
|
2051
|
+
margin: "auto",
|
|
2052
|
+
display: "block",
|
|
2053
|
+
width: "100%",
|
|
2054
|
+
height: "100%",
|
|
2055
|
+
backgroundColor: "currentColor",
|
|
2056
|
+
transform: "rotate(45deg)"
|
|
2057
|
+
}
|
|
2058
|
+
}));
|
|
2059
|
+
let ct = !1;
|
|
2060
|
+
const wo = new ur();
|
|
2061
|
+
let We = {
|
|
2062
|
+
x: 0,
|
|
2063
|
+
y: 0
|
|
2064
|
+
};
|
|
2065
|
+
function lt(e, t) {
|
|
2066
|
+
return (o, ...n) => {
|
|
2067
|
+
t && t(o, ...n), e(o, ...n);
|
|
2068
|
+
};
|
|
2069
|
+
}
|
|
2070
|
+
const St = /* @__PURE__ */ j.forwardRef(function(t, o) {
|
|
2071
|
+
var n, a, i, l, c, s, d, p, f, y, m, P, g, w, O, u, v, h, x;
|
|
2072
|
+
const b = yt({
|
|
2073
|
+
props: t,
|
|
2074
|
+
name: "MuiTooltip"
|
|
2075
|
+
}), {
|
|
2076
|
+
arrow: C = !1,
|
|
2077
|
+
children: L,
|
|
2078
|
+
components: k = {},
|
|
2079
|
+
componentsProps: $ = {},
|
|
2080
|
+
describeChild: S = !1,
|
|
2081
|
+
disableFocusListener: I = !1,
|
|
2082
|
+
disableHoverListener: D = !1,
|
|
2083
|
+
disableInteractive: z = !1,
|
|
2084
|
+
disableTouchListener: W = !1,
|
|
2085
|
+
enterDelay: A = 100,
|
|
2086
|
+
enterNextDelay: N = 0,
|
|
2087
|
+
enterTouchDelay: B = 700,
|
|
2088
|
+
followCursor: _ = !1,
|
|
2089
|
+
id: ie,
|
|
2090
|
+
leaveDelay: Te = 0,
|
|
2091
|
+
leaveTouchDelay: me = 1500,
|
|
2092
|
+
onClose: ve,
|
|
2093
|
+
onOpen: se,
|
|
2094
|
+
open: te,
|
|
2095
|
+
placement: de = "bottom",
|
|
2096
|
+
PopperComponent: ue,
|
|
2097
|
+
PopperProps: U = {},
|
|
2098
|
+
slotProps: oe = {},
|
|
2099
|
+
slots: Ee = {},
|
|
2100
|
+
title: Q,
|
|
2101
|
+
TransitionComponent: Ot = ao,
|
|
2102
|
+
TransitionProps: Ge
|
|
2103
|
+
} = b, Ze = Oe(b, ha), G = /* @__PURE__ */ j.isValidElement(L) ? L : /* @__PURE__ */ R.jsx("span", {
|
|
2104
|
+
children: L
|
|
2105
|
+
}), Ae = sr(), Ke = cr(), [V, Je] = j.useState(), [re, Ce] = j.useState(null), ge = j.useRef(!1), Pe = z || _, Re = nt(), ke = nt(), be = nt(), De = nt(), [et, Vt] = xo({
|
|
2106
|
+
controlled: te,
|
|
2107
|
+
default: !1,
|
|
2108
|
+
name: "Tooltip",
|
|
2109
|
+
state: "open"
|
|
2110
|
+
});
|
|
2111
|
+
let ce = et;
|
|
2112
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2113
|
+
const {
|
|
2114
|
+
current: E
|
|
2115
|
+
} = j.useRef(te !== void 0);
|
|
2116
|
+
j.useEffect(() => {
|
|
2117
|
+
V && V.disabled && !E && Q !== "" && V.tagName.toLowerCase() === "button" && console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.", "A disabled element does not fire events.", "Tooltip needs to listen to the child element's events to display the title.", "", "Add a simple wrapper element, such as a `span`."].join(`
|
|
2118
|
+
`));
|
|
2119
|
+
}, [Q, V, E]);
|
|
2120
|
+
}
|
|
2121
|
+
const Tt = lr(ie), Ne = j.useRef(), tt = no(() => {
|
|
2122
|
+
Ne.current !== void 0 && (document.body.style.WebkitUserSelect = Ne.current, Ne.current = void 0), De.clear();
|
|
2123
|
+
});
|
|
2124
|
+
j.useEffect(() => tt, [tt]);
|
|
2125
|
+
const Ht = (E) => {
|
|
2126
|
+
wo.clear(), ct = !0, Vt(!0), se && !ce && se(E);
|
|
2127
|
+
}, ot = no(
|
|
2128
|
+
/**
|
|
2129
|
+
* @param {React.SyntheticEvent | Event} event
|
|
2130
|
+
*/
|
|
2131
|
+
(E) => {
|
|
2132
|
+
wo.start(800 + Te, () => {
|
|
2133
|
+
ct = !1;
|
|
2134
|
+
}), Vt(!1), ve && ce && ve(E), Re.start(Ae.transitions.duration.shortest, () => {
|
|
2135
|
+
ge.current = !1;
|
|
2136
|
+
});
|
|
2137
|
+
}
|
|
2138
|
+
), rt = (E) => {
|
|
2139
|
+
ge.current && E.type !== "touchstart" || (V && V.removeAttribute("title"), ke.clear(), be.clear(), A || ct && N ? ke.start(ct ? N : A, () => {
|
|
2140
|
+
Ht(E);
|
|
2141
|
+
}) : Ht(E));
|
|
2142
|
+
}, Et = (E) => {
|
|
2143
|
+
ke.clear(), be.start(Te, () => {
|
|
2144
|
+
ot(E);
|
|
2145
|
+
});
|
|
2146
|
+
}, {
|
|
2147
|
+
isFocusVisibleRef: qt,
|
|
2148
|
+
onBlur: Uo,
|
|
2149
|
+
onFocus: Fo,
|
|
2150
|
+
ref: Vo
|
|
2151
|
+
} = pr(), [, zt] = j.useState(!1), Xt = (E) => {
|
|
2152
|
+
Uo(E), qt.current === !1 && (zt(!1), Et(E));
|
|
2153
|
+
}, Yt = (E) => {
|
|
2154
|
+
V || Je(E.currentTarget), Fo(E), qt.current === !0 && (zt(!0), rt(E));
|
|
2155
|
+
}, Qt = (E) => {
|
|
2156
|
+
ge.current = !0;
|
|
2157
|
+
const X = G.props;
|
|
2158
|
+
X.onTouchStart && X.onTouchStart(E);
|
|
2159
|
+
}, Ho = (E) => {
|
|
2160
|
+
Qt(E), be.clear(), Re.clear(), tt(), Ne.current = document.body.style.WebkitUserSelect, document.body.style.WebkitUserSelect = "none", De.start(B, () => {
|
|
2161
|
+
document.body.style.WebkitUserSelect = Ne.current, rt(E);
|
|
2162
|
+
});
|
|
2163
|
+
}, qo = (E) => {
|
|
2164
|
+
G.props.onTouchEnd && G.props.onTouchEnd(E), tt(), be.start(me, () => {
|
|
2165
|
+
ot(E);
|
|
2166
|
+
});
|
|
2167
|
+
};
|
|
2168
|
+
j.useEffect(() => {
|
|
2169
|
+
if (!ce)
|
|
2170
|
+
return;
|
|
2171
|
+
function E(X) {
|
|
2172
|
+
(X.key === "Escape" || X.key === "Esc") && ot(X);
|
|
2173
|
+
}
|
|
2174
|
+
return document.addEventListener("keydown", E), () => {
|
|
2175
|
+
document.removeEventListener("keydown", E);
|
|
2176
|
+
};
|
|
2177
|
+
}, [ot, ce]);
|
|
2178
|
+
const zo = kt(G.ref, Vo, Je, o);
|
|
2179
|
+
!Q && Q !== 0 && (ce = !1);
|
|
2180
|
+
const Ct = j.useRef(), Xo = (E) => {
|
|
2181
|
+
const X = G.props;
|
|
2182
|
+
X.onMouseMove && X.onMouseMove(E), We = {
|
|
2183
|
+
x: E.clientX,
|
|
2184
|
+
y: E.clientY
|
|
2185
|
+
}, Ct.current && Ct.current.update();
|
|
2186
|
+
}, _e = {}, Pt = typeof Q == "string";
|
|
2187
|
+
S ? (_e.title = !ce && Pt && !D ? Q : null, _e["aria-describedby"] = ce ? Tt : null) : (_e["aria-label"] = Pt ? Q : null, _e["aria-labelledby"] = ce && !Pt ? Tt : null);
|
|
2188
|
+
const Z = T({}, _e, Ze, G.props, {
|
|
2189
|
+
className: ye(Ze.className, G.props.className),
|
|
2190
|
+
onTouchStart: Qt,
|
|
2191
|
+
ref: zo
|
|
2192
|
+
}, _ ? {
|
|
2193
|
+
onMouseMove: Xo
|
|
2194
|
+
} : {});
|
|
2195
|
+
process.env.NODE_ENV !== "production" && (Z["data-mui-internal-clone-element"] = !0, j.useEffect(() => {
|
|
2196
|
+
V && !V.getAttribute("data-mui-internal-clone-element") && console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.", "Please make sure that props are spread on the same element that the ref is applied to."].join(`
|
|
2197
|
+
`));
|
|
2198
|
+
}, [V]));
|
|
2199
|
+
const Me = {};
|
|
2200
|
+
W || (Z.onTouchStart = Ho, Z.onTouchEnd = qo), D || (Z.onMouseOver = lt(rt, Z.onMouseOver), Z.onMouseLeave = lt(Et, Z.onMouseLeave), Pe || (Me.onMouseOver = rt, Me.onMouseLeave = Et)), I || (Z.onFocus = lt(Yt, Z.onFocus), Z.onBlur = lt(Xt, Z.onBlur), Pe || (Me.onFocus = Yt, Me.onBlur = Xt)), process.env.NODE_ENV !== "production" && G.props.title && console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.", `Remove this title prop \`${G.props.title}\` or the Tooltip component.`].join(`
|
|
2201
|
+
`));
|
|
2202
|
+
const Yo = j.useMemo(() => {
|
|
2203
|
+
var E;
|
|
2204
|
+
let X = [{
|
|
2205
|
+
name: "arrow",
|
|
2206
|
+
enabled: !!re,
|
|
2207
|
+
options: {
|
|
2208
|
+
element: re,
|
|
2209
|
+
padding: 4
|
|
2210
|
+
}
|
|
2211
|
+
}];
|
|
2212
|
+
return (E = U.popperOptions) != null && E.modifiers && (X = X.concat(U.popperOptions.modifiers)), T({}, U.popperOptions, {
|
|
2213
|
+
modifiers: X
|
|
2214
|
+
});
|
|
2215
|
+
}, [re, U]), Be = T({}, b, {
|
|
2216
|
+
isRtl: Ke,
|
|
2217
|
+
arrow: C,
|
|
2218
|
+
disableInteractive: Pe,
|
|
2219
|
+
placement: de,
|
|
2220
|
+
PopperComponentProp: ue,
|
|
2221
|
+
touch: ge.current
|
|
2222
|
+
}), Rt = va(Be), Gt = (n = (a = Ee.popper) != null ? a : k.Popper) != null ? n : ga, Zt = (i = (l = (c = Ee.transition) != null ? c : k.Transition) != null ? l : Ot) != null ? i : ao, Kt = (s = (d = Ee.tooltip) != null ? d : k.Tooltip) != null ? s : ba, Jt = (p = (f = Ee.arrow) != null ? f : k.Arrow) != null ? p : ya, Qo = at(Gt, T({}, U, (y = oe.popper) != null ? y : $.popper, {
|
|
2223
|
+
className: ye(Rt.popper, U == null ? void 0 : U.className, (m = (P = oe.popper) != null ? P : $.popper) == null ? void 0 : m.className)
|
|
2224
|
+
}), Be), Go = at(Zt, T({}, Ge, (g = oe.transition) != null ? g : $.transition), Be), Zo = at(Kt, T({}, (w = oe.tooltip) != null ? w : $.tooltip, {
|
|
2225
|
+
className: ye(Rt.tooltip, (O = (u = oe.tooltip) != null ? u : $.tooltip) == null ? void 0 : O.className)
|
|
2226
|
+
}), Be), Ko = at(Jt, T({}, (v = oe.arrow) != null ? v : $.arrow, {
|
|
2227
|
+
className: ye(Rt.arrow, (h = (x = oe.arrow) != null ? x : $.arrow) == null ? void 0 : h.className)
|
|
2228
|
+
}), Be);
|
|
2229
|
+
return /* @__PURE__ */ R.jsxs(j.Fragment, {
|
|
2230
|
+
children: [/* @__PURE__ */ j.cloneElement(G, Z), /* @__PURE__ */ R.jsx(Gt, T({
|
|
2231
|
+
as: ue ?? Ft,
|
|
2232
|
+
placement: de,
|
|
2233
|
+
anchorEl: _ ? {
|
|
2234
|
+
getBoundingClientRect: () => ({
|
|
2235
|
+
top: We.y,
|
|
2236
|
+
left: We.x,
|
|
2237
|
+
right: We.x,
|
|
2238
|
+
bottom: We.y,
|
|
2239
|
+
width: 0,
|
|
2240
|
+
height: 0
|
|
2241
|
+
})
|
|
2242
|
+
} : V,
|
|
2243
|
+
popperRef: Ct,
|
|
2244
|
+
open: V ? ce : !1,
|
|
2245
|
+
id: Tt,
|
|
2246
|
+
transition: !0
|
|
2247
|
+
}, Me, Qo, {
|
|
2248
|
+
popperOptions: Yo,
|
|
2249
|
+
children: ({
|
|
2250
|
+
TransitionProps: E
|
|
2251
|
+
}) => /* @__PURE__ */ R.jsx(Zt, T({
|
|
2252
|
+
timeout: Ae.transitions.duration.shorter
|
|
2253
|
+
}, E, Go, {
|
|
2254
|
+
children: /* @__PURE__ */ R.jsxs(Kt, T({}, Zo, {
|
|
2255
|
+
children: [Q, C ? /* @__PURE__ */ R.jsx(Jt, T({}, Ko, {
|
|
2256
|
+
ref: Ce
|
|
2257
|
+
})) : null]
|
|
2258
|
+
}))
|
|
2259
|
+
}))
|
|
2260
|
+
}))]
|
|
2261
|
+
});
|
|
2262
|
+
});
|
|
2263
|
+
process.env.NODE_ENV !== "production" && (St.propTypes = {
|
|
2264
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
2265
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
2266
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
2267
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
2268
|
+
/**
|
|
2269
|
+
* If `true`, adds an arrow to the tooltip.
|
|
2270
|
+
* @default false
|
|
2271
|
+
*/
|
|
2272
|
+
arrow: r.bool,
|
|
2273
|
+
/**
|
|
2274
|
+
* Tooltip reference element.
|
|
2275
|
+
*/
|
|
2276
|
+
children: dr.isRequired,
|
|
2277
|
+
/**
|
|
2278
|
+
* Override or extend the styles applied to the component.
|
|
2279
|
+
*/
|
|
2280
|
+
classes: r.object,
|
|
2281
|
+
/**
|
|
2282
|
+
* @ignore
|
|
2283
|
+
*/
|
|
2284
|
+
className: r.string,
|
|
2285
|
+
/**
|
|
2286
|
+
* The components used for each slot inside.
|
|
2287
|
+
*
|
|
2288
|
+
* This prop is an alias for the `slots` prop.
|
|
2289
|
+
* It's recommended to use the `slots` prop instead.
|
|
2290
|
+
*
|
|
2291
|
+
* @default {}
|
|
2292
|
+
*/
|
|
2293
|
+
components: r.shape({
|
|
2294
|
+
Arrow: r.elementType,
|
|
2295
|
+
Popper: r.elementType,
|
|
2296
|
+
Tooltip: r.elementType,
|
|
2297
|
+
Transition: r.elementType
|
|
2298
|
+
}),
|
|
2299
|
+
/**
|
|
2300
|
+
* The extra props for the slot components.
|
|
2301
|
+
* You can override the existing props or add new ones.
|
|
2302
|
+
*
|
|
2303
|
+
* This prop is an alias for the `slotProps` prop.
|
|
2304
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
2305
|
+
*
|
|
2306
|
+
* @default {}
|
|
2307
|
+
*/
|
|
2308
|
+
componentsProps: r.shape({
|
|
2309
|
+
arrow: r.object,
|
|
2310
|
+
popper: r.object,
|
|
2311
|
+
tooltip: r.object,
|
|
2312
|
+
transition: r.object
|
|
2313
|
+
}),
|
|
2314
|
+
/**
|
|
2315
|
+
* Set to `true` if the `title` acts as an accessible description.
|
|
2316
|
+
* By default the `title` acts as an accessible label for the child.
|
|
2317
|
+
* @default false
|
|
2318
|
+
*/
|
|
2319
|
+
describeChild: r.bool,
|
|
2320
|
+
/**
|
|
2321
|
+
* Do not respond to focus-visible events.
|
|
2322
|
+
* @default false
|
|
2323
|
+
*/
|
|
2324
|
+
disableFocusListener: r.bool,
|
|
2325
|
+
/**
|
|
2326
|
+
* Do not respond to hover events.
|
|
2327
|
+
* @default false
|
|
2328
|
+
*/
|
|
2329
|
+
disableHoverListener: r.bool,
|
|
2330
|
+
/**
|
|
2331
|
+
* Makes a tooltip not interactive, i.e. it will close when the user
|
|
2332
|
+
* hovers over the tooltip before the `leaveDelay` is expired.
|
|
2333
|
+
* @default false
|
|
2334
|
+
*/
|
|
2335
|
+
disableInteractive: r.bool,
|
|
2336
|
+
/**
|
|
2337
|
+
* Do not respond to long press touch events.
|
|
2338
|
+
* @default false
|
|
2339
|
+
*/
|
|
2340
|
+
disableTouchListener: r.bool,
|
|
2341
|
+
/**
|
|
2342
|
+
* The number of milliseconds to wait before showing the tooltip.
|
|
2343
|
+
* This prop won't impact the enter touch delay (`enterTouchDelay`).
|
|
2344
|
+
* @default 100
|
|
2345
|
+
*/
|
|
2346
|
+
enterDelay: r.number,
|
|
2347
|
+
/**
|
|
2348
|
+
* The number of milliseconds to wait before showing the tooltip when one was already recently opened.
|
|
2349
|
+
* @default 0
|
|
2350
|
+
*/
|
|
2351
|
+
enterNextDelay: r.number,
|
|
2352
|
+
/**
|
|
2353
|
+
* The number of milliseconds a user must touch the element before showing the tooltip.
|
|
2354
|
+
* @default 700
|
|
2355
|
+
*/
|
|
2356
|
+
enterTouchDelay: r.number,
|
|
2357
|
+
/**
|
|
2358
|
+
* If `true`, the tooltip follow the cursor over the wrapped element.
|
|
2359
|
+
* @default false
|
|
2360
|
+
*/
|
|
2361
|
+
followCursor: r.bool,
|
|
2362
|
+
/**
|
|
2363
|
+
* This prop is used to help implement the accessibility logic.
|
|
2364
|
+
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
2365
|
+
*/
|
|
2366
|
+
id: r.string,
|
|
2367
|
+
/**
|
|
2368
|
+
* The number of milliseconds to wait before hiding the tooltip.
|
|
2369
|
+
* This prop won't impact the leave touch delay (`leaveTouchDelay`).
|
|
2370
|
+
* @default 0
|
|
2371
|
+
*/
|
|
2372
|
+
leaveDelay: r.number,
|
|
2373
|
+
/**
|
|
2374
|
+
* The number of milliseconds after the user stops touching an element before hiding the tooltip.
|
|
2375
|
+
* @default 1500
|
|
2376
|
+
*/
|
|
2377
|
+
leaveTouchDelay: r.number,
|
|
2378
|
+
/**
|
|
2379
|
+
* Callback fired when the component requests to be closed.
|
|
2380
|
+
*
|
|
2381
|
+
* @param {React.SyntheticEvent} event The event source of the callback.
|
|
2382
|
+
*/
|
|
2383
|
+
onClose: r.func,
|
|
2384
|
+
/**
|
|
2385
|
+
* Callback fired when the component requests to be open.
|
|
2386
|
+
*
|
|
2387
|
+
* @param {React.SyntheticEvent} event The event source of the callback.
|
|
2388
|
+
*/
|
|
2389
|
+
onOpen: r.func,
|
|
2390
|
+
/**
|
|
2391
|
+
* If `true`, the component is shown.
|
|
2392
|
+
*/
|
|
2393
|
+
open: r.bool,
|
|
2394
|
+
/**
|
|
2395
|
+
* Tooltip placement.
|
|
2396
|
+
* @default 'bottom'
|
|
2397
|
+
*/
|
|
2398
|
+
placement: r.oneOf(["bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
2399
|
+
/**
|
|
2400
|
+
* The component used for the popper.
|
|
2401
|
+
* @default Popper
|
|
2402
|
+
*/
|
|
2403
|
+
PopperComponent: r.elementType,
|
|
2404
|
+
/**
|
|
2405
|
+
* Props applied to the [`Popper`](/material-ui/api/popper/) element.
|
|
2406
|
+
* @default {}
|
|
2407
|
+
*/
|
|
2408
|
+
PopperProps: r.object,
|
|
2409
|
+
/**
|
|
2410
|
+
* The extra props for the slot components.
|
|
2411
|
+
* You can override the existing props or add new ones.
|
|
2412
|
+
*
|
|
2413
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
2414
|
+
*
|
|
2415
|
+
* @default {}
|
|
2416
|
+
*/
|
|
2417
|
+
slotProps: r.shape({
|
|
2418
|
+
arrow: r.object,
|
|
2419
|
+
popper: r.object,
|
|
2420
|
+
tooltip: r.object,
|
|
2421
|
+
transition: r.object
|
|
2422
|
+
}),
|
|
2423
|
+
/**
|
|
2424
|
+
* The components used for each slot inside.
|
|
2425
|
+
*
|
|
2426
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
2427
|
+
*
|
|
2428
|
+
* @default {}
|
|
2429
|
+
*/
|
|
2430
|
+
slots: r.shape({
|
|
2431
|
+
arrow: r.elementType,
|
|
2432
|
+
popper: r.elementType,
|
|
2433
|
+
tooltip: r.elementType,
|
|
2434
|
+
transition: r.elementType
|
|
2435
|
+
}),
|
|
2436
|
+
/**
|
|
2437
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
2438
|
+
*/
|
|
2439
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
|
|
2440
|
+
/**
|
|
2441
|
+
* Tooltip title. Zero-length titles string, undefined, null and false are never displayed.
|
|
2442
|
+
*/
|
|
2443
|
+
title: r.node,
|
|
2444
|
+
/**
|
|
2445
|
+
* The component used for the transition.
|
|
2446
|
+
* [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
2447
|
+
* @default Grow
|
|
2448
|
+
*/
|
|
2449
|
+
TransitionComponent: r.elementType,
|
|
2450
|
+
/**
|
|
2451
|
+
* Props applied to the transition element.
|
|
2452
|
+
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
|
2453
|
+
*/
|
|
2454
|
+
TransitionProps: r.object
|
|
2455
|
+
});
|
|
2456
|
+
function wa(e) {
|
|
2457
|
+
return ze("MuiSwitch", e);
|
|
2458
|
+
}
|
|
2459
|
+
const F = qe("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium", "checked", "disabled", "input", "thumb", "track"]), xa = ["className", "color", "edge", "size", "sx"], Oa = (e) => {
|
|
2460
|
+
const {
|
|
2461
|
+
classes: t,
|
|
2462
|
+
edge: o,
|
|
2463
|
+
size: n,
|
|
2464
|
+
color: a,
|
|
2465
|
+
checked: i,
|
|
2466
|
+
disabled: l
|
|
2467
|
+
} = e, c = {
|
|
2468
|
+
root: ["root", o && `edge${le(o)}`, `size${le(n)}`],
|
|
2469
|
+
switchBase: ["switchBase", `color${le(a)}`, i && "checked", l && "disabled"],
|
|
2470
|
+
thumb: ["thumb"],
|
|
2471
|
+
track: ["track"],
|
|
2472
|
+
input: ["input"]
|
|
2473
|
+
}, s = Xe(c, wa, t);
|
|
2474
|
+
return T({}, t, s);
|
|
2475
|
+
}, Ta = M("span", {
|
|
2476
|
+
name: "MuiSwitch",
|
|
2477
|
+
slot: "Root",
|
|
2478
|
+
overridesResolver: (e, t) => {
|
|
2479
|
+
const {
|
|
2480
|
+
ownerState: o
|
|
2481
|
+
} = e;
|
|
2482
|
+
return [t.root, o.edge && t[`edge${le(o.edge)}`], t[`size${le(o.size)}`]];
|
|
2483
|
+
}
|
|
2484
|
+
})({
|
|
2485
|
+
display: "inline-flex",
|
|
2486
|
+
width: 34 + 12 * 2,
|
|
2487
|
+
height: 14 + 12 * 2,
|
|
2488
|
+
overflow: "hidden",
|
|
2489
|
+
padding: 12,
|
|
2490
|
+
boxSizing: "border-box",
|
|
2491
|
+
position: "relative",
|
|
2492
|
+
flexShrink: 0,
|
|
2493
|
+
zIndex: 0,
|
|
2494
|
+
// Reset the stacking context.
|
|
2495
|
+
verticalAlign: "middle",
|
|
2496
|
+
// For correct alignment with the text.
|
|
2497
|
+
"@media print": {
|
|
2498
|
+
colorAdjust: "exact"
|
|
2499
|
+
},
|
|
2500
|
+
variants: [{
|
|
2501
|
+
props: {
|
|
2502
|
+
edge: "start"
|
|
2503
|
+
},
|
|
2504
|
+
style: {
|
|
2505
|
+
marginLeft: -8
|
|
2506
|
+
}
|
|
2507
|
+
}, {
|
|
2508
|
+
props: {
|
|
2509
|
+
edge: "end"
|
|
2510
|
+
},
|
|
2511
|
+
style: {
|
|
2512
|
+
marginRight: -8
|
|
2513
|
+
}
|
|
2514
|
+
}, {
|
|
2515
|
+
props: {
|
|
2516
|
+
size: "small"
|
|
2517
|
+
},
|
|
2518
|
+
style: {
|
|
2519
|
+
width: 40,
|
|
2520
|
+
height: 24,
|
|
2521
|
+
padding: 7,
|
|
2522
|
+
[`& .${F.thumb}`]: {
|
|
2523
|
+
width: 16,
|
|
2524
|
+
height: 16
|
|
2525
|
+
},
|
|
2526
|
+
[`& .${F.switchBase}`]: {
|
|
2527
|
+
padding: 4,
|
|
2528
|
+
[`&.${F.checked}`]: {
|
|
2529
|
+
transform: "translateX(16px)"
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
}]
|
|
2534
|
+
}), Ea = M(Bo, {
|
|
2535
|
+
name: "MuiSwitch",
|
|
2536
|
+
slot: "SwitchBase",
|
|
2537
|
+
overridesResolver: (e, t) => {
|
|
2538
|
+
const {
|
|
2539
|
+
ownerState: o
|
|
2540
|
+
} = e;
|
|
2541
|
+
return [t.switchBase, {
|
|
2542
|
+
[`& .${F.input}`]: t.input
|
|
2543
|
+
}, o.color !== "default" && t[`color${le(o.color)}`]];
|
|
2544
|
+
}
|
|
2545
|
+
})(({
|
|
2546
|
+
theme: e
|
|
2547
|
+
}) => ({
|
|
2548
|
+
position: "absolute",
|
|
2549
|
+
top: 0,
|
|
2550
|
+
left: 0,
|
|
2551
|
+
zIndex: 1,
|
|
2552
|
+
// Render above the focus ripple.
|
|
2553
|
+
color: e.vars ? e.vars.palette.Switch.defaultColor : `${e.palette.mode === "light" ? e.palette.common.white : e.palette.grey[300]}`,
|
|
2554
|
+
transition: e.transitions.create(["left", "transform"], {
|
|
2555
|
+
duration: e.transitions.duration.shortest
|
|
2556
|
+
}),
|
|
2557
|
+
[`&.${F.checked}`]: {
|
|
2558
|
+
transform: "translateX(20px)"
|
|
2559
|
+
},
|
|
2560
|
+
[`&.${F.disabled}`]: {
|
|
2561
|
+
color: e.vars ? e.vars.palette.Switch.defaultDisabledColor : `${e.palette.mode === "light" ? e.palette.grey[100] : e.palette.grey[600]}`
|
|
2562
|
+
},
|
|
2563
|
+
[`&.${F.checked} + .${F.track}`]: {
|
|
2564
|
+
opacity: 0.5
|
|
2565
|
+
},
|
|
2566
|
+
[`&.${F.disabled} + .${F.track}`]: {
|
|
2567
|
+
opacity: e.vars ? e.vars.opacity.switchTrackDisabled : `${e.palette.mode === "light" ? 0.12 : 0.2}`
|
|
2568
|
+
},
|
|
2569
|
+
[`& .${F.input}`]: {
|
|
2570
|
+
left: "-100%",
|
|
2571
|
+
width: "300%"
|
|
2572
|
+
}
|
|
2573
|
+
}), ({
|
|
2574
|
+
theme: e
|
|
2575
|
+
}) => ({
|
|
2576
|
+
"&:hover": {
|
|
2577
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})` : ft(e.palette.action.active, e.palette.action.hoverOpacity),
|
|
2578
|
+
// Reset on touch devices, it doesn't add specificity
|
|
2579
|
+
"@media (hover: none)": {
|
|
2580
|
+
backgroundColor: "transparent"
|
|
2581
|
+
}
|
|
2582
|
+
},
|
|
2583
|
+
variants: [...Object.entries(e.palette).filter(([, t]) => t.main && t.light).map(([t]) => ({
|
|
2584
|
+
props: {
|
|
2585
|
+
color: t
|
|
2586
|
+
},
|
|
2587
|
+
style: {
|
|
2588
|
+
[`&.${F.checked}`]: {
|
|
2589
|
+
color: (e.vars || e).palette[t].main,
|
|
2590
|
+
"&:hover": {
|
|
2591
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : ft(e.palette[t].main, e.palette.action.hoverOpacity),
|
|
2592
|
+
"@media (hover: none)": {
|
|
2593
|
+
backgroundColor: "transparent"
|
|
2594
|
+
}
|
|
2595
|
+
},
|
|
2596
|
+
[`&.${F.disabled}`]: {
|
|
2597
|
+
color: e.vars ? e.vars.palette.Switch[`${t}DisabledColor`] : `${e.palette.mode === "light" ? fr(e.palette[t].main, 0.62) : hr(e.palette[t].main, 0.55)}`
|
|
2598
|
+
}
|
|
2599
|
+
},
|
|
2600
|
+
[`&.${F.checked} + .${F.track}`]: {
|
|
2601
|
+
backgroundColor: (e.vars || e).palette[t].main
|
|
2602
|
+
}
|
|
2603
|
+
}
|
|
2604
|
+
}))]
|
|
2605
|
+
})), Ca = M("span", {
|
|
2606
|
+
name: "MuiSwitch",
|
|
2607
|
+
slot: "Track",
|
|
2608
|
+
overridesResolver: (e, t) => t.track
|
|
2609
|
+
})(({
|
|
2610
|
+
theme: e
|
|
2611
|
+
}) => ({
|
|
2612
|
+
height: "100%",
|
|
2613
|
+
width: "100%",
|
|
2614
|
+
borderRadius: 14 / 2,
|
|
2615
|
+
zIndex: -1,
|
|
2616
|
+
transition: e.transitions.create(["opacity", "background-color"], {
|
|
2617
|
+
duration: e.transitions.duration.shortest
|
|
2618
|
+
}),
|
|
2619
|
+
backgroundColor: e.vars ? e.vars.palette.common.onBackground : `${e.palette.mode === "light" ? e.palette.common.black : e.palette.common.white}`,
|
|
2620
|
+
opacity: e.vars ? e.vars.opacity.switchTrack : `${e.palette.mode === "light" ? 0.38 : 0.3}`
|
|
2621
|
+
})), Pa = M("span", {
|
|
2622
|
+
name: "MuiSwitch",
|
|
2623
|
+
slot: "Thumb",
|
|
2624
|
+
overridesResolver: (e, t) => t.thumb
|
|
2625
|
+
})(({
|
|
2626
|
+
theme: e
|
|
2627
|
+
}) => ({
|
|
2628
|
+
boxShadow: (e.vars || e).shadows[1],
|
|
2629
|
+
backgroundColor: "currentColor",
|
|
2630
|
+
width: 20,
|
|
2631
|
+
height: 20,
|
|
2632
|
+
borderRadius: "50%"
|
|
2633
|
+
})), Wo = /* @__PURE__ */ j.forwardRef(function(t, o) {
|
|
2634
|
+
const n = yt({
|
|
2635
|
+
props: t,
|
|
2636
|
+
name: "MuiSwitch"
|
|
2637
|
+
}), {
|
|
2638
|
+
className: a,
|
|
2639
|
+
color: i = "primary",
|
|
2640
|
+
edge: l = !1,
|
|
2641
|
+
size: c = "medium",
|
|
2642
|
+
sx: s
|
|
2643
|
+
} = n, d = Oe(n, xa), p = T({}, n, {
|
|
2644
|
+
color: i,
|
|
2645
|
+
edge: l,
|
|
2646
|
+
size: c
|
|
2647
|
+
}), f = Oa(p), y = /* @__PURE__ */ R.jsx(Pa, {
|
|
2648
|
+
className: f.thumb,
|
|
2649
|
+
ownerState: p
|
|
2650
|
+
});
|
|
2651
|
+
return /* @__PURE__ */ R.jsxs(Ta, {
|
|
2652
|
+
className: ye(f.root, a),
|
|
2653
|
+
sx: s,
|
|
2654
|
+
ownerState: p,
|
|
2655
|
+
children: [/* @__PURE__ */ R.jsx(Ea, T({
|
|
2656
|
+
type: "checkbox",
|
|
2657
|
+
icon: y,
|
|
2658
|
+
checkedIcon: y,
|
|
2659
|
+
ref: o,
|
|
2660
|
+
ownerState: p
|
|
2661
|
+
}, d, {
|
|
2662
|
+
classes: T({}, f, {
|
|
2663
|
+
root: f.switchBase
|
|
2664
|
+
})
|
|
2665
|
+
})), /* @__PURE__ */ R.jsx(Ca, {
|
|
2666
|
+
className: f.track,
|
|
2667
|
+
ownerState: p
|
|
2668
|
+
})]
|
|
2669
|
+
});
|
|
2670
|
+
});
|
|
2671
|
+
process.env.NODE_ENV !== "production" && (Wo.propTypes = {
|
|
2672
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
2673
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
2674
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
2675
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
2676
|
+
/**
|
|
2677
|
+
* If `true`, the component is checked.
|
|
2678
|
+
*/
|
|
2679
|
+
checked: r.bool,
|
|
2680
|
+
/**
|
|
2681
|
+
* The icon to display when the component is checked.
|
|
2682
|
+
*/
|
|
2683
|
+
checkedIcon: r.node,
|
|
2684
|
+
/**
|
|
2685
|
+
* Override or extend the styles applied to the component.
|
|
2686
|
+
*/
|
|
2687
|
+
classes: r.object,
|
|
2688
|
+
/**
|
|
2689
|
+
* @ignore
|
|
2690
|
+
*/
|
|
2691
|
+
className: r.string,
|
|
2692
|
+
/**
|
|
2693
|
+
* The color of the component.
|
|
2694
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
2695
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
2696
|
+
* @default 'primary'
|
|
2697
|
+
*/
|
|
2698
|
+
color: r.oneOfType([r.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), r.string]),
|
|
2699
|
+
/**
|
|
2700
|
+
* The default checked state. Use when the component is not controlled.
|
|
2701
|
+
*/
|
|
2702
|
+
defaultChecked: r.bool,
|
|
2703
|
+
/**
|
|
2704
|
+
* If `true`, the component is disabled.
|
|
2705
|
+
*/
|
|
2706
|
+
disabled: r.bool,
|
|
2707
|
+
/**
|
|
2708
|
+
* If `true`, the ripple effect is disabled.
|
|
2709
|
+
* @default false
|
|
2710
|
+
*/
|
|
2711
|
+
disableRipple: r.bool,
|
|
2712
|
+
/**
|
|
2713
|
+
* If given, uses a negative margin to counteract the padding on one
|
|
2714
|
+
* side (this is often helpful for aligning the left or right
|
|
2715
|
+
* side of the icon with content above or below, without ruining the border
|
|
2716
|
+
* size and shape).
|
|
2717
|
+
* @default false
|
|
2718
|
+
*/
|
|
2719
|
+
edge: r.oneOf(["end", "start", !1]),
|
|
2720
|
+
/**
|
|
2721
|
+
* The icon to display when the component is unchecked.
|
|
2722
|
+
*/
|
|
2723
|
+
icon: r.node,
|
|
2724
|
+
/**
|
|
2725
|
+
* The id of the `input` element.
|
|
2726
|
+
*/
|
|
2727
|
+
id: r.string,
|
|
2728
|
+
/**
|
|
2729
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
2730
|
+
*/
|
|
2731
|
+
inputProps: r.object,
|
|
2732
|
+
/**
|
|
2733
|
+
* Pass a ref to the `input` element.
|
|
2734
|
+
*/
|
|
2735
|
+
inputRef: bt,
|
|
2736
|
+
/**
|
|
2737
|
+
* Callback fired when the state is changed.
|
|
2738
|
+
*
|
|
2739
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
2740
|
+
* You can pull out the new value by accessing `event.target.value` (string).
|
|
2741
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
2742
|
+
*/
|
|
2743
|
+
onChange: r.func,
|
|
2744
|
+
/**
|
|
2745
|
+
* If `true`, the `input` element is required.
|
|
2746
|
+
* @default false
|
|
2747
|
+
*/
|
|
2748
|
+
required: r.bool,
|
|
2749
|
+
/**
|
|
2750
|
+
* The size of the component.
|
|
2751
|
+
* `small` is equivalent to the dense switch styling.
|
|
2752
|
+
* @default 'medium'
|
|
2753
|
+
*/
|
|
2754
|
+
size: r.oneOfType([r.oneOf(["medium", "small"]), r.string]),
|
|
2755
|
+
/**
|
|
2756
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
2757
|
+
*/
|
|
2758
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
|
|
2759
|
+
/**
|
|
2760
|
+
* The value of the component. The DOM API casts this to a string.
|
|
2761
|
+
* The browser uses "on" as the default value.
|
|
2762
|
+
*/
|
|
2763
|
+
value: r.any
|
|
2764
|
+
});
|
|
2765
|
+
const Qa = (e) => e.connectorLirary.connectorTemplateList, Ra = (e) => e.connectorLirary.connectorTemplates, Ga = (e) => e.connectorLirary.selectedConnectorData, Za = (e) => e.connectorLirary.templateListApiStatus, ka = (e) => e.connectorLirary.connectorList, La = (e) => e.connectorLirary.connectors, Ka = (e) => e.connectorLirary.selectedConnector, Ja = (e) => e.connectorLirary.templateDetailsApiStatus, $a = (e) => e.connectorLirary.currentUpdatingConnectors, ei = "Enhance with Custom Connectors", ti = "Let us know your use case, and we'll design and deliver a custom connector tailored to your needs within 2-3 working days.", oi = "Request new connector", ri = "Create your own (coming soon)", ni = "Request new API", ai = "Request a new connector", ja = "Tell us your use case and we will create a connector for you in 2-3 working days.", ii = `Request new connectors to get better customer context and key actions right into your inbox. ${ja}`, si = "Select an API", ci = "Select a connector", li = "Feel free to add specific details (Optional)", pi = "Submit Request", di = "Request submitted", ui = "Your request has been submitted successfully. We will get back to you within 2-3 working days", fi = "Done", Sa = "+Request new API", Aa = "Add connector", Da = "Edit connector", Na = "Enable", _a = "Disable", Ma = mr.withTypes(), pt = vr.withTypes(), hi = M(Io)`
|
|
2766
|
+
display: block;
|
|
2767
|
+
margin: ${(e) => e.margin ? e.margin : 0};
|
|
2768
|
+
`, Ba = M(At)`
|
|
2769
|
+
height: 60px;
|
|
2770
|
+
margin-bottom: 32px;
|
|
2771
|
+
max-width: 892px;
|
|
2772
|
+
box-sizing: border-box;
|
|
2773
|
+
|
|
2774
|
+
&.connector-grid,
|
|
2775
|
+
.connector-grid {
|
|
2776
|
+
display: grid;
|
|
2777
|
+
padding: 0 16px;
|
|
2778
|
+
width: 864px;
|
|
2779
|
+
}
|
|
2780
|
+
.connector-flex {
|
|
2781
|
+
cursor: pointer;
|
|
2782
|
+
display: flex;
|
|
2783
|
+
flex-direction: row;
|
|
2784
|
+
justify-content: space-between;
|
|
2785
|
+
padding: 16px;
|
|
2786
|
+
border: 1px solid ${Lt.palette.gray.gray5};
|
|
2787
|
+
border-radius: 4px;
|
|
2788
|
+
height: 60px;
|
|
2789
|
+
&:hover {
|
|
2790
|
+
background: ${Lt.palette.gray.gray6};
|
|
2791
|
+
}
|
|
2792
|
+
&.connector-settings {
|
|
2793
|
+
height: auto;
|
|
2794
|
+
cursor: auto;
|
|
2795
|
+
padding-top: 0;
|
|
2796
|
+
padding-bottom: 0;
|
|
2797
|
+
border: none;
|
|
2798
|
+
&:hover {
|
|
2799
|
+
background: white;
|
|
2800
|
+
}
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2803
|
+
img {
|
|
2804
|
+
max-height: 28px;
|
|
2805
|
+
max-width: 28px;
|
|
2806
|
+
&.logoIcon {
|
|
2807
|
+
margin-right: 9px;
|
|
2808
|
+
}
|
|
2809
|
+
}
|
|
2810
|
+
.settingsIcon {
|
|
2811
|
+
cursor: pointer;
|
|
2812
|
+
padding: 5px;
|
|
2813
|
+
}
|
|
2814
|
+
`, Ia = M(Eo)`
|
|
2815
|
+
height: 100%;
|
|
2816
|
+
display: flex;
|
|
2817
|
+
align-items: center;
|
|
2818
|
+
`, Wa = M(ht)`
|
|
2819
|
+
align-items: center;
|
|
2820
|
+
flex-direction: row;
|
|
2821
|
+
`, Ua = M(Wo)`
|
|
2822
|
+
margin-left: 10px;
|
|
2823
|
+
`, Fa = M(ht)`
|
|
2824
|
+
flex-direction: row;
|
|
2825
|
+
align-items: center;
|
|
2826
|
+
justify-content: center;
|
|
2827
|
+
width: 58px;
|
|
2828
|
+
height: 38px;
|
|
2829
|
+
position: relative;
|
|
2830
|
+
margin-left: 10px;
|
|
2831
|
+
`, Va = M(At)`
|
|
2832
|
+
margin-left: 30px;
|
|
2833
|
+
width: 50px;
|
|
2834
|
+
aspect-ratio: 1;
|
|
2835
|
+
border-radius: 50%;
|
|
2836
|
+
padding: 0;
|
|
2837
|
+
height: 20px;
|
|
2838
|
+
width: 20px;
|
|
2839
|
+
border: 4px solid #d1d7e3;
|
|
2840
|
+
border-right-color: #5d9bfb;
|
|
2841
|
+
animation: rotate 1s infinite linear;
|
|
2842
|
+
position: absolute;
|
|
2843
|
+
left: -10px;
|
|
2844
|
+
|
|
2845
|
+
@keyframes rotate {
|
|
2846
|
+
0%,
|
|
2847
|
+
15% {
|
|
2848
|
+
transform: rotate(0deg);
|
|
2849
|
+
}
|
|
2850
|
+
50% {
|
|
2851
|
+
transform: rotate(290deg);
|
|
2852
|
+
}
|
|
2853
|
+
100% {
|
|
2854
|
+
transform: rotate(360deg);
|
|
2855
|
+
}
|
|
2856
|
+
}
|
|
2857
|
+
`, Ha = M(To)`
|
|
2858
|
+
white-space: pre;
|
|
2859
|
+
width: 133px;
|
|
2860
|
+
height: 32px;
|
|
2861
|
+
`, qa = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_825_68286)'%3e%3cpath%20d='M16.192%2010.8165C16.2254%2010.5498%2016.2504%2010.2832%2016.2504%209.99984C16.2504%209.7165%2016.2254%209.44984%2016.192%209.18317L17.9504%207.80817C18.1087%207.68317%2018.1504%207.45817%2018.0504%207.27484L16.3837%204.3915C16.3087%204.25817%2016.167%204.18317%2016.017%204.18317C15.967%204.18317%2015.917%204.1915%2015.8754%204.20817L13.8004%205.0415C13.367%204.70817%2012.9004%204.43317%2012.392%204.22484L12.0754%202.0165C12.0504%201.8165%2011.8754%201.6665%2011.667%201.6665H8.33369C8.12535%201.6665%207.95035%201.8165%207.92535%202.0165L7.60869%204.22484C7.10035%204.43317%206.63369%204.7165%206.20035%205.0415L4.12535%204.20817C4.07535%204.1915%204.02535%204.18317%203.97535%204.18317C3.83369%204.18317%203.69202%204.25817%203.61702%204.3915L1.95035%207.27484C1.84202%207.45817%201.89202%207.68317%202.05035%207.80817L3.80869%209.18317C3.77535%209.44984%203.75035%209.72484%203.75035%209.99984C3.75035%2010.2748%203.77535%2010.5498%203.80869%2010.8165L2.05035%2012.1915C1.89202%2012.3165%201.85035%2012.5415%201.95035%2012.7248L3.61702%2015.6082C3.69202%2015.7415%203.83369%2015.8165%203.98369%2015.8165C4.03369%2015.8165%204.08369%2015.8082%204.12535%2015.7915L6.20035%2014.9582C6.63369%2015.2915%207.10035%2015.5665%207.60869%2015.7748L7.92535%2017.9832C7.95035%2018.1832%208.12535%2018.3332%208.33369%2018.3332H11.667C11.8754%2018.3332%2012.0504%2018.1832%2012.0754%2017.9832L12.392%2015.7748C12.9004%2015.5665%2013.367%2015.2832%2013.8004%2014.9582L15.8754%2015.7915C15.9254%2015.8082%2015.9754%2015.8165%2016.0254%2015.8165C16.167%2015.8165%2016.3087%2015.7415%2016.3837%2015.6082L18.0504%2012.7248C18.1504%2012.5415%2018.1087%2012.3165%2017.9504%2012.1915L16.192%2010.8165ZM14.542%209.3915C14.5754%209.64984%2014.5837%209.82484%2014.5837%209.99984C14.5837%2010.1748%2014.567%2010.3582%2014.542%2010.6082L14.4254%2011.5498L15.167%2012.1332L16.067%2012.8332L15.4837%2013.8415L14.4254%2013.4165L13.5587%2013.0665L12.8087%2013.6332C12.4504%2013.8998%2012.1087%2014.0998%2011.767%2014.2415L10.8837%2014.5998L10.7504%2015.5415L10.5837%2016.6665H9.41702L9.25869%2015.5415L9.12535%2014.5998L8.24202%2014.2415C7.88369%2014.0915%207.55035%2013.8998%207.21702%2013.6498L6.45869%2013.0665L5.57535%2013.4248L4.51702%2013.8498L3.93369%2012.8415L4.83369%2012.1415L5.57535%2011.5582L5.45869%2010.6165C5.43369%2010.3582%205.41702%2010.1665%205.41702%209.99984C5.41702%209.83317%205.43369%209.6415%205.45869%209.3915L5.57535%208.44984L4.83369%207.8665L3.93369%207.1665L4.51702%206.15817L5.57535%206.58317L6.44202%206.93317L7.19202%206.3665C7.55035%206.09984%207.89202%205.89984%208.23369%205.75817L9.11702%205.39984L9.25035%204.45817L9.41702%203.33317H10.5754L10.7337%204.45817L10.867%205.39984L11.7504%205.75817C12.1087%205.90817%2012.442%206.09984%2012.7754%206.34984L13.5337%206.93317L14.417%206.57484L15.4754%206.14984L16.0587%207.15817L15.167%207.8665L14.4254%208.44984L14.542%209.3915ZM10.0004%206.6665C8.15869%206.6665%206.66702%208.15817%206.66702%209.99984C6.66702%2011.8415%208.15869%2013.3332%2010.0004%2013.3332C11.842%2013.3332%2013.3337%2011.8415%2013.3337%209.99984C13.3337%208.15817%2011.842%206.6665%2010.0004%206.6665ZM10.0004%2011.6665C9.08369%2011.6665%208.33369%2010.9165%208.33369%209.99984C8.33369%209.08317%209.08369%208.33317%2010.0004%208.33317C10.917%208.33317%2011.667%209.08317%2011.667%209.99984C11.667%2010.9165%2010.917%2011.6665%2010.0004%2011.6665Z'%20fill='%236F7C90'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_825_68286'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", mi = ({
|
|
2862
|
+
setModal: e,
|
|
2863
|
+
isConfigSettingsPage: t = !1,
|
|
2864
|
+
currentConnector: o
|
|
2865
|
+
}) => {
|
|
2866
|
+
const n = gr(), { pathname: a } = br(), i = a === it.BASEPATH + it.CARD_SETTINGS, l = Ma(), c = pt(ka), s = pt(La), d = pt(Ra), p = pt($a), f = Pr();
|
|
2867
|
+
if (t && o && (f.current = i && (d != null && d[o]) ? d == null ? void 0 : d[o] : s == null ? void 0 : s[o]), Rr(() => {
|
|
2868
|
+
s || l(yr());
|
|
2869
|
+
}, [l, s]), t && !f.current) return null;
|
|
2870
|
+
const y = (u, v) => {
|
|
2871
|
+
u == null || u.stopPropagation(), l(Or({ id: v, enabled: u.target.checked }));
|
|
2872
|
+
}, m = (u) => {
|
|
2873
|
+
u == null || u.stopPropagation(), e == null || e(!0);
|
|
2874
|
+
}, P = (u) => {
|
|
2875
|
+
u == null || u.stopPropagation();
|
|
2876
|
+
}, g = (u) => {
|
|
2877
|
+
u == null || u.stopPropagation();
|
|
2878
|
+
}, w = (u, v = "") => {
|
|
2879
|
+
if (u == null || u.preventDefault(), u == null || u.stopPropagation(), t) return;
|
|
2880
|
+
const { updateCurrentSelectedConnector: h } = Er;
|
|
2881
|
+
l(h({ currentDashboard: v })), l(Tr(v)), n(it.BASEPATH + it.CONNECTOR_CONFIG);
|
|
2882
|
+
}, O = (u) => {
|
|
2883
|
+
const { id: v, isEnabled: h, name: x, logo: b, description: C } = u || {};
|
|
2884
|
+
return /* @__PURE__ */ R.jsxs(Ba, { "data-testid": v, className: "connector-grid", onClick: (L) => w(L, v), children: [
|
|
2885
|
+
/* @__PURE__ */ R.jsxs(ht, { className: `connector-flex ${t ? "connector-settings" : ""}`, width: "100%", children: [
|
|
2886
|
+
/* @__PURE__ */ R.jsxs(ht, { flexDirection: "row", alignItems: "center", children: [
|
|
2887
|
+
t ? /* @__PURE__ */ R.jsx("img", { src: b, className: "logoIcon", width: "28xp", height: "28px" }) : null,
|
|
2888
|
+
/* @__PURE__ */ R.jsx(Ia, { variant: "body1_medium", children: x })
|
|
2889
|
+
] }),
|
|
2890
|
+
t && typeof h != "boolean" ? /* @__PURE__ */ R.jsx(Ha, { variant: "contained", onClick: P, children: Aa }) : /* @__PURE__ */ R.jsxs(Wa, { children: [
|
|
2891
|
+
t ? null : /* @__PURE__ */ R.jsx(To, { variant: "text", onClick: m, children: Sa }),
|
|
2892
|
+
/* @__PURE__ */ R.jsx(St, { title: Da, placement: "bottom", children: /* @__PURE__ */ R.jsx(wr, { children: /* @__PURE__ */ R.jsx("img", { src: qa, className: "settingsIcon", onClick: g }) }) }),
|
|
2893
|
+
(p == null ? void 0 : p[v]) !== xr.LOADING ? /* @__PURE__ */ R.jsx(St, { title: h ? _a : Na, placement: "bottom", children: /* @__PURE__ */ R.jsx(
|
|
2894
|
+
Ua,
|
|
2895
|
+
{
|
|
2896
|
+
id: `switch_${v}`,
|
|
2897
|
+
checked: h,
|
|
2898
|
+
onClick: (L) => L == null ? void 0 : L.stopPropagation(),
|
|
2899
|
+
onChange: (L) => y(L, v)
|
|
2900
|
+
}
|
|
2901
|
+
) }) : /* @__PURE__ */ R.jsx(
|
|
2902
|
+
Fa,
|
|
2903
|
+
{
|
|
2904
|
+
width: "58px",
|
|
2905
|
+
height: "38px",
|
|
2906
|
+
alignItems: "center",
|
|
2907
|
+
flexDirection: "row",
|
|
2908
|
+
justifyContent: "center",
|
|
2909
|
+
children: /* @__PURE__ */ R.jsx(Va, { "data-testid": "loading" })
|
|
2910
|
+
}
|
|
2911
|
+
)
|
|
2912
|
+
] })
|
|
2913
|
+
] }),
|
|
2914
|
+
t ? /* @__PURE__ */ R.jsx(Eo, { variant: "body1", color: Lt.palette.gray.gray3, className: "connector-grid", children: C }) : null
|
|
2915
|
+
] });
|
|
2916
|
+
};
|
|
2917
|
+
return /* @__PURE__ */ R.jsx(At, { "data-testid": "connector-custom-card", children: f.current ? /* @__PURE__ */ R.jsx(R.Fragment, { children: O(f.current) }) : c.map((u) => {
|
|
2918
|
+
if (!(s != null && s[u])) return null;
|
|
2919
|
+
const { id: v } = s[u];
|
|
2920
|
+
return v ? /* @__PURE__ */ R.jsx("div", { children: O(s[u]) }, v) : null;
|
|
2921
|
+
}) });
|
|
2922
|
+
};
|
|
2923
|
+
export {
|
|
2924
|
+
hi as C,
|
|
2925
|
+
ei as E,
|
|
2926
|
+
Ft as P,
|
|
2927
|
+
oi as R,
|
|
2928
|
+
Bo as S,
|
|
2929
|
+
St as T,
|
|
2930
|
+
pt as a,
|
|
2931
|
+
Ra as b,
|
|
2932
|
+
Za as c,
|
|
2933
|
+
ti as d,
|
|
2934
|
+
ri as e,
|
|
2935
|
+
ni as f,
|
|
2936
|
+
ai as g,
|
|
2937
|
+
ja as h,
|
|
2938
|
+
ii as i,
|
|
2939
|
+
si as j,
|
|
2940
|
+
ci as k,
|
|
2941
|
+
li as l,
|
|
2942
|
+
pi as m,
|
|
2943
|
+
di as n,
|
|
2944
|
+
ui as o,
|
|
2945
|
+
fi as p,
|
|
2946
|
+
ka as q,
|
|
2947
|
+
mi as r,
|
|
2948
|
+
Qa as s,
|
|
2949
|
+
La as t,
|
|
2950
|
+
Ma as u,
|
|
2951
|
+
Ga as v,
|
|
2952
|
+
Ja as w,
|
|
2953
|
+
Ka as x
|
|
2954
|
+
};
|