@dormammuuuuu/nextjs-orgchart
Version:
A React component for rendering organization charts in Next.js applications.
1,553 lines (1,551 loc) • 67.8 kB
JavaScript
import At, { useRef as Te, useState as W, useEffect as kt, forwardRef as pr, useImperativeHandle as gr } from "react";
var qe = { exports: {} }, we = {};
/**
* @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 mt;
function vr() {
if (mt) return we;
mt = 1;
var e = At, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
function a(c, h, P) {
var x, O = {}, A = null, U = null;
P !== void 0 && (A = "" + P), h.key !== void 0 && (A = "" + h.key), h.ref !== void 0 && (U = h.ref);
for (x in h) n.call(h, x) && !s.hasOwnProperty(x) && (O[x] = h[x]);
if (c && c.defaultProps) for (x in h = c.defaultProps, h) O[x] === void 0 && (O[x] = h[x]);
return { $$typeof: t, type: c, key: A, ref: U, props: O, _owner: i.current };
}
return we.Fragment = r, we.jsx = a, we.jsxs = a, we;
}
var Se = {};
/**
* @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 yt;
function mr() {
return yt || (yt = 1, process.env.NODE_ENV !== "production" && function() {
var e = At, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), c = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), U = Symbol.for("react.offscreen"), I = Symbol.iterator, j = "@@iterator";
function J(o) {
if (o === null || typeof o != "object")
return null;
var l = I && o[I] || o[j];
return typeof l == "function" ? l : null;
}
var u = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function f(o) {
{
for (var l = arguments.length, d = new Array(l > 1 ? l - 1 : 0), y = 1; y < l; y++)
d[y - 1] = arguments[y];
p("error", o, d);
}
}
function p(o, l, d) {
{
var y = u.ReactDebugCurrentFrame, _ = y.getStackAddendum();
_ !== "" && (l += "%s", d = d.concat([_]));
var T = d.map(function(C) {
return String(C);
});
T.unshift("Warning: " + l), Function.prototype.apply.call(console[o], console, T);
}
}
var b = !1, g = !1, k = !1, Z = !1, ce = !1, se;
se = Symbol.for("react.module.reference");
function he(o) {
return !!(typeof o == "string" || typeof o == "function" || o === n || o === s || ce || o === i || o === P || o === x || Z || o === U || b || g || k || typeof o == "object" && o !== null && (o.$$typeof === A || o.$$typeof === O || o.$$typeof === a || o.$$typeof === c || o.$$typeof === h || // 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.
o.$$typeof === se || o.getModuleId !== void 0));
}
function me(o, l, d) {
var y = o.displayName;
if (y)
return y;
var _ = l.displayName || l.name || "";
return _ !== "" ? d + "(" + _ + ")" : d;
}
function te(o) {
return o.displayName || "Context";
}
function H(o) {
if (o == null)
return null;
if (typeof o.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
return o.displayName || o.name || null;
if (typeof o == "string")
return o;
switch (o) {
case n:
return "Fragment";
case r:
return "Portal";
case s:
return "Profiler";
case i:
return "StrictMode";
case P:
return "Suspense";
case x:
return "SuspenseList";
}
if (typeof o == "object")
switch (o.$$typeof) {
case c:
var l = o;
return te(l) + ".Consumer";
case a:
var d = o;
return te(d._context) + ".Provider";
case h:
return me(o, o.render, "ForwardRef");
case O:
var y = o.displayName || null;
return y !== null ? y : H(o.type) || "Memo";
case A: {
var _ = o, T = _._payload, C = _._init;
try {
return H(C(T));
} catch {
return null;
}
}
}
return null;
}
var ee = Object.assign, re = 0, ye, le, pe, ue, m, R, $;
function X() {
}
X.__reactDisabledLog = !0;
function V() {
{
if (re === 0) {
ye = console.log, le = console.info, pe = console.warn, ue = console.error, m = console.group, R = console.groupCollapsed, $ = console.groupEnd;
var o = {
configurable: !0,
enumerable: !0,
value: X,
writable: !0
};
Object.defineProperties(console, {
info: o,
log: o,
warn: o,
error: o,
group: o,
groupCollapsed: o,
groupEnd: o
});
}
re++;
}
}
function z() {
{
if (re--, re === 0) {
var o = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: ee({}, o, {
value: ye
}),
info: ee({}, o, {
value: le
}),
warn: ee({}, o, {
value: pe
}),
error: ee({}, o, {
value: ue
}),
group: ee({}, o, {
value: m
}),
groupCollapsed: ee({}, o, {
value: R
}),
groupEnd: ee({}, o, {
value: $
})
});
}
re < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var B = u.ReactCurrentDispatcher, K;
function ne(o, l, d) {
{
if (K === void 0)
try {
throw Error();
} catch (_) {
var y = _.stack.trim().match(/\n( *(at )?)/);
K = y && y[1] || "";
}
return `
` + K + o;
}
}
var ae = !1, v;
{
var w = typeof WeakMap == "function" ? WeakMap : Map;
v = new w();
}
function E(o, l) {
if (!o || ae)
return "";
{
var d = v.get(o);
if (d !== void 0)
return d;
}
var y;
ae = !0;
var _ = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var T;
T = B.current, B.current = null, V();
try {
if (l) {
var C = function() {
throw Error();
};
if (Object.defineProperty(C.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(C, []);
} catch (q) {
y = q;
}
Reflect.construct(o, [], C);
} else {
try {
C.call();
} catch (q) {
y = q;
}
o.call(C.prototype);
}
} else {
try {
throw Error();
} catch (q) {
y = q;
}
o();
}
} catch (q) {
if (q && y && typeof q.stack == "string") {
for (var S = q.stack.split(`
`), Y = y.stack.split(`
`), L = S.length - 1, F = Y.length - 1; L >= 1 && F >= 0 && S[L] !== Y[F]; )
F--;
for (; L >= 1 && F >= 0; L--, F--)
if (S[L] !== Y[F]) {
if (L !== 1 || F !== 1)
do
if (L--, F--, F < 0 || S[L] !== Y[F]) {
var Q = `
` + S[L].replace(" at new ", " at ");
return o.displayName && Q.includes("<anonymous>") && (Q = Q.replace("<anonymous>", o.displayName)), typeof o == "function" && v.set(o, Q), Q;
}
while (L >= 1 && F >= 0);
break;
}
}
} finally {
ae = !1, B.current = T, z(), Error.prepareStackTrace = _;
}
var ve = o ? o.displayName || o.name : "", de = ve ? ne(ve) : "";
return typeof o == "function" && v.set(o, de), de;
}
function M(o, l, d) {
return E(o, !1);
}
function nt(o) {
var l = o.prototype;
return !!(l && l.isReactComponent);
}
function fe(o, l, d) {
if (o == null)
return "";
if (typeof o == "function")
return E(o, nt(o));
if (typeof o == "string")
return ne(o);
switch (o) {
case P:
return ne("Suspense");
case x:
return ne("SuspenseList");
}
if (typeof o == "object")
switch (o.$$typeof) {
case h:
return M(o.render);
case O:
return fe(o.type, l, d);
case A: {
var y = o, _ = y._payload, T = y._init;
try {
return fe(T(_), l, d);
} catch {
}
}
}
return "";
}
var be = Object.prototype.hasOwnProperty, ot = {}, it = u.ReactDebugCurrentFrame;
function xe(o) {
if (o) {
var l = o._owner, d = fe(o.type, o._source, l ? l.type : null);
it.setExtraStackFrame(d);
} else
it.setExtraStackFrame(null);
}
function Nt(o, l, d, y, _) {
{
var T = Function.call.bind(be);
for (var C in o)
if (T(o, C)) {
var S = void 0;
try {
if (typeof o[C] != "function") {
var Y = Error((y || "React class") + ": " + d + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw Y.name = "Invariant Violation", Y;
}
S = o[C](l, C, y, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (L) {
S = L;
}
S && !(S instanceof Error) && (xe(_), f("%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).", y || "React class", d, C, typeof S), xe(null)), S instanceof Error && !(S.message in ot) && (ot[S.message] = !0, xe(_), f("Failed %s type: %s", d, S.message), xe(null));
}
}
}
var Xt = Array.isArray;
function Ie(o) {
return Xt(o);
}
function Gt(o) {
{
var l = typeof Symbol == "function" && Symbol.toStringTag, d = l && o[Symbol.toStringTag] || o.constructor.name || "Object";
return d;
}
}
function Jt(o) {
try {
return st(o), !1;
} catch {
return !0;
}
}
function st(o) {
return "" + o;
}
function at(o) {
if (Jt(o))
return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Gt(o)), st(o);
}
var Ee = u.ReactCurrentOwner, zt = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, ct, lt, Le;
Le = {};
function Kt(o) {
if (be.call(o, "ref")) {
var l = Object.getOwnPropertyDescriptor(o, "ref").get;
if (l && l.isReactWarning)
return !1;
}
return o.ref !== void 0;
}
function Qt(o) {
if (be.call(o, "key")) {
var l = Object.getOwnPropertyDescriptor(o, "key").get;
if (l && l.isReactWarning)
return !1;
}
return o.key !== void 0;
}
function Zt(o, l) {
if (typeof o.ref == "string" && Ee.current && l && Ee.current.stateNode !== l) {
var d = H(Ee.current.type);
Le[d] || (f('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', H(Ee.current.type), o.ref), Le[d] = !0);
}
}
function er(o, l) {
{
var d = function() {
ct || (ct = !0, f("%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)", l));
};
d.isReactWarning = !0, Object.defineProperty(o, "key", {
get: d,
configurable: !0
});
}
}
function tr(o, l) {
{
var d = function() {
lt || (lt = !0, f("%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)", l));
};
d.isReactWarning = !0, Object.defineProperty(o, "ref", {
get: d,
configurable: !0
});
}
}
var rr = function(o, l, d, y, _, T, C) {
var S = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: t,
// Built-in properties that belong on the element
type: o,
key: l,
ref: d,
props: C,
// Record the component responsible for creating this element.
_owner: T
};
return S._store = {}, Object.defineProperty(S._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(S, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: y
}), Object.defineProperty(S, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: _
}), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
};
function nr(o, l, d, y, _) {
{
var T, C = {}, S = null, Y = null;
d !== void 0 && (at(d), S = "" + d), Qt(l) && (at(l.key), S = "" + l.key), Kt(l) && (Y = l.ref, Zt(l, _));
for (T in l)
be.call(l, T) && !zt.hasOwnProperty(T) && (C[T] = l[T]);
if (o && o.defaultProps) {
var L = o.defaultProps;
for (T in L)
C[T] === void 0 && (C[T] = L[T]);
}
if (S || Y) {
var F = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
S && er(C, F), Y && tr(C, F);
}
return rr(o, S, Y, _, y, Ee.current, C);
}
}
var $e = u.ReactCurrentOwner, ut = u.ReactDebugCurrentFrame;
function ge(o) {
if (o) {
var l = o._owner, d = fe(o.type, o._source, l ? l.type : null);
ut.setExtraStackFrame(d);
} else
ut.setExtraStackFrame(null);
}
var Fe;
Fe = !1;
function Ue(o) {
return typeof o == "object" && o !== null && o.$$typeof === t;
}
function ft() {
{
if ($e.current) {
var o = H($e.current.type);
if (o)
return `
Check the render method of \`` + o + "`.";
}
return "";
}
}
function or(o) {
return "";
}
var dt = {};
function ir(o) {
{
var l = ft();
if (!l) {
var d = typeof o == "string" ? o : o.displayName || o.name;
d && (l = `
Check the top-level render call using <` + d + ">.");
}
return l;
}
}
function ht(o, l) {
{
if (!o._store || o._store.validated || o.key != null)
return;
o._store.validated = !0;
var d = ir(l);
if (dt[d])
return;
dt[d] = !0;
var y = "";
o && o._owner && o._owner !== $e.current && (y = " It was passed a child from " + H(o._owner.type) + "."), ge(o), f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, y), ge(null);
}
}
function pt(o, l) {
{
if (typeof o != "object")
return;
if (Ie(o))
for (var d = 0; d < o.length; d++) {
var y = o[d];
Ue(y) && ht(y, l);
}
else if (Ue(o))
o._store && (o._store.validated = !0);
else if (o) {
var _ = J(o);
if (typeof _ == "function" && _ !== o.entries)
for (var T = _.call(o), C; !(C = T.next()).done; )
Ue(C.value) && ht(C.value, l);
}
}
}
function sr(o) {
{
var l = o.type;
if (l == null || typeof l == "string")
return;
var d;
if (typeof l == "function")
d = l.propTypes;
else if (typeof l == "object" && (l.$$typeof === h || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
l.$$typeof === O))
d = l.propTypes;
else
return;
if (d) {
var y = H(l);
Nt(d, o.props, "prop", y, o);
} else if (l.PropTypes !== void 0 && !Fe) {
Fe = !0;
var _ = H(l);
f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _ || "Unknown");
}
typeof l.getDefaultProps == "function" && !l.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function ar(o) {
{
for (var l = Object.keys(o.props), d = 0; d < l.length; d++) {
var y = l[d];
if (y !== "children" && y !== "key") {
ge(o), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", y), ge(null);
break;
}
}
o.ref !== null && (ge(o), f("Invalid attribute `ref` supplied to `React.Fragment`."), ge(null));
}
}
var gt = {};
function vt(o, l, d, y, _, T) {
{
var C = he(o);
if (!C) {
var S = "";
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (S += " 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 Y = or();
Y ? S += Y : S += ft();
var L;
o === null ? L = "null" : Ie(o) ? L = "array" : o !== void 0 && o.$$typeof === t ? (L = "<" + (H(o.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : L = typeof o, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", L, S);
}
var F = nr(o, l, d, _, T);
if (F == null)
return F;
if (C) {
var Q = l.children;
if (Q !== void 0)
if (y)
if (Ie(Q)) {
for (var ve = 0; ve < Q.length; ve++)
pt(Q[ve], o);
Object.freeze && Object.freeze(Q);
} else
f("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
pt(Q, o);
}
if (be.call(l, "key")) {
var de = H(o), q = Object.keys(l).filter(function(hr) {
return hr !== "key";
}), Me = q.length > 0 ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}";
if (!gt[de + Me]) {
var dr = q.length > 0 ? "{" + q.join(": ..., ") + ": ...}" : "{}";
f(`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} />`, Me, de, dr, de), gt[de + Me] = !0;
}
}
return o === n ? ar(F) : sr(F), F;
}
}
function cr(o, l, d) {
return vt(o, l, d, !0);
}
function lr(o, l, d) {
return vt(o, l, d, !1);
}
var ur = lr, fr = cr;
Se.Fragment = n, Se.jsx = ur, Se.jsxs = fr;
}()), Se;
}
process.env.NODE_ENV === "production" ? qe.exports = vr() : qe.exports = mr();
var D = qe.exports, Ne = function(e, t) {
return Ne = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
r.__proto__ = n;
} || function(r, n) {
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (r[i] = n[i]);
}, Ne(e, t);
};
function Ae(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
Ne(e, t);
function r() {
this.constructor = e;
}
e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
}
function Xe(e) {
var t = typeof Symbol == "function" && Symbol.iterator, r = t && e[t], n = 0;
if (r) return r.call(e);
if (e && typeof e.length == "number") return {
next: function() {
return e && n >= e.length && (e = void 0), { value: e && e[n++], done: !e };
}
};
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function Ge(e, t) {
var r = typeof Symbol == "function" && e[Symbol.iterator];
if (!r) return e;
var n = r.call(e), i, s = [], a;
try {
for (; (t === void 0 || t-- > 0) && !(i = n.next()).done; ) s.push(i.value);
} catch (c) {
a = { error: c };
} finally {
try {
i && !i.done && (r = n.return) && r.call(n);
} finally {
if (a) throw a.error;
}
}
return s;
}
function Je(e, t, r) {
if (r || arguments.length === 2) for (var n = 0, i = t.length, s; n < i; n++)
(s || !(n in t)) && (s || (s = Array.prototype.slice.call(t, 0, n)), s[n] = t[n]);
return e.concat(s || Array.prototype.slice.call(t));
}
function oe(e) {
return typeof e == "function";
}
function Dt(e) {
var t = function(n) {
Error.call(n), n.stack = new Error().stack;
}, r = e(t);
return r.prototype = Object.create(Error.prototype), r.prototype.constructor = r, r;
}
var We = Dt(function(e) {
return function(r) {
e(this), this.message = r ? r.length + ` errors occurred during unsubscription:
` + r.map(function(n, i) {
return i + 1 + ") " + n.toString();
}).join(`
`) : "", this.name = "UnsubscriptionError", this.errors = r;
};
});
function ze(e, t) {
if (e) {
var r = e.indexOf(t);
0 <= r && e.splice(r, 1);
}
}
var ke = function() {
function e(t) {
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
}
return e.prototype.unsubscribe = function() {
var t, r, n, i, s;
if (!this.closed) {
this.closed = !0;
var a = this._parentage;
if (a)
if (this._parentage = null, Array.isArray(a))
try {
for (var c = Xe(a), h = c.next(); !h.done; h = c.next()) {
var P = h.value;
P.remove(this);
}
} catch (j) {
t = { error: j };
} finally {
try {
h && !h.done && (r = c.return) && r.call(c);
} finally {
if (t) throw t.error;
}
}
else
a.remove(this);
var x = this.initialTeardown;
if (oe(x))
try {
x();
} catch (j) {
s = j instanceof We ? j.errors : [j];
}
var O = this._finalizers;
if (O) {
this._finalizers = null;
try {
for (var A = Xe(O), U = A.next(); !U.done; U = A.next()) {
var I = U.value;
try {
bt(I);
} catch (j) {
s = s ?? [], j instanceof We ? s = Je(Je([], Ge(s)), Ge(j.errors)) : s.push(j);
}
}
} catch (j) {
n = { error: j };
} finally {
try {
U && !U.done && (i = A.return) && i.call(A);
} finally {
if (n) throw n.error;
}
}
}
if (s)
throw new We(s);
}
}, e.prototype.add = function(t) {
var r;
if (t && t !== this)
if (this.closed)
bt(t);
else {
if (t instanceof e) {
if (t.closed || t._hasParent(this))
return;
t._addParent(this);
}
(this._finalizers = (r = this._finalizers) !== null && r !== void 0 ? r : []).push(t);
}
}, e.prototype._hasParent = function(t) {
var r = this._parentage;
return r === t || Array.isArray(r) && r.includes(t);
}, e.prototype._addParent = function(t) {
var r = this._parentage;
this._parentage = Array.isArray(r) ? (r.push(t), r) : r ? [r, t] : t;
}, e.prototype._removeParent = function(t) {
var r = this._parentage;
r === t ? this._parentage = null : Array.isArray(r) && ze(r, t);
}, e.prototype.remove = function(t) {
var r = this._finalizers;
r && ze(r, t), t instanceof e && t._removeParent(this);
}, e.EMPTY = function() {
var t = new e();
return t.closed = !0, t;
}(), e;
}(), It = ke.EMPTY;
function Lt(e) {
return e instanceof ke || e && "closed" in e && oe(e.remove) && oe(e.add) && oe(e.unsubscribe);
}
function bt(e) {
oe(e) ? e() : e.unsubscribe();
}
var $t = {
onUnhandledError: null,
onStoppedNotification: null,
Promise: void 0,
useDeprecatedSynchronousErrorHandling: !1,
useDeprecatedNextContext: !1
}, yr = {
setTimeout: function(e, t) {
for (var r = [], n = 2; n < arguments.length; n++)
r[n - 2] = arguments[n];
return setTimeout.apply(void 0, Je([e, t], Ge(r)));
},
clearTimeout: function(e) {
return clearTimeout(e);
},
delegate: void 0
};
function br(e) {
yr.setTimeout(function() {
throw e;
});
}
function Et() {
}
function Pe(e) {
e();
}
var Ft = function(e) {
Ae(t, e);
function t(r) {
var n = e.call(this) || this;
return n.isStopped = !1, r ? (n.destination = r, Lt(r) && r.add(n)) : n.destination = xr, n;
}
return t.create = function(r, n, i) {
return new Ke(r, n, i);
}, t.prototype.next = function(r) {
this.isStopped || this._next(r);
}, t.prototype.error = function(r) {
this.isStopped || (this.isStopped = !0, this._error(r));
}, t.prototype.complete = function() {
this.isStopped || (this.isStopped = !0, this._complete());
}, t.prototype.unsubscribe = function() {
this.closed || (this.isStopped = !0, e.prototype.unsubscribe.call(this), this.destination = null);
}, t.prototype._next = function(r) {
this.destination.next(r);
}, t.prototype._error = function(r) {
try {
this.destination.error(r);
} finally {
this.unsubscribe();
}
}, t.prototype._complete = function() {
try {
this.destination.complete();
} finally {
this.unsubscribe();
}
}, t;
}(ke), Er = Function.prototype.bind;
function He(e, t) {
return Er.call(e, t);
}
var wr = function() {
function e(t) {
this.partialObserver = t;
}
return e.prototype.next = function(t) {
var r = this.partialObserver;
if (r.next)
try {
r.next(t);
} catch (n) {
Re(n);
}
}, e.prototype.error = function(t) {
var r = this.partialObserver;
if (r.error)
try {
r.error(t);
} catch (n) {
Re(n);
}
else
Re(t);
}, e.prototype.complete = function() {
var t = this.partialObserver;
if (t.complete)
try {
t.complete();
} catch (r) {
Re(r);
}
}, e;
}(), Ke = function(e) {
Ae(t, e);
function t(r, n, i) {
var s = e.call(this) || this, a;
if (oe(r) || !r)
a = {
next: r ?? void 0,
error: n ?? void 0,
complete: i ?? void 0
};
else {
var c;
s && $t.useDeprecatedNextContext ? (c = Object.create(r), c.unsubscribe = function() {
return s.unsubscribe();
}, a = {
next: r.next && He(r.next, c),
error: r.error && He(r.error, c),
complete: r.complete && He(r.complete, c)
}) : a = r;
}
return s.destination = new wr(a), s;
}
return t;
}(Ft);
function Re(e) {
br(e);
}
function Sr(e) {
throw e;
}
var xr = {
closed: !0,
next: Et,
error: Sr,
complete: Et
}, Rr = function() {
return typeof Symbol == "function" && Symbol.observable || "@@observable";
}();
function Cr(e) {
return e;
}
function _r(e) {
return e.length === 0 ? Cr : e.length === 1 ? e[0] : function(r) {
return e.reduce(function(n, i) {
return i(n);
}, r);
};
}
var wt = function() {
function e(t) {
t && (this._subscribe = t);
}
return e.prototype.lift = function(t) {
var r = new e();
return r.source = this, r.operator = t, r;
}, e.prototype.subscribe = function(t, r, n) {
var i = this, s = Pr(t) ? t : new Ke(t, r, n);
return Pe(function() {
var a = i, c = a.operator, h = a.source;
s.add(c ? c.call(s, h) : h ? i._subscribe(s) : i._trySubscribe(s));
}), s;
}, e.prototype._trySubscribe = function(t) {
try {
return this._subscribe(t);
} catch (r) {
t.error(r);
}
}, e.prototype.forEach = function(t, r) {
var n = this;
return r = St(r), new r(function(i, s) {
var a = new Ke({
next: function(c) {
try {
t(c);
} catch (h) {
s(h), a.unsubscribe();
}
},
error: s,
complete: i
});
n.subscribe(a);
});
}, e.prototype._subscribe = function(t) {
var r;
return (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(t);
}, e.prototype[Rr] = function() {
return this;
}, e.prototype.pipe = function() {
for (var t = [], r = 0; r < arguments.length; r++)
t[r] = arguments[r];
return _r(t)(this);
}, e.prototype.toPromise = function(t) {
var r = this;
return t = St(t), new t(function(n, i) {
var s;
r.subscribe(function(a) {
return s = a;
}, function(a) {
return i(a);
}, function() {
return n(s);
});
});
}, e.create = function(t) {
return new e(t);
}, e;
}();
function St(e) {
var t;
return (t = e ?? $t.Promise) !== null && t !== void 0 ? t : Promise;
}
function Tr(e) {
return e && oe(e.next) && oe(e.error) && oe(e.complete);
}
function Pr(e) {
return e && e instanceof Ft || Tr(e) && Lt(e);
}
var Or = Dt(function(e) {
return function() {
e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
};
}), et = function(e) {
Ae(t, e);
function t() {
var r = e.call(this) || this;
return r.closed = !1, r.currentObservers = null, r.observers = [], r.isStopped = !1, r.hasError = !1, r.thrownError = null, r;
}
return t.prototype.lift = function(r) {
var n = new xt(this, this);
return n.operator = r, n;
}, t.prototype._throwIfClosed = function() {
if (this.closed)
throw new Or();
}, t.prototype.next = function(r) {
var n = this;
Pe(function() {
var i, s;
if (n._throwIfClosed(), !n.isStopped) {
n.currentObservers || (n.currentObservers = Array.from(n.observers));
try {
for (var a = Xe(n.currentObservers), c = a.next(); !c.done; c = a.next()) {
var h = c.value;
h.next(r);
}
} catch (P) {
i = { error: P };
} finally {
try {
c && !c.done && (s = a.return) && s.call(a);
} finally {
if (i) throw i.error;
}
}
}
});
}, t.prototype.error = function(r) {
var n = this;
Pe(function() {
if (n._throwIfClosed(), !n.isStopped) {
n.hasError = n.isStopped = !0, n.thrownError = r;
for (var i = n.observers; i.length; )
i.shift().error(r);
}
});
}, t.prototype.complete = function() {
var r = this;
Pe(function() {
if (r._throwIfClosed(), !r.isStopped) {
r.isStopped = !0;
for (var n = r.observers; n.length; )
n.shift().complete();
}
});
}, t.prototype.unsubscribe = function() {
this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
}, Object.defineProperty(t.prototype, "observed", {
get: function() {
var r;
return ((r = this.observers) === null || r === void 0 ? void 0 : r.length) > 0;
},
enumerable: !1,
configurable: !0
}), t.prototype._trySubscribe = function(r) {
return this._throwIfClosed(), e.prototype._trySubscribe.call(this, r);
}, t.prototype._subscribe = function(r) {
return this._throwIfClosed(), this._checkFinalizedStatuses(r), this._innerSubscribe(r);
}, t.prototype._innerSubscribe = function(r) {
var n = this, i = this, s = i.hasError, a = i.isStopped, c = i.observers;
return s || a ? It : (this.currentObservers = null, c.push(r), new ke(function() {
n.currentObservers = null, ze(c, r);
}));
}, t.prototype._checkFinalizedStatuses = function(r) {
var n = this, i = n.hasError, s = n.thrownError, a = n.isStopped;
i ? r.error(s) : a && r.complete();
}, t.prototype.asObservable = function() {
var r = new wt();
return r.source = this, r;
}, t.create = function(r, n) {
return new xt(r, n);
}, t;
}(wt), xt = function(e) {
Ae(t, e);
function t(r, n) {
var i = e.call(this) || this;
return i.destination = r, i.source = n, i;
}
return t.prototype.next = function(r) {
var n, i;
(i = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || i === void 0 || i.call(n, r);
}, t.prototype.error = function(r) {
var n, i;
(i = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || i === void 0 || i.call(n, r);
}, t.prototype.complete = function() {
var r, n;
(n = (r = this.destination) === null || r === void 0 ? void 0 : r.complete) === null || n === void 0 || n.call(r);
}, t.prototype._subscribe = function(r) {
var n, i;
return (i = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r)) !== null && i !== void 0 ? i : It;
}, t;
}(et);
const Ve = new et(), Ye = new et(), Ce = {
sendDragInfo: (e) => Ve.next({ draggedNodeId: e }),
clearDragInfo: () => Ve.next(null),
getDragInfo: () => Ve.asObservable()
}, Qe = {
sendSelectedNodeInfo: (e) => Ye.next({ selectedNodeId: e }),
clearSelectedNodeInfo: () => Ye.next(null),
getSelectedNodeInfo: () => Ye.asObservable()
};
function jr({
datasource: e,
idProp: t,
childrenProp: r
}) {
const n = (u, f) => {
let p = !0;
return Object.keys(f).some((b) => {
const g = f[b];
if (typeof g == "string" || typeof g == "number" || typeof g == "boolean") {
if (u[b] !== g)
return p = !1, !0;
} else if (g instanceof RegExp) {
if (!g.test(u[b]))
return p = !1, !0;
} else typeof g == "object" && Object.keys(g).some((k) => {
switch (k) {
case ">":
u[b] > g[k] || (p = !1);
break;
case "<":
u[b] < g[k] || (p = !1);
break;
case ">=":
u[b] >= g[k] || (p = !1);
break;
case "<=":
u[b] <= g[k] || (p = !1);
break;
case "!==":
u[b] === g[k] && (p = !1);
break;
}
return !p;
});
return !p;
}), p;
}, i = (u) => {
if (!u) return null;
if (e[t] === u) return e;
const f = (p) => {
for (const b of p) {
if (b[t] === u) return b;
if (b[r]) {
const g = f(b[r]);
if (g) return g;
}
}
return null;
};
return f(e[r] || []);
}, s = (u) => {
if (!u || !Object.keys(u).length) return null;
if (n(e, u)) return e;
const f = (p) => {
for (const b of p) {
if (n(b, u)) return b;
if (b[r]) {
const g = f(b[r]);
if (g) return g;
}
}
return null;
};
return f(e[r] || []);
}, a = (u) => {
const f = [], p = (b) => {
if (n(b, u) && f.push(b), b[r])
for (const g of b[r])
p(g);
};
return p(e), f;
}, c = (u) => {
var f;
if (!u) return null;
if ((f = e[r]) != null && f.some((b) => b[t] === u))
return e;
const p = (b) => {
var g;
for (const k of b) {
if ((g = k[r]) != null && g.some((Z) => Z[t] === u))
return k;
if (k[r]) {
const Z = p(k[r]);
if (Z) return Z;
}
}
return null;
};
return p(e[r] || []);
}, h = (u) => {
var f;
if (!u || e[t] === u) return [];
const p = c(u);
return p ? ((f = p[r]) == null ? void 0 : f.filter((b) => b[t] !== u)) || [] : [];
}, P = (u) => {
if (!u || u === e[t]) return [];
const f = [], p = (b) => {
const g = c(b);
return g ? (f.push(g), p(g[t])) : f;
};
return p(u);
}, x = (u, f) => !u || !f || typeof f != "object" || Array.isArray(f) && !f.length ? !1 : Array.isArray(f) ? f.every(
(p) => typeof p == "object" && Object.keys(p).length
) : Object.keys(f).length > 0, O = (u, f) => {
if (!x(u, f)) return !1;
const p = i(u);
return p ? (Array.isArray(f) ? p[r] ? p[r].push(...f) : p[r] = f : p[r] ? p[r].push(f) : p[r] = [f], !0) : !1;
}, A = (u, f) => {
var p, b;
if (!x(u, f)) return !1;
const g = c(u);
return g ? (Array.isArray(f) ? (p = g[r]) == null || p.push(...f) : (b = g[r]) == null || b.push(f), !0) : !1;
}, U = (u) => !u || typeof u != "object" || !Object.keys(u).length ? !1 : (e[r] = [{ ...e }], delete u[r], Object.keys(e).filter((f) => f !== r).forEach((f) => {
u[f] || delete e[f];
}), Object.assign(e, u), !0), I = (u) => {
if (!u || typeof u != "object" || !Object.keys(u).length || !u[t])
return !1;
const f = i(u[t]);
return f ? (Object.assign(f, u), !0) : !1;
}, j = (u, f) => !u.length || !x(u[0], f) ? !1 : u.every((p) => (f[t] = p, I(f))), J = (u) => {
var f, p;
if (u === e[t]) return !1;
const b = c(u);
if (!b) return !1;
const g = (f = b[r]) == null ? void 0 : f.findIndex(
(k) => k[t] === u
);
return g !== void 0 && g > -1 ? ((p = b[r]) == null || p.splice(g, 1), !0) : !1;
};
return {
findNodeById: i,
findOneNode: s,
findNodes: a,
findParent: c,
findSiblings: h,
findAncestors: P,
addChildren: O,
addSiblings: A,
addRoot: U,
updateNode: I,
updateNodes: j,
removeNode: J,
removeNodes: (u) => !u || Array.isArray(u) && !u.length ? !1 : typeof u == "string" || typeof u == "number" ? J(u) : Array.isArray(u) ? u.every((f) => J(f)) : a(u).every((f) => J(f[t]))
};
}
function Ar(e, t) {
if (e.match(/^[a-z]+:\/\//i))
return e;
if (e.match(/^\/\//))
return window.location.protocol + e;
if (e.match(/^[a-z]+:/i))
return e;
const r = document.implementation.createHTMLDocument(), n = r.createElement("base"), i = r.createElement("a");
return r.head.appendChild(n), r.body.appendChild(i), t && (n.href = t), i.href = e, i.href;
}
const kr = /* @__PURE__ */ (() => {
let e = 0;
const t = () => (
// eslint-disable-next-line no-bitwise
`0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4)
);
return () => (e += 1, `u${t()}${e}`);
})();
function ie(e) {
const t = [];
for (let r = 0, n = e.length; r < n; r++)
t.push(e[r]);
return t;
}
function Oe(e, t) {
const n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
return n ? parseFloat(n.replace("px", "")) : 0;
}
function Dr(e) {
const t = Oe(e, "border-left-width"), r = Oe(e, "border-right-width");
return e.clientWidth + t + r;
}
function Ir(e) {
const t = Oe(e, "border-top-width"), r = Oe(e, "border-bottom-width");
return e.clientHeight + t + r;
}
function Ut(e, t = {}) {
const r = t.width || Dr(e), n = t.height || Ir(e);
return { width: r, height: n };
}
function Lr() {
let e, t;
try {
t = process;
} catch {
}
const r = t && t.env ? t.env.devicePixelRatio : null;
return r && (e = parseInt(r, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
}
const G = 16384;
function $r(e) {
(e.width > G || e.height > G) && (e.width > G && e.height > G ? e.width > e.height ? (e.height *= G / e.width, e.width = G) : (e.width *= G / e.height, e.height = G) : e.width > G ? (e.height *= G / e.width, e.width = G) : (e.width *= G / e.height, e.height = G));
}
function je(e) {
return new Promise((t, r) => {
const n = new Image();
n.decode = () => t(n), n.onload = () => t(n), n.onerror = r, n.crossOrigin = "anonymous", n.decoding = "async", n.src = e;
});
}
async function Fr(e) {
return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((t) => `data:image/svg+xml;charset=utf-8,${t}`);
}
async function Ur(e, t, r) {
const n = "http://www.w3.org/2000/svg", i = document.createElementNS(n, "svg"), s = document.createElementNS(n, "foreignObject");
return i.setAttribute("width", `${t}`), i.setAttribute("height", `${r}`), i.setAttribute("viewBox", `0 0 ${t} ${r}`), s.setAttribute("width", "100%"), s.setAttribute("height", "100%"), s.setAttribute("x", "0"), s.setAttribute("y", "0"), s.setAttribute("externalResourcesRequired", "true"), i.appendChild(s), s.appendChild(e), Fr(i);
}
const N = (e, t) => {
if (e instanceof t)
return !0;
const r = Object.getPrototypeOf(e);
return r === null ? !1 : r.constructor.name === t.name || N(r, t);
};
function Mr(e) {
const t = e.getPropertyValue("content");
return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
}
function Wr(e) {
return ie(e).map((t) => {
const r = e.getPropertyValue(t), n = e.getPropertyPriority(t);
return `${t}: ${r}${n ? " !important" : ""};`;
}).join(" ");
}
function Hr(e, t, r) {
const n = `.${e}:${t}`, i = r.cssText ? Mr(r) : Wr(r);
return document.createTextNode(`${n}{${i}}`);
}
function Rt(e, t, r) {
const n = window.getComputedStyle(e, r), i = n.getPropertyValue("content");
if (i === "" || i === "none")
return;
const s = kr();
try {
t.className = `${t.className} ${s}`;
} catch {
return;
}
const a = document.createElement("style");
a.appendChild(Hr(s, r, n)), t.appendChild(a);
}
function Vr(e, t) {
Rt(e, t, ":before"), Rt(e, t, ":after");
}
const Ct = "application/font-woff", _t = "image/jpeg", Yr = {
woff: Ct,
woff2: Ct,
ttf: "application/font-truetype",
eot: "application/vnd.ms-fontobject",
png: "image/png",
jpg: _t,
jpeg: _t,
gif: "image/gif",
tiff: "image/tiff",
svg: "image/svg+xml",
webp: "image/webp"
};
function Br(e) {
const t = /\.([^./]*?)$/g.exec(e);
return t ? t[1] : "";
}
function tt(e) {
const t = Br(e).toLowerCase();
return Yr[t] || "";
}
function qr(e) {
return e.split(/,/)[1];
}
function Ze(e) {
return e.search(/^(data:)/) !== -1;
}
function Nr(e, t) {
return `data:${t};base64,${e}`;
}
async function Mt(e, t, r) {
const n = await fetch(e, t);
if (n.status === 404)
throw new Error(`Resource "${n.url}" not found`);
const i = await n.blob();
return new Promise((s, a) => {
const c = new FileReader();
c.onerror = a, c.onloadend = () => {
try {
s(r({ res: n, result: c.result }));
} catch (h) {
a(h);
}
}, c.readAsDataURL(i);
});
}
const Be = {};
function Xr(e, t, r) {
let n = e.replace(/\?.*/, "");
return r && (n = e), /ttf|otf|eot|woff2?/i.test(n) && (n = n.replace(/.*\//, "")), t ? `[${t}]${n}` : n;
}
async function rt(e, t, r) {
const n = Xr(e, t, r.includeQueryParams);
if (Be[n] != null)
return Be[n];
r.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
let i;
try {
const s = await Mt(e, r.fetchRequestInit, ({ res: a, result: c }) => (t || (t = a.headers.get("Content-Type") || ""), qr(c)));
i = Nr(s, t);
} catch (s) {
i = r.imagePlaceholder || "";
let a = `Failed to fetch resource: ${e}`;
s && (a = typeof s == "string" ? s : s.message), a && console.warn(a);
}
return Be[n] = i, i;
}
async function Gr(e) {
const t = e.toDataURL();
return t === "data:," ? e.cloneNode(!1) : je(t);
}
async function Jr(e, t) {
if (e.currentSrc) {
const s = document.createElement("canvas"), a = s.getContext("2d");
s.width = e.clientWidth, s.height = e.clientHeight, a == null || a.drawImage(e, 0, 0, s.width, s.height);
const c = s.toDataURL();
return je(c);
}
const r = e.poster, n = tt(r), i = await rt(r, n, t);
return je(i);
}
async function zr(e) {
var t;
try {
if (!((t = e == null ? void 0 : e.contentDocument) === null || t === void 0) && t.body)
return await De(e.contentDocument.body, {}, !0);
} catch {
}
return e.cloneNode(!1);
}
async function Kr(e, t) {
return N(e, HTMLCanvasElement) ? Gr(e) : N(e, HTMLVideoElement) ? Jr(e, t) : N(e, HTMLIFrameElement) ? zr(e) : e.cloneNode(!1);
}
const Qr = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT";
async function Zr(e, t, r) {
var n, i;
let s = [];
return Qr(e) && e.assignedNodes ? s = ie(e.assignedNodes()) : N(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? s = ie(e.contentDocument.body.childNodes) : s = ie(((i = e.shadowRoot) !== null && i !== void 0 ? i : e).childNodes), s.length === 0 || N(e, HTMLVideoElement) || await s.reduce((a, c) => a.then(() => De(c, r)).then((h) => {
h && t.appendChild(h);
}), Promise.resolve()), t;
}
function en(e, t) {
const r = t.style;
if (!r)
return;
const n = window.getComputedStyle(e);
n.cssText ? (r.cssText = n.cssText, r.transformOrigin = n.transformOrigin) : ie(n).forEach((i) => {
let s = n.getPropertyValue(i);
i === "font-size" && s.endsWith("px") && (s = `${Math.floor(parseFloat(s.substring(0, s.length - 2))) - 0.1}px`), N(e, HTMLIFrameElement) && i === "display" && s === "inline" && (s = "block"), i === "d" && t.getAttribute("d") && (s = `path(${t.getAttribute("d")})`), r.setProperty(i, s, n.getPropertyPriority(i));
});
}
function tn(e, t) {
N(e, HTMLTextAreaElement) && (t.innerHTML = e.value), N(e, HTMLInputElement) && t.setAttribute("value", e.value);
}
function rn(e, t) {
if (N(e, HTMLSelectElement)) {
const r = t, n = Array.from(r.children).find((i) => e.value === i.getAttribute("value"));
n && n.setAttribute("selected", "");
}
}
function nn(e, t) {
return N(t, Element) && (en(e, t), Vr(e, t), tn(e, t), rn(e, t)), t;
}
async function on(e, t) {
const r = e.querySelectorAll ? e.querySelectorAll("use") : [];
if (r.length === 0)
return e;
const n = {};
for (let s = 0; s < r.length; s++) {
const c = r[s].getAttribute("xlink:href");
if (c) {
const h = e.querySelector(c), P = document.querySelector(c);
!h && P && !n[c] && (n[c] = await De(P, t, !0));
}
}
const i = Object.values(n);
if (i.length) {
const s = "http://www.w3.org/1999/xhtml", a = document.createElementNS(s, "svg");
a.setAttribute("xmlns", s), a.style.position = "absolute", a.style.width = "0", a.style.height = "0", a.style.overflow = "hidden", a.style.display = "none";
const c = document.createElementNS(s, "defs");
a.appendChild(c);
for (let h = 0; h < i.length; h++)
c.appendChild(i[h]);
e.appendChild(a);
}
return e;
}
async function De(e, t, r) {
return !r && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((n) => Kr(n, t)).then((n) => Zr(e, n, t)).then((n) => nn(e, n)).then((n) => on(n, t));
}
const Wt = /url\((['"]?)([^'"]+?)\1\)/g, sn = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, an = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
function cn(e) {
const t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
}
function ln(e) {
const t = [];
return e.replace(Wt, (r, n, i) => (t.push(i), r)), t.filter((r) => !Ze(r));
}
async function un(e, t, r, n, i) {
try {
const s = r ? Ar(t, r) : t, a = tt(t);
let c;
return i || (c = await rt(s, a, n)), e.replace(cn(t), `$1${c}$3`);
} catch {
}
return e;
}
function fn(e, { preferredFontFormat: t }) {
return t ? e.replace(an, (r) => {
for (; ; ) {
const [n, , i] = sn.exec(r) || [];
if (!i)
return "";
if (i === t)
return `src: ${n};`;
}
}) : e;
}
function Ht(e) {
return e.search(Wt) !== -1;
}
async function Vt(e, t, r) {
if (!Ht(e))
retu