mongodb-chatbot-ui
Version:
UI React components for the MongoDB Chatbot Framework
838 lines (821 loc) • 34 kB
JavaScript
import w, { forwardRef as kn, useState as Nn, useEffect as Cn, useMemo as zn } from "react";
import { P as Sn, r as ie, m as f, i as Z, p as F, l as P, A as $, b as z, L as I, F as O, ac as pn, w as fe, M as En, e as Pn, aB as Ln, d as T, o as A } from "./index2.js";
import { n as Fn } from "./has.js";
import { c as le, g as se } from "./jsx-runtime.js";
function de(e, a) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
a && (r = r.filter(function(l) {
return Object.getOwnPropertyDescriptor(e, l).enumerable;
})), n.push.apply(n, r);
}
return n;
}
function pe(e) {
for (var a = 1; a < arguments.length; a++) {
var n = arguments[a] != null ? arguments[a] : {};
a % 2 ? de(Object(n), !0).forEach(function(r) {
Mn(e, r, n[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : de(Object(n)).forEach(function(r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
});
}
return e;
}
function Dn(e) {
var a = function(n, r) {
if (typeof n != "object" || !n)
return n;
var l = n[Symbol.toPrimitive];
if (l !== void 0) {
var c = l.call(n, r);
if (typeof c != "object")
return c;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return String(n);
}(e, "string");
return typeof a == "symbol" ? a : a + "";
}
function Mn(e, a, n) {
return (a = Dn(a)) in e ? Object.defineProperty(e, a, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[a] = n, e;
}
function oe() {
return oe = Object.assign ? Object.assign.bind() : function(e) {
for (var a = 1; a < arguments.length; a++) {
var n = arguments[a];
for (var r in n)
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
}, oe.apply(this, arguments);
}
function bn(e, a) {
if (e == null)
return {};
var n, r, l = function(p, u) {
if (p == null)
return {};
var b, m, g = {}, v = Object.keys(p);
for (m = 0; m < v.length; m++)
b = v[m], u.indexOf(b) >= 0 || (g[b] = p[b]);
return g;
}(e, a);
if (Object.getOwnPropertySymbols) {
var c = Object.getOwnPropertySymbols(e);
for (r = 0; r < c.length; r++)
n = c[r], a.indexOf(n) >= 0 || Object.prototype.propertyIsEnumerable.call(e, n) && (l[n] = e[n]);
}
return l;
}
var $n = "div", mn = function(e) {
return w.useRef(null);
};
function An(e) {
return e || "div";
}
function _(e) {
return { Component: An(e), ref: mn() };
}
var Bn = ["as", "children"], Hn = function(e, a) {
var n = e.as, r = e.children, l = bn(e, Bn), c = _(n).Component;
return w.createElement(c, oe({}, l, { ref: a }), r);
}, In = w.forwardRef(Hn);
In.displayName = "Polymorph";
var Q = function(e, a) {
var n, r = e.length === 1 ? e : kn(e);
return r.displayName = (n = a ?? e.displayName) !== null && n !== void 0 ? n : "PolymorphicComponent", r;
};
function Tn(e, a, n) {
var r = a == null ? void 0 : a.href;
return e && e === "a" ? (r && typeof r == "string" || Sn.error("LG Polymorphic error", 'Component received `as="a"`, but did not receive an `href` prop'), pe({ as: "a", href: typeof r == "string" ? r : void 0 }, a)) : pe(e ? { as: e, href: r || void 0 } : r && typeof r == "string" ? { as: "a", href: r } : { as: n || $n }, a);
}
var Rn = ["as"];
function ce(e, a, n) {
var r = Tn(e, a, n), l = r.as, c = bn(r, Rn);
return { Component: l, as: l, ref: mn(), rest: c };
}
var ue = function(e, a) {
var n, r;
return (r = e.length === 1 ? e : w.forwardRef(e)).displayName = (n = a ?? e.displayName) !== null && n !== void 0 ? n : "PolymorphicComponent", r;
}, Vn = function(e, a) {
return e === "a" && Fn(a, "href");
}, gn = { exports: {} };
(function(e, a) {
(function(n, r) {
e.exports = r(w, ie);
})(le, function(n, r) {
function l(t) {
if (t && typeof t == "object" && "default" in t)
return t;
var i = /* @__PURE__ */ Object.create(null);
return t && Object.keys(t).forEach(function(o) {
if (o !== "default") {
var s = Object.getOwnPropertyDescriptor(t, o);
Object.defineProperty(i, o, s.get ? s : { enumerable: !0, get: function() {
return t[o];
} });
}
}), i.default = t, Object.freeze(i);
}
var c = l(n);
function p(t) {
var i = function(o, s) {
if (typeof o != "object" || !o)
return o;
var x = o[Symbol.toPrimitive];
if (x !== void 0) {
var h = x.call(o, s);
if (typeof h != "object")
return h;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return String(o);
}(t, "string");
return typeof i == "symbol" ? i : i + "";
}
function u(t, i, o) {
return (i = p(i)) in t ? Object.defineProperty(t, i, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : t[i] = o, t;
}
function b() {
return b = Object.assign ? Object.assign.bind() : function(t) {
for (var i = 1; i < arguments.length; i++) {
var o = arguments[i];
for (var s in o)
Object.prototype.hasOwnProperty.call(o, s) && (t[s] = o[s]);
}
return t;
}, b.apply(this, arguments);
}
function m(t, i) {
if (t == null)
return {};
var o, s, x = function(S, N) {
if (S == null)
return {};
var j, k, D = {}, M = Object.keys(S);
for (k = 0; k < M.length; k++)
j = M[k], N.indexOf(j) >= 0 || (D[j] = S[j]);
return D;
}(t, i);
if (Object.getOwnPropertySymbols) {
var h = Object.getOwnPropertySymbols(t);
for (s = 0; s < h.length; s++)
o = h[s], i.indexOf(o) >= 0 || Object.prototype.propertyIsEnumerable.call(t, o) && (x[o] = t[o]);
}
return x;
}
function g(t, i) {
return i || (i = t.slice(0)), Object.freeze(Object.defineProperties(t, { raw: { value: Object.freeze(i) } }));
}
var v, C, L = { small: 14, default: 16, large: 20, xlarge: 24 }, H = ["className", "size", "title", "aria-label", "aria-labelledby", "fill", "role"], E = function(t) {
var i = t.className, o = t.size, s = o === void 0 ? 16 : o, x = t.title, h = t["aria-label"], S = t["aria-labelledby"], N = t.fill, j = t.role, k = j === void 0 ? "img" : j, D = m(t, H), M = r.css(v || (v = g([`
color: `, `;
`])), N), Y = r.css(C || (C = g([`
flex-shrink: 0;
`]))), ee = function(ne, te, V) {
var G, U = V["aria-label"], q = V["aria-labelledby"], K = V.title;
switch (ne) {
case "img":
return U || q || K ? u(u(u({}, "aria-labelledby", q), "aria-label", U), "title", K) : { "aria-label": (G = te, "".concat(G.replace(/([a-z])([A-Z])/g, "$1 $2"), " Icon")) };
case "presentation":
return { "aria-hidden": !0, alt: "" };
}
}(k, "ArrowLeft", u(u({ title: x }, "aria-label", h), "aria-labelledby", S));
return c.createElement("svg", b({ className: r.cx(u({}, M, N != null), Y, i), height: typeof s == "number" ? s : L[s], width: typeof s == "number" ? s : L[s], role: k }, ee, D, { viewBox: "0 0 16 16" }), c.createElement("path", { d: "M13 6.83212L6.05559 6.83212L7.59059 5.29711C7.98112 4.90659 7.98112 4.27342 7.59059 3.8829L7.35168 3.64398C6.96115 3.25346 6.32799 3.25345 5.93746 3.64398L2.55483 7.02661C2.5456 7.03518 2.5365 7.04395 2.52752 7.05292L2.2886 7.29184C1.89808 7.68237 1.89808 8.31553 2.2886 8.70605L5.93975 12.3572C6.33028 12.7477 6.96344 12.7477 7.35397 12.3572L7.59288 12.1183C7.98341 11.7278 7.98341 11.0946 7.59288 10.7041L6.0588 9.17L13 9.17C13.5523 9.17 14 8.72228 14 8.17V7.83212C14 7.27983 13.5523 6.83212 13 6.83212Z", fill: "currentColor" }));
};
return E.displayName = "ArrowLeft", E.isGlyph = !0, E;
});
})(gn);
var Zn = gn.exports;
const _n = /* @__PURE__ */ se(Zn);
var hn = { exports: {} };
(function(e, a) {
(function(n, r) {
e.exports = r(w, ie);
})(le, function(n, r) {
function l(t) {
if (t && typeof t == "object" && "default" in t)
return t;
var i = /* @__PURE__ */ Object.create(null);
return t && Object.keys(t).forEach(function(o) {
if (o !== "default") {
var s = Object.getOwnPropertyDescriptor(t, o);
Object.defineProperty(i, o, s.get ? s : { enumerable: !0, get: function() {
return t[o];
} });
}
}), i.default = t, Object.freeze(i);
}
var c = l(n);
function p(t) {
var i = function(o, s) {
if (typeof o != "object" || !o)
return o;
var x = o[Symbol.toPrimitive];
if (x !== void 0) {
var h = x.call(o, s);
if (typeof h != "object")
return h;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return String(o);
}(t, "string");
return typeof i == "symbol" ? i : i + "";
}
function u(t, i, o) {
return (i = p(i)) in t ? Object.defineProperty(t, i, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : t[i] = o, t;
}
function b() {
return b = Object.assign ? Object.assign.bind() : function(t) {
for (var i = 1; i < arguments.length; i++) {
var o = arguments[i];
for (var s in o)
Object.prototype.hasOwnProperty.call(o, s) && (t[s] = o[s]);
}
return t;
}, b.apply(this, arguments);
}
function m(t, i) {
if (t == null)
return {};
var o, s, x = function(S, N) {
if (S == null)
return {};
var j, k, D = {}, M = Object.keys(S);
for (k = 0; k < M.length; k++)
j = M[k], N.indexOf(j) >= 0 || (D[j] = S[j]);
return D;
}(t, i);
if (Object.getOwnPropertySymbols) {
var h = Object.getOwnPropertySymbols(t);
for (s = 0; s < h.length; s++)
o = h[s], i.indexOf(o) >= 0 || Object.prototype.propertyIsEnumerable.call(t, o) && (x[o] = t[o]);
}
return x;
}
function g(t, i) {
return i || (i = t.slice(0)), Object.freeze(Object.defineProperties(t, { raw: { value: Object.freeze(i) } }));
}
var v, C, L = { small: 14, default: 16, large: 20, xlarge: 24 }, H = ["className", "size", "title", "aria-label", "aria-labelledby", "fill", "role"], E = function(t) {
var i = t.className, o = t.size, s = o === void 0 ? 16 : o, x = t.title, h = t["aria-label"], S = t["aria-labelledby"], N = t.fill, j = t.role, k = j === void 0 ? "img" : j, D = m(t, H), M = r.css(v || (v = g([`
color: `, `;
`])), N), Y = r.css(C || (C = g([`
flex-shrink: 0;
`]))), ee = function(ne, te, V) {
var G, U = V["aria-label"], q = V["aria-labelledby"], K = V.title;
switch (ne) {
case "img":
return U || q || K ? u(u(u({}, "aria-labelledby", q), "aria-label", U), "title", K) : { "aria-label": (G = te, "".concat(G.replace(/([a-z])([A-Z])/g, "$1 $2"), " Icon")) };
case "presentation":
return { "aria-hidden": !0, alt: "" };
}
}(k, "ArrowRight", u(u({ title: x }, "aria-label", h), "aria-labelledby", S));
return c.createElement("svg", b({ className: r.cx(u({}, M, N != null), Y, i), height: typeof s == "number" ? s : L[s], width: typeof s == "number" ? s : L[s], role: k }, ee, D, { viewBox: "0 0 16 16" }), c.createElement("path", { d: "M3 6.83212L9.94442 6.83212L8.40941 5.29711C8.01888 4.90659 8.01889 4.27342 8.40941 3.8829L8.64833 3.64398C9.03885 3.25346 9.67201 3.25345 10.0625 3.64398L13.4452 7.02661C13.4544 7.03518 13.4635 7.04395 13.4725 7.05292L13.7114 7.29184C14.1019 7.68237 14.1019 8.31553 13.7114 8.70605L10.0602 12.3572C9.66972 12.7477 9.03656 12.7477 8.64603 12.3572L8.40712 12.1183C8.01659 11.7278 8.01659 11.0946 8.40712 10.7041L9.9412 9.17L3 9.17C2.44771 9.17 2 8.72228 2 8.17L2 7.83212C2 7.27983 2.44772 6.83212 3 6.83212Z", fill: "currentColor" }));
};
return E.displayName = "ArrowRight", E.isGlyph = !0, E;
});
})(hn);
var Gn = hn.exports;
const Un = /* @__PURE__ */ se(Gn);
var yn = { exports: {} };
(function(e, a) {
(function(n, r) {
e.exports = r(w, ie);
})(le, function(n, r) {
function l(t) {
if (t && typeof t == "object" && "default" in t)
return t;
var i = /* @__PURE__ */ Object.create(null);
return t && Object.keys(t).forEach(function(o) {
if (o !== "default") {
var s = Object.getOwnPropertyDescriptor(t, o);
Object.defineProperty(i, o, s.get ? s : { enumerable: !0, get: function() {
return t[o];
} });
}
}), i.default = t, Object.freeze(i);
}
var c = l(n);
function p(t) {
var i = function(o, s) {
if (typeof o != "object" || !o)
return o;
var x = o[Symbol.toPrimitive];
if (x !== void 0) {
var h = x.call(o, s);
if (typeof h != "object")
return h;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return String(o);
}(t, "string");
return typeof i == "symbol" ? i : i + "";
}
function u(t, i, o) {
return (i = p(i)) in t ? Object.defineProperty(t, i, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : t[i] = o, t;
}
function b() {
return b = Object.assign ? Object.assign.bind() : function(t) {
for (var i = 1; i < arguments.length; i++) {
var o = arguments[i];
for (var s in o)
Object.prototype.hasOwnProperty.call(o, s) && (t[s] = o[s]);
}
return t;
}, b.apply(this, arguments);
}
function m(t, i) {
if (t == null)
return {};
var o, s, x = function(S, N) {
if (S == null)
return {};
var j, k, D = {}, M = Object.keys(S);
for (k = 0; k < M.length; k++)
j = M[k], N.indexOf(j) >= 0 || (D[j] = S[j]);
return D;
}(t, i);
if (Object.getOwnPropertySymbols) {
var h = Object.getOwnPropertySymbols(t);
for (s = 0; s < h.length; s++)
o = h[s], i.indexOf(o) >= 0 || Object.prototype.propertyIsEnumerable.call(t, o) && (x[o] = t[o]);
}
return x;
}
function g(t, i) {
return i || (i = t.slice(0)), Object.freeze(Object.defineProperties(t, { raw: { value: Object.freeze(i) } }));
}
var v, C, L = { small: 14, default: 16, large: 20, xlarge: 24 }, H = ["className", "size", "title", "aria-label", "aria-labelledby", "fill", "role"], E = function(t) {
var i = t.className, o = t.size, s = o === void 0 ? 16 : o, x = t.title, h = t["aria-label"], S = t["aria-labelledby"], N = t.fill, j = t.role, k = j === void 0 ? "img" : j, D = m(t, H), M = r.css(v || (v = g([`
color: `, `;
`])), N), Y = r.css(C || (C = g([`
flex-shrink: 0;
`]))), ee = function(ne, te, V) {
var G, U = V["aria-label"], q = V["aria-labelledby"], K = V.title;
switch (ne) {
case "img":
return U || q || K ? u(u(u({}, "aria-labelledby", q), "aria-label", U), "title", K) : { "aria-label": (G = te, "".concat(G.replace(/([a-z])([A-Z])/g, "$1 $2"), " Icon")) };
case "presentation":
return { "aria-hidden": !0, alt: "" };
}
}(k, "OpenNewTab", u(u({ title: x }, "aria-label", h), "aria-labelledby", S));
return c.createElement("svg", b({ className: r.cx(u({}, M, N != null), Y, i), height: typeof s == "number" ? s : L[s], width: typeof s == "number" ? s : L[s], role: k }, ee, D, { viewBox: "0 0 16 16" }), c.createElement("path", { d: "M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z", fill: "currentColor" }), c.createElement("path", { d: "M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z", fill: "currentColor" }));
};
return E.displayName = "OpenNewTab", E.isGlyph = !0, E;
});
})(yn);
var qn = yn.exports;
const Kn = /* @__PURE__ */ se(qn);
function Qn(e) {
var a = function(n, r) {
if (typeof n != "object" || !n)
return n;
var l = n[Symbol.toPrimitive];
if (l !== void 0) {
var c = l.call(n, r);
if (typeof c != "object")
return c;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return String(n);
}(e, "string");
return typeof a == "symbol" ? a : a + "";
}
function y(e, a, n) {
return (a = Qn(a)) in e ? Object.defineProperty(e, a, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[a] = n, e;
}
function B() {
return B = Object.assign ? Object.assign.bind() : function(e) {
for (var a = 1; a < arguments.length; a++) {
var n = arguments[a];
for (var r in n)
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
}, B.apply(this, arguments);
}
function R(e, a) {
if (e == null)
return {};
var n, r, l = function(p, u) {
if (p == null)
return {};
var b, m, g = {}, v = Object.keys(p);
for (m = 0; m < v.length; m++)
b = v[m], u.indexOf(b) >= 0 || (g[b] = p[b]);
return g;
}(e, a);
if (Object.getOwnPropertySymbols) {
var c = Object.getOwnPropertySymbols(e);
for (r = 0; r < c.length; r++)
n = c[r], a.indexOf(n) >= 0 || Object.prototype.propertyIsEnumerable.call(e, n) && (l[n] = e[n]);
}
return l;
}
function d(e, a) {
return a || (a = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(a) } }));
}
function Wn(e, a) {
return function(n) {
if (Array.isArray(n))
return n;
}(e) || function(n, r) {
var l = n == null ? null : typeof Symbol < "u" && n[Symbol.iterator] || n["@@iterator"];
if (l != null) {
var c, p, u, b, m = [], g = !0, v = !1;
try {
if (u = (l = l.call(n)).next, r !== 0)
for (; !(g = (c = u.call(l)).done) && (m.push(c.value), m.length !== r); g = !0)
;
} catch (C) {
v = !0, p = C;
} finally {
try {
if (!g && l.return != null && (b = l.return(), Object(b) !== b))
return;
} finally {
if (v)
throw p;
}
}
return m;
}
}(e, a) || function(n, r) {
if (n) {
if (typeof n == "string")
return be(n, r);
var l = Object.prototype.toString.call(n).slice(8, -1);
if (l === "Object" && n.constructor && (l = n.constructor.name), l === "Map" || l === "Set")
return Array.from(n);
if (l === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))
return be(n, r);
}
}(e, a) || function() {
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}();
}
function be(e, a) {
a > e.length && (a = e.length);
for (var n = 0, r = new Array(a); n < a; n++)
r[n] = e[n];
return r;
}
var me, ge, he, ye, ve, xe, Oe, we, X = f(me || (me = d([`
margin: unset;
font-family: `, `;
color: `, `;
`])), Z.default, F.light.text.primary.default), vn = y(y({}, $.Body1, f(ge || (ge = d([`
font-size: `, `px;
line-height: `, `px;
`])), P.body1.fontSize, P.body1.lineHeight)), $.Body2, f(he || (he = d([`
font-size: `, `px;
line-height: `, `px;
`])), P.body2.fontSize, P.body2.lineHeight)), Jn = y(y({}, $.Body1, f(ye || (ye = d([`
font-size: `, `px;
line-height: `, `px;
`])), P.code1.fontSize, P.code1.lineHeight)), $.Body2, f(ve || (ve = d([`
font-size: `, `px;
line-height: `, `px;
`])), P.code2.fontSize, P.code2.lineHeight)), ae = y(y({}, z.Light, f(xe || (xe = d([`
color: `, `;
`])), F.light.text.primary.default)), z.Dark, f(Oe || (Oe = d([`
color: `, `;
`])), F.dark.text.primary.default)), W = function(e) {
var a = Ln();
return e ? e === 16 ? $.Body2 : $.Body1 : a === 16 ? $.Body2 : $.Body1;
}, Xn = ["baseFontSize", "darkMode", "className", "weight", "as"], Yn = Q(function(e) {
var a = e.baseFontSize, n = e.darkMode, r = e.className, l = e.weight, c = l === void 0 ? "regular" : l, p = e.as, u = p === void 0 ? "p" : p, b = R(e, Xn), m = T(n).theme, g = W(a), v = _(u).Component, C = f(we || (we = d([`
font-weight: `, `;
strong,
b {
font-weight: `, `;
}
`])), I[c], I.bold);
return w.createElement(v, B({ className: A(X, vn[g], ae[m], C, r) }, b));
});
Yn.displayName = "Body";
var je, ke, Ne, Ce, ze, Se, Ee, xn = { label: "lg-label", description: "lg-description" }, et = function(e) {
return f(je || (je = d([`
color: `, `;
font-family: `, `;
font-weight: `, `;
margin-top: 0;
margin-bottom: 0;
`])), F[e].text.secondary.default, Z.default, I.regular);
}, nt = function(e) {
return f(ke || (ke = d([`
color: `, `;
`])), F[e].text.disabled.default);
}, tt = y(y({}, $.Body1, f(Ne || (Ne = d([`
font-size: `, `px;
line-height: `, `px;
`])), P.body1.fontSize, P.body1.lineHeight)), $.Body2, f(Ce || (Ce = d([`
font-size: `, `px;
line-height: 20px; // Hardcoding because it does not match body2 lineHeight
`])), P.body2.fontSize)), rt = ["baseFontSize", "data-lgid", "darkMode", "disabled", "children", "className"], at = function(e) {
var a = e.baseFontSize, n = e["data-lgid"], r = n === void 0 ? xn.description : n, l = e.darkMode, c = e.disabled, p = c !== void 0 && c, u = e.children, b = e.className, m = R(e, rt), g = T(l).theme, v = W(a);
return w.createElement("p", B({ "data-lgid": r, className: A(et(g), tt[v], y({}, nt(g), p), b) }, m), u);
};
at.displayName = "Description";
var Pe;
y(y({}, z.Light, f(ze || (ze = d([`
color: `, `;
`])), F.light.text.secondary.default)), z.Dark, f(Se || (Se = d([`
color: `, `;
`])), F.dark.text.secondary.default));
f(Ee || (Ee = d([`
display: block;
font-size: 11px;
line-height: 16px;
letter-spacing: 0.2px;
`])));
var Le, Fe, De, Me, $e, Ae, ot = function(e) {
var a = e.theme, n = e.baseFontSize, r = n === $.Body1 ? P.body1.fontSize : P.body2.fontSize, l = n === $.Body1 ? P.body1.lineHeight : 20;
return f(Pe || (Pe = d([`
font-family: `, `;
font-weight: `, `;
font-size: inherit;
line-height: inherit;
/* Unsets browser defaults */
margin-block-start: 0;
margin-block-end: 0;
/* Variable Styles */
color: `, `;
font-size: `, `px;
line-height: `, `px;
`])), Z.default, I.regular, F[a].text.error.default, r, l);
}, it = ["as", "darkMode", "children", "className"], Wt = Q(function(e) {
var a = e.as, n = a === void 0 ? "p" : a, r = e.darkMode, l = e.children, c = e.className, p = R(e, it), u = T(r).theme, b = W(), m = _(n).Component;
return w.createElement(m, B({}, p, { className: A(ot({ theme: u, baseFontSize: b }), c) }), l);
}), lt = f(Le || (Le = d([`
font-weight: `, `;
font-size: 48px;
line-height: 64px;
font-family: `, `;
`])), I.regular, Z.serif), st = y(y({}, z.Light, f(Fe || (Fe = d([`
color: `, `;
`])), O.green.dark2)), z.Dark, f(De || (De = d([`
color: `, `;
`])), O.gray.light2)), ct = ["darkMode", "className", "as"], ut = Q(function(e) {
var a = e.darkMode, n = e.className, r = e.as, l = r === void 0 ? "h1" : r, c = R(e, ct), p = T(a).theme, u = _(l).Component;
return w.createElement(u, B({ className: A(X, lt, st[p], n) }, c));
});
ut.displayName = "H1";
var Be, ft = f(Me || (Me = d([`
font-size: 32px;
line-height: 40px;
font-weight: `, `;
font-family: `, `;
`])), I.regular, Z.serif), dt = y(y({}, z.Light, f($e || ($e = d([`
color: `, `;
`])), O.green.dark2)), z.Dark, f(Ae || (Ae = d([`
color: `, `;
`])), O.gray.light2)), pt = ["darkMode", "className", "as"], bt = Q(function(e) {
var a = e.darkMode, n = e.className, r = e.as, l = r === void 0 ? "h2" : r, c = R(e, pt), p = T(a).theme, u = _(l).Component;
return w.createElement(u, B({ className: A(X, ft, dt[p], n) }, c));
});
bt.displayName = "H2";
var He, Ie, Te, Re, Ve, Ze, _e, Ge, Ue, qe, mt = f(Be || (Be = d([`
font-size: 24px;
line-height: 32px;
font-weight: `, `;
`])), I.medium), gt = ["darkMode", "className", "as"], ht = Q(function(e) {
var a = e.darkMode, n = e.className, r = e.as, l = r === void 0 ? "h3" : r, c = R(e, gt), p = T(a).theme, u = _(l).Component;
return w.createElement(u, B({ className: A(X, mt, ae[p], n) }, c));
});
ht.displayName = "H3";
var Ke, Qe, We, J = pn(), yt = f(He || (He = d([`
display: inline;
transition: all 0.15s ease-in-out;
border-radius: 3px;
font-family: `, `;
line-height: 20px;
.`, `:hover > & {
text-decoration: none;
}
`])), Z.code, J), vt = y(y({}, z.Light, f(Ie || (Ie = d([`
background-color: `, `;
border: 1px solid `, `;
color: `, `;
.`, `:hover > & {
box-shadow: 0 0 0 3px `, `;
border: 1px solid `, `;
}
`])), F.light.background.secondary.default, F.light.border.secondary.default, O.gray.dark3, J, O.gray.light2, O.gray.light1)), z.Dark, f(Te || (Te = d([`
background-color: `, `;
border: 1px solid `, `;
color: `, `;
.`, `:hover > & {
box-shadow: 0 0 0 3px `, `;
border: 1px solid `, `;
}
`])), F.dark.background.secondary.default, O.gray.dark2, O.gray.light1, J, O.gray.dark2, O.gray.dark1)), xt = y(y({}, z.Light, f(Re || (Re = d([`
.`, `:focus-visible > & {
box-shadow: `, `;
border: 1px solid `, `;
}
`])), J, fe[z.Light].default, O.blue.base)), z.Dark, f(Ve || (Ve = d([`
.`, `:focus-visible > & {
box-shadow: `, `;
border: 1px solid `, `;
}
`])), J, fe[z.Dark].default, O.blue.base)), Ot = y(y({}, z.Light, f(Ze || (Ze = d([`
color: `, `;
`])), O.blue.base)), z.Dark, f(_e || (_e = d([`
color: `, `;
`])), O.blue.light1)), wt = f(Ge || (Ge = d([`
text-decoration: none;
margin: 0;
padding: 0;
line-height: 20px;
&:focus {
outline: none;
}
`]))), jt = f(Ue || (Ue = d([`
white-space: nowrap;
`]))), kt = f(qe || (qe = d([`
white-space: normal;
`]))), Nt = ["children", "className", "darkMode", "baseFontSize", "as"], Ct = ue(function(e, a) {
var n, r, l = e.children, c = e.className, p = e.darkMode, u = e.baseFontSize, b = e.as, m = R(e, Nt), g = T(p).theme, v = W(u), C = ce(b, m, "code").Component, L = ((n = typeof l == "string" && ((r = l.match(/(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g)) === null || r === void 0 ? void 0 : r.length)) !== null && n !== void 0 ? n : 0) <= 30 ? jt : kt, H = C !== "code", E = w.createElement("code", { ref: a, className: A(Jn[v], yt, vt[g], xt[g], L, y({}, Ot[g], H), c) }, l);
return H ? w.createElement(C, B({ className: A(J, wt, c) }, m), E) : w.cloneElement(E, m);
});
Ct.displayName = "InlineCode";
var Je, Xe, Ye, en;
f(Ke || (Ke = d([`
font-family: `, `;
border: 1px solid;
border-radius: 3px;
padding-left: 5px;
padding-right: 5px;
`])), Z.code);
y(y({}, z.Light, f(Qe || (Qe = d([`
color: `, `;
border-color: `, `;
background-color: `, `;
`])), F.light.text.primary.default, O.gray.dark3, O.white)), z.Dark, f(We || (We = d([`
color: `, `;
border-color: `, `;
background-color: `, `;
`])), F.dark.text.primary.default, O.gray.base, O.gray.dark3));
var nn, tn, rn, zt = function(e) {
return f(Je || (Je = d([`
color: `, `;
font-family: `, `;
font-weight: `, `;
`])), F[e].text.primary.default, Z.default, I.bold);
}, St = function(e) {
return f(Xe || (Xe = d([`
color: `, `;
`])), F[e].text.disabled.default);
}, Et = y(y({}, $.Body1, f(Ye || (Ye = d([`
font-size: `, `px;
line-height: `, `px;
`])), P.body1.fontSize, P.body1.lineHeight)), $.Body2, f(en || (en = d([`
font-size: `, `px;
line-height: 20px; // Hardcoding because it does not match body2 lineHeight
`])), P.body2.fontSize)), Pt = ["baseFontSize", "darkMode", "className", "children", "disabled", "as", "data-lgid"], Lt = Q(function(e) {
var a = e.baseFontSize, n = e.darkMode, r = e.className, l = e.children, c = e.disabled, p = c !== void 0 && c, u = e.as, b = u === void 0 ? "label" : u, m = e["data-lgid"], g = m === void 0 ? xn.label : m, v = R(e, Pt), C = T(n).theme, L = W(a), H = _(b).Component;
return w.createElement(H, B({ "data-lgid": g, className: A(zt(C), Et[L], y({}, St(C), p), r) }, v), l);
});
Lt.displayName = "Label";
var an, on, ln, sn, cn, un, re = pn(), On = f(nn || (nn = d([`
font-family: `, `;
display: inline;
align-items: center;
text-decoration: none;
text-decoration-color: transparent;
cursor: pointer;
font-size: inherit;
line-height: inherit;
appearance: none;
background: none;
border: none;
padding: 0;
&:hover,
&[data-hover='true'],
&:focus-visible,
&[data-focus='true'] {
text-decoration: underline;
transition: text-decoration `, `ms ease-in-out;
text-underline-offset: 4px;
text-decoration-thickness: 2px;
}
&:focus {
outline: none;
}
`])), Z.default, En.default), wn = y(y({}, z.Light, f(tn || (tn = d([`
color: `, `;
font-weight: `, `;
&:hover,
&[data-hover='true'] {
text-decoration-color: `, `;
}
&:focus-visible,
&[data-focus='true'] {
text-decoration-color: `, `;
}
`])), O.blue.base, I.regular, O.gray.light2, O.blue.base)), z.Dark, f(rn || (rn = d([`
color: `, `;
font-weight: `, `;
&:hover,
&[data-hover='true'] {
text-decoration-color: `, `;
}
&:focus-visible,
&[data-focus='true'] {
text-decoration-color: `, `;
}
`])), O.blue.light1, I.bold, O.gray.dark2, O.blue.base)), jn = function(e) {
if (e)
return vn[e];
}, Ft = f(an || (an = d([`
gap: `, `px;
display: inline-flex;
`])), Pn[100]), Dt = ["children", "className", "baseFontSize", "darkMode", "as"];
ue(function(e, a) {
var n = e.children, r = e.className, l = e.baseFontSize, c = e.darkMode, p = e.as, u = R(e, Dt), b = T(c).theme, m = W(l), g = ce(p, u, "span").Component;
return w.createElement(g, B({ className: A(re, On, jn(m), wn[b], Ft, r), ref: a }, u), w.createElement(_n, { role: "presentation" }), n);
});
var Mt = f(on || (on = d([`
transform: translate3d(3px, 0, 0);
top: 1px;
position: relative;
`]))), $t = f(ln || (ln = d([`
opacity: 0;
transform: translate3d(-3px, 0, 0);
transition: 100ms ease-in;
transition-property: opacity, transform;
top: 1px;
position: relative;
.`, ":hover &, .", `[data-hover='true'] & {
opacity: 1;
transform: translate3d(3px, 0, 0);
}
`])), re, re), At = f(sn || (sn = d([`
position: relative;
bottom: 2px;
left: -1px;
height: 12px;
`]))), Bt = "hover", Ht = "persist", fn = "none", It = ["children", "className", "arrowAppearance", "hideExternalIcon", "baseFontSize", "darkMode", "as"], Jt = ue(function(e, a) {
var n = e.children, r = e.className, l = e.arrowAppearance, c = l === void 0 ? fn : l, p = e.hideExternalIcon, u = p !== void 0 && p, b = e.baseFontSize, m = e.darkMode, g = e.as, v = R(e, It), C = Wn(Nn(""), 2), L = C[0], H = C[1];
Cn(function() {
H(window.location.hostname);
}, []);
var E, t = T(m).theme, i = W(b), o = ce(g, v, "span"), s = o.Component, x = o.as, h = o.rest, S = zn(function() {
if (Vn(x, h))
return /^http(s)?:\/\//.test(h.href) ? new URL(h.href).hostname : L;
}, [x, h, L]), N = { target: void 0, rel: void 0 };
return h.target || h.rel ? (N.target = h.target, N.rel = h.rel) : s === "a" && (S === L ? N.target = "_self" : (N.target = "_blank", N.rel = "noopener noreferrer")), N.target !== "_blank" || u ? c !== fn && (E = w.createElement(Un, { role: "presentation", size: 12, className: A(y(y({}, $t, c === Bt), Mt, c === Ht)) })) : E = w.createElement(Kn, { role: "presentation", className: At }), w.createElement(s, B({ className: A(re, On, jn(i), wn[t], r), ref: a }, N, h), w.createElement("span", null, n), E);
}), Tt = f(cn || (cn = d([`
font-size: 12px;
font-weight: `, `;
text-transform: uppercase;
line-height: 20px;
letter-spacing: 0.4px;
`])), I.bold), Rt = ["darkMode", "className", "as"], Vt = Q(function(e) {
var a = e.darkMode, n = e.className, r = e.as, l = r === void 0 ? "div" : r, c = R(e, Rt), p = T(a).theme, u = _(l).Component;
return w.createElement(u, B({ className: A(X, Tt, ae[p], n) }, c));
});
Vt.displayName = "Overline";
var Zt = f(un || (un = d([`
font-size: 18px;
line-height: 24px;
font-weight: `, `;
`])), I.bold), _t = ["darkMode", "className", "as"], Gt = Q(function(e) {
var a = e.darkMode, n = e.className, r = e.as, l = r === void 0 ? "h6" : r, c = R(e, _t), p = T(a).theme, u = _(l).Component;
return w.createElement(u, B({ className: A(X, Zt, ae[p], n) }, c));
});
Gt.displayName = "Subtitle";
var dn;
f(dn || (dn = d([`
flex: 1;
min-width: 0;
max-width: 100%;
white-space: inherit;
overflow: inherit;
text-overflow: inherit;
`])));
export {
ut as E,
W as G,
re as M,
Yn as Q,
Vt as V,
Jt as _,
Ct as a,
ue as b,
vn as c,
ht as d,
In as e,
Gt as f,
ce as g,
Q as h,
bt as j,
Lt as k,
at as s,
_ as v,
Wt as w
};