UNPKG

@senyao-design-system/magic-tree

Version:

A tree component implemented with Konva for handling large datasets.

1,565 lines (1,563 loc) 66.3 kB
import * as _e from "react"; import qr, { forwardRef as Mt, useContext as It, useState as Te, useEffect as Ie, useRef as qe, useMemo as Le, useCallback as Ae } from "react"; import kt from "react-dom"; import { Group as Ce, Text as Dr, Rect as fr, Path as Dt, Arc as Ft, Image as Lt, Layer as Nt, Stage as jt } from "react-konva"; import Yt from "konva"; import { Html as lr } from "react-konva-utils"; var vr = { exports: {} }, Ne = {}; /** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Fr; function Wt() { if (Fr) return Ne; Fr = 1; var e = qr, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 }; function u(d, f, m) { var h, y = {}, N = null, O = null; m !== void 0 && (N = "" + m), f.key !== void 0 && (N = "" + f.key), f.ref !== void 0 && (O = f.ref); for (h in f) a.call(f, h) && !i.hasOwnProperty(h) && (y[h] = f[h]); if (d && d.defaultProps) for (h in f = d.defaultProps, f) y[h] === void 0 && (y[h] = f[h]); return { $$typeof: r, type: d, key: N, ref: O, props: y, _owner: o.current }; } return Ne.Fragment = n, Ne.jsx = u, Ne.jsxs = u, Ne; } var je = {}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Lr; function Ut() { return Lr || (Lr = 1, process.env.NODE_ENV !== "production" && function() { var e = qr, r = Symbol.for("react.element"), n = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), d = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), N = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), E = Symbol.iterator, S = "@@iterator"; function U(t) { if (t === null || typeof t != "object") return null; var s = E && t[E] || t[S]; return typeof s == "function" ? s : null; } var T = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function b(t) { { for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), g = 1; g < s; g++) l[g - 1] = arguments[g]; A("error", t, l); } } function A(t, s, l) { { var g = T.ReactDebugCurrentFrame, I = g.getStackAddendum(); I !== "" && (s += "%s", l = l.concat([I])); var L = l.map(function(P) { return String(P); }); L.unshift("Warning: " + s), Function.prototype.apply.call(console[t], console, L); } } var F = !1, c = !1, V = !1, R = !1, le = !1, ie; ie = Symbol.for("react.module.reference"); function re(t) { return !!(typeof t == "string" || typeof t == "function" || t === a || t === i || le || t === o || t === m || t === h || R || t === O || F || c || V || typeof t == "object" && t !== null && (t.$$typeof === N || t.$$typeof === y || t.$$typeof === u || t.$$typeof === d || t.$$typeof === f || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. t.$$typeof === ie || t.getModuleId !== void 0)); } function Z(t, s, l) { var g = t.displayName; if (g) return g; var I = s.displayName || s.name || ""; return I !== "" ? l + "(" + I + ")" : l; } function be(t) { return t.displayName || "Context"; } function W(t) { if (t == null) return null; if (typeof t.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function") return t.displayName || t.name || null; if (typeof t == "string") return t; switch (t) { case a: return "Fragment"; case n: return "Portal"; case i: return "Profiler"; case o: return "StrictMode"; case m: return "Suspense"; case h: return "SuspenseList"; } if (typeof t == "object") switch (t.$$typeof) { case d: var s = t; return be(s) + ".Consumer"; case u: var l = t; return be(l._context) + ".Provider"; case f: return Z(t, t.render, "ForwardRef"); case y: var g = t.displayName || null; return g !== null ? g : W(t.type) || "Memo"; case N: { var I = t, L = I._payload, P = I._init; try { return W(P(L)); } catch { return null; } } } return null; } var J = Object.assign, q = 0, de, ce, Q, Se, pe, ne, _; function j() { } j.__reactDisabledLog = !0; function ue() { { if (q === 0) { de = console.log, ce = console.info, Q = console.warn, Se = console.error, pe = console.group, ne = console.groupCollapsed, _ = console.groupEnd; var t = { configurable: !0, enumerable: !0, value: j, writable: !0 }; Object.defineProperties(console, { info: t, log: t, warn: t, error: t, group: t, groupCollapsed: t, groupEnd: t }); } q++; } } function ve() { { if (q--, q === 0) { var t = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { log: J({}, t, { value: de }), info: J({}, t, { value: ce }), warn: J({}, t, { value: Q }), error: J({}, t, { value: Se }), group: J({}, t, { value: pe }), groupCollapsed: J({}, t, { value: ne }), groupEnd: J({}, t, { value: _ }) }); } q < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var we = T.ReactCurrentDispatcher, p; function x(t, s, l) { { if (p === void 0) try { throw Error(); } catch (I) { var g = I.stack.trim().match(/\n( *(at )?)/); p = g && g[1] || ""; } return ` ` + p + t; } } var C = !1, Y; { var H = typeof WeakMap == "function" ? WeakMap : Map; Y = new H(); } function v(t, s) { if (!t || C) return ""; { var l = Y.get(t); if (l !== void 0) return l; } var g; C = !0; var I = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var L; L = we.current, we.current = null, ue(); try { if (s) { var P = function() { throw Error(); }; if (Object.defineProperty(P.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(P, []); } catch (ae) { g = ae; } Reflect.construct(t, [], P); } else { try { P.call(); } catch (ae) { g = ae; } t.call(P.prototype); } } else { try { throw Error(); } catch (ae) { g = ae; } t(); } } catch (ae) { if (ae && g && typeof ae.stack == "string") { for (var w = ae.stack.split(` `), te = g.stack.split(` `), B = w.length - 1, G = te.length - 1; B >= 1 && G >= 0 && w[B] !== te[G]; ) G--; for (; B >= 1 && G >= 0; B--, G--) if (w[B] !== te[G]) { if (B !== 1 || G !== 1) do if (B--, G--, G < 0 || w[B] !== te[G]) { var fe = ` ` + w[B].replace(" at new ", " at "); return t.displayName && fe.includes("<anonymous>") && (fe = fe.replace("<anonymous>", t.displayName)), typeof t == "function" && Y.set(t, fe), fe; } while (B >= 1 && G >= 0); break; } } } finally { C = !1, we.current = L, ve(), Error.prepareStackTrace = I; } var $e = t ? t.displayName || t.name : "", Pe = $e ? x($e) : ""; return typeof t == "function" && Y.set(t, Pe), Pe; } function he(t, s, l) { return v(t, !1); } function Re(t) { var s = t.prototype; return !!(s && s.isReactComponent); } function Ee(t, s, l) { if (t == null) return ""; if (typeof t == "function") return v(t, Re(t)); if (typeof t == "string") return x(t); switch (t) { case m: return x("Suspense"); case h: return x("SuspenseList"); } if (typeof t == "object") switch (t.$$typeof) { case f: return he(t.render); case y: return Ee(t.type, s, l); case N: { var g = t, I = g._payload, L = g._init; try { return Ee(L(I), s, l); } catch { } } } return ""; } var xe = Object.prototype.hasOwnProperty, xr = {}, _r = T.ReactDebugCurrentFrame; function Ge(t) { if (t) { var s = t._owner, l = Ee(t.type, t._source, s ? s.type : null); _r.setExtraStackFrame(l); } else _r.setExtraStackFrame(null); } function ft(t, s, l, g, I) { { var L = Function.call.bind(xe); for (var P in t) if (L(t, P)) { var w = void 0; try { if (typeof t[P] != "function") { var te = Error((g || "React class") + ": " + l + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); throw te.name = "Invariant Violation", te; } w = t[P](s, P, g, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (B) { w = B; } w && !(w instanceof Error) && (Ge(I), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", l, P, typeof w), Ge(null)), w instanceof Error && !(w.message in xr) && (xr[w.message] = !0, Ge(I), b("Failed %s type: %s", l, w.message), Ge(null)); } } } var lt = Array.isArray; function or(t) { return lt(t); } function dt(t) { { var s = typeof Symbol == "function" && Symbol.toStringTag, l = s && t[Symbol.toStringTag] || t.constructor.name || "Object"; return l; } } function vt(t) { try { return Sr(t), !1; } catch { return !0; } } function Sr(t) { return "" + t; } function Rr(t) { if (vt(t)) return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", dt(t)), Sr(t); } var Cr = T.ReactCurrentOwner, ht = { key: !0, ref: !0, __self: !0, __source: !0 }, Tr, wr; function pt(t) { if (xe.call(t, "ref")) { var s = Object.getOwnPropertyDescriptor(t, "ref").get; if (s && s.isReactWarning) return !1; } return t.ref !== void 0; } function mt(t) { if (xe.call(t, "key")) { var s = Object.getOwnPropertyDescriptor(t, "key").get; if (s && s.isReactWarning) return !1; } return t.key !== void 0; } function yt(t, s) { typeof t.ref == "string" && Cr.current; } function gt(t, s) { { var l = function() { Tr || (Tr = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", s)); }; l.isReactWarning = !0, Object.defineProperty(t, "key", { get: l, configurable: !0 }); } } function bt(t, s) { { var l = function() { wr || (wr = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", s)); }; l.isReactWarning = !0, Object.defineProperty(t, "ref", { get: l, configurable: !0 }); } } var Et = function(t, s, l, g, I, L, P) { var w = { // This tag allows us to uniquely identify this as a React Element $$typeof: r, // Built-in properties that belong on the element type: t, key: s, ref: l, props: P, // Record the component responsible for creating this element. _owner: L }; return w._store = {}, Object.defineProperty(w._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(w, "_self", { configurable: !1, enumerable: !1, writable: !1, value: g }), Object.defineProperty(w, "_source", { configurable: !1, enumerable: !1, writable: !1, value: I }), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w; }; function xt(t, s, l, g, I) { { var L, P = {}, w = null, te = null; l !== void 0 && (Rr(l), w = "" + l), mt(s) && (Rr(s.key), w = "" + s.key), pt(s) && (te = s.ref, yt(s, I)); for (L in s) xe.call(s, L) && !ht.hasOwnProperty(L) && (P[L] = s[L]); if (t && t.defaultProps) { var B = t.defaultProps; for (L in B) P[L] === void 0 && (P[L] = B[L]); } if (w || te) { var G = typeof t == "function" ? t.displayName || t.name || "Unknown" : t; w && gt(P, G), te && bt(P, G); } return Et(t, w, te, I, g, Cr.current, P); } } var ir = T.ReactCurrentOwner, Pr = T.ReactDebugCurrentFrame; function Oe(t) { if (t) { var s = t._owner, l = Ee(t.type, t._source, s ? s.type : null); Pr.setExtraStackFrame(l); } else Pr.setExtraStackFrame(null); } var sr; sr = !1; function cr(t) { return typeof t == "object" && t !== null && t.$$typeof === r; } function Ar() { { if (ir.current) { var t = W(ir.current.type); if (t) return ` Check the render method of \`` + t + "`."; } return ""; } } function _t(t) { return ""; } var Or = {}; function St(t) { { var s = Ar(); if (!s) { var l = typeof t == "string" ? t : t.displayName || t.name; l && (s = ` Check the top-level render call using <` + l + ">."); } return s; } } function $r(t, s) { { if (!t._store || t._store.validated || t.key != null) return; t._store.validated = !0; var l = St(s); if (Or[l]) return; Or[l] = !0; var g = ""; t && t._owner && t._owner !== ir.current && (g = " It was passed a child from " + W(t._owner.type) + "."), Oe(t), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, g), Oe(null); } } function Mr(t, s) { { if (typeof t != "object") return; if (or(t)) for (var l = 0; l < t.length; l++) { var g = t[l]; cr(g) && $r(g, s); } else if (cr(t)) t._store && (t._store.validated = !0); else if (t) { var I = U(t); if (typeof I == "function" && I !== t.entries) for (var L = I.call(t), P; !(P = L.next()).done; ) cr(P.value) && $r(P.value, s); } } } function Rt(t) { { var s = t.type; if (s == null || typeof s == "string") return; var l; if (typeof s == "function") l = s.propTypes; else if (typeof s == "object" && (s.$$typeof === f || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. s.$$typeof === y)) l = s.propTypes; else return; if (l) { var g = W(s); ft(l, t.props, "prop", g, t); } else if (s.PropTypes !== void 0 && !sr) { sr = !0; var I = W(s); b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", I || "Unknown"); } typeof s.getDefaultProps == "function" && !s.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function Ct(t) { { for (var s = Object.keys(t.props), l = 0; l < s.length; l++) { var g = s[l]; if (g !== "children" && g !== "key") { Oe(t), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), Oe(null); break; } } t.ref !== null && (Oe(t), b("Invalid attribute `ref` supplied to `React.Fragment`."), Oe(null)); } } var Ir = {}; function kr(t, s, l, g, I, L) { { var P = re(t); if (!P) { var w = ""; (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); var te = _t(); te ? w += te : w += Ar(); var B; t === null ? B = "null" : or(t) ? B = "array" : t !== void 0 && t.$$typeof === r ? (B = "<" + (W(t.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : B = typeof t, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", B, w); } var G = xt(t, s, l, I, L); if (G == null) return G; if (P) { var fe = s.children; if (fe !== void 0) if (g) if (or(fe)) { for (var $e = 0; $e < fe.length; $e++) Mr(fe[$e], t); Object.freeze && Object.freeze(fe); } else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); else Mr(fe, t); } if (xe.call(s, "key")) { var Pe = W(t), ae = Object.keys(s).filter(function($t) { return $t !== "key"; }), ur = ae.length > 0 ? "{key: someKey, " + ae.join(": ..., ") + ": ...}" : "{key: someKey}"; if (!Ir[Pe + ur]) { var Ot = ae.length > 0 ? "{" + ae.join(": ..., ") + ": ...}" : "{}"; b(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`, ur, Pe, Ot, Pe), Ir[Pe + ur] = !0; } } return t === a ? Ct(G) : Rt(G), G; } } function Tt(t, s, l) { return kr(t, s, l, !0); } function wt(t, s, l) { return kr(t, s, l, !1); } var Pt = wt, At = Tt; je.Fragment = a, je.jsx = Pt, je.jsxs = At; }()), je; } process.env.NODE_ENV === "production" ? vr.exports = Wt() : vr.exports = Ut(); var Qe = vr.exports; function Vt(e) { if (e.sheet) return e.sheet; for (var r = 0; r < document.styleSheets.length; r++) if (document.styleSheets[r].ownerNode === e) return document.styleSheets[r]; } function zt(e) { var r = document.createElement("style"); return r.setAttribute("data-emotion", e.key), e.nonce !== void 0 && r.setAttribute("nonce", e.nonce), r.appendChild(document.createTextNode("")), r.setAttribute("data-s", ""), r; } var Bt = /* @__PURE__ */ function() { function e(n) { var a = this; this._insertTag = function(o) { var i; a.tags.length === 0 ? a.insertionPoint ? i = a.insertionPoint.nextSibling : a.prepend ? i = a.container.firstChild : i = a.before : i = a.tags[a.tags.length - 1].nextSibling, a.container.insertBefore(o, i), a.tags.push(o); }, this.isSpeedy = n.speedy === void 0 ? !0 : n.speedy, this.tags = [], this.ctr = 0, this.nonce = n.nonce, this.key = n.key, this.container = n.container, this.prepend = n.prepend, this.insertionPoint = n.insertionPoint, this.before = null; } var r = e.prototype; return r.hydrate = function(a) { a.forEach(this._insertTag); }, r.insert = function(a) { this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(zt(this)); var o = this.tags[this.tags.length - 1]; if (this.isSpeedy) { var i = Vt(o); try { i.insertRule(a, i.cssRules.length); } catch { } } else o.appendChild(document.createTextNode(a)); this.ctr++; }, r.flush = function() { this.tags.forEach(function(a) { var o; return (o = a.parentNode) == null ? void 0 : o.removeChild(a); }), this.tags = [], this.ctr = 0; }, e; }(), ee = "-ms-", er = "-moz-", $ = "-webkit-", Hr = "comm", gr = "rule", br = "decl", Gt = "@import", Jr = "@keyframes", Xt = "@layer", qt = Math.abs, rr = String.fromCharCode, Ht = Object.assign; function Jt(e, r) { return K(e, 0) ^ 45 ? (((r << 2 ^ K(e, 0)) << 2 ^ K(e, 1)) << 2 ^ K(e, 2)) << 2 ^ K(e, 3) : 0; } function Kr(e) { return e.trim(); } function Kt(e, r) { return (e = r.exec(e)) ? e[0] : e; } function M(e, r, n) { return e.replace(r, n); } function hr(e, r) { return e.indexOf(r); } function K(e, r) { return e.charCodeAt(r) | 0; } function Ue(e, r, n) { return e.slice(r, n); } function me(e) { return e.length; } function Er(e) { return e.length; } function Xe(e, r) { return r.push(e), e; } function Zt(e, r) { return e.map(r).join(""); } var tr = 1, De = 1, Zr = 0, oe = 0, X = 0, Fe = ""; function nr(e, r, n, a, o, i, u) { return { value: e, root: r, parent: n, type: a, props: o, children: i, line: tr, column: De, length: u, return: "" }; } function Ye(e, r) { return Ht(nr("", null, null, "", null, null, 0), e, { length: -e.length }, r); } function Qt() { return X; } function en() { return X = oe > 0 ? K(Fe, --oe) : 0, De--, X === 10 && (De = 1, tr--), X; } function se() { return X = oe < Zr ? K(Fe, oe++) : 0, De++, X === 10 && (De = 1, tr++), X; } function ge() { return K(Fe, oe); } function He() { return oe; } function Be(e, r) { return Ue(Fe, e, r); } function Ve(e) { switch (e) { case 0: case 9: case 10: case 13: case 32: return 5; case 33: case 43: case 44: case 47: case 62: case 64: case 126: case 59: case 123: case 125: return 4; case 58: return 3; case 34: case 39: case 40: case 91: return 2; case 41: case 93: return 1; } return 0; } function Qr(e) { return tr = De = 1, Zr = me(Fe = e), oe = 0, []; } function et(e) { return Fe = "", e; } function Je(e) { return Kr(Be(oe - 1, pr(e === 91 ? e + 2 : e === 40 ? e + 1 : e))); } function rn(e) { for (; (X = ge()) && X < 33; ) se(); return Ve(e) > 2 || Ve(X) > 3 ? "" : " "; } function tn(e, r) { for (; --r && se() && !(X < 48 || X > 102 || X > 57 && X < 65 || X > 70 && X < 97); ) ; return Be(e, He() + (r < 6 && ge() == 32 && se() == 32)); } function pr(e) { for (; se(); ) switch (X) { case e: return oe; case 34: case 39: e !== 34 && e !== 39 && pr(X); break; case 40: e === 41 && pr(e); break; case 92: se(); break; } return oe; } function nn(e, r) { for (; se() && e + X !== 57; ) if (e + X === 84 && ge() === 47) break; return "/*" + Be(r, oe - 1) + "*" + rr(e === 47 ? e : se()); } function an(e) { for (; !Ve(ge()); ) se(); return Be(e, oe); } function on(e) { return et(Ke("", null, null, null, [""], e = Qr(e), 0, [0], e)); } function Ke(e, r, n, a, o, i, u, d, f) { for (var m = 0, h = 0, y = u, N = 0, O = 0, E = 0, S = 1, U = 1, T = 1, b = 0, A = "", F = o, c = i, V = a, R = A; U; ) switch (E = b, b = se()) { case 40: if (E != 108 && K(R, y - 1) == 58) { hr(R += M(Je(b), "&", "&\f"), "&\f") != -1 && (T = -1); break; } case 34: case 39: case 91: R += Je(b); break; case 9: case 10: case 13: case 32: R += rn(E); break; case 92: R += tn(He() - 1, 7); continue; case 47: switch (ge()) { case 42: case 47: Xe(sn(nn(se(), He()), r, n), f); break; default: R += "/"; } break; case 123 * S: d[m++] = me(R) * T; case 125 * S: case 59: case 0: switch (b) { case 0: case 125: U = 0; case 59 + h: T == -1 && (R = M(R, /\f/g, "")), O > 0 && me(R) - y && Xe(O > 32 ? jr(R + ";", a, n, y - 1) : jr(M(R, " ", "") + ";", a, n, y - 2), f); break; case 59: R += ";"; default: if (Xe(V = Nr(R, r, n, m, h, o, d, A, F = [], c = [], y), i), b === 123) if (h === 0) Ke(R, r, V, V, F, i, y, d, c); else switch (N === 99 && K(R, 3) === 110 ? 100 : N) { case 100: case 108: case 109: case 115: Ke(e, V, V, a && Xe(Nr(e, V, V, 0, 0, o, d, A, o, F = [], y), c), o, c, y, d, a ? F : c); break; default: Ke(R, V, V, V, [""], c, 0, d, c); } } m = h = O = 0, S = T = 1, A = R = "", y = u; break; case 58: y = 1 + me(R), O = E; default: if (S < 1) { if (b == 123) --S; else if (b == 125 && S++ == 0 && en() == 125) continue; } switch (R += rr(b), b * S) { case 38: T = h > 0 ? 1 : (R += "\f", -1); break; case 44: d[m++] = (me(R) - 1) * T, T = 1; break; case 64: ge() === 45 && (R += Je(se())), N = ge(), h = y = me(A = R += an(He())), b++; break; case 45: E === 45 && me(R) == 2 && (S = 0); } } return i; } function Nr(e, r, n, a, o, i, u, d, f, m, h) { for (var y = o - 1, N = o === 0 ? i : [""], O = Er(N), E = 0, S = 0, U = 0; E < a; ++E) for (var T = 0, b = Ue(e, y + 1, y = qt(S = u[E])), A = e; T < O; ++T) (A = Kr(S > 0 ? N[T] + " " + b : M(b, /&\f/g, N[T]))) && (f[U++] = A); return nr(e, r, n, o === 0 ? gr : d, f, m, h); } function sn(e, r, n) { return nr(e, r, n, Hr, rr(Qt()), Ue(e, 2, -2), 0); } function jr(e, r, n, a) { return nr(e, r, n, br, Ue(e, 0, a), Ue(e, a + 1, -1), a); } function ke(e, r) { for (var n = "", a = Er(e), o = 0; o < a; o++) n += r(e[o], o, e, r) || ""; return n; } function cn(e, r, n, a) { switch (e.type) { case Xt: if (e.children.length) break; case Gt: case br: return e.return = e.return || e.value; case Hr: return ""; case Jr: return e.return = e.value + "{" + ke(e.children, a) + "}"; case gr: e.value = e.props.join(","); } return me(n = ke(e.children, a)) ? e.return = e.value + "{" + n + "}" : ""; } function un(e) { var r = Er(e); return function(n, a, o, i) { for (var u = "", d = 0; d < r; d++) u += e[d](n, a, o, i) || ""; return u; }; } function fn(e) { return function(r) { r.root || (r = r.return) && e(r); }; } function ln(e) { var r = /* @__PURE__ */ Object.create(null); return function(n) { return r[n] === void 0 && (r[n] = e(n)), r[n]; }; } var dn = function(r, n, a) { for (var o = 0, i = 0; o = i, i = ge(), o === 38 && i === 12 && (n[a] = 1), !Ve(i); ) se(); return Be(r, oe); }, vn = function(r, n) { var a = -1, o = 44; do switch (Ve(o)) { case 0: o === 38 && ge() === 12 && (n[a] = 1), r[a] += dn(oe - 1, n, a); break; case 2: r[a] += Je(o); break; case 4: if (o === 44) { r[++a] = ge() === 58 ? "&\f" : "", n[a] = r[a].length; break; } default: r[a] += rr(o); } while (o = se()); return r; }, hn = function(r, n) { return et(vn(Qr(r), n)); }, Yr = /* @__PURE__ */ new WeakMap(), pn = function(r) { if (!(r.type !== "rule" || !r.parent || // positive .length indicates that this rule contains pseudo // negative .length indicates that this rule has been already prefixed r.length < 1)) { for (var n = r.value, a = r.parent, o = r.column === a.column && r.line === a.line; a.type !== "rule"; ) if (a = a.parent, !a) return; if (!(r.props.length === 1 && n.charCodeAt(0) !== 58 && !Yr.get(a)) && !o) { Yr.set(r, !0); for (var i = [], u = hn(n, i), d = a.props, f = 0, m = 0; f < u.length; f++) for (var h = 0; h < d.length; h++, m++) r.props[m] = i[f] ? u[f].replace(/&\f/g, d[h]) : d[h] + " " + u[f]; } } }, mn = function(r) { if (r.type === "decl") { var n = r.value; // charcode for l n.charCodeAt(0) === 108 && // charcode for b n.charCodeAt(2) === 98 && (r.return = "", r.value = ""); } }; function rt(e, r) { switch (Jt(e, r)) { case 5103: return $ + "print-" + e + e; case 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921: case 5572: case 6356: case 5844: case 3191: case 6645: case 3005: case 6391: case 5879: case 5623: case 6135: case 4599: case 4855: case 4215: case 6389: case 5109: case 5365: case 5621: case 3829: return $ + e + e; case 5349: case 4246: case 4810: case 6968: case 2756: return $ + e + er + e + ee + e + e; case 6828: case 4268: return $ + e + ee + e + e; case 6165: return $ + e + ee + "flex-" + e + e; case 5187: return $ + e + M(e, /(\w+).+(:[^]+)/, $ + "box-$1$2" + ee + "flex-$1$2") + e; case 5443: return $ + e + ee + "flex-item-" + M(e, /flex-|-self/, "") + e; case 4675: return $ + e + ee + "flex-line-pack" + M(e, /align-content|flex-|-self/, "") + e; case 5548: return $ + e + ee + M(e, "shrink", "negative") + e; case 5292: return $ + e + ee + M(e, "basis", "preferred-size") + e; case 6060: return $ + "box-" + M(e, "-grow", "") + $ + e + ee + M(e, "grow", "positive") + e; case 4554: return $ + M(e, /([^-])(transform)/g, "$1" + $ + "$2") + e; case 6187: return M(M(M(e, /(zoom-|grab)/, $ + "$1"), /(image-set)/, $ + "$1"), e, "") + e; case 5495: case 3959: return M(e, /(image-set\([^]*)/, $ + "$1$`$1"); case 4968: return M(M(e, /(.+:)(flex-)?(.*)/, $ + "box-pack:$3" + ee + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + $ + e + e; case 4095: case 3583: case 4068: case 2532: return M(e, /(.+)-inline(.+)/, $ + "$1$2") + e; case 8116: case 7059: case 5753: case 5535: case 5445: case 5701: case 4933: case 4677: case 5533: case 5789: case 5021: case 4765: if (me(e) - 1 - r > 6) switch (K(e, r + 1)) { case 109: if (K(e, r + 4) !== 45) break; case 102: return M(e, /(.+:)(.+)-([^]+)/, "$1" + $ + "$2-$3$1" + er + (K(e, r + 3) == 108 ? "$3" : "$2-$3")) + e; case 115: return ~hr(e, "stretch") ? rt(M(e, "stretch", "fill-available"), r) + e : e; } break; case 4949: if (K(e, r + 1) !== 115) break; case 6444: switch (K(e, me(e) - 3 - (~hr(e, "!important") && 10))) { case 107: return M(e, ":", ":" + $) + e; case 101: return M(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + $ + (K(e, 14) === 45 ? "inline-" : "") + "box$3$1" + $ + "$2$3$1" + ee + "$2box$3") + e; } break; case 5936: switch (K(e, r + 11)) { case 114: return $ + e + ee + M(e, /[svh]\w+-[tblr]{2}/, "tb") + e; case 108: return $ + e + ee + M(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e; case 45: return $ + e + ee + M(e, /[svh]\w+-[tblr]{2}/, "lr") + e; } return $ + e + ee + e + e; } return e; } var yn = function(r, n, a, o) { if (r.length > -1 && !r.return) switch (r.type) { case br: r.return = rt(r.value, r.length); break; case Jr: return ke([Ye(r, { value: M(r.value, "@", "@" + $) })], o); case gr: if (r.length) return Zt(r.props, function(i) { switch (Kt(i, /(::plac\w+|:read-\w+)/)) { case ":read-only": case ":read-write": return ke([Ye(r, { props: [M(i, /:(read-\w+)/, ":" + er + "$1")] })], o); case "::placeholder": return ke([Ye(r, { props: [M(i, /:(plac\w+)/, ":" + $ + "input-$1")] }), Ye(r, { props: [M(i, /:(plac\w+)/, ":" + er + "$1")] }), Ye(r, { props: [M(i, /:(plac\w+)/, ee + "input-$1")] })], o); } return ""; }); } }, gn = [yn], bn = function(r) { var n = r.key; if (n === "css") { var a = document.querySelectorAll("style[data-emotion]:not([data-s])"); Array.prototype.forEach.call(a, function(S) { var U = S.getAttribute("data-emotion"); U.indexOf(" ") !== -1 && (document.head.appendChild(S), S.setAttribute("data-s", "")); }); } var o = r.stylisPlugins || gn, i = {}, u, d = []; u = r.container || document.head, Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which // means that the style elements we're looking at are only Emotion 11 server-rendered style elements document.querySelectorAll('style[data-emotion^="' + n + ' "]'), function(S) { for (var U = S.getAttribute("data-emotion").split(" "), T = 1; T < U.length; T++) i[U[T]] = !0; d.push(S); } ); var f, m = [pn, mn]; { var h, y = [cn, fn(function(S) { h.insert(S); })], N = un(m.concat(o, y)), O = function(U) { return ke(on(U), N); }; f = function(U, T, b, A) { h = b, O(U ? U + "{" + T.styles + "}" : T.styles), A && (E.inserted[T.name] = !0); }; } var E = { key: n, sheet: new Bt({ key: n, container: u, nonce: r.nonce, speedy: r.speedy, prepend: r.prepend, insertionPoint: r.insertionPoint }), nonce: r.nonce, inserted: i, registered: {}, insert: f }; return E.sheet.hydrate(d), E; }, mr = { exports: {} }, k = {}; /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Wr; function En() { if (Wr) return k; Wr = 1; var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, a = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, u = e ? Symbol.for("react.provider") : 60109, d = e ? Symbol.for("react.context") : 60110, f = e ? Symbol.for("react.async_mode") : 60111, m = e ? Symbol.for("react.concurrent_mode") : 60111, h = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, N = e ? Symbol.for("react.suspense_list") : 60120, O = e ? Symbol.for("react.memo") : 60115, E = e ? Symbol.for("react.lazy") : 60116, S = e ? Symbol.for("react.block") : 60121, U = e ? Symbol.for("react.fundamental") : 60117, T = e ? Symbol.for("react.responder") : 60118, b = e ? Symbol.for("react.scope") : 60119; function A(c) { if (typeof c == "object" && c !== null) { var V = c.$$typeof; switch (V) { case r: switch (c = c.type, c) { case f: case m: case a: case i: case o: case y: return c; default: switch (c = c && c.$$typeof, c) { case d: case h: case E: case O: case u: return c; default: return V; } } case n: return V; } } } function F(c) { return A(c) === m; } return k.AsyncMode = f, k.ConcurrentMode = m, k.ContextConsumer = d, k.ContextProvider = u, k.Element = r, k.ForwardRef = h, k.Fragment = a, k.Lazy = E, k.Memo = O, k.Portal = n, k.Profiler = i, k.StrictMode = o, k.Suspense = y, k.isAsyncMode = function(c) { return F(c) || A(c) === f; }, k.isConcurrentMode = F, k.isContextConsumer = function(c) { return A(c) === d; }, k.isContextProvider = function(c) { return A(c) === u; }, k.isElement = function(c) { return typeof c == "object" && c !== null && c.$$typeof === r; }, k.isForwardRef = function(c) { return A(c) === h; }, k.isFragment = function(c) { return A(c) === a; }, k.isLazy = function(c) { return A(c) === E; }, k.isMemo = function(c) { return A(c) === O; }, k.isPortal = function(c) { return A(c) === n; }, k.isProfiler = function(c) { return A(c) === i; }, k.isStrictMode = function(c) { return A(c) === o; }, k.isSuspense = function(c) { return A(c) === y; }, k.isValidElementType = function(c) { return typeof c == "string" || typeof c == "function" || c === a || c === m || c === i || c === o || c === y || c === N || typeof c == "object" && c !== null && (c.$$typeof === E || c.$$typeof === O || c.$$typeof === u || c.$$typeof === d || c.$$typeof === h || c.$$typeof === U || c.$$typeof === T || c.$$typeof === b || c.$$typeof === S); }, k.typeOf = A, k; } var D = {}; /** @license React v16.13.1 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Ur; function xn() { return Ur || (Ur = 1, process.env.NODE_ENV !== "production" && function() { var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, a = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, u = e ? Symbol.for("react.provider") : 60109, d = e ? Symbol.for("react.context") : 60110, f = e ? Symbol.for("react.async_mode") : 60111, m = e ? Symbol.for("react.concurrent_mode") : 60111, h = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, N = e ? Symbol.for("react.suspense_list") : 60120, O = e ? Symbol.for("react.memo") : 60115, E = e ? Symbol.for("react.lazy") : 60116, S = e ? Symbol.for("react.block") : 60121, U = e ? Symbol.for("react.fundamental") : 60117, T = e ? Symbol.for("react.responder") : 60118, b = e ? Symbol.for("react.scope") : 60119; function A(v) { return typeof v == "string" || typeof v == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. v === a || v === m || v === i || v === o || v === y || v === N || typeof v == "object" && v !== null && (v.$$typeof === E || v.$$typeof === O || v.$$typeof === u || v.$$typeof === d || v.$$typeof === h || v.$$typeof === U || v.$$typeof === T || v.$$typeof === b || v.$$typeof === S); } function F(v) { if (typeof v == "object" && v !== null) { var he = v.$$typeof; switch (he) { case r: var Re = v.type; switch (Re) { case f: case m: case a: case i: case o: case y: return Re; default: var Ee = Re && Re.$$typeof; switch (Ee) { case d: case h: case E: case O: case u: return Ee; default: return he; } } case n: return he; } } } var c = f, V = m, R = d, le = u, ie = r, re = h, Z = a, be = E, W = O, J = n, q = i, de = o, ce = y, Q = !1; function Se(v) { return Q || (Q = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), pe(v) || F(v) === f; } function pe(v) { return F(v) === m; } function ne(v) { return F(v) === d; } function _(v) { return F(v) === u; } function j(v) { return typeof v == "object" && v !== null && v.$$typeof === r; } function ue(v) { return F(v) === h; } function ve(v) { return F(v) === a; } function we(v) { return F(v) === E; } function p(v) { return F(v) === O; } function x(v) { return F(v) === n; } function C(v) { return F(v) === i; } function Y(v) { return F(v) === o; } function H(v) { return F(v) === y; } D.AsyncMode = c, D.ConcurrentMode = V, D.ContextConsumer = R, D.ContextProvider = le, D.Element = ie, D.ForwardRef = re, D.Fragment = Z, D.Lazy = be, D.Memo = W, D.Portal = J, D.Profiler = q, D.StrictMode = de, D.Suspense = ce, D.isAsyncMode = Se, D.isConcurrentMode = pe, D.isContextConsumer = ne, D.isContextProvider = _, D.isElement = j, D.isForwardRef = ue, D.isFragment = ve, D.isLazy = we, D.isMemo = p, D.isPortal = x, D.isProfiler = C, D.isStrictMode = Y, D.isSuspense = H, D.isValidElementType = A, D.typeOf = F; }()), D; } process.env.NODE_ENV === "production" ? mr.exports = En() : mr.exports = xn(); var _n = mr.exports, tt = _n, Sn = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, Rn = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, nt = {}; nt[tt.ForwardRef] = Sn; nt[tt.Memo] = Rn; var Cn = !0; function Tn(e, r, n) { var a = ""; return n.split(" ").forEach(function(o) { e[o] !== void 0 ? r.push(e[o] + ";") : o && (a += o + " "); }), a; } var at = function(r, n, a) { var o = r.key + "-" + n.name; // we only need to add the styles to the registered cache if the // class name could be used further down // the tree but if it's a string tag, we know it won't // so we don't have to add it to registered cache. // this improves memory usage since we can avoid storing the whole style string (a === !1 || // we need to always store it if we're in compat mode and // in node since emotion-server relies on whether a style is in // the registered cache to know whether a style is global or not // also, note that this check will be dead code eliminated in the browser Cn === !1) && r.registered[o] === void 0 && (r.registered[o] = n.styles); }, wn = function(r, n, a) { at(r, n, a); var o = r.key + "-" + n.name; if (r.inserted[n.name] === void 0) { var i = n; do r.insert(n === i ? "." + o : "", i, r.sheet, !0), i = i.next; while (i !== void 0); } }; function Pn(e) { for (var r = 0, n, a = 0, o = e.length; o >= 4; ++a, o -= 4) n = e.charCodeAt(a) & 255 | (e.charCodeAt(++a) & 255) << 8 | (e.charCodeAt(++a) & 255) << 16 | (e.charCodeAt(++a) & 255) << 24, n = /* Math.imul(k, m): */ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */ n >>> 24, r = /* Math.imul(k, m): */ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16); switch (o) { case 3: r ^= (e.charCodeAt(a + 2) & 255) << 16; case 2: r ^= (e.charCodeAt(a + 1) & 255) << 8; case 1: r ^= e.charCodeAt(a) & 255, r = /* Math.imul(h, m): */ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16); } return r ^= r >>> 13, r = /* Math.imul(h, m): */ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), ((r ^ r >>> 15) >>> 0).toString(36); } var An = { animationIterationCount: 1, aspectRatio: 1, borderImageOutset: 1, borderImageSlice: 1, borderImageWidth: 1, boxFlex: 1, boxFlexGroup: 1, boxOrdinalGroup: 1, columnCount: 1, columns: 1, flex: 1, flexGrow: 1, flexPositive: 1, flexShrink: 1, flexNegative: 1, flexOrder: 1, gridRow: 1, gridRowEnd: 1, gridRowSpan: 1, gridRowStart: 1, gridColumn: 1, gridColumnEnd: 1, gridColumnSpan: 1, gridColumnStart: 1, msGridRow: 1, msGridRowSpan: 1, msGridColumn: 1, msGridColumnSpan: 1, fontWeight: 1, lineHeight: 1, opacity: 1, order: 1, orphans: 1, scale: 1, tabSize: 1, widows: 1, zIndex: 1, zoom: 1, WebkitLineClamp: 1, // SVG-related properties fillOpacity: 1, floodOpacity: 1, stopOpacity: 1, strokeDasharray: 1, strokeDashoffset: 1, strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 }, On = /[A-Z]|^ms/g, $n = /_EMO_([^_]+?)_([^]*?)_EMO_/g, ot = function(r) { return r.charCodeAt(1) === 45; }, Vr = function(r) { return r != null && typeof r != "boolean"; }, dr = /* @__PURE__ */ ln(function(e) { return ot(e) ? e : e.replace(On, "-$&").toLowerCase(); }), zr = function(r, n) { switch (r) { case "animation": case "animationName": if (typeof n == "string") return n.replace($n, function(a, o, i) { return ye = { name: o, styles: i, next: ye }, o; }); } return An[r] !== 1 && !ot(r) && typeof n == "number" && n !== 0 ? n + "px" : n; }; function ze(e, r, n) { if (n == null) return ""; var a = n; if (a.__emotion_styles !== void 0) return a; switch (typeof n) { case "boolean": return ""; case "object": { var o = n; if (o.anim === 1) return ye = { name: o.name, styles: o.styles, next: ye }, o.name; var i = n; if (i.styles !== void 0) { var u = i.next; if (u !== void 0) for (; u !== void 0; ) ye = { name: u.name, styles: u.styles, next: ye }, u = u.next; var d = i.styles + ";"; return d; } return Mn(e, r, n); } case "function": { if (e !== void 0) { var f = ye, m = n(e); return ye = f, ze(e, r, m); } break; } } var h = n; return h; } function Mn(e, r, n) { var a = ""; if (Array.isArray(n)) for (var o = 0; o < n.length; o++) a += ze(e, r, n[o]) + ";"; else for (var i in n) { var u = n[i]; if (typeof u != "object") { var d = u; Vr(d) && (a += dr(i) + ":" + zr(i, d) + ";"); } else if (Array.isArray(u) && typeof u[0] == "string" && r == null) for (var f = 0; f < u.length; f++) Vr(u[f]) && (a += dr(i) + ":" + zr(i, u[f]) + ";"); else { var m = ze(e, r, u); switch (i) { case "animation": case "animationName": { a += dr(i) + ":" + m + ";"; break; } default: a += i + "{" + m + "}"; } } } return a; } var Br = /label:\s*([^\s;{]+)\s*(;|$)/g, ye; function