import { aG as I, aH as Ze, aI as m, ad as y, ac as Te, aJ as qe, aK as Xe, aL as Je, aM as Ee, aN as G, aa as X, aO as Qe, aP as me, aQ as We, aR as C, aS as D, aj as Oe, a5 as ve, aT as ze, aU as Z, aV as Ve, aW as ke, aX as P, ai as en, aY as nn, ab as rn, aZ as re, a_ as tn, a$ as sn, ah as an, ag as we, ae as un, b0 as j, a8 as fn, b1 as on, ak as M, y as te, b2 as ie } from "./main-8k4vh9Gc.js";
var dn = "[object Symbol]";
function J(e) {
  return typeof e == "symbol" || I(e) && Ze(e) == dn;
}
function $e(e, n) {
  for (var r = -1, t = e == null ? 0 : e.length, i = Array(t); ++r < t; )
    i[r] = n(e[r], r, e);
  return i;
}
var hn = 1 / 0, se = m ? m.prototype : void 0, ae = se ? se.toString : void 0;
function Le(e) {
  if (typeof e == "string")
    return e;
  if (y(e))
    return $e(e, Le) + "";
  if (J(e))
    return ae ? ae.call(e) : "";
  var n = e + "";
  return n == "0" && 1 / e == -hn ? "-0" : n;
}
function gn() {
}
function Pe(e, n) {
  for (var r = -1, t = e == null ? 0 : e.length; ++r < t && n(e[r], r, e) !== !1; )
    ;
  return e;
}
function ln(e, n, r, t) {
  for (var i = e.length, s = r + -1; ++s < i; )
    if (n(e[s], s, e))
      return s;
  return -1;
}
function cn(e) {
  return e !== e;
}
function _n(e, n, r) {
  for (var t = r - 1, i = e.length; ++t < i; )
    if (e[t] === n)
      return t;
  return -1;
}
function pn(e, n, r) {
  return n === n ? _n(e, n, r) : ln(e, cn, r);
}
function bn(e, n) {
  var r = e == null ? 0 : e.length;
  return !!r && pn(e, n, 0) > -1;
}
function T(e) {
  return Te(e) ? qe(e) : Xe(e);
}
var yn = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, An = /^\w*$/;
function Q(e, n) {
  if (y(e))
    return !1;
  var r = typeof e;
  return r == "number" || r == "symbol" || r == "boolean" || e == null || J(e) ? !0 : An.test(e) || !yn.test(e) || n != null && e in Object(n);
}
var Tn = 500;
function En(e) {
  var n = Je(e, function(t) {
    return r.size === Tn && r.clear(), t;
  }), r = n.cache;
  return n;
}
var mn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, On = /\\(\\)?/g, vn = En(function(e) {
  var n = [];
  return e.charCodeAt(0) === 46 && n.push(""), e.replace(mn, function(r, t, i, s) {
    n.push(i ? s.replace(On, "$1") : t || r);
  }), n;
});
function wn(e) {
  return e == null ? "" : Le(e);
}
function Ie(e, n) {
  return y(e) ? e : Q(e, n) ? [e] : vn(wn(e));
}
var $n = 1 / 0;
function U(e) {
  if (typeof e == "string" || J(e))
    return e;
  var n = e + "";
  return n == "0" && 1 / e == -$n ? "-0" : n;
}
function Ce(e, n) {
  n = Ie(n, e);
  for (var r = 0, t = n.length; e != null && r < t; )
    e = e[U(n[r++])];
  return r && r == t ? e : void 0;
}
function Ln(e, n, r) {
  var t = e == null ? void 0 : Ce(e, n);
  return t === void 0 ? r : t;
}
function W(e, n) {
  for (var r = -1, t = n.length, i = e.length; ++r < t; )
    e[i + r] = n[r];
  return e;
}
var ue = m ? m.isConcatSpreadable : void 0;
function Pn(e) {
  return y(e) || Ee(e) || !!(ue && e && e[ue]);
}
function In(e, n, r, t, i) {
  var s = -1, a = e.length;
  for (r || (r = Pn), i || (i = []); ++s < a; ) {
    var u = e[s];
    r(u) ? W(i, u) : t || (i[i.length] = u);
  }
  return i;
}
function Cn(e, n, r, t) {
  var i = -1, s = e == null ? 0 : e.length;
  for (t && s && (r = e[++i]); ++i < s; )
    r = n(r, e[i], i, e);
  return r;
}
function Sn(e, n) {
  return e && G(n, T(n), e);
}
function Nn(e, n) {
  return e && G(n, X(n), e);
}
function Se(e, n) {
  for (var r = -1, t = e == null ? 0 : e.length, i = 0, s = []; ++r < t; ) {
    var a = e[r];
    n(a, r, e) && (s[i++] = a);
  }
  return s;
}
function Ne() {
  return [];
}
var Fn = Object.prototype, Mn = Fn.propertyIsEnumerable, fe = Object.getOwnPropertySymbols, z = fe ? function(e) {
  return e == null ? [] : (e = Object(e), Se(fe(e), function(n) {
    return Mn.call(e, n);
  }));
} : Ne;
function Rn(e, n) {
  return G(e, z(e), n);
}
var xn = Object.getOwnPropertySymbols, Fe = xn ? function(e) {
  for (var n = []; e; )
    W(n, z(e)), e = Qe(e);
  return n;
} : Ne;
function Dn(e, n) {
  return G(e, Fe(e), n);
}
function Me(e, n, r) {
  var t = n(e);
  return y(e) ? t : W(t, r(e));
}
function q(e) {
  return Me(e, T, z);
}
function Gn(e) {
  return Me(e, X, Fe);
}
var Un = Object.prototype, jn = Un.hasOwnProperty;
function Bn(e) {
  var n = e.length, r = new e.constructor(n);
  return n && typeof e[0] == "string" && jn.call(e, "index") && (r.index = e.index, r.input = e.input), r;
}
function Kn(e, n) {
  var r = n ? me(e.buffer) : e.buffer;
  return new e.constructor(r, e.byteOffset, e.byteLength);
}
var Hn = /\w*$/;
function Yn(e) {
  var n = new e.constructor(e.source, Hn.exec(e));
  return n.lastIndex = e.lastIndex, n;
}
var oe = m ? m.prototype : void 0, de = oe ? oe.valueOf : void 0;
function Zn(e) {
  return de ? Object(de.call(e)) : {};
}
var qn = "[object Boolean]", Xn = "[object Date]", Jn = "[object Map]", Qn = "[object Number]", Wn = "[object RegExp]", zn = "[object Set]", Vn = "[object String]", kn = "[object Symbol]", er = "[object ArrayBuffer]", nr = "[object DataView]", rr = "[object Float32Array]", tr = "[object Float64Array]", ir = "[object Int8Array]", sr = "[object Int16Array]", ar = "[object Int32Array]", ur = "[object Uint8Array]", fr = "[object Uint8ClampedArray]", or = "[object Uint16Array]", dr = "[object Uint32Array]";
function hr(e, n, r) {
  var t = e.constructor;
  switch (n) {
    case er:
      return me(e);
    case qn:
    case Xn:
      return new t(+e);
    case nr:
      return Kn(e, r);
    case rr:
    case tr:
    case ir:
    case sr:
    case ar:
    case ur:
    case fr:
    case or:
    case dr:
      return We(e, r);
    case Jn:
      return new t();
    case Qn:
    case Vn:
      return new t(e);
    case Wn:
      return Yn(e);
    case zn:
      return new t();
    case kn:
      return Zn(e);
  }
}
var gr = "[object Map]";
function lr(e) {
  return I(e) && C(e) == gr;
}
var he = D && D.isMap, cr = he ? Oe(he) : lr, _r = "[object Set]";
function pr(e) {
  return I(e) && C(e) == _r;
}
var ge = D && D.isSet, br = ge ? Oe(ge) : pr, yr = 1, Ar = 2, Tr = 4, Re = "[object Arguments]", Er = "[object Array]", mr = "[object Boolean]", Or = "[object Date]", vr = "[object Error]", xe = "[object Function]", wr = "[object GeneratorFunction]", $r = "[object Map]", Lr = "[object Number]", De = "[object Object]", Pr = "[object RegExp]", Ir = "[object Set]", Cr = "[object String]", Sr = "[object Symbol]", Nr = "[object WeakMap]", Fr = "[object ArrayBuffer]", Mr = "[object DataView]", Rr = "[object Float32Array]", xr = "[object Float64Array]", Dr = "[object Int8Array]", Gr = "[object Int16Array]", Ur = "[object Int32Array]", jr = "[object Uint8Array]", Br = "[object Uint8ClampedArray]", Kr = "[object Uint16Array]", Hr = "[object Uint32Array]", d = {};
d[Re] = d[Er] = d[Fr] = d[Mr] = d[mr] = d[Or] = d[Rr] = d[xr] = d[Dr] = d[Gr] = d[Ur] = d[$r] = d[Lr] = d[De] = d[Pr] = d[Ir] = d[Cr] = d[Sr] = d[jr] = d[Br] = d[Kr] = d[Hr] = !0;
d[vr] = d[xe] = d[Nr] = !1;
function B(e, n, r, t, i, s) {
  var a, u = n & yr, f = n & Ar, l = n & Tr;
  if (a !== void 0)
    return a;
  if (!ve(e))
    return e;
  var g = y(e);
  if (g) {
    if (a = Bn(e), !u)
      return ze(e, a);
  } else {
    var o = C(e), h = o == xe || o == wr;
    if (Z(e))
      return Ve(e, u);
    if (o == De || o == Re || h && !i) {
      if (a = f || h ? {} : ke(e), !u)
        return f ? Dn(e, Nn(a, e)) : Rn(e, Sn(a, e));
    } else {
      if (!d[o])
        return i ? e : {};
      a = hr(e, o, u);
    }
  }
  s || (s = new P());
  var A = s.get(e);
  if (A)
    return A;
  s.set(e, a), br(e) ? e.forEach(function(c) {
    a.add(B(c, n, r, c, e, s));
  }) : cr(e) && e.forEach(function(c, _) {
    a.set(_, B(c, n, r, _, e, s));
  });
  var p = l ? f ? Gn : q : f ? X : T, b = g ? void 0 : p(e);
  return Pe(b || e, function(c, _) {
    b && (_ = c, c = e[_]), en(a, _, B(c, n, r, _, e, s));
  }), a;
}
var Yr = "__lodash_hash_undefined__";
function Zr(e) {
  return this.__data__.set(e, Yr), this;
}
function qr(e) {
  return this.__data__.has(e);
}
function S(e) {
  var n = -1, r = e == null ? 0 : e.length;
  for (this.__data__ = new nn(); ++n < r; )
    this.add(e[n]);
}
S.prototype.add = S.prototype.push = Zr;
S.prototype.has = qr;
function Xr(e, n) {
  for (var r = -1, t = e == null ? 0 : e.length; ++r < t; )
    if (n(e[r], r, e))
      return !0;
  return !1;
}
function Ge(e, n) {
  return e.has(n);
}
var Jr = 1, Qr = 2;
function Ue(e, n, r, t, i, s) {
  var a = r & Jr, u = e.length, f = n.length;
  if (u != f && !(a && f > u))
    return !1;
  var l = s.get(e), g = s.get(n);
  if (l && g)
    return l == n && g == e;
  var o = -1, h = !0, A = r & Qr ? new S() : void 0;
  for (s.set(e, n), s.set(n, e); ++o < u; ) {
    var p = e[o], b = n[o];
    if (t)
      var c = a ? t(b, p, o, n, e, s) : t(p, b, o, e, n, s);
    if (c !== void 0) {
      if (c)
        continue;
      h = !1;
      break;
    }
    if (A) {
      if (!Xr(n, function(_, O) {
        if (!Ge(A, O) && (p === _ || i(p, _, r, t, s)))
          return A.push(O);
      })) {
        h = !1;
        break;
      }
    } else if (!(p === b || i(p, b, r, t, s))) {
      h = !1;
      break;
    }
  }
  return s.delete(e), s.delete(n), h;
}
function Wr(e) {
  var n = -1, r = Array(e.size);
  return e.forEach(function(t, i) {
    r[++n] = [i, t];
  }), r;
}
function V(e) {
  var n = -1, r = Array(e.size);
  return e.forEach(function(t) {
    r[++n] = t;
  }), r;
}
var zr = 1, Vr = 2, kr = "[object Boolean]", et = "[object Date]", nt = "[object Error]", rt = "[object Map]", tt = "[object Number]", it = "[object RegExp]", st = "[object Set]", at = "[object String]", ut = "[object Symbol]", ft = "[object ArrayBuffer]", ot = "[object DataView]", le = m ? m.prototype : void 0, K = le ? le.valueOf : void 0;
function dt(e, n, r, t, i, s, a) {
  switch (r) {
    case ot:
      if (e.byteLength != n.byteLength || e.byteOffset != n.byteOffset)
        return !1;
      e = e.buffer, n = n.buffer;
    case ft:
      return !(e.byteLength != n.byteLength || !s(new re(e), new re(n)));
    case kr:
    case et:
    case tt:
      return rn(+e, +n);
    case nt:
      return e.name == n.name && e.message == n.message;
    case it:
    case at:
      return e == n + "";
    case rt:
      var u = Wr;
    case st:
      var f = t & zr;
      if (u || (u = V), e.size != n.size && !f)
        return !1;
      var l = a.get(e);
      if (l)
        return l == n;
      t |= Vr, a.set(e, n);
      var g = Ue(u(e), u(n), t, i, s, a);
      return a.delete(e), g;
    case ut:
      if (K)
        return K.call(e) == K.call(n);
  }
  return !1;
}
var ht = 1, gt = Object.prototype, lt = gt.hasOwnProperty;
function ct(e, n, r, t, i, s) {
  var a = r & ht, u = q(e), f = u.length, l = q(n), g = l.length;
  if (f != g && !a)
    return !1;
  for (var o = f; o--; ) {
    var h = u[o];
    if (!(a ? h in n : lt.call(n, h)))
      return !1;
  }
  var A = s.get(e), p = s.get(n);
  if (A && p)
    return A == n && p == e;
  var b = !0;
  s.set(e, n), s.set(n, e);
  for (var c = a; ++o < f; ) {
    h = u[o];
    var _ = e[h], O = n[h];
    if (t)
      var ne = a ? t(O, _, h, n, e, s) : t(_, O, h, e, n, s);
    if (!(ne === void 0 ? _ === O || i(_, O, r, t, s) : ne)) {
      b = !1;
      break;
    }
    c || (c = h == "constructor");
  }
  if (b && !c) {
    var N = e.constructor, F = n.constructor;
    N != F && "constructor" in e && "constructor" in n && !(typeof N == "function" && N instanceof N && typeof F == "function" && F instanceof F) && (b = !1);
  }
  return s.delete(e), s.delete(n), b;
}
var _t = 1, ce = "[object Arguments]", _e = "[object Array]", R = "[object Object]", pt = Object.prototype, pe = pt.hasOwnProperty;
function bt(e, n, r, t, i, s) {
  var a = y(e), u = y(n), f = a ? _e : C(e), l = u ? _e : C(n);
  f = f == ce ? R : f, l = l == ce ? R : l;
  var g = f == R, o = l == R, h = f == l;
  if (h && Z(e)) {
    if (!Z(n))
      return !1;
    a = !0, g = !1;
  }
  if (h && !g)
    return s || (s = new P()), a || tn(e) ? Ue(e, n, r, t, i, s) : dt(e, n, f, r, t, i, s);
  if (!(r & _t)) {
    var A = g && pe.call(e, "__wrapped__"), p = o && pe.call(n, "__wrapped__");
    if (A || p) {
      var b = A ? e.value() : e, c = p ? n.value() : n;
      return s || (s = new P()), i(b, c, r, t, s);
    }
  }
  return h ? (s || (s = new P()), ct(e, n, r, t, i, s)) : !1;
}
function k(e, n, r, t, i) {
  return e === n ? !0 : e == null || n == null || !I(e) && !I(n) ? e !== e && n !== n : bt(e, n, r, t, k, i);
}
var yt = 1, At = 2;
function Tt(e, n, r, t) {
  var i = r.length, s = i;
  if (e == null)
    return !s;
  for (e = Object(e); i--; ) {
    var a = r[i];
    if (a[2] ? a[1] !== e[a[0]] : !(a[0] in e))
      return !1;
  }
  for (; ++i < s; ) {
    a = r[i];
    var u = a[0], f = e[u], l = a[1];
    if (a[2]) {
      if (f === void 0 && !(u in e))
        return !1;
    } else {
      var g = new P(), o;
      if (!(o === void 0 ? k(l, f, yt | At, t, g) : o))
        return !1;
    }
  }
  return !0;
}
function je(e) {
  return e === e && !ve(e);
}
function Et(e) {
  for (var n = T(e), r = n.length; r--; ) {
    var t = n[r], i = e[t];
    n[r] = [t, i, je(i)];
  }
  return n;
}
function Be(e, n) {
  return function(r) {
    return r == null ? !1 : r[e] === n && (n !== void 0 || e in Object(r));
  };
}
function mt(e) {
  var n = Et(e);
  return n.length == 1 && n[0][2] ? Be(n[0][0], n[0][1]) : function(r) {
    return r === e || Tt(r, e, n);
  };
}
function Ot(e, n) {
  return e != null && n in Object(e);
}
function Ke(e, n, r) {
  n = Ie(n, e);
  for (var t = -1, i = n.length, s = !1; ++t < i; ) {
    var a = U(n[t]);
    if (!(s = e != null && r(e, a)))
      break;
    e = e[a];
  }
  return s || ++t != i ? s : (i = e == null ? 0 : e.length, !!i && sn(i) && an(a, i) && (y(e) || Ee(e)));
}
function vt(e, n) {
  return e != null && Ke(e, n, Ot);
}
var wt = 1, $t = 2;
function Lt(e, n) {
  return Q(e) && je(n) ? Be(U(e), n) : function(r) {
    var t = Ln(r, e);
    return t === void 0 && t === n ? vt(r, e) : k(n, t, wt | $t);
  };
}
function Pt(e) {
  return function(n) {
    return n == null ? void 0 : n[e];
  };
}
function It(e) {
  return function(n) {
    return Ce(n, e);
  };
}
function Ct(e) {
  return Q(e) ? Pt(U(e)) : It(e);
}
function He(e) {
  return typeof e == "function" ? e : e == null ? we : typeof e == "object" ? y(e) ? Lt(e[0], e[1]) : mt(e) : Ct(e);
}
function St(e, n) {
  return e && un(e, n, T);
}
function Nt(e, n) {
  return function(r, t) {
    if (r == null)
      return r;
    if (!Te(r))
      return e(r, t);
    for (var i = r.length, s = -1, a = Object(r); ++s < i && t(a[s], s, a) !== !1; )
      ;
    return r;
  };
}
var ee = Nt(St);
function Ft(e) {
  return typeof e == "function" ? e : we;
}
function v(e, n) {
  var r = y(e) ? Pe : ee;
  return r(e, Ft(n));
}
function Mt(e, n) {
  var r = [];
  return ee(e, function(t, i, s) {
    n(t, i, s) && r.push(t);
  }), r;
}
function x(e, n) {
  var r = y(e) ? Se : Mt;
  return r(e, He(n));
}
var Rt = Object.prototype, xt = Rt.hasOwnProperty;
function Dt(e, n) {
  return e != null && xt.call(e, n);
}
function E(e, n) {
  return e != null && Ke(e, n, Dt);
}
function Gt(e, n) {
  return $e(n, function(r) {
    return e[r];
  });
}
function H(e) {
  return e == null ? [] : Gt(e, T(e));
}
function $(e) {
  return e === void 0;
}
function Ut(e, n, r, t, i) {
  return i(e, function(s, a, u) {
    r = t ? (t = !1, s) : n(r, s, a, u);
  }), r;
}
function jt(e, n, r) {
  var t = y(e) ? Cn : Ut, i = arguments.length < 3;
  return t(e, He(n), r, i, ee);
}
var Bt = 1 / 0, Kt = j && 1 / V(new j([, -0]))[1] == Bt ? function(e) {
  return new j(e);
} : gn, Ht = 200;
function Yt(e, n, r) {
  var t = -1, i = bn, s = e.length, a = !0, u = [], f = u;
  if (s >= Ht) {
    var l = Kt(e);
    if (l)
      return V(l);
    a = !1, i = Ge, f = new S();
  } else
    f = u;
  e:
    for (; ++t < s; ) {
      var g = e[t], o = g;
      if (g = g !== 0 ? g : 0, a && o === o) {
        for (var h = f.length; h--; )
          if (f[h] === o)
            continue e;
        u.push(g);
      } else i(f, o, r) || (f !== u && f.push(o), u.push(g));
    }
  return u;
}
var Zt = fn(function(e) {
  return Yt(In(e, 1, on, !0));
}), qt = "\0", w = "\0", be = "";
class Ye {
  constructor(n = {}) {
    this._isDirected = E(n, "directed") ? n.directed : !0, this._isMultigraph = E(n, "multigraph") ? n.multigraph : !1, this._isCompound = E(n, "compound") ? n.compound : !1, this._label = void 0, this._defaultNodeLabelFn = M(void 0), this._defaultEdgeLabelFn = M(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[w] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {};
  }
  /* === Graph functions ========= */
  isDirected() {
    return this._isDirected;
  }
  isMultigraph() {
    return this._isMultigraph;
  }
  isCompound() {
    return this._isCompound;
  }
  setGraph(n) {
    return this._label = n, this;
  }
  graph() {
    return this._label;
  }
  /* === Node functions ========== */
  setDefaultNodeLabel(n) {
    return te(n) || (n = M(n)), this._defaultNodeLabelFn = n, this;
  }
  nodeCount() {
    return this._nodeCount;
  }
  nodes() {
    return T(this._nodes);
  }
  sources() {
    var n = this;
    return x(this.nodes(), function(r) {
      return ie(n._in[r]);
    });
  }
  sinks() {
    var n = this;
    return x(this.nodes(), function(r) {
      return ie(n._out[r]);
    });
  }
  setNodes(n, r) {
    var t = arguments, i = this;
    return v(n, function(s) {
      t.length > 1 ? i.setNode(s, r) : i.setNode(s);
    }), this;
  }
  setNode(n, r) {
    return E(this._nodes, n) ? (arguments.length > 1 && (this._nodes[n] = r), this) : (this._nodes[n] = arguments.length > 1 ? r : this._defaultNodeLabelFn(n), this._isCompound && (this._parent[n] = w, this._children[n] = {}, this._children[w][n] = !0), this._in[n] = {}, this._preds[n] = {}, this._out[n] = {}, this._sucs[n] = {}, ++this._nodeCount, this);
  }
  node(n) {
    return this._nodes[n];
  }
  hasNode(n) {
    return E(this._nodes, n);
  }
  removeNode(n) {
    var r = this;
    if (E(this._nodes, n)) {
      var t = function(i) {
        r.removeEdge(r._edgeObjs[i]);
      };
      delete this._nodes[n], this._isCompound && (this._removeFromParentsChildList(n), delete this._parent[n], v(this.children(n), function(i) {
        r.setParent(i);
      }), delete this._children[n]), v(T(this._in[n]), t), delete this._in[n], delete this._preds[n], v(T(this._out[n]), t), delete this._out[n], delete this._sucs[n], --this._nodeCount;
    }
    return this;
  }
  setParent(n, r) {
    if (!this._isCompound)
      throw new Error("Cannot set parent in a non-compound graph");
    if ($(r))
      r = w;
    else {
      r += "";
      for (var t = r; !$(t); t = this.parent(t))
        if (t === n)
          throw new Error("Setting " + r + " as parent of " + n + " would create a cycle");
      this.setNode(r);
    }
    return this.setNode(n), this._removeFromParentsChildList(n), this._parent[n] = r, this._children[r][n] = !0, this;
  }
  _removeFromParentsChildList(n) {
    delete this._children[this._parent[n]][n];
  }
  parent(n) {
    if (this._isCompound) {
      var r = this._parent[n];
      if (r !== w)
        return r;
    }
  }
  children(n) {
    if ($(n) && (n = w), this._isCompound) {
      var r = this._children[n];
      if (r)
        return T(r);
    } else {
      if (n === w)
        return this.nodes();
      if (this.hasNode(n))
        return [];
    }
  }
  predecessors(n) {
    var r = this._preds[n];
    if (r)
      return T(r);
  }
  successors(n) {
    var r = this._sucs[n];
    if (r)
      return T(r);
  }
  neighbors(n) {
    var r = this.predecessors(n);
    if (r)
      return Zt(r, this.successors(n));
  }
  isLeaf(n) {
    var r;
    return this.isDirected() ? r = this.successors(n) : r = this.neighbors(n), r.length === 0;
  }
  filterNodes(n) {
    var r = new this.constructor({
      directed: this._isDirected,
      multigraph: this._isMultigraph,
      compound: this._isCompound
    });
    r.setGraph(this.graph());
    var t = this;
    v(this._nodes, function(a, u) {
      n(u) && r.setNode(u, a);
    }), v(this._edgeObjs, function(a) {
      r.hasNode(a.v) && r.hasNode(a.w) && r.setEdge(a, t.edge(a));
    });
    var i = {};
    function s(a) {
      var u = t.parent(a);
      return u === void 0 || r.hasNode(u) ? (i[a] = u, u) : u in i ? i[u] : s(u);
    }
    return this._isCompound && v(r.nodes(), function(a) {
      r.setParent(a, s(a));
    }), r;
  }
  /* === Edge functions ========== */
  setDefaultEdgeLabel(n) {
    return te(n) || (n = M(n)), this._defaultEdgeLabelFn = n, this;
  }
  edgeCount() {
    return this._edgeCount;
  }
  edges() {
    return H(this._edgeObjs);
  }
  setPath(n, r) {
    var t = this, i = arguments;
    return jt(n, function(s, a) {
      return i.length > 1 ? t.setEdge(s, a, r) : t.setEdge(s, a), a;
    }), this;
  }
  /*
   * setEdge(v, w, [value, [name]])
   * setEdge({ v, w, [name] }, [value])
   */
  setEdge() {
    var n, r, t, i, s = !1, a = arguments[0];
    typeof a == "object" && a !== null && "v" in a ? (n = a.v, r = a.w, t = a.name, arguments.length === 2 && (i = arguments[1], s = !0)) : (n = a, r = arguments[1], t = arguments[3], arguments.length > 2 && (i = arguments[2], s = !0)), n = "" + n, r = "" + r, $(t) || (t = "" + t);
    var u = L(this._isDirected, n, r, t);
    if (E(this._edgeLabels, u))
      return s && (this._edgeLabels[u] = i), this;
    if (!$(t) && !this._isMultigraph)
      throw new Error("Cannot set a named edge when isMultigraph = false");
    this.setNode(n), this.setNode(r), this._edgeLabels[u] = s ? i : this._defaultEdgeLabelFn(n, r, t);
    var f = Xt(this._isDirected, n, r, t);
    return n = f.v, r = f.w, Object.freeze(f), this._edgeObjs[u] = f, ye(this._preds[r], n), ye(this._sucs[n], r), this._in[r][u] = f, this._out[n][u] = f, this._edgeCount++, this;
  }
  edge(n, r, t) {
    var i = arguments.length === 1 ? Y(this._isDirected, arguments[0]) : L(this._isDirected, n, r, t);
    return this._edgeLabels[i];
  }
  hasEdge(n, r, t) {
    var i = arguments.length === 1 ? Y(this._isDirected, arguments[0]) : L(this._isDirected, n, r, t);
    return E(this._edgeLabels, i);
  }
  removeEdge(n, r, t) {
    var i = arguments.length === 1 ? Y(this._isDirected, arguments[0]) : L(this._isDirected, n, r, t), s = this._edgeObjs[i];
    return s && (n = s.v, r = s.w, delete this._edgeLabels[i], delete this._edgeObjs[i], Ae(this._preds[r], n), Ae(this._sucs[n], r), delete this._in[r][i], delete this._out[n][i], this._edgeCount--), this;
  }
  inEdges(n, r) {
    var t = this._in[n];
    if (t) {
      var i = H(t);
      return r ? x(i, function(s) {
        return s.v === r;
      }) : i;
    }
  }
  outEdges(n, r) {
    var t = this._out[n];
    if (t) {
      var i = H(t);
      return r ? x(i, function(s) {
        return s.w === r;
      }) : i;
    }
  }
  nodeEdges(n, r) {
    var t = this.inEdges(n, r);
    if (t)
      return t.concat(this.outEdges(n, r));
  }
}
Ye.prototype._nodeCount = 0;
Ye.prototype._edgeCount = 0;
function ye(e, n) {
  e[n] ? e[n]++ : e[n] = 1;
}
function Ae(e, n) {
  --e[n] || delete e[n];
}
function L(e, n, r, t) {
  var i = "" + n, s = "" + r;
  if (!e && i > s) {
    var a = i;
    i = s, s = a;
  }
  return i + be + s + be + ($(t) ? qt : t);
}
function Xt(e, n, r, t) {
  var i = "" + n, s = "" + r;
  if (!e && i > s) {
    var a = i;
    i = s, s = a;
  }
  var u = { v: i, w: s };
  return t && (u.name = t), u;
}
function Y(e, n) {
  return L(e, n.v, n.w, n.name);
}
export {
  Ye as G,
  J as a,
  In as b,
  B as c,
  He as d,
  ln as e,
  v as f,
  ee as g,
  E as h,
  $ as i,
  $e as j,
  T as k,
  Ft as l,
  St as m,
  Ie as n,
  Ce as o,
  vt as p,
  wn as q,
  x as r,
  jt as s,
  U as t,
  H as v
};
//# sourceMappingURL=graph-CalDMoQe.js.map
