function he() {
}
const Is = (e) => e;
function h0(e, t) {
  for (const r in t)
    e[r] = t[r];
  return e;
}
function g0(e) {
  return e();
}
function Yd() {
  return /* @__PURE__ */ Object.create(null);
}
function Le(e) {
  e.forEach(g0);
}
function mt(e) {
  return typeof e == "function";
}
function Be(e, t) {
  return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
}
let io;
function Uu(e, t) {
  return io || (io = document.createElement("a")), io.href = t, e === io.href;
}
function sS(e) {
  return Object.keys(e).length === 0;
}
function Xf(e, ...t) {
  if (e == null)
    return he;
  const r = e.subscribe(...t);
  return r.unsubscribe ? () => r.unsubscribe() : r;
}
function dt(e, t, r) {
  e.$$.on_destroy.push(Xf(t, r));
}
function Qf(e, t, r, n) {
  if (e) {
    const a = m0(e, t, r, n);
    return e[0](a);
  }
}
function m0(e, t, r, n) {
  return e[1] && n ? h0(r.ctx.slice(), e[1](n(t))) : r.ctx;
}
function Zf(e, t, r, n) {
  if (e[2] && n) {
    const a = e[2](n(r));
    if (t.dirty === void 0)
      return a;
    if (typeof a == "object") {
      const i = [], o = Math.max(t.dirty.length, a.length);
      for (let s = 0; s < o; s += 1)
        i[s] = t.dirty[s] | a[s];
      return i;
    }
    return t.dirty | a;
  }
  return t.dirty;
}
function ec(e, t, r, n, a, i) {
  if (a) {
    const o = m0(t, r, n, i);
    e.p(o, a);
  }
}
function tc(e) {
  if (e.ctx.length > 32) {
    const t = [], r = e.ctx.length / 32;
    for (let n = 0; n < r; n++)
      t[n] = -1;
    return t;
  }
  return -1;
}
function ir(e) {
  return e ?? "";
}
function zt(e, t, r) {
  return e.set(r), t;
}
const b0 = typeof window < "u";
let si = b0 ? () => window.performance.now() : () => Date.now(), rc = b0 ? (e) => requestAnimationFrame(e) : he;
const ta = /* @__PURE__ */ new Set();
function _0(e) {
  ta.forEach((t) => {
    t.c(e) || (ta.delete(t), t.f());
  }), ta.size !== 0 && rc(_0);
}
function Ps(e) {
  let t;
  return ta.size === 0 && rc(_0), {
    promise: new Promise((r) => {
      ta.add(t = { c: e, f: r });
    }),
    abort() {
      ta.delete(t);
    }
  };
}
function p(e, t) {
  e.appendChild(t);
}
function rt(e, t, r) {
  const n = nc(e);
  if (!n.getElementById(t)) {
    const a = y("style");
    a.id = t, a.textContent = r, y0(n, a);
  }
}
function nc(e) {
  if (!e)
    return document;
  const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
  return t && t.host ? t : e.ownerDocument;
}
function lS(e) {
  const t = y("style");
  return y0(nc(e), t), t.sheet;
}
function y0(e, t) {
  return p(e.head || e, t), t.sheet;
}
function L(e, t, r) {
  e.insertBefore(t, r || null);
}
function x(e) {
  e.parentNode && e.parentNode.removeChild(e);
}
function Ve(e, t) {
  for (let r = 0; r < e.length; r += 1)
    e[r] && e[r].d(t);
}
function y(e) {
  return document.createElement(e);
}
function Fe(e) {
  return document.createElementNS("http://www.w3.org/2000/svg", e);
}
function Q(e) {
  return document.createTextNode(e);
}
function T() {
  return Q(" ");
}
function vt() {
  return Q("");
}
function Z(e, t, r, n) {
  return e.addEventListener(t, r, n), () => e.removeEventListener(t, r, n);
}
function Ee(e) {
  return function(t) {
    return t.preventDefault(), e.call(this, t);
  };
}
function ia(e) {
  return function(t) {
    return t.stopPropagation(), e.call(this, t);
  };
}
function c(e, t, r) {
  r == null ? e.removeAttribute(t) : e.getAttribute(t) !== r && e.setAttribute(t, r);
}
function Hu(e, t, r) {
  t in e ? e[t] = typeof e[t] == "boolean" && r === "" ? !0 : r : c(e, t, r);
}
function w0(e, t, r) {
  e.setAttributeNS("http://www.w3.org/1999/xlink", t, r);
}
function lr(e) {
  return e === "" ? null : +e;
}
function uS(e) {
  return Array.from(e.childNodes);
}
function _e(e, t) {
  t = "" + t, e.wholeText !== t && (e.data = t);
}
function ht(e, t) {
  e.value = t ?? "";
}
function O(e, t, r, n) {
  r === null ? e.style.removeProperty(t) : e.style.setProperty(t, r, n ? "important" : "");
}
function wt(e, t) {
  for (let r = 0; r < e.options.length; r += 1) {
    const n = e.options[r];
    if (n.__value === t) {
      n.selected = !0;
      return;
    }
  }
  e.selectedIndex = -1;
}
function pr(e) {
  const t = e.querySelector(":checked") || e.options[0];
  return t && t.__value;
}
let oo;
function fS() {
  if (oo === void 0) {
    oo = !1;
    try {
      typeof window < "u" && window.parent && window.parent.document;
    } catch {
      oo = !0;
    }
  }
  return oo;
}
function cS(e, t) {
  getComputedStyle(e).position === "static" && (e.style.position = "relative");
  const n = y("iframe");
  n.setAttribute("style", "display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"), n.setAttribute("aria-hidden", "true"), n.tabIndex = -1;
  const a = fS();
  let i;
  return a ? (n.src = "data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>", i = Z(window, "message", (o) => {
    o.source === n.contentWindow && t();
  })) : (n.src = "about:blank", n.onload = () => {
    i = Z(n.contentWindow, "resize", t);
  }), p(e, n), () => {
    (a || i && n.contentWindow) && i(), x(n);
  };
}
function ve(e, t, r) {
  e.classList[r ? "add" : "remove"](t);
}
function S0(e, t, { bubbles: r = !1, cancelable: n = !1 } = {}) {
  const a = document.createEvent("CustomEvent");
  return a.initCustomEvent(e, r, n, t), a;
}
class dS {
  constructor(t = !1) {
    this.is_svg = !1, this.is_svg = t, this.e = this.n = null;
  }
  c(t) {
    this.h(t);
  }
  m(t, r, n = null) {
    this.e || (this.is_svg ? this.e = Fe(r.nodeName) : this.e = y(r.nodeName), this.t = r, this.c(t)), this.i(n);
  }
  h(t) {
    this.e.innerHTML = t, this.n = Array.from(this.e.childNodes);
  }
  i(t) {
    for (let r = 0; r < this.n.length; r += 1)
      L(this.t, this.n[r], t);
  }
  p(t) {
    this.d(), this.h(t), this.i(this.a);
  }
  d() {
    this.n.forEach(x);
  }
}
function oa(e, t) {
  return new e(t);
}
const ns = /* @__PURE__ */ new Map();
let as = 0;
function pS(e) {
  let t = 5381, r = e.length;
  for (; r--; )
    t = (t << 5) - t ^ e.charCodeAt(r);
  return t >>> 0;
}
function vS(e, t) {
  const r = { stylesheet: lS(t), rules: {} };
  return ns.set(e, r), r;
}
function is(e, t, r, n, a, i, o, s = 0) {
  const l = 16.666 / n;
  let u = `{
`;
  for (let _ = 0; _ <= 1; _ += l) {
    const b = t + (r - t) * i(_);
    u += _ * 100 + `%{${o(b, 1 - b)}}
`;
  }
  const f = u + `100% {${o(r, 1 - r)}}
}`, d = `__svelte_${pS(f)}_${s}`, h = nc(e), { stylesheet: v, rules: m } = ns.get(h) || vS(h, e);
  m[d] || (m[d] = !0, v.insertRule(`@keyframes ${d} ${f}`, v.cssRules.length));
  const g = e.style.animation || "";
  return e.style.animation = `${g ? `${g}, ` : ""}${d} ${n}ms linear ${a}ms 1 both`, as += 1, d;
}
function os(e, t) {
  const r = (e.style.animation || "").split(", "), n = r.filter(
    t ? (i) => i.indexOf(t) < 0 : (i) => i.indexOf("__svelte") === -1
    // remove all Svelte animations
  ), a = r.length - n.length;
  a && (e.style.animation = n.join(", "), as -= a, as || hS());
}
function hS() {
  rc(() => {
    as || (ns.forEach((e) => {
      const { ownerNode: t } = e.stylesheet;
      t && x(t);
    }), ns.clear());
  });
}
let li;
function Za(e) {
  li = e;
}
function Oi() {
  if (!li)
    throw new Error("Function called outside component initialization");
  return li;
}
function qr(e) {
  Oi().$$.on_mount.push(e);
}
function gS(e) {
  Oi().$$.on_destroy.push(e);
}
function O0() {
  const e = Oi();
  return (t, r, { cancelable: n = !1 } = {}) => {
    const a = e.$$.callbacks[t];
    if (a) {
      const i = S0(t, r, { cancelable: n });
      return a.slice().forEach((o) => {
        o.call(e, i);
      }), !i.defaultPrevented;
    }
    return !0;
  };
}
function ss(e, t) {
  return Oi().$$.context.set(e, t), t;
}
function We(e) {
  return Oi().$$.context.get(e);
}
const Ja = [], lt = [], Bo = [], Gu = [], k0 = Promise.resolve();
let Wu = !1;
function E0() {
  Wu || (Wu = !0, k0.then(Dr));
}
function Sl() {
  return E0(), k0;
}
function St(e) {
  Bo.push(e);
}
function hn(e) {
  Gu.push(e);
}
const Ol = /* @__PURE__ */ new Set();
let so = 0;
function Dr() {
  const e = li;
  do {
    for (; so < Ja.length; ) {
      const t = Ja[so];
      so++, Za(t), mS(t.$$);
    }
    for (Za(null), Ja.length = 0, so = 0; lt.length; )
      lt.pop()();
    for (let t = 0; t < Bo.length; t += 1) {
      const r = Bo[t];
      Ol.has(r) || (Ol.add(r), r());
    }
    Bo.length = 0;
  } while (Ja.length);
  for (; Gu.length; )
    Gu.pop()();
  Wu = !1, Ol.clear(), Za(e);
}
function mS(e) {
  if (e.fragment !== null) {
    e.update(), Le(e.before_update);
    const t = e.dirty;
    e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(St);
  }
}
let Na;
function ac() {
  return Na || (Na = Promise.resolve(), Na.then(() => {
    Na = null;
  })), Na;
}
function gn(e, t, r) {
  e.dispatchEvent(S0(`${t ? "intro" : "outro"}${r}`));
}
const zo = /* @__PURE__ */ new Set();
let vr;
function Je() {
  vr = {
    r: 0,
    c: [],
    p: vr
    // parent group
  };
}
function Ye() {
  vr.r || Le(vr.c), vr = vr.p;
}
function ne(e, t) {
  e && e.i && (zo.delete(e), e.i(t));
}
function fe(e, t, r, n) {
  if (e && e.o) {
    if (zo.has(e))
      return;
    zo.add(e), vr.c.push(() => {
      zo.delete(e), n && (r && e.d(1), n());
    }), e.o(t);
  } else
    n && n();
}
const ic = { duration: 0 };
function bS(e, t, r) {
  const n = { direction: "in" };
  let a = t(e, r, n), i = !1, o, s, l = 0;
  function u() {
    o && os(e, o);
  }
  function f() {
    const { delay: h = 0, duration: v = 300, easing: m = Is, tick: g = he, css: _ } = a || ic;
    _ && (o = is(e, 0, 1, v, h, m, _, l++)), g(0, 1);
    const b = si() + h, S = b + v;
    s && s.abort(), i = !0, St(() => gn(e, !0, "start")), s = Ps((k) => {
      if (i) {
        if (k >= S)
          return g(1, 0), gn(e, !0, "end"), u(), i = !1;
        if (k >= b) {
          const w = m((k - b) / v);
          g(w, 1 - w);
        }
      }
      return i;
    });
  }
  let d = !1;
  return {
    start() {
      d || (d = !0, os(e), mt(a) ? (a = a(n), ac().then(f)) : f());
    },
    invalidate() {
      d = !1;
    },
    end() {
      i && (u(), i = !1);
    }
  };
}
function _S(e, t, r) {
  const n = { direction: "out" };
  let a = t(e, r, n), i = !0, o;
  const s = vr;
  s.r += 1;
  function l() {
    const { delay: u = 0, duration: f = 300, easing: d = Is, tick: h = he, css: v } = a || ic;
    v && (o = is(e, 1, 0, f, u, d, v));
    const m = si() + u, g = m + f;
    St(() => gn(e, !1, "start")), Ps((_) => {
      if (i) {
        if (_ >= g)
          return h(0, 1), gn(e, !1, "end"), --s.r || Le(s.c), !1;
        if (_ >= m) {
          const b = d((_ - m) / f);
          h(1 - b, b);
        }
      }
      return i;
    });
  }
  return mt(a) ? ac().then(() => {
    a = a(n), l();
  }) : l(), {
    end(u) {
      u && a.tick && a.tick(1, 0), i && (o && os(e, o), i = !1);
    }
  };
}
function lo(e, t, r, n) {
  const a = { direction: "both" };
  let i = t(e, r, a), o = n ? 0 : 1, s = null, l = null, u = null;
  function f() {
    u && os(e, u);
  }
  function d(v, m) {
    const g = v.b - o;
    return m *= Math.abs(g), {
      a: o,
      b: v.b,
      d: g,
      duration: m,
      start: v.start,
      end: v.start + m,
      group: v.group
    };
  }
  function h(v) {
    const { delay: m = 0, duration: g = 300, easing: _ = Is, tick: b = he, css: S } = i || ic, k = {
      start: si() + m,
      b: v
    };
    v || (k.group = vr, vr.r += 1), s || l ? l = k : (S && (f(), u = is(e, o, v, g, m, _, S)), v && b(0, 1), s = d(k, g), St(() => gn(e, v, "start")), Ps((w) => {
      if (l && w > l.start && (s = d(l, g), l = null, gn(e, s.b, "start"), S && (f(), u = is(e, o, s.b, s.duration, 0, _, i.css))), s) {
        if (w >= s.end)
          b(o = s.b, 1 - o), gn(e, s.b, "end"), l || (s.b ? f() : --s.group.r || Le(s.group.c)), s = null;
        else if (w >= s.start) {
          const C = w - s.start;
          o = s.a + s.d * _(C / s.duration), b(o, 1 - o);
        }
      }
      return !!(s || l);
    }));
  }
  return {
    run(v) {
      mt(i) ? ac().then(() => {
        i = i(a), h(v);
      }) : h(v);
    },
    end() {
      f(), s = l = null;
    }
  };
}
const yS = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : global;
function wS(e, t) {
  fe(e, 1, 1, () => {
    t.delete(e.key);
  });
}
function SS(e, t, r, n, a, i, o, s, l, u, f, d) {
  let h = e.length, v = i.length, m = h;
  const g = {};
  for (; m--; )
    g[e[m].key] = m;
  const _ = [], b = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map();
  for (m = v; m--; ) {
    const E = d(a, i, m), A = r(E);
    let D = o.get(A);
    D ? n && D.p(E, t) : (D = u(A, E), D.c()), b.set(A, _[m] = D), A in g && S.set(A, Math.abs(m - g[A]));
  }
  const k = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Set();
  function C(E) {
    ne(E, 1), E.m(s, f), o.set(E.key, E), f = E.first, v--;
  }
  for (; h && v; ) {
    const E = _[v - 1], A = e[h - 1], D = E.key, F = A.key;
    E === A ? (f = E.first, h--, v--) : b.has(F) ? !o.has(D) || k.has(D) ? C(E) : w.has(F) ? h-- : S.get(D) > S.get(F) ? (w.add(D), C(E)) : (k.add(F), h--) : (l(A, o), h--);
  }
  for (; h--; ) {
    const E = e[h];
    b.has(E.key) || l(E, o);
  }
  for (; v; )
    C(_[v - 1]);
  return _;
}
function OS(e, t) {
  const r = {}, n = {}, a = { $$scope: 1 };
  let i = e.length;
  for (; i--; ) {
    const o = e[i], s = t[i];
    if (s) {
      for (const l in o)
        l in s || (n[l] = 1);
      for (const l in s)
        a[l] || (r[l] = s[l], a[l] = 1);
      e[i] = s;
    } else
      for (const l in o)
        a[l] = 1;
  }
  for (const o in n)
    o in r || (r[o] = void 0);
  return r;
}
function kS(e) {
  return typeof e == "object" && e !== null ? e : {};
}
function mn(e, t, r, n) {
  const a = e.$$.props[t];
  a !== void 0 && (e.$$.bound[a] = r, n === void 0 && r(e.$$.ctx[a]));
}
function xe(e) {
  e && e.c();
}
function Ne(e, t, r, n) {
  const { fragment: a, after_update: i } = e.$$;
  a && a.m(t, r), n || St(() => {
    const o = e.$$.on_mount.map(g0).filter(mt);
    e.$$.on_destroy ? e.$$.on_destroy.push(...o) : Le(o), e.$$.on_mount = [];
  }), i.forEach(St);
}
function De(e, t) {
  const r = e.$$;
  r.fragment !== null && (Le(r.on_destroy), r.fragment && r.fragment.d(t), r.on_destroy = r.fragment = null, r.ctx = []);
}
function ES(e, t) {
  e.$$.dirty[0] === -1 && (Ja.push(e), E0(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
}
function qe(e, t, r, n, a, i, o, s = [-1]) {
  const l = li;
  Za(e);
  const u = e.$$ = {
    fragment: null,
    ctx: [],
    // state
    props: i,
    update: he,
    not_equal: a,
    bound: Yd(),
    // lifecycle
    on_mount: [],
    on_destroy: [],
    on_disconnect: [],
    before_update: [],
    after_update: [],
    context: new Map(t.context || (l ? l.$$.context : [])),
    // everything else
    callbacks: Yd(),
    dirty: s,
    skip_bound: !1,
    root: t.target || l.$$.root
  };
  o && o(u.root);
  let f = !1;
  if (u.ctx = r ? r(e, t.props || {}, (d, h, ...v) => {
    const m = v.length ? v[0] : h;
    return u.ctx && a(u.ctx[d], u.ctx[d] = m) && (!u.skip_bound && u.bound[d] && u.bound[d](m), f && ES(e, d)), h;
  }) : [], u.update(), f = !0, Le(u.before_update), u.fragment = n ? n(u.ctx) : !1, t.target) {
    if (t.hydrate) {
      const d = uS(t.target);
      u.fragment && u.fragment.l(d), d.forEach(x);
    } else
      u.fragment && u.fragment.c();
    t.intro && ne(e.$$.fragment), Ne(e, t.target, t.anchor, t.customElement), Dr();
  }
  Za(l);
}
class Ue {
  $destroy() {
    De(this, 1), this.$destroy = he;
  }
  $on(t, r) {
    if (!mt(r))
      return he;
    const n = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
    return n.push(r), () => {
      const a = n.indexOf(r);
      a !== -1 && n.splice(a, 1);
    };
  }
  $set(t) {
    this.$$set && !sS(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
  }
}
var Xn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function $S(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function oc(e) {
  if (e.__esModule)
    return e;
  var t = e.default;
  if (typeof t == "function") {
    var r = function n() {
      if (this instanceof n) {
        var a = [null];
        a.push.apply(a, arguments);
        var i = Function.bind.apply(t, a);
        return new i();
      }
      return t.apply(this, arguments);
    };
    r.prototype = t.prototype;
  } else
    r = {};
  return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(n) {
    var a = Object.getOwnPropertyDescriptor(e, n);
    Object.defineProperty(r, n, a.get ? a : {
      enumerable: !0,
      get: function() {
        return e[n];
      }
    });
  }), r;
}
function TS() {
  this.__data__ = [], this.size = 0;
}
var CS = TS;
function AS(e, t) {
  return e === t || e !== e && t !== t;
}
var $0 = AS, IS = $0;
function PS(e, t) {
  for (var r = e.length; r--; )
    if (IS(e[r][0], t))
      return r;
  return -1;
}
var Rs = PS, RS = Rs, jS = Array.prototype, MS = jS.splice;
function NS(e) {
  var t = this.__data__, r = RS(t, e);
  if (r < 0)
    return !1;
  var n = t.length - 1;
  return r == n ? t.pop() : MS.call(t, r, 1), --this.size, !0;
}
var DS = NS, xS = Rs;
function FS(e) {
  var t = this.__data__, r = xS(t, e);
  return r < 0 ? void 0 : t[r][1];
}
var LS = FS, BS = Rs;
function zS(e) {
  return BS(this.__data__, e) > -1;
}
var VS = zS, qS = Rs;
function US(e, t) {
  var r = this.__data__, n = qS(r, e);
  return n < 0 ? (++this.size, r.push([e, t])) : r[n][1] = t, this;
}
var HS = US, GS = CS, WS = DS, KS = LS, JS = VS, YS = HS;
function ba(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var n = e[t];
    this.set(n[0], n[1]);
  }
}
ba.prototype.clear = GS;
ba.prototype.delete = WS;
ba.prototype.get = KS;
ba.prototype.has = JS;
ba.prototype.set = YS;
var js = ba, XS = js;
function QS() {
  this.__data__ = new XS(), this.size = 0;
}
var ZS = QS;
function eO(e) {
  var t = this.__data__, r = t.delete(e);
  return this.size = t.size, r;
}
var tO = eO;
function rO(e) {
  return this.__data__.get(e);
}
var nO = rO;
function aO(e) {
  return this.__data__.has(e);
}
var iO = aO, oO = typeof Xn == "object" && Xn && Xn.Object === Object && Xn, T0 = oO, sO = T0, lO = typeof self == "object" && self && self.Object === Object && self, uO = sO || lO || Function("return this")(), wr = uO, fO = wr, cO = fO.Symbol, sc = cO, Xd = sc, C0 = Object.prototype, dO = C0.hasOwnProperty, pO = C0.toString, Da = Xd ? Xd.toStringTag : void 0;
function vO(e) {
  var t = dO.call(e, Da), r = e[Da];
  try {
    e[Da] = void 0;
    var n = !0;
  } catch {
  }
  var a = pO.call(e);
  return n && (t ? e[Da] = r : delete e[Da]), a;
}
var hO = vO, gO = Object.prototype, mO = gO.toString;
function bO(e) {
  return mO.call(e);
}
var _O = bO, Qd = sc, yO = hO, wO = _O, SO = "[object Null]", OO = "[object Undefined]", Zd = Qd ? Qd.toStringTag : void 0;
function kO(e) {
  return e == null ? e === void 0 ? OO : SO : Zd && Zd in Object(e) ? yO(e) : wO(e);
}
var Ms = kO;
function EO(e) {
  var t = typeof e;
  return e != null && (t == "object" || t == "function");
}
var ki = EO, $O = Ms, TO = ki, CO = "[object AsyncFunction]", AO = "[object Function]", IO = "[object GeneratorFunction]", PO = "[object Proxy]";
function RO(e) {
  if (!TO(e))
    return !1;
  var t = $O(e);
  return t == AO || t == IO || t == CO || t == PO;
}
var A0 = RO, jO = wr, MO = jO["__core-js_shared__"], NO = MO, kl = NO, ep = function() {
  var e = /[^.]+$/.exec(kl && kl.keys && kl.keys.IE_PROTO || "");
  return e ? "Symbol(src)_1." + e : "";
}();
function DO(e) {
  return !!ep && ep in e;
}
var xO = DO, FO = Function.prototype, LO = FO.toString;
function BO(e) {
  if (e != null) {
    try {
      return LO.call(e);
    } catch {
    }
    try {
      return e + "";
    } catch {
    }
  }
  return "";
}
var I0 = BO, zO = A0, VO = xO, qO = ki, UO = I0, HO = /[\\^$.*+?()[\]{}|]/g, GO = /^\[object .+?Constructor\]$/, WO = Function.prototype, KO = Object.prototype, JO = WO.toString, YO = KO.hasOwnProperty, XO = RegExp(
  "^" + JO.call(YO).replace(HO, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function QO(e) {
  if (!qO(e) || VO(e))
    return !1;
  var t = zO(e) ? XO : GO;
  return t.test(UO(e));
}
var ZO = QO;
function ek(e, t) {
  return e == null ? void 0 : e[t];
}
var tk = ek, rk = ZO, nk = tk;
function ak(e, t) {
  var r = nk(e, t);
  return rk(r) ? r : void 0;
}
var Tn = ak, ik = Tn, ok = wr, sk = ik(ok, "Map"), lc = sk, lk = Tn, uk = lk(Object, "create"), Ns = uk, tp = Ns;
function fk() {
  this.__data__ = tp ? tp(null) : {}, this.size = 0;
}
var ck = fk;
function dk(e) {
  var t = this.has(e) && delete this.__data__[e];
  return this.size -= t ? 1 : 0, t;
}
var pk = dk, vk = Ns, hk = "__lodash_hash_undefined__", gk = Object.prototype, mk = gk.hasOwnProperty;
function bk(e) {
  var t = this.__data__;
  if (vk) {
    var r = t[e];
    return r === hk ? void 0 : r;
  }
  return mk.call(t, e) ? t[e] : void 0;
}
var _k = bk, yk = Ns, wk = Object.prototype, Sk = wk.hasOwnProperty;
function Ok(e) {
  var t = this.__data__;
  return yk ? t[e] !== void 0 : Sk.call(t, e);
}
var kk = Ok, Ek = Ns, $k = "__lodash_hash_undefined__";
function Tk(e, t) {
  var r = this.__data__;
  return this.size += this.has(e) ? 0 : 1, r[e] = Ek && t === void 0 ? $k : t, this;
}
var Ck = Tk, Ak = ck, Ik = pk, Pk = _k, Rk = kk, jk = Ck;
function _a(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var n = e[t];
    this.set(n[0], n[1]);
  }
}
_a.prototype.clear = Ak;
_a.prototype.delete = Ik;
_a.prototype.get = Pk;
_a.prototype.has = Rk;
_a.prototype.set = jk;
var Mk = _a, rp = Mk, Nk = js, Dk = lc;
function xk() {
  this.size = 0, this.__data__ = {
    hash: new rp(),
    map: new (Dk || Nk)(),
    string: new rp()
  };
}
var Fk = xk;
function Lk(e) {
  var t = typeof e;
  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
var Bk = Lk, zk = Bk;
function Vk(e, t) {
  var r = e.__data__;
  return zk(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
}
var Ds = Vk, qk = Ds;
function Uk(e) {
  var t = qk(this, e).delete(e);
  return this.size -= t ? 1 : 0, t;
}
var Hk = Uk, Gk = Ds;
function Wk(e) {
  return Gk(this, e).get(e);
}
var Kk = Wk, Jk = Ds;
function Yk(e) {
  return Jk(this, e).has(e);
}
var Xk = Yk, Qk = Ds;
function Zk(e, t) {
  var r = Qk(this, e), n = r.size;
  return r.set(e, t), this.size += r.size == n ? 0 : 1, this;
}
var eE = Zk, tE = Fk, rE = Hk, nE = Kk, aE = Xk, iE = eE;
function ya(e) {
  var t = -1, r = e == null ? 0 : e.length;
  for (this.clear(); ++t < r; ) {
    var n = e[t];
    this.set(n[0], n[1]);
  }
}
ya.prototype.clear = tE;
ya.prototype.delete = rE;
ya.prototype.get = nE;
ya.prototype.has = aE;
ya.prototype.set = iE;
var oE = ya, sE = js, lE = lc, uE = oE, fE = 200;
function cE(e, t) {
  var r = this.__data__;
  if (r instanceof sE) {
    var n = r.__data__;
    if (!lE || n.length < fE - 1)
      return n.push([e, t]), this.size = ++r.size, this;
    r = this.__data__ = new uE(n);
  }
  return r.set(e, t), this.size = r.size, this;
}
var dE = cE, pE = js, vE = ZS, hE = tO, gE = nO, mE = iO, bE = dE;
function wa(e) {
  var t = this.__data__ = new pE(e);
  this.size = t.size;
}
wa.prototype.clear = vE;
wa.prototype.delete = hE;
wa.prototype.get = gE;
wa.prototype.has = mE;
wa.prototype.set = bE;
var _E = wa;
function yE(e, t) {
  for (var r = -1, n = e == null ? 0 : e.length; ++r < n && t(e[r], r, e) !== !1; )
    ;
  return e;
}
var wE = yE, SE = Tn, OE = function() {
  try {
    var e = SE(Object, "defineProperty");
    return e({}, "", {}), e;
  } catch {
  }
}(), kE = OE, np = kE;
function EE(e, t, r) {
  t == "__proto__" && np ? np(e, t, {
    configurable: !0,
    enumerable: !0,
    value: r,
    writable: !0
  }) : e[t] = r;
}
var P0 = EE, $E = P0, TE = $0, CE = Object.prototype, AE = CE.hasOwnProperty;
function IE(e, t, r) {
  var n = e[t];
  (!(AE.call(e, t) && TE(n, r)) || r === void 0 && !(t in e)) && $E(e, t, r);
}
var R0 = IE, PE = R0, RE = P0;
function jE(e, t, r, n) {
  var a = !r;
  r || (r = {});
  for (var i = -1, o = t.length; ++i < o; ) {
    var s = t[i], l = n ? n(r[s], e[s], s, r, e) : void 0;
    l === void 0 && (l = e[s]), a ? RE(r, s, l) : PE(r, s, l);
  }
  return r;
}
var xs = jE;
function ME(e, t) {
  for (var r = -1, n = Array(e); ++r < e; )
    n[r] = t(r);
  return n;
}
var NE = ME;
function DE(e) {
  return e != null && typeof e == "object";
}
var Ei = DE, xE = Ms, FE = Ei, LE = "[object Arguments]";
function BE(e) {
  return FE(e) && xE(e) == LE;
}
var zE = BE, ap = zE, VE = Ei, j0 = Object.prototype, qE = j0.hasOwnProperty, UE = j0.propertyIsEnumerable, HE = ap(function() {
  return arguments;
}()) ? ap : function(e) {
  return VE(e) && qE.call(e, "callee") && !UE.call(e, "callee");
}, GE = HE, WE = Array.isArray, uc = WE, ui = {}, KE = {
  get exports() {
    return ui;
  },
  set exports(e) {
    ui = e;
  }
};
function JE() {
  return !1;
}
var YE = JE;
(function(e, t) {
  var r = wr, n = YE, a = t && !t.nodeType && t, i = a && !0 && e && !e.nodeType && e, o = i && i.exports === a, s = o ? r.Buffer : void 0, l = s ? s.isBuffer : void 0, u = l || n;
  e.exports = u;
})(KE, ui);
var XE = 9007199254740991, QE = /^(?:0|[1-9]\d*)$/;
function ZE(e, t) {
  var r = typeof e;
  return t = t ?? XE, !!t && (r == "number" || r != "symbol" && QE.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
var e$ = ZE, t$ = 9007199254740991;
function r$(e) {
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= t$;
}
var M0 = r$, n$ = Ms, a$ = M0, i$ = Ei, o$ = "[object Arguments]", s$ = "[object Array]", l$ = "[object Boolean]", u$ = "[object Date]", f$ = "[object Error]", c$ = "[object Function]", d$ = "[object Map]", p$ = "[object Number]", v$ = "[object Object]", h$ = "[object RegExp]", g$ = "[object Set]", m$ = "[object String]", b$ = "[object WeakMap]", _$ = "[object ArrayBuffer]", y$ = "[object DataView]", w$ = "[object Float32Array]", S$ = "[object Float64Array]", O$ = "[object Int8Array]", k$ = "[object Int16Array]", E$ = "[object Int32Array]", $$ = "[object Uint8Array]", T$ = "[object Uint8ClampedArray]", C$ = "[object Uint16Array]", A$ = "[object Uint32Array]", st = {};
st[w$] = st[S$] = st[O$] = st[k$] = st[E$] = st[$$] = st[T$] = st[C$] = st[A$] = !0;
st[o$] = st[s$] = st[_$] = st[l$] = st[y$] = st[u$] = st[f$] = st[c$] = st[d$] = st[p$] = st[v$] = st[h$] = st[g$] = st[m$] = st[b$] = !1;
function I$(e) {
  return i$(e) && a$(e.length) && !!st[n$(e)];
}
var P$ = I$;
function R$(e) {
  return function(t) {
    return e(t);
  };
}
var fc = R$, sa = {}, j$ = {
  get exports() {
    return sa;
  },
  set exports(e) {
    sa = e;
  }
};
(function(e, t) {
  var r = T0, n = t && !t.nodeType && t, a = n && !0 && e && !e.nodeType && e, i = a && a.exports === n, o = i && r.process, s = function() {
    try {
      var l = a && a.require && a.require("util").types;
      return l || o && o.binding && o.binding("util");
    } catch {
    }
  }();
  e.exports = s;
})(j$, sa);
var M$ = P$, N$ = fc, ip = sa, op = ip && ip.isTypedArray, D$ = op ? N$(op) : M$, x$ = D$, F$ = NE, L$ = GE, B$ = uc, z$ = ui, V$ = e$, q$ = x$, U$ = Object.prototype, H$ = U$.hasOwnProperty;
function G$(e, t) {
  var r = B$(e), n = !r && L$(e), a = !r && !n && z$(e), i = !r && !n && !a && q$(e), o = r || n || a || i, s = o ? F$(e.length, String) : [], l = s.length;
  for (var u in e)
    (t || H$.call(e, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
    (u == "length" || a && (u == "offset" || u == "parent") || i && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
    V$(u, l))) && s.push(u);
  return s;
}
var N0 = G$, W$ = Object.prototype;
function K$(e) {
  var t = e && e.constructor, r = typeof t == "function" && t.prototype || W$;
  return e === r;
}
var cc = K$;
function J$(e, t) {
  return function(r) {
    return e(t(r));
  };
}
var D0 = J$, Y$ = D0, X$ = Y$(Object.keys, Object), Q$ = X$, Z$ = cc, eT = Q$, tT = Object.prototype, rT = tT.hasOwnProperty;
function nT(e) {
  if (!Z$(e))
    return eT(e);
  var t = [];
  for (var r in Object(e))
    rT.call(e, r) && r != "constructor" && t.push(r);
  return t;
}
var aT = nT, iT = A0, oT = M0;
function sT(e) {
  return e != null && oT(e.length) && !iT(e);
}
var x0 = sT, lT = N0, uT = aT, fT = x0;
function cT(e) {
  return fT(e) ? lT(e) : uT(e);
}
var dc = cT, dT = xs, pT = dc;
function vT(e, t) {
  return e && dT(t, pT(t), e);
}
var hT = vT;
function gT(e) {
  var t = [];
  if (e != null)
    for (var r in Object(e))
      t.push(r);
  return t;
}
var mT = gT, bT = ki, _T = cc, yT = mT, wT = Object.prototype, ST = wT.hasOwnProperty;
function OT(e) {
  if (!bT(e))
    return yT(e);
  var t = _T(e), r = [];
  for (var n in e)
    n == "constructor" && (t || !ST.call(e, n)) || r.push(n);
  return r;
}
var kT = OT, ET = N0, $T = kT, TT = x0;
function CT(e) {
  return TT(e) ? ET(e, !0) : $T(e);
}
var pc = CT, AT = xs, IT = pc;
function PT(e, t) {
  return e && AT(t, IT(t), e);
}
var RT = PT, ls = {}, jT = {
  get exports() {
    return ls;
  },
  set exports(e) {
    ls = e;
  }
};
(function(e, t) {
  var r = wr, n = t && !t.nodeType && t, a = n && !0 && e && !e.nodeType && e, i = a && a.exports === n, o = i ? r.Buffer : void 0, s = o ? o.allocUnsafe : void 0;
  function l(u, f) {
    if (f)
      return u.slice();
    var d = u.length, h = s ? s(d) : new u.constructor(d);
    return u.copy(h), h;
  }
  e.exports = l;
})(jT, ls);
function MT(e, t) {
  var r = -1, n = e.length;
  for (t || (t = Array(n)); ++r < n; )
    t[r] = e[r];
  return t;
}
var NT = MT;
function DT(e, t) {
  for (var r = -1, n = e == null ? 0 : e.length, a = 0, i = []; ++r < n; ) {
    var o = e[r];
    t(o, r, e) && (i[a++] = o);
  }
  return i;
}
var xT = DT;
function FT() {
  return [];
}
var F0 = FT, LT = xT, BT = F0, zT = Object.prototype, VT = zT.propertyIsEnumerable, sp = Object.getOwnPropertySymbols, qT = sp ? function(e) {
  return e == null ? [] : (e = Object(e), LT(sp(e), function(t) {
    return VT.call(e, t);
  }));
} : BT, vc = qT, UT = xs, HT = vc;
function GT(e, t) {
  return UT(e, HT(e), t);
}
var WT = GT;
function KT(e, t) {
  for (var r = -1, n = t.length, a = e.length; ++r < n; )
    e[a + r] = t[r];
  return e;
}
var L0 = KT, JT = D0, YT = JT(Object.getPrototypeOf, Object), B0 = YT, XT = L0, QT = B0, ZT = vc, e3 = F0, t3 = Object.getOwnPropertySymbols, r3 = t3 ? function(e) {
  for (var t = []; e; )
    XT(t, ZT(e)), e = QT(e);
  return t;
} : e3, z0 = r3, n3 = xs, a3 = z0;
function i3(e, t) {
  return n3(e, a3(e), t);
}
var o3 = i3, s3 = L0, l3 = uc;
function u3(e, t, r) {
  var n = t(e);
  return l3(e) ? n : s3(n, r(e));
}
var V0 = u3, f3 = V0, c3 = vc, d3 = dc;
function p3(e) {
  return f3(e, d3, c3);
}
var v3 = p3, h3 = V0, g3 = z0, m3 = pc;
function b3(e) {
  return h3(e, m3, g3);
}
var _3 = b3, y3 = Tn, w3 = wr, S3 = y3(w3, "DataView"), O3 = S3, k3 = Tn, E3 = wr, $3 = k3(E3, "Promise"), T3 = $3, C3 = Tn, A3 = wr, I3 = C3(A3, "Set"), P3 = I3, R3 = Tn, j3 = wr, M3 = R3(j3, "WeakMap"), N3 = M3, Ku = O3, Ju = lc, Yu = T3, Xu = P3, Qu = N3, q0 = Ms, Sa = I0, lp = "[object Map]", D3 = "[object Object]", up = "[object Promise]", fp = "[object Set]", cp = "[object WeakMap]", dp = "[object DataView]", x3 = Sa(Ku), F3 = Sa(Ju), L3 = Sa(Yu), B3 = Sa(Xu), z3 = Sa(Qu), fn = q0;
(Ku && fn(new Ku(new ArrayBuffer(1))) != dp || Ju && fn(new Ju()) != lp || Yu && fn(Yu.resolve()) != up || Xu && fn(new Xu()) != fp || Qu && fn(new Qu()) != cp) && (fn = function(e) {
  var t = q0(e), r = t == D3 ? e.constructor : void 0, n = r ? Sa(r) : "";
  if (n)
    switch (n) {
      case x3:
        return dp;
      case F3:
        return lp;
      case L3:
        return up;
      case B3:
        return fp;
      case z3:
        return cp;
    }
  return t;
});
var hc = fn, V3 = Object.prototype, q3 = V3.hasOwnProperty;
function U3(e) {
  var t = e.length, r = new e.constructor(t);
  return t && typeof e[0] == "string" && q3.call(e, "index") && (r.index = e.index, r.input = e.input), r;
}
var H3 = U3, G3 = wr, W3 = G3.Uint8Array, K3 = W3, pp = K3;
function J3(e) {
  var t = new e.constructor(e.byteLength);
  return new pp(t).set(new pp(e)), t;
}
var gc = J3, Y3 = gc;
function X3(e, t) {
  var r = t ? Y3(e.buffer) : e.buffer;
  return new e.constructor(r, e.byteOffset, e.byteLength);
}
var Q3 = X3, Z3 = /\w*$/;
function eC(e) {
  var t = new e.constructor(e.source, Z3.exec(e));
  return t.lastIndex = e.lastIndex, t;
}
var tC = eC, vp = sc, hp = vp ? vp.prototype : void 0, gp = hp ? hp.valueOf : void 0;
function rC(e) {
  return gp ? Object(gp.call(e)) : {};
}
var nC = rC, aC = gc;
function iC(e, t) {
  var r = t ? aC(e.buffer) : e.buffer;
  return new e.constructor(r, e.byteOffset, e.length);
}
var oC = iC, sC = gc, lC = Q3, uC = tC, fC = nC, cC = oC, dC = "[object Boolean]", pC = "[object Date]", vC = "[object Map]", hC = "[object Number]", gC = "[object RegExp]", mC = "[object Set]", bC = "[object String]", _C = "[object Symbol]", yC = "[object ArrayBuffer]", wC = "[object DataView]", SC = "[object Float32Array]", OC = "[object Float64Array]", kC = "[object Int8Array]", EC = "[object Int16Array]", $C = "[object Int32Array]", TC = "[object Uint8Array]", CC = "[object Uint8ClampedArray]", AC = "[object Uint16Array]", IC = "[object Uint32Array]";
function PC(e, t, r) {
  var n = e.constructor;
  switch (t) {
    case yC:
      return sC(e);
    case dC:
    case pC:
      return new n(+e);
    case wC:
      return lC(e, r);
    case SC:
    case OC:
    case kC:
    case EC:
    case $C:
    case TC:
    case CC:
    case AC:
    case IC:
      return cC(e, r);
    case vC:
      return new n();
    case hC:
    case bC:
      return new n(e);
    case gC:
      return uC(e);
    case mC:
      return new n();
    case _C:
      return fC(e);
  }
}
var RC = PC, jC = ki, mp = Object.create, MC = function() {
  function e() {
  }
  return function(t) {
    if (!jC(t))
      return {};
    if (mp)
      return mp(t);
    e.prototype = t;
    var r = new e();
    return e.prototype = void 0, r;
  };
}(), NC = MC, DC = NC, xC = B0, FC = cc;
function LC(e) {
  return typeof e.constructor == "function" && !FC(e) ? DC(xC(e)) : {};
}
var BC = LC, zC = hc, VC = Ei, qC = "[object Map]";
function UC(e) {
  return VC(e) && zC(e) == qC;
}
var HC = UC, GC = HC, WC = fc, bp = sa, _p = bp && bp.isMap, KC = _p ? WC(_p) : GC, JC = KC, YC = hc, XC = Ei, QC = "[object Set]";
function ZC(e) {
  return XC(e) && YC(e) == QC;
}
var eA = ZC, tA = eA, rA = fc, yp = sa, wp = yp && yp.isSet, nA = wp ? rA(wp) : tA, aA = nA, iA = _E, oA = wE, sA = R0, lA = hT, uA = RT, fA = ls, cA = NT, dA = WT, pA = o3, vA = v3, hA = _3, gA = hc, mA = H3, bA = RC, _A = BC, yA = uc, wA = ui, SA = JC, OA = ki, kA = aA, EA = dc, $A = pc, TA = 1, CA = 2, AA = 4, U0 = "[object Arguments]", IA = "[object Array]", PA = "[object Boolean]", RA = "[object Date]", jA = "[object Error]", H0 = "[object Function]", MA = "[object GeneratorFunction]", NA = "[object Map]", DA = "[object Number]", G0 = "[object Object]", xA = "[object RegExp]", FA = "[object Set]", LA = "[object String]", BA = "[object Symbol]", zA = "[object WeakMap]", VA = "[object ArrayBuffer]", qA = "[object DataView]", UA = "[object Float32Array]", HA = "[object Float64Array]", GA = "[object Int8Array]", WA = "[object Int16Array]", KA = "[object Int32Array]", JA = "[object Uint8Array]", YA = "[object Uint8ClampedArray]", XA = "[object Uint16Array]", QA = "[object Uint32Array]", ot = {};
ot[U0] = ot[IA] = ot[VA] = ot[qA] = ot[PA] = ot[RA] = ot[UA] = ot[HA] = ot[GA] = ot[WA] = ot[KA] = ot[NA] = ot[DA] = ot[G0] = ot[xA] = ot[FA] = ot[LA] = ot[BA] = ot[JA] = ot[YA] = ot[XA] = ot[QA] = !0;
ot[jA] = ot[H0] = ot[zA] = !1;
function Vo(e, t, r, n, a, i) {
  var o, s = t & TA, l = t & CA, u = t & AA;
  if (r && (o = a ? r(e, n, a, i) : r(e)), o !== void 0)
    return o;
  if (!OA(e))
    return e;
  var f = yA(e);
  if (f) {
    if (o = mA(e), !s)
      return cA(e, o);
  } else {
    var d = gA(e), h = d == H0 || d == MA;
    if (wA(e))
      return fA(e, s);
    if (d == G0 || d == U0 || h && !a) {
      if (o = l || h ? {} : _A(e), !s)
        return l ? pA(e, uA(o, e)) : dA(e, lA(o, e));
    } else {
      if (!ot[d])
        return a ? e : {};
      o = bA(e, d, s);
    }
  }
  i || (i = new iA());
  var v = i.get(e);
  if (v)
    return v;
  i.set(e, o), kA(e) ? e.forEach(function(_) {
    o.add(Vo(_, t, r, _, e, i));
  }) : SA(e) && e.forEach(function(_, b) {
    o.set(b, Vo(_, t, r, b, e, i));
  });
  var m = u ? l ? hA : vA : l ? $A : EA, g = f ? void 0 : m(e);
  return oA(g || e, function(_, b) {
    g && (b = _, _ = e[b]), sA(o, b, Vo(_, t, r, b, e, i));
  }), o;
}
var ZA = Vo, e4 = ZA, t4 = 1, r4 = 4;
function n4(e) {
  return e4(e, t4 | r4);
}
var W0 = n4;
class a4 {
  constructor() {
    this.events = {};
  }
  on(t, r) {
    this.events[t] || (this.events[t] = []), this.events[t].push(r);
  }
  emit(t, r) {
    const n = this.events[t];
    n && n.forEach((a) => {
      a.call(null, W0(r));
    });
  }
}
function K0(e, t) {
  return function() {
    return e.apply(t, arguments);
  };
}
const { toString: J0 } = Object.prototype, { getPrototypeOf: mc } = Object, bc = ((e) => (t) => {
  const r = J0.call(t);
  return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null)), Ar = (e) => (e = e.toLowerCase(), (t) => bc(t) === e), Fs = (e) => (t) => typeof t === e, { isArray: Oa } = Array, fi = Fs("undefined");
function i4(e) {
  return e !== null && !fi(e) && e.constructor !== null && !fi(e.constructor) && On(e.constructor.isBuffer) && e.constructor.isBuffer(e);
}
const Y0 = Ar("ArrayBuffer");
function o4(e) {
  let t;
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Y0(e.buffer), t;
}
const s4 = Fs("string"), On = Fs("function"), X0 = Fs("number"), _c = (e) => e !== null && typeof e == "object", l4 = (e) => e === !0 || e === !1, qo = (e) => {
  if (bc(e) !== "object")
    return !1;
  const t = mc(e);
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
}, u4 = Ar("Date"), f4 = Ar("File"), c4 = Ar("Blob"), d4 = Ar("FileList"), p4 = (e) => _c(e) && On(e.pipe), v4 = (e) => {
  const t = "[object FormData]";
  return e && (typeof FormData == "function" && e instanceof FormData || J0.call(e) === t || On(e.toString) && e.toString() === t);
}, h4 = Ar("URLSearchParams"), g4 = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function $i(e, t, { allOwnKeys: r = !1 } = {}) {
  if (e === null || typeof e > "u")
    return;
  let n, a;
  if (typeof e != "object" && (e = [e]), Oa(e))
    for (n = 0, a = e.length; n < a; n++)
      t.call(null, e[n], n, e);
  else {
    const i = r ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
    let s;
    for (n = 0; n < o; n++)
      s = i[n], t.call(null, e[s], s, e);
  }
}
function Q0(e, t) {
  t = t.toLowerCase();
  const r = Object.keys(e);
  let n = r.length, a;
  for (; n-- > 0; )
    if (a = r[n], t === a.toLowerCase())
      return a;
  return null;
}
const Z0 = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), e_ = (e) => !fi(e) && e !== Z0;
function Zu() {
  const { caseless: e } = e_(this) && this || {}, t = {}, r = (n, a) => {
    const i = e && Q0(t, a) || a;
    qo(t[i]) && qo(n) ? t[i] = Zu(t[i], n) : qo(n) ? t[i] = Zu({}, n) : Oa(n) ? t[i] = n.slice() : t[i] = n;
  };
  for (let n = 0, a = arguments.length; n < a; n++)
    arguments[n] && $i(arguments[n], r);
  return t;
}
const m4 = (e, t, r, { allOwnKeys: n } = {}) => ($i(t, (a, i) => {
  r && On(a) ? e[i] = K0(a, r) : e[i] = a;
}, { allOwnKeys: n }), e), b4 = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), _4 = (e, t, r, n) => {
  e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
    value: t.prototype
  }), r && Object.assign(e.prototype, r);
}, y4 = (e, t, r, n) => {
  let a, i, o;
  const s = {};
  if (t = t || {}, e == null)
    return t;
  do {
    for (a = Object.getOwnPropertyNames(e), i = a.length; i-- > 0; )
      o = a[i], (!n || n(o, e, t)) && !s[o] && (t[o] = e[o], s[o] = !0);
    e = r !== !1 && mc(e);
  } while (e && (!r || r(e, t)) && e !== Object.prototype);
  return t;
}, w4 = (e, t, r) => {
  e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
  const n = e.indexOf(t, r);
  return n !== -1 && n === r;
}, S4 = (e) => {
  if (!e)
    return null;
  if (Oa(e))
    return e;
  let t = e.length;
  if (!X0(t))
    return null;
  const r = new Array(t);
  for (; t-- > 0; )
    r[t] = e[t];
  return r;
}, O4 = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && mc(Uint8Array)), k4 = (e, t) => {
  const n = (e && e[Symbol.iterator]).call(e);
  let a;
  for (; (a = n.next()) && !a.done; ) {
    const i = a.value;
    t.call(e, i[0], i[1]);
  }
}, E4 = (e, t) => {
  let r;
  const n = [];
  for (; (r = e.exec(t)) !== null; )
    n.push(r);
  return n;
}, $4 = Ar("HTMLFormElement"), T4 = (e) => e.toLowerCase().replace(
  /[_-\s]([a-z\d])(\w*)/g,
  function(r, n, a) {
    return n.toUpperCase() + a;
  }
), Sp = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), C4 = Ar("RegExp"), t_ = (e, t) => {
  const r = Object.getOwnPropertyDescriptors(e), n = {};
  $i(r, (a, i) => {
    t(a, i, e) !== !1 && (n[i] = a);
  }), Object.defineProperties(e, n);
}, A4 = (e) => {
  t_(e, (t, r) => {
    if (On(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
      return !1;
    const n = e[r];
    if (On(n)) {
      if (t.enumerable = !1, "writable" in t) {
        t.writable = !1;
        return;
      }
      t.set || (t.set = () => {
        throw Error("Can not rewrite read-only method '" + r + "'");
      });
    }
  });
}, I4 = (e, t) => {
  const r = {}, n = (a) => {
    a.forEach((i) => {
      r[i] = !0;
    });
  };
  return Oa(e) ? n(e) : n(String(e).split(t)), r;
}, P4 = () => {
}, R4 = (e, t) => (e = +e, Number.isFinite(e) ? e : t), j4 = (e) => {
  const t = new Array(10), r = (n, a) => {
    if (_c(n)) {
      if (t.indexOf(n) >= 0)
        return;
      if (!("toJSON" in n)) {
        t[a] = n;
        const i = Oa(n) ? [] : {};
        return $i(n, (o, s) => {
          const l = r(o, a + 1);
          !fi(l) && (i[s] = l);
        }), t[a] = void 0, i;
      }
    }
    return n;
  };
  return r(e, 0);
}, ie = {
  isArray: Oa,
  isArrayBuffer: Y0,
  isBuffer: i4,
  isFormData: v4,
  isArrayBufferView: o4,
  isString: s4,
  isNumber: X0,
  isBoolean: l4,
  isObject: _c,
  isPlainObject: qo,
  isUndefined: fi,
  isDate: u4,
  isFile: f4,
  isBlob: c4,
  isRegExp: C4,
  isFunction: On,
  isStream: p4,
  isURLSearchParams: h4,
  isTypedArray: O4,
  isFileList: d4,
  forEach: $i,
  merge: Zu,
  extend: m4,
  trim: g4,
  stripBOM: b4,
  inherits: _4,
  toFlatObject: y4,
  kindOf: bc,
  kindOfTest: Ar,
  endsWith: w4,
  toArray: S4,
  forEachEntry: k4,
  matchAll: E4,
  isHTMLForm: $4,
  hasOwnProperty: Sp,
  hasOwnProp: Sp,
  // an alias to avoid ESLint no-prototype-builtins detection
  reduceDescriptors: t_,
  freezeMethods: A4,
  toObjectSet: I4,
  toCamelCase: T4,
  noop: P4,
  toFiniteNumber: R4,
  findKey: Q0,
  global: Z0,
  isContextDefined: e_,
  toJSONObject: j4
};
function Ge(e, t, r, n, a) {
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), r && (this.config = r), n && (this.request = n), a && (this.response = a);
}
ie.inherits(Ge, Error, {
  toJSON: function() {
    return {
      // Standard
      message: this.message,
      name: this.name,
      // Microsoft
      description: this.description,
      number: this.number,
      // Mozilla
      fileName: this.fileName,
      lineNumber: this.lineNumber,
      columnNumber: this.columnNumber,
      stack: this.stack,
      // Axios
      config: ie.toJSONObject(this.config),
      code: this.code,
      status: this.response && this.response.status ? this.response.status : null
    };
  }
});
const r_ = Ge.prototype, n_ = {};
[
  "ERR_BAD_OPTION_VALUE",
  "ERR_BAD_OPTION",
  "ECONNABORTED",
  "ETIMEDOUT",
  "ERR_NETWORK",
  "ERR_FR_TOO_MANY_REDIRECTS",
  "ERR_DEPRECATED",
  "ERR_BAD_RESPONSE",
  "ERR_BAD_REQUEST",
  "ERR_CANCELED",
  "ERR_NOT_SUPPORT",
  "ERR_INVALID_URL"
  // eslint-disable-next-line func-names
].forEach((e) => {
  n_[e] = { value: e };
});
Object.defineProperties(Ge, n_);
Object.defineProperty(r_, "isAxiosError", { value: !0 });
Ge.from = (e, t, r, n, a, i) => {
  const o = Object.create(r_);
  return ie.toFlatObject(e, o, function(l) {
    return l !== Error.prototype;
  }, (s) => s !== "isAxiosError"), Ge.call(o, e.message, t, r, n, a), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
};
var M4 = typeof self == "object" ? self.FormData : window.FormData;
const N4 = M4;
function ef(e) {
  return ie.isPlainObject(e) || ie.isArray(e);
}
function a_(e) {
  return ie.endsWith(e, "[]") ? e.slice(0, -2) : e;
}
function Op(e, t, r) {
  return e ? e.concat(t).map(function(a, i) {
    return a = a_(a), !r && i ? "[" + a + "]" : a;
  }).join(r ? "." : "") : t;
}
function D4(e) {
  return ie.isArray(e) && !e.some(ef);
}
const x4 = ie.toFlatObject(ie, {}, null, function(t) {
  return /^is[A-Z]/.test(t);
});
function F4(e) {
  return e && ie.isFunction(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator];
}
function Ls(e, t, r) {
  if (!ie.isObject(e))
    throw new TypeError("target must be an object");
  t = t || new (N4 || FormData)(), r = ie.toFlatObject(r, {
    metaTokens: !0,
    dots: !1,
    indexes: !1
  }, !1, function(g, _) {
    return !ie.isUndefined(_[g]);
  });
  const n = r.metaTokens, a = r.visitor || f, i = r.dots, o = r.indexes, l = (r.Blob || typeof Blob < "u" && Blob) && F4(t);
  if (!ie.isFunction(a))
    throw new TypeError("visitor must be a function");
  function u(m) {
    if (m === null)
      return "";
    if (ie.isDate(m))
      return m.toISOString();
    if (!l && ie.isBlob(m))
      throw new Ge("Blob is not supported. Use a Buffer instead.");
    return ie.isArrayBuffer(m) || ie.isTypedArray(m) ? l && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
  }
  function f(m, g, _) {
    let b = m;
    if (m && !_ && typeof m == "object") {
      if (ie.endsWith(g, "{}"))
        g = n ? g : g.slice(0, -2), m = JSON.stringify(m);
      else if (ie.isArray(m) && D4(m) || ie.isFileList(m) || ie.endsWith(g, "[]") && (b = ie.toArray(m)))
        return g = a_(g), b.forEach(function(k, w) {
          !(ie.isUndefined(k) || k === null) && t.append(
            // eslint-disable-next-line no-nested-ternary
            o === !0 ? Op([g], w, i) : o === null ? g : g + "[]",
            u(k)
          );
        }), !1;
    }
    return ef(m) ? !0 : (t.append(Op(_, g, i), u(m)), !1);
  }
  const d = [], h = Object.assign(x4, {
    defaultVisitor: f,
    convertValue: u,
    isVisitable: ef
  });
  function v(m, g) {
    if (!ie.isUndefined(m)) {
      if (d.indexOf(m) !== -1)
        throw Error("Circular reference detected in " + g.join("."));
      d.push(m), ie.forEach(m, function(b, S) {
        (!(ie.isUndefined(b) || b === null) && a.call(
          t,
          b,
          ie.isString(S) ? S.trim() : S,
          g,
          h
        )) === !0 && v(b, g ? g.concat(S) : [S]);
      }), d.pop();
    }
  }
  if (!ie.isObject(e))
    throw new TypeError("data must be an object");
  return v(e), t;
}
function kp(e) {
  const t = {
    "!": "%21",
    "'": "%27",
    "(": "%28",
    ")": "%29",
    "~": "%7E",
    "%20": "+",
    "%00": "\0"
  };
  return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
    return t[n];
  });
}
function yc(e, t) {
  this._pairs = [], e && Ls(e, this, t);
}
const i_ = yc.prototype;
i_.append = function(t, r) {
  this._pairs.push([t, r]);
};
i_.toString = function(t) {
  const r = t ? function(n) {
    return t.call(this, n, kp);
  } : kp;
  return this._pairs.map(function(a) {
    return r(a[0]) + "=" + r(a[1]);
  }, "").join("&");
};
function L4(e) {
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
}
function o_(e, t, r) {
  if (!t)
    return e;
  const n = r && r.encode || L4, a = r && r.serialize;
  let i;
  if (a ? i = a(t, r) : i = ie.isURLSearchParams(t) ? t.toString() : new yc(t, r).toString(n), i) {
    const o = e.indexOf("#");
    o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
  }
  return e;
}
class B4 {
  constructor() {
    this.handlers = [];
  }
  /**
   * Add a new interceptor to the stack
   *
   * @param {Function} fulfilled The function to handle `then` for a `Promise`
   * @param {Function} rejected The function to handle `reject` for a `Promise`
   *
   * @return {Number} An ID used to remove interceptor later
   */
  use(t, r, n) {
    return this.handlers.push({
      fulfilled: t,
      rejected: r,
      synchronous: n ? n.synchronous : !1,
      runWhen: n ? n.runWhen : null
    }), this.handlers.length - 1;
  }
  /**
   * Remove an interceptor from the stack
   *
   * @param {Number} id The ID that was returned by `use`
   *
   * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
   */
  eject(t) {
    this.handlers[t] && (this.handlers[t] = null);
  }
  /**
   * Clear all interceptors from the stack
   *
   * @returns {void}
   */
  clear() {
    this.handlers && (this.handlers = []);
  }
  /**
   * Iterate over all the registered interceptors
   *
   * This method is particularly useful for skipping over any
   * interceptors that may have become `null` calling `eject`.
   *
   * @param {Function} fn The function to call for each interceptor
   *
   * @returns {void}
   */
  forEach(t) {
    ie.forEach(this.handlers, function(n) {
      n !== null && t(n);
    });
  }
}
const Ep = B4, s_ = {
  silentJSONParsing: !0,
  forcedJSONParsing: !0,
  clarifyTimeoutError: !1
}, z4 = typeof URLSearchParams < "u" ? URLSearchParams : yc, V4 = FormData, q4 = (() => {
  let e;
  return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
})(), U4 = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), hr = {
  isBrowser: !0,
  classes: {
    URLSearchParams: z4,
    FormData: V4,
    Blob
  },
  isStandardBrowserEnv: q4,
  isStandardBrowserWebWorkerEnv: U4,
  protocols: ["http", "https", "file", "blob", "url", "data"]
};
function H4(e, t) {
  return Ls(e, new hr.classes.URLSearchParams(), Object.assign({
    visitor: function(r, n, a, i) {
      return hr.isNode && ie.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
    }
  }, t));
}
function G4(e) {
  return ie.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
}
function W4(e) {
  const t = {}, r = Object.keys(e);
  let n;
  const a = r.length;
  let i;
  for (n = 0; n < a; n++)
    i = r[n], t[i] = e[i];
  return t;
}
function l_(e) {
  function t(r, n, a, i) {
    let o = r[i++];
    const s = Number.isFinite(+o), l = i >= r.length;
    return o = !o && ie.isArray(a) ? a.length : o, l ? (ie.hasOwnProp(a, o) ? a[o] = [a[o], n] : a[o] = n, !s) : ((!a[o] || !ie.isObject(a[o])) && (a[o] = []), t(r, n, a[o], i) && ie.isArray(a[o]) && (a[o] = W4(a[o])), !s);
  }
  if (ie.isFormData(e) && ie.isFunction(e.entries)) {
    const r = {};
    return ie.forEachEntry(e, (n, a) => {
      t(G4(n), a, r, 0);
    }), r;
  }
  return null;
}
const K4 = {
  "Content-Type": void 0
};
function J4(e, t, r) {
  if (ie.isString(e))
    try {
      return (t || JSON.parse)(e), ie.trim(e);
    } catch (n) {
      if (n.name !== "SyntaxError")
        throw n;
    }
  return (r || JSON.stringify)(e);
}
const Bs = {
  transitional: s_,
  adapter: ["xhr", "http"],
  transformRequest: [function(t, r) {
    const n = r.getContentType() || "", a = n.indexOf("application/json") > -1, i = ie.isObject(t);
    if (i && ie.isHTMLForm(t) && (t = new FormData(t)), ie.isFormData(t))
      return a && a ? JSON.stringify(l_(t)) : t;
    if (ie.isArrayBuffer(t) || ie.isBuffer(t) || ie.isStream(t) || ie.isFile(t) || ie.isBlob(t))
      return t;
    if (ie.isArrayBufferView(t))
      return t.buffer;
    if (ie.isURLSearchParams(t))
      return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
    let s;
    if (i) {
      if (n.indexOf("application/x-www-form-urlencoded") > -1)
        return H4(t, this.formSerializer).toString();
      if ((s = ie.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
        const l = this.env && this.env.FormData;
        return Ls(
          s ? { "files[]": t } : t,
          l && new l(),
          this.formSerializer
        );
      }
    }
    return i || a ? (r.setContentType("application/json", !1), J4(t)) : t;
  }],
  transformResponse: [function(t) {
    const r = this.transitional || Bs.transitional, n = r && r.forcedJSONParsing, a = this.responseType === "json";
    if (t && ie.isString(t) && (n && !this.responseType || a)) {
      const o = !(r && r.silentJSONParsing) && a;
      try {
        return JSON.parse(t);
      } catch (s) {
        if (o)
          throw s.name === "SyntaxError" ? Ge.from(s, Ge.ERR_BAD_RESPONSE, this, null, this.response) : s;
      }
    }
    return t;
  }],
  /**
   * A timeout in milliseconds to abort a request. If set to 0 (default) a
   * timeout is not created.
   */
  timeout: 0,
  xsrfCookieName: "XSRF-TOKEN",
  xsrfHeaderName: "X-XSRF-TOKEN",
  maxContentLength: -1,
  maxBodyLength: -1,
  env: {
    FormData: hr.classes.FormData,
    Blob: hr.classes.Blob
  },
  validateStatus: function(t) {
    return t >= 200 && t < 300;
  },
  headers: {
    common: {
      Accept: "application/json, text/plain, */*"
    }
  }
};
ie.forEach(["delete", "get", "head"], function(t) {
  Bs.headers[t] = {};
});
ie.forEach(["post", "put", "patch"], function(t) {
  Bs.headers[t] = ie.merge(K4);
});
const wc = Bs, Y4 = ie.toObjectSet([
  "age",
  "authorization",
  "content-length",
  "content-type",
  "etag",
  "expires",
  "from",
  "host",
  "if-modified-since",
  "if-unmodified-since",
  "last-modified",
  "location",
  "max-forwards",
  "proxy-authorization",
  "referer",
  "retry-after",
  "user-agent"
]), X4 = (e) => {
  const t = {};
  let r, n, a;
  return e && e.split(`
`).forEach(function(o) {
    a = o.indexOf(":"), r = o.substring(0, a).trim().toLowerCase(), n = o.substring(a + 1).trim(), !(!r || t[r] && Y4[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
  }), t;
}, $p = Symbol("internals");
function xa(e) {
  return e && String(e).trim().toLowerCase();
}
function Uo(e) {
  return e === !1 || e == null ? e : ie.isArray(e) ? e.map(Uo) : String(e);
}
function Q4(e) {
  const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
  let n;
  for (; n = r.exec(e); )
    t[n[1]] = n[2];
  return t;
}
function Z4(e) {
  return /^[-_a-zA-Z]+$/.test(e.trim());
}
function Tp(e, t, r, n) {
  if (ie.isFunction(n))
    return n.call(this, t, r);
  if (ie.isString(t)) {
    if (ie.isString(n))
      return t.indexOf(n) !== -1;
    if (ie.isRegExp(n))
      return n.test(t);
  }
}
function eI(e) {
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
}
function tI(e, t) {
  const r = ie.toCamelCase(" " + t);
  ["get", "set", "has"].forEach((n) => {
    Object.defineProperty(e, n + r, {
      value: function(a, i, o) {
        return this[n].call(this, t, a, i, o);
      },
      configurable: !0
    });
  });
}
class zs {
  constructor(t) {
    t && this.set(t);
  }
  set(t, r, n) {
    const a = this;
    function i(s, l, u) {
      const f = xa(l);
      if (!f)
        throw new Error("header name must be a non-empty string");
      const d = ie.findKey(a, f);
      (!d || a[d] === void 0 || u === !0 || u === void 0 && a[d] !== !1) && (a[d || l] = Uo(s));
    }
    const o = (s, l) => ie.forEach(s, (u, f) => i(u, f, l));
    return ie.isPlainObject(t) || t instanceof this.constructor ? o(t, r) : ie.isString(t) && (t = t.trim()) && !Z4(t) ? o(X4(t), r) : t != null && i(r, t, n), this;
  }
  get(t, r) {
    if (t = xa(t), t) {
      const n = ie.findKey(this, t);
      if (n) {
        const a = this[n];
        if (!r)
          return a;
        if (r === !0)
          return Q4(a);
        if (ie.isFunction(r))
          return r.call(this, a, n);
        if (ie.isRegExp(r))
          return r.exec(a);
        throw new TypeError("parser must be boolean|regexp|function");
      }
    }
  }
  has(t, r) {
    if (t = xa(t), t) {
      const n = ie.findKey(this, t);
      return !!(n && (!r || Tp(this, this[n], n, r)));
    }
    return !1;
  }
  delete(t, r) {
    const n = this;
    let a = !1;
    function i(o) {
      if (o = xa(o), o) {
        const s = ie.findKey(n, o);
        s && (!r || Tp(n, n[s], s, r)) && (delete n[s], a = !0);
      }
    }
    return ie.isArray(t) ? t.forEach(i) : i(t), a;
  }
  clear() {
    return Object.keys(this).forEach(this.delete.bind(this));
  }
  normalize(t) {
    const r = this, n = {};
    return ie.forEach(this, (a, i) => {
      const o = ie.findKey(n, i);
      if (o) {
        r[o] = Uo(a), delete r[i];
        return;
      }
      const s = t ? eI(i) : String(i).trim();
      s !== i && delete r[i], r[s] = Uo(a), n[s] = !0;
    }), this;
  }
  concat(...t) {
    return this.constructor.concat(this, ...t);
  }
  toJSON(t) {
    const r = /* @__PURE__ */ Object.create(null);
    return ie.forEach(this, (n, a) => {
      n != null && n !== !1 && (r[a] = t && ie.isArray(n) ? n.join(", ") : n);
    }), r;
  }
  [Symbol.iterator]() {
    return Object.entries(this.toJSON())[Symbol.iterator]();
  }
  toString() {
    return Object.entries(this.toJSON()).map(([t, r]) => t + ": " + r).join(`
`);
  }
  get [Symbol.toStringTag]() {
    return "AxiosHeaders";
  }
  static from(t) {
    return t instanceof this ? t : new this(t);
  }
  static concat(t, ...r) {
    const n = new this(t);
    return r.forEach((a) => n.set(a)), n;
  }
  static accessor(t) {
    const n = (this[$p] = this[$p] = {
      accessors: {}
    }).accessors, a = this.prototype;
    function i(o) {
      const s = xa(o);
      n[s] || (tI(a, o), n[s] = !0);
    }
    return ie.isArray(t) ? t.forEach(i) : i(t), this;
  }
}
zs.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent"]);
ie.freezeMethods(zs.prototype);
ie.freezeMethods(zs);
const Er = zs;
function El(e, t) {
  const r = this || wc, n = t || r, a = Er.from(n.headers);
  let i = n.data;
  return ie.forEach(e, function(s) {
    i = s.call(r, i, a.normalize(), t ? t.status : void 0);
  }), a.normalize(), i;
}
function u_(e) {
  return !!(e && e.__CANCEL__);
}
function Ti(e, t, r) {
  Ge.call(this, e ?? "canceled", Ge.ERR_CANCELED, t, r), this.name = "CanceledError";
}
ie.inherits(Ti, Ge, {
  __CANCEL__: !0
});
const rI = null;
function nI(e, t, r) {
  const n = r.config.validateStatus;
  !r.status || !n || n(r.status) ? e(r) : t(new Ge(
    "Request failed with status code " + r.status,
    [Ge.ERR_BAD_REQUEST, Ge.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
    r.config,
    r.request,
    r
  ));
}
const aI = hr.isStandardBrowserEnv ? function() {
  return {
    write: function(r, n, a, i, o, s) {
      const l = [];
      l.push(r + "=" + encodeURIComponent(n)), ie.isNumber(a) && l.push("expires=" + new Date(a).toGMTString()), ie.isString(i) && l.push("path=" + i), ie.isString(o) && l.push("domain=" + o), s === !0 && l.push("secure"), document.cookie = l.join("; ");
    },
    read: function(r) {
      const n = document.cookie.match(new RegExp("(^|;\\s*)(" + r + ")=([^;]*)"));
      return n ? decodeURIComponent(n[3]) : null;
    },
    remove: function(r) {
      this.write(r, "", Date.now() - 864e5);
    }
  };
}() : function() {
  return {
    write: function() {
    },
    read: function() {
      return null;
    },
    remove: function() {
    }
  };
}();
function iI(e) {
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
}
function oI(e, t) {
  return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
}
function f_(e, t) {
  return e && !iI(t) ? oI(e, t) : t;
}
const sI = hr.isStandardBrowserEnv ? function() {
  const t = /(msie|trident)/i.test(navigator.userAgent), r = document.createElement("a");
  let n;
  function a(i) {
    let o = i;
    return t && (r.setAttribute("href", o), o = r.href), r.setAttribute("href", o), {
      href: r.href,
      protocol: r.protocol ? r.protocol.replace(/:$/, "") : "",
      host: r.host,
      search: r.search ? r.search.replace(/^\?/, "") : "",
      hash: r.hash ? r.hash.replace(/^#/, "") : "",
      hostname: r.hostname,
      port: r.port,
      pathname: r.pathname.charAt(0) === "/" ? r.pathname : "/" + r.pathname
    };
  }
  return n = a(window.location.href), function(o) {
    const s = ie.isString(o) ? a(o) : o;
    return s.protocol === n.protocol && s.host === n.host;
  };
}() : function() {
  return function() {
    return !0;
  };
}();
function lI(e) {
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
  return t && t[1] || "";
}
function uI(e, t) {
  e = e || 10;
  const r = new Array(e), n = new Array(e);
  let a = 0, i = 0, o;
  return t = t !== void 0 ? t : 1e3, function(l) {
    const u = Date.now(), f = n[i];
    o || (o = u), r[a] = l, n[a] = u;
    let d = i, h = 0;
    for (; d !== a; )
      h += r[d++], d = d % e;
    if (a = (a + 1) % e, a === i && (i = (i + 1) % e), u - o < t)
      return;
    const v = f && u - f;
    return v ? Math.round(h * 1e3 / v) : void 0;
  };
}
function Cp(e, t) {
  let r = 0;
  const n = uI(50, 250);
  return (a) => {
    const i = a.loaded, o = a.lengthComputable ? a.total : void 0, s = i - r, l = n(s), u = i <= o;
    r = i;
    const f = {
      loaded: i,
      total: o,
      progress: o ? i / o : void 0,
      bytes: s,
      rate: l || void 0,
      estimated: l && o && u ? (o - i) / l : void 0,
      event: a
    };
    f[t ? "download" : "upload"] = !0, e(f);
  };
}
const fI = typeof XMLHttpRequest < "u", cI = fI && function(e) {
  return new Promise(function(r, n) {
    let a = e.data;
    const i = Er.from(e.headers).normalize(), o = e.responseType;
    let s;
    function l() {
      e.cancelToken && e.cancelToken.unsubscribe(s), e.signal && e.signal.removeEventListener("abort", s);
    }
    ie.isFormData(a) && (hr.isStandardBrowserEnv || hr.isStandardBrowserWebWorkerEnv) && i.setContentType(!1);
    let u = new XMLHttpRequest();
    if (e.auth) {
      const v = e.auth.username || "", m = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
      i.set("Authorization", "Basic " + btoa(v + ":" + m));
    }
    const f = f_(e.baseURL, e.url);
    u.open(e.method.toUpperCase(), o_(f, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
    function d() {
      if (!u)
        return;
      const v = Er.from(
        "getAllResponseHeaders" in u && u.getAllResponseHeaders()
      ), g = {
        data: !o || o === "text" || o === "json" ? u.responseText : u.response,
        status: u.status,
        statusText: u.statusText,
        headers: v,
        config: e,
        request: u
      };
      nI(function(b) {
        r(b), l();
      }, function(b) {
        n(b), l();
      }, g), u = null;
    }
    if ("onloadend" in u ? u.onloadend = d : u.onreadystatechange = function() {
      !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(d);
    }, u.onabort = function() {
      u && (n(new Ge("Request aborted", Ge.ECONNABORTED, e, u)), u = null);
    }, u.onerror = function() {
      n(new Ge("Network Error", Ge.ERR_NETWORK, e, u)), u = null;
    }, u.ontimeout = function() {
      let m = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
      const g = e.transitional || s_;
      e.timeoutErrorMessage && (m = e.timeoutErrorMessage), n(new Ge(
        m,
        g.clarifyTimeoutError ? Ge.ETIMEDOUT : Ge.ECONNABORTED,
        e,
        u
      )), u = null;
    }, hr.isStandardBrowserEnv) {
      const v = (e.withCredentials || sI(f)) && e.xsrfCookieName && aI.read(e.xsrfCookieName);
      v && i.set(e.xsrfHeaderName, v);
    }
    a === void 0 && i.setContentType(null), "setRequestHeader" in u && ie.forEach(i.toJSON(), function(m, g) {
      u.setRequestHeader(g, m);
    }), ie.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Cp(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Cp(e.onUploadProgress)), (e.cancelToken || e.signal) && (s = (v) => {
      u && (n(!v || v.type ? new Ti(null, e, u) : v), u.abort(), u = null);
    }, e.cancelToken && e.cancelToken.subscribe(s), e.signal && (e.signal.aborted ? s() : e.signal.addEventListener("abort", s)));
    const h = lI(f);
    if (h && hr.protocols.indexOf(h) === -1) {
      n(new Ge("Unsupported protocol " + h + ":", Ge.ERR_BAD_REQUEST, e));
      return;
    }
    u.send(a || null);
  });
}, Ho = {
  http: rI,
  xhr: cI
};
ie.forEach(Ho, (e, t) => {
  if (e) {
    try {
      Object.defineProperty(e, "name", { value: t });
    } catch {
    }
    Object.defineProperty(e, "adapterName", { value: t });
  }
});
const dI = {
  getAdapter: (e) => {
    e = ie.isArray(e) ? e : [e];
    const { length: t } = e;
    let r, n;
    for (let a = 0; a < t && (r = e[a], !(n = ie.isString(r) ? Ho[r.toLowerCase()] : r)); a++)
      ;
    if (!n)
      throw n === !1 ? new Ge(
        `Adapter ${r} is not supported by the environment`,
        "ERR_NOT_SUPPORT"
      ) : new Error(
        ie.hasOwnProp(Ho, r) ? `Adapter '${r}' is not available in the build` : `Unknown adapter '${r}'`
      );
    if (!ie.isFunction(n))
      throw new TypeError("adapter is not a function");
    return n;
  },
  adapters: Ho
};
function $l(e) {
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
    throw new Ti(null, e);
}
function Ap(e) {
  return $l(e), e.headers = Er.from(e.headers), e.data = El.call(
    e,
    e.transformRequest
  ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), dI.getAdapter(e.adapter || wc.adapter)(e).then(function(n) {
    return $l(e), n.data = El.call(
      e,
      e.transformResponse,
      n
    ), n.headers = Er.from(n.headers), n;
  }, function(n) {
    return u_(n) || ($l(e), n && n.response && (n.response.data = El.call(
      e,
      e.transformResponse,
      n.response
    ), n.response.headers = Er.from(n.response.headers))), Promise.reject(n);
  });
}
const Ip = (e) => e instanceof Er ? e.toJSON() : e;
function la(e, t) {
  t = t || {};
  const r = {};
  function n(u, f, d) {
    return ie.isPlainObject(u) && ie.isPlainObject(f) ? ie.merge.call({ caseless: d }, u, f) : ie.isPlainObject(f) ? ie.merge({}, f) : ie.isArray(f) ? f.slice() : f;
  }
  function a(u, f, d) {
    if (ie.isUndefined(f)) {
      if (!ie.isUndefined(u))
        return n(void 0, u, d);
    } else
      return n(u, f, d);
  }
  function i(u, f) {
    if (!ie.isUndefined(f))
      return n(void 0, f);
  }
  function o(u, f) {
    if (ie.isUndefined(f)) {
      if (!ie.isUndefined(u))
        return n(void 0, u);
    } else
      return n(void 0, f);
  }
  function s(u, f, d) {
    if (d in t)
      return n(u, f);
    if (d in e)
      return n(void 0, u);
  }
  const l = {
    url: i,
    method: i,
    data: i,
    baseURL: o,
    transformRequest: o,
    transformResponse: o,
    paramsSerializer: o,
    timeout: o,
    timeoutMessage: o,
    withCredentials: o,
    adapter: o,
    responseType: o,
    xsrfCookieName: o,
    xsrfHeaderName: o,
    onUploadProgress: o,
    onDownloadProgress: o,
    decompress: o,
    maxContentLength: o,
    maxBodyLength: o,
    beforeRedirect: o,
    transport: o,
    httpAgent: o,
    httpsAgent: o,
    cancelToken: o,
    socketPath: o,
    responseEncoding: o,
    validateStatus: s,
    headers: (u, f) => a(Ip(u), Ip(f), !0)
  };
  return ie.forEach(Object.keys(e).concat(Object.keys(t)), function(f) {
    const d = l[f] || a, h = d(e[f], t[f], f);
    ie.isUndefined(h) && d !== s || (r[f] = h);
  }), r;
}
const c_ = "1.2.2", Sc = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
  Sc[e] = function(n) {
    return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
  };
});
const Pp = {};
Sc.transitional = function(t, r, n) {
  function a(i, o) {
    return "[Axios v" + c_ + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
  }
  return (i, o, s) => {
    if (t === !1)
      throw new Ge(
        a(o, " has been removed" + (r ? " in " + r : "")),
        Ge.ERR_DEPRECATED
      );
    return r && !Pp[o] && (Pp[o] = !0, console.warn(
      a(
        o,
        " has been deprecated since v" + r + " and will be removed in the near future"
      )
    )), t ? t(i, o, s) : !0;
  };
};
function pI(e, t, r) {
  if (typeof e != "object")
    throw new Ge("options must be an object", Ge.ERR_BAD_OPTION_VALUE);
  const n = Object.keys(e);
  let a = n.length;
  for (; a-- > 0; ) {
    const i = n[a], o = t[i];
    if (o) {
      const s = e[i], l = s === void 0 || o(s, i, e);
      if (l !== !0)
        throw new Ge("option " + i + " must be " + l, Ge.ERR_BAD_OPTION_VALUE);
      continue;
    }
    if (r !== !0)
      throw new Ge("Unknown option " + i, Ge.ERR_BAD_OPTION);
  }
}
const tf = {
  assertOptions: pI,
  validators: Sc
}, jr = tf.validators;
class us {
  constructor(t) {
    this.defaults = t, this.interceptors = {
      request: new Ep(),
      response: new Ep()
    };
  }
  /**
   * Dispatch a request
   *
   * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
   * @param {?Object} config
   *
   * @returns {Promise} The Promise to be fulfilled
   */
  request(t, r) {
    typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = la(this.defaults, r);
    const { transitional: n, paramsSerializer: a, headers: i } = r;
    n !== void 0 && tf.assertOptions(n, {
      silentJSONParsing: jr.transitional(jr.boolean),
      forcedJSONParsing: jr.transitional(jr.boolean),
      clarifyTimeoutError: jr.transitional(jr.boolean)
    }, !1), a !== void 0 && tf.assertOptions(a, {
      encode: jr.function,
      serialize: jr.function
    }, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
    let o;
    o = i && ie.merge(
      i.common,
      i[r.method]
    ), o && ie.forEach(
      ["delete", "get", "head", "post", "put", "patch", "common"],
      (m) => {
        delete i[m];
      }
    ), r.headers = Er.concat(o, i);
    const s = [];
    let l = !0;
    this.interceptors.request.forEach(function(g) {
      typeof g.runWhen == "function" && g.runWhen(r) === !1 || (l = l && g.synchronous, s.unshift(g.fulfilled, g.rejected));
    });
    const u = [];
    this.interceptors.response.forEach(function(g) {
      u.push(g.fulfilled, g.rejected);
    });
    let f, d = 0, h;
    if (!l) {
      const m = [Ap.bind(this), void 0];
      for (m.unshift.apply(m, s), m.push.apply(m, u), h = m.length, f = Promise.resolve(r); d < h; )
        f = f.then(m[d++], m[d++]);
      return f;
    }
    h = s.length;
    let v = r;
    for (d = 0; d < h; ) {
      const m = s[d++], g = s[d++];
      try {
        v = m(v);
      } catch (_) {
        g.call(this, _);
        break;
      }
    }
    try {
      f = Ap.call(this, v);
    } catch (m) {
      return Promise.reject(m);
    }
    for (d = 0, h = u.length; d < h; )
      f = f.then(u[d++], u[d++]);
    return f;
  }
  getUri(t) {
    t = la(this.defaults, t);
    const r = f_(t.baseURL, t.url);
    return o_(r, t.params, t.paramsSerializer);
  }
}
ie.forEach(["delete", "get", "head", "options"], function(t) {
  us.prototype[t] = function(r, n) {
    return this.request(la(n || {}, {
      method: t,
      url: r,
      data: (n || {}).data
    }));
  };
});
ie.forEach(["post", "put", "patch"], function(t) {
  function r(n) {
    return function(i, o, s) {
      return this.request(la(s || {}, {
        method: t,
        headers: n ? {
          "Content-Type": "multipart/form-data"
        } : {},
        url: i,
        data: o
      }));
    };
  }
  us.prototype[t] = r(), us.prototype[t + "Form"] = r(!0);
});
const Go = us;
class Oc {
  constructor(t) {
    if (typeof t != "function")
      throw new TypeError("executor must be a function.");
    let r;
    this.promise = new Promise(function(i) {
      r = i;
    });
    const n = this;
    this.promise.then((a) => {
      if (!n._listeners)
        return;
      let i = n._listeners.length;
      for (; i-- > 0; )
        n._listeners[i](a);
      n._listeners = null;
    }), this.promise.then = (a) => {
      let i;
      const o = new Promise((s) => {
        n.subscribe(s), i = s;
      }).then(a);
      return o.cancel = function() {
        n.unsubscribe(i);
      }, o;
    }, t(function(i, o, s) {
      n.reason || (n.reason = new Ti(i, o, s), r(n.reason));
    });
  }
  /**
   * Throws a `CanceledError` if cancellation has been requested.
   */
  throwIfRequested() {
    if (this.reason)
      throw this.reason;
  }
  /**
   * Subscribe to the cancel signal
   */
  subscribe(t) {
    if (this.reason) {
      t(this.reason);
      return;
    }
    this._listeners ? this._listeners.push(t) : this._listeners = [t];
  }
  /**
   * Unsubscribe from the cancel signal
   */
  unsubscribe(t) {
    if (!this._listeners)
      return;
    const r = this._listeners.indexOf(t);
    r !== -1 && this._listeners.splice(r, 1);
  }
  /**
   * Returns an object that contains a new `CancelToken` and a function that, when called,
   * cancels the `CancelToken`.
   */
  static source() {
    let t;
    return {
      token: new Oc(function(a) {
        t = a;
      }),
      cancel: t
    };
  }
}
const vI = Oc;
function hI(e) {
  return function(r) {
    return e.apply(null, r);
  };
}
function gI(e) {
  return ie.isObject(e) && e.isAxiosError === !0;
}
const rf = {
  Continue: 100,
  SwitchingProtocols: 101,
  Processing: 102,
  EarlyHints: 103,
  Ok: 200,
  Created: 201,
  Accepted: 202,
  NonAuthoritativeInformation: 203,
  NoContent: 204,
  ResetContent: 205,
  PartialContent: 206,
  MultiStatus: 207,
  AlreadyReported: 208,
  ImUsed: 226,
  MultipleChoices: 300,
  MovedPermanently: 301,
  Found: 302,
  SeeOther: 303,
  NotModified: 304,
  UseProxy: 305,
  Unused: 306,
  TemporaryRedirect: 307,
  PermanentRedirect: 308,
  BadRequest: 400,
  Unauthorized: 401,
  PaymentRequired: 402,
  Forbidden: 403,
  NotFound: 404,
  MethodNotAllowed: 405,
  NotAcceptable: 406,
  ProxyAuthenticationRequired: 407,
  RequestTimeout: 408,
  Conflict: 409,
  Gone: 410,
  LengthRequired: 411,
  PreconditionFailed: 412,
  PayloadTooLarge: 413,
  UriTooLong: 414,
  UnsupportedMediaType: 415,
  RangeNotSatisfiable: 416,
  ExpectationFailed: 417,
  ImATeapot: 418,
  MisdirectedRequest: 421,
  UnprocessableEntity: 422,
  Locked: 423,
  FailedDependency: 424,
  TooEarly: 425,
  UpgradeRequired: 426,
  PreconditionRequired: 428,
  TooManyRequests: 429,
  RequestHeaderFieldsTooLarge: 431,
  UnavailableForLegalReasons: 451,
  InternalServerError: 500,
  NotImplemented: 501,
  BadGateway: 502,
  ServiceUnavailable: 503,
  GatewayTimeout: 504,
  HttpVersionNotSupported: 505,
  VariantAlsoNegotiates: 506,
  InsufficientStorage: 507,
  LoopDetected: 508,
  NotExtended: 510,
  NetworkAuthenticationRequired: 511
};
Object.entries(rf).forEach(([e, t]) => {
  rf[t] = e;
});
const mI = rf;
function d_(e) {
  const t = new Go(e), r = K0(Go.prototype.request, t);
  return ie.extend(r, Go.prototype, t, { allOwnKeys: !0 }), ie.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(a) {
    return d_(la(e, a));
  }, r;
}
const kt = d_(wc);
kt.Axios = Go;
kt.CanceledError = Ti;
kt.CancelToken = vI;
kt.isCancel = u_;
kt.VERSION = c_;
kt.toFormData = Ls;
kt.AxiosError = Ge;
kt.Cancel = kt.CanceledError;
kt.all = function(t) {
  return Promise.all(t);
};
kt.spread = hI;
kt.isAxiosError = gI;
kt.mergeConfig = la;
kt.AxiosHeaders = Er;
kt.formToJSON = (e) => l_(ie.isHTMLForm(e) ? new FormData(e) : e);
kt.HttpStatusCode = mI;
kt.default = kt;
const Kt = kt;
var p_ = {}, uo = function(e) {
  return e && e.Math == Math && e;
}, nt = (
  // eslint-disable-next-line es/no-global-this -- safe
  uo(typeof globalThis == "object" && globalThis) || uo(typeof window == "object" && window) || // eslint-disable-next-line no-restricted-globals -- safe
  uo(typeof self == "object" && self) || uo(typeof Xn == "object" && Xn) || function() {
    return this;
  }() || Function("return this")()
), Gr = {}, Ie = function(e) {
  try {
    return !!e();
  } catch {
    return !0;
  }
}, bI = Ie, bt = !bI(function() {
  return Object.defineProperty({}, 1, { get: function() {
    return 7;
  } })[1] != 7;
}), _I = Ie, Ci = !_I(function() {
  var e = function() {
  }.bind();
  return typeof e != "function" || e.hasOwnProperty("prototype");
}), yI = Ci, fo = Function.prototype.call, Xe = yI ? fo.bind(fo) : function() {
  return fo.apply(fo, arguments);
}, Ai = {}, v_ = {}.propertyIsEnumerable, h_ = Object.getOwnPropertyDescriptor, wI = h_ && !v_.call({ 1: 2 }, 1);
Ai.f = wI ? function(t) {
  var r = h_(this, t);
  return !!r && r.enumerable;
} : v_;
var Ii = function(e, t) {
  return {
    enumerable: !(e & 1),
    configurable: !(e & 2),
    writable: !(e & 4),
    value: t
  };
}, g_ = Ci, m_ = Function.prototype, nf = m_.call, SI = g_ && m_.bind.bind(nf, nf), Pe = g_ ? SI : function(e) {
  return function() {
    return nf.apply(e, arguments);
  };
}, b_ = Pe, OI = b_({}.toString), kI = b_("".slice), Ir = function(e) {
  return kI(OI(e), 8, -1);
}, EI = Pe, $I = Ie, TI = Ir, Tl = Object, CI = EI("".split), Pi = $I(function() {
  return !Tl("z").propertyIsEnumerable(0);
}) ? function(e) {
  return TI(e) == "String" ? CI(e, "") : Tl(e);
} : Tl, Sr = function(e) {
  return e == null;
}, AI = Sr, II = TypeError, Wr = function(e) {
  if (AI(e))
    throw II("Can't call method on " + e);
  return e;
}, PI = Pi, RI = Wr, er = function(e) {
  return PI(RI(e));
}, af = typeof document == "object" && document.all, jI = typeof af > "u" && af !== void 0, __ = {
  all: af,
  IS_HTMLDDA: jI
}, y_ = __, MI = y_.all, at = y_.IS_HTMLDDA ? function(e) {
  return typeof e == "function" || e === MI;
} : function(e) {
  return typeof e == "function";
}, Rp = at, w_ = __, NI = w_.all, _t = w_.IS_HTMLDDA ? function(e) {
  return typeof e == "object" ? e !== null : Rp(e) || e === NI;
} : function(e) {
  return typeof e == "object" ? e !== null : Rp(e);
}, Cl = nt, DI = at, xI = function(e) {
  return DI(e) ? e : void 0;
}, Ut = function(e, t) {
  return arguments.length < 2 ? xI(Cl[e]) : Cl[e] && Cl[e][t];
}, FI = Pe, Kr = FI({}.isPrototypeOf), LI = Ut, Cn = LI("navigator", "userAgent") || "", S_ = nt, Al = Cn, jp = S_.process, Mp = S_.Deno, Np = jp && jp.versions || Mp && Mp.version, Dp = Np && Np.v8, or, fs;
Dp && (or = Dp.split("."), fs = or[0] > 0 && or[0] < 4 ? 1 : +(or[0] + or[1]));
!fs && Al && (or = Al.match(/Edge\/(\d+)/), (!or || or[1] >= 74) && (or = Al.match(/Chrome\/(\d+)/), or && (fs = +or[1])));
var An = fs, xp = An, BI = Ie, ka = !!Object.getOwnPropertySymbols && !BI(function() {
  var e = Symbol();
  return !String(e) || !(Object(e) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  !Symbol.sham && xp && xp < 41;
}), zI = ka, O_ = zI && !Symbol.sham && typeof Symbol.iterator == "symbol", VI = Ut, qI = at, UI = Kr, HI = O_, GI = Object, Ri = HI ? function(e) {
  return typeof e == "symbol";
} : function(e) {
  var t = VI("Symbol");
  return qI(t) && UI(t.prototype, GI(e));
}, WI = String, Ea = function(e) {
  try {
    return WI(e);
  } catch {
    return "Object";
  }
}, KI = at, JI = Ea, YI = TypeError, Dt = function(e) {
  if (KI(e))
    return e;
  throw YI(JI(e) + " is not a function");
}, XI = Dt, QI = Sr, $a = function(e, t) {
  var r = e[t];
  return QI(r) ? void 0 : XI(r);
}, Il = Xe, Pl = at, Rl = _t, ZI = TypeError, e5 = function(e, t) {
  var r, n;
  if (t === "string" && Pl(r = e.toString) && !Rl(n = Il(r, e)) || Pl(r = e.valueOf) && !Rl(n = Il(r, e)) || t !== "string" && Pl(r = e.toString) && !Rl(n = Il(r, e)))
    return n;
  throw ZI("Can't convert object to primitive value");
}, Ur = {}, t5 = {
  get exports() {
    return Ur;
  },
  set exports(e) {
    Ur = e;
  }
}, r5 = !1, Fp = nt, n5 = Object.defineProperty, kc = function(e, t) {
  try {
    n5(Fp, e, { value: t, configurable: !0, writable: !0 });
  } catch {
    Fp[e] = t;
  }
  return t;
}, a5 = nt, i5 = kc, Lp = "__core-js_shared__", o5 = a5[Lp] || i5(Lp, {}), Ec = o5, Bp = Ec;
(t5.exports = function(e, t) {
  return Bp[e] || (Bp[e] = t !== void 0 ? t : {});
})("versions", []).push({
  version: "3.27.1",
  mode: "global",
  copyright: "© 2014-2022 Denis Pushkarev (zloirock.ru)",
  license: "https://github.com/zloirock/core-js/blob/v3.27.1/LICENSE",
  source: "https://github.com/zloirock/core-js"
});
var s5 = Wr, l5 = Object, Ht = function(e) {
  return l5(s5(e));
}, u5 = Pe, f5 = Ht, c5 = u5({}.hasOwnProperty), yt = Object.hasOwn || function(t, r) {
  return c5(f5(t), r);
}, d5 = Pe, p5 = 0, v5 = Math.random(), h5 = d5(1 .toString), Vs = function(e) {
  return "Symbol(" + (e === void 0 ? "" : e) + ")_" + h5(++p5 + v5, 36);
}, g5 = nt, m5 = Ur, zp = yt, b5 = Vs, Vp = ka, k_ = O_, Nn = m5("wks"), bn = g5.Symbol, qp = bn && bn.for, _5 = k_ ? bn : bn && bn.withoutSetter || b5, it = function(e) {
  if (!zp(Nn, e) || !(Vp || typeof Nn[e] == "string")) {
    var t = "Symbol." + e;
    Vp && zp(bn, e) ? Nn[e] = bn[e] : k_ && qp ? Nn[e] = qp(t) : Nn[e] = _5(t);
  }
  return Nn[e];
}, y5 = Xe, Up = _t, Hp = Ri, w5 = $a, S5 = e5, O5 = it, k5 = TypeError, E5 = O5("toPrimitive"), $c = function(e, t) {
  if (!Up(e) || Hp(e))
    return e;
  var r = w5(e, E5), n;
  if (r) {
    if (t === void 0 && (t = "default"), n = y5(r, e, t), !Up(n) || Hp(n))
      return n;
    throw k5("Can't convert object to primitive value");
  }
  return t === void 0 && (t = "number"), S5(e, t);
}, $5 = $c, T5 = Ri, qs = function(e) {
  var t = $5(e, "string");
  return T5(t) ? t : t + "";
}, C5 = nt, Gp = _t, of = C5.document, A5 = Gp(of) && Gp(of.createElement), Us = function(e) {
  return A5 ? of.createElement(e) : {};
}, I5 = bt, P5 = Ie, R5 = Us, E_ = !I5 && !P5(function() {
  return Object.defineProperty(R5("div"), "a", {
    get: function() {
      return 7;
    }
  }).a != 7;
}), j5 = bt, M5 = Xe, N5 = Ai, D5 = Ii, x5 = er, F5 = qs, L5 = yt, B5 = E_, Wp = Object.getOwnPropertyDescriptor;
Gr.f = j5 ? Wp : function(t, r) {
  if (t = x5(t), r = F5(r), B5)
    try {
      return Wp(t, r);
    } catch {
    }
  if (L5(t, r))
    return D5(!M5(N5.f, t, r), t[r]);
};
var Tt = {}, z5 = bt, V5 = Ie, $_ = z5 && V5(function() {
  return Object.defineProperty(function() {
  }, "prototype", {
    value: 42,
    writable: !1
  }).prototype != 42;
}), q5 = _t, U5 = String, H5 = TypeError, Ot = function(e) {
  if (q5(e))
    return e;
  throw H5(U5(e) + " is not an object");
}, G5 = bt, W5 = E_, K5 = $_, co = Ot, Kp = qs, J5 = TypeError, jl = Object.defineProperty, Y5 = Object.getOwnPropertyDescriptor, Ml = "enumerable", Nl = "configurable", Dl = "writable";
Tt.f = G5 ? K5 ? function(t, r, n) {
  if (co(t), r = Kp(r), co(n), typeof t == "function" && r === "prototype" && "value" in n && Dl in n && !n[Dl]) {
    var a = Y5(t, r);
    a && a[Dl] && (t[r] = n.value, n = {
      configurable: Nl in n ? n[Nl] : a[Nl],
      enumerable: Ml in n ? n[Ml] : a[Ml],
      writable: !1
    });
  }
  return jl(t, r, n);
} : jl : function(t, r, n) {
  if (co(t), r = Kp(r), co(n), W5)
    try {
      return jl(t, r, n);
    } catch {
    }
  if ("get" in n || "set" in n)
    throw J5("Accessors not supported");
  return "value" in n && (t[r] = n.value), t;
};
var X5 = bt, Q5 = Tt, Z5 = Ii, In = X5 ? function(e, t, r) {
  return Q5.f(e, t, Z5(1, r));
} : function(e, t, r) {
  return e[t] = r, e;
}, sf = {}, eP = {
  get exports() {
    return sf;
  },
  set exports(e) {
    sf = e;
  }
}, lf = bt, tP = yt, T_ = Function.prototype, rP = lf && Object.getOwnPropertyDescriptor, Tc = tP(T_, "name"), nP = Tc && function() {
}.name === "something", aP = Tc && (!lf || lf && rP(T_, "name").configurable), ji = {
  EXISTS: Tc,
  PROPER: nP,
  CONFIGURABLE: aP
}, iP = Pe, oP = at, uf = Ec, sP = iP(Function.toString);
oP(uf.inspectSource) || (uf.inspectSource = function(e) {
  return sP(e);
});
var Cc = uf.inspectSource, lP = nt, uP = at, Jp = lP.WeakMap, fP = uP(Jp) && /native code/.test(String(Jp)), cP = Ur, dP = Vs, Yp = cP("keys"), Hs = function(e) {
  return Yp[e] || (Yp[e] = dP(e));
}, Mi = {}, pP = fP, C_ = nt, vP = _t, hP = In, xl = yt, Fl = Ec, gP = Hs, mP = Mi, Xp = "Object already initialized", ff = C_.TypeError, bP = C_.WeakMap, cs, ci, ds, _P = function(e) {
  return ds(e) ? ci(e) : cs(e, {});
}, yP = function(e) {
  return function(t) {
    var r;
    if (!vP(t) || (r = ci(t)).type !== e)
      throw ff("Incompatible receiver, " + e + " required");
    return r;
  };
};
if (pP || Fl.state) {
  var fr = Fl.state || (Fl.state = new bP());
  fr.get = fr.get, fr.has = fr.has, fr.set = fr.set, cs = function(e, t) {
    if (fr.has(e))
      throw ff(Xp);
    return t.facade = e, fr.set(e, t), t;
  }, ci = function(e) {
    return fr.get(e) || {};
  }, ds = function(e) {
    return fr.has(e);
  };
} else {
  var Dn = gP("state");
  mP[Dn] = !0, cs = function(e, t) {
    if (xl(e, Dn))
      throw ff(Xp);
    return t.facade = e, hP(e, Dn, t), t;
  }, ci = function(e) {
    return xl(e, Dn) ? e[Dn] : {};
  }, ds = function(e) {
    return xl(e, Dn);
  };
}
var Jr = {
  set: cs,
  get: ci,
  has: ds,
  enforce: _P,
  getterFor: yP
}, wP = Ie, SP = at, po = yt, cf = bt, OP = ji.CONFIGURABLE, kP = Cc, A_ = Jr, EP = A_.enforce, $P = A_.get, Wo = Object.defineProperty, TP = cf && !wP(function() {
  return Wo(function() {
  }, "length", { value: 8 }).length !== 8;
}), CP = String(String).split("String"), AP = eP.exports = function(e, t, r) {
  String(t).slice(0, 7) === "Symbol(" && (t = "[" + String(t).replace(/^Symbol\(([^)]*)\)/, "$1") + "]"), r && r.getter && (t = "get " + t), r && r.setter && (t = "set " + t), (!po(e, "name") || OP && e.name !== t) && (cf ? Wo(e, "name", { value: t, configurable: !0 }) : e.name = t), TP && r && po(r, "arity") && e.length !== r.arity && Wo(e, "length", { value: r.arity });
  try {
    r && po(r, "constructor") && r.constructor ? cf && Wo(e, "prototype", { writable: !1 }) : e.prototype && (e.prototype = void 0);
  } catch {
  }
  var n = EP(e);
  return po(n, "source") || (n.source = CP.join(typeof t == "string" ? t : "")), e;
};
Function.prototype.toString = AP(function() {
  return SP(this) && $P(this).source || kP(this);
}, "toString");
var IP = at, PP = Tt, RP = sf, jP = kc, xt = function(e, t, r, n) {
  n || (n = {});
  var a = n.enumerable, i = n.name !== void 0 ? n.name : t;
  if (IP(r) && RP(r, i, n), n.global)
    a ? e[t] = r : jP(t, r);
  else {
    try {
      n.unsafe ? e[t] && (a = !0) : delete e[t];
    } catch {
    }
    a ? e[t] = r : PP.f(e, t, {
      value: r,
      enumerable: !1,
      configurable: !n.nonConfigurable,
      writable: !n.nonWritable
    });
  }
  return e;
}, Pn = {}, MP = Math.ceil, NP = Math.floor, DP = Math.trunc || function(t) {
  var r = +t;
  return (r > 0 ? NP : MP)(r);
}, xP = DP, Ni = function(e) {
  var t = +e;
  return t !== t || t === 0 ? 0 : xP(t);
}, FP = Ni, LP = Math.max, BP = Math.min, Ac = function(e, t) {
  var r = FP(e);
  return r < 0 ? LP(r + t, 0) : BP(r, t);
}, zP = Ni, VP = Math.min, Gs = function(e) {
  return e > 0 ? VP(zP(e), 9007199254740991) : 0;
}, qP = Gs, Pr = function(e) {
  return qP(e.length);
}, UP = er, HP = Ac, GP = Pr, Qp = function(e) {
  return function(t, r, n) {
    var a = UP(t), i = GP(a), o = HP(n, i), s;
    if (e && r != r) {
      for (; i > o; )
        if (s = a[o++], s != s)
          return !0;
    } else
      for (; i > o; o++)
        if ((e || o in a) && a[o] === r)
          return e || o || 0;
    return !e && -1;
  };
}, Ic = {
  // `Array.prototype.includes` method
  // https://tc39.es/ecma262/#sec-array.prototype.includes
  includes: Qp(!0),
  // `Array.prototype.indexOf` method
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
  indexOf: Qp(!1)
}, WP = Pe, Ll = yt, KP = er, JP = Ic.indexOf, YP = Mi, Zp = WP([].push), I_ = function(e, t) {
  var r = KP(e), n = 0, a = [], i;
  for (i in r)
    !Ll(YP, i) && Ll(r, i) && Zp(a, i);
  for (; t.length > n; )
    Ll(r, i = t[n++]) && (~JP(a, i) || Zp(a, i));
  return a;
}, Pc = [
  "constructor",
  "hasOwnProperty",
  "isPrototypeOf",
  "propertyIsEnumerable",
  "toLocaleString",
  "toString",
  "valueOf"
], XP = I_, QP = Pc, ZP = QP.concat("length", "prototype");
Pn.f = Object.getOwnPropertyNames || function(t) {
  return XP(t, ZP);
};
var Di = {};
Di.f = Object.getOwnPropertySymbols;
var eR = Ut, tR = Pe, rR = Pn, nR = Di, aR = Ot, iR = tR([].concat), P_ = eR("Reflect", "ownKeys") || function(t) {
  var r = rR.f(aR(t)), n = nR.f;
  return n ? iR(r, n(t)) : r;
}, ev = yt, oR = P_, sR = Gr, lR = Tt, R_ = function(e, t, r) {
  for (var n = oR(t), a = lR.f, i = sR.f, o = 0; o < n.length; o++) {
    var s = n[o];
    !ev(e, s) && !(r && ev(r, s)) && a(e, s, i(t, s));
  }
}, uR = Ie, fR = at, cR = /#|\.prototype\./, xi = function(e, t) {
  var r = pR[dR(e)];
  return r == hR ? !0 : r == vR ? !1 : fR(t) ? uR(t) : !!t;
}, dR = xi.normalize = function(e) {
  return String(e).replace(cR, ".").toLowerCase();
}, pR = xi.data = {}, vR = xi.NATIVE = "N", hR = xi.POLYFILL = "P", Fi = xi, Bl = nt, gR = Gr.f, mR = In, bR = xt, _R = kc, yR = R_, wR = Fi, ge = function(e, t) {
  var r = e.target, n = e.global, a = e.stat, i, o, s, l, u, f;
  if (n ? o = Bl : a ? o = Bl[r] || _R(r, {}) : o = (Bl[r] || {}).prototype, o)
    for (s in t) {
      if (u = t[s], e.dontCallGetSet ? (f = gR(o, s), l = f && f.value) : l = o[s], i = wR(n ? s : r + (a ? "." : "#") + s, e.forced), !i && l !== void 0) {
        if (typeof u == typeof l)
          continue;
        yR(u, l);
      }
      (e.sham || l && l.sham) && mR(u, "sham", !0), bR(o, s, u, e);
    }
}, SR = ge, OR = Ie, kR = er, j_ = Gr.f, M_ = bt, ER = OR(function() {
  j_(1);
}), $R = !M_ || ER;
SR({ target: "Object", stat: !0, forced: $R, sham: !M_ }, {
  getOwnPropertyDescriptor: function(t, r) {
    return j_(kR(t), r);
  }
});
var Ta = {}, TR = it, CR = TR("toStringTag"), N_ = {};
N_[CR] = "z";
var Rc = String(N_) === "[object z]", AR = Rc, IR = at, Ko = Ir, PR = it, RR = PR("toStringTag"), jR = Object, MR = Ko(function() {
  return arguments;
}()) == "Arguments", NR = function(e, t) {
  try {
    return e[t];
  } catch {
  }
}, Li = AR ? Ko : function(e) {
  var t, r, n;
  return e === void 0 ? "Undefined" : e === null ? "Null" : typeof (r = NR(t = jR(e), RR)) == "string" ? r : MR ? Ko(t) : (n = Ko(t)) == "Object" && IR(t.callee) ? "Arguments" : n;
}, DR = Li, xR = String, It = function(e) {
  if (DR(e) === "Symbol")
    throw TypeError("Cannot convert a Symbol value to a string");
  return xR(e);
}, jc = {}, FR = I_, LR = Pc, Bi = Object.keys || function(t) {
  return FR(t, LR);
}, BR = bt, zR = $_, VR = Tt, qR = Ot, UR = er, HR = Bi;
jc.f = BR && !zR ? Object.defineProperties : function(t, r) {
  qR(t);
  for (var n = UR(r), a = HR(r), i = a.length, o = 0, s; i > o; )
    VR.f(t, s = a[o++], n[s]);
  return t;
};
var GR = Ut, D_ = GR("document", "documentElement"), WR = Ot, KR = jc, tv = Pc, JR = Mi, YR = D_, XR = Us, QR = Hs, rv = ">", nv = "<", df = "prototype", pf = "script", x_ = QR("IE_PROTO"), zl = function() {
}, F_ = function(e) {
  return nv + pf + rv + e + nv + "/" + pf + rv;
}, av = function(e) {
  e.write(F_("")), e.close();
  var t = e.parentWindow.Object;
  return e = null, t;
}, ZR = function() {
  var e = XR("iframe"), t = "java" + pf + ":", r;
  return e.style.display = "none", YR.appendChild(e), e.src = String(t), r = e.contentWindow.document, r.open(), r.write(F_("document.F=Object")), r.close(), r.F;
}, vo, Jo = function() {
  try {
    vo = new ActiveXObject("htmlfile");
  } catch {
  }
  Jo = typeof document < "u" ? document.domain && vo ? av(vo) : ZR() : av(vo);
  for (var e = tv.length; e--; )
    delete Jo[df][tv[e]];
  return Jo();
};
JR[x_] = !0;
var Ca = Object.create || function(t, r) {
  var n;
  return t !== null ? (zl[df] = WR(t), n = new zl(), zl[df] = null, n[x_] = t) : n = Jo(), r === void 0 ? n : KR.f(n, r);
}, Mc = {}, e8 = qs, t8 = Tt, r8 = Ii, zi = function(e, t, r) {
  var n = e8(t);
  n in e ? t8.f(e, n, r8(0, r)) : e[n] = r;
}, iv = Ac, n8 = Pr, a8 = zi, i8 = Array, o8 = Math.max, Nc = function(e, t, r) {
  for (var n = n8(e), a = iv(t, n), i = iv(r === void 0 ? n : r, n), o = i8(o8(i - a, 0)), s = 0; a < i; a++, s++)
    a8(o, s, e[a]);
  return o.length = s, o;
}, s8 = Ir, l8 = er, L_ = Pn.f, u8 = Nc, B_ = typeof window == "object" && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [], f8 = function(e) {
  try {
    return L_(e);
  } catch {
    return u8(B_);
  }
};
Mc.f = function(t) {
  return B_ && s8(t) == "Window" ? f8(t) : L_(l8(t));
};
var Dc = {}, c8 = it;
Dc.f = c8;
var d8 = nt, z_ = d8, ov = z_, p8 = yt, v8 = Dc, h8 = Tt.f, V_ = function(e) {
  var t = ov.Symbol || (ov.Symbol = {});
  p8(t, e) || h8(t, e, {
    value: v8.f(e)
  });
}, g8 = Xe, m8 = Ut, b8 = it, _8 = xt, y8 = function() {
  var e = m8("Symbol"), t = e && e.prototype, r = t && t.valueOf, n = b8("toPrimitive");
  t && !t[n] && _8(t, n, function(a) {
    return g8(r, this);
  }, { arity: 1 });
}, w8 = Tt.f, S8 = yt, O8 = it, sv = O8("toStringTag"), Vi = function(e, t, r) {
  e && !r && (e = e.prototype), e && !S8(e, sv) && w8(e, sv, { configurable: !0, value: t });
}, k8 = Ir, E8 = Pe, xc = function(e) {
  if (k8(e) === "Function")
    return E8(e);
}, lv = xc, $8 = Dt, T8 = Ci, C8 = lv(lv.bind), Ct = function(e, t) {
  return $8(e), t === void 0 ? e : T8 ? C8(e, t) : function() {
    return e.apply(t, arguments);
  };
}, A8 = Ir, Ws = Array.isArray || function(t) {
  return A8(t) == "Array";
}, I8 = Pe, P8 = Ie, q_ = at, R8 = Li, j8 = Ut, M8 = Cc, U_ = function() {
}, N8 = [], H_ = j8("Reflect", "construct"), Fc = /^\s*(?:class|function)\b/, D8 = I8(Fc.exec), x8 = !Fc.exec(U_), Fa = function(t) {
  if (!q_(t))
    return !1;
  try {
    return H_(U_, N8, t), !0;
  } catch {
    return !1;
  }
}, G_ = function(t) {
  if (!q_(t))
    return !1;
  switch (R8(t)) {
    case "AsyncFunction":
    case "GeneratorFunction":
    case "AsyncGeneratorFunction":
      return !1;
  }
  try {
    return x8 || !!D8(Fc, M8(t));
  } catch {
    return !0;
  }
};
G_.sham = !0;
var Ks = !H_ || P8(function() {
  var e;
  return Fa(Fa.call) || !Fa(Object) || !Fa(function() {
    e = !0;
  }) || e;
}) ? G_ : Fa, uv = Ws, F8 = Ks, L8 = _t, B8 = it, z8 = B8("species"), fv = Array, V8 = function(e) {
  var t;
  return uv(e) && (t = e.constructor, F8(t) && (t === fv || uv(t.prototype)) ? t = void 0 : L8(t) && (t = t[z8], t === null && (t = void 0))), t === void 0 ? fv : t;
}, q8 = V8, W_ = function(e, t) {
  return new (q8(e))(t === 0 ? 0 : t);
}, U8 = Ct, H8 = Pe, G8 = Pi, W8 = Ht, K8 = Pr, J8 = W_, cv = H8([].push), Mr = function(e) {
  var t = e == 1, r = e == 2, n = e == 3, a = e == 4, i = e == 6, o = e == 7, s = e == 5 || i;
  return function(l, u, f, d) {
    for (var h = W8(l), v = G8(h), m = U8(u, f), g = K8(v), _ = 0, b = d || J8, S = t ? b(l, g) : r || o ? b(l, 0) : void 0, k, w; g > _; _++)
      if ((s || _ in v) && (k = v[_], w = m(k, _, h), e))
        if (t)
          S[_] = w;
        else if (w)
          switch (e) {
            case 3:
              return !0;
            case 5:
              return k;
            case 6:
              return _;
            case 2:
              cv(S, k);
          }
        else
          switch (e) {
            case 4:
              return !1;
            case 7:
              cv(S, k);
          }
    return i ? -1 : n || a ? a : S;
  };
}, Aa = {
  // `Array.prototype.forEach` method
  // https://tc39.es/ecma262/#sec-array.prototype.foreach
  forEach: Mr(0),
  // `Array.prototype.map` method
  // https://tc39.es/ecma262/#sec-array.prototype.map
  map: Mr(1),
  // `Array.prototype.filter` method
  // https://tc39.es/ecma262/#sec-array.prototype.filter
  filter: Mr(2),
  // `Array.prototype.some` method
  // https://tc39.es/ecma262/#sec-array.prototype.some
  some: Mr(3),
  // `Array.prototype.every` method
  // https://tc39.es/ecma262/#sec-array.prototype.every
  every: Mr(4),
  // `Array.prototype.find` method
  // https://tc39.es/ecma262/#sec-array.prototype.find
  find: Mr(5),
  // `Array.prototype.findIndex` method
  // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  findIndex: Mr(6),
  // `Array.prototype.filterReject` method
  // https://github.com/tc39/proposal-array-filtering
  filterReject: Mr(7)
}, Js = ge, Lc = nt, Bc = Xe, Y8 = Pe, ua = bt, fa = ka, X8 = Ie, $t = yt, Q8 = Kr, vf = Ot, Ys = er, zc = qs, Z8 = It, hf = Ii, di = Ca, K_ = Bi, ej = Pn, J_ = Mc, tj = Di, Y_ = Gr, X_ = Tt, rj = jc, Q_ = Ai, Vl = xt, Vc = Ur, nj = Hs, Z_ = Mi, dv = Vs, aj = it, ij = Dc, oj = V_, sj = y8, lj = Vi, ey = Jr, Xs = Aa.forEach, Rt = nj("hidden"), Qs = "Symbol", pi = "prototype", uj = ey.set, pv = ey.getterFor(Qs), Jt = Object[pi], _n = Lc.Symbol, Ya = _n && _n[pi], fj = Lc.TypeError, ql = Lc.QObject, ty = Y_.f, Fr = X_.f, ry = J_.f, cj = Q_.f, ny = Y8([].push), $r = Vc("symbols"), qi = Vc("op-symbols"), dj = Vc("wks"), gf = !ql || !ql[pi] || !ql[pi].findChild, mf = ua && X8(function() {
  return di(Fr({}, "a", {
    get: function() {
      return Fr(this, "a", { value: 7 }).a;
    }
  })).a != 7;
}) ? function(e, t, r) {
  var n = ty(Jt, t);
  n && delete Jt[t], Fr(e, t, r), n && e !== Jt && Fr(Jt, t, n);
} : Fr, Ul = function(e, t) {
  var r = $r[e] = di(Ya);
  return uj(r, {
    type: Qs,
    tag: e,
    description: t
  }), ua || (r.description = t), r;
}, Zs = function(t, r, n) {
  t === Jt && Zs(qi, r, n), vf(t);
  var a = zc(r);
  return vf(n), $t($r, a) ? (n.enumerable ? ($t(t, Rt) && t[Rt][a] && (t[Rt][a] = !1), n = di(n, { enumerable: hf(0, !1) })) : ($t(t, Rt) || Fr(t, Rt, hf(1, {})), t[Rt][a] = !0), mf(t, a, n)) : Fr(t, a, n);
}, qc = function(t, r) {
  vf(t);
  var n = Ys(r), a = K_(n).concat(oy(n));
  return Xs(a, function(i) {
    (!ua || Bc(bf, n, i)) && Zs(t, i, n[i]);
  }), t;
}, pj = function(t, r) {
  return r === void 0 ? di(t) : qc(di(t), r);
}, bf = function(t) {
  var r = zc(t), n = Bc(cj, this, r);
  return this === Jt && $t($r, r) && !$t(qi, r) ? !1 : n || !$t(this, r) || !$t($r, r) || $t(this, Rt) && this[Rt][r] ? n : !0;
}, ay = function(t, r) {
  var n = Ys(t), a = zc(r);
  if (!(n === Jt && $t($r, a) && !$t(qi, a))) {
    var i = ty(n, a);
    return i && $t($r, a) && !($t(n, Rt) && n[Rt][a]) && (i.enumerable = !0), i;
  }
}, iy = function(t) {
  var r = ry(Ys(t)), n = [];
  return Xs(r, function(a) {
    !$t($r, a) && !$t(Z_, a) && ny(n, a);
  }), n;
}, oy = function(e) {
  var t = e === Jt, r = ry(t ? qi : Ys(e)), n = [];
  return Xs(r, function(a) {
    $t($r, a) && (!t || $t(Jt, a)) && ny(n, $r[a]);
  }), n;
};
fa || (_n = function() {
  if (Q8(Ya, this))
    throw fj("Symbol is not a constructor");
  var t = !arguments.length || arguments[0] === void 0 ? void 0 : Z8(arguments[0]), r = dv(t), n = function(a) {
    this === Jt && Bc(n, qi, a), $t(this, Rt) && $t(this[Rt], r) && (this[Rt][r] = !1), mf(this, r, hf(1, a));
  };
  return ua && gf && mf(Jt, r, { configurable: !0, set: n }), Ul(r, t);
}, Ya = _n[pi], Vl(Ya, "toString", function() {
  return pv(this).tag;
}), Vl(_n, "withoutSetter", function(e) {
  return Ul(dv(e), e);
}), Q_.f = bf, X_.f = Zs, rj.f = qc, Y_.f = ay, ej.f = J_.f = iy, tj.f = oy, ij.f = function(e) {
  return Ul(aj(e), e);
}, ua && (Fr(Ya, "description", {
  configurable: !0,
  get: function() {
    return pv(this).description;
  }
}), Vl(Jt, "propertyIsEnumerable", bf, { unsafe: !0 })));
Js({ global: !0, constructor: !0, wrap: !0, forced: !fa, sham: !fa }, {
  Symbol: _n
});
Xs(K_(dj), function(e) {
  oj(e);
});
Js({ target: Qs, stat: !0, forced: !fa }, {
  useSetter: function() {
    gf = !0;
  },
  useSimple: function() {
    gf = !1;
  }
});
Js({ target: "Object", stat: !0, forced: !fa, sham: !ua }, {
  // `Object.create` method
  // https://tc39.es/ecma262/#sec-object.create
  create: pj,
  // `Object.defineProperty` method
  // https://tc39.es/ecma262/#sec-object.defineproperty
  defineProperty: Zs,
  // `Object.defineProperties` method
  // https://tc39.es/ecma262/#sec-object.defineproperties
  defineProperties: qc,
  // `Object.getOwnPropertyDescriptor` method
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  getOwnPropertyDescriptor: ay
});
Js({ target: "Object", stat: !0, forced: !fa }, {
  // `Object.getOwnPropertyNames` method
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
  getOwnPropertyNames: iy
});
sj();
lj(_n, Qs);
Z_[Rt] = !0;
var vj = ka, sy = vj && !!Symbol.for && !!Symbol.keyFor, hj = ge, gj = Ut, mj = yt, bj = It, ly = Ur, _j = sy, Hl = ly("string-to-symbol-registry"), yj = ly("symbol-to-string-registry");
hj({ target: "Symbol", stat: !0, forced: !_j }, {
  for: function(e) {
    var t = bj(e);
    if (mj(Hl, t))
      return Hl[t];
    var r = gj("Symbol")(t);
    return Hl[t] = r, yj[r] = t, r;
  }
});
var wj = ge, Sj = yt, Oj = Ri, kj = Ea, Ej = Ur, $j = sy, vv = Ej("symbol-to-string-registry");
wj({ target: "Symbol", stat: !0, forced: !$j }, {
  keyFor: function(t) {
    if (!Oj(t))
      throw TypeError(kj(t) + " is not a symbol");
    if (Sj(vv, t))
      return vv[t];
  }
});
var Tj = Ci, uy = Function.prototype, hv = uy.apply, gv = uy.call, Ui = typeof Reflect == "object" && Reflect.apply || (Tj ? gv.bind(hv) : function() {
  return gv.apply(hv, arguments);
}), Cj = Pe, el = Cj([].slice), Aj = ge, fy = Ut, cy = Ui, Ij = Xe, Hi = Pe, dy = Ie, Pj = Ws, Rj = at, jj = _t, mv = Ri, py = el, Mj = ka, zr = fy("JSON", "stringify"), ho = Hi(/./.exec), bv = Hi("".charAt), Nj = Hi("".charCodeAt), Dj = Hi("".replace), xj = Hi(1 .toString), Fj = /[\uD800-\uDFFF]/g, _v = /^[\uD800-\uDBFF]$/, yv = /^[\uDC00-\uDFFF]$/, wv = !Mj || dy(function() {
  var e = fy("Symbol")();
  return zr([e]) != "[null]" || zr({ a: e }) != "{}" || zr(Object(e)) != "{}";
}), Sv = dy(function() {
  return zr("\uDF06\uD834") !== '"\\udf06\\ud834"' || zr("\uDEAD") !== '"\\udead"';
}), Lj = function(e, t) {
  var r = py(arguments), n = t;
  if (!(!jj(t) && e === void 0 || mv(e)))
    return Pj(t) || (t = function(a, i) {
      if (Rj(n) && (i = Ij(n, this, a, i)), !mv(i))
        return i;
    }), r[1] = t, cy(zr, null, r);
}, Bj = function(e, t, r) {
  var n = bv(r, t - 1), a = bv(r, t + 1);
  return ho(_v, e) && !ho(yv, a) || ho(yv, e) && !ho(_v, n) ? "\\u" + xj(Nj(e, 0), 16) : e;
};
zr && Aj({ target: "JSON", stat: !0, arity: 3, forced: wv || Sv }, {
  // eslint-disable-next-line no-unused-vars -- required for `.length`
  stringify: function(t, r, n) {
    var a = py(arguments), i = cy(wv ? Lj : zr, null, a);
    return Sv && typeof i == "string" ? Dj(i, Fj, Bj) : i;
  }
});
var zj = ge, Vj = ka, qj = Ie, vy = Di, Uj = Ht, Hj = !Vj || qj(function() {
  vy.f(1);
});
zj({ target: "Object", stat: !0, forced: Hj }, {
  getOwnPropertySymbols: function(t) {
    var r = vy.f;
    return r ? r(Uj(t)) : [];
  }
});
var Gj = ge, Wj = bt, Kj = nt, go = Pe, Jj = yt, Yj = at, Xj = Kr, Qj = It, Zj = Tt.f, e7 = R_, kr = Kj.Symbol, an = kr && kr.prototype;
if (Wj && Yj(kr) && (!("description" in an) || // Safari 12 bug
kr().description !== void 0)) {
  var Ov = {}, mo = function() {
    var t = arguments.length < 1 || arguments[0] === void 0 ? void 0 : Qj(arguments[0]), r = Xj(an, this) ? new kr(t) : t === void 0 ? kr() : kr(t);
    return t === "" && (Ov[r] = !0), r;
  };
  e7(mo, kr), mo.prototype = an, an.constructor = mo;
  var t7 = String(kr("test")) == "Symbol(test)", r7 = go(an.valueOf), n7 = go(an.toString), a7 = /^Symbol\((.*)\)[^)]+$/, i7 = go("".replace), o7 = go("".slice);
  Zj(an, "description", {
    configurable: !0,
    get: function() {
      var t = r7(this);
      if (Jj(Ov, t))
        return "";
      var r = n7(t), n = t7 ? o7(r, 7, -1) : i7(r, a7, "$1");
      return n === "" ? void 0 : n;
    }
  }), Gj({ global: !0, constructor: !0, forced: !0 }, {
    Symbol: mo
  });
}
var s7 = V_;
s7("iterator");
var l7 = TypeError, u7 = 9007199254740991, f7 = function(e) {
  if (e > u7)
    throw l7("Maximum allowed index exceeded");
  return e;
}, c7 = Ie, d7 = it, p7 = An, v7 = d7("species"), tl = function(e) {
  return p7 >= 51 || !c7(function() {
    var t = [], r = t.constructor = {};
    return r[v7] = function() {
      return { foo: 1 };
    }, t[e](Boolean).foo !== 1;
  });
}, h7 = ge, g7 = Ie, m7 = Ws, b7 = _t, _7 = Ht, y7 = Pr, kv = f7, Ev = zi, w7 = W_, S7 = tl, O7 = it, k7 = An, hy = O7("isConcatSpreadable"), E7 = k7 >= 51 || !g7(function() {
  var e = [];
  return e[hy] = !1, e.concat()[0] !== e;
}), $7 = S7("concat"), T7 = function(e) {
  if (!b7(e))
    return !1;
  var t = e[hy];
  return t !== void 0 ? !!t : m7(e);
}, C7 = !E7 || !$7;
h7({ target: "Array", proto: !0, arity: 1, forced: C7 }, {
  // eslint-disable-next-line no-unused-vars -- required for `.length`
  concat: function(t) {
    var r = _7(this), n = w7(r, 0), a = 0, i, o, s, l, u;
    for (i = -1, s = arguments.length; i < s; i++)
      if (u = i === -1 ? r : arguments[i], T7(u))
        for (l = y7(u), kv(a + l), o = 0; o < l; o++, a++)
          o in u && Ev(n, a, u[o]);
      else
        kv(a + 1), Ev(n, a++, u);
    return n.length = a, n;
  }
});
var A7 = ge, I7 = Aa.filter, P7 = tl, R7 = P7("filter");
A7({ target: "Array", proto: !0, forced: !R7 }, {
  filter: function(t) {
    return I7(this, t, arguments.length > 1 ? arguments[1] : void 0);
  }
});
var j7 = Ie, Ia = function(e, t) {
  var r = [][e];
  return !!r && j7(function() {
    r.call(null, t || function() {
      return 1;
    }, 1);
  });
}, M7 = Aa.forEach, N7 = Ia, D7 = N7("forEach"), gy = D7 ? [].forEach : function(t) {
  return M7(this, t, arguments.length > 1 ? arguments[1] : void 0);
}, x7 = ge, $v = gy;
x7({ target: "Array", proto: !0, forced: [].forEach != $v }, {
  forEach: $v
});
var F7 = Xe, Tv = Ot, L7 = $a, my = function(e, t, r) {
  var n, a;
  Tv(e);
  try {
    if (n = L7(e, "return"), !n) {
      if (t === "throw")
        throw r;
      return r;
    }
    n = F7(n, e);
  } catch (i) {
    a = !0, n = i;
  }
  if (t === "throw")
    throw r;
  if (a)
    throw n;
  return Tv(n), r;
}, B7 = Ot, z7 = my, V7 = function(e, t, r, n) {
  try {
    return n ? t(B7(r)[0], r[1]) : t(r);
  } catch (a) {
    z7(e, "throw", a);
  }
}, Pa = {}, q7 = it, U7 = Pa, H7 = q7("iterator"), G7 = Array.prototype, by = function(e) {
  return e !== void 0 && (U7.Array === e || G7[H7] === e);
}, W7 = Li, Cv = $a, K7 = Sr, J7 = Pa, Y7 = it, X7 = Y7("iterator"), Uc = function(e) {
  if (!K7(e))
    return Cv(e, X7) || Cv(e, "@@iterator") || J7[W7(e)];
}, Q7 = Xe, Z7 = Dt, eM = Ot, tM = Ea, rM = Uc, nM = TypeError, _y = function(e, t) {
  var r = arguments.length < 2 ? rM(e) : t;
  if (Z7(r))
    return eM(Q7(r, e));
  throw nM(tM(e) + " is not iterable");
}, aM = Ct, iM = Xe, oM = Ht, sM = V7, lM = by, uM = Ks, fM = Pr, Av = zi, cM = _y, dM = Uc, Iv = Array, pM = function(t) {
  var r = oM(t), n = uM(this), a = arguments.length, i = a > 1 ? arguments[1] : void 0, o = i !== void 0;
  o && (i = aM(i, a > 2 ? arguments[2] : void 0));
  var s = dM(r), l = 0, u, f, d, h, v, m;
  if (s && !(this === Iv && lM(s)))
    for (h = cM(r, s), v = h.next, f = n ? new this() : []; !(d = iM(v, h)).done; l++)
      m = o ? sM(h, i, [d.value, l], !0) : d.value, Av(f, l, m);
  else
    for (u = fM(r), f = n ? new this(u) : Iv(u); u > l; l++)
      m = o ? i(r[l], l) : r[l], Av(f, l, m);
  return f.length = l, f;
}, vM = it, yy = vM("iterator"), wy = !1;
try {
  var hM = 0, Pv = {
    next: function() {
      return { done: !!hM++ };
    },
    return: function() {
      wy = !0;
    }
  };
  Pv[yy] = function() {
    return this;
  }, Array.from(Pv, function() {
    throw 2;
  });
} catch {
}
var Hc = function(e, t) {
  if (!t && !wy)
    return !1;
  var r = !1;
  try {
    var n = {};
    n[yy] = function() {
      return {
        next: function() {
          return { done: r = !0 };
        }
      };
    }, e(n);
  } catch {
  }
  return r;
}, gM = ge, mM = pM, bM = Hc, _M = !bM(function(e) {
  Array.from(e);
});
gM({ target: "Array", stat: !0, forced: _M }, {
  from: mM
});
var yM = it, wM = Ca, SM = Tt.f, _f = yM("unscopables"), yf = Array.prototype;
yf[_f] == null && SM(yf, _f, {
  configurable: !0,
  value: wM(null)
});
var rl = function(e) {
  yf[_f][e] = !0;
}, OM = ge, kM = Ic.includes, EM = Ie, $M = rl, TM = EM(function() {
  return !Array(1).includes();
});
OM({ target: "Array", proto: !0, forced: TM }, {
  includes: function(t) {
    return kM(this, t, arguments.length > 1 ? arguments[1] : void 0);
  }
});
$M("includes");
var CM = Ie, Sy = !CM(function() {
  function e() {
  }
  return e.prototype.constructor = null, Object.getPrototypeOf(new e()) !== e.prototype;
}), AM = yt, IM = at, PM = Ht, RM = Hs, jM = Sy, Rv = RM("IE_PROTO"), wf = Object, MM = wf.prototype, Gc = jM ? wf.getPrototypeOf : function(e) {
  var t = PM(e);
  if (AM(t, Rv))
    return t[Rv];
  var r = t.constructor;
  return IM(r) && t instanceof r ? r.prototype : t instanceof wf ? MM : null;
}, NM = Ie, DM = at, xM = _t, jv = Gc, FM = xt, LM = it, Sf = LM("iterator"), Oy = !1, kn, Gl, Wl;
[].keys && (Wl = [].keys(), "next" in Wl ? (Gl = jv(jv(Wl)), Gl !== Object.prototype && (kn = Gl)) : Oy = !0);
var BM = !xM(kn) || NM(function() {
  var e = {};
  return kn[Sf].call(e) !== e;
});
BM && (kn = {});
DM(kn[Sf]) || FM(kn, Sf, function() {
  return this;
});
var ky = {
  IteratorPrototype: kn,
  BUGGY_SAFARI_ITERATORS: Oy
}, zM = ky.IteratorPrototype, VM = Ca, qM = Ii, UM = Vi, HM = Pa, GM = function() {
  return this;
}, WM = function(e, t, r, n) {
  var a = t + " Iterator";
  return e.prototype = VM(zM, { next: qM(+!n, r) }), UM(e, a, !1), HM[a] = GM, e;
}, KM = at, JM = String, YM = TypeError, XM = function(e) {
  if (typeof e == "object" || KM(e))
    return e;
  throw YM("Can't set " + JM(e) + " as a prototype");
}, QM = Pe, ZM = Ot, e6 = XM, nl = Object.setPrototypeOf || ("__proto__" in {} ? function() {
  var e = !1, t = {}, r;
  try {
    r = QM(Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set), r(t, []), e = t instanceof Array;
  } catch {
  }
  return function(a, i) {
    return ZM(a), e6(i), e ? r(a, i) : a.__proto__ = i, a;
  };
}() : void 0), t6 = ge, r6 = Xe, Ey = ji, n6 = at, a6 = WM, Mv = Gc, Nv = nl, i6 = Vi, o6 = In, Kl = xt, s6 = it, l6 = Pa, $y = ky, u6 = Ey.PROPER, f6 = Ey.CONFIGURABLE, Dv = $y.IteratorPrototype, bo = $y.BUGGY_SAFARI_ITERATORS, La = s6("iterator"), xv = "keys", Ba = "values", Fv = "entries", c6 = function() {
  return this;
}, Wc = function(e, t, r, n, a, i, o) {
  a6(r, t, n);
  var s = function(b) {
    if (b === a && h)
      return h;
    if (!bo && b in f)
      return f[b];
    switch (b) {
      case xv:
        return function() {
          return new r(this, b);
        };
      case Ba:
        return function() {
          return new r(this, b);
        };
      case Fv:
        return function() {
          return new r(this, b);
        };
    }
    return function() {
      return new r(this);
    };
  }, l = t + " Iterator", u = !1, f = e.prototype, d = f[La] || f["@@iterator"] || a && f[a], h = !bo && d || s(a), v = t == "Array" && f.entries || d, m, g, _;
  if (v && (m = Mv(v.call(new e())), m !== Object.prototype && m.next && (Mv(m) !== Dv && (Nv ? Nv(m, Dv) : n6(m[La]) || Kl(m, La, c6)), i6(m, l, !0))), u6 && a == Ba && d && d.name !== Ba && (f6 ? o6(f, "name", Ba) : (u = !0, h = function() {
    return r6(d, this);
  })), a)
    if (g = {
      values: s(Ba),
      keys: i ? h : s(xv),
      entries: s(Fv)
    }, o)
      for (_ in g)
        (bo || u || !(_ in f)) && Kl(f, _, g[_]);
    else
      t6({ target: t, proto: !0, forced: bo || u }, g);
  return f[La] !== h && Kl(f, La, h, { name: a }), l6[t] = h, g;
}, Kc = function(e, t) {
  return { value: e, done: t };
}, d6 = er, Jc = rl, Lv = Pa, Ty = Jr, p6 = Tt.f, v6 = Wc, _o = Kc, h6 = bt, Cy = "Array Iterator", g6 = Ty.set, m6 = Ty.getterFor(Cy), b6 = v6(Array, "Array", function(e, t) {
  g6(this, {
    type: Cy,
    target: d6(e),
    // target
    index: 0,
    // next index
    kind: t
    // kind
  });
}, function() {
  var e = m6(this), t = e.target, r = e.kind, n = e.index++;
  return !t || n >= t.length ? (e.target = void 0, _o(void 0, !0)) : r == "keys" ? _o(n, !1) : r == "values" ? _o(t[n], !1) : _o([n, t[n]], !1);
}, "values"), Bv = Lv.Arguments = Lv.Array;
Jc("keys");
Jc("values");
Jc("entries");
if (h6 && Bv.name !== "values")
  try {
    p6(Bv, "name", { value: "values" });
  } catch {
  }
var _6 = ge, y6 = Pe, w6 = Pi, S6 = er, O6 = Ia, k6 = y6([].join), E6 = w6 != Object, $6 = O6("join", ",");
_6({ target: "Array", proto: !0, forced: E6 || !$6 }, {
  join: function(t) {
    return k6(S6(this), t === void 0 ? "," : t);
  }
});
var T6 = ge, C6 = Aa.map, A6 = tl, I6 = A6("map");
T6({ target: "Array", proto: !0, forced: !I6 }, {
  map: function(t) {
    return C6(this, t, arguments.length > 1 ? arguments[1] : void 0);
  }
});
var P6 = Dt, R6 = Ht, j6 = Pi, M6 = Pr, N6 = TypeError, zv = function(e) {
  return function(t, r, n, a) {
    P6(r);
    var i = R6(t), o = j6(i), s = M6(i), l = e ? s - 1 : 0, u = e ? -1 : 1;
    if (n < 2)
      for (; ; ) {
        if (l in o) {
          a = o[l], l += u;
          break;
        }
        if (l += u, e ? l < 0 : s <= l)
          throw N6("Reduce of empty array with no initial value");
      }
    for (; e ? l >= 0 : s > l; l += u)
      l in o && (a = r(a, o[l], l, i));
    return a;
  };
}, Ay = {
  // `Array.prototype.reduce` method
  // https://tc39.es/ecma262/#sec-array.prototype.reduce
  left: zv(!1),
  // `Array.prototype.reduceRight` method
  // https://tc39.es/ecma262/#sec-array.prototype.reduceright
  right: zv(!0)
}, D6 = Ir, x6 = nt, Ra = D6(x6.process) == "process", F6 = ge, L6 = Ay.left, B6 = Ia, Vv = An, z6 = Ra, V6 = B6("reduce"), q6 = !z6 && Vv > 79 && Vv < 83;
F6({ target: "Array", proto: !0, forced: !V6 || q6 }, {
  reduce: function(t) {
    var r = arguments.length;
    return L6(this, t, r, r > 1 ? arguments[1] : void 0);
  }
});
var U6 = ge, H6 = Ay.right, G6 = Ia, qv = An, W6 = Ra, K6 = G6("reduceRight"), J6 = !W6 && qv > 79 && qv < 83;
U6({ target: "Array", proto: !0, forced: !K6 || J6 }, {
  reduceRight: function(t) {
    return H6(this, t, arguments.length, arguments.length > 1 ? arguments[1] : void 0);
  }
});
var Y6 = ge, Uv = Ws, X6 = Ks, Q6 = _t, Hv = Ac, Z6 = Pr, eN = er, tN = zi, rN = it, nN = tl, aN = el, iN = nN("slice"), oN = rN("species"), Jl = Array, sN = Math.max;
Y6({ target: "Array", proto: !0, forced: !iN }, {
  slice: function(t, r) {
    var n = eN(this), a = Z6(n), i = Hv(t, a), o = Hv(r === void 0 ? a : r, a), s, l, u;
    if (Uv(n) && (s = n.constructor, X6(s) && (s === Jl || Uv(s.prototype)) ? s = void 0 : Q6(s) && (s = s[oN], s === null && (s = void 0)), s === Jl || s === void 0))
      return aN(n, i, o);
    for (l = new (s === void 0 ? Jl : s)(sN(o - i, 0)), u = 0; i < o; i++, u++)
      i in n && tN(l, u, n[i]);
    return l.length = u, l;
  }
});
var Gv = Ea, lN = TypeError, uN = function(e, t) {
  if (!delete e[t])
    throw lN("Cannot delete property " + Gv(t) + " of " + Gv(e));
}, Wv = Nc, fN = Math.floor, Of = function(e, t) {
  var r = e.length, n = fN(r / 2);
  return r < 8 ? cN(e, t) : dN(
    e,
    Of(Wv(e, 0, n), t),
    Of(Wv(e, n), t),
    t
  );
}, cN = function(e, t) {
  for (var r = e.length, n = 1, a, i; n < r; ) {
    for (i = n, a = e[n]; i && t(e[i - 1], a) > 0; )
      e[i] = e[--i];
    i !== n++ && (e[i] = a);
  }
  return e;
}, dN = function(e, t, r, n) {
  for (var a = t.length, i = r.length, o = 0, s = 0; o < a || s < i; )
    e[o + s] = o < a && s < i ? n(t[o], r[s]) <= 0 ? t[o++] : r[s++] : o < a ? t[o++] : r[s++];
  return e;
}, pN = Of, vN = Cn, Kv = vN.match(/firefox\/(\d+)/i), hN = !!Kv && +Kv[1], gN = Cn, mN = /MSIE|Trident/.test(gN), bN = Cn, Jv = bN.match(/AppleWebKit\/(\d+)\./), _N = !!Jv && +Jv[1], yN = ge, Iy = Pe, wN = Dt, SN = Ht, Yv = Pr, ON = uN, Xv = It, Yc = Ie, kN = pN, EN = Ia, Qv = hN, $N = mN, Zv = An, eh = _N, Br = [], th = Iy(Br.sort), TN = Iy(Br.push), CN = Yc(function() {
  Br.sort(void 0);
}), AN = Yc(function() {
  Br.sort(null);
}), IN = EN("sort"), Py = !Yc(function() {
  if (Zv)
    return Zv < 70;
  if (!(Qv && Qv > 3)) {
    if ($N)
      return !0;
    if (eh)
      return eh < 603;
    var e = "", t, r, n, a;
    for (t = 65; t < 76; t++) {
      switch (r = String.fromCharCode(t), t) {
        case 66:
        case 69:
        case 70:
        case 72:
          n = 3;
          break;
        case 68:
        case 71:
          n = 4;
          break;
        default:
          n = 2;
      }
      for (a = 0; a < 47; a++)
        Br.push({ k: r + a, v: n });
    }
    for (Br.sort(function(i, o) {
      return o.v - i.v;
    }), a = 0; a < Br.length; a++)
      r = Br[a].k.charAt(0), e.charAt(e.length - 1) !== r && (e += r);
    return e !== "DGBEFHACIJK";
  }
}), PN = CN || !AN || !IN || !Py, RN = function(e) {
  return function(t, r) {
    return r === void 0 ? -1 : t === void 0 ? 1 : e !== void 0 ? +e(t, r) || 0 : Xv(t) > Xv(r) ? 1 : -1;
  };
};
yN({ target: "Array", proto: !0, forced: PN }, {
  sort: function(t) {
    t !== void 0 && wN(t);
    var r = SN(this);
    if (Py)
      return t === void 0 ? th(r) : th(r, t);
    var n = [], a = Yv(r), i, o;
    for (o = 0; o < a; o++)
      o in r && TN(n, r[o]);
    for (kN(n, RN(t)), i = Yv(n), o = 0; o < i; )
      r[o] = n[o++];
    for (; o < a; )
      ON(r, o++);
    return r;
  }
});
var jN = ge, MN = Ie, NN = Ht, DN = $c, xN = MN(function() {
  return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({ toISOString: function() {
    return 1;
  } }) !== 1;
});
jN({ target: "Date", proto: !0, arity: 1, forced: xN }, {
  // eslint-disable-next-line no-unused-vars -- required for `.length`
  toJSON: function(t) {
    var r = NN(this), n = DN(r, "number");
    return typeof n == "number" && !isFinite(n) ? null : r.toISOString();
  }
});
var Ry = Pe, FN = xt, Xc = Date.prototype, rh = "Invalid Date", jy = "toString", LN = Ry(Xc[jy]), BN = Ry(Xc.getTime);
String(new Date(NaN)) != rh && FN(Xc, jy, function() {
  var t = BN(this);
  return t === t ? LN(this) : rh;
});
var zN = bt, VN = ji.EXISTS, My = Pe, qN = Tt.f, Ny = Function.prototype, UN = My(Ny.toString), Dy = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/, HN = My(Dy.exec), GN = "name";
zN && !VN && qN(Ny, GN, {
  configurable: !0,
  get: function() {
    try {
      return HN(Dy, UN(this))[1];
    } catch {
      return "";
    }
  }
});
var nh = bt, WN = Pe, KN = Xe, JN = Ie, Yl = Bi, YN = Di, XN = Ai, QN = Ht, ZN = Pi, xn = Object.assign, ah = Object.defineProperty, eD = WN([].concat), tD = !xn || JN(function() {
  if (nh && xn({ b: 1 }, xn(ah({}, "a", {
    enumerable: !0,
    get: function() {
      ah(this, "b", {
        value: 3,
        enumerable: !1
      });
    }
  }), { b: 2 })).b !== 1)
    return !0;
  var e = {}, t = {}, r = Symbol(), n = "abcdefghijklmnopqrst";
  return e[r] = 7, n.split("").forEach(function(a) {
    t[a] = a;
  }), xn({}, e)[r] != 7 || Yl(xn({}, t)).join("") != n;
}) ? function(t, r) {
  for (var n = QN(t), a = arguments.length, i = 1, o = YN.f, s = XN.f; a > i; )
    for (var l = ZN(arguments[i++]), u = o ? eD(Yl(l), o(l)) : Yl(l), f = u.length, d = 0, h; f > d; )
      h = u[d++], (!nh || KN(s, l, h)) && (n[h] = l[h]);
  return n;
} : xn, rD = ge, ih = tD;
rD({ target: "Object", stat: !0, arity: 2, forced: Object.assign !== ih }, {
  assign: ih
});
var nD = bt, xy = Pe, aD = Bi, iD = er, oD = Ai.f, sD = xy(oD), lD = xy([].push), oh = function(e) {
  return function(t) {
    for (var r = iD(t), n = aD(r), a = n.length, i = 0, o = [], s; a > i; )
      s = n[i++], (!nD || sD(r, s)) && lD(o, e ? [s, r[s]] : r[s]);
    return o;
  };
}, Fy = {
  // `Object.entries` method
  // https://tc39.es/ecma262/#sec-object.entries
  entries: oh(!0),
  // `Object.values` method
  // https://tc39.es/ecma262/#sec-object.values
  values: oh(!1)
}, uD = ge, fD = Fy.entries;
uD({ target: "Object", stat: !0 }, {
  entries: function(t) {
    return fD(t);
  }
});
var cD = Object.is || function(t, r) {
  return t === r ? t !== 0 || 1 / t === 1 / r : t != t && r != r;
}, dD = ge, pD = cD;
dD({ target: "Object", stat: !0 }, {
  is: pD
});
var vD = ge, hD = Ht, Ly = Bi, gD = Ie, mD = gD(function() {
  Ly(1);
});
vD({ target: "Object", stat: !0, forced: mD }, {
  keys: function(t) {
    return Ly(hD(t));
  }
});
var bD = Rc, _D = Li, yD = bD ? {}.toString : function() {
  return "[object " + _D(this) + "]";
}, wD = Rc, SD = xt, OD = yD;
wD || SD(Object.prototype, "toString", OD, { unsafe: !0 });
var kD = ge, ED = Fy.values;
kD({ target: "Object", stat: !0 }, {
  values: function(t) {
    return ED(t);
  }
});
var $D = Ot, By = function() {
  var e = $D(this), t = "";
  return e.hasIndices && (t += "d"), e.global && (t += "g"), e.ignoreCase && (t += "i"), e.multiline && (t += "m"), e.dotAll && (t += "s"), e.unicode && (t += "u"), e.unicodeSets && (t += "v"), e.sticky && (t += "y"), t;
}, Qc = Ie, TD = nt, Zc = TD.RegExp, ed = Qc(function() {
  var e = Zc("a", "y");
  return e.lastIndex = 2, e.exec("abcd") != null;
}), CD = ed || Qc(function() {
  return !Zc("a", "y").sticky;
}), AD = ed || Qc(function() {
  var e = Zc("^r", "gy");
  return e.lastIndex = 2, e.exec("str") != null;
}), td = {
  BROKEN_CARET: AD,
  MISSED_STICKY: CD,
  UNSUPPORTED_Y: ed
}, ID = Ie, PD = nt, RD = PD.RegExp, zy = ID(function() {
  var e = RD(".", "s");
  return !(e.dotAll && e.exec(`
`) && e.flags === "s");
}), jD = Ie, MD = nt, ND = MD.RegExp, Vy = jD(function() {
  var e = ND("(?<a>b)", "g");
  return e.exec("b").groups.a !== "b" || "b".replace(e, "$<a>c") !== "bc";
}), Qn = Xe, al = Pe, DD = It, xD = By, FD = td, LD = Ur, BD = Ca, zD = Jr.get, VD = zy, qD = Vy, UD = LD("native-string-replace", String.prototype.replace), ps = RegExp.prototype.exec, kf = ps, HD = al("".charAt), GD = al("".indexOf), WD = al("".replace), Xl = al("".slice), Ef = function() {
  var e = /a/, t = /b*/g;
  return Qn(ps, e, "a"), Qn(ps, t, "a"), e.lastIndex !== 0 || t.lastIndex !== 0;
}(), qy = FD.BROKEN_CARET, $f = /()??/.exec("")[1] !== void 0, KD = Ef || $f || qy || VD || qD;
KD && (kf = function(t) {
  var r = this, n = zD(r), a = DD(t), i = n.raw, o, s, l, u, f, d, h;
  if (i)
    return i.lastIndex = r.lastIndex, o = Qn(kf, i, a), r.lastIndex = i.lastIndex, o;
  var v = n.groups, m = qy && r.sticky, g = Qn(xD, r), _ = r.source, b = 0, S = a;
  if (m && (g = WD(g, "y", ""), GD(g, "g") === -1 && (g += "g"), S = Xl(a, r.lastIndex), r.lastIndex > 0 && (!r.multiline || r.multiline && HD(a, r.lastIndex - 1) !== `
`) && (_ = "(?: " + _ + ")", S = " " + S, b++), s = new RegExp("^(?:" + _ + ")", g)), $f && (s = new RegExp("^" + _ + "$(?!\\s)", g)), Ef && (l = r.lastIndex), u = Qn(ps, m ? s : r, S), m ? u ? (u.input = Xl(u.input, b), u[0] = Xl(u[0], b), u.index = r.lastIndex, r.lastIndex += u[0].length) : r.lastIndex = 0 : Ef && u && (r.lastIndex = r.global ? u.index + u[0].length : l), $f && u && u.length > 1 && Qn(UD, u[0], s, function() {
    for (f = 1; f < arguments.length - 2; f++)
      arguments[f] === void 0 && (u[f] = void 0);
  }), u && v)
    for (u.groups = d = BD(null), f = 0; f < v.length; f++)
      h = v[f], d[h[0]] = u[h[1]];
  return u;
});
var il = kf, JD = ge, sh = il;
JD({ target: "RegExp", proto: !0, forced: /./.exec !== sh }, {
  exec: sh
});
var YD = Xe, XD = yt, QD = Kr, ZD = By, lh = RegExp.prototype, Uy = function(e) {
  var t = e.flags;
  return t === void 0 && !("flags" in lh) && !XD(e, "flags") && QD(lh, e) ? YD(ZD, e) : t;
}, ex = ji.PROPER, tx = xt, rx = Ot, uh = It, nx = Ie, ax = Uy, rd = "toString", ix = RegExp.prototype, Hy = ix[rd], ox = nx(function() {
  return Hy.call({ source: "a", flags: "b" }) != "/a/b";
}), sx = ex && Hy.name != rd;
(ox || sx) && tx(RegExp.prototype, rd, function() {
  var t = rx(this), r = uh(t.source), n = uh(ax(t));
  return "/" + r + "/" + n;
}, { unsafe: !0 });
var vi = {}, lx = {
  get exports() {
    return vi;
  },
  set exports(e) {
    vi = e;
  }
}, ux = Ie, fx = ux(function() {
  if (typeof ArrayBuffer == "function") {
    var e = new ArrayBuffer(8);
    Object.isExtensible(e) && Object.defineProperty(e, "a", { value: 8 });
  }
}), cx = Ie, dx = _t, px = Ir, fh = fx, Yo = Object.isExtensible, vx = cx(function() {
  Yo(1);
}), hx = vx || fh ? function(t) {
  return !dx(t) || fh && px(t) == "ArrayBuffer" ? !1 : Yo ? Yo(t) : !0;
} : Yo, gx = Ie, Gy = !gx(function() {
  return Object.isExtensible(Object.preventExtensions({}));
}), mx = ge, bx = Pe, _x = Mi, yx = _t, nd = yt, wx = Tt.f, ch = Pn, Sx = Mc, ad = hx, Ox = Vs, kx = Gy, Wy = !1, Tr = Ox("meta"), Ex = 0, id = function(e) {
  wx(e, Tr, { value: {
    objectID: "O" + Ex++,
    // object ID
    weakData: {}
    // weak collections IDs
  } });
}, $x = function(e, t) {
  if (!yx(e))
    return typeof e == "symbol" ? e : (typeof e == "string" ? "S" : "P") + e;
  if (!nd(e, Tr)) {
    if (!ad(e))
      return "F";
    if (!t)
      return "E";
    id(e);
  }
  return e[Tr].objectID;
}, Tx = function(e, t) {
  if (!nd(e, Tr)) {
    if (!ad(e))
      return !0;
    if (!t)
      return !1;
    id(e);
  }
  return e[Tr].weakData;
}, Cx = function(e) {
  return kx && Wy && ad(e) && !nd(e, Tr) && id(e), e;
}, Ax = function() {
  Ix.enable = function() {
  }, Wy = !0;
  var e = ch.f, t = bx([].splice), r = {};
  r[Tr] = 1, e(r).length && (ch.f = function(n) {
    for (var a = e(n), i = 0, o = a.length; i < o; i++)
      if (a[i] === Tr) {
        t(a, i, 1);
        break;
      }
    return a;
  }, mx({ target: "Object", stat: !0, forced: !0 }, {
    getOwnPropertyNames: Sx.f
  }));
}, Ix = lx.exports = {
  enable: Ax,
  fastKey: $x,
  getWeakData: Tx,
  onFreeze: Cx
};
_x[Tr] = !0;
var Px = Ct, Rx = Xe, jx = Ot, Mx = Ea, Nx = by, Dx = Pr, dh = Kr, xx = _y, Fx = Uc, ph = my, Lx = TypeError, Xo = function(e, t) {
  this.stopped = e, this.result = t;
}, vh = Xo.prototype, Gi = function(e, t, r) {
  var n = r && r.that, a = !!(r && r.AS_ENTRIES), i = !!(r && r.IS_RECORD), o = !!(r && r.IS_ITERATOR), s = !!(r && r.INTERRUPTED), l = Px(t, n), u, f, d, h, v, m, g, _ = function(S) {
    return u && ph(u, "normal", S), new Xo(!0, S);
  }, b = function(S) {
    return a ? (jx(S), s ? l(S[0], S[1], _) : l(S[0], S[1])) : s ? l(S, _) : l(S);
  };
  if (i)
    u = e.iterator;
  else if (o)
    u = e;
  else {
    if (f = Fx(e), !f)
      throw Lx(Mx(e) + " is not iterable");
    if (Nx(f)) {
      for (d = 0, h = Dx(e); h > d; d++)
        if (v = b(e[d]), v && dh(vh, v))
          return v;
      return new Xo(!1);
    }
    u = xx(e, f);
  }
  for (m = i ? e.next : u.next; !(g = Rx(m, u)).done; ) {
    try {
      v = b(g.value);
    } catch (S) {
      ph(u, "throw", S);
    }
    if (typeof v == "object" && v && dh(vh, v))
      return v;
  }
  return new Xo(!1);
}, Bx = Kr, zx = TypeError, od = function(e, t) {
  if (Bx(t, e))
    return e;
  throw zx("Incorrect invocation");
}, Vx = at, qx = _t, hh = nl, sd = function(e, t, r) {
  var n, a;
  return (
    // it can work only with native `setPrototypeOf`
    hh && // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
    Vx(n = t.constructor) && n !== r && qx(a = n.prototype) && a !== r.prototype && hh(e, a), e
  );
}, Ux = ge, Hx = nt, Gx = Pe, gh = Fi, Wx = xt, Kx = vi, Jx = Gi, Yx = od, Xx = at, Qx = Sr, Ql = _t, Zl = Ie, Zx = Hc, eF = Vi, tF = sd, Ky = function(e, t, r) {
  var n = e.indexOf("Map") !== -1, a = e.indexOf("Weak") !== -1, i = n ? "set" : "add", o = Hx[e], s = o && o.prototype, l = o, u = {}, f = function(b) {
    var S = Gx(s[b]);
    Wx(
      s,
      b,
      b == "add" ? function(w) {
        return S(this, w === 0 ? 0 : w), this;
      } : b == "delete" ? function(k) {
        return a && !Ql(k) ? !1 : S(this, k === 0 ? 0 : k);
      } : b == "get" ? function(w) {
        return a && !Ql(w) ? void 0 : S(this, w === 0 ? 0 : w);
      } : b == "has" ? function(w) {
        return a && !Ql(w) ? !1 : S(this, w === 0 ? 0 : w);
      } : function(w, C) {
        return S(this, w === 0 ? 0 : w, C), this;
      }
    );
  }, d = gh(
    e,
    !Xx(o) || !(a || s.forEach && !Zl(function() {
      new o().entries().next();
    }))
  );
  if (d)
    l = r.getConstructor(t, e, n, i), Kx.enable();
  else if (gh(e, !0)) {
    var h = new l(), v = h[i](a ? {} : -0, 1) != h, m = Zl(function() {
      h.has(1);
    }), g = Zx(function(b) {
      new o(b);
    }), _ = !a && Zl(function() {
      for (var b = new o(), S = 5; S--; )
        b[i](S, S);
      return !b.has(-0);
    });
    g || (l = t(function(b, S) {
      Yx(b, s);
      var k = tF(new o(), b, l);
      return Qx(S) || Jx(S, k[i], { that: k, AS_ENTRIES: n }), k;
    }), l.prototype = s, s.constructor = l), (m || _) && (f("delete"), f("has"), n && f("get")), (_ || v) && f(i), a && s.clear && delete s.clear;
  }
  return u[e] = l, Ux({ global: !0, constructor: !0, forced: l != o }, u), eF(l, e), a || r.setStrong(l, e, n), l;
}, rF = xt, nF = function(e, t, r) {
  for (var n in t)
    rF(e, n, t[n], r);
  return e;
}, aF = Ut, iF = Tt, oF = it, sF = bt, mh = oF("species"), ld = function(e) {
  var t = aF(e), r = iF.f;
  sF && t && !t[mh] && r(t, mh, {
    configurable: !0,
    get: function() {
      return this;
    }
  });
}, lF = Tt.f, uF = Ca, bh = nF, fF = Ct, cF = od, dF = Sr, pF = Gi, vF = Wc, yo = Kc, hF = ld, za = bt, _h = vi.fastKey, Jy = Jr, yh = Jy.set, eu = Jy.getterFor, Yy = {
  getConstructor: function(e, t, r, n) {
    var a = e(function(u, f) {
      cF(u, i), yh(u, {
        type: t,
        index: uF(null),
        first: void 0,
        last: void 0,
        size: 0
      }), za || (u.size = 0), dF(f) || pF(f, u[n], { that: u, AS_ENTRIES: r });
    }), i = a.prototype, o = eu(t), s = function(u, f, d) {
      var h = o(u), v = l(u, f), m, g;
      return v ? v.value = d : (h.last = v = {
        index: g = _h(f, !0),
        key: f,
        value: d,
        previous: m = h.last,
        next: void 0,
        removed: !1
      }, h.first || (h.first = v), m && (m.next = v), za ? h.size++ : u.size++, g !== "F" && (h.index[g] = v)), u;
    }, l = function(u, f) {
      var d = o(u), h = _h(f), v;
      if (h !== "F")
        return d.index[h];
      for (v = d.first; v; v = v.next)
        if (v.key == f)
          return v;
    };
    return bh(i, {
      // `{ Map, Set }.prototype.clear()` methods
      // https://tc39.es/ecma262/#sec-map.prototype.clear
      // https://tc39.es/ecma262/#sec-set.prototype.clear
      clear: function() {
        for (var f = this, d = o(f), h = d.index, v = d.first; v; )
          v.removed = !0, v.previous && (v.previous = v.previous.next = void 0), delete h[v.index], v = v.next;
        d.first = d.last = void 0, za ? d.size = 0 : f.size = 0;
      },
      // `{ Map, Set }.prototype.delete(key)` methods
      // https://tc39.es/ecma262/#sec-map.prototype.delete
      // https://tc39.es/ecma262/#sec-set.prototype.delete
      delete: function(u) {
        var f = this, d = o(f), h = l(f, u);
        if (h) {
          var v = h.next, m = h.previous;
          delete d.index[h.index], h.removed = !0, m && (m.next = v), v && (v.previous = m), d.first == h && (d.first = v), d.last == h && (d.last = m), za ? d.size-- : f.size--;
        }
        return !!h;
      },
      // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods
      // https://tc39.es/ecma262/#sec-map.prototype.foreach
      // https://tc39.es/ecma262/#sec-set.prototype.foreach
      forEach: function(f) {
        for (var d = o(this), h = fF(f, arguments.length > 1 ? arguments[1] : void 0), v; v = v ? v.next : d.first; )
          for (h(v.value, v.key, this); v && v.removed; )
            v = v.previous;
      },
      // `{ Map, Set}.prototype.has(key)` methods
      // https://tc39.es/ecma262/#sec-map.prototype.has
      // https://tc39.es/ecma262/#sec-set.prototype.has
      has: function(f) {
        return !!l(this, f);
      }
    }), bh(i, r ? {
      // `Map.prototype.get(key)` method
      // https://tc39.es/ecma262/#sec-map.prototype.get
      get: function(f) {
        var d = l(this, f);
        return d && d.value;
      },
      // `Map.prototype.set(key, value)` method
      // https://tc39.es/ecma262/#sec-map.prototype.set
      set: function(f, d) {
        return s(this, f === 0 ? 0 : f, d);
      }
    } : {
      // `Set.prototype.add(value)` method
      // https://tc39.es/ecma262/#sec-set.prototype.add
      add: function(f) {
        return s(this, f = f === 0 ? 0 : f, f);
      }
    }), za && lF(i, "size", {
      get: function() {
        return o(this).size;
      }
    }), a;
  },
  setStrong: function(e, t, r) {
    var n = t + " Iterator", a = eu(t), i = eu(n);
    vF(e, t, function(o, s) {
      yh(this, {
        type: n,
        target: o,
        state: a(o),
        kind: s,
        last: void 0
      });
    }, function() {
      for (var o = i(this), s = o.kind, l = o.last; l && l.removed; )
        l = l.previous;
      return !o.target || !(o.last = l = l ? l.next : o.state.first) ? (o.target = void 0, yo(void 0, !0)) : s == "keys" ? yo(l.key, !1) : s == "values" ? yo(l.value, !1) : yo([l.key, l.value], !1);
    }, r ? "entries" : "values", !r, !0), hF(t);
  }
}, gF = Ky, mF = Yy;
gF("Set", function(e) {
  return function() {
    return e(this, arguments.length ? arguments[0] : void 0);
  };
}, mF);
var bF = _t, _F = Ir, yF = it, wF = yF("match"), ud = function(e) {
  var t;
  return bF(e) && ((t = e[wF]) !== void 0 ? !!t : _F(e) == "RegExp");
}, SF = ud, OF = TypeError, kF = function(e) {
  if (SF(e))
    throw OF("The method doesn't accept regular expressions");
  return e;
}, EF = it, $F = EF("match"), TF = function(e) {
  var t = /./;
  try {
    "/./"[e](t);
  } catch {
    try {
      return t[$F] = !1, "/./"[e](t);
    } catch {
    }
  }
  return !1;
}, CF = ge, AF = Pe, IF = kF, PF = Wr, wh = It, RF = TF, jF = AF("".indexOf);
CF({ target: "String", proto: !0, forced: !RF("includes") }, {
  includes: function(t) {
    return !!~jF(
      wh(PF(this)),
      wh(IF(t)),
      arguments.length > 1 ? arguments[1] : void 0
    );
  }
});
var fd = Pe, MF = Ni, NF = It, DF = Wr, xF = fd("".charAt), Sh = fd("".charCodeAt), FF = fd("".slice), Oh = function(e) {
  return function(t, r) {
    var n = NF(DF(t)), a = MF(r), i = n.length, o, s;
    return a < 0 || a >= i ? e ? "" : void 0 : (o = Sh(n, a), o < 55296 || o > 56319 || a + 1 === i || (s = Sh(n, a + 1)) < 56320 || s > 57343 ? e ? xF(n, a) : o : e ? FF(n, a, a + 2) : (o - 55296 << 10) + (s - 56320) + 65536);
  };
}, Xy = {
  // `String.prototype.codePointAt` method
  // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  codeAt: Oh(!1),
  // `String.prototype.at` method
  // https://github.com/mathiasbynens/String.prototype.at
  charAt: Oh(!0)
}, LF = Xy.charAt, BF = It, Qy = Jr, zF = Wc, kh = Kc, Zy = "String Iterator", VF = Qy.set, qF = Qy.getterFor(Zy);
zF(String, "String", function(e) {
  VF(this, {
    type: Zy,
    string: BF(e),
    index: 0
  });
}, function() {
  var t = qF(this), r = t.string, n = t.index, a;
  return n >= r.length ? kh(void 0, !0) : (a = LF(r, n), t.index += a.length, kh(a, !1));
});
var Eh = xc, $h = xt, UF = il, Th = Ie, ew = it, HF = In, GF = ew("species"), tu = RegExp.prototype, cd = function(e, t, r, n) {
  var a = ew(e), i = !Th(function() {
    var u = {};
    return u[a] = function() {
      return 7;
    }, ""[e](u) != 7;
  }), o = i && !Th(function() {
    var u = !1, f = /a/;
    return e === "split" && (f = {}, f.constructor = {}, f.constructor[GF] = function() {
      return f;
    }, f.flags = "", f[a] = /./[a]), f.exec = function() {
      return u = !0, null;
    }, f[a](""), !u;
  });
  if (!i || !o || r) {
    var s = Eh(/./[a]), l = t(a, ""[e], function(u, f, d, h, v) {
      var m = Eh(u), g = f.exec;
      return g === UF || g === tu.exec ? i && !v ? { done: !0, value: s(f, d, h) } : { done: !0, value: m(d, f, h) } : { done: !1 };
    });
    $h(String.prototype, e, l[0]), $h(tu, a, l[1]);
  }
  n && HF(tu[a], "sham", !0);
}, WF = Xy.charAt, dd = function(e, t, r) {
  return t + (r ? WF(e, t).length : 1);
}, pd = Pe, KF = Ht, JF = Math.floor, ru = pd("".charAt), YF = pd("".replace), nu = pd("".slice), XF = /\$([$&'`]|\d{1,2}|<[^>]*>)/g, QF = /\$([$&'`]|\d{1,2})/g, ZF = function(e, t, r, n, a, i) {
  var o = r + e.length, s = n.length, l = QF;
  return a !== void 0 && (a = KF(a), l = XF), YF(i, l, function(u, f) {
    var d;
    switch (ru(f, 0)) {
      case "$":
        return "$";
      case "&":
        return e;
      case "`":
        return nu(t, 0, r);
      case "'":
        return nu(t, o);
      case "<":
        d = a[nu(f, 1, -1)];
        break;
      default:
        var h = +f;
        if (h === 0)
          return u;
        if (h > s) {
          var v = JF(h / 10);
          return v === 0 ? u : v <= s ? n[v - 1] === void 0 ? ru(f, 1) : n[v - 1] + ru(f, 1) : u;
        }
        d = n[h - 1];
    }
    return d === void 0 ? "" : d;
  });
}, Ch = Xe, eL = Ot, tL = at, rL = Ir, nL = il, aL = TypeError, vd = function(e, t) {
  var r = e.exec;
  if (tL(r)) {
    var n = Ch(r, e, t);
    return n !== null && eL(n), n;
  }
  if (rL(e) === "RegExp")
    return Ch(nL, e, t);
  throw aL("RegExp#exec called on incompatible receiver");
}, iL = Ui, Ah = Xe, ol = Pe, oL = cd, sL = Ie, lL = Ot, uL = at, fL = Sr, cL = Ni, dL = Gs, Fn = It, pL = Wr, vL = dd, hL = $a, gL = ZF, mL = vd, bL = it, Tf = bL("replace"), _L = Math.max, yL = Math.min, wL = ol([].concat), au = ol([].push), Ih = ol("".indexOf), Ph = ol("".slice), SL = function(e) {
  return e === void 0 ? e : String(e);
}, OL = function() {
  return "a".replace(/./, "$0") === "$0";
}(), Rh = function() {
  return /./[Tf] ? /./[Tf]("a", "$0") === "" : !1;
}(), kL = !sL(function() {
  var e = /./;
  return e.exec = function() {
    var t = [];
    return t.groups = { a: "7" }, t;
  }, "".replace(e, "$<a>") !== "7";
});
oL("replace", function(e, t, r) {
  var n = Rh ? "$" : "$0";
  return [
    // `String.prototype.replace` method
    // https://tc39.es/ecma262/#sec-string.prototype.replace
    function(i, o) {
      var s = pL(this), l = fL(i) ? void 0 : hL(i, Tf);
      return l ? Ah(l, i, s, o) : Ah(t, Fn(s), i, o);
    },
    // `RegExp.prototype[@@replace]` method
    // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
    function(a, i) {
      var o = lL(this), s = Fn(a);
      if (typeof i == "string" && Ih(i, n) === -1 && Ih(i, "$<") === -1) {
        var l = r(t, o, s, i);
        if (l.done)
          return l.value;
      }
      var u = uL(i);
      u || (i = Fn(i));
      var f = o.global;
      if (f) {
        var d = o.unicode;
        o.lastIndex = 0;
      }
      for (var h = []; ; ) {
        var v = mL(o, s);
        if (v === null || (au(h, v), !f))
          break;
        var m = Fn(v[0]);
        m === "" && (o.lastIndex = vL(s, dL(o.lastIndex), d));
      }
      for (var g = "", _ = 0, b = 0; b < h.length; b++) {
        v = h[b];
        for (var S = Fn(v[0]), k = _L(yL(cL(v.index), s.length), 0), w = [], C = 1; C < v.length; C++)
          au(w, SL(v[C]));
        var E = v.groups;
        if (u) {
          var A = wL([S], w, k, s);
          E !== void 0 && au(A, E);
          var D = Fn(iL(i, void 0, A));
        } else
          D = gL(S, s, k, w, E, i);
        k >= _ && (g += Ph(s, _, k) + D, _ = k + S.length);
      }
      return g + Ph(s, _);
    }
  ];
}, !kL || !OL || Rh);
var iu = Pe, Ln = Set.prototype, Ft = {
  // eslint-disable-next-line es/no-set -- safe
  Set,
  add: iu(Ln.add),
  has: iu(Ln.has),
  remove: iu(Ln.delete),
  proto: Ln,
  $has: Ln.has,
  $keys: Ln.keys
}, EL = Ft.has, Pt = function(e) {
  return EL(e), e;
}, $L = ge, TL = Pt, CL = Ft.add;
$L({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  addAll: function() {
    for (var t = TL(this), r = 0, n = arguments.length; r < n; r++)
      CL(t, arguments[r]);
    return t;
  }
});
var AL = ge, IL = Pt, PL = Ft.remove;
AL({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  deleteAll: function() {
    for (var t = IL(this), r = !0, n, a = 0, i = arguments.length; a < i; a++)
      n = PL(t, arguments[a]), r = r && n;
    return !!r;
  }
});
var RL = Li, jL = yt, ML = Sr, NL = it, DL = Pa, xL = NL("iterator"), FL = Object, LL = function(e) {
  if (ML(e))
    return !1;
  var t = FL(e);
  return t[xL] !== void 0 || "@@iterator" in t || jL(DL, RL(t));
}, BL = Ut, jh = at, zL = LL, VL = _t, qL = BL("Set"), UL = function(e) {
  return VL(e) && typeof e.size == "number" && jh(e.has) && jh(e.keys);
}, Rn = function(e) {
  if (UL(e))
    return e;
  if (zL(e))
    return new qL(e);
}, HL = Xe, Yr = function(e, t, r) {
  for (var n = r || e.next, a, i; !(a = HL(n, e)).done; )
    if (i = t(a.value), i !== void 0)
      return i;
}, tw = Pe, GL = Yr, rw = Ft, WL = rw.Set, nw = rw.proto, KL = tw(nw.forEach), aw = tw(nw.keys), JL = aw(new WL()).next, tr = function(e, t, r) {
  return r ? GL(aw(e), t, JL) : KL(e, t);
}, iw = Ft, YL = tr, XL = iw.Set, QL = iw.add, hd = function(e) {
  var t = new XL();
  return YL(e, function(r) {
    QL(t, r);
  }), t;
}, ZL = bt, eB = Pe, tB = Ft, Wi = ZL ? eB(Object.getOwnPropertyDescriptor(tB.proto, "size").get) : function(e) {
  return e.size;
}, Mh = Dt, ow = Ot, Nh = Xe, rB = Ni, nB = TypeError, sw = function(e, t, r, n) {
  this.set = e, this.size = t, this.has = r, this.keys = n;
};
sw.prototype = {
  getIterator: function() {
    return ow(Nh(this.keys, this.set));
  },
  includes: function(e) {
    return Nh(this.has, this.set, e);
  }
};
var jn = function(e) {
  ow(e);
  var t = +e.size;
  if (t != t)
    throw nB("Invalid size");
  return new sw(
    e,
    rB(t),
    Mh(e.has),
    Mh(e.keys)
  );
}, aB = Pt, lw = Ft, iB = hd, oB = Wi, sB = jn, lB = tr, uB = Yr, fB = lw.has, Dh = lw.remove, cB = function(t) {
  var r = aB(this), n = sB(t), a = iB(r);
  return oB(r) <= n.size ? lB(r, function(i) {
    n.includes(i) && Dh(a, i);
  }) : uB(n.getIterator(), function(i) {
    fB(r, i) && Dh(a, i);
  }), a;
}, dB = ge, pB = Xe, vB = Rn, hB = cB;
dB({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  difference: function(t) {
    return pB(hB, this, vB(t));
  }
});
var gB = ge, mB = Ct, bB = Pt, _B = tr;
gB({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  every: function(t) {
    var r = bB(this), n = mB(t, arguments.length > 1 ? arguments[1] : void 0);
    return _B(r, function(a) {
      if (!n(a, a, r))
        return !1;
    }, !0) !== !1;
  }
});
var yB = ge, wB = Ct, SB = Pt, uw = Ft, OB = tr, kB = uw.Set, EB = uw.add;
yB({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  filter: function(t) {
    var r = SB(this), n = wB(t, arguments.length > 1 ? arguments[1] : void 0), a = new kB();
    return OB(r, function(i) {
      n(i, i, r) && EB(a, i);
    }), a;
  }
});
var $B = ge, TB = Ct, CB = Pt, AB = tr;
$B({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  find: function(t) {
    var r = CB(this), n = TB(t, arguments.length > 1 ? arguments[1] : void 0), a = AB(r, function(i) {
      if (n(i, i, r))
        return { value: i };
    }, !0);
    return a && a.value;
  }
});
var IB = Pt, Ki = Ft, xh = Wi, PB = jn, Fh = tr, RB = Yr, Lh = Ki.Set, ou = Ki.add, Bh = Ki.has, jB = Ki.$has, MB = Ki.$keys, NB = function(e) {
  return e.has === jB && e.keys === MB;
}, DB = function(t) {
  var r = IB(this), n = PB(t), a = new Lh();
  if (!NB(n) && xh(r) > n.size) {
    if (RB(n.getIterator(), function(o) {
      Bh(r, o) && ou(a, o);
    }), xh(a) < 2)
      return a;
    var i = a;
    a = new Lh(), Fh(r, function(o) {
      Bh(i, o) && ou(a, o);
    });
  } else
    Fh(r, function(o) {
      n.includes(o) && ou(a, o);
    });
  return a;
}, xB = ge, FB = Xe, LB = Rn, BB = DB;
xB({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  intersection: function(t) {
    return FB(BB, this, LB(t));
  }
});
var zB = Pt, VB = Ft.has, qB = Wi, UB = jn, HB = tr, GB = Yr, WB = function(t) {
  var r = zB(this), n = UB(t);
  return (qB(r) <= n.size ? HB(r, function(a) {
    if (n.includes(a))
      return !1;
  }, !0) : GB(n.getIterator(), function(a) {
    if (VB(r, a))
      return !1;
  })) !== !1;
}, KB = ge, JB = Xe, YB = Rn, XB = WB;
KB({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  isDisjointFrom: function(t) {
    return JB(XB, this, YB(t));
  }
});
var QB = Pt, ZB = Wi, e9 = tr, t9 = jn, r9 = function(t) {
  var r = QB(this), n = t9(t);
  return ZB(r) > n.size ? !1 : e9(r, function(a) {
    if (!n.includes(a))
      return !1;
  }, !0) !== !1;
}, n9 = ge, a9 = Xe, i9 = Rn, o9 = r9;
n9({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  isSubsetOf: function(t) {
    return a9(o9, this, i9(t));
  }
});
var s9 = Pt, l9 = Ft.has, u9 = Wi, f9 = jn, c9 = Yr, d9 = function(t) {
  var r = s9(this), n = f9(t);
  return u9(r) < n.size ? !1 : c9(n.getIterator(), function(a) {
    if (l9(r, a) === !1)
      return !1;
  }) !== !1;
}, p9 = ge, v9 = Xe, h9 = Rn, g9 = d9;
p9({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  isSupersetOf: function(t) {
    return v9(g9, this, h9(t));
  }
});
var m9 = ge, fw = Pe, b9 = Pt, _9 = tr, y9 = It, w9 = fw([].join), S9 = fw([].push);
m9({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  join: function(t) {
    var r = b9(this), n = t === void 0 ? "," : y9(t), a = [];
    return _9(r, function(i) {
      S9(a, i);
    }), w9(a, n);
  }
});
var O9 = ge, k9 = Ct, E9 = Pt, cw = Ft, $9 = tr, T9 = cw.Set, C9 = cw.add;
O9({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  map: function(t) {
    var r = E9(this), n = k9(t, arguments.length > 1 ? arguments[1] : void 0), a = new T9();
    return $9(r, function(i) {
      C9(a, n(i, i, r));
    }), a;
  }
});
var A9 = ge, I9 = Dt, P9 = Pt, R9 = tr, j9 = TypeError;
A9({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  reduce: function(t) {
    var r = P9(this), n = arguments.length < 2, a = n ? void 0 : arguments[1];
    if (I9(t), R9(r, function(i) {
      n ? (n = !1, a = i) : a = t(a, i, i, r);
    }), n)
      throw j9("Reduce of empty set with no initial value");
    return a;
  }
});
var M9 = ge, N9 = Ct, D9 = Pt, x9 = tr;
M9({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  some: function(t) {
    var r = D9(this), n = N9(t, arguments.length > 1 ? arguments[1] : void 0);
    return x9(r, function(a) {
      if (n(a, a, r))
        return !0;
    }, !0) === !0;
  }
});
var F9 = Pt, gd = Ft, L9 = hd, B9 = jn, z9 = Yr, V9 = gd.add, q9 = gd.has, U9 = gd.remove, H9 = function(t) {
  var r = F9(this), n = B9(t).getIterator(), a = L9(r);
  return z9(n, function(i) {
    q9(r, i) ? U9(a, i) : V9(a, i);
  }), a;
}, G9 = ge, W9 = Xe, K9 = Rn, J9 = H9;
G9({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  symmetricDifference: function(t) {
    return W9(J9, this, K9(t));
  }
});
var Y9 = Pt, X9 = Ft.add, Q9 = hd, Z9 = jn, ez = Yr, tz = function(t) {
  var r = Y9(this), n = Z9(t).getIterator(), a = Q9(r);
  return ez(n, function(i) {
    X9(a, i);
  }), a;
}, rz = ge, nz = Xe, az = Rn, iz = tz;
rz({ target: "Set", proto: !0, real: !0, forced: !0 }, {
  union: function(t) {
    return nz(iz, this, az(t));
  }
});
var dw = {
  CSSRuleList: 0,
  CSSStyleDeclaration: 0,
  CSSValueList: 0,
  ClientRectList: 0,
  DOMRectList: 0,
  DOMStringList: 0,
  DOMTokenList: 1,
  DataTransferItemList: 0,
  FileList: 0,
  HTMLAllCollection: 0,
  HTMLCollection: 0,
  HTMLFormElement: 0,
  HTMLSelectElement: 0,
  MediaList: 0,
  MimeTypeArray: 0,
  NamedNodeMap: 0,
  NodeList: 1,
  PaintRequestList: 0,
  Plugin: 0,
  PluginArray: 0,
  SVGLengthList: 0,
  SVGNumberList: 0,
  SVGPathSegList: 0,
  SVGPointList: 0,
  SVGStringList: 0,
  SVGTransformList: 0,
  SourceBufferList: 0,
  StyleSheetList: 0,
  TextTrackCueList: 0,
  TextTrackList: 0,
  TouchList: 0
}, oz = Us, su = oz("span").classList, zh = su && su.constructor && su.constructor.prototype, pw = zh === Object.prototype ? void 0 : zh, Vh = nt, qh = dw, sz = pw, lu = gy, lz = In, vw = function(e) {
  if (e && e.forEach !== lu)
    try {
      lz(e, "forEach", lu);
    } catch {
      e.forEach = lu;
    }
};
for (var uu in qh)
  qh[uu] && vw(Vh[uu] && Vh[uu].prototype);
vw(sz);
var Uh = nt, hw = dw, uz = pw, Xa = b6, fu = In, gw = it, cu = gw("iterator"), Hh = gw("toStringTag"), du = Xa.values, mw = function(e, t) {
  if (e) {
    if (e[cu] !== du)
      try {
        fu(e, cu, du);
      } catch {
        e[cu] = du;
      }
    if (e[Hh] || fu(e, Hh, t), hw[t]) {
      for (var r in Xa)
        if (e[r] !== Xa[r])
          try {
            fu(e, r, Xa[r]);
          } catch {
            e[r] = Xa[r];
          }
    }
  }
};
for (var pu in hw)
  mw(Uh[pu] && Uh[pu].prototype, pu);
mw(uz, "DOMTokenList");
var fz = ge, cz = Xe;
fz({ target: "URL", proto: !0, enumerable: !0 }, {
  toJSON: function() {
    return cz(URL.prototype.toString, this);
  }
});
var Gh = {}, dz = {
  get exports() {
    return Gh;
  },
  set exports(e) {
    Gh = e;
  }
};
(function(e) {
  var t = function(r) {
    var n = Object.prototype, a = n.hasOwnProperty, i = Object.defineProperty || function(M, P, I) {
      M[P] = I.value;
    }, o, s = typeof Symbol == "function" ? Symbol : {}, l = s.iterator || "@@iterator", u = s.asyncIterator || "@@asyncIterator", f = s.toStringTag || "@@toStringTag";
    function d(M, P, I) {
      return Object.defineProperty(M, P, {
        value: I,
        enumerable: !0,
        configurable: !0,
        writable: !0
      }), M[P];
    }
    try {
      d({}, "");
    } catch {
      d = function(P, I, J) {
        return P[I] = J;
      };
    }
    function h(M, P, I, J) {
      var G = P && P.prototype instanceof k ? P : k, z = Object.create(G.prototype), K = new ee(J || []);
      return i(z, "_invoke", { value: j(M, I, K) }), z;
    }
    r.wrap = h;
    function v(M, P, I) {
      try {
        return { type: "normal", arg: M.call(P, I) };
      } catch (J) {
        return { type: "throw", arg: J };
      }
    }
    var m = "suspendedStart", g = "suspendedYield", _ = "executing", b = "completed", S = {};
    function k() {
    }
    function w() {
    }
    function C() {
    }
    var E = {};
    d(E, l, function() {
      return this;
    });
    var A = Object.getPrototypeOf, D = A && A(A(Y([])));
    D && D !== n && a.call(D, l) && (E = D);
    var F = C.prototype = k.prototype = Object.create(E);
    w.prototype = C, i(F, "constructor", { value: C, configurable: !0 }), i(
      C,
      "constructor",
      { value: w, configurable: !0 }
    ), w.displayName = d(
      C,
      f,
      "GeneratorFunction"
    );
    function R(M) {
      ["next", "throw", "return"].forEach(function(P) {
        d(M, P, function(I) {
          return this._invoke(P, I);
        });
      });
    }
    r.isGeneratorFunction = function(M) {
      var P = typeof M == "function" && M.constructor;
      return P ? P === w || (P.displayName || P.name) === "GeneratorFunction" : !1;
    }, r.mark = function(M) {
      return Object.setPrototypeOf ? Object.setPrototypeOf(M, C) : (M.__proto__ = C, d(M, f, "GeneratorFunction")), M.prototype = Object.create(F), M;
    }, r.awrap = function(M) {
      return { __await: M };
    };
    function $(M, P) {
      function I(z, K, te, de) {
        var oe = v(M[z], M, K);
        if (oe.type === "throw")
          de(oe.arg);
        else {
          var X = oe.arg, B = X.value;
          return B && typeof B == "object" && a.call(B, "__await") ? P.resolve(B.__await).then(function(ue) {
            I("next", ue, te, de);
          }, function(ue) {
            I("throw", ue, te, de);
          }) : P.resolve(B).then(function(ue) {
            X.value = ue, te(X);
          }, function(ue) {
            return I("throw", ue, te, de);
          });
        }
      }
      var J;
      function G(z, K) {
        function te() {
          return new P(function(de, oe) {
            I(z, K, de, oe);
          });
        }
        return J = // If enqueue has been called before, then we want to wait until
        // all previous Promises have been resolved before calling invoke,
        // so that results are always delivered in the correct order. If
        // enqueue has not been called before, then it is important to
        // call invoke immediately, without waiting on a callback to fire,
        // so that the async generator function has the opportunity to do
        // any necessary setup in a predictable way. This predictability
        // is why the Promise constructor synchronously invokes its
        // executor callback, and why async functions synchronously
        // execute code before the first await. Since we implement simple
        // async functions in terms of async generators, it is especially
        // important to get this right, even though it requires care.
        J ? J.then(
          te,
          // Avoid propagating failures to Promises returned by later
          // invocations of the iterator.
          te
        ) : te();
      }
      i(this, "_invoke", { value: G });
    }
    R($.prototype), d($.prototype, u, function() {
      return this;
    }), r.AsyncIterator = $, r.async = function(M, P, I, J, G) {
      G === void 0 && (G = Promise);
      var z = new $(
        h(M, P, I, J),
        G
      );
      return r.isGeneratorFunction(P) ? z : z.next().then(function(K) {
        return K.done ? K.value : z.next();
      });
    };
    function j(M, P, I) {
      var J = m;
      return function(z, K) {
        if (J === _)
          throw new Error("Generator is already running");
        if (J === b) {
          if (z === "throw")
            throw K;
          return ae();
        }
        for (I.method = z, I.arg = K; ; ) {
          var te = I.delegate;
          if (te) {
            var de = V(te, I);
            if (de) {
              if (de === S)
                continue;
              return de;
            }
          }
          if (I.method === "next")
            I.sent = I._sent = I.arg;
          else if (I.method === "throw") {
            if (J === m)
              throw J = b, I.arg;
            I.dispatchException(I.arg);
          } else
            I.method === "return" && I.abrupt("return", I.arg);
          J = _;
          var oe = v(M, P, I);
          if (oe.type === "normal") {
            if (J = I.done ? b : g, oe.arg === S)
              continue;
            return {
              value: oe.arg,
              done: I.done
            };
          } else
            oe.type === "throw" && (J = b, I.method = "throw", I.arg = oe.arg);
        }
      };
    }
    function V(M, P) {
      var I = P.method, J = M.iterator[I];
      if (J === o)
        return P.delegate = null, I === "throw" && M.iterator.return && (P.method = "return", P.arg = o, V(M, P), P.method === "throw") || I !== "return" && (P.method = "throw", P.arg = new TypeError(
          "The iterator does not provide a '" + I + "' method"
        )), S;
      var G = v(J, M.iterator, P.arg);
      if (G.type === "throw")
        return P.method = "throw", P.arg = G.arg, P.delegate = null, S;
      var z = G.arg;
      if (!z)
        return P.method = "throw", P.arg = new TypeError("iterator result is not an object"), P.delegate = null, S;
      if (z.done)
        P[M.resultName] = z.value, P.next = M.nextLoc, P.method !== "return" && (P.method = "next", P.arg = o);
      else
        return z;
      return P.delegate = null, S;
    }
    R(F), d(F, f, "Generator"), d(F, l, function() {
      return this;
    }), d(F, "toString", function() {
      return "[object Generator]";
    });
    function re(M) {
      var P = { tryLoc: M[0] };
      1 in M && (P.catchLoc = M[1]), 2 in M && (P.finallyLoc = M[2], P.afterLoc = M[3]), this.tryEntries.push(P);
    }
    function q(M) {
      var P = M.completion || {};
      P.type = "normal", delete P.arg, M.completion = P;
    }
    function ee(M) {
      this.tryEntries = [{ tryLoc: "root" }], M.forEach(re, this), this.reset(!0);
    }
    r.keys = function(M) {
      var P = Object(M), I = [];
      for (var J in P)
        I.push(J);
      return I.reverse(), function G() {
        for (; I.length; ) {
          var z = I.pop();
          if (z in P)
            return G.value = z, G.done = !1, G;
        }
        return G.done = !0, G;
      };
    };
    function Y(M) {
      if (M) {
        var P = M[l];
        if (P)
          return P.call(M);
        if (typeof M.next == "function")
          return M;
        if (!isNaN(M.length)) {
          var I = -1, J = function G() {
            for (; ++I < M.length; )
              if (a.call(M, I))
                return G.value = M[I], G.done = !1, G;
            return G.value = o, G.done = !0, G;
          };
          return J.next = J;
        }
      }
      return { next: ae };
    }
    r.values = Y;
    function ae() {
      return { value: o, done: !0 };
    }
    return ee.prototype = {
      constructor: ee,
      reset: function(M) {
        if (this.prev = 0, this.next = 0, this.sent = this._sent = o, this.done = !1, this.delegate = null, this.method = "next", this.arg = o, this.tryEntries.forEach(q), !M)
          for (var P in this)
            P.charAt(0) === "t" && a.call(this, P) && !isNaN(+P.slice(1)) && (this[P] = o);
      },
      stop: function() {
        this.done = !0;
        var M = this.tryEntries[0], P = M.completion;
        if (P.type === "throw")
          throw P.arg;
        return this.rval;
      },
      dispatchException: function(M) {
        if (this.done)
          throw M;
        var P = this;
        function I(de, oe) {
          return z.type = "throw", z.arg = M, P.next = de, oe && (P.method = "next", P.arg = o), !!oe;
        }
        for (var J = this.tryEntries.length - 1; J >= 0; --J) {
          var G = this.tryEntries[J], z = G.completion;
          if (G.tryLoc === "root")
            return I("end");
          if (G.tryLoc <= this.prev) {
            var K = a.call(G, "catchLoc"), te = a.call(G, "finallyLoc");
            if (K && te) {
              if (this.prev < G.catchLoc)
                return I(G.catchLoc, !0);
              if (this.prev < G.finallyLoc)
                return I(G.finallyLoc);
            } else if (K) {
              if (this.prev < G.catchLoc)
                return I(G.catchLoc, !0);
            } else if (te) {
              if (this.prev < G.finallyLoc)
                return I(G.finallyLoc);
            } else
              throw new Error("try statement without catch or finally");
          }
        }
      },
      abrupt: function(M, P) {
        for (var I = this.tryEntries.length - 1; I >= 0; --I) {
          var J = this.tryEntries[I];
          if (J.tryLoc <= this.prev && a.call(J, "finallyLoc") && this.prev < J.finallyLoc) {
            var G = J;
            break;
          }
        }
        G && (M === "break" || M === "continue") && G.tryLoc <= P && P <= G.finallyLoc && (G = null);
        var z = G ? G.completion : {};
        return z.type = M, z.arg = P, G ? (this.method = "next", this.next = G.finallyLoc, S) : this.complete(z);
      },
      complete: function(M, P) {
        if (M.type === "throw")
          throw M.arg;
        return M.type === "break" || M.type === "continue" ? this.next = M.arg : M.type === "return" ? (this.rval = this.arg = M.arg, this.method = "return", this.next = "end") : M.type === "normal" && P && (this.next = P), S;
      },
      finish: function(M) {
        for (var P = this.tryEntries.length - 1; P >= 0; --P) {
          var I = this.tryEntries[P];
          if (I.finallyLoc === M)
            return this.complete(I.completion, I.afterLoc), q(I), S;
        }
      },
      catch: function(M) {
        for (var P = this.tryEntries.length - 1; P >= 0; --P) {
          var I = this.tryEntries[P];
          if (I.tryLoc === M) {
            var J = I.completion;
            if (J.type === "throw") {
              var G = J.arg;
              q(I);
            }
            return G;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function(M, P, I) {
        return this.delegate = {
          iterator: Y(M),
          resultName: P,
          nextLoc: I
        }, this.method === "next" && (this.arg = o), S;
      }
    }, r;
  }(
    // If this script is executing as a CommonJS module, use module.exports
    // as the regeneratorRuntime namespace. Otherwise create a new empty
    // object. Either way, the resulting object will be used to initialize
    // the regeneratorRuntime variable at the top of this file.
    e.exports
  );
  try {
    regeneratorRuntime = t;
  } catch {
    typeof globalThis == "object" ? globalThis.regeneratorRuntime = t : Function("r", "regeneratorRuntime = r")(t);
  }
})(dz);
var At = {}, md = `	
\v\f\r                　\u2028\u2029\uFEFF`, pz = Pe, vz = Wr, hz = It, gz = md, Wh = pz("".replace), vs = "[" + gz + "]", mz = RegExp("^" + vs + vs + "*"), bz = RegExp(vs + vs + "*$"), vu = function(e) {
  return function(t) {
    var r = hz(vz(t));
    return e & 1 && (r = Wh(r, mz, "")), e & 2 && (r = Wh(r, bz, "")), r;
  };
}, bd = {
  // `String.prototype.{ trimLeft, trimStart }` methods
  // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  start: vu(1),
  // `String.prototype.{ trimRight, trimEnd }` methods
  // https://tc39.es/ecma262/#sec-string.prototype.trimend
  end: vu(2),
  // `String.prototype.trim` method
  // https://tc39.es/ecma262/#sec-string.prototype.trim
  trim: vu(3)
}, bw = nt, _z = Ie, yz = Pe, wz = It, Sz = bd.trim, Oz = md, kz = yz("".charAt), hs = bw.parseFloat, Kh = bw.Symbol, Jh = Kh && Kh.iterator, Ez = 1 / hs(Oz + "-0") !== -1 / 0 || Jh && !_z(function() {
  hs(Object(Jh));
}), $z = Ez ? function(t) {
  var r = Sz(wz(t)), n = hs(r);
  return n === 0 && kz(r, 0) == "-" ? -0 : n;
} : hs, Tz = ge, Yh = $z;
Tz({ global: !0, forced: parseFloat != Yh }, {
  parseFloat: Yh
});
var Cz = Ks, Az = Ea, Iz = TypeError, _w = function(e) {
  if (Cz(e))
    return e;
  throw Iz(Az(e) + " is not a constructor");
}, Xh = Ot, Pz = _w, Rz = Sr, jz = it, Mz = jz("species"), yw = function(e, t) {
  var r = Xh(e).constructor, n;
  return r === void 0 || Rz(n = Xh(r)[Mz]) ? t : Pz(n);
}, Nz = Ui, Va = Xe, _d = Pe, Dz = cd, xz = Ot, Fz = Sr, Lz = ud, Qh = Wr, Bz = yw, zz = dd, Vz = Gs, hu = It, qz = $a, Zh = Nc, eg = vd, Uz = il, Hz = td, Gz = Ie, Bn = Hz.UNSUPPORTED_Y, tg = 4294967295, Wz = Math.min, ww = [].push, Kz = _d(/./.exec), zn = _d(ww), qa = _d("".slice), Jz = !Gz(function() {
  var e = /(?:)/, t = e.exec;
  e.exec = function() {
    return t.apply(this, arguments);
  };
  var r = "ab".split(e);
  return r.length !== 2 || r[0] !== "a" || r[1] !== "b";
});
Dz("split", function(e, t, r) {
  var n;
  return "abbc".split(/(b)*/)[1] == "c" || // eslint-disable-next-line regexp/no-empty-group -- required for testing
  "test".split(/(?:)/, -1).length != 4 || "ab".split(/(?:ab)*/).length != 2 || ".".split(/(.?)(.?)/).length != 4 || // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
  ".".split(/()()/).length > 1 || "".split(/.?/).length ? n = function(a, i) {
    var o = hu(Qh(this)), s = i === void 0 ? tg : i >>> 0;
    if (s === 0)
      return [];
    if (a === void 0)
      return [o];
    if (!Lz(a))
      return Va(t, o, a, s);
    for (var l = [], u = (a.ignoreCase ? "i" : "") + (a.multiline ? "m" : "") + (a.unicode ? "u" : "") + (a.sticky ? "y" : ""), f = 0, d = new RegExp(a.source, u + "g"), h, v, m; (h = Va(Uz, d, o)) && (v = d.lastIndex, !(v > f && (zn(l, qa(o, f, h.index)), h.length > 1 && h.index < o.length && Nz(ww, l, Zh(h, 1)), m = h[0].length, f = v, l.length >= s))); )
      d.lastIndex === h.index && d.lastIndex++;
    return f === o.length ? (m || !Kz(d, "")) && zn(l, "") : zn(l, qa(o, f)), l.length > s ? Zh(l, 0, s) : l;
  } : "0".split(void 0, 0).length ? n = function(a, i) {
    return a === void 0 && i === 0 ? [] : Va(t, this, a, i);
  } : n = t, [
    // `String.prototype.split` method
    // https://tc39.es/ecma262/#sec-string.prototype.split
    function(i, o) {
      var s = Qh(this), l = Fz(i) ? void 0 : qz(i, e);
      return l ? Va(l, i, s, o) : Va(n, hu(s), i, o);
    },
    // `RegExp.prototype[@@split]` method
    // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
    //
    // NOTE: This cannot be properly polyfilled in engines that don't support
    // the 'y' flag.
    function(a, i) {
      var o = xz(this), s = hu(a), l = r(n, o, s, i, n !== t);
      if (l.done)
        return l.value;
      var u = Bz(o, RegExp), f = o.unicode, d = (o.ignoreCase ? "i" : "") + (o.multiline ? "m" : "") + (o.unicode ? "u" : "") + (Bn ? "g" : "y"), h = new u(Bn ? "^(?:" + o.source + ")" : o, d), v = i === void 0 ? tg : i >>> 0;
      if (v === 0)
        return [];
      if (s.length === 0)
        return eg(h, s) === null ? [s] : [];
      for (var m = 0, g = 0, _ = []; g < s.length; ) {
        h.lastIndex = Bn ? 0 : g;
        var b = eg(h, Bn ? qa(s, g) : s), S;
        if (b === null || (S = Wz(Vz(h.lastIndex + (Bn ? g : 0)), s.length)) === m)
          g = zz(s, g, f);
        else {
          if (zn(_, qa(s, m, g)), _.length === v)
            return _;
          for (var k = 1; k <= b.length - 1; k++)
            if (zn(_, b[k]), _.length === v)
              return _;
          g = m = S;
        }
      }
      return zn(_, qa(s, m)), _;
    }
  ];
}, !Jz, Bn);
Object.defineProperty(At, "__esModule", {
  value: !0
});
At.isArrayOfType = tV;
At.isNumber = rV;
At.arrayEqual = nV;
At.transpose = aV;
At.makeGenerator = Sw;
At.iter = kw;
At.chain = iV;
At.xSplit = oV;
At.xReplace = sV;
At.xContains = lV;
At.hashCode = uV;
var Yz = regeneratorRuntime.mark(Sw), Xz = regeneratorRuntime.mark(Ow);
function gs(e) {
  return eV(e) || Zz(e) || Qz();
}
function Qz() {
  throw new TypeError("Invalid attempt to spread non-iterable instance");
}
function Zz(e) {
  if (Symbol.iterator in Object(e) || Object.prototype.toString.call(e) === "[object Arguments]")
    return Array.from(e);
}
function eV(e) {
  if (Array.isArray(e)) {
    for (var t = 0, r = new Array(e.length); t < e.length; t++)
      r[t] = e[t];
    return r;
  }
}
function tV(e, t) {
  var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
  return !!(e instanceof Array && e.hasOwnProperty(r) && (t === String ? typeof e[r] == "string" : e[r] instanceof t));
}
function rV(e) {
  return !isNaN(parseFloat(e)) && isFinite(e);
}
function nV(e, t) {
  var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  return r ? Object.keys(e).map(function(n) {
    return e[n] === t[n];
  }).reduce(function(n, a) {
    return n && a;
  }, !0) : gs(new Set(e.filter(function(n) {
    return !new Set(t).has(n);
  }))).length === 0;
}
function aV(e) {
  var t = e.map(function(r) {
    return r.length;
  }).reduce(function(r, n) {
    return Math.max(r, n);
  }, 0);
  return gs(Array(t).keys()).map(function(r) {
    return e.map(function(n) {
      return n[r];
    });
  });
}
function Sw(e) {
  return regeneratorRuntime.wrap(function(r) {
    for (; ; )
      switch (r.prev = r.next) {
        case 0:
          return r.delegateYield(e, "t0", 1);
        case 1:
        case "end":
          return r.stop();
      }
  }, Yz);
}
function Ow(e, t) {
  var r, n, a, i, o, s, l, u, f, d = arguments;
  return regeneratorRuntime.wrap(function(v) {
    for (; ; )
      switch (v.prev = v.next) {
        case 0:
          r = d.length > 2 && d[2] !== void 0 ? d[2] : function() {
            return !1;
          }, n = 0, a = !0, i = !1, o = void 0, v.prev = 5, s = e[Symbol.iterator]();
        case 7:
          if (a = (l = s.next()).done) {
            v.next = 18;
            break;
          }
          if (u = l.value, !r()) {
            v.next = 11;
            break;
          }
          return v.abrupt("return");
        case 11:
          if (f = t(u, n++), !f) {
            v.next = 15;
            break;
          }
          return v.next = 15, f;
        case 15:
          a = !0, v.next = 7;
          break;
        case 18:
          v.next = 24;
          break;
        case 20:
          v.prev = 20, v.t0 = v.catch(5), i = !0, o = v.t0;
        case 24:
          v.prev = 24, v.prev = 25, !a && s.return != null && s.return();
        case 27:
          if (v.prev = 27, !i) {
            v.next = 30;
            break;
          }
          throw o;
        case 30:
          return v.finish(27);
        case 31:
          return v.finish(24);
        case 32:
        case "end":
          return v.stop();
      }
  }, Xz, null, [[5, 20, 24, 32], [25, , 27, 31]]);
}
function kw(e, t) {
  var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {
    return !1;
  };
  return Array.from(Ow(e, t, r));
}
function iV(e) {
  for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
    r[n - 1] = arguments[n];
  return Array.from(kw(e, r.reduce(function(a, i) {
    return function(o, s) {
      var l = a(o, s), u = l ? i(l, s) : !1;
      return u === !0 ? l : u;
    };
  }, function(a) {
    return a;
  })));
}
function oV(e) {
  for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
    r[n - 1] = arguments[n];
  return r.reduce(function(a, i) {
    return a.map(function(o) {
      return o.split(i);
    }).reduce(function(o, s) {
      return [].concat(gs(o), gs(s));
    }, []);
  }, [e]);
}
function sV(e) {
  for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
    r[n - 1] = arguments[n];
  return r.reduce(function(a, i) {
    return a.split(i[0]).join(i[1]);
  }, e);
}
function lV(e) {
  for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
    r[n - 1] = arguments[n];
  return r.filter(function(a) {
    return e.includes(a);
  });
}
function uV(e) {
  var t = 0, r;
  if (e.length === 0)
    return t;
  for (var n = 0; n < e.length; n++)
    r = e.charCodeAt(n), t = (t << 5) - t + r, t = t & t;
  return t;
}
var ct = {}, fV = ge, cV = xc, dV = Ic.indexOf, pV = Ia, Cf = cV([].indexOf), rg = !!Cf && 1 / Cf([1], 1, -0) < 0, vV = pV("indexOf");
fV({ target: "Array", proto: !0, forced: rg || !vV }, {
  indexOf: function(t) {
    var r = arguments.length > 1 ? arguments[1] : void 0;
    return rg ? Cf(this, t, r) || 0 : dV(this, t, r);
  }
});
var hV = Ky, gV = Yy;
hV("Map", function(e) {
  return function() {
    return e(this, arguments.length ? arguments[0] : void 0);
  };
}, gV);
var mV = ge, bV = Ie, _V = Ht, Ew = Gc, yV = Sy, wV = bV(function() {
  Ew(1);
});
mV({ target: "Object", stat: !0, forced: wV, sham: !yV }, {
  getPrototypeOf: function(t) {
    return Ew(_V(t));
  }
});
var SV = ge, OV = nl;
SV({ target: "Object", stat: !0 }, {
  setPrototypeOf: OV
});
var $w = Pe, kV = Dt, EV = _t, $V = yt, ng = el, TV = Ci, Tw = Function, CV = $w([].concat), AV = $w([].join), gu = {}, IV = function(e, t, r) {
  if (!$V(gu, t)) {
    for (var n = [], a = 0; a < t; a++)
      n[a] = "a[" + a + "]";
    gu[t] = Tw("C,a", "return new C(" + AV(n, ",") + ")");
  }
  return gu[t](e, r);
}, PV = TV ? Tw.bind : function(t) {
  var r = kV(this), n = r.prototype, a = ng(arguments, 1), i = function() {
    var s = CV(a, ng(arguments));
    return this instanceof i ? IV(r, s.length, s) : r.apply(t, s);
  };
  return EV(n) && (i.prototype = n), i;
}, RV = ge, jV = Ut, mu = Ui, MV = PV, ag = _w, NV = Ot, ig = _t, DV = Ca, Cw = Ie, yd = jV("Reflect", "construct"), xV = Object.prototype, FV = [].push, Aw = Cw(function() {
  function e() {
  }
  return !(yd(function() {
  }, [], e) instanceof e);
}), Iw = !Cw(function() {
  yd(function() {
  });
}), og = Aw || Iw;
RV({ target: "Reflect", stat: !0, forced: og, sham: og }, {
  construct: function(t, r) {
    ag(t), NV(r);
    var n = arguments.length < 3 ? t : ag(arguments[2]);
    if (Iw && !Aw)
      return yd(t, r, n);
    if (t == n) {
      switch (r.length) {
        case 0:
          return new t();
        case 1:
          return new t(r[0]);
        case 2:
          return new t(r[0], r[1]);
        case 3:
          return new t(r[0], r[1], r[2]);
        case 4:
          return new t(r[0], r[1], r[2], r[3]);
      }
      var a = [null];
      return mu(FV, a, r), new (mu(MV, t, a))();
    }
    var i = n.prototype, o = DV(ig(i) ? i : xV), s = mu(t, o, r);
    return ig(s) ? s : o;
  }
});
var wo = Pe, Ua = Map.prototype, Xr = {
  // eslint-disable-next-line es/no-map -- safe
  Map,
  set: wo(Ua.set),
  get: wo(Ua.get),
  has: wo(Ua.has),
  remove: wo(Ua.delete),
  proto: Ua
}, LV = Xr.has, Gt = function(e) {
  return LV(e), e;
}, BV = ge, zV = Gt, VV = Xr.remove;
BV({ target: "Map", proto: !0, real: !0, forced: !0 }, {
  deleteAll: function() {
    for (var t = zV(this), r = !0, n, a = 0, i = arguments.length; a < i; a++)
      n = VV(t, arguments[a]), r = r && n;
    return !!r;
  }
});
var Pw = Pe, qV = Yr, Rw = Xr, UV = Rw.Map, jw = Rw.proto, HV = Pw(jw.forEach), Mw = Pw(jw.entries), GV = Mw(new UV()).next, Or = function(e, t, r) {
  return r ? qV(Mw(e), function(n) {
    return t(n[1], n[0]);
  }, GV) : HV(e, t);
}, WV = ge, KV = Ct, JV = Gt, YV = Or;
WV({ target: "Map", proto: !0, real: !0, forced: !0 }, {
  every: function(t) {
    var r = JV(this), n = KV(t, arguments.length > 1 ? arguments[1] : void 0);
    return YV(r, function(a, i) {
      if (!n(a, i, r))
        return !1;
    }, !0) !== !1;
  }
});
var XV = ge, QV = Ct, ZV = Gt, Nw = Xr, eq = Or, tq = Nw.Map, rq = Nw.set;
XV({ target: "Map", proto: !0, real: !0, forced: !0 }, {
  filter: function(t) {
    var r = ZV(this), n = QV(t, arguments.length > 1 ? arguments[1] : void 0), a = new tq();
    return eq(r, function(i, o) {
      n(i, o, r) && rq(a, o, i);
    }), a;
  }
});
var nq = ge, aq = Ct, iq = Gt, oq = Or;
nq({ target: "Map", proto: !0, real: !0, forced: !0 }, {
  find: function(t) {
    var r = iq(this), n = aq(t, arguments.length > 1 ? arguments[1] : void 0), a = oq(r, function(i, o) {
      if (n(i, o, r))
        return { value: i };
    }, !0);
    return a && a.value;
  }
});
var sq = ge, lq = Ct, uq = Gt, fq = Or;
sq({ target: "Map", proto: !0, real: !0, forced: !0 }, {
  findKey: function(t) {
    var r = uq(this), n = lq(t, arguments.length > 1 ? arguments[1] : void 0), a = fq(r, function(i, o) {
      if (n(i, o, r))
        return { key: o };
    }, !0);
    return a && a.key;
  }
});
var cq = function(e, t) {
  return e === t || e != e && t != t;
}, dq = ge, pq = cq, vq = Gt, hq = Or;
dq({ target: "Map", proto: !0, real: !0, forced: !0 }, {
  includes: function(t) {
    return hq(vq(this), function(r) {
      if (pq(r, t))
        return !0;
    }, !0) === !0;
  }
});
var gq = ge, mq = Gt, bq = Or;
gq({ target: "Map", proto: !0, real: !0, forced: !0 }, {
  keyOf: function(t) {
    var r = bq(mq(this), function(n, a) {
      if (n === t)
        return { key: a };
    }, !0);
    return r && r.key;
  }
});
var _q = ge, yq = Ct, wq = Gt, Dw = Xr, Sq = Or, Oq = Dw.Map, kq = Dw.set;
_q({ target: "Map", proto: !0, real: !0, forced: !0 }, {
  mapKeys: function(t) {
    var r = wq(this), n = yq(t, arguments.length > 1 ? arguments[1] : void 0), a = new Oq();
    return Sq(r, function(i, o) {
      kq(a, n(i, o, r), i);
    }), a;
  }
});
var Eq = ge, $q = Ct, Tq = Gt, xw = Xr, Cq = Or, Aq = xw.Map, Iq = xw.set;
Eq({ target: "Map", proto: !0, real: !0, forced: !0 }, {
  mapValues: function(t) {
    var r = Tq(this), n = $q(t, arguments.length > 1 ? arguments[1] : void 0), a = new Aq();
    return Cq(r, function(i, o) {
      Iq(a, o, n(i, o, r));
    }), a;
  }
});
var Pq = ge, Rq = Gt, jq = Gi, Mq = Xr.set;
Pq({ target: "Map", proto: !0, real: !0, arity: 1, forced: !0 }, {
  // eslint-disable-next-line no-unused-vars -- required for `.length`
  merge: function(t) {
    for (var r = Rq(this), n = arguments.length, a = 0; a < n; )
      jq(arguments[a++], function(i, o) {
        Mq(r, i, o);
      }, { AS_ENTRIES: !0 });
    return r;
  }
});
var Nq = ge, Dq = Dt, xq = Gt, Fq = Or, Lq = TypeError;
Nq({ target: "Map", proto: !0, real: !0, forced: !0 }, {
  reduce: function(t) {
    var r = xq(this), n = arguments.length < 2, a = n ? void 0 : arguments[1];
    if (Dq(t), Fq(r, function(i, o) {
      n ? (n = !1, a = i) : a = t(a, i, o, r);
    }), n)
      throw Lq("Reduce of empty map with no initial value");
    return a;
  }
});
var Bq = ge, zq = Ct, Vq = Gt, qq = Or;
Bq({ target: "Map", proto: !0, real: !0, forced: !0 }, {
  some: function(t) {
    var r = Vq(this), n = zq(t, arguments.length > 1 ? arguments[1] : void 0);
    return qq(r, function(a, i) {
      if (n(a, i, r))
        return !0;
    }, !0) === !0;
  }
});
var Uq = ge, sg = Dt, Hq = Gt, wd = Xr, Gq = TypeError, Wq = wd.get, Kq = wd.has, Jq = wd.set;
Uq({ target: "Map", proto: !0, real: !0, forced: !0 }, {
  update: function(t, r) {
    var n = Hq(this), a = arguments.length;
    sg(r);
    var i = Kq(n, t);
    if (!i && a < 3)
      throw Gq("Updating absent value");
    var o = i ? Wq(n, t) : sg(a > 2 ? arguments[2] : void 0)(t, n);
    return Jq(n, t, r(o, t, n)), n;
  }
});
Object.defineProperty(ct, "__esModule", {
  value: !0
});
ct.WrongTableNameError = ct.TableAlreadyExistsError = ct.SQLParseError = ct.ArgumentTypeError = ct.WrongSchemaError = ct.NoSuchColumnError = ct.MixedTypeError = ct.FileNotFoundError = void 0;
function ei(e) {
  return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? ei = function(r) {
    return typeof r;
  } : ei = function(r) {
    return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
  }, ei(e);
}
function Qr(e, t) {
  if (!(e instanceof t))
    throw new TypeError("Cannot call a class as a function");
}
function Zr(e, t) {
  return t && (ei(t) === "object" || typeof t == "function") ? t : Yq(e);
}
function Yq(e) {
  if (e === void 0)
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  return e;
}
function en(e, t) {
  if (typeof t != "function" && t !== null)
    throw new TypeError("Super expression must either be null or a function");
  e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && hi(e, t);
}
function _r(e) {
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  return _r = function(n) {
    if (n === null || !Qq(n))
      return n;
    if (typeof n != "function")
      throw new TypeError("Super expression must either be null or a function");
    if (typeof t < "u") {
      if (t.has(n))
        return t.get(n);
      t.set(n, a);
    }
    function a() {
      return Qo(n, arguments, ur(this).constructor);
    }
    return a.prototype = Object.create(n.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } }), hi(a, n);
  }, _r(e);
}
function Xq() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function")
    return !0;
  try {
    return Date.prototype.toString.call(Reflect.construct(Date, [], function() {
    })), !0;
  } catch {
    return !1;
  }
}
function Qo(e, t, r) {
  return Xq() ? Qo = Reflect.construct : Qo = function(a, i, o) {
    var s = [null];
    s.push.apply(s, i);
    var l = Function.bind.apply(a, s), u = new l();
    return o && hi(u, o.prototype), u;
  }, Qo.apply(null, arguments);
}
function Qq(e) {
  return Function.toString.call(e).indexOf("[native code]") !== -1;
}
function hi(e, t) {
  return hi = Object.setPrototypeOf || function(n, a) {
    return n.__proto__ = a, n;
  }, hi(e, t);
}
function ur(e) {
  return ur = Object.setPrototypeOf ? Object.getPrototypeOf : function(r) {
    return r.__proto__ || Object.getPrototypeOf(r);
  }, ur(e);
}
var Zq = function(e) {
  en(t, e);
  function t(r) {
    var n;
    return Qr(this, t), n = Zr(this, ur(t).call(this, Error)), n.message = "".concat(r, " not found. You maybe use a wrong path or url. Be sure you use absolute path, relative one being not supported."), n.name = "FileNotFoundError", n;
  }
  return t;
}(_r(Error));
ct.FileNotFoundError = Zq;
var eU = function(e) {
  en(t, e);
  function t() {
    var r;
    Qr(this, t), r = Zr(this, ur(t).call(this, TypeError));
    for (var n = arguments.length, a = new Array(n), i = 0; i < n; i++)
      a[i] = arguments[i];
    return r.message = "can't work with multiple variable types: [".concat(a.join(","), "]."), r.name = "MixedTypeError", r;
  }
  return t;
}(_r(TypeError));
ct.MixedTypeError = eU;
var tU = function(e) {
  en(t, e);
  function t(r, n) {
    var a;
    return Qr(this, t), a = Zr(this, ur(t).call(this, Error)), a.message = "".concat(r, " not found in [").concat(n.join(", "), "]."), a.name = "NoSuchColumnError", a;
  }
  return t;
}(_r(Error));
ct.NoSuchColumnError = tU;
var rU = function(e) {
  en(t, e);
  function t(r, n) {
    var a;
    return Qr(this, t), a = Zr(this, ur(t).call(this, Error)), a.message = "[".concat(r.join(", "), "] while expecting [").concat(n.join(", "), "]."), a.name = "WrongSchemaError", a;
  }
  return t;
}(_r(Error));
ct.WrongSchemaError = rU;
var nU = function(e) {
  en(t, e);
  function t(r, n) {
    var a;
    return Qr(this, t), a = Zr(this, ur(t).call(this, TypeError)), a.message = "".concat(r && r.constructor ? r.constructor.name : ei(r), " while expecting ").concat(n, "."), a.name = "ArgumentTypeError", a;
  }
  return t;
}(_r(TypeError));
ct.ArgumentTypeError = nU;
var aU = function(e) {
  en(t, e);
  function t(r) {
    var n;
    return Qr(this, t), n = Zr(this, ur(t).call(this, Error)), n.message = "".concat(r, "."), n.name = "SQLParseError", n;
  }
  return t;
}(_r(Error));
ct.SQLParseError = aU;
var iU = function(e) {
  en(t, e);
  function t(r) {
    var n;
    return Qr(this, t), n = Zr(this, ur(t).call(this, Error)), n.message = "The SQL temporary table ".concat(r, " already exits. Use overwrite = true to overwrite it."), n.name = "TableAlreadyExistsError", n;
  }
  return t;
}(_r(Error));
ct.TableAlreadyExistsError = iU;
var oU = function(e) {
  en(t, e);
  function t(r) {
    var n;
    return Qr(this, t), n = Zr(this, ur(t).call(this, Error)), n.message = "The SQL temporary table ".concat(r, " is not allowed. Avoid to use Spaces, quotes, tabs...."), n.name = "WrongTableNameError", n;
  }
  return t;
}(_r(Error));
ct.WrongTableNameError = oU;
var Ji = {}, sU = ge, lU = Gy, uU = Ie, fU = _t, cU = vi.onFreeze, Af = Object.freeze, dU = uU(function() {
  Af(1);
});
sU({ target: "Object", stat: !0, forced: dU, sham: !lU }, {
  freeze: function(t) {
    return Af && fU(t) ? Af(cU(t)) : t;
  }
});
Object.defineProperty(Ji, "__esModule", {
  value: !0
});
Ji.default = void 0;
var lg = At, So = ct;
function Vn(e, t, r) {
  return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
}
function qn(e) {
  return hU(e) || vU(e) || pU();
}
function pU() {
  throw new TypeError("Invalid attempt to spread non-iterable instance");
}
function vU(e) {
  if (Symbol.iterator in Object(e) || Object.prototype.toString.call(e) === "[object Arguments]")
    return Array.from(e);
}
function hU(e) {
  if (Array.isArray(e)) {
    for (var t = 0, r = new Array(e.length); t < e.length; t++)
      r[t] = e[t];
    return r;
  }
}
function gU(e, t) {
  if (!(e instanceof t))
    throw new TypeError("Cannot call a class as a function");
}
function ug(e, t) {
  for (var r = 0; r < t.length; r++) {
    var n = t[r];
    n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
  }
}
function mU(e, t, r) {
  return t && ug(e.prototype, t), r && ug(e, r), e;
}
var cr = Symbol("columns"), Nr = Symbol("values"), bU = function() {
  function e(t, r) {
    if (gU(this, e), !t)
      throw new So.ArgumentTypeError(t, "Row | Array | Object");
    this[cr] = r || Object.keys(t), this[Nr] = Object.freeze(this._build(t));
  }
  return mU(e, [{
    key: Symbol.iterator,
    value: regeneratorRuntime.mark(function() {
      var r, n, a;
      return regeneratorRuntime.wrap(function(o) {
        for (; ; )
          switch (o.prev = o.next) {
            case 0:
              r = 0, n = Object.values(this[Nr]);
            case 1:
              if (!(r < n.length)) {
                o.next = 8;
                break;
              }
              return a = n[r], o.next = 5, a;
            case 5:
              r++, o.next = 1;
              break;
            case 8:
            case "end":
              return o.stop();
          }
      }, a, this);
    })
  }, {
    key: "__newInstance__",
    value: function(r, n) {
      var a;
      return (0, lg.arrayEqual)(this[cr], n) ? Object.assign(Object.create(Object.getPrototypeOf(this)), this, (a = {}, Vn(a, Nr, r), Vn(a, cr, qn(n)), a)) : new e(r, n);
    }
  }, {
    key: "_build",
    value: function(r) {
      if (r instanceof Array)
        return this._fromArray(r);
      if (r instanceof e)
        return this._fromObject(r[Nr]);
      if (r instanceof Object && r !== null)
        return this._fromObject(r);
      throw new So.ArgumentTypeError(r, "Row | Array | Object");
    }
  }, {
    key: "_fromObject",
    value: function(r) {
      return Object.assign.apply(Object, [{}].concat(qn(this[cr].map(function(n) {
        return Vn({}, n, r[n]);
      }))));
    }
  }, {
    key: "_fromArray",
    value: function(r) {
      return Object.assign.apply(Object, [{}].concat(qn(Object.entries(this[cr]).map(function(n) {
        return Vn({}, n[1], r[n[0]]);
      }))));
    }
  }, {
    key: "toDict",
    value: function() {
      return Object.assign({}, this[Nr]);
    }
  }, {
    key: "toArray",
    value: function() {
      return qn(this);
    }
  }, {
    key: "size",
    value: function() {
      return this[cr].length;
    }
  }, {
    key: "hash",
    value: function() {
      return (0, lg.hashCode)(JSON.stringify(this[Nr]));
    }
  }, {
    key: "has",
    value: function(r) {
      return this[cr].includes(r);
    }
  }, {
    key: "select",
    value: function() {
      for (var r = this, n = arguments.length, a = new Array(n), i = 0; i < n; i++)
        a[i] = arguments[i];
      return this.__newInstance__(Object.assign.apply(Object, [{}].concat(qn(a.map(function(o) {
        return Vn({}, o, r.get(o));
      })))), a);
    }
  }, {
    key: "get",
    value: function(r) {
      if (!this.has(r))
        throw new So.NoSuchColumnError(r, this[cr]);
      return this[Nr][r];
    }
  }, {
    key: "set",
    value: function(r, n) {
      var a = Object.assign({}, this[Nr], Vn({}, r, n));
      return this.__newInstance__(a, Object.keys(a));
    }
  }, {
    key: "delete",
    value: function(r) {
      if (!this.has(r))
        throw new So.NoSuchColumnError(r, this[cr]);
      return this.select.apply(this, qn(this[cr].filter(function(n) {
        return n !== r;
      })));
    }
  }]), e;
}(), _U = bU;
Ji.default = _U;
var Yi = {}, yU = ge, wU = bt, SU = P_, OU = er, kU = Gr, EU = zi;
yU({ target: "Object", stat: !0, sham: !wU }, {
  getOwnPropertyDescriptors: function(t) {
    for (var r = OU(t), n = kU.f, a = SU(r), i = {}, o = 0, s, l; a.length > o; )
      l = n(r, s = a[o++]), l !== void 0 && EU(i, s, l);
    return i;
  }
});
var Yt = {};
Object.defineProperty(Yt, "__esModule", {
  value: !0
});
Yt.__hashes__ = Yt.__groups__ = Yt.__rows__ = Yt.__columns__ = void 0;
var $U = Symbol("columns");
Yt.__columns__ = $U;
var TU = Symbol("rows");
Yt.__rows__ = TU;
var CU = Symbol("groups");
Yt.__groups__ = CU;
var AU = Symbol("hashes");
Yt.__hashes__ = AU;
Object.defineProperty(Yi, "__esModule", {
  value: !0
});
Yi.groupBy = BU;
Yi.GroupedDataFrame = void 0;
var Un = Yt;
function IU(e, t) {
  return jU(e) || RU(e, t) || PU();
}
function PU() {
  throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
function RU(e, t) {
  var r = [], n = !0, a = !1, i = void 0;
  try {
    for (var o = e[Symbol.iterator](), s; !(n = (s = o.next()).done) && (r.push(s.value), !(t && r.length === t)); n = !0)
      ;
  } catch (l) {
    a = !0, i = l;
  } finally {
    try {
      !n && o.return != null && o.return();
    } finally {
      if (a)
        throw i;
    }
  }
  return r;
}
function jU(e) {
  if (Array.isArray(e))
    return e;
}
function fg(e, t) {
  if (e == null)
    return {};
  var r = MU(e, t), n, a;
  if (Object.getOwnPropertySymbols) {
    var i = Object.getOwnPropertySymbols(e);
    for (a = 0; a < i.length; a++)
      n = i[a], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);
  }
  return r;
}
function MU(e, t) {
  if (e == null)
    return {};
  var r = {}, n = Object.keys(e), a, i;
  for (i = 0; i < n.length; i++)
    a = n[i], !(t.indexOf(a) >= 0) && (r[a] = e[a]);
  return r;
}
function cg(e, t) {
  var r = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var n = Object.getOwnPropertySymbols(e);
    t && (n = n.filter(function(a) {
      return Object.getOwnPropertyDescriptor(e, a).enumerable;
    })), r.push.apply(r, n);
  }
  return r;
}
function Oo(e) {
  for (var t = 1; t < arguments.length; t++) {
    var r = arguments[t] != null ? arguments[t] : {};
    t % 2 ? cg(r, !0).forEach(function(n) {
      Qa(e, n, r[n]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : cg(r).forEach(function(n) {
      Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
    });
  }
  return e;
}
function Qa(e, t, r) {
  return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
}
function gt(e) {
  return xU(e) || DU(e) || NU();
}
function NU() {
  throw new TypeError("Invalid attempt to spread non-iterable instance");
}
function DU(e) {
  if (Symbol.iterator in Object(e) || Object.prototype.toString.call(e) === "[object Arguments]")
    return Array.from(e);
}
function xU(e) {
  if (Array.isArray(e)) {
    for (var t = 0, r = new Array(e.length); t < e.length; t++)
      r[t] = e[t];
    return r;
  }
}
function FU(e, t) {
  if (!(e instanceof t))
    throw new TypeError("Cannot call a class as a function");
}
function dg(e, t) {
  for (var r = 0; r < t.length; r++) {
    var n = t[r];
    n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
  }
}
function LU(e, t, r) {
  return t && dg(e.prototype, t), r && dg(e, r), e;
}
var Fw = function() {
  function e(t, r, n, a) {
    FU(this, e), this[Un.__groups__] = n, this[Un.__hashes__] = a, this.df = t, this.on = r.length > 0 ? r : t.listColumns();
  }
  return LU(e, [{
    key: Symbol.iterator,
    value: regeneratorRuntime.mark(function t() {
      var r, n, a, i, o, s;
      return regeneratorRuntime.wrap(function(u) {
        for (; ; )
          switch (u.prev = u.next) {
            case 0:
              r = !0, n = !1, a = void 0, u.prev = 3, i = this[Un.__hashes__][Symbol.iterator]();
            case 5:
              if (r = (o = i.next()).done) {
                u.next = 12;
                break;
              }
              return s = o.value, u.next = 9, this[Un.__groups__][s];
            case 9:
              r = !0, u.next = 5;
              break;
            case 12:
              u.next = 18;
              break;
            case 14:
              u.prev = 14, u.t0 = u.catch(3), n = !0, a = u.t0;
            case 18:
              u.prev = 18, u.prev = 19, !r && i.return != null && i.return();
            case 21:
              if (u.prev = 21, !n) {
                u.next = 24;
                break;
              }
              throw a;
            case 24:
              return u.finish(21);
            case 25:
              return u.finish(18);
            case 26:
            case "end":
              return u.stop();
          }
      }, t, this, [[3, 14, 18, 26], [19, , 21, 25]]);
    })
  }, {
    key: "get",
    value: function(r) {
      return this[Un.__groups__][r];
    }
  }, {
    key: "toCollection",
    value: function() {
      return gt(this);
    }
  }, {
    key: "show",
    value: function() {
      var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
      return gt(this).map(function(n) {
        var a = n.group, i = n.groupKey, o = `--
[`.concat(JSON.stringify(i), `]
--`);
        return r || console.log(o), o + `
` + a.show(10, r);
      }).reduce(function(n, a) {
        return n + `
` + a;
      });
    }
  }, {
    key: "listGroups",
    value: function() {
      return gt(this).map(function(r) {
        var n = r.groupKey;
        return n;
      });
    }
  }, {
    key: "listHashs",
    value: function() {
      return this[Un.__hashes__];
    }
  }, {
    key: "map",
    value: function(r) {
      var n, a = gt(this).map(function(i) {
        var o = i.group;
        return o.map(r);
      });
      return this.df.__newInstance__((n = []).concat.apply(n, gt(a.map(function(i) {
        return i.toCollection();
      }))), a[0].listColumns());
    }
  }, {
    key: "filter",
    value: function(r) {
      var n, a = gt(this).map(function(i) {
        var o = i.group;
        return o.filter(r);
      }).filter(function(i) {
        return i.listColumns().length > 0;
      });
      return a.length === 0 ? this.df.__newInstance__([], this.df.listColumns()) : this.df.__newInstance__((n = []).concat.apply(n, gt(a.map(function(i) {
        return i.toCollection();
      }))), this.df.listColumns());
    }
  }, {
    key: "chain",
    value: function() {
      for (var r, n = arguments.length, a = new Array(n), i = 0; i < n; i++)
        a[i] = arguments[i];
      var o = gt(this).map(function(s) {
        var l = s.group;
        return l.chain.apply(l, a);
      });
      return this.df.__newInstance__((r = []).concat.apply(r, gt(o.map(function(s) {
        return s.toCollection();
      }))), o[0].listColumns());
    }
  }, {
    key: "aggregate",
    value: function(r) {
      var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "aggregation";
      return this.df.__newInstance__(gt(this).map(function(a) {
        var i = a.group, o = a.groupKey;
        return Oo({}, o, Qa({}, n, r(i, o)));
      }), [].concat(gt(this.on), [n]));
    }
  }, {
    key: "pivot",
    value: function(r) {
      var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function(i) {
        return i.count();
      }, a = [].concat(gt(this.on), gt(this.df.distinct(r).toArray(r)));
      return this.df.__newInstance__(this.aggregate(function(i) {
        return i.groupBy(r).aggregate(function(o, s) {
          return Qa({}, s[r], n(o, s));
        }).toArray("aggregation").reduce(function(o, s) {
          return Oo({}, o, {}, s);
        }, {});
      }).toCollection().map(function(i) {
        var o = i.aggregation, s = fg(i, ["aggregation"]);
        return Oo({}, s, {}, o);
      }), a);
    }
  }, {
    key: "melt",
    value: function() {
      var r = this, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "variable", a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "value", i = [].concat(gt(this.on), [n, a]);
      return this.df.__newInstance__(this.aggregate(function(o) {
        return Object.entries(o.toDict()).reduce(function(s, l) {
          var u = IU(l, 2), f = u[0], d = u[1];
          return [].concat(gt(s), gt(d.reduce(function(h, v) {
            var m;
            return r.on.includes(f) ? h : [].concat(gt(h), [(m = {}, Qa(m, n, f), Qa(m, a, v), m)]);
          }, [])));
        }, []);
      }).toCollection().reduce(function(o, s) {
        var l = s.aggregation, u = fg(s, ["aggregation"]);
        return [].concat(gt(o), gt(l.map(function(f) {
          return Oo({}, u, {}, f);
        })));
      }, []), i);
    }
  }]), e;
}();
Yi.GroupedDataFrame = Fw;
function BU(e, t) {
  var r = {}, n = [], a = !0, i = !1, o = void 0;
  try {
    for (var s = e.toCollection(!0)[Symbol.iterator](), l; !(a = (l = s.next()).done); a = !0) {
      var u = l.value, f = u.select.apply(u, gt(t)).hash();
      r[f] || (n.push(f), r[f] = []), r[f].push(u);
    }
  } catch (h) {
    i = !0, o = h;
  } finally {
    try {
      !a && s.return != null && s.return();
    } finally {
      if (i)
        throw o;
    }
  }
  var d = n.reduce(function(h, v) {
    var m;
    return h[v] = {
      groupKey: (m = r[v][0]).select.apply(m, gt(t)).toDict(),
      hash: v,
      group: new e.constructor(r[v], e.listColumns())
    }, h;
  }, {});
  return new Fw(e, t, d, n);
}
var Lt = {}, zU = TypeError, VU = function(e, t) {
  if (e < t)
    throw zU("Not enough arguments");
  return e;
}, qU = Cn, Lw = /(?:ipad|iphone|ipod).*applewebkit/i.test(qU), Vt = nt, UU = Ui, HU = Ct, pg = at, GU = yt, WU = Ie, vg = D_, KU = el, hg = Us, JU = VU, YU = Lw, XU = Ra, If = Vt.setImmediate, Pf = Vt.clearImmediate, QU = Vt.process, bu = Vt.Dispatch, ZU = Vt.Function, gg = Vt.MessageChannel, eH = Vt.String, _u = 0, ti = {}, mg = "onreadystatechange", gi, on, yu, wu;
try {
  gi = Vt.location;
} catch {
}
var Sd = function(e) {
  if (GU(ti, e)) {
    var t = ti[e];
    delete ti[e], t();
  }
}, Su = function(e) {
  return function() {
    Sd(e);
  };
}, bg = function(e) {
  Sd(e.data);
}, _g = function(e) {
  Vt.postMessage(eH(e), gi.protocol + "//" + gi.host);
};
(!If || !Pf) && (If = function(t) {
  JU(arguments.length, 1);
  var r = pg(t) ? t : ZU(t), n = KU(arguments, 1);
  return ti[++_u] = function() {
    UU(r, void 0, n);
  }, on(_u), _u;
}, Pf = function(t) {
  delete ti[t];
}, XU ? on = function(e) {
  QU.nextTick(Su(e));
} : bu && bu.now ? on = function(e) {
  bu.now(Su(e));
} : gg && !YU ? (yu = new gg(), wu = yu.port2, yu.port1.onmessage = bg, on = HU(wu.postMessage, wu)) : Vt.addEventListener && pg(Vt.postMessage) && !Vt.importScripts && gi && gi.protocol !== "file:" && !WU(_g) ? (on = _g, Vt.addEventListener("message", bg, !1)) : mg in hg("script") ? on = function(e) {
  vg.appendChild(hg("script"))[mg] = function() {
    vg.removeChild(this), Sd(e);
  };
} : on = function(e) {
  setTimeout(Su(e), 0);
});
var Bw = {
  set: If,
  clear: Pf
}, tH = Cn, rH = nt, nH = /ipad|iphone|ipod/i.test(tH) && rH.Pebble !== void 0, aH = Cn, iH = /web0s(?!.*chrome)/i.test(aH), En = nt, yg = Ct, oH = Gr.f, Ou = Bw.set, sH = Lw, lH = nH, uH = iH, ku = Ra, wg = En.MutationObserver || En.WebKitMutationObserver, Sg = En.document, Og = En.process, ko = En.Promise, kg = oH(En, "queueMicrotask"), zw = kg && kg.value, Ha, cn, ri, Kn, Eu, $u, Eo, Eg;
zw || (Ha = function() {
  var e, t;
  for (ku && (e = Og.domain) && e.exit(); cn; ) {
    t = cn.fn, cn = cn.next;
    try {
      t();
    } catch (r) {
      throw cn ? Kn() : ri = void 0, r;
    }
  }
  ri = void 0, e && e.enter();
}, !sH && !ku && !uH && wg && Sg ? (Eu = !0, $u = Sg.createTextNode(""), new wg(Ha).observe($u, { characterData: !0 }), Kn = function() {
  $u.data = Eu = !Eu;
}) : !lH && ko && ko.resolve ? (Eo = ko.resolve(void 0), Eo.constructor = ko, Eg = yg(Eo.then, Eo), Kn = function() {
  Eg(Ha);
}) : ku ? Kn = function() {
  Og.nextTick(Ha);
} : (Ou = yg(Ou, En), Kn = function() {
  Ou(Ha);
}));
var fH = zw || function(e) {
  var t = { fn: e, next: void 0 };
  ri && (ri.next = t), cn || (cn = t, Kn()), ri = t;
}, cH = nt, dH = function(e, t) {
  var r = cH.console;
  r && r.error && (arguments.length == 1 ? r.error(e) : r.error(e, t));
}, Od = function(e) {
  try {
    return { error: !1, value: e() };
  } catch (t) {
    return { error: !0, value: t };
  }
}, Vw = function() {
  this.head = null, this.tail = null;
};
Vw.prototype = {
  add: function(e) {
    var t = { item: e, next: null };
    this.head ? this.tail.next = t : this.head = t, this.tail = t;
  },
  get: function() {
    var e = this.head;
    if (e)
      return this.head = e.next, this.tail === e && (this.tail = null), e.item;
  }
};
var pH = Vw, vH = nt, sl = vH.Promise, qw = typeof Deno == "object" && Deno && typeof Deno.version == "object", hH = qw, gH = Ra, mH = !hH && !gH && typeof window == "object" && typeof document == "object", bH = nt, ni = sl, _H = at, yH = Fi, wH = Cc, SH = it, OH = mH, kH = qw, Tu = An;
ni && ni.prototype;
var EH = SH("species"), Rf = !1, Uw = _H(bH.PromiseRejectionEvent), $H = yH("Promise", function() {
  var e = wH(ni), t = e !== String(ni);
  if (!t && Tu === 66)
    return !0;
  if (!Tu || Tu < 51 || !/native code/.test(e)) {
    var r = new ni(function(i) {
      i(1);
    }), n = function(i) {
      i(function() {
      }, function() {
      });
    }, a = r.constructor = {};
    if (a[EH] = n, Rf = r.then(function() {
    }) instanceof n, !Rf)
      return !0;
  }
  return !t && (OH || kH) && !Uw;
}), Xi = {
  CONSTRUCTOR: $H,
  REJECTION_EVENT: Uw,
  SUBCLASSING: Rf
}, ja = {}, $g = Dt, TH = TypeError, CH = function(e) {
  var t, r;
  this.promise = new e(function(n, a) {
    if (t !== void 0 || r !== void 0)
      throw TH("Bad Promise constructor");
    t = n, r = a;
  }), this.resolve = $g(t), this.reject = $g(r);
};
ja.f = function(e) {
  return new CH(e);
};
var AH = ge, ms = Ra, Hr = nt, ca = Xe, Tg = xt, Cg = nl, IH = Vi, PH = ld, RH = Dt, Zo = at, jH = _t, MH = od, NH = yw, Hw = Bw.set, kd = fH, DH = dH, xH = Od, FH = pH, Gw = Jr, bs = sl, Ed = Xi, Ww = ja, ll = "Promise", Kw = Ed.CONSTRUCTOR, LH = Ed.REJECTION_EVENT, BH = Ed.SUBCLASSING, Cu = Gw.getterFor(ll), zH = Gw.set, Jn = bs && bs.prototype, dn = bs, $o = Jn, Jw = Hr.TypeError, jf = Hr.document, $d = Hr.process, Mf = Ww.f, VH = Mf, qH = !!(jf && jf.createEvent && Hr.dispatchEvent), Yw = "unhandledrejection", UH = "rejectionhandled", Ag = 0, Xw = 1, HH = 2, Td = 1, Qw = 2, To, Ig, GH, Pg, Zw = function(e) {
  var t;
  return jH(e) && Zo(t = e.then) ? t : !1;
}, e2 = function(e, t) {
  var r = t.value, n = t.state == Xw, a = n ? e.ok : e.fail, i = e.resolve, o = e.reject, s = e.domain, l, u, f;
  try {
    a ? (n || (t.rejection === Qw && KH(t), t.rejection = Td), a === !0 ? l = r : (s && s.enter(), l = a(r), s && (s.exit(), f = !0)), l === e.promise ? o(Jw("Promise-chain cycle")) : (u = Zw(l)) ? ca(u, l, i, o) : i(l)) : o(r);
  } catch (d) {
    s && !f && s.exit(), o(d);
  }
}, t2 = function(e, t) {
  e.notified || (e.notified = !0, kd(function() {
    for (var r = e.reactions, n; n = r.get(); )
      e2(n, e);
    e.notified = !1, t && !e.rejection && WH(e);
  }));
}, r2 = function(e, t, r) {
  var n, a;
  qH ? (n = jf.createEvent("Event"), n.promise = t, n.reason = r, n.initEvent(e, !1, !0), Hr.dispatchEvent(n)) : n = { promise: t, reason: r }, !LH && (a = Hr["on" + e]) ? a(n) : e === Yw && DH("Unhandled promise rejection", r);
}, WH = function(e) {
  ca(Hw, Hr, function() {
    var t = e.facade, r = e.value, n = Rg(e), a;
    if (n && (a = xH(function() {
      ms ? $d.emit("unhandledRejection", r, t) : r2(Yw, t, r);
    }), e.rejection = ms || Rg(e) ? Qw : Td, a.error))
      throw a.value;
  });
}, Rg = function(e) {
  return e.rejection !== Td && !e.parent;
}, KH = function(e) {
  ca(Hw, Hr, function() {
    var t = e.facade;
    ms ? $d.emit("rejectionHandled", t) : r2(UH, t, e.value);
  });
}, Zn = function(e, t, r) {
  return function(n) {
    e(t, n, r);
  };
}, ra = function(e, t, r) {
  e.done || (e.done = !0, r && (e = r), e.value = t, e.state = HH, t2(e, !0));
}, Nf = function(e, t, r) {
  if (!e.done) {
    e.done = !0, r && (e = r);
    try {
      if (e.facade === t)
        throw Jw("Promise can't be resolved itself");
      var n = Zw(t);
      n ? kd(function() {
        var a = { done: !1 };
        try {
          ca(
            n,
            t,
            Zn(Nf, a, e),
            Zn(ra, a, e)
          );
        } catch (i) {
          ra(a, i, e);
        }
      }) : (e.value = t, e.state = Xw, t2(e, !1));
    } catch (a) {
      ra({ done: !1 }, a, e);
    }
  }
};
if (Kw && (dn = function(t) {
  MH(this, $o), RH(t), ca(To, this);
  var r = Cu(this);
  try {
    t(Zn(Nf, r), Zn(ra, r));
  } catch (n) {
    ra(r, n);
  }
}, $o = dn.prototype, To = function(t) {
  zH(this, {
    type: ll,
    done: !1,
    notified: !1,
    parent: !1,
    reactions: new FH(),
    rejection: !1,
    state: Ag,
    value: void 0
  });
}, To.prototype = Tg($o, "then", function(t, r) {
  var n = Cu(this), a = Mf(NH(this, dn));
  return n.parent = !0, a.ok = Zo(t) ? t : !0, a.fail = Zo(r) && r, a.domain = ms ? $d.domain : void 0, n.state == Ag ? n.reactions.add(a) : kd(function() {
    e2(a, n);
  }), a.promise;
}), Ig = function() {
  var e = new To(), t = Cu(e);
  this.promise = e, this.resolve = Zn(Nf, t), this.reject = Zn(ra, t);
}, Ww.f = Mf = function(e) {
  return e === dn || e === GH ? new Ig(e) : VH(e);
}, Zo(bs) && Jn !== Object.prototype)) {
  Pg = Jn.then, BH || Tg(Jn, "then", function(t, r) {
    var n = this;
    return new dn(function(a, i) {
      ca(Pg, n, a, i);
    }).then(t, r);
  }, { unsafe: !0 });
  try {
    delete Jn.constructor;
  } catch {
  }
  Cg && Cg(Jn, $o);
}
AH({ global: !0, constructor: !0, wrap: !0, forced: Kw }, {
  Promise: dn
});
IH(dn, ll, !1);
PH(ll);
var JH = sl, YH = Hc, XH = Xi.CONSTRUCTOR, n2 = XH || !YH(function(e) {
  JH.all(e).then(void 0, function() {
  });
}), QH = ge, ZH = Xe, eG = Dt, tG = ja, rG = Od, nG = Gi, aG = n2;
QH({ target: "Promise", stat: !0, forced: aG }, {
  all: function(t) {
    var r = this, n = tG.f(r), a = n.resolve, i = n.reject, o = rG(function() {
      var s = eG(r.resolve), l = [], u = 0, f = 1;
      nG(t, function(d) {
        var h = u++, v = !1;
        f++, ZH(s, r, d).then(function(m) {
          v || (v = !0, l[h] = m, --f || a(l));
        }, i);
      }), --f || a(l);
    });
    return o.error && i(o.value), n.promise;
  }
});
var iG = ge, oG = Xi.CONSTRUCTOR, Df = sl, sG = Ut, lG = at, uG = xt, jg = Df && Df.prototype;
iG({ target: "Promise", proto: !0, forced: oG, real: !0 }, {
  catch: function(e) {
    return this.then(void 0, e);
  }
});
if (lG(Df)) {
  var Mg = sG("Promise").prototype.catch;
  jg.catch !== Mg && uG(jg, "catch", Mg, { unsafe: !0 });
}
var fG = ge, cG = Xe, dG = Dt, pG = ja, vG = Od, hG = Gi, gG = n2;
fG({ target: "Promise", stat: !0, forced: gG }, {
  race: function(t) {
    var r = this, n = pG.f(r), a = n.reject, i = vG(function() {
      var o = dG(r.resolve);
      hG(t, function(s) {
        cG(o, r, s).then(n.resolve, a);
      });
    });
    return i.error && a(i.value), n.promise;
  }
});
var mG = ge, bG = Xe, _G = ja, yG = Xi.CONSTRUCTOR;
mG({ target: "Promise", stat: !0, forced: yG }, {
  reject: function(t) {
    var r = _G.f(this);
    return bG(r.reject, void 0, t), r.promise;
  }
});
var wG = Ot, SG = _t, OG = ja, kG = function(e, t) {
  if (wG(e), SG(t) && t.constructor === e)
    return t;
  var r = OG.f(e), n = r.resolve;
  return n(t), r.promise;
}, EG = ge, $G = Ut, TG = Xi.CONSTRUCTOR, CG = kG;
$G("Promise");
EG({ target: "Promise", stat: !0, forced: TG }, {
  resolve: function(t) {
    return CG(this, t);
  }
});
var AG = Xe, IG = cd, PG = Ot, RG = Sr, jG = Gs, Au = It, MG = Wr, NG = $a, DG = dd, Ng = vd;
IG("match", function(e, t, r) {
  return [
    // `String.prototype.match` method
    // https://tc39.es/ecma262/#sec-string.prototype.match
    function(a) {
      var i = MG(this), o = RG(a) ? void 0 : NG(a, e);
      return o ? AG(o, a, i) : new RegExp(a)[e](Au(i));
    },
    // `RegExp.prototype[@@match]` method
    // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
    function(n) {
      var a = PG(this), i = Au(n), o = r(t, a, i);
      if (o.done)
        return o.value;
      if (!a.global)
        return Ng(a, i);
      var s = a.unicode;
      a.lastIndex = 0;
      for (var l = [], u = 0, f; (f = Ng(a, i)) !== null; ) {
        var d = Au(f[0]);
        l[u] = d, d === "" && (a.lastIndex = DG(i, jG(a.lastIndex), s)), u++;
      }
      return u === 0 ? null : l;
    }
  ];
});
var Wt = "$";
function _s() {
}
_s.prototype = Cd.prototype = {
  constructor: _s,
  has: function(e) {
    return Wt + e in this;
  },
  get: function(e) {
    return this[Wt + e];
  },
  set: function(e, t) {
    return this[Wt + e] = t, this;
  },
  remove: function(e) {
    var t = Wt + e;
    return t in this && delete this[t];
  },
  clear: function() {
    for (var e in this)
      e[0] === Wt && delete this[e];
  },
  keys: function() {
    var e = [];
    for (var t in this)
      t[0] === Wt && e.push(t.slice(1));
    return e;
  },
  values: function() {
    var e = [];
    for (var t in this)
      t[0] === Wt && e.push(this[t]);
    return e;
  },
  entries: function() {
    var e = [];
    for (var t in this)
      t[0] === Wt && e.push({ key: t.slice(1), value: this[t] });
    return e;
  },
  size: function() {
    var e = 0;
    for (var t in this)
      t[0] === Wt && ++e;
    return e;
  },
  empty: function() {
    for (var e in this)
      if (e[0] === Wt)
        return !1;
    return !0;
  },
  each: function(e) {
    for (var t in this)
      t[0] === Wt && e(this[t], t.slice(1), this);
  }
};
function Cd(e, t) {
  var r = new _s();
  if (e instanceof _s)
    e.each(function(s, l) {
      r.set(l, s);
    });
  else if (Array.isArray(e)) {
    var n = -1, a = e.length, i;
    if (t == null)
      for (; ++n < a; )
        r.set(n, e[n]);
    else
      for (; ++n < a; )
        r.set(t(i = e[n], n, e), i);
  } else if (e)
    for (var o in e)
      r.set(o, e[o]);
  return r;
}
function Dg() {
}
var sn = Cd.prototype;
Dg.prototype = {
  constructor: Dg,
  has: sn.has,
  add: function(e) {
    return e += "", this[Wt + e] = e, this;
  },
  remove: sn.remove,
  clear: sn.clear,
  values: sn.keys,
  size: sn.size,
  empty: sn.empty,
  each: sn.each
};
var xG = { value: function() {
} };
function a2() {
  for (var e = 0, t = arguments.length, r = {}, n; e < t; ++e) {
    if (!(n = arguments[e] + "") || n in r || /[\s.]/.test(n))
      throw new Error("illegal type: " + n);
    r[n] = [];
  }
  return new es(r);
}
function es(e) {
  this._ = e;
}
function FG(e, t) {
  return e.trim().split(/^|\s+/).map(function(r) {
    var n = "", a = r.indexOf(".");
    if (a >= 0 && (n = r.slice(a + 1), r = r.slice(0, a)), r && !t.hasOwnProperty(r))
      throw new Error("unknown type: " + r);
    return { type: r, name: n };
  });
}
es.prototype = a2.prototype = {
  constructor: es,
  on: function(e, t) {
    var r = this._, n = FG(e + "", r), a, i = -1, o = n.length;
    if (arguments.length < 2) {
      for (; ++i < o; )
        if ((a = (e = n[i]).type) && (a = LG(r[a], e.name)))
          return a;
      return;
    }
    if (t != null && typeof t != "function")
      throw new Error("invalid callback: " + t);
    for (; ++i < o; )
      if (a = (e = n[i]).type)
        r[a] = xg(r[a], e.name, t);
      else if (t == null)
        for (a in r)
          r[a] = xg(r[a], e.name, null);
    return this;
  },
  copy: function() {
    var e = {}, t = this._;
    for (var r in t)
      e[r] = t[r].slice();
    return new es(e);
  },
  call: function(e, t) {
    if ((a = arguments.length - 2) > 0)
      for (var r = new Array(a), n = 0, a, i; n < a; ++n)
        r[n] = arguments[n + 2];
    if (!this._.hasOwnProperty(e))
      throw new Error("unknown type: " + e);
    for (i = this._[e], n = 0, a = i.length; n < a; ++n)
      i[n].value.apply(t, r);
  },
  apply: function(e, t, r) {
    if (!this._.hasOwnProperty(e))
      throw new Error("unknown type: " + e);
    for (var n = this._[e], a = 0, i = n.length; a < i; ++a)
      n[a].value.apply(t, r);
  }
};
function LG(e, t) {
  for (var r = 0, n = e.length, a; r < n; ++r)
    if ((a = e[r]).name === t)
      return a.value;
}
function xg(e, t, r) {
  for (var n = 0, a = e.length; n < a; ++n)
    if (e[n].name === t) {
      e[n] = xG, e = e.slice(0, n).concat(e.slice(n + 1));
      break;
    }
  return r != null && e.push({ name: t, value: r }), e;
}
function Ad(e, t) {
  var r, n = a2("beforesend", "progress", "load", "error"), a, i = Cd(), o = new XMLHttpRequest(), s = null, l = null, u, f, d = 0;
  typeof XDomainRequest < "u" && !("withCredentials" in o) && /^(http(s)?:)?\/\//.test(e) && (o = new XDomainRequest()), "onload" in o ? o.onload = o.onerror = o.ontimeout = h : o.onreadystatechange = function(v) {
    o.readyState > 3 && h(v);
  };
  function h(v) {
    var m = o.status, g;
    if (!m && zG(o) || m >= 200 && m < 300 || m === 304) {
      if (u)
        try {
          g = u.call(r, o);
        } catch (_) {
          n.call("error", r, _);
          return;
        }
      else
        g = o;
      n.call("load", r, g);
    } else
      n.call("error", r, v);
  }
  if (o.onprogress = function(v) {
    n.call("progress", r, v);
  }, r = {
    header: function(v, m) {
      return v = (v + "").toLowerCase(), arguments.length < 2 ? i.get(v) : (m == null ? i.remove(v) : i.set(v, m + ""), r);
    },
    // If mimeType is non-null and no Accept header is set, a default is used.
    mimeType: function(v) {
      return arguments.length ? (a = v == null ? null : v + "", r) : a;
    },
    // Specifies what type the response value should take;
    // for instance, arraybuffer, blob, document, or text.
    responseType: function(v) {
      return arguments.length ? (f = v, r) : f;
    },
    timeout: function(v) {
      return arguments.length ? (d = +v, r) : d;
    },
    user: function(v) {
      return arguments.length < 1 ? s : (s = v == null ? null : v + "", r);
    },
    password: function(v) {
      return arguments.length < 1 ? l : (l = v == null ? null : v + "", r);
    },
    // Specify how to convert the response content to a specific type;
    // changes the callback value on "load" events.
    response: function(v) {
      return u = v, r;
    },
    // Alias for send("GET", …).
    get: function(v, m) {
      return r.send("GET", v, m);
    },
    // Alias for send("POST", …).
    post: function(v, m) {
      return r.send("POST", v, m);
    },
    // If callback is non-null, it will be used for error and load events.
    send: function(v, m, g) {
      return o.open(v, e, !0, s, l), a != null && !i.has("accept") && i.set("accept", a + ",*/*"), o.setRequestHeader && i.each(function(_, b) {
        o.setRequestHeader(b, _);
      }), a != null && o.overrideMimeType && o.overrideMimeType(a), f != null && (o.responseType = f), d > 0 && (o.timeout = d), g == null && typeof m == "function" && (g = m, m = null), g != null && g.length === 1 && (g = BG(g)), g != null && r.on("error", g).on("load", function(_) {
        g(null, _);
      }), n.call("beforesend", r, o), o.send(m ?? null), r;
    },
    abort: function() {
      return o.abort(), r;
    },
    on: function() {
      var v = n.on.apply(n, arguments);
      return v === n ? r : v;
    }
  }, t != null) {
    if (typeof t != "function")
      throw new Error("invalid callback: " + t);
    return r.get(t);
  }
  return r;
}
function BG(e) {
  return function(t, r) {
    e(t == null ? r : null);
  };
}
function zG(e) {
  var t = e.responseType;
  return t && t !== "text" ? e.response : e.responseText;
}
function ul(e, t) {
  return function(r, n) {
    var a = Ad(r).mimeType(e).response(t);
    if (n != null) {
      if (typeof n != "function")
        throw new Error("invalid callback: " + n);
      return a.get(n);
    }
    return a;
  };
}
const VG = ul("text/html", function(e) {
  return document.createRange().createContextualFragment(e.responseText);
}), qG = ul("application/json", function(e) {
  return JSON.parse(e.responseText);
}), UG = ul("text/plain", function(e) {
  return e.responseText;
}), HG = ul("application/xml", function(e) {
  var t = e.responseXML;
  if (!t)
    throw new Error("parse error");
  return t;
});
var Fg = {}, Iu = {}, Pu = 34, Ga = 10, Ru = 13;
function i2(e) {
  return new Function("d", "return {" + e.map(function(t, r) {
    return JSON.stringify(t) + ": d[" + r + "]";
  }).join(",") + "}");
}
function GG(e, t) {
  var r = i2(e);
  return function(n, a) {
    return t(r(n), a, e);
  };
}
function WG(e) {
  var t = /* @__PURE__ */ Object.create(null), r = [];
  return e.forEach(function(n) {
    for (var a in n)
      a in t || r.push(t[a] = a);
  }), r;
}
function Id(e) {
  var t = new RegExp('["' + e + `
\r]`), r = e.charCodeAt(0);
  function n(u, f) {
    var d, h, v = a(u, function(m, g) {
      if (d)
        return d(m, g - 1);
      h = m, d = f ? GG(m, f) : i2(m);
    });
    return v.columns = h || [], v;
  }
  function a(u, f) {
    var d = [], h = u.length, v = 0, m = 0, g, _ = h <= 0, b = !1;
    u.charCodeAt(h - 1) === Ga && --h, u.charCodeAt(h - 1) === Ru && --h;
    function S() {
      if (_)
        return Iu;
      if (b)
        return b = !1, Fg;
      var w, C = v, E;
      if (u.charCodeAt(C) === Pu) {
        for (; v++ < h && u.charCodeAt(v) !== Pu || u.charCodeAt(++v) === Pu; )
          ;
        return (w = v) >= h ? _ = !0 : (E = u.charCodeAt(v++)) === Ga ? b = !0 : E === Ru && (b = !0, u.charCodeAt(v) === Ga && ++v), u.slice(C + 1, w - 1).replace(/""/g, '"');
      }
      for (; v < h; ) {
        if ((E = u.charCodeAt(w = v++)) === Ga)
          b = !0;
        else if (E === Ru)
          b = !0, u.charCodeAt(v) === Ga && ++v;
        else if (E !== r)
          continue;
        return u.slice(C, w);
      }
      return _ = !0, u.slice(C, h);
    }
    for (; (g = S()) !== Iu; ) {
      for (var k = []; g !== Fg && g !== Iu; )
        k.push(g), g = S();
      f && (k = f(k, m++)) == null || d.push(k);
    }
    return d;
  }
  function i(u, f) {
    return f == null && (f = WG(u)), [f.map(l).join(e)].concat(u.map(function(d) {
      return f.map(function(h) {
        return l(d[h]);
      }).join(e);
    })).join(`
`);
  }
  function o(u) {
    return u.map(s).join(`
`);
  }
  function s(u) {
    return u.map(l).join(e);
  }
  function l(u) {
    return u == null ? "" : t.test(u += "") ? '"' + u.replace(/"/g, '""') + '"' : u;
  }
  return {
    parse: n,
    parseRows: a,
    format: i,
    formatRows: o
  };
}
var fl = Id(","), o2 = fl.parse, KG = fl.parseRows, JG = fl.format, YG = fl.formatRows, cl = Id("	"), s2 = cl.parse, XG = cl.parseRows, QG = cl.format, ZG = cl.formatRows;
const eW = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  csvFormat: JG,
  csvFormatRows: YG,
  csvParse: o2,
  csvParseRows: KG,
  dsvFormat: Id,
  tsvFormat: QG,
  tsvFormatRows: ZG,
  tsvParse: s2,
  tsvParseRows: XG
}, Symbol.toStringTag, { value: "Module" }));
function l2(e, t) {
  return function(r, n, a) {
    arguments.length < 3 && (a = n, n = null);
    var i = Ad(r).mimeType(e);
    return i.row = function(o) {
      return arguments.length ? i.response(tW(t, n = o)) : n;
    }, i.row(n), a ? i.get(a) : i;
  };
}
function tW(e, t) {
  return function(r) {
    return e(r.responseText, t);
  };
}
const rW = l2("text/csv", o2), nW = l2("text/tab-separated-values", s2), aW = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  csv: rW,
  html: VG,
  json: qG,
  request: Ad,
  text: UG,
  tsv: nW,
  xml: HG
}, Symbol.toStringTag, { value: "Module" })), iW = /* @__PURE__ */ oc(aW), oW = /* @__PURE__ */ oc(eW), sW = {}, lW = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: sW
}, Symbol.toStringTag, { value: "Module" })), uW = /* @__PURE__ */ oc(lW);
Object.defineProperty(Lt, "__esModule", {
  value: !0
});
Lt.toDSV = dW;
Lt.toCSV = vW;
Lt.toTSV = hW;
Lt.toPSV = gW;
Lt.toText = pW;
Lt.toJSON = mW;
Lt.fromDSV = Qi;
Lt.fromCSV = _W;
Lt.fromTSV = yW;
Lt.fromPSV = wW;
Lt.fromText = bW;
Lt.fromJSON = SW;
var u2 = iW, f2 = oW, fW = Yt, c2 = ct, cW = /^(?:[/]|[./]|(?:[a-zA-z]:\/)).*$/;
function d2(e, t) {
  try {
    uW.writeFileSync(e, t);
  } catch {
    console.warn("File system module is not available.");
  }
}
function p2(e, t) {
  if (FileReader && File) {
    var r = new FileReader();
    r.onload = function(n) {
      return t(n.target.result);
    }, r.readAsText(e);
  }
}
function v2(e) {
  var t = String(e).match(cW);
  return t ? "file://".concat(e) : e;
}
function dW(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ";", r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, a = (0, f2.dsvFormat)(t), i = r ? a.format(e.toCollection(), e[fW.__columns__]) : a.formatRows(e.toArray());
  return n && d2(e._cleanSavePath(n), i), i;
}
function pW(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ";", r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0;
  return e.toDSV(t, r, n);
}
function vW(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0;
  return e.toDSV(",", t, r);
}
function hW(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0;
  return e.toDSV("	", t, r);
}
function gW(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0;
  return e.toDSV("|", t, r);
}
function mW(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, n = JSON.stringify(t ? e.toCollection() : e.toDict());
  return r && d2(e._cleanSavePath(r), n), n;
}
function Qi(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ";", r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, n = (0, f2.dsvFormat)(t);
  return new Promise(function(a) {
    var i = function(s) {
      if (s.includes("Error: ENOENT"))
        return a(null);
      var l = r ? n.parse(s) : n.parseRows(s);
      return a(l);
    };
    return typeof e == "string" ? (0, u2.text)(v2(e), i) : p2(e, i);
  }).then(function(a) {
    if (a === null)
      throw new c2.FileNotFoundError(e);
    return a;
  });
}
function bW(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ";", r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
  return Qi(e, t, r);
}
function _W(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  return Qi(e, ",", t);
}
function yW(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  return Qi(e, "	", t);
}
function wW(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  return Qi(e, "|", t);
}
function SW(e) {
  return new Promise(function(t) {
    return typeof e == "string" ? (0, u2.json)(v2(e), t) : p2(e, function(r) {
      return t(JSON.parse(r));
    });
  }).then(function(t) {
    if (t === null)
      throw new c2.FileNotFoundError(e);
    return t;
  });
}
Object.defineProperty(Ta, "__esModule", {
  value: !0
});
Ta.default = void 0;
var nr = At, ln = ct, Co = EW(Ji), OW = Yi, be = Yt, ft = kW(Lt);
function kW(e) {
  if (e && e.__esModule)
    return e;
  var t = {};
  if (e != null) {
    for (var r in e)
      if (Object.prototype.hasOwnProperty.call(e, r)) {
        var n = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(e, r) : {};
        n.get || n.set ? Object.defineProperty(t, r, n) : t[r] = e[r];
      }
  }
  return t.default = e, t;
}
function EW(e) {
  return e && e.__esModule ? e : { default: e };
}
function Lr(e) {
  return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Lr = function(r) {
    return typeof r;
  } : Lr = function(r) {
    return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
  }, Lr(e);
}
function ju(e, t, r) {
  return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
}
function tt(e) {
  return CW(e) || TW(e) || $W();
}
function $W() {
  throw new TypeError("Invalid attempt to spread non-iterable instance");
}
function TW(e) {
  if (Symbol.iterator in Object(e) || Object.prototype.toString.call(e) === "[object Arguments]")
    return Array.from(e);
}
function CW(e) {
  if (Array.isArray(e)) {
    for (var t = 0, r = new Array(e.length); t < e.length; t++)
      r[t] = e[t];
    return r;
  }
}
function Mu(e, t) {
  return PW(e) || IW(e, t) || AW();
}
function AW() {
  throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
function IW(e, t) {
  var r = [], n = !0, a = !1, i = void 0;
  try {
    for (var o = e[Symbol.iterator](), s; !(n = (s = o.next()).done) && (r.push(s.value), !(t && r.length === t)); n = !0)
      ;
  } catch (l) {
    a = !0, i = l;
  } finally {
    try {
      !n && o.return != null && o.return();
    } finally {
      if (a)
        throw i;
    }
  }
  return r;
}
function PW(e) {
  if (Array.isArray(e))
    return e;
}
function RW(e, t) {
  if (!(e instanceof t))
    throw new TypeError("Cannot call a class as a function");
}
function Lg(e, t) {
  for (var r = 0; r < t.length; r++) {
    var n = t[r];
    n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
  }
}
function Bg(e, t, r) {
  return t && Lg(e.prototype, t), r && Lg(e, r), e;
}
var h2 = function() {
  Bg(e, null, [{
    key: "setDefaultModules",
    value: function() {
      for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
        n[a] = arguments[a];
      e.defaultModules = n;
    }
  }, {
    key: "fromDSV",
    value: function() {
      return ft.fromDSV.apply(ft, arguments).then(function(r) {
        return new e(r);
      });
    }
  }, {
    key: "fromText",
    value: function() {
      return ft.fromText.apply(ft, arguments).then(function(r) {
        return new e(r);
      });
    }
  }, {
    key: "fromCSV",
    value: function() {
      return ft.fromCSV.apply(ft, arguments).then(function(r) {
        return new e(r);
      });
    }
  }, {
    key: "fromTSV",
    value: function() {
      return ft.fromTSV.apply(ft, arguments).then(function(r) {
        return new e(r);
      });
    }
  }, {
    key: "fromPSV",
    value: function() {
      return ft.fromPSV.apply(ft, arguments).then(function(r) {
        return new e(r);
      });
    }
  }, {
    key: "fromJSON",
    value: function() {
      return ft.fromJSON.apply(ft, arguments).then(function(r) {
        return new e(r);
      });
    }
  }]);
  function e(t, r) {
    var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
    RW(this, e);
    var a = this._build(t, r), i = Mu(a, 2);
    this[be.__rows__] = i[0], this[be.__columns__] = i[1], this.options = n, this.options.modules = [].concat(tt(e.defaultModules), tt(this.options.modules || [])), Object.assign.apply(Object, [this].concat(tt(this.__instanciateModules__(this.options.modules))));
  }
  return Bg(e, [{
    key: Symbol.iterator,
    value: regeneratorRuntime.mark(function t() {
      var r, n, a, i, o, s;
      return regeneratorRuntime.wrap(function(u) {
        for (; ; )
          switch (u.prev = u.next) {
            case 0:
              r = !0, n = !1, a = void 0, u.prev = 3, i = this[be.__rows__][Symbol.iterator]();
            case 5:
              if (r = (o = i.next()).done) {
                u.next = 12;
                break;
              }
              return s = o.value, u.next = 9, s;
            case 9:
              r = !0, u.next = 5;
              break;
            case 12:
              u.next = 18;
              break;
            case 14:
              u.prev = 14, u.t0 = u.catch(3), n = !0, a = u.t0;
            case 18:
              u.prev = 18, u.prev = 19, !r && i.return != null && i.return();
            case 21:
              if (u.prev = 21, !n) {
                u.next = 24;
                break;
              }
              throw a;
            case 24:
              return u.finish(21);
            case 25:
              return u.finish(18);
            case 26:
            case "end":
              return u.stop();
          }
      }, t, this, [[3, 14, 18, 26], [19, , 21, 25]]);
    })
  }, {
    key: "_columnsAreEquals",
    value: function(r) {
      for (var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[be.__columns__], a = 0, i = Object.keys(r); a < i.length; a++) {
        var o = i[a];
        if (r[o] !== n[o])
          return !1;
      }
      return !0;
    }
  }, {
    key: "__newInstance__",
    value: function(r, n) {
      if (!this._columnsAreEquals(n) || !(r[0] instanceof Co.default))
        return new e(r, n, this.options);
      var a = Object.keys(r[0].toDict());
      if (!(0, nr.arrayEqual)(a, this[be.__columns__], !0))
        return new e(r, a, this.options);
      var i = new e([], [], this.options);
      return i[be.__rows__] = tt(r), i[be.__columns__] = tt(n), i;
    }
  }, {
    key: "__instanciateModules__",
    value: function(r) {
      var n = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : void 0;
      return r.map(function(i) {
        var o = new i(a || n);
        return ju({}, o.name, o);
      });
    }
  }, {
    key: "_build",
    value: function(r, n) {
      if (r instanceof e)
        return this._fromArray(Array.from(r[be.__rows__]), n || r[be.__columns__]);
      if (r instanceof Array && r.length > 0)
        return this._fromArray(r, n || Array.from(new Set(r.slice(0, 10).concat(r.slice(-10, -1)).map(function(a) {
          return Object.keys(a);
        }).reduce(function(a, i) {
          return a.concat(i);
        }))));
      if (r instanceof Array && r.length === 0)
        return this._fromArray(r, n || []);
      if (r instanceof Object)
        return this._fromDict(r, n || Object.keys(r));
      throw new ln.ArgumentTypeError(r, "DataFrame | Array | Object");
    }
  }, {
    key: "_fromDict",
    value: function(r, n) {
      return [(0, nr.transpose)(Object.values(r)).map(function(a) {
        return new Co.default(a, n);
      }), n];
    }
  }, {
    key: "_fromArray",
    value: function(r, n) {
      return [r.map(function(a) {
        return new Co.default(a, n);
      }), n];
    }
  }, {
    key: "_joinByType",
    value: function(r, n, a, i) {
      var o = this, s = n.listHashs();
      return r.toCollection().map(function(l) {
        var u = l.group, f = l.hash, d = s.includes(f), h = u;
        if (n.get(f)) {
          var v = n.get(f).group.toCollection(), m = u.toCollection().map(function(_) {
            return v.map(function(b) {
              return Object.assign({}, b, _);
            });
          }).reduce(function(_, b) {
            return [].concat(tt(_), tt(b));
          }, []);
          h = o.__newInstance__(m, i);
        }
        var g = function(b) {
          return b ? h : !1;
        };
        return a === "full" ? h : g(a === "out" ? !d : d);
      }).filter(function(l) {
        return l;
      });
    }
  }, {
    key: "_join",
    value: function(r, n, a) {
      if (!(r instanceof e))
        throw new ln.ArgumentTypeError(r, "DataFrame");
      var i = tt(new Set([].concat(tt(this.listColumns()), tt(r.listColumns())))), o = Array.isArray(n) ? n : [n], s = this.groupBy.apply(this, tt(o)), l = r.groupBy.apply(r, tt(o));
      return [this.__newInstance__([], i)].concat(tt((0, nr.iter)([].concat(tt(a[0] ? this._joinByType(s, l, a[0], i) : []), tt(a[1] ? this._joinByType(l, s, a[1], i) : [])), function(u) {
        return u.restructure(i);
      }))).reduce(function(u, f) {
        return u.union(f);
      }).dropDuplicates();
    }
  }, {
    key: "_cleanSavePath",
    value: function(r) {
      return r.replace("file://", "/");
    }
  }, {
    key: "toDSV",
    value: function() {
      for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
        n[a] = arguments[a];
      return ft.toDSV.apply(ft, [this].concat(n));
    }
  }, {
    key: "toCSV",
    value: function() {
      for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
        n[a] = arguments[a];
      return ft.toCSV.apply(ft, [this].concat(n));
    }
  }, {
    key: "toTSV",
    value: function() {
      for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
        n[a] = arguments[a];
      return ft.toTSV.apply(ft, [this].concat(n));
    }
  }, {
    key: "toPSV",
    value: function() {
      for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
        n[a] = arguments[a];
      return ft.toPSV.apply(ft, [this].concat(n));
    }
  }, {
    key: "toText",
    value: function() {
      for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
        n[a] = arguments[a];
      return ft.toText.apply(ft, [this].concat(n));
    }
  }, {
    key: "toJSON",
    value: function() {
      for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
        n[a] = arguments[a];
      return ft.toJSON.apply(ft, [this].concat(n));
    }
  }, {
    key: "toDict",
    value: function() {
      var r = this;
      return Object.assign.apply(Object, [{}].concat(tt(Object.entries(this.transpose().toArray()).map(function(n) {
        var a = Mu(n, 2), i = a[0], o = a[1];
        return ju({}, r[be.__columns__][i], o);
      }))));
    }
  }, {
    key: "toArray",
    value: function(r) {
      return r ? Array.from(this).map(function(n) {
        return n.get(r);
      }) : Array.from(this).map(function(n) {
        return n.toArray();
      });
    }
  }, {
    key: "toCollection",
    value: function(r) {
      return r ? Array.from(this) : Array.from(this).map(function(n) {
        return n.toDict();
      });
    }
  }, {
    key: "show",
    value: function() {
      var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, a = function(u) {
        return "| ".concat(u.map(function(f) {
          var d = String(f);
          return d.length > 9 ? d.substring(0, 6) + "..." : d + Array(10 - d.length).join(" ");
        }).join(" | "), " |");
      }, i = a(this[be.__columns__]), o = 0, s = [i, Array(i.length).join("-")].concat(tt((0, nr.iter)(this[be.__rows__], function(l) {
        return o++, a(l.toArray());
      }, function() {
        return o >= r;
      }))).join(`
`);
      return n || console.log(s), s;
    }
  }, {
    key: "dim",
    value: function() {
      return [this.count(), this[be.__columns__].length];
    }
  }, {
    key: "transpose",
    value: function(r) {
      var n = [].concat(tt(r ? ["rowNames"] : []), tt(tt(Array(this.count()).keys()).reverse())), a = (0, nr.transpose)((r ? this.push(this[be.__columns__]) : this).toArray());
      return this.__newInstance__(a, n.reverse()).restructure(n);
    }
  }, {
    key: "count",
    value: function() {
      return this[be.__rows__].length;
    }
  }, {
    key: "countValue",
    value: function(r) {
      var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this[be.__columns__][0];
      return this.filter(function(a) {
        return a.get(n) === r;
      }).count();
    }
  }, {
    key: "push",
    value: function() {
      for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
        n[a] = arguments[a];
      return this.union(new e(n, this[be.__columns__]));
    }
  }, {
    key: "replace",
    value: function(r, n, a) {
      var i = this, o = a && a.length > 0 ? a : this[be.__columns__], s = Array.isArray(r) ? r : [r];
      return this.map(function(l) {
        return (o.length > 0 ? o : i[be.__columns__]).reduce(function(u, f) {
          return s.includes(u.get(f)) ? u.set(f, n) : u;
        }, l);
      });
    }
  }, {
    key: "distinct",
    value: function(r) {
      return this.__newInstance__(ju({}, r, tt(new Set(this.toArray(r)))), [r]);
    }
  }, {
    key: "unique",
    value: function(r) {
      return this.distinct(r);
    }
  }, {
    key: "listColumns",
    value: function() {
      return tt(this[be.__columns__]);
    }
  }, {
    key: "select",
    value: function() {
      for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
        n[a] = arguments[a];
      return this.__newInstance__(this[be.__rows__].map(function(i) {
        return i.select.apply(i, n);
      }), n);
    }
  }, {
    key: "withColumn",
    value: function(r) {
      var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {
      };
      return this.__newInstance__(this[be.__rows__].map(function(a, i) {
        return a.set(r, n(a, i));
      }), this[be.__columns__].includes(r) ? this[be.__columns__] : [].concat(tt(this[be.__columns__]), [r]));
    }
  }, {
    key: "restructure",
    value: function(r) {
      return this.__newInstance__(this[be.__rows__], r);
    }
  }, {
    key: "renameAll",
    value: function(r) {
      if (r.length !== this[be.__columns__].length)
        throw new ln.WrongSchemaError(r, this[be.__columns__]);
      return this.__newInstance__(this.toArray(), r);
    }
  }, {
    key: "rename",
    value: function(r, n) {
      var a = this[be.__columns__].map(function(i) {
        return i === r ? n : i;
      });
      return this.renameAll(a);
    }
  }, {
    key: "castAll",
    value: function(r) {
      var n = this;
      if (r.length !== this[be.__columns__].length)
        throw new ln.WrongSchemaError(r, this[be.__columns__]);
      return this.map(function(a) {
        return new Co.default(a.toArray().map(function(i, o) {
          return r[o](i);
        }), n[be.__columns__]);
      });
    }
  }, {
    key: "cast",
    value: function(r, n) {
      return this.withColumn(r, function(a) {
        return n(a.get(r));
      });
    }
  }, {
    key: "drop",
    value: function(r) {
      return this.__newInstance__(this[be.__rows__].map(function(n) {
        return n.delete(r);
      }), this[be.__columns__].filter(function(n) {
        return n !== r;
      }));
    }
  }, {
    key: "chain",
    value: function() {
      for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
        n[a] = arguments[a];
      return this.__newInstance__(tt(nr.chain.apply(void 0, [this[be.__rows__]].concat(n))), this[be.__columns__]);
    }
  }, {
    key: "filter",
    value: function(r) {
      var n = Lr(r) === "object" ? function(i) {
        return Object.entries(r).map(function(o) {
          var s = Mu(o, 2), l = s[0], u = s[1];
          return Object.is(i.get(l), u);
        }).reduce(function(o, s) {
          return o && s;
        });
      } : r, a = (0, nr.iter)(this[be.__rows__], function(i, o) {
        return n(i, o) ? i : !1;
      });
      return this.__newInstance__(a, this[be.__columns__]);
    }
  }, {
    key: "where",
    value: function(r) {
      return this.filter(r);
    }
  }, {
    key: "find",
    value: function(r) {
      return this.filter(r)[be.__rows__][0];
    }
  }, {
    key: "map",
    value: function(r) {
      return this.__newInstance__((0, nr.iter)(this[be.__rows__], function(n, a) {
        return r(n, a);
      }), this[be.__columns__]);
    }
  }, {
    key: "reduce",
    value: function(r, n) {
      return typeof n > "u" ? this[be.__rows__].reduce(function(a, i) {
        return r(a, i);
      }) : this[be.__rows__].reduce(function(a, i) {
        return r(a, i);
      }, n);
    }
  }, {
    key: "reduceRight",
    value: function(r, n) {
      return typeof n > "u" ? this[be.__rows__].reduceRight(function(a, i) {
        return r(a, i);
      }) : this[be.__rows__].reduceRight(function(a, i) {
        return r(a, i);
      }, n);
    }
  }, {
    key: "dropDuplicates",
    value: function() {
      for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
        n[a] = arguments[a];
      var i = n && n.length > 0 ? n : this[be.__columns__];
      return this.groupBy.apply(this, tt(i)).filter(function(o, s) {
        return s === 0;
      });
    }
  }, {
    key: "dropMissingValues",
    value: function(r) {
      var n = r && r.length > 0 ? r : this[be.__columns__];
      return this.filter(function(a) {
        var i = !0, o = !1, s = void 0;
        try {
          for (var l = n[Symbol.iterator](), u; !(i = (u = l.next()).done); i = !0) {
            var f = u.value;
            if ([NaN, void 0, null].includes(a.get(f)))
              return !1;
          }
        } catch (d) {
          o = !0, s = d;
        } finally {
          try {
            !i && l.return != null && l.return();
          } finally {
            if (o)
              throw s;
          }
        }
        return !0;
      });
    }
  }, {
    key: "fillMissingValues",
    value: function(r, n) {
      return this.replace([NaN, void 0, null], r, n);
    }
  }, {
    key: "shuffle",
    value: function() {
      return this.count() < 2 ? this : this.__newInstance__(this.reduce(function(r, n) {
        var a = Math.floor(Math.random() * (r.length - 1) + 1);
        return Array.isArray(r) ? [].concat(tt(r.slice(a, r.length + 1)), [n], tt(r.slice(0, a))) : [r, n];
      }), this[be.__columns__]);
    }
  }, {
    key: "sample",
    value: function(r) {
      var n = this.count() * r, a = 0;
      return this.__newInstance__((0, nr.iter)(this.shuffle()[be.__rows__], function(i) {
        return a++, i;
      }, function() {
        return a >= n;
      }), this[be.__columns__]);
    }
  }, {
    key: "bisect",
    value: function(r) {
      var n = this.count() * r, a = 0, i = [];
      return [this.__newInstance__((0, nr.iter)(this.shuffle()[be.__rows__], function(o) {
        if (a < n)
          return a++, o;
        i.push(o);
      }), this[be.__columns__]), this.__newInstance__(i, this[be.__columns__])];
    }
  }, {
    key: "groupBy",
    value: function() {
      for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
        n[a] = arguments[a];
      return (0, OW.groupBy)(this, n);
    }
  }, {
    key: "sortBy",
    value: function(r) {
      var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "first";
      Array.isArray(r) || (r = [r]);
      var i = r, o = ["first", "last"].includes(a) ? a : "first", s = function(h) {
        return [NaN, null, void 0].includes(h);
      }, l = this[be.__rows__].sort(function(d, h) {
        return i.map(function(v) {
          var m = [d.get(v), h.get(v)], g = m[0], _ = m[1];
          if (s(g))
            return o === "last" ? 1 : -1;
          if (s(_))
            return o === "last" ? -1 : 1;
          if (Lr(g) !== Lr(_))
            throw new ln.MixedTypeError([Lr(g), Lr(_)]);
          return g > _ ? n ? -1 : 1 : g < _ ? n ? 1 : -1 : 0;
        }).reduce(function(v, m) {
          return v || m;
        });
      });
      if (i.length > 1) {
        var u = [], f = [];
        return l.forEach(function(d) {
          var h = !0, v = !1, m = void 0;
          try {
            for (var g = i[Symbol.iterator](), _; !(h = (_ = g.next()).done); h = !0) {
              var b = _.value;
              if (s(d.get(b))) {
                u.push(d);
                return;
              }
            }
          } catch (S) {
            v = !0, m = S;
          } finally {
            try {
              !h && g.return != null && g.return();
            } finally {
              if (v)
                throw m;
            }
          }
          f.push(d);
        }), this.__newInstance__(a === "last" ? f.concat(u) : u.concat(f), this[be.__columns__]);
      }
      return this.__newInstance__(l, this[be.__columns__]);
    }
  }, {
    key: "union",
    value: function(r) {
      if (!(r instanceof e))
        throw new ln.ArgumentTypeError(r, "DataFrame");
      if (!(0, nr.arrayEqual)(this[be.__columns__], r[be.__columns__]))
        throw new ln.WrongSchemaError(r[be.__columns__], this[be.__columns__]);
      return this.__newInstance__([].concat(tt(this), tt(r.restructure(this[be.__columns__]))), this[be.__columns__]);
    }
  }, {
    key: "join",
    value: function(r, n) {
      var a = this, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "inner", o = {
        inner: function() {
          return a.innerJoin(r, n);
        },
        full: function() {
          return a.fullJoin(r, n);
        },
        outer: function() {
          return a.outerJoin(r, n);
        },
        left: function() {
          return a.leftJoin(r, n);
        },
        right: function() {
          return a.rightJoin(r, n);
        }
      };
      return o[i]();
    }
  }, {
    key: "innerJoin",
    value: function(r, n) {
      return this._join(r, n, ["in"]);
    }
  }, {
    key: "fullJoin",
    value: function(r, n) {
      return this._join(r, n, ["full", "full"]);
    }
  }, {
    key: "outerJoin",
    value: function(r, n) {
      return this.fullJoin(r, n);
    }
  }, {
    key: "leftJoin",
    value: function(r, n) {
      return this._join(r, n, ["full", "in"]);
    }
  }, {
    key: "rightJoin",
    value: function(r, n) {
      return this._join(r, n, ["in", "full"]);
    }
  }, {
    key: "diff",
    value: function(r, n) {
      return this._join(r, n, ["out", "out"]);
    }
  }, {
    key: "head",
    value: function() {
      var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
      return this.slice(0, r);
    }
  }, {
    key: "tail",
    value: function() {
      var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
      return this.slice(-r);
    }
  }, {
    key: "slice",
    value: function(r, n) {
      return this.__newInstance__(this[be.__rows__].slice(r || void 0, n || void 0), this[be.__columns__]);
    }
  }, {
    key: "getRow",
    value: function(r) {
      return this[be.__rows__][r];
    }
  }, {
    key: "setRow",
    value: function(r) {
      var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function(i) {
        return i;
      }, a = Array.from(this[be.__rows__]);
      return a[r] = n(a[r]), this.__newInstance__(a, this[be.__columns__]);
    }
  }]), e;
}();
h2.defaultModules = [];
var jW = h2;
Ta.default = jW;
var dl = {}, MW = Pe, NW = MW(1 .valueOf), DW = ge, g2 = r5, xW = bt, m2 = nt, b2 = z_, _2 = Pe, FW = Fi, zg = yt, LW = sd, BW = Kr, zW = Ri, y2 = $c, VW = Ie, qW = Pn.f, UW = Gr.f, HW = Tt.f, GW = NW, WW = bd.trim, pl = "Number", na = m2[pl];
b2[pl];
var Pd = na.prototype, KW = m2.TypeError, JW = _2("".slice), Ao = _2("".charCodeAt), YW = function(e) {
  var t = y2(e, "number");
  return typeof t == "bigint" ? t : XW(t);
}, XW = function(e) {
  var t = y2(e, "number"), r, n, a, i, o, s, l, u;
  if (zW(t))
    throw KW("Cannot convert a Symbol value to a number");
  if (typeof t == "string" && t.length > 2) {
    if (t = WW(t), r = Ao(t, 0), r === 43 || r === 45) {
      if (n = Ao(t, 2), n === 88 || n === 120)
        return NaN;
    } else if (r === 48) {
      switch (Ao(t, 1)) {
        case 66:
        case 98:
          a = 2, i = 49;
          break;
        case 79:
        case 111:
          a = 8, i = 55;
          break;
        default:
          return +t;
      }
      for (o = JW(t, 2), s = o.length, l = 0; l < s; l++)
        if (u = Ao(o, l), u < 48 || u > i)
          return NaN;
      return parseInt(o, a);
    }
  }
  return +t;
}, Rd = FW(pl, !na(" 0o1") || !na("0b1") || na("+0x1")), QW = function(e) {
  return BW(Pd, e) && VW(function() {
    GW(e);
  });
}, vl = function(t) {
  var r = arguments.length < 1 ? 0 : na(YW(t));
  return QW(this) ? LW(Object(r), this, vl) : r;
};
vl.prototype = Pd;
Rd && !g2 && (Pd.constructor = vl);
DW({ global: !0, constructor: !0, wrap: !0, forced: Rd }, {
  Number: vl
});
var ZW = function(e, t) {
  for (var r = xW ? qW(t) : (
    // ES3:
    "MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(",")
  ), n = 0, a; r.length > n; n++)
    zg(t, a = r[n]) && !zg(e, a) && HW(e, a, UW(t, a));
};
(Rd || g2) && ZW(b2[pl], na);
var eK = ge;
eK({ target: "Number", stat: !0 }, {
  isNaN: function(t) {
    return t != t;
  }
});
Object.defineProperty(dl, "__esModule", {
  value: !0
});
dl.default = void 0;
var Io = At;
function tK(e, t) {
  if (!(e instanceof t))
    throw new TypeError("Cannot call a class as a function");
}
function Vg(e, t) {
  for (var r = 0; r < t.length; r++) {
    var n = t[r];
    n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
  }
}
function rK(e, t, r) {
  return t && Vg(e.prototype, t), r && Vg(e, r), e;
}
var nK = function() {
  function e(t) {
    tK(this, e), this.df = t, this.name = "stat";
  }
  return rK(e, [{
    key: "_castAsNumber",
    value: function(r) {
      return this.df.withColumn(r, function(n) {
        return Number(n.get(r));
      }).filter(function(n) {
        return !Number.isNaN(n.get(r));
      });
    }
  }, {
    key: "sum",
    value: function(r) {
      return Number(this.df.reduce(function(n, a) {
        return (0, Io.isNumber)(a.get(r)) ? n + Number(a.get(r)) : n;
      }, 0));
    }
  }, {
    key: "max",
    value: function(r) {
      return this._castAsNumber(r).reduce(function(n, a) {
        return a.get(r) > n.get(r) ? a : n;
      }).get(r);
    }
  }, {
    key: "min",
    value: function(r) {
      return this._castAsNumber(r).reduce(function(n, a) {
        return n.get(r) > a.get(r) ? a : n;
      }).get(r);
    }
  }, {
    key: "mean",
    value: function(r) {
      var n = this.df.filter(function(a) {
        return (0, Io.isNumber)(a.get(r));
      });
      return Number(n.reduce(function(a, i) {
        return (0, Io.isNumber)(i.get(r)) ? a + Number(i.get(r)) : a;
      }, 0)) / n.count();
    }
  }, {
    key: "average",
    value: function(r) {
      return this.mean(r);
    }
  }, {
    key: "var",
    value: function(r) {
      var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, a = this.df.filter(function(o) {
        return (0, Io.isNumber)(o.get(r));
      }), i = this.mean(r);
      return Number(a.reduce(function(o, s) {
        return o + Math.pow(s.get(r) - i, 2);
      }, 0)) / (a.count() - (n ? 0 : 1));
    }
  }, {
    key: "sd",
    value: function(r) {
      var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      return Math.sqrt(this.var(r, n));
    }
  }, {
    key: "stats",
    value: function(r) {
      return {
        sum: this.sum(r),
        mean: this.mean(r),
        min: this.min(r),
        max: this.max(r),
        var: this.var(r),
        varpop: this.var(r, !0),
        sd: this.sd(r),
        sdpop: this.sd(r, !0)
      };
    }
  }]), e;
}(), aK = nK;
dl.default = aK;
var hl = {};
Object.defineProperty(hl, "__esModule", {
  value: !0
});
hl.default = void 0;
var iK = oK(Ta), Po = ct, Ro = At;
function oK(e) {
  return e && e.__esModule ? e : { default: e };
}
function ar(e) {
  return uK(e) || lK(e) || sK();
}
function sK() {
  throw new TypeError("Invalid attempt to spread non-iterable instance");
}
function lK(e) {
  if (Symbol.iterator in Object(e) || Object.prototype.toString.call(e) === "[object Arguments]")
    return Array.from(e);
}
function uK(e) {
  if (Array.isArray(e)) {
    for (var t = 0, r = new Array(e.length); t < e.length; t++)
      r[t] = e[t];
    return r;
  }
}
function fK(e, t) {
  if (!(e instanceof t))
    throw new TypeError("Cannot call a class as a function");
}
function qg(e, t) {
  for (var r = 0; r < t.length; r++) {
    var n = t[r];
    n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
  }
}
function cK(e, t, r) {
  return t && qg(e.prototype, t), r && qg(e, r), e;
}
var dK = function() {
  function e(t) {
    fK(this, e), this.df = t, this.name = "matrix";
  }
  return cK(e, [{
    key: "isCommutative",
    value: function(r) {
      var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      if (!(r instanceof iK.default))
        throw new Po.ArgumentTypeError(r, "DataFrame");
      return (0, Ro.arrayEqual)(this.df.dim(), n ? r.dim().reverse() : r.dim(), !0);
    }
  }, {
    key: "add",
    value: function(r) {
      var n = this;
      if (!this.isCommutative(r))
        throw new Po.WrongSchemaError(this.df.dim(), r.dim());
      var a = ar(Array(this.df.dim()[1]).keys());
      return this.df.__newInstance__(ar((0, Ro.iter)(Object.keys(ar(this.df)), function(i) {
        var o = ar(n.df)[i].toArray(), s = ar(r)[i].toArray();
        return a.map(function(l) {
          return o[l] + s[l];
        });
      })), this.df.listColumns());
    }
  }, {
    key: "product",
    value: function(r) {
      if (typeof r != "number")
        throw new Po.ArgumentTypeError(r, "Number");
      return this.df.map(function(n) {
        return n.toArray().map(function(a) {
          return a * r;
        });
      });
    }
  }, {
    key: "dot",
    value: function(r) {
      var n = this;
      if (!this.isCommutative(r, !0))
        throw new Po.WrongSchemaError(this.df.dim(), r.dim().reverse());
      var a = ar(Array(this.df.dim()[0]).keys());
      return this.df.__newInstance__(ar((0, Ro.iter)(Object.keys(ar(this.df)), function(i) {
        var o = ar(n.df)[i].toArray();
        return ar((0, Ro.iter)(a, function(s) {
          var l = ar(r.transpose())[s].toArray();
          return Object.keys(l).reduce(function(u, f) {
            return u + l[f] * o[f];
          }, 0);
        }));
      })), a);
    }
  }]), e;
}(), pK = dK;
hl.default = pK;
var gl = {}, vK = Tt.f, hK = function(e, t, r) {
  r in e || vK(e, r, {
    configurable: !0,
    get: function() {
      return t[r];
    },
    set: function(n) {
      t[r] = n;
    }
  });
}, gK = bt, jd = nt, Zi = Pe, mK = Fi, bK = sd, _K = In, yK = Pn.f, Ug = Kr, wK = ud, Hg = It, SK = Uy, w2 = td, OK = hK, kK = xt, EK = Ie, $K = yt, TK = Jr.enforce, CK = ld, AK = it, S2 = zy, O2 = Vy, IK = AK("match"), Vr = jd.RegExp, Yn = Vr.prototype, PK = jd.SyntaxError, RK = Zi(Yn.exec), ys = Zi("".charAt), Gg = Zi("".replace), Wg = Zi("".indexOf), jK = Zi("".slice), MK = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/, yn = /a/g, Nu = /a/g, NK = new Vr(yn) !== yn, k2 = w2.MISSED_STICKY, DK = w2.UNSUPPORTED_Y, xK = gK && (!NK || k2 || S2 || O2 || EK(function() {
  return Nu[IK] = !1, Vr(yn) != yn || Vr(Nu) == Nu || Vr(yn, "i") != "/a/i";
})), FK = function(e) {
  for (var t = e.length, r = 0, n = "", a = !1, i; r <= t; r++) {
    if (i = ys(e, r), i === "\\") {
      n += i + ys(e, ++r);
      continue;
    }
    !a && i === "." ? n += "[\\s\\S]" : (i === "[" ? a = !0 : i === "]" && (a = !1), n += i);
  }
  return n;
}, LK = function(e) {
  for (var t = e.length, r = 0, n = "", a = [], i = {}, o = !1, s = !1, l = 0, u = "", f; r <= t; r++) {
    if (f = ys(e, r), f === "\\")
      f = f + ys(e, ++r);
    else if (f === "]")
      o = !1;
    else if (!o)
      switch (!0) {
        case f === "[":
          o = !0;
          break;
        case f === "(":
          RK(MK, jK(e, r + 1)) && (r += 2, s = !0), n += f, l++;
          continue;
        case (f === ">" && s):
          if (u === "" || $K(i, u))
            throw new PK("Invalid capture group name");
          i[u] = !0, a[a.length] = [u, l], s = !1, u = "";
          continue;
      }
    s ? u += f : n += f;
  }
  return [n, a];
};
if (mK("RegExp", xK)) {
  for (var un = function(t, r) {
    var n = Ug(Yn, this), a = wK(t), i = r === void 0, o = [], s = t, l, u, f, d, h, v;
    if (!n && a && i && t.constructor === un)
      return t;
    if ((a || Ug(Yn, t)) && (t = t.source, i && (r = SK(s))), t = t === void 0 ? "" : Hg(t), r = r === void 0 ? "" : Hg(r), s = t, S2 && "dotAll" in yn && (u = !!r && Wg(r, "s") > -1, u && (r = Gg(r, /s/g, ""))), l = r, k2 && "sticky" in yn && (f = !!r && Wg(r, "y") > -1, f && DK && (r = Gg(r, /y/g, ""))), O2 && (d = LK(t), t = d[0], o = d[1]), h = bK(Vr(t, r), n ? this : Yn, un), (u || f || o.length) && (v = TK(h), u && (v.dotAll = !0, v.raw = un(FK(t), l)), f && (v.sticky = !0), o.length && (v.groups = o)), t !== s)
      try {
        _K(h, "source", s === "" ? "(?:)" : s);
      } catch {
      }
    return h;
  }, Kg = yK(Vr), Jg = 0; Kg.length > Jg; )
    OK(un, Vr, Kg[Jg++]);
  Yn.constructor = un, un.prototype = Yn, kK(jd, "RegExp", un, { constructor: !0 });
}
CK("RegExp");
var Md = {}, BK = ge, zK = Aa.find, VK = rl, xf = "find", E2 = !0;
xf in [] && Array(1)[xf](function() {
  E2 = !1;
});
BK({ target: "Array", proto: !0, forced: E2 }, {
  find: function(t) {
    return zK(this, t, arguments.length > 1 ? arguments[1] : void 0);
  }
});
VK(xf);
var qK = ge, UK = Aa.findIndex, HK = rl, Ff = "findIndex", $2 = !0;
Ff in [] && Array(1)[Ff](function() {
  $2 = !1;
});
qK({ target: "Array", proto: !0, forced: $2 }, {
  findIndex: function(t) {
    return UK(this, t, arguments.length > 1 ? arguments[1] : void 0);
  }
});
HK(Ff);
var GK = ji.PROPER, WK = Ie, Yg = md, Xg = "​᠎", KK = function(e) {
  return WK(function() {
    return !!Yg[e]() || Xg[e]() !== Xg || GK && Yg[e].name !== e;
  });
}, JK = ge, YK = bd.trim, XK = KK;
JK({ target: "String", proto: !0, forced: XK("trim") }, {
  trim: function() {
    return YK(this);
  }
});
Object.defineProperty(Md, "__esModule", {
  value: !0
});
Md.default = C2;
var gr = At, Nd = ct;
function QK(e, t) {
  return tJ(e) || eJ(e, t) || ZK();
}
function ZK() {
  throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
function eJ(e, t) {
  var r = [], n = !0, a = !1, i = void 0;
  try {
    for (var o = e[Symbol.iterator](), s; !(n = (s = o.next()).done) && (r.push(s.value), !(t && r.length === t)); n = !0)
      ;
  } catch (l) {
    a = !0, i = l;
  } finally {
    try {
      !n && o.return != null && o.return();
    } finally {
      if (a)
        throw i;
    }
  }
  return r;
}
function tJ(e) {
  if (Array.isArray(e))
    return e;
}
function ws(e) {
  return aJ(e) || nJ(e) || rJ();
}
function rJ() {
  throw new TypeError("Invalid attempt to spread non-iterable instance");
}
function nJ(e) {
  if (Symbol.iterator in Object(e) || Object.prototype.toString.call(e) === "[object Arguments]")
    return Array.from(e);
}
function aJ(e) {
  if (Array.isArray(e)) {
    for (var t = 0, r = new Array(e.length); t < e.length; t++)
      r[t] = e[t];
    return r;
  }
}
var iJ = [["INNER JOIN", "INNERJOIN"], ["LEFT JOIN", "LEFTJOIN"], ["RIGHT JOIN", "RIGHTJOIN"], ["FULL JOIN", "FULLJOIN"], ["GROUP BY", "GROUPBY"]], jo = {
  IN: function(t, r) {
    return r.includes(t);
  },
  LIKE: function(t, r) {
    return r.includes(t) || t.includes(r);
  },
  ">=": function(t, r) {
    return t >= r;
  },
  "<=": function(t, r) {
    return t <= r;
  },
  "!=": function(t, r) {
    return t !== r;
  },
  "<": function(t, r) {
    return t < r;
  },
  ">": function(t, r) {
    return t > r;
  },
  "=": function(t, r) {
    return t === r;
  },
  AND: function(t, r) {
    return t && r;
  },
  OR: function(t, r) {
    return t || r;
  }
}, Du = {
  COUNT: function(t) {
    return t.count();
  },
  SUM: function(t, r) {
    return t.stat.sum(r);
  },
  MAX: function(t, r) {
    return t.stat.max(r);
  },
  MIN: function(t, r) {
    return t.stat.min(r);
  },
  AVG: function(t, r) {
    return t.stat.mean(r);
  }
};
function oJ(e) {
  for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
    r[n - 1] = arguments[n];
  var a = (0, gr.makeGenerator)(r), i = function o(s) {
    return s[0](e) ? s[1](e) : o(a.next().value);
  };
  return i(a.next().value);
}
function T2(e) {
  return (0, gr.xReplace)(e.join(" "), [" ", ""]).split(",");
}
function Wa(e, t, r) {
  var n = e.findIndex(function(a) {
    return a.toUpperCase() === "ON";
  }) + 1;
  return function(a) {
    return a.join(t[e[0]], T2(e.filter(function(i, o) {
      return o >= n;
    })), r);
  };
}
var Qg = {
  WHERE: function(t) {
    var r = (0, gr.xSplit)(t.join(" "), " AND ", " OR ");
    return function(n) {
      return n.filter(function(a) {
        var i = t.filter(function(o) {
          return ["AND", "OR"].includes(o.toUpperCase());
        });
        return r.map(function(o) {
          var s = gr.xContains.apply(void 0, [o].concat(ws(Object.keys(jo))))[0], l = o.split(s).map(function(f) {
            return f.trim();
          });
          if (!a.has(l[0]) && a.has(l[1]))
            return jo[s]((0, gr.xReplace)(l[0].trim(), ['"', ""], ["'", ""], ["`", ""]), String(a.get(l[1])));
          var u = Number(l[1]);
          return jo[s](String(a.get(l[0])), Number.isNaN(u) ? (0, gr.xReplace)(l[1].trim(), ['"', ""], ["'", ""], ["`", ""]) : u);
        }).reduce(function(o, s) {
          return jo[i.shift()](o, s);
        });
      });
    };
  },
  JOIN: function(t, r) {
    return Wa(t, r, "inner");
  },
  INNERJOIN: function(t, r) {
    return Wa(t, r, "inner");
  },
  LEFTJOIN: function(t, r) {
    return Wa(t, r, "left");
  },
  RIGHTJOIN: function(t, r) {
    return Wa(t, r, "right");
  },
  FULLJOIN: function(t, r) {
    return Wa(t, r, "full");
  },
  UNION: function(t, r) {
    return function(n) {
      return n.union(t[0].toUpperCase().includes("SELECT") ? C2(t.join(" "), r) : r[t[0]]);
    };
  },
  GROUPBY: function(t) {
    return function(r) {
      return r.groupBy.apply(r, ws(T2(t)));
    };
  }
};
function sJ(e) {
  var t = e;
  return iJ.forEach(function(r) {
    var n = QK(r, 2), a = n[0], i = n[1];
    t = t.replace(a, i).replace(a.toLowerCase(), i);
  }), t;
}
function lJ(e) {
  var t = sJ(e).split(" "), r = t.findIndex(function(n) {
    return n.toUpperCase() === "FROM";
  });
  if (r === -1)
    throw new Nd.SQLParseError("Your query should contains FROM keyword");
  return {
    selections: t.slice(0, r),
    table: t[r + 1],
    operations: t.slice(r + 2, t.length)
  };
}
function uJ(e, t) {
  var r = e.map(function(n, a) {
    return Object.keys(Qg).includes(n.toUpperCase()) ? a : void 0;
  }).filter(function(n) {
    return n !== void 0;
  });
  return r.map(function(n, a) {
    return Qg[e[n].toUpperCase()](e.slice(n + 1, r[a + 1] ? r[a + 1] : e.length), t);
  }).reduce(function(n, a) {
    return function(i) {
      return a(n(i));
    };
  }, function(n) {
    return n;
  });
}
function fJ(e) {
  if (e[0].toUpperCase() !== "SELECT")
    throw new Nd.SQLParseError("Your query should begin with SELECT keyword");
  return e.shift(), oJ(e.join(" ").split(",").map(function(t) {
    return t.trim();
  }), [function(t) {
    return (0, gr.xReplace)(t[0], [" ", ""]) === "*";
  }, function() {
    return function(t) {
      return t;
    };
  }], [function(t) {
    return t[0].toUpperCase().includes("DISTINCT");
  }, function(t) {
    var r = (0, gr.xReplace)(t[0].split(" AS ")[0], ["DISTINCT", ""], ["distinct", ""], [" ", ""]);
    return function(n) {
      return n.distinct(r).rename(r, t[0].includes("AS") ? t[0].split("AS")[1].replace(" ", "") : r);
    };
  }], [function(t) {
    return gr.xContains.apply(void 0, [t[0].toUpperCase()].concat(ws(Object.keys(Du))))[0];
  }, function(t) {
    return function(r) {
      var n = Object.keys(Du).find(function(i) {
        return t[0].toUpperCase().includes(i);
      }), a = function(o) {
        return Du[n](o, (0, gr.xReplace)(t[0], ["".concat(n.toLowerCase(), "("), ""], ["".concat(n, "("), ""], ["(", ""], [")", ""]));
      };
      return r.on && r.df ? r.aggregate(a) : a(r);
    };
  }], [function() {
    return !0;
  }, function(t) {
    return function(r) {
      return r.select.apply(r, ws(t.map(function(n) {
        return n.split(" AS ")[0].replace(" ", "");
      }))).renameAll(t.map(function(n) {
        return n.includes("AS") ? n.split("AS")[1].replace(" ", "") : n;
      }));
    };
  }]);
}
function C2(e, t) {
  var r = lJ(e), n = r.selections, a = r.table, i = r.operations;
  if (!a || !Object.keys(t).includes(a))
    throw new Nd.SQLParseError("Wrong table name in your query: ".concat(a));
  var o = uJ(i, t), s = fJ(n);
  return s(o(t[a]));
}
Object.defineProperty(gl, "__esModule", {
  value: !0
});
gl.default = void 0;
var cJ = A2(Md), dJ = A2(Ta), Mo = ct;
function A2(e) {
  return e && e.__esModule ? e : { default: e };
}
function pJ(e, t) {
  if (!(e instanceof t))
    throw new TypeError("Cannot call a class as a function");
}
function Zg(e, t) {
  for (var r = 0; r < t.length; r++) {
    var n = t[r];
    n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
  }
}
function em(e, t, r) {
  return t && Zg(e.prototype, t), r && Zg(e, r), e;
}
var I2 = function() {
  em(e, null, [{
    key: "request",
    value: function(r) {
      if (typeof r != "string")
        throw new Mo.ArgumentTypeError(r, "Stri g");
      return (0, cJ.default)(r, e.tables);
    }
  }, {
    key: "dropTables",
    value: function() {
      e.tables = {};
    }
  }, {
    key: "dropTable",
    value: function(r) {
      delete e.tables[r];
    }
  }, {
    key: "renameTable",
    value: function(r, n) {
      var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
      e.registerTable(e.tables[r], n, a), e.dropTable(r);
    }
  }, {
    key: "listTables",
    value: function() {
      return Object.keys(e.tables);
    }
  }, {
    key: "registerTable",
    value: function(r, n) {
      var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
      if (!(r instanceof dJ.default))
        throw new Mo.ArgumentTypeError(r, "DataFrame");
      var i = new RegExp("^[a-zA-Z_][a-zA-Z0-9_]*$");
      if (!i.test(n))
        throw new Mo.WrongTableNameError(n);
      if (e.listTables().includes(n) && !a)
        throw new Mo.TableAlreadyExistsError(n);
      e.tables[n] = r;
    }
  }]);
  function e(t) {
    pJ(this, e), this.df = t, this.name = "sql";
  }
  return em(e, [{
    key: "register",
    value: function(r) {
      var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      return e.registerTable(this.df, r, n), this.df;
    }
  }]), e;
}();
I2.tables = {};
var vJ = I2;
gl.default = vJ;
(function(e) {
  Object.defineProperty(e, "__esModule", {
    value: !0
  }), Object.defineProperty(e, "DataFrame", {
    enumerable: !0,
    get: function() {
      return t.default;
    }
  }), Object.defineProperty(e, "Row", {
    enumerable: !0,
    get: function() {
      return r.default;
    }
  }), e.Errors = e.default = void 0;
  var t = l(Ta), r = l(Ji), n = s(ct);
  e.Errors = n;
  var a = l(dl), i = l(hl), o = l(gl);
  function s(f) {
    if (f && f.__esModule)
      return f;
    var d = {};
    if (f != null) {
      for (var h in f)
        if (Object.prototype.hasOwnProperty.call(f, h)) {
          var v = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(f, h) : {};
          v.get || v.set ? Object.defineProperty(d, h, v) : d[h] = f[h];
        }
    }
    return d.default = f, d;
  }
  function l(f) {
    return f && f.__esModule ? f : { default: f };
  }
  t.default.setDefaultModules(a.default, i.default, o.default), t.default.sql = o.default;
  var u = t.default;
  e.default = u;
})(p_);
const P2 = /* @__PURE__ */ $S(p_);
class hJ {
  constructor(t, r) {
    this.config = t, this.eventbus = r, this.payload = {}, this.data = {}, this.samplesVisibleInViewport = [];
  }
  generateVariantCallsMap() {
    this.callsMap = new Map(this.config.samples.map((t) => [t, null]));
  }
  mergeLazyLoadedVariantCalls(t) {
    let r = new Map(Object.entries(t));
    this.callsMap = new Map([...this.callsMap, ...r]);
  }
  mergeLazyLoadedVariantCallsMetadata(t) {
    for (let [r, n] of Object.entries(t)) {
      this.callsMetadataMaps[r] === void 0 && (this.callsMetadataMaps[r] = new Map(this.config.samples.map((i) => [i, null])));
      let a = new Map(Object.entries(n));
      this.callsMetadataMaps[r] = new Map([...this.callsMetadataMaps[r], ...a]);
    }
  }
  checkIfSamplesAlreadyLazyLoaded(t) {
    let r = [];
    for (let n of t)
      this.callsMap.get(n) === null && r.push(n);
    return r;
  }
  lazyLoadChunkOfVariantCalls(t) {
  }
  lazyLoadVariantCalls(t, r) {
    if (this.samplesVisibleInViewport = t, t = this.checkIfSamplesAlreadyLazyLoaded(t), t.length == 0)
      return typeof r == "function" && r(), !1;
    this.eventbus.emit("loading:animation", { status: !0 }), this.payload.samples = t, this.loadVariantCalls(this.payload, (n) => {
      this.mergeLazyLoadedVariantCalls(n.calls), this.mergeLazyLoadedVariantCallsMetadata(n.calls_metadata), this.data.__lazyLoaded = !0, this.data.calls = this.callsMap, this.data.calls_metadata = this.callsMetadataMaps, this.eventbus.emit("loading:animation", { status: !1 }), this.eventbus.emit("data:display:changed", this.data);
    });
  }
  loadVariantsAndCalls(t, r) {
    this.payload = t, this.generateVariantCallsMap(), this.data = {}, this.callsMetadataMaps = {};
    let n = W0(t);
    n.samples = n.samples.slice(0, 30), this.samplesVisibleInViewport.length > 0 && (n.samples = this.samplesVisibleInViewport);
    const a = Kt.post(this.config.apiBaseUrl + "/variants", t), i = Kt.post(this.config.apiBaseUrl + "/variant_calls", n);
    Kt.all([a, i]).then(
      Kt.spread(({ data: o }, { data: s }) => {
        this.mergeLazyLoadedVariantCalls(s.calls), this.mergeLazyLoadedVariantCallsMetadata(s.calls_metadata), this.data = o, this.data.calls = this.callsMap, this.data.calls_metadata = this.callsMetadataMaps, r(this.data);
      })
    );
  }
  loadVariantCalls(t, r) {
    let n = this.config.apiBaseUrl + "/variant_calls";
    Kt.post(n, t).then((a) => {
      r(a.data);
    }).catch((a) => {
      console.log(a);
    });
  }
}
const mi = (e, t) => {
  let r = null;
  return (...n) => {
    window.clearTimeout(r), r = window.setTimeout(() => {
      e.apply(null, n);
    }, t);
  };
}, gJ = (e) => e.some((t) => t !== e[0]), Dd = {
  getFunction: function(e) {
    let t = e;
    return (n) => {
      if (t == 2) {
        let a = 2;
        return n[0] == -1 ? a = -1 : gJ(n) ? a = 1 : n.reduce((i, o) => i + o, 0) === 0 && (a = 0), a;
      }
      if (t == 1) {
        let a = 2;
        return n === 0 && (a = 0), a;
      }
    };
  }
};
class mJ {
  constructor(t) {
    this.eventbus = t, this.metadata = null, this.chromosome = 1, this.startpos = 1, this.endpos = null, this.data = null, this.snpWidth = 20, this.genes = null, this.lastBlastResult = !1, this.blastResultHistory = [];
  }
  setup(t) {
    this.tracksRendererContainer = t.tracksRendererContainer, this.config = t.config, this.config.samplesMetadata = !1, this.DataLoader = new hJ(this.config, this.eventbus), this.loadMetadata((r) => {
      this.metadata = r, this.numberOfAlternateAlleles = Dd.getFunction(r.ploidy), this.chromosome = r.chromosomes[0].id, this.startpos = r.chromosomes[0].start, this.eventbus.emit("metadata:loaded", r), this.config.samples = this.metadata.samples, this.config.showAllSamplesOnInit !== void 0 && this.config.showAllSamplesOnInit === !1 && (this.config.samples = void 0), this.loadGenes((n) => {
        n !== !1 && (this.eventbus.emit("data:genes:loaded", !0), this.metadata.gff3._dataframe = new P2(n.data, n.columns), this.metadata.gff3._collection = this.metadata.gff3._dataframe.toCollection());
      });
    });
  }
  setChromosome(t) {
    this.chromosome = t, this.startpos = this.metadata.chromosomesById[t].start, this.draw();
  }
  setSnpWidth(t) {
    this.snpWidth = t, this.draw();
  }
  resetStartpos() {
    this.startpos = this.metadata.chromosomesById[this.chromosome].start, this.endpos = null;
  }
  setToEnd() {
    this.endpos = this.metadata.chromosomesById[this.chromosome].end, this.startpos = null;
  }
  goToPosition(t) {
    this.startpos = t, this.endpos = null, this.draw();
  }
  goToChromosomeAndPosition(t, r) {
    this.chromosome = t.toString(), this.startpos = r, this.endpos = null, this.draw();
  }
  goForward(t) {
    this.data.coordinate_last < this.data.coordinate_first_next && (this.startpos = this.data.coordinate_first_next, t !== void 0 && (t = parseInt(t), this.startpos = this.data.variants_coordinates[t]), this.endpos = null, this.draw());
  }
  goBackward(t) {
    if (this.data.coordinate_last_prev < this.data.coordinate_first) {
      if (this.startpos = null, this.endpos = this.data.coordinate_last_prev, t !== void 0) {
        t = parseInt(t);
        let r = this.data.variants_coordinates.length - t - 1;
        this.endpos = this.data.variants_coordinates[r];
      }
      this.draw();
    }
  }
  setSamples(t) {
    if (typeof t[0] == "string" && (this.config.samples = t, this.config.samplesMetadata = !1), typeof t[0] == "object") {
      let r = t.map((a) => a.id);
      this.config.samples = r;
      let n = {};
      t.forEach((a) => {
        if (a.link !== void 0 && a.displayName === void 0) {
          let i = document.createElement("a");
          i.innerHTML = a.link, a.displayName = i.innerText;
        }
        n[a.id] = a;
      }), this.config.samplesMetadata = n;
    }
    this.draw();
  }
  _calculateSnpCountInVisibleArea() {
    let t = this.tracksRendererContainer.getBoundingClientRect().width - 2;
    return Math.floor((t - 200) / this.snpWidth);
  }
  getCurrentWidthOfVariants() {
    return this.snpWidth * this._calculateSnpCountInVisibleArea();
  }
  async loadMetadata(t) {
    this.metadata !== null && t(this.metadata);
    const r = this;
    let n = {}, a = this.config.apiBaseUrl + "/configuration";
    Kt.get(a).then(function(i) {
      t(i.data), r.metadata = i.data, r.metadata.chromosomes.forEach((o) => {
        n[o.id] = o;
      }), r.metadata.chromosomesById = n;
    }).catch(function(i) {
      console.log(i), r.raiseError("Error: Could not load any data from the server / backend.");
    });
  }
  getMetadata() {
    return this.metadata;
  }
  async loadGenes(t) {
    this.genes !== null && t(this.genes);
    let r = this.config.apiBaseUrl + "/genes";
    Kt.get(r).then((n) => {
      t(n.data.genes), this.genes = n.data.genes;
    }).catch((n) => {
      console.log(n), this.raiseError("Error: Could not load genes data from the server / backend.");
    });
  }
  async vcf_export_check(t, r) {
    let n;
    this.config.samples === void 0 || this.config.samples.length == 0 ? n = this.metadata.samples : n = this.config.samples;
    let a = {
      chrom: this.chromosome,
      startpos: t.startpos,
      endpos: t.endpos,
      samples: n
    };
    t.variantFilterSettings !== void 0 && typeof t.variantFilterSettings == "object" && (a.variant_filter_settings = t.variantFilterSettings), Kt.post(this.config.apiBaseUrl + "/vcf_export_check", a).then(function(i) {
      r(i.data);
    }).catch(function(i) {
      console.log(i);
    });
  }
  async genomic_window_summary(t, r) {
    let n;
    this.config.samples === void 0 || this.config.samples.length == 0 ? n = this.metadata.samples : n = this.config.samples;
    let a = {
      chrom: this.chromosome,
      startpos: t.startpos,
      endpos: t.endpos,
      positions: t.positions,
      samples: n
    };
    t.variantFilterSettings !== void 0 && typeof t.variantFilterSettings == "object" && (a.variant_filter_settings = t.variantFilterSettings), Kt.post(this.config.apiBaseUrl + "/genomic_window_summary", a).then(function(i) {
      r(i.data);
    }).catch(function(i) {
      console.log(i);
    });
  }
  async pca(t, r) {
    let n;
    this.config.samples === void 0 || this.config.samples.length == 0 ? n = this.metadata.samples : n = this.config.samples;
    let a = ["pca"];
    this.metadata.features.umap && a.push("umap");
    let i = {
      chrom: this.chromosome,
      startpos: t.startpos,
      endpos: t.endpos,
      samples: n,
      methods: a,
      umap_n_neighbors: t.umap_n_neighbors
    };
    t.variantFilterSettings !== void 0 && typeof t.variantFilterSettings == "object" && (i.variant_filter_settings = t.variantFilterSettings), this.eventbus.emit("loading:animation:pca", { status: !0 }), Kt.post(this.config.apiBaseUrl + "/pca", i).then((o) => {
      this.eventbus.emit("loading:animation:pca", { status: !1 }), r(o.data);
    }).catch((o) => {
      console.log(o), this.eventbus.emit("loading:animation:pca", { status: !1 });
    });
  }
  async clustermap(t, r) {
    let n;
    this.config.samples === void 0 || this.config.samples.length == 0 ? n = this.metadata.samples : n = this.config.samples;
    let a = {
      chrom: this.chromosome,
      startpos: t.startpos,
      endpos: t.endpos,
      samples: n,
      fontscale: t.fontscale
    };
    t.variantFilterSettings !== void 0 && typeof t.variantFilterSettings == "object" && (a.variant_filter_settings = t.variantFilterSettings), this.eventbus.emit("loading:animation:pca", { status: !0 }), Kt.post(this.config.apiBaseUrl + "/clustermap", a).then((i) => {
      this.eventbus.emit("loading:animation:pca", { status: !1 }), r(i.data);
    }).catch((i) => {
      console.log(i), this.eventbus.emit("loading:animation:pca", { status: !1 });
    });
  }
  async blast(t, r) {
    const n = {
      query: t.query,
      blast_type: t.blast_type
    };
    let a = this.config.apiBaseUrl + "/blast";
    Kt.post(a, n).then((i) => {
      let o = i.data.blast_hits;
      this.lastBlastResult = o, this.blastResultHistory.push({
        query: t.query,
        blast_hits: o,
        timestamp: new Date().toLocaleString()
      }), r(o);
    }).catch((i) => {
      console.log(i);
    });
  }
  async loadData(t) {
    let r = this._calculateSnpCountInVisibleArea();
    if (r < 1)
      return !1;
    let n = [];
    if (this.config.samples !== void 0 && this.config.samples.length > 0 && (n = this.config.samples), n.length == 0)
      return;
    const a = {
      chrom: this.chromosome,
      samples: n,
      count: r
    };
    this.startpos !== null && this.startpos > 0 && (a.startpos = this.startpos), this.endpos !== null && this.endpos > 0 && (a.endpos = this.endpos), this.eventbus.emit("loading:animation", { status: !0 }), this.DataLoader.loadVariantsAndCalls(a, (i) => {
      t(i);
    });
  }
  draw() {
    this.loadData((t) => {
      if (t.status == "error")
        return this.eventbus.emit("loading:animation", { status: !1 }), this.data = { error: t.message }, this.eventbus.emit("data:display:changed", this.data), !1;
      this.data = t, this.data.coordinate_first > this.data.coordinate_last || this.data.coordinate_first > this.data.coordinate_first_next ? (this.data.coordinate_first > this.data.coordinate_last && this.resetStartpos(), this.data.coordinate_first > this.data.coordinate_first_next && this.setToEnd(), this.loadData((r) => {
        this.data = r, this.eventbus.emit("data:display:changed", r), this.eventbus.emit("loading:animation", { status: !1 });
      })) : (this.eventbus.emit("data:display:changed", t), this.eventbus.emit("loading:animation", { status: !1 }));
    });
  }
  raiseError(t) {
    alert(t);
  }
}
const Hn = [];
function Bt(e, t = he) {
  let r;
  const n = /* @__PURE__ */ new Set();
  function a(s) {
    if (Be(e, s) && (e = s, r)) {
      const l = !Hn.length;
      for (const u of n)
        u[1](), Hn.push(u, e);
      if (l) {
        for (let u = 0; u < Hn.length; u += 2)
          Hn[u][0](Hn[u + 1]);
        Hn.length = 0;
      }
    }
  }
  function i(s) {
    a(s(e));
  }
  function o(s, l = he) {
    const u = [s, l];
    return n.add(u), n.size === 1 && (r = t(a) || he), s(e), () => {
      n.delete(u), n.size === 0 && (r(), r = null);
    };
  }
  return { set: a, update: i, subscribe: o };
}
let R2;
const j2 = "__stores";
function bJ() {
  const e = R2 + "-genes-bookmarks", t = Bt(/* @__PURE__ */ new Set()), r = localStorage.getItem(e);
  if (r !== null) {
    const i = new Set(JSON.parse(r));
    t.set(i);
  }
  return {
    ...t,
    bookmarkGene: (i) => {
      t.update((o) => (o.add(i), localStorage.setItem(e, JSON.stringify(Array.from(o))), o));
    },
    unbookmarkGene: (i) => {
      t.update((o) => (o.delete(i), localStorage.setItem(e, JSON.stringify(Array.from(o))), o));
    }
  };
}
function _J() {
  const e = {
    settings: Bt({
      statusShowMinimap: !1,
      zoomX: !1,
      zoomY: !1,
      statusColorblindMode: !1,
      variantDisplayMode: "reference_mismatch"
    }),
    variantWidth: Bt(20),
    groups: Bt({}),
    snpPosHighlights: Bt({}),
    sortSettings: Bt({
      sortmode: "none",
      sortorder: void 0
    }),
    variantFilterSettings: Bt({
      maf: [0.05, 0.5],
      missingFreq: [0, 0.1],
      heteroFreq: [0, 0.1],
      vcfQual: [500, 1e3]
    }),
    filteredVariantsCoordinates: Bt([]),
    geneSearch: Bt({
      query: "",
      searchInInterval: !1,
      selectedChromosome: void 0,
      startpos: null,
      endpos: null
    }),
    genesBookmarks: bJ()
  };
  return ss(j2, e), e;
}
function Et() {
  R2 = We("app").app().appId;
  const e = We(j2);
  return e || _J();
}
function Lf(e, { delay: t = 0, duration: r = 400, easing: n = Is } = {}) {
  const a = +getComputedStyle(e).opacity;
  return {
    delay: t,
    duration: r,
    easing: n,
    css: (i) => `opacity: ${i * a}`
  };
}
const { window: yJ } = yS;
function wJ(e) {
  rt(e, "svelte-n7cvum", `.svelte-n7cvum{box-sizing:border-box}.bg.svelte-n7cvum{position:fixed;z-index:1000;top:0;left:0;display:flex;flex-direction:column;justify-content:center;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.66)}@supports (-webkit-touch-callout: none){}.wrap.svelte-n7cvum{position:relative;margin:2rem;max-height:100%}.window.svelte-n7cvum{position:relative;width:40rem;max-width:100%;max-height:100%;margin:2rem auto;color:black;border-radius:0.5rem;background:white}.content.svelte-n7cvum{position:relative;padding:1rem;max-height:calc(100vh - 4rem);overflow:auto}.close.svelte-n7cvum{display:block;box-sizing:border-box;position:absolute;z-index:1000;top:1rem;right:1rem;margin:0;padding:0;width:1.5rem;height:1.5rem;border:0;color:black;border-radius:1.5rem;background:white;box-shadow:0 0 0 1px black;transition:transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),
      background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);-webkit-appearance:none}.close.svelte-n7cvum:before,.close.svelte-n7cvum:after{content:'';display:block;box-sizing:border-box;position:absolute;top:50%;width:1rem;height:1px;background:black;transform-origin:center;transition:height 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),
      background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1)}.close.svelte-n7cvum:before{-webkit-transform:translate(0, -50%) rotate(45deg);-moz-transform:translate(0, -50%) rotate(45deg);transform:translate(0, -50%) rotate(45deg);left:0.25rem}.close.svelte-n7cvum:after{-webkit-transform:translate(0, -50%) rotate(-45deg);-moz-transform:translate(0, -50%) rotate(-45deg);transform:translate(0, -50%) rotate(-45deg);left:0.25rem}.close.svelte-n7cvum:hover{background:black}.close.svelte-n7cvum:hover:before,.close.svelte-n7cvum:hover:after{height:2px;background:white}.close.svelte-n7cvum:focus{border-color:#3399ff;box-shadow:0 0 0 2px #3399ff}.close.svelte-n7cvum:active{transform:scale(0.9)}.close.svelte-n7cvum:hover,.close.svelte-n7cvum:focus,.close.svelte-n7cvum:active{outline:none}`);
}
function tm(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m, g, _, b, S = (
    /*state*/
    e[1].closeButton && rm(e)
  );
  var k = (
    /*Component*/
    e[2]
  );
  function w(C) {
    return {};
  }
  return k && (o = oa(k, w())), {
    c() {
      t = y("div"), r = y("div"), n = y("div"), S && S.c(), a = T(), i = y("div"), o && xe(o.$$.fragment), c(i, "class", s = ir(
        /*state*/
        e[1].classContent
      ) + " svelte-n7cvum"), c(
        i,
        "style",
        /*cssContent*/
        e[9]
      ), ve(i, "content", !/*unstyled*/
      e[0]), c(n, "class", l = ir(
        /*state*/
        e[1].classWindow
      ) + " svelte-n7cvum"), c(n, "role", "dialog"), c(n, "aria-modal", "true"), c(n, "aria-label", u = /*state*/
      e[1].ariaLabelledBy ? null : (
        /*state*/
        e[1].ariaLabel || null
      )), c(n, "aria-labelledby", f = /*state*/
      e[1].ariaLabelledBy || null), c(
        n,
        "style",
        /*cssWindow*/
        e[8]
      ), ve(n, "window", !/*unstyled*/
      e[0]), c(r, "class", h = ir(
        /*state*/
        e[1].classWindowWrap
      ) + " svelte-n7cvum"), c(
        r,
        "style",
        /*cssWindowWrap*/
        e[7]
      ), ve(r, "wrap", !/*unstyled*/
      e[0]), c(t, "class", v = ir(
        /*state*/
        e[1].classBg
      ) + " svelte-n7cvum"), c(
        t,
        "style",
        /*cssBg*/
        e[6]
      ), ve(t, "bg", !/*unstyled*/
      e[0]);
    },
    m(C, E) {
      L(C, t, E), p(t, r), p(r, n), S && S.m(n, null), p(n, a), p(n, i), o && Ne(o, i, null), e[49](n), e[50](r), e[51](t), g = !0, _ || (b = [
        Z(n, "introstart", function() {
          mt(
            /*onOpen*/
            e[13]
          ) && e[13].apply(this, arguments);
        }),
        Z(n, "outrostart", function() {
          mt(
            /*onClose*/
            e[14]
          ) && e[14].apply(this, arguments);
        }),
        Z(n, "introend", function() {
          mt(
            /*onOpened*/
            e[15]
          ) && e[15].apply(this, arguments);
        }),
        Z(n, "outroend", function() {
          mt(
            /*onClosed*/
            e[16]
          ) && e[16].apply(this, arguments);
        }),
        Z(
          t,
          "mousedown",
          /*handleOuterMousedown*/
          e[20]
        ),
        Z(
          t,
          "mouseup",
          /*handleOuterMouseup*/
          e[21]
        )
      ], _ = !0);
    },
    p(C, E) {
      if (e = C, /*state*/
      e[1].closeButton ? S ? (S.p(e, E), E[0] & /*state*/
      2 && ne(S, 1)) : (S = rm(e), S.c(), ne(S, 1), S.m(n, a)) : S && (Je(), fe(S, 1, 1, () => {
        S = null;
      }), Ye()), k !== (k = /*Component*/
      e[2])) {
        if (o) {
          Je();
          const A = o;
          fe(A.$$.fragment, 1, 0, () => {
            De(A, 1);
          }), Ye();
        }
        k ? (o = oa(k, w()), xe(o.$$.fragment), ne(o.$$.fragment, 1), Ne(o, i, null)) : o = null;
      }
      (!g || E[0] & /*state*/
      2 && s !== (s = ir(
        /*state*/
        e[1].classContent
      ) + " svelte-n7cvum")) && c(i, "class", s), (!g || E[0] & /*cssContent*/
      512) && c(
        i,
        "style",
        /*cssContent*/
        e[9]
      ), (!g || E[0] & /*state, unstyled*/
      3) && ve(i, "content", !/*unstyled*/
      e[0]), (!g || E[0] & /*state*/
      2 && l !== (l = ir(
        /*state*/
        e[1].classWindow
      ) + " svelte-n7cvum")) && c(n, "class", l), (!g || E[0] & /*state*/
      2 && u !== (u = /*state*/
      e[1].ariaLabelledBy ? null : (
        /*state*/
        e[1].ariaLabel || null
      ))) && c(n, "aria-label", u), (!g || E[0] & /*state*/
      2 && f !== (f = /*state*/
      e[1].ariaLabelledBy || null)) && c(n, "aria-labelledby", f), (!g || E[0] & /*cssWindow*/
      256) && c(
        n,
        "style",
        /*cssWindow*/
        e[8]
      ), (!g || E[0] & /*state, unstyled*/
      3) && ve(n, "window", !/*unstyled*/
      e[0]), (!g || E[0] & /*state*/
      2 && h !== (h = ir(
        /*state*/
        e[1].classWindowWrap
      ) + " svelte-n7cvum")) && c(r, "class", h), (!g || E[0] & /*cssWindowWrap*/
      128) && c(
        r,
        "style",
        /*cssWindowWrap*/
        e[7]
      ), (!g || E[0] & /*state, unstyled*/
      3) && ve(r, "wrap", !/*unstyled*/
      e[0]), (!g || E[0] & /*state*/
      2 && v !== (v = ir(
        /*state*/
        e[1].classBg
      ) + " svelte-n7cvum")) && c(t, "class", v), (!g || E[0] & /*cssBg*/
      64) && c(
        t,
        "style",
        /*cssBg*/
        e[6]
      ), (!g || E[0] & /*state, unstyled*/
      3) && ve(t, "bg", !/*unstyled*/
      e[0]);
    },
    i(C) {
      g || (ne(S), o && ne(o.$$.fragment, C), St(() => {
        d || (d = lo(
          n,
          /*currentTransitionWindow*/
          e[12],
          /*state*/
          e[1].transitionWindowProps,
          !0
        )), d.run(1);
      }), St(() => {
        m || (m = lo(
          t,
          /*currentTransitionBg*/
          e[11],
          /*state*/
          e[1].transitionBgProps,
          !0
        )), m.run(1);
      }), g = !0);
    },
    o(C) {
      fe(S), o && fe(o.$$.fragment, C), d || (d = lo(
        n,
        /*currentTransitionWindow*/
        e[12],
        /*state*/
        e[1].transitionWindowProps,
        !1
      )), d.run(0), m || (m = lo(
        t,
        /*currentTransitionBg*/
        e[11],
        /*state*/
        e[1].transitionBgProps,
        !1
      )), m.run(0), g = !1;
    },
    d(C) {
      C && x(t), S && S.d(), o && De(o), e[49](null), C && d && d.end(), e[50](null), e[51](null), C && m && m.end(), _ = !1, Le(b);
    }
  };
}
function rm(e) {
  let t, r, n, a, i;
  const o = [OJ, SJ], s = [];
  function l(u, f) {
    return f[0] & /*state*/
    2 && (t = null), t == null && (t = !!/*isFunction*/
    u[17](
      /*state*/
      u[1].closeButton
    )), t ? 0 : 1;
  }
  return r = l(e, [-1, -1, -1]), n = s[r] = o[r](e), {
    c() {
      n.c(), a = vt();
    },
    m(u, f) {
      s[r].m(u, f), L(u, a, f), i = !0;
    },
    p(u, f) {
      let d = r;
      r = l(u, f), r === d ? s[r].p(u, f) : (Je(), fe(s[d], 1, 1, () => {
        s[d] = null;
      }), Ye(), n = s[r], n ? n.p(u, f) : (n = s[r] = o[r](u), n.c()), ne(n, 1), n.m(a.parentNode, a));
    },
    i(u) {
      i || (ne(n), i = !0);
    },
    o(u) {
      fe(n), i = !1;
    },
    d(u) {
      s[r].d(u), u && x(a);
    }
  };
}
function SJ(e) {
  let t, r, n, a;
  return {
    c() {
      t = y("button"), c(t, "class", r = ir(
        /*state*/
        e[1].classCloseButton
      ) + " svelte-n7cvum"), c(t, "aria-label", "Close modal"), c(
        t,
        "style",
        /*cssCloseButton*/
        e[10]
      ), c(t, "type", "button"), ve(t, "close", !/*unstyled*/
      e[0]);
    },
    m(i, o) {
      L(i, t, o), n || (a = Z(
        t,
        "click",
        /*close*/
        e[18]
      ), n = !0);
    },
    p(i, o) {
      o[0] & /*state*/
      2 && r !== (r = ir(
        /*state*/
        i[1].classCloseButton
      ) + " svelte-n7cvum") && c(t, "class", r), o[0] & /*cssCloseButton*/
      1024 && c(
        t,
        "style",
        /*cssCloseButton*/
        i[10]
      ), o[0] & /*state, unstyled*/
      3 && ve(t, "close", !/*unstyled*/
      i[0]);
    },
    i: he,
    o: he,
    d(i) {
      i && x(t), n = !1, a();
    }
  };
}
function OJ(e) {
  let t, r, n;
  var a = (
    /*state*/
    e[1].closeButton
  );
  function i(o) {
    return { props: { onClose: (
      /*close*/
      o[18]
    ) } };
  }
  return a && (t = oa(a, i(e))), {
    c() {
      t && xe(t.$$.fragment), r = vt();
    },
    m(o, s) {
      t && Ne(t, o, s), L(o, r, s), n = !0;
    },
    p(o, s) {
      if (a !== (a = /*state*/
      o[1].closeButton)) {
        if (t) {
          Je();
          const l = t;
          fe(l.$$.fragment, 1, 0, () => {
            De(l, 1);
          }), Ye();
        }
        a ? (t = oa(a, i(o)), xe(t.$$.fragment), ne(t.$$.fragment, 1), Ne(t, r.parentNode, r)) : t = null;
      }
    },
    i(o) {
      n || (t && ne(t.$$.fragment, o), n = !0);
    },
    o(o) {
      t && fe(t.$$.fragment, o), n = !1;
    },
    d(o) {
      o && x(r), t && De(t, o);
    }
  };
}
function kJ(e) {
  let t, r, n, a, i = (
    /*Component*/
    e[2] && tm(e)
  );
  const o = (
    /*#slots*/
    e[48].default
  ), s = Qf(
    o,
    e,
    /*$$scope*/
    e[47],
    null
  );
  return {
    c() {
      i && i.c(), t = T(), s && s.c();
    },
    m(l, u) {
      i && i.m(l, u), L(l, t, u), s && s.m(l, u), r = !0, n || (a = Z(
        yJ,
        "keydown",
        /*handleKeydown*/
        e[19]
      ), n = !0);
    },
    p(l, u) {
      /*Component*/
      l[2] ? i ? (i.p(l, u), u[0] & /*Component*/
      4 && ne(i, 1)) : (i = tm(l), i.c(), ne(i, 1), i.m(t.parentNode, t)) : i && (Je(), fe(i, 1, 1, () => {
        i = null;
      }), Ye()), s && s.p && (!r || u[1] & /*$$scope*/
      65536) && ec(
        s,
        o,
        l,
        /*$$scope*/
        l[47],
        r ? Zf(
          o,
          /*$$scope*/
          l[47],
          u,
          null
        ) : tc(
          /*$$scope*/
          l[47]
        ),
        null
      );
    },
    i(l) {
      r || (ne(i), ne(s, l), r = !0);
    },
    o(l) {
      fe(i), fe(s, l), r = !1;
    },
    d(l) {
      i && i.d(l), l && x(t), s && s.d(l), n = !1, a();
    }
  };
}
function EJ(e, t = {}) {
  return function(n) {
    return new e({
      ...n,
      props: { ...t, ...n.props }
    });
  };
}
function $J(e, t, r) {
  let { $$slots: n = {}, $$scope: a } = t;
  const i = O0(), o = ss, s = (U) => U.tabIndex >= 0 && !U.hidden && !U.disabled && U.style.display !== "none" && U.type !== "hidden" && Boolean(U.offsetWidth || U.offsetHeight || U.getClientRects().length);
  let { isTabbable: l = s } = t, { show: u = null } = t, { key: f = "simple-modal" } = t, { ariaLabel: d = null } = t, { ariaLabelledBy: h = null } = t, { closeButton: v = !0 } = t, { closeOnEsc: m = !0 } = t, { closeOnOuterClick: g = !0 } = t, { styleBg: _ = {} } = t, { styleWindowWrap: b = {} } = t, { styleWindow: S = {} } = t, { styleContent: k = {} } = t, { styleCloseButton: w = {} } = t, { classBg: C = null } = t, { classWindowWrap: E = null } = t, { classWindow: A = null } = t, { classContent: D = null } = t, { classCloseButton: F = null } = t, { unstyled: R = !1 } = t, { setContext: $ = o } = t, { transitionBg: j = Lf } = t, { transitionBgProps: V = { duration: 250 } } = t, { transitionWindow: re = j } = t, { transitionWindowProps: q = V } = t, { disableFocusTrap: ee = !1 } = t;
  const Y = {
    ariaLabel: d,
    ariaLabelledBy: h,
    closeButton: v,
    closeOnEsc: m,
    closeOnOuterClick: g,
    styleBg: _,
    styleWindowWrap: b,
    styleWindow: S,
    styleContent: k,
    styleCloseButton: w,
    classBg: C,
    classWindowWrap: E,
    classWindow: A,
    classContent: D,
    classCloseButton: F,
    transitionBg: j,
    transitionBgProps: V,
    transitionWindow: re,
    transitionWindowProps: q,
    disableFocusTrap: ee,
    isTabbable: l,
    unstyled: R
  };
  let ae = { ...Y }, M = null, P, I, J, G, z, K, te, de, oe, X, B, ue, se, N, ce;
  const ye = (U) => U.replace(/([a-zA-Z])(?=[A-Z])/g, "$1-").toLowerCase(), me = (U) => U ? Object.keys(U).reduce((Ae, Te) => `${Ae}; ${ye(Te)}: ${U[Te]}`, "") : "", ze = (U) => !!(U && U.constructor && U.call && U.apply), Oe = () => {
    r(6, z = me(Object.assign(
      {},
      {
        width: window.innerWidth,
        height: window.innerHeight
      },
      ae.styleBg
    ))), r(7, K = me(ae.styleWindowWrap)), r(8, te = me(ae.styleWindow)), r(9, de = me(ae.styleContent)), r(10, oe = me(ae.styleCloseButton)), r(11, X = ae.transitionBg), r(12, B = ae.transitionWindow);
  }, He = () => {
  };
  let ke = He, Ze = He, Qe = He, Re = He;
  const et = (U, Ae = {}, Te = {}, Ke = {}) => {
    r(2, M = EJ(U, Ae)), r(1, ae = { ...Y, ...Te }), Oe(), Ce(), r(13, ke = (ut) => {
      Ke.onOpen && Ke.onOpen(ut), i("open"), i("opening");
    }), r(14, Ze = (ut) => {
      Ke.onClose && Ke.onClose(ut), i("close"), i("closing");
    }), r(15, Qe = (ut) => {
      Ke.onOpened && Ke.onOpened(ut), i("opened");
    }), r(16, Re = (ut) => {
      Ke.onClosed && Ke.onClosed(ut), i("closed");
    });
  }, pt = (U = {}) => {
    M && (r(14, Ze = U.onClose || Ze), r(16, Re = U.onClosed || Re), r(2, M = null), Se());
  }, je = (U) => {
    if (ae.closeOnEsc && M && U.key === "Escape" && (U.preventDefault(), pt()), M && U.key === "Tab" && !ae.disableFocusTrap) {
      const Ae = J.querySelectorAll("*"), Te = Array.from(Ae).filter(ae.isTabbable).sort((ut, Rr) => ut.tabIndex - Rr.tabIndex);
      let Ke = Te.indexOf(document.activeElement);
      Ke === -1 && U.shiftKey && (Ke = 0), Ke += Te.length + (U.shiftKey ? -1 : 1), Ke %= Te.length, Te[Ke].focus(), U.preventDefault();
    }
  }, le = (U) => {
    ae.closeOnOuterClick && (U.target === P || U.target === I) && (ce = U.target);
  }, we = (U) => {
    ae.closeOnOuterClick && U.target === ce && (U.preventDefault(), pt());
  }, Ce = () => {
    G = window.scrollY, ue = document.body.style.position, se = document.body.style.overflow, N = document.body.style.width, document.body.style.position = "fixed", document.body.style.top = `-${G}px`, document.body.style.overflow = "hidden", document.body.style.width = "100%";
  }, Se = () => {
    document.body.style.position = ue || "", document.body.style.top = "", document.body.style.overflow = se || "", document.body.style.width = N || "", window.scrollTo(0, G);
  };
  $(f, { open: et, close: pt });
  let $e = !1;
  gS(() => {
    $e && pt();
  }), qr(() => {
    r(46, $e = !0);
  });
  function W(U) {
    lt[U ? "unshift" : "push"](() => {
      J = U, r(5, J);
    });
  }
  function H(U) {
    lt[U ? "unshift" : "push"](() => {
      I = U, r(4, I);
    });
  }
  function pe(U) {
    lt[U ? "unshift" : "push"](() => {
      P = U, r(3, P);
    });
  }
  return e.$$set = (U) => {
    "isTabbable" in U && r(22, l = U.isTabbable), "show" in U && r(23, u = U.show), "key" in U && r(24, f = U.key), "ariaLabel" in U && r(25, d = U.ariaLabel), "ariaLabelledBy" in U && r(26, h = U.ariaLabelledBy), "closeButton" in U && r(27, v = U.closeButton), "closeOnEsc" in U && r(28, m = U.closeOnEsc), "closeOnOuterClick" in U && r(29, g = U.closeOnOuterClick), "styleBg" in U && r(30, _ = U.styleBg), "styleWindowWrap" in U && r(31, b = U.styleWindowWrap), "styleWindow" in U && r(32, S = U.styleWindow), "styleContent" in U && r(33, k = U.styleContent), "styleCloseButton" in U && r(34, w = U.styleCloseButton), "classBg" in U && r(35, C = U.classBg), "classWindowWrap" in U && r(36, E = U.classWindowWrap), "classWindow" in U && r(37, A = U.classWindow), "classContent" in U && r(38, D = U.classContent), "classCloseButton" in U && r(39, F = U.classCloseButton), "unstyled" in U && r(0, R = U.unstyled), "setContext" in U && r(40, $ = U.setContext), "transitionBg" in U && r(41, j = U.transitionBg), "transitionBgProps" in U && r(42, V = U.transitionBgProps), "transitionWindow" in U && r(43, re = U.transitionWindow), "transitionWindowProps" in U && r(44, q = U.transitionWindowProps), "disableFocusTrap" in U && r(45, ee = U.disableFocusTrap), "$$scope" in U && r(47, a = U.$$scope);
  }, e.$$.update = () => {
    e.$$.dirty[0] & /*show*/
    8388608 | e.$$.dirty[1] & /*isMounted*/
    32768 && $e && (ze(u) ? et(u) : pt());
  }, [
    R,
    ae,
    M,
    P,
    I,
    J,
    z,
    K,
    te,
    de,
    oe,
    X,
    B,
    ke,
    Ze,
    Qe,
    Re,
    ze,
    pt,
    je,
    le,
    we,
    l,
    u,
    f,
    d,
    h,
    v,
    m,
    g,
    _,
    b,
    S,
    k,
    w,
    C,
    E,
    A,
    D,
    F,
    $,
    j,
    V,
    re,
    q,
    ee,
    $e,
    a,
    n,
    W,
    H,
    pe
  ];
}
class TJ extends Ue {
  constructor(t) {
    super(), qe(
      this,
      t,
      $J,
      kJ,
      Be,
      {
        isTabbable: 22,
        show: 23,
        key: 24,
        ariaLabel: 25,
        ariaLabelledBy: 26,
        closeButton: 27,
        closeOnEsc: 28,
        closeOnOuterClick: 29,
        styleBg: 30,
        styleWindowWrap: 31,
        styleWindow: 32,
        styleContent: 33,
        styleCloseButton: 34,
        classBg: 35,
        classWindowWrap: 36,
        classWindow: 37,
        classContent: 38,
        classCloseButton: 39,
        unstyled: 0,
        setContext: 40,
        transitionBg: 41,
        transitionBgProps: 42,
        transitionWindow: 43,
        transitionWindowProps: 44,
        disableFocusTrap: 45
      },
      wJ,
      [-1, -1, -1]
    );
  }
}
function CJ(e) {
  rt(e, "svelte-1v1t31t", '.svelte-1v1t31t.svelte-1v1t31t{box-sizing:border-box}input[type="number"].svelte-1v1t31t.svelte-1v1t31t::-webkit-outer-spin-button,input[type="number"].svelte-1v1t31t.svelte-1v1t31t::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type="number"].svelte-1v1t31t.svelte-1v1t31t{-moz-appearance:textfield}.navigation.svelte-1v1t31t label.svelte-1v1t31t{font-size:14px;line-height:0.8 !important}.navigation.svelte-1v1t31t input.svelte-1v1t31t{font-size:14px;line-height:0.8 !important}.navigation.svelte-1v1t31t select.svelte-1v1t31t{font-size:14px;line-height:0.8 !important}.navigation.svelte-1v1t31t button.svelte-1v1t31t{font-size:13px;line-height:0.8 !important}.navigation.svelte-1v1t31t.svelte-1v1t31t{margin-bottom:10px}.navigation-row.svelte-1v1t31t.svelte-1v1t31t{width:100%;border:0px solid black}.navigation-row.svelte-1v1t31t>div.svelte-1v1t31t{float:left;border:0px solid black}#position-input.svelte-1v1t31t.svelte-1v1t31t{width:150px;margin-right:0}');
}
function nm(e, t, r) {
  const n = e.slice();
  return n[44] = t[r], n;
}
function am(e) {
  let t, r = (
    /*chromosome*/
    e[44].label + ""
  ), n, a;
  return {
    c() {
      t = y("option"), n = Q(r), t.__value = a = /*chromosome*/
      e[44].id, t.value = t.__value, c(t, "class", "svelte-1v1t31t");
    },
    m(i, o) {
      L(i, t, o), p(t, n);
    },
    p(i, o) {
      o[0] & /*chromosomes*/
      4 && r !== (r = /*chromosome*/
      i[44].label + "") && _e(n, r), o[0] & /*chromosomes*/
      4 && a !== (a = /*chromosome*/
      i[44].id) && (t.__value = a, t.value = t.__value);
    },
    d(i) {
      i && x(t);
    }
  };
}
function im(e) {
  let t, r, n, a, i;
  return {
    c() {
      t = y("div"), r = y("button"), n = Q("BLAST"), r.disabled = /*btnDisabledByData*/
      e[7], c(r, "type", "button"), c(r, "class", "divbrowse-btn divbrowse-btn-light svelte-1v1t31t"), O(r, "font-size", "80%"), O(t, "float", "left"), O(t, "margin-left", "10px"), c(t, "class", "svelte-1v1t31t");
    },
    m(o, s) {
      L(o, t, s), p(t, r), p(r, n), a || (i = Z(r, "click", Ee(
        /*click_handler_8*/
        e[30]
      )), a = !0);
    },
    p(o, s) {
      s[0] & /*btnDisabledByData*/
      128 && (r.disabled = /*btnDisabledByData*/
      o[7]);
    },
    d(o) {
      o && x(t), a = !1, i();
    }
  };
}
function AJ(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m, g, _, b, S, k, w, C, E, A, D, F, R, $, j, V, re, q, ee, Y, ae, M, P, I, J, G, z, K, te, de, oe, X, B, ue, se, N, ce, ye, me, ze, Oe, He, ke, Ze, Qe, Re, et, pt, je = (
    /*chromosomes*/
    e[2]
  ), le = [];
  for (let Ce = 0; Ce < je.length; Ce += 1)
    le[Ce] = am(nm(e, je, Ce));
  let we = (
    /*statusBlastButton*/
    e[3] === !0 && im(e)
  );
  return {
    c() {
      t = y("nav"), r = y("div"), n = y("div"), a = y("label"), a.textContent = "Chromosome:", i = T(), o = y("select");
      for (let Ce = 0; Ce < le.length; Ce += 1)
        le[Ce].c();
      s = T(), l = y("div"), u = y("input"), f = T(), d = y("button"), d.textContent = "Go", h = T(), v = y("div"), m = y("button"), g = y("span"), g.textContent = "⇦⇦", _ = T(), b = y("button"), S = y("span"), S.textContent = "⇦", k = T(), w = y("button"), C = y("span"), C.textContent = "⇨", E = T(), A = y("button"), D = y("span"), D.textContent = "⇨⇨", F = T(), R = y("div"), $ = y("button"), j = y("input"), V = Q(`\r
                Zoom X-axis`), re = T(), q = y("div"), ee = y("button"), Y = y("input"), ae = Q(`\r
                Zoom Y-axis`), M = T(), P = y("div"), I = y("div"), J = y("button"), G = Q("Genes"), K = T(), we && we.c(), te = T(), de = y("div"), oe = y("button"), X = Q("Filter Variants"), B = T(), ue = y("div"), se = y("button"), N = Q("Sort Samples"), ce = T(), ye = y("div"), me = y("button"), ze = Q("Data Analysis / Export"), Oe = T(), He = y("div"), ke = y("button"), ke.textContent = "Data Summary", Ze = T(), Qe = y("div"), Re = y("button"), Re.textContent = "Settings", c(a, "class", "form-label svelte-1v1t31t"), c(a, "for", "chromosome-selector"), c(o, "class", "divbrowse-form-control svelte-1v1t31t"), /*selectedChromosome*/
      e[0] === void 0 && St(() => /*select_change_handler*/
      e[18].call(o)), c(n, "class", "svelte-1v1t31t"), c(u, "type", "number"), c(u, "id", "position-input"), c(u, "class", "divbrowse-form-control svelte-1v1t31t"), c(u, "placeholder", "Position"), c(d, "type", "button"), c(d, "class", "divbrowse-btn divbrowse-btn-light svelte-1v1t31t"), O(l, "margin-left", "30px"), c(l, "class", "svelte-1v1t31t"), O(g, "font-size", "20px"), c(g, "class", "svelte-1v1t31t"), m.disabled = /*btnBackwardDisabled*/
      e[4], c(m, "type", "button"), c(m, "class", "divbrowse-btn divbrowse-btn-light svelte-1v1t31t"), O(S, "font-size", "20px"), c(S, "class", "svelte-1v1t31t"), b.disabled = /*btnBackwardDisabled*/
      e[4], c(b, "type", "button"), c(b, "class", "divbrowse-btn divbrowse-btn-light svelte-1v1t31t"), O(b, "margin-left", "2px"), O(C, "font-size", "20px"), c(C, "class", "svelte-1v1t31t"), w.disabled = /*btnForwardDisabled*/
      e[5], c(w, "type", "button"), c(w, "class", "divbrowse-btn divbrowse-btn-light svelte-1v1t31t"), c(w, "style", ""), O(D, "font-size", "20px"), c(D, "class", "svelte-1v1t31t"), A.disabled = /*btnForwardDisabled*/
      e[5], c(A, "type", "button"), c(A, "class", "divbrowse-btn divbrowse-btn-light svelte-1v1t31t"), O(A, "margin-left", "2px"), O(v, "float", "left"), O(v, "margin-left", "30px"), c(v, "class", "svelte-1v1t31t"), O(j, "position", "absolute"), O(j, "top", "4px"), O(j, "left", "4px"), c(j, "id", "minimap-mode-xaxis"), c(j, "type", "checkbox"), c(j, "class", "svelte-1v1t31t"), c($, "class", "divbrowse-btn divbrowse-btn-light svelte-1v1t31t"), O($, "position", "relative"), O($, "padding-left", "26px"), O(R, "margin-left", "30px"), O(R, "margin-top", "0px"), c(R, "class", "svelte-1v1t31t"), O(Y, "position", "absolute"), O(Y, "top", "4px"), O(Y, "left", "4px"), c(Y, "id", "minimap-mode-xaxis"), c(Y, "type", "checkbox"), c(Y, "class", "svelte-1v1t31t"), c(ee, "class", "divbrowse-btn divbrowse-btn-light svelte-1v1t31t"), O(ee, "position", "relative"), O(ee, "padding-left", "26px"), O(q, "margin-left", "7px"), O(q, "margin-top", "0px"), c(q, "class", "svelte-1v1t31t"), c(r, "class", "navigation-row svelte-1v1t31t"), O(r, "display", "flow-root"), J.disabled = z = /*dataGenesLoaded*/
      e[6] === !1, c(J, "type", "button"), c(J, "class", "divbrowse-btn divbrowse-btn-light svelte-1v1t31t"), O(I, "float", "left"), c(I, "class", "svelte-1v1t31t"), oe.disabled = /*btnDisabledByData*/
      e[7], c(oe, "type", "button"), c(oe, "class", "divbrowse-btn divbrowse-btn-light svelte-1v1t31t"), O(de, "float", "left"), O(de, "margin-left", "30px"), c(de, "class", "svelte-1v1t31t"), se.disabled = /*btnDisabledByData*/
      e[7], c(se, "type", "button"), c(se, "class", "divbrowse-btn divbrowse-btn-light svelte-1v1t31t"), O(ue, "float", "left"), O(ue, "margin-left", "10px"), c(ue, "class", "svelte-1v1t31t"), me.disabled = /*btnDisabledByData*/
      e[7], c(me, "type", "button"), c(me, "class", "divbrowse-btn divbrowse-btn-light svelte-1v1t31t"), O(ye, "float", "left"), O(ye, "margin-left", "10px"), c(ye, "class", "svelte-1v1t31t"), c(ke, "type", "button"), c(ke, "class", "divbrowse-btn divbrowse-btn-light svelte-1v1t31t"), O(He, "float", "left"), O(He, "margin-left", "30px"), c(He, "class", "svelte-1v1t31t"), c(Re, "type", "button"), c(Re, "class", "divbrowse-btn divbrowse-btn-light svelte-1v1t31t"), O(Qe, "float", "left"), O(Qe, "margin-left", "10px"), c(Qe, "class", "svelte-1v1t31t"), c(P, "class", "navigation-row svelte-1v1t31t"), O(P, "margin-top", "12px"), O(P, "display", "flow-root"), c(t, "class", "navigation clearfix svelte-1v1t31t"), O(t, "position", "relative");
    },
    m(Ce, Se) {
      L(Ce, t, Se), p(t, r), p(r, n), p(n, a), p(n, i), p(n, o);
      for (let Me = 0; Me < le.length; Me += 1)
        le[Me].m(o, null);
      wt(
        o,
        /*selectedChromosome*/
        e[0]
      ), p(r, s), p(r, l), p(l, u), ht(
        u,
        /*position*/
        e[1]
      ), p(l, f), p(l, d), p(r, h), p(r, v), p(v, m), p(m, g), p(v, _), p(v, b), p(b, S), p(v, k), p(v, w), p(w, C), p(v, E), p(v, A), p(A, D), p(r, F), p(r, R), p(R, $), p($, j), j.checked = /*$settings*/
      e[8].zoomX, p($, V), p(r, re), p(r, q), p(q, ee), p(ee, Y), Y.checked = /*$settings*/
      e[8].statusShowMinimap, p(ee, ae), p(t, M), p(t, P), p(P, I), p(I, J), p(J, G), p(P, K), we && we.m(P, null), p(P, te), p(P, de), p(de, oe), p(oe, X), p(P, B), p(P, ue), p(ue, se), p(se, N), p(P, ce), p(P, ye), p(ye, me), p(me, ze), p(P, Oe), p(P, He), p(He, ke), p(P, Ze), p(P, Qe), p(Qe, Re), et || (pt = [
        Z(
          o,
          "change",
          /*select_change_handler*/
          e[18]
        ),
        Z(o, "change", Ee(function() {
          mt(
            /*handleChangeChromosome*/
            e[12](
              /*selectedChromosome*/
              e[0]
            )
          ) && e[12](
            /*selectedChromosome*/
            e[0]
          ).apply(this, arguments);
        })),
        Z(
          u,
          "input",
          /*input0_input_handler*/
          e[19]
        ),
        Z(d, "click", Ee(
          /*click_handler*/
          e[20]
        )),
        Z(m, "click", Ee(
          /*click_handler_1*/
          e[21]
        )),
        Z(b, "click", Ee(
          /*click_handler_2*/
          e[22]
        )),
        Z(w, "click", Ee(
          /*click_handler_3*/
          e[23]
        )),
        Z(A, "click", Ee(
          /*click_handler_4*/
          e[24]
        )),
        Z(
          j,
          "change",
          /*input1_change_handler*/
          e[25]
        ),
        Z(
          $,
          "click",
          /*click_handler_5*/
          e[26]
        ),
        Z(
          Y,
          "change",
          /*input2_change_handler*/
          e[27]
        ),
        Z(
          ee,
          "click",
          /*click_handler_6*/
          e[28]
        ),
        Z(J, "click", Ee(
          /*click_handler_7*/
          e[29]
        )),
        Z(oe, "click", Ee(
          /*click_handler_9*/
          e[31]
        )),
        Z(se, "click", Ee(
          /*click_handler_10*/
          e[32]
        )),
        Z(me, "click", Ee(
          /*click_handler_11*/
          e[33]
        )),
        Z(ke, "click", Ee(
          /*click_handler_12*/
          e[34]
        )),
        Z(Re, "click", Ee(
          /*click_handler_13*/
          e[35]
        ))
      ], et = !0);
    },
    p(Ce, Se) {
      if (e = Ce, Se[0] & /*chromosomes*/
      4) {
        je = /*chromosomes*/
        e[2];
        let Me;
        for (Me = 0; Me < je.length; Me += 1) {
          const $e = nm(e, je, Me);
          le[Me] ? le[Me].p($e, Se) : (le[Me] = am($e), le[Me].c(), le[Me].m(o, null));
        }
        for (; Me < le.length; Me += 1)
          le[Me].d(1);
        le.length = je.length;
      }
      Se[0] & /*selectedChromosome, chromosomes*/
      5 && wt(
        o,
        /*selectedChromosome*/
        e[0]
      ), Se[0] & /*position*/
      2 && lr(u.value) !== /*position*/
      e[1] && ht(
        u,
        /*position*/
        e[1]
      ), Se[0] & /*btnBackwardDisabled*/
      16 && (m.disabled = /*btnBackwardDisabled*/
      e[4]), Se[0] & /*btnBackwardDisabled*/
      16 && (b.disabled = /*btnBackwardDisabled*/
      e[4]), Se[0] & /*btnForwardDisabled*/
      32 && (w.disabled = /*btnForwardDisabled*/
      e[5]), Se[0] & /*btnForwardDisabled*/
      32 && (A.disabled = /*btnForwardDisabled*/
      e[5]), Se[0] & /*$settings*/
      256 && (j.checked = /*$settings*/
      e[8].zoomX), Se[0] & /*$settings*/
      256 && (Y.checked = /*$settings*/
      e[8].statusShowMinimap), Se[0] & /*dataGenesLoaded*/
      64 && z !== (z = /*dataGenesLoaded*/
      e[6] === !1) && (J.disabled = z), /*statusBlastButton*/
      e[3] === !0 ? we ? we.p(e, Se) : (we = im(e), we.c(), we.m(P, te)) : we && (we.d(1), we = null), Se[0] & /*btnDisabledByData*/
      128 && (oe.disabled = /*btnDisabledByData*/
      e[7]), Se[0] & /*btnDisabledByData*/
      128 && (se.disabled = /*btnDisabledByData*/
      e[7]), Se[0] & /*btnDisabledByData*/
      128 && (me.disabled = /*btnDisabledByData*/
      e[7]);
    },
    i: he,
    o: he,
    d(Ce) {
      Ce && x(t), Ve(le, Ce), we && we.d(), et = !1, Le(pt);
    }
  };
}
function IJ(e, t, r) {
  let n, a;
  const i = We("app");
  let { appId: o, eventbus: s, controller: l } = i.app();
  const { settings: u, variantWidth: f, groups: d } = Et();
  dt(e, u, (X) => r(8, n = X)), dt(e, f, (X) => r(37, a = X));
  let h, v, m = [], g = !1;
  s.on("metadata:loaded", (X) => {
    r(2, m = X.chromosomes), r(3, g = X.features.blast);
  });
  function _(X) {
    X && X > 0 && l.goToPosition(X);
  }
  function b(X) {
    l.setChromosome(X);
  }
  let S = !0, k = !0;
  function w(X) {
    r(4, S = !0), l.goBackward(X);
  }
  function C(X) {
    r(5, k = !0), l.goForward(X);
  }
  s.on("loading:animation", (X) => {
    X.status;
  });
  function E(X) {
    zt(u, n[X] = !n[X], n), X === "zoomX" && (n[X] ? (zt(f, a = 2, a), l.setSnpWidth(2)) : (zt(f, a = 20, a), l.setSnpWidth(20))), X === "zoomY" && zt(u, n.statusShowMinimap = !n.statusShowMinimap, n);
  }
  let A = !1, D = !1;
  s.on("data:display:changed", (X) => {
    r(17, A = X), r(4, S = !1), r(5, k = !1), A.coordinate_first <= l.metadata.chromosomesById[l.chromosome].start && r(4, S = !0), A.coordinate_last >= l.metadata.chromosomesById[l.chromosome].end && r(5, k = !0), r(0, h = l.chromosome);
  }), s.on("data:genes:loaded", (X) => {
    r(6, D = !0);
  });
  function F(X) {
    s.emit("modal:open", { component: X });
  }
  let R = !0;
  function $() {
    h = pr(this), r(0, h), r(2, m);
  }
  function j() {
    v = lr(this.value), r(1, v);
  }
  const V = () => _(v), re = () => w(20), q = () => w(10), ee = () => C(10), Y = () => C(20);
  function ae() {
    n.zoomX = this.checked, u.set(n);
  }
  const M = () => E("zoomX");
  function P() {
    n.statusShowMinimap = this.checked, u.set(n);
  }
  const I = () => E("zoomY"), J = () => F("GeneSearch"), G = () => F("Blast"), z = () => F("VariantFilter"), K = () => F("SortSamples"), te = () => F("DataAnalysisAndExport"), de = () => F("DataSummary"), oe = () => F("Settings");
  return e.$$.update = () => {
    e.$$.dirty[0] & /*data*/
    131072 && r(7, R = A === !1);
  }, [
    h,
    v,
    m,
    g,
    S,
    k,
    D,
    R,
    n,
    u,
    f,
    _,
    b,
    w,
    C,
    E,
    F,
    A,
    $,
    j,
    V,
    re,
    q,
    ee,
    Y,
    ae,
    M,
    P,
    I,
    J,
    G,
    z,
    K,
    te,
    de,
    oe
  ];
}
class PJ extends Ue {
  constructor(t) {
    super(), qe(this, t, IJ, AJ, Be, {}, CJ, [-1, -1]);
  }
}
function RJ(e) {
  rt(e, "svelte-1lriegu", '.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}div{font-family:sans-serif}');
}
class jJ extends Ue {
  constructor(t) {
    super(), qe(this, t, null, null, Be, {}, RJ);
  }
}
function MJ(e) {
  rt(e, "svelte-1i93i27", "#divbrowse-modal-background.svelte-1i93i27.svelte-1i93i27{visibility:hidden;z-index:9999;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.6);display:flex;align-items:center;justify-content:center}.divbrowse-modal-wrapper.svelte-1i93i27.svelte-1i93i27{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.divbrowse-modal.svelte-1i93i27.svelte-1i93i27{position:relative;border-radius:6px;background:white;border:1px solid #000;filter:drop-shadow(5px 5px 5px #555);padding:1em}.divbrowse-modal-visible.svelte-1i93i27.svelte-1i93i27{visibility:visible !important}.divbrowse-modal-close.svelte-1i93i27.svelte-1i93i27{position:absolute;top:10px;right:10px;width:24px;height:24px;cursor:pointer;fill:rgb(255,255,255)}.divbrowse-modal-close.svelte-1i93i27 circle.svelte-1i93i27{stroke:rgb(50,50,50);stroke-width:0.5}.divbrowse-modal-close.svelte-1i93i27.svelte-1i93i27:hover{fill:rgb(220,220,220)}.divbrowse-modal-close.svelte-1i93i27 line.svelte-1i93i27{stroke:rgb(50,50,50);stroke-width:1}.divbrowse-modal-content.svelte-1i93i27.svelte-1i93i27{max-width:calc(100vw - 100px);max-height:calc(100vh - 100px)}");
}
function om(e, t, r) {
  const n = e.slice();
  return n[11] = t[r], n[13] = r, n;
}
function sm(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v;
  function m() {
    return (
      /*click_handler*/
      e[7](
        /*index*/
        e[13]
      )
    );
  }
  function g() {
    return (
      /*func*/
      e[8](
        /*index*/
        e[13]
      )
    );
  }
  const _ = [
    /*modal*/
    e[11].props,
    { close: g }
  ];
  var b = (
    /*modal*/
    e[11].component
  );
  function S(k) {
    let w = {};
    for (let C = 0; C < _.length; C += 1)
      w = h0(w, _[C]);
    return { props: w };
  }
  return b && (u = oa(b, S())), {
    c() {
      t = y("div"), r = y("div"), n = Fe("svg"), a = Fe("circle"), i = Fe("line"), o = Fe("line"), s = T(), l = y("div"), u && xe(u.$$.fragment), f = T(), c(a, "cx", "7"), c(a, "cy", "7"), c(a, "r", "6"), c(a, "class", "svelte-1i93i27"), c(i, "x1", "4"), c(i, "y1", "4"), c(i, "x2", "10"), c(i, "y2", "10"), c(i, "class", "svelte-1i93i27"), c(o, "x1", "10"), c(o, "y1", "4"), c(o, "x2", "4"), c(o, "y2", "10"), c(o, "class", "svelte-1i93i27"), c(n, "class", "divbrowse-modal-close svelte-1i93i27"), c(n, "viewBox", "0 0 14 14"), c(l, "class", "divbrowse-modal-content svelte-1i93i27"), c(r, "class", "divbrowse-modal svelte-1i93i27"), c(t, "class", "divbrowse-modal-wrapper svelte-1i93i27");
    },
    m(k, w) {
      L(k, t, w), p(t, r), p(r, n), p(n, a), p(n, i), p(n, o), p(r, s), p(r, l), u && Ne(u, l, null), p(t, f), d = !0, h || (v = [
        Z(n, "click", ia(m)),
        Z(r, "click", ia(DJ))
      ], h = !0);
    },
    p(k, w) {
      e = k;
      const C = w & /*$allModals, closeModal*/
      20 ? OS(_, [
        w & /*$allModals*/
        4 && kS(
          /*modal*/
          e[11].props
        ),
        w & /*closeModal*/
        16 && { close: g }
      ]) : {};
      if (b !== (b = /*modal*/
      e[11].component)) {
        if (u) {
          Je();
          const E = u;
          fe(E.$$.fragment, 1, 0, () => {
            De(E, 1);
          }), Ye();
        }
        b ? (u = oa(b, S()), xe(u.$$.fragment), ne(u.$$.fragment, 1), Ne(u, l, null)) : u = null;
      } else
        b && u.$set(C);
    },
    i(k) {
      d || (u && ne(u.$$.fragment, k), d = !0);
    },
    o(k) {
      u && fe(u.$$.fragment, k), d = !1;
    },
    d(k) {
      k && x(t), u && De(u), h = !1, Le(v);
    }
  };
}
function NJ(e) {
  let t, r, n, a, i, o, s = (
    /*$allModals*/
    e[2]
  ), l = [];
  for (let f = 0; f < s.length; f += 1)
    l[f] = sm(om(e, s, f));
  const u = (f) => fe(l[f], 1, 1, () => {
    l[f] = null;
  });
  return {
    c() {
      t = y("div");
      for (let f = 0; f < l.length; f += 1)
        l[f].c();
      r = T(), n = y("style"), n.textContent = `#divbrowse-modal-background {\r
        visibility: hidden;\r
        z-index: 9999;\r
        position: fixed;\r
        top: 0;\r
        left: 0;\r
        right: 0;\r
        bottom: 0;\r
        background: rgba(0,0,0,0.6);\r
        display: flex;\r
        align-items: center;\r
        justify-content: center;\r
    }\r
    .divbrowse-modal-wrapper {\r
        /*z-index: 9999;*/\r
        position: fixed;\r
        top: 0;\r
        left: 0;\r
        right: 0;\r
        bottom: 0;\r
        display: flex;\r
        align-items: center;\r
        justify-content: center;\r
    }\r
    .divbrowse-modal {\r
        position: relative;\r
        border-radius: 6px;\r
        background: white;\r
        border: 1px solid #000;\r
        filter: drop-shadow(5px 5px 5px #555);\r
        padding: 1em;\r
    }\r
\r
    .divbrowse-modal-visible {\r
        visibility: visible !important;\r
    }\r
\r
    .divbrowse-modal-close {\r
        position: absolute;\r
        top:10px;\r
        right:10px;\r
        width:24px;\r
        height:24px;\r
        cursor: pointer;\r
        fill: rgb(255,255,255);\r
    }\r
\r
    .divbrowse-modal-close circle {\r
        stroke: rgb(50,50,50);\r
        stroke-width:0.5;\r
    }\r
\r
    .divbrowse-modal-close:hover {\r
        fill: rgb(220,220,220);\r
    }\r
\r
    .divbrowse-modal-close line {\r
        stroke: rgb(50,50,50);\r
        stroke-width:1;\r
    }\r
\r
    .divbrowse-modal-content {\r
        max-width: calc(100vw - 20px);\r
        max-height: calc(100vh - 20px);\r
        overflow: auto;\r
    }`, c(t, "id", "divbrowse-modal-background"), c(t, "class", "svelte-1i93i27"), ve(
        t,
        "divbrowse-modal-visible",
        /*visible*/
        e[1]
      );
    },
    m(f, d) {
      L(f, t, d);
      for (let h = 0; h < l.length; h += 1)
        l[h].m(t, null);
      e[9](t), L(f, r, d), p(document.head, n), a = !0, i || (o = Z(t, "click", ia(
        /*click_handler_2*/
        e[10]
      )), i = !0);
    },
    p(f, [d]) {
      if (d & /*$allModals, closeModal*/
      20) {
        s = /*$allModals*/
        f[2];
        let h;
        for (h = 0; h < s.length; h += 1) {
          const v = om(f, s, h);
          l[h] ? (l[h].p(v, d), ne(l[h], 1)) : (l[h] = sm(v), l[h].c(), ne(l[h], 1), l[h].m(t, null));
        }
        for (Je(), h = s.length; h < l.length; h += 1)
          u(h);
        Ye();
      }
      (!a || d & /*visible*/
      2) && ve(
        t,
        "divbrowse-modal-visible",
        /*visible*/
        f[1]
      );
    },
    i(f) {
      if (!a) {
        for (let d = 0; d < s.length; d += 1)
          ne(l[d]);
        a = !0;
      }
    },
    o(f) {
      l = l.filter(Boolean);
      for (let d = 0; d < l.length; d += 1)
        fe(l[d]);
      a = !1;
    },
    d(f) {
      f && x(t), Ve(l, f), e[9](null), f && x(r), x(n), i = !1, o();
    }
  };
}
const DJ = () => {
};
function xJ(e, t, r) {
  let n, a = Bt([]);
  dt(e, a, (m) => r(2, n = m));
  function i(m) {
    a.update((g) => (g = [...g, m], g));
  }
  function o(m) {
    a.update((g) => {
      let _;
      return m === -1 ? _ = g.pop() : _ = g.splice(m, 1)[0], _.onClose && typeof _.onClose == "function" && _.onClose(), g = [...g], g;
    });
  }
  function s() {
    o(-1);
  }
  let l, u = !1;
  a.subscribe((m) => {
    m.length > 0 ? r(1, u = !0) : r(1, u = !1);
  });
  const f = (m) => o(m), d = (m) => {
    o(m);
  };
  function h(m) {
    lt[m ? "unshift" : "push"](() => {
      l = m, r(0, l);
    });
  }
  return [
    l,
    u,
    n,
    a,
    o,
    s,
    i,
    f,
    d,
    h,
    () => s()
  ];
}
class FJ extends Ue {
  constructor(t) {
    super(), qe(this, t, xJ, NJ, Be, { newModal: 6 }, MJ);
  }
  get newModal() {
    return this.$$.ctx[6];
  }
}
function LJ(e) {
  rt(e, "svelte-1ns7pif", ".loader.svelte-1ns7pif{border:6px solid rgb(220,220,220);border-top:6px solid #000;border-radius:50%;width:40px;height:40px;animation:svelte-1ns7pif-spin 1s linear infinite;display:inline-block}.small.svelte-1ns7pif{width:20px;height:20px;border:4px solid rgb(220,220,220);border-top:4px solid #000}.tiny.svelte-1ns7pif{width:10px;height:10px;border:2px solid rgb(220,220,220);border-top:2px solid #000}.large.svelte-1ns7pif{width:60px;height:60px;border:8px solid rgb(220,220,220);border-top:8px solid #000}@keyframes svelte-1ns7pif-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}");
}
function BJ(e) {
  let t;
  return {
    c() {
      t = y("div"), c(t, "class", "loader svelte-1ns7pif"), ve(
        t,
        "small",
        /*size*/
        e[0] === "small"
      ), ve(
        t,
        "tiny",
        /*size*/
        e[0] === "tiny"
      ), ve(
        t,
        "large",
        /*size*/
        e[0] === "large"
      );
    },
    m(r, n) {
      L(r, t, n);
    },
    p(r, [n]) {
      n & /*size*/
      1 && ve(
        t,
        "small",
        /*size*/
        r[0] === "small"
      ), n & /*size*/
      1 && ve(
        t,
        "tiny",
        /*size*/
        r[0] === "tiny"
      ), n & /*size*/
      1 && ve(
        t,
        "large",
        /*size*/
        r[0] === "large"
      );
    },
    i: he,
    o: he,
    d(r) {
      r && x(t);
    }
  };
}
function zJ(e, t, r) {
  let { size: n = "normal" } = t;
  return e.$$set = (a) => {
    "size" in a && r(0, n = a.size);
  }, [n];
}
class tn extends Ue {
  constructor(t) {
    super(), qe(this, t, zJ, BJ, Be, { size: 0 }, LJ);
  }
}
function VJ(e) {
  rt(e, "svelte-14l7dpt", "#results.svelte-14l7dpt.svelte-14l7dpt{max-height:50vh;overflow-y:scroll}#results-inner.svelte-14l7dpt.svelte-14l7dpt{background:rgb(242,242,242);border-radius:6px;border:0px solid blue;padding:20px;margin-right:3px}textarea#divbrowse-blast-query.svelte-14l7dpt.svelte-14l7dpt{padding:8px;width:100%;min-height:200px;font-size:90%;color:rgb(100,100,100);box-sizing:border-box}table#blast-result.svelte-14l7dpt.svelte-14l7dpt{font-size:85%}table#blast-result.svelte-14l7dpt th.svelte-14l7dpt{text-align:center;padding:0 10px 16px 10px;margin:0;vertical-align:top}table#blast-result.svelte-14l7dpt td.svelte-14l7dpt{text-align:center;padding:3px 0px;margin:0;border-bottom:1px solid rgb(140,140,140)}");
}
function lm(e, t, r) {
  const n = e.slice();
  return n[21] = t[r], n;
}
function um(e, t, r) {
  const n = e.slice();
  return n[24] = t[r], n;
}
function fm(e) {
  let t, r, n = (
    /*blastResult*/
    e[3] !== !1 && cm(e)
  ), a = (
    /*blastResultHistory*/
    e[4].length > 1 && dm(e)
  );
  return {
    c() {
      t = y("div"), n && n.c(), r = T(), a && a.c(), c(t, "class", "clearfix"), O(t, "margin-bottom", "10px"), O(t, "padding-bottom", "10px"), O(t, "border-bottom", "2px solid rgb(190,190,190)");
    },
    m(i, o) {
      L(i, t, o), n && n.m(t, null), p(t, r), a && a.m(t, null);
    },
    p(i, o) {
      /*blastResult*/
      i[3] !== !1 ? n ? n.p(i, o) : (n = cm(i), n.c(), n.m(t, r)) : n && (n.d(1), n = null), /*blastResultHistory*/
      i[4].length > 1 ? a ? a.p(i, o) : (a = dm(i), a.c(), a.m(t, null)) : a && (a.d(1), a = null);
    },
    d(i) {
      i && x(t), n && n.d(), a && a.d();
    }
  };
}
function cm(e) {
  let t, r, n;
  return {
    c() {
      t = y("button"), t.textContent = "Perform another BLAST search", c(t, "type", "button"), c(t, "class", "divbrowse-btn divbrowse-btn-light"), O(t, "float", "left"), O(t, "margin-right", "80px");
    },
    m(a, i) {
      L(a, t, i), r || (n = Z(t, "click", Ee(
        /*reset*/
        e[9]
      )), r = !0);
    },
    p: he,
    d(a) {
      a && x(t), r = !1, n();
    }
  };
}
function dm(e) {
  let t, r, n, a, i, o, s = (
    /*blastResultHistory*/
    e[4]
  ), l = [];
  for (let u = 0; u < s.length; u += 1)
    l[u] = pm(um(e, s, u));
  return {
    c() {
      t = y("div"), r = Q(`Display one of your previous BLAST search results: \r
        `), n = y("select"), a = y("option");
      for (let u = 0; u < l.length; u += 1)
        l[u].c();
      a.disabled = !0, a.hidden = !0, a.__value = "", a.value = a.__value, c(n, "class", "divbrowse-form-control"), /*selectedPastBlastResult*/
      e[5] === void 0 && St(() => /*select_change_handler*/
      e[15].call(n)), O(t, "float", "left");
    },
    m(u, f) {
      L(u, t, f), p(t, r), p(t, n), p(n, a);
      for (let d = 0; d < l.length; d += 1)
        l[d].m(n, null);
      wt(
        n,
        /*selectedPastBlastResult*/
        e[5]
      ), i || (o = [
        Z(
          n,
          "change",
          /*select_change_handler*/
          e[15]
        ),
        Z(n, "change", Ee(function() {
          mt(
            /*handleChangeBlastResult*/
            e[10](
              /*selectedPastBlastResult*/
              e[5]
            )
          ) && e[10](
            /*selectedPastBlastResult*/
            e[5]
          ).apply(this, arguments);
        }))
      ], i = !0);
    },
    p(u, f) {
      if (e = u, f & /*blastResultHistory*/
      16) {
        s = /*blastResultHistory*/
        e[4];
        let d;
        for (d = 0; d < s.length; d += 1) {
          const h = um(e, s, d);
          l[d] ? l[d].p(h, f) : (l[d] = pm(h), l[d].c(), l[d].m(n, null));
        }
        for (; d < l.length; d += 1)
          l[d].d(1);
        l.length = s.length;
      }
      f & /*selectedPastBlastResult, blastResultHistory*/
      48 && wt(
        n,
        /*selectedPastBlastResult*/
        e[5]
      );
    },
    d(u) {
      u && x(t), Ve(l, u), i = !1, Le(o);
    }
  };
}
function pm(e) {
  let t, r = (
    /*pastBlastResult*/
    e[24].timestamp + ""
  ), n, a;
  return {
    c() {
      t = y("option"), n = Q(r), t.__value = a = /*pastBlastResult*/
      e[24].timestamp, t.value = t.__value;
    },
    m(i, o) {
      L(i, t, o), p(t, n);
    },
    p(i, o) {
      o & /*blastResultHistory*/
      16 && r !== (r = /*pastBlastResult*/
      i[24].timestamp + "") && _e(n, r), o & /*blastResultHistory*/
      16 && a !== (a = /*pastBlastResult*/
      i[24].timestamp) && (t.__value = a, t.value = t.__value);
    },
    d(i) {
      i && x(t);
    }
  };
}
function vm(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v = (
    /*showLoadingAnimation*/
    e[0] && hm()
  );
  return {
    c() {
      t = y("div"), r = y("label"), r.textContent = "Please enter your query sequence:", n = T(), a = y("textarea"), i = T(), o = y("div"), s = y("button"), l = Q("Start BLAST search"), u = T(), v && v.c(), c(r, "class", "form-label"), c(r, "for", ""), O(r, "font-size", "90%"), O(r, "display", "block"), O(r, "margin-bottom", "6px"), c(a, "id", "divbrowse-blast-query"), c(a, "class", "svelte-14l7dpt"), c(s, "type", "button"), s.disabled = /*doCalcBtnDisabled*/
      e[1], c(s, "class", "divbrowse-btn divbrowse-btn-light"), O(s, "float", "left"), O(o, "margin-top", "5px"), c(o, "class", "clearfix"), c(t, "class", "form-inline"), O(t, "margin-top", "20px");
    },
    m(m, g) {
      L(m, t, g), p(t, r), p(t, n), p(t, a), ht(
        a,
        /*params*/
        e[2].query
      ), p(t, i), p(t, o), p(o, s), p(s, l), p(o, u), v && v.m(o, null), f = !0, d || (h = [
        Z(
          a,
          "input",
          /*textarea_input_handler*/
          e[16]
        ),
        Z(s, "click", Ee(
          /*doCalculation*/
          e[7]
        ))
      ], d = !0);
    },
    p(m, g) {
      g & /*params*/
      4 && ht(
        a,
        /*params*/
        m[2].query
      ), (!f || g & /*doCalcBtnDisabled*/
      2) && (s.disabled = /*doCalcBtnDisabled*/
      m[1]), /*showLoadingAnimation*/
      m[0] ? v ? g & /*showLoadingAnimation*/
      1 && ne(v, 1) : (v = hm(), v.c(), ne(v, 1), v.m(o, null)) : v && (Je(), fe(v, 1, 1, () => {
        v = null;
      }), Ye());
    },
    i(m) {
      f || (ne(v), f = !0);
    },
    o(m) {
      fe(v), f = !1;
    },
    d(m) {
      m && x(t), v && v.d(), d = !1, Le(h);
    }
  };
}
function hm(e) {
  let t, r, n;
  return r = new tn({ props: { size: "small" } }), {
    c() {
      t = y("div"), xe(r.$$.fragment), O(t, "float", "left"), O(t, "margin-left", "20px");
    },
    m(a, i) {
      L(a, t, i), Ne(r, t, null), n = !0;
    },
    i(a) {
      n || (ne(r.$$.fragment, a), n = !0);
    },
    o(a) {
      fe(r.$$.fragment, a), n = !1;
    },
    d(a) {
      a && x(t), De(r);
    }
  };
}
function gm(e) {
  let t, r, n, a, i, o, s, l, u = (
    /*blastResult*/
    e[3]
  ), f = [];
  for (let d = 0; d < u.length; d += 1)
    f[d] = mm(lm(e, u, d));
  return {
    c() {
      t = y("div"), r = y("div"), n = y("h3"), n.textContent = "Result of the BLAST search:", a = T(), i = y("table"), o = y("thead"), o.innerHTML = `<tr><th class="svelte-14l7dpt">Chromosome</th> 
                    <th class="svelte-14l7dpt">Number of variants</th> 
                    <th class="svelte-14l7dpt">E-value</th> 
                    <th class="svelte-14l7dpt">Bit score</th> 
                    <th class="svelte-14l7dpt">Percentage of identical matches</th> 
                    <th class="svelte-14l7dpt">Alignment length</th> 
                    <th class="svelte-14l7dpt">Number of mismatches</th> 
                    <th class="svelte-14l7dpt">Number of gap openings</th> 
                    <th class="svelte-14l7dpt">Start of alignment in query</th> 
                    <th class="svelte-14l7dpt">End of alignment in query</th> 
                    <th class="svelte-14l7dpt">Start of alignment in subject</th> 
                    <th class="svelte-14l7dpt">End of alignment in subject</th> 
                    <th class="svelte-14l7dpt">Strand</th> 
                    <th class="svelte-14l7dpt"></th></tr>`, s = T(), l = y("tbody");
      for (let d = 0; d < f.length; d += 1)
        f[d].c();
      O(n, "font-weight", "bold"), O(n, "margin-bottom", "20px"), O(n, "font-size", "110%"), O(n, "padding", "0"), O(n, "margin-top", "0px"), c(i, "id", "blast-result"), c(i, "cellpadding", "0"), c(i, "cellspacing", "0"), c(i, "class", "svelte-14l7dpt"), c(r, "id", "results-inner"), c(r, "class", "svelte-14l7dpt"), c(t, "class", "box svelte-14l7dpt"), c(t, "id", "results"), c(t, "style", "");
    },
    m(d, h) {
      L(d, t, h), p(t, r), p(r, n), p(r, a), p(r, i), p(i, o), p(i, s), p(i, l);
      for (let v = 0; v < f.length; v += 1)
        f[v].m(l, null);
    },
    p(d, h) {
      if (h & /*goToPos, blastResult, controller*/
      328) {
        u = /*blastResult*/
        d[3];
        let v;
        for (v = 0; v < u.length; v += 1) {
          const m = lm(d, u, v);
          f[v] ? f[v].p(m, h) : (f[v] = mm(m), f[v].c(), f[v].m(l, null));
        }
        for (; v < f.length; v += 1)
          f[v].d(1);
        f.length = u.length;
      }
    },
    d(d) {
      d && x(t), Ve(f, d);
    }
  };
}
function qJ(e) {
  let t;
  return {
    c() {
      t = Q("-");
    },
    m(r, n) {
      L(r, t, n);
    },
    d(r) {
      r && x(t);
    }
  };
}
function UJ(e) {
  let t;
  return {
    c() {
      t = Q("+");
    },
    m(r, n) {
      L(r, t, n);
    },
    d(r) {
      r && x(t);
    }
  };
}
function mm(e) {
  let t, r, n = (
    /*controller*/
    e[6].metadata.chromosomesById[
      /*hit*/
      e[21].chromosome
    ].label + ""
  ), a, i, o, s = (
    /*hit*/
    e[21].snp_count + ""
  ), l, u, f, d = (
    /*hit*/
    e[21].e_value + ""
  ), h, v, m, g = (
    /*hit*/
    e[21].bit_score + ""
  ), _, b, S, k = (
    /*hit*/
    e[21].percentage_of_identical_matches + ""
  ), w, C, E, A, D = (
    /*hit*/
    e[21].alignment_length + ""
  ), F, R, $, j = (
    /*hit*/
    e[21].number_of_mismatches + ""
  ), V, re, q, ee = (
    /*hit*/
    e[21].number_of_gap_openings + ""
  ), Y, ae, M, P = (
    /*hit*/
    e[21].start_of_alignment_in_query + ""
  ), I, J, G, z = (
    /*hit*/
    e[21].end_of_alignment_in_query + ""
  ), K, te, de, oe = (
    /*hit*/
    e[21].start_of_alignment_in_subject + ""
  ), X, B, ue, se = (
    /*hit*/
    e[21].end_of_alignment_in_subject + ""
  ), N, ce, ye, me, ze, Oe, He, ke, Ze;
  function Qe(je, le) {
    return (
      /*hit*/
      je[21].end_of_alignment_in_subject > /*hit*/
      je[21].start_of_alignment_in_subject ? UJ : qJ
    );
  }
  let Re = Qe(e), et = Re(e);
  function pt() {
    return (
      /*click_handler*/
      e[17](
        /*hit*/
        e[21]
      )
    );
  }
  return {
    c() {
      t = y("tr"), r = y("td"), a = Q(n), i = T(), o = y("td"), l = Q(s), u = T(), f = y("td"), h = Q(d), v = T(), m = y("td"), _ = Q(g), b = T(), S = y("td"), w = Q(k), C = Q(" %"), E = T(), A = y("td"), F = Q(D), R = T(), $ = y("td"), V = Q(j), re = T(), q = y("td"), Y = Q(ee), ae = T(), M = y("td"), I = Q(P), J = T(), G = y("td"), K = Q(z), te = T(), de = y("td"), X = Q(oe), B = T(), ue = y("td"), N = Q(se), ce = T(), ye = y("td"), et.c(), me = T(), ze = y("td"), Oe = y("a"), Oe.textContent = "show", He = T(), c(r, "class", "svelte-14l7dpt"), c(o, "class", "svelte-14l7dpt"), c(f, "class", "svelte-14l7dpt"), c(m, "class", "svelte-14l7dpt"), c(S, "class", "svelte-14l7dpt"), c(A, "class", "svelte-14l7dpt"), c($, "class", "svelte-14l7dpt"), c(q, "class", "svelte-14l7dpt"), c(M, "class", "svelte-14l7dpt"), c(G, "class", "svelte-14l7dpt"), c(de, "class", "svelte-14l7dpt"), c(ue, "class", "svelte-14l7dpt"), c(ye, "class", "svelte-14l7dpt"), c(Oe, "href", "#"), c(ze, "class", "svelte-14l7dpt");
    },
    m(je, le) {
      L(je, t, le), p(t, r), p(r, a), p(t, i), p(t, o), p(o, l), p(t, u), p(t, f), p(f, h), p(t, v), p(t, m), p(m, _), p(t, b), p(t, S), p(S, w), p(S, C), p(t, E), p(t, A), p(A, F), p(t, R), p(t, $), p($, V), p(t, re), p(t, q), p(q, Y), p(t, ae), p(t, M), p(M, I), p(t, J), p(t, G), p(G, K), p(t, te), p(t, de), p(de, X), p(t, B), p(t, ue), p(ue, N), p(t, ce), p(t, ye), et.m(ye, null), p(t, me), p(t, ze), p(ze, Oe), p(t, He), ke || (Ze = Z(Oe, "click", Ee(pt)), ke = !0);
    },
    p(je, le) {
      e = je, le & /*blastResult*/
      8 && n !== (n = /*controller*/
      e[6].metadata.chromosomesById[
        /*hit*/
        e[21].chromosome
      ].label + "") && _e(a, n), le & /*blastResult*/
      8 && s !== (s = /*hit*/
      e[21].snp_count + "") && _e(l, s), le & /*blastResult*/
      8 && d !== (d = /*hit*/
      e[21].e_value + "") && _e(h, d), le & /*blastResult*/
      8 && g !== (g = /*hit*/
      e[21].bit_score + "") && _e(_, g), le & /*blastResult*/
      8 && k !== (k = /*hit*/
      e[21].percentage_of_identical_matches + "") && _e(w, k), le & /*blastResult*/
      8 && D !== (D = /*hit*/
      e[21].alignment_length + "") && _e(F, D), le & /*blastResult*/
      8 && j !== (j = /*hit*/
      e[21].number_of_mismatches + "") && _e(V, j), le & /*blastResult*/
      8 && ee !== (ee = /*hit*/
      e[21].number_of_gap_openings + "") && _e(Y, ee), le & /*blastResult*/
      8 && P !== (P = /*hit*/
      e[21].start_of_alignment_in_query + "") && _e(I, P), le & /*blastResult*/
      8 && z !== (z = /*hit*/
      e[21].end_of_alignment_in_query + "") && _e(K, z), le & /*blastResult*/
      8 && oe !== (oe = /*hit*/
      e[21].start_of_alignment_in_subject + "") && _e(X, oe), le & /*blastResult*/
      8 && se !== (se = /*hit*/
      e[21].end_of_alignment_in_subject + "") && _e(N, se), Re !== (Re = Qe(e)) && (et.d(1), et = Re(e), et && (et.c(), et.m(ye, null)));
    },
    d(je) {
      je && x(t), et.d(), ke = !1, Ze();
    }
  };
}
function HJ(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m, g, _, b, S, k, w = (
    /*blastResult*/
    (e[3] !== !1 || /*blastResultHistory*/
    e[4].length > 1) && fm(e)
  ), C = (
    /*blastResult*/
    e[3] === !1 && vm(e)
  ), E = (
    /*blastResult*/
    e[3] !== !1 && gm(e)
  );
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "BLAST", n = T(), a = y("div"), i = y("span"), i.textContent = "BLAST type:", o = T(), s = y("input"), l = T(), u = y("label"), u.textContent = "blastn", f = T(), d = y("input"), h = T(), v = y("label"), v.textContent = "tblastn", m = T(), w && w.c(), g = T(), C && C.c(), _ = T(), E && E.c(), c(r, "class", "divbrowse-modal-dialogue-headline"), c(s, "type", "radio"), c(s, "name", "mode"), s.__value = "blastn", s.value = s.__value, c(s, "id", "blastn"), e[13][0].push(s), c(u, "for", "blastn"), c(d, "type", "radio"), c(d, "name", "mode"), d.__value = "tblastn", d.value = d.__value, c(d, "id", "tblastn"), e[13][0].push(d), c(v, "for", "tblastn"), O(a, "font-size", "90%"), O(a, "margin-bottom", "10px"), O(t, "width", "70vw");
    },
    m(A, D) {
      L(A, t, D), p(t, r), p(t, n), p(t, a), p(a, i), p(a, o), p(a, s), s.checked = s.__value === /*params*/
      e[2].blast_type, p(a, l), p(a, u), p(a, f), p(a, d), d.checked = d.__value === /*params*/
      e[2].blast_type, p(a, h), p(a, v), p(t, m), w && w.m(t, null), p(t, g), C && C.m(t, null), p(t, _), E && E.m(t, null), b = !0, S || (k = [
        Z(
          s,
          "change",
          /*input0_change_handler*/
          e[12]
        ),
        Z(
          d,
          "change",
          /*input1_change_handler*/
          e[14]
        )
      ], S = !0);
    },
    p(A, [D]) {
      D & /*params*/
      4 && (s.checked = s.__value === /*params*/
      A[2].blast_type), D & /*params*/
      4 && (d.checked = d.__value === /*params*/
      A[2].blast_type), /*blastResult*/
      A[3] !== !1 || /*blastResultHistory*/
      A[4].length > 1 ? w ? w.p(A, D) : (w = fm(A), w.c(), w.m(t, g)) : w && (w.d(1), w = null), /*blastResult*/
      A[3] === !1 ? C ? (C.p(A, D), D & /*blastResult*/
      8 && ne(C, 1)) : (C = vm(A), C.c(), ne(C, 1), C.m(t, _)) : C && (Je(), fe(C, 1, 1, () => {
        C = null;
      }), Ye()), /*blastResult*/
      A[3] !== !1 ? E ? E.p(A, D) : (E = gm(A), E.c(), E.m(t, null)) : E && (E.d(1), E = null);
    },
    i(A) {
      b || (ne(C), b = !0);
    },
    o(A) {
      fe(C), b = !1;
    },
    d(A) {
      A && x(t), e[13][0].splice(
        /*$$binding_groups*/
        e[13][0].indexOf(s),
        1
      ), e[13][0].splice(
        /*$$binding_groups*/
        e[13][0].indexOf(d),
        1
      ), w && w.d(), C && C.d(), E && E.d(), S = !1, Le(k);
    }
  };
}
function GJ(e, t, r) {
  let { close: n } = t;
  const a = We("app");
  let { controller: i } = a.app();
  const { snpPosHighlights: o } = Et();
  let s = !1, l = !1, u = { query: "", blast_type: "blastn" }, f = i.lastBlastResult, d = i.blastResultHistory, h = "";
  d.length > 0 && (h = d.slice(-1)[0].timestamp);
  const v = () => {
    if (u.query === "")
      return !1;
    r(1, l = !0), r(0, s = !0), i.blast(u, (A) => {
      console.log(A), r(0, s = !1), r(1, l = !1), r(3, f = A), r(4, d = i.blastResultHistory), r(5, h = d.slice(-1)[0].timestamp);
    });
  };
  function m(A, D, F) {
    n(), i.goToChromosomeAndPosition(A, D), o.set({ startpos: D, endpos: F });
  }
  function g() {
    r(3, f = !1), r(5, h = "");
  }
  function _(A) {
    for (let D of d)
      D.timestamp === A && r(3, f = D.blast_hits);
  }
  const b = [[]];
  function S() {
    u.blast_type = this.__value, r(2, u);
  }
  function k() {
    u.blast_type = this.__value, r(2, u);
  }
  function w() {
    h = pr(this), r(5, h), r(4, d);
  }
  function C() {
    u.query = this.value, r(2, u);
  }
  const E = (A) => m(A.chromosome, A.start_of_alignment_in_subject, A.end_of_alignment_in_subject);
  return e.$$set = (A) => {
    "close" in A && r(11, n = A.close);
  }, [
    s,
    l,
    u,
    f,
    d,
    h,
    i,
    v,
    m,
    g,
    _,
    n,
    S,
    b,
    k,
    w,
    C,
    E
  ];
}
class WJ extends Ue {
  constructor(t) {
    super(), qe(this, t, GJ, HJ, Be, { close: 11 }, VJ);
  }
}
function KJ(e) {
  rt(e, "svelte-ss87f1", "button.btn-cta.svelte-ss87f1.svelte-ss87f1{margin-right:25px}#grid-parent.svelte-ss87f1.svelte-ss87f1{display:grid;grid-template-columns:repeat(2, 1fr);grid-template-rows:1fr;grid-column-gap:20px;grid-row-gap:0px}.col1.svelte-ss87f1.svelte-ss87f1{grid-area:1 / 1 / 2 / 2}.col2.svelte-ss87f1.svelte-ss87f1{grid-area:1 / 2 / 2 / 3}.grid-mode-box.svelte-ss87f1.svelte-ss87f1{border:1px solid #c8c8c8;background:#f8f8f8;border-radius:8px;padding:15px;box-sizing:border-box}.grid-mode-box.svelte-ss87f1>div.select-option.svelte-ss87f1{border:0px solid red;position:relative}.grid-mode-box.svelte-ss87f1>div.select-option input.svelte-ss87f1{position:absolute;top:1px;left:0px;margin:0}.grid-mode-box.svelte-ss87f1>div.select-option label.svelte-ss87f1{margin-left:23px;display:block}.grid-mode-box.svelte-ss87f1>div.select-option label h5.svelte-ss87f1{font-size:95%;margin:0;padding:0;font-weight:700}.grid-mode-box.svelte-ss87f1>div.select-option p.svelte-ss87f1{font-size:86%;margin:5px 0 0 23px;padding:0;line-height:1.2 !important;color:#5a5a5a}.grid-mode-box.svelte-ss87f1>div.select-option.disabled.svelte-ss87f1{color:#828282}.grid-mode-box.svelte-ss87f1>div.select-option.disabled p.svelte-ss87f1{color:#828282}.grid-mode-box.parameters.svelte-ss87f1 p.svelte-ss87f1{margin:0 0 10px 0;font-size:90%;line-height:1.3}div.mode-option-box>div.select-option.svelte-ss87f1 input.svelte-ss87f1{position:absolute;top:0px;left:0px}div.mode-option-box>div.select-option.svelte-ss87f1 label.svelte-ss87f1{margin-left:28px;display:block}div.mode-option-box>div.select-option.svelte-ss87f1 label h5.svelte-ss87f1{font-size:95%;margin:0;padding:2px 0 0 0;font-weight:700}div.mode-option-box>div.select-option.svelte-ss87f1 label p.svelte-ss87f1{font-size:90%;margin:5px 0 0 0;padding:0;line-height:1 !important;color:#5a5a5a}div.genomic-range-info.svelte-ss87f1.svelte-ss87f1{border:1px solid #c8c8c8;background:#f2f2f2;border-radius:8px;padding:10px 7px}table.svelte-ss87f1 tr td.svelte-ss87f1{font-size:90%;border:0px solid #c8c8c8;padding:1px 5px}");
}
function bm(e, t, r) {
  const n = e.slice();
  return n[61] = t[r], n;
}
function _m(e) {
  let t;
  function r(i, o) {
    return (
      /*data*/
      i[12].features.length == 0 ? YJ : JJ
    );
  }
  let n = r(e), a = n(e);
  return {
    c() {
      a.c(), t = vt();
    },
    m(i, o) {
      a.m(i, o), L(i, t, o);
    },
    p(i, o) {
      n === (n = r(i)) && a ? a.p(i, o) : (a.d(1), a = n(i), a && (a.c(), a.m(t.parentNode, t)));
    },
    d(i) {
      a.d(i), i && x(t);
    }
  };
}
function JJ(e) {
  let t, r, n, a, i, o = (
    /*data*/
    e[12].features
  ), s = [];
  for (let l = 0; l < o.length; l += 1)
    s[l] = wm(bm(e, o, l));
  return {
    c() {
      t = y("select"), r = y("option"), r.textContent = "Please select a gene or feature ...";
      for (let l = 0; l < s.length; l += 1)
        s[l].c();
      r.__value = "", r.value = r.__value, c(t, "class", "divbrowse-form-control"), O(t, "width", "100%"), t.disabled = n = /*data*/
      e[12].features.length == 0 || /*mode*/
      e[6] !== "current_gene", /*selectedFeature*/
      e[10] === void 0 && St(() => /*select_change_handler*/
      e[39].call(t));
    },
    m(l, u) {
      L(l, t, u), p(t, r);
      for (let f = 0; f < s.length; f += 1)
        s[f].m(t, null);
      wt(
        t,
        /*selectedFeature*/
        e[10]
      ), a || (i = Z(
        t,
        "change",
        /*select_change_handler*/
        e[39]
      ), a = !0);
    },
    p(l, u) {
      if (u[0] & /*data*/
      4096) {
        o = /*data*/
        l[12].features;
        let f;
        for (f = 0; f < o.length; f += 1) {
          const d = bm(l, o, f);
          s[f] ? s[f].p(d, u) : (s[f] = wm(d), s[f].c(), s[f].m(t, null));
        }
        for (; f < s.length; f += 1)
          s[f].d(1);
        s.length = o.length;
      }
      u[0] & /*data, mode*/
      4160 && n !== (n = /*data*/
      l[12].features.length == 0 || /*mode*/
      l[6] !== "current_gene") && (t.disabled = n), u[0] & /*selectedFeature, data*/
      5120 && wt(
        t,
        /*selectedFeature*/
        l[10]
      );
    },
    d(l) {
      l && x(t), Ve(s, l), a = !1, i();
    }
  };
}
function YJ(e) {
  let t;
  return {
    c() {
      t = y("p"), t.textContent = "There are currently no genes in the viewport!", O(t, "line-height", "1", 1), O(t, "font-size", "90%"), O(t, "font-weight", "500"), O(t, "padding-top", "0px"), c(t, "class", "svelte-ss87f1");
    },
    m(r, n) {
      L(r, t, n);
    },
    p: he,
    d(r) {
      r && x(t);
    }
  };
}
function ym(e) {
  let t, r = (
    /*feature*/
    e[61].ID + ""
  ), n, a;
  return {
    c() {
      t = y("option"), n = Q(r), O(t, "font-size", "90%"), t.__value = a = /*feature*/
      e[61].ID, t.value = t.__value;
    },
    m(i, o) {
      L(i, t, o), p(t, n);
    },
    p(i, o) {
      o[0] & /*data*/
      4096 && r !== (r = /*feature*/
      i[61].ID + "") && _e(n, r), o[0] & /*data*/
      4096 && a !== (a = /*feature*/
      i[61].ID) && (t.__value = a, t.value = t.__value);
    },
    d(i) {
      i && x(t);
    }
  };
}
function wm(e) {
  let t, r = (
    /*feature*/
    e[61].ID !== "." && ym(e)
  );
  return {
    c() {
      r && r.c(), t = vt();
    },
    m(n, a) {
      r && r.m(n, a), L(n, t, a);
    },
    p(n, a) {
      /*feature*/
      n[61].ID !== "." ? r ? r.p(n, a) : (r = ym(n), r.c(), r.m(t.parentNode, t)) : r && (r.d(1), r = null);
    },
    d(n) {
      r && r.d(n), n && x(t);
    }
  };
}
function Sm(e) {
  let t, r, n, a, i, o, s, l, u, f, d;
  return {
    c() {
      t = y("div"), r = y("p"), r.textContent = "Provide a start and an end position for the genomic range:", n = T(), a = y("input"), i = T(), o = y("input"), s = y("br"), l = T(), u = y("input"), c(r, "class", "svelte-ss87f1"), a.disabled = /*customRangeInputDisabled*/
      e[17], c(a, "type", "text"), c(a, "placeholder", "Start position"), c(a, "class", "divbrowse-form-control svelte-ss87f1"), O(a, "padding", "0 8px 0 8px"), O(a, "width", "120px"), o.disabled = /*customRangeInputDisabled*/
      e[17], c(o, "type", "text"), c(o, "placeholder", "End position"), c(o, "class", "divbrowse-form-control svelte-ss87f1"), O(o, "padding", "0 8px 0 8px"), O(o, "width", "120px"), u.disabled = /*customRangeInputDisabled*/
      e[17], c(u, "type", "button"), u.value = "Validate", c(u, "class", "divbrowse-btn divbrowse-btn-light svelte-ss87f1"), O(u, "margin-top", "9px");
    },
    m(h, v) {
      L(h, t, v), p(t, r), p(t, n), p(t, a), ht(
        a,
        /*customStartpos*/
        e[21]
      ), p(t, i), p(t, o), ht(
        o,
        /*customEndpos*/
        e[22]
      ), p(t, s), p(t, l), p(t, u), f || (d = [
        Z(
          a,
          "input",
          /*input0_input_handler*/
          e[40]
        ),
        Z(
          o,
          "input",
          /*input1_input_handler*/
          e[41]
        ),
        Z(u, "click", Ee(
          /*click_handler*/
          e[42]
        ))
      ], f = !0);
    },
    p(h, v) {
      v[0] & /*customRangeInputDisabled*/
      131072 && (a.disabled = /*customRangeInputDisabled*/
      h[17]), v[0] & /*customStartpos*/
      2097152 && a.value !== /*customStartpos*/
      h[21] && ht(
        a,
        /*customStartpos*/
        h[21]
      ), v[0] & /*customRangeInputDisabled*/
      131072 && (o.disabled = /*customRangeInputDisabled*/
      h[17]), v[0] & /*customEndpos*/
      4194304 && o.value !== /*customEndpos*/
      h[22] && ht(
        o,
        /*customEndpos*/
        h[22]
      ), v[0] & /*customRangeInputDisabled*/
      131072 && (u.disabled = /*customRangeInputDisabled*/
      h[17]);
    },
    d(h) {
      h && x(t), f = !1, Le(d);
    }
  };
}
function Om(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m = (
    /*showLoadingAnimationSnpWindow*/
    e[14] && km()
  ), g = (
    /*variant_positions_not_found*/
    e[25].length > 0 && Em(e)
  );
  return {
    c() {
      t = y("div"), r = y("p"), r.textContent = "Provide a list with variant positions in the textarea below. Positions can be separated either by comma, semicolon, space or newline.", n = T(), a = y("textarea"), i = T(), o = y("div"), s = y("input"), u = T(), m && m.c(), f = T(), g && g.c(), c(r, "class", "svelte-ss87f1"), O(a, "width", "100%"), O(a, "height", "70px"), O(a, "padding", "6px"), s.disabled = l = /*variant_positions*/
      !(e[23].length > 0 && !/*showLoadingAnimationSnpWindow*/
      e[14]), c(s, "type", "button"), s.value = "Validate", c(s, "class", "divbrowse-btn divbrowse-btn-light svelte-ss87f1"), O(s, "float", "left"), O(o, "margin-top", "6px"), O(o, "display", "flow-root");
    },
    m(_, b) {
      L(_, t, b), p(t, r), p(t, n), p(t, a), ht(
        a,
        /*variant_positions_textarea*/
        e[11]
      ), p(t, i), p(t, o), p(o, s), p(o, u), m && m.m(o, null), p(t, f), g && g.m(t, null), d = !0, h || (v = [
        Z(
          a,
          "input",
          /*textarea_input_handler*/
          e[43]
        ),
        Z(s, "click", Ee(
          /*click_handler_1*/
          e[44]
        ))
      ], h = !0);
    },
    p(_, b) {
      b[0] & /*variant_positions_textarea*/
      2048 && ht(
        a,
        /*variant_positions_textarea*/
        _[11]
      ), (!d || b[0] & /*variant_positions, showLoadingAnimationSnpWindow*/
      8404992 && l !== (l = /*variant_positions*/
      !(_[23].length > 0 && !/*showLoadingAnimationSnpWindow*/
      _[14]))) && (s.disabled = l), /*showLoadingAnimationSnpWindow*/
      _[14] ? m ? b[0] & /*showLoadingAnimationSnpWindow*/
      16384 && ne(m, 1) : (m = km(), m.c(), ne(m, 1), m.m(o, null)) : m && (Je(), fe(m, 1, 1, () => {
        m = null;
      }), Ye()), /*variant_positions_not_found*/
      _[25].length > 0 ? g ? g.p(_, b) : (g = Em(_), g.c(), g.m(t, null)) : g && (g.d(1), g = null);
    },
    i(_) {
      d || (ne(m), d = !0);
    },
    o(_) {
      fe(m), d = !1;
    },
    d(_) {
      _ && x(t), m && m.d(), g && g.d(), h = !1, Le(v);
    }
  };
}
function km(e) {
  let t, r, n;
  return r = new tn({ props: { size: "small" } }), {
    c() {
      t = y("div"), xe(r.$$.fragment), O(t, "float", "left"), O(t, "margin", "4px 0 0 10px");
    },
    m(a, i) {
      L(a, t, i), Ne(r, t, null), n = !0;
    },
    i(a) {
      n || (ne(r.$$.fragment, a), n = !0);
    },
    o(a) {
      fe(r.$$.fragment, a), n = !1;
    },
    d(a) {
      a && x(t), De(r);
    }
  };
}
function Em(e) {
  let t, r, n, a, i;
  return {
    c() {
      t = y("div"), r = y("p"), r.textContent = "The following positions couldn't be mapped to any variant:", n = T(), a = y("textarea"), O(r, "color", "red"), O(r, "margin-bottom", "0px"), c(r, "class", "svelte-ss87f1"), O(a, "width", "100%"), O(a, "height", "60px"), O(a, "padding", "6px"), a.value = i = /*variant_positions_not_found*/
      e[25].join(", "), O(t, "margin-top", "20px");
    },
    m(o, s) {
      L(o, t, s), p(t, r), p(t, n), p(t, a);
    },
    p(o, s) {
      s[0] & /*variant_positions_not_found*/
      33554432 && i !== (i = /*variant_positions_not_found*/
      o[25].join(", ")) && (a.value = i);
    },
    d(o) {
      o && x(t);
    }
  };
}
function $m(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m, g, _, b, S = (
    /*settings*/
    (e[4].showSnpCount === void 0 || /*settings*/
    e[4].showSnpCount === !0) && Tm(e)
  ), k = (
    /*settings*/
    (e[4].allowSnpFiltering === void 0 || /*settings*/
    e[4].allowSnpFiltering === !0) && Cm(e)
  );
  return {
    c() {
      t = y("p"), t.textContent = "Current parameters for analysis or export:", r = T(), n = y("div"), a = y("div"), i = y("table"), o = y("tr"), s = y("td"), s.textContent = "Chromosome:", l = T(), u = y("td"), u.textContent = `${/*controller*/
      e[26].metadata.chromosomesById[
        /*controller*/
        e[26].chromosome
      ].label}`, f = T(), d = y("tr"), h = y("td"), h.textContent = "Genomic range:", v = T(), m = y("td"), g = T(), S && S.c(), _ = T(), k && k.c(), O(t, "margin-bottom", "5px"), O(t, "margin-top", "25px"), O(t, "font-size", "90%"), c(s, "class", "svelte-ss87f1"), c(u, "class", "svelte-ss87f1"), O(h, "width", "140px"), c(h, "class", "svelte-ss87f1"), c(m, "class", "svelte-ss87f1"), O(i, "border-collapse", "collapse"), O(i, "float", "left"), O(i, "width", "450px"), c(i, "class", "svelte-ss87f1"), c(a, "class", "clearfix"), c(a, "style", ""), c(n, "class", "genomic-range-info clearfix svelte-ss87f1"), c(n, "style", "");
    },
    m(w, C) {
      L(w, t, C), L(w, r, C), L(w, n, C), p(n, a), p(a, i), p(i, o), p(o, s), p(o, l), p(o, u), p(i, f), p(i, d), p(d, h), p(d, v), p(d, m), m.innerHTML = /*genomicRange*/
      e[16], p(i, g), S && S.m(i, null), p(a, _), k && k.m(a, null), b = !0;
    },
    p(w, C) {
      (!b || C[0] & /*genomicRange*/
      65536) && (m.innerHTML = /*genomicRange*/
      w[16]), /*settings*/
      w[4].showSnpCount === void 0 || /*settings*/
      w[4].showSnpCount === !0 ? S ? (S.p(w, C), C[0] & /*settings*/
      16 && ne(S, 1)) : (S = Tm(w), S.c(), ne(S, 1), S.m(i, null)) : S && (Je(), fe(S, 1, 1, () => {
        S = null;
      }), Ye()), /*settings*/
      w[4].allowSnpFiltering === void 0 || /*settings*/
      w[4].allowSnpFiltering === !0 ? k ? k.p(w, C) : (k = Cm(w), k.c(), k.m(a, null)) : k && (k.d(1), k = null);
    },
    i(w) {
      b || (ne(S), b = !0);
    },
    o(w) {
      fe(S), b = !1;
    },
    d(w) {
      w && x(t), w && x(r), w && x(n), S && S.d(), k && k.d();
    }
  };
}
function Tm(e) {
  let t, r, n, a, i, o, s;
  const l = [QJ, XJ], u = [];
  function f(d, h) {
    return (
      /*showLoadingAnimationSnpWindow*/
      d[14] ? 0 : 1
    );
  }
  return i = f(e), o = u[i] = l[i](e), {
    c() {
      t = y("tr"), r = y("td"), r.textContent = "Number of variants:", n = T(), a = y("td"), o.c(), c(r, "class", "svelte-ss87f1"), c(a, "class", "svelte-ss87f1");
    },
    m(d, h) {
      L(d, t, h), p(t, r), p(t, n), p(t, a), u[i].m(a, null), s = !0;
    },
    p(d, h) {
      let v = i;
      i = f(d), i === v ? u[i].p(d, h) : (Je(), fe(u[v], 1, 1, () => {
        u[v] = null;
      }), Ye(), o = u[i], o ? o.p(d, h) : (o = u[i] = l[i](d), o.c()), ne(o, 1), o.m(a, null));
    },
    i(d) {
      s || (ne(o), s = !0);
    },
    o(d) {
      fe(o), s = !1;
    },
    d(d) {
      d && x(t), u[i].d();
    }
  };
}
function XJ(e) {
  let t, r;
  return {
    c() {
      t = new dS(!1), r = vt(), t.a = r;
    },
    m(n, a) {
      t.m(
        /*snpcount*/
        e[15],
        n,
        a
      ), L(n, r, a);
    },
    p(n, a) {
      a[0] & /*snpcount*/
      32768 && t.p(
        /*snpcount*/
        n[15]
      );
    },
    i: he,
    o: he,
    d(n) {
      n && x(r), n && t.d();
    }
  };
}
function QJ(e) {
  let t, r;
  return t = new tn({ props: { size: "tiny" } }), {
    c() {
      xe(t.$$.fragment);
    },
    m(n, a) {
      Ne(t, n, a), r = !0;
    },
    p: he,
    i(n) {
      r || (ne(t.$$.fragment, n), r = !0);
    },
    o(n) {
      fe(t.$$.fragment, n), r = !1;
    },
    d(n) {
      De(t, n);
    }
  };
}
function Cm(e) {
  let t, r, n, a, i, o, s, l, u;
  return {
    c() {
      t = y("div"), r = y("input"), n = T(), a = y("label"), i = Q("Apply variant filter settings ("), o = y("a"), o.textContent = "change", s = Q(")"), c(r, "id", "useVariantFilter"), c(r, "type", "checkbox"), O(r, "vertical-align", "-1px"), c(o, "href", "#"), c(a, "for", "useVariantFilter"), O(
        a,
        "color",
        /*useVariantFilter*/
        e[7] == !0 ? "black" : "rgb(140,140,140)"
      ), O(t, "float", "left"), O(t, "margin-left", "20px"), O(t, "margin-top", "15px"), O(t, "font-size", "90%");
    },
    m(f, d) {
      L(f, t, d), p(t, r), r.checked = /*useVariantFilter*/
      e[7], p(t, n), p(t, a), p(a, i), p(a, o), p(a, s), l || (u = [
        Z(
          r,
          "change",
          /*input_change_handler*/
          e[45]
        ),
        Z(o, "click", Ee(
          /*showVariantFilterModal*/
          e[30]
        ))
      ], l = !0);
    },
    p(f, d) {
      d[0] & /*useVariantFilter*/
      128 && (r.checked = /*useVariantFilter*/
      f[7]), d[0] & /*useVariantFilter*/
      128 && O(
        a,
        "color",
        /*useVariantFilter*/
        f[7] == !0 ? "black" : "rgb(140,140,140)"
      );
    },
    d(f) {
      f && x(t), l = !1, Le(u);
    }
  };
}
function Am(e) {
  let t, r, n;
  return r = new tn({ props: { size: "small" } }), {
    c() {
      t = y("div"), xe(r.$$.fragment), O(t, "float", "left"), O(t, "margin-left", "20px");
    },
    m(a, i) {
      L(a, t, i), Ne(r, t, null), n = !0;
    },
    i(a) {
      n || (ne(r.$$.fragment, a), n = !0);
    },
    o(a) {
      fe(r.$$.fragment, a), n = !1;
    },
    d(a) {
      a && x(t), De(r);
    }
  };
}
function Im(e) {
  let t, r, n, a, i, o, s;
  return {
    c() {
      t = y("div"), r = y("span"), r.textContent = "Warning:", n = T(), a = Q(
        /*errorMsg*/
        e[5]
      ), O(r, "font-weight", "500"), O(t, "font-size", "90%"), O(t, "color", "red");
    },
    m(l, u) {
      L(l, t, u), p(t, r), p(t, n), p(t, a), s = !0;
    },
    p(l, u) {
      (!s || u[0] & /*errorMsg*/
      32) && _e(
        a,
        /*errorMsg*/
        l[5]
      );
    },
    i(l) {
      s || (St(() => {
        o && o.end(1), i = bS(t, Lf, {}), i.start();
      }), s = !0);
    },
    o(l) {
      i && i.invalidate(), o = _S(t, Lf, {}), s = !1;
    },
    d(l) {
      l && x(t), l && o && o.end();
    }
  };
}
function ZJ(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m, g, _, b, S, k, w, C, E, A, D, F, R, $, j, V, re, q, ee, Y, ae, M, P, I, J, G, z, K, te, de, oe, X, B, ue, se, N, ce, ye, me, ze, Oe, He, ke, Ze, Qe, Re, et, pt, je = (
    /*mode*/
    e[6] === "current_gene" && _m(e)
  ), le = (
    /*mode*/
    e[6] === "custom_range" && Sm(e)
  ), we = (
    /*mode*/
    e[6] === "variant_positions" && Om(e)
  ), Ce = (
    /*showSnpWindowInfobox*/
    e[18] && $m(e)
  ), Se = (
    /*showLoadingAnimation*/
    e[13] && Am()
  ), Me = (
    /*errorMsg*/
    e[5] && Im(e)
  );
  return {
    c() {
      t = y("section"), r = y("div"), n = y("div"), a = y("p"), a.textContent = "Select the genomic region for analysis or export:", i = T(), o = y("div"), s = y("input"), l = T(), u = y("label"), u.innerHTML = '<h5 class="svelte-ss87f1">Current viewport</h5>', f = T(), d = y("p"), d.textContent = "Data analysis and export are based on the variants that are displayed in the current viewport.", h = T(), v = y("div"), m = y("input"), _ = T(), b = y("label"), b.innerHTML = '<h5 class="svelte-ss87f1">Currently visible gene</h5>', S = T(), k = y("p"), k.textContent = "Data analysis and export are based on the variants that are within a currently visible gene or feature.", w = T(), C = y("div"), E = y("input"), A = T(), D = y("label"), D.innerHTML = '<h5 class="svelte-ss87f1">Custom genomic region</h5>', F = T(), R = y("p"), R.textContent = "Data analysis and export are based on a custom defined genomic region.", $ = T(), j = y("div"), V = y("input"), re = T(), q = y("label"), q.innerHTML = '<h5 class="svelte-ss87f1">Variant positions</h5>', ee = T(), Y = y("p"), Y.textContent = "Data analysis and export are based on the variants that are provided by a delimiter separated list of positions.", ae = T(), M = y("div"), P = y("div"), je && je.c(), I = T(), le && le.c(), J = T(), we && we.c(), G = T(), Ce && Ce.c(), z = T(), K = y("div"), te = y("button"), de = Q("Start data analysis"), oe = T(), X = y("button"), B = Q("Clustermap"), ue = T(), se = y("button"), N = Q("Export VCF"), ce = T(), ye = y("button"), me = Q("Export variants as CSV"), ze = T(), Oe = y("button"), He = Q("Export GFF3"), ke = T(), Se && Se.c(), Ze = T(), Qe = y("div"), Me && Me.c(), O(a, "margin", "0 0 15px 0"), O(a, "font-size", "90%"), c(a, "class", "svelte-ss87f1"), c(s, "type", "radio"), c(s, "name", "mode"), s.__value = "current_viewport", s.value = s.__value, c(s, "id", "mode-current_viewport"), c(s, "class", "svelte-ss87f1"), e[35][0].push(s), c(u, "for", "mode-current_viewport"), c(u, "class", "svelte-ss87f1"), c(d, "class", "svelte-ss87f1"), c(o, "class", "select-option svelte-ss87f1"), m.disabled = g = /*data*/
      e[12].features.length == 0, c(m, "type", "radio"), c(m, "name", "mode"), m.__value = "current_gene", m.value = m.__value, c(m, "id", "mode-current_gene"), c(m, "class", "svelte-ss87f1"), e[35][0].push(m), c(b, "for", "mode-current_gene"), c(b, "class", "svelte-ss87f1"), c(k, "class", "svelte-ss87f1"), c(v, "class", "select-option svelte-ss87f1"), O(v, "margin-top", "20px"), ve(
        v,
        "disabled",
        /*data*/
        e[12].features.length == 0
      ), c(E, "type", "radio"), c(E, "name", "mode"), E.__value = "custom_range", E.value = E.__value, c(E, "id", "mode-custom_range"), c(E, "class", "svelte-ss87f1"), e[35][0].push(E), c(D, "for", "mode-custom_range"), c(D, "class", "svelte-ss87f1"), c(R, "class", "svelte-ss87f1"), c(C, "class", "select-option svelte-ss87f1"), O(C, "margin-top", "20px"), c(V, "type", "radio"), c(V, "name", "mode"), V.__value = "variant_positions", V.value = V.__value, c(V, "id", "mode-variant_positions"), c(V, "class", "svelte-ss87f1"), e[35][0].push(V), c(q, "for", "mode-variant_positions"), c(q, "class", "svelte-ss87f1"), c(Y, "class", "svelte-ss87f1"), c(j, "class", "select-option svelte-ss87f1"), O(j, "margin-top", "20px"), c(n, "class", "col1 grid-mode-box svelte-ss87f1"), c(M, "class", "col2 grid-mode-box parameters svelte-ss87f1"), ve(
        M,
        "inactive",
        /*mode*/
        e[6] === "current_viewport"
      ), c(r, "id", "grid-parent"), c(r, "class", "svelte-ss87f1"), te.disabled = /*doCalcBtnDisabled*/
      e[19], c(te, "type", "button"), c(te, "class", "divbrowse-btn divbrowse-btn-light btn-cta svelte-ss87f1"), O(te, "float", "left"), X.disabled = /*doCalcBtnDisabled*/
      e[19], c(X, "type", "button"), c(X, "class", "divbrowse-btn divbrowse-btn-light btn-cta svelte-ss87f1"), O(X, "float", "left"), se.disabled = /*btnExportDisabled*/
      e[20], c(se, "type", "button"), c(se, "class", "divbrowse-btn divbrowse-btn-light btn-cta svelte-ss87f1"), O(se, "float", "left"), ye.disabled = /*btnExportDisabled*/
      e[20], c(ye, "type", "button"), c(ye, "class", "divbrowse-btn divbrowse-btn-light btn-cta svelte-ss87f1"), O(ye, "float", "left"), Oe.disabled = /*btnExportDisabled*/
      e[20], c(Oe, "type", "button"), c(Oe, "class", "divbrowse-btn divbrowse-btn-light btn-cta svelte-ss87f1"), O(Oe, "float", "left"), O(K, "margin-top", "25px"), c(K, "class", "clearfix"), O(Qe, "margin-top", "20px"), O(Qe, "height", "40px"), c(Qe, "class", "clearfix"), O(t, "width", "50vw");
    },
    m($e, W) {
      L($e, t, W), p(t, r), p(r, n), p(n, a), p(n, i), p(n, o), p(o, s), s.checked = s.__value === /*mode*/
      e[6], p(o, l), p(o, u), p(o, f), p(o, d), p(n, h), p(n, v), p(v, m), m.checked = m.__value === /*mode*/
      e[6], p(v, _), p(v, b), p(v, S), p(v, k), p(n, w), p(n, C), p(C, E), E.checked = E.__value === /*mode*/
      e[6], p(C, A), p(C, D), p(C, F), p(C, R), p(n, $), p(n, j), p(j, V), V.checked = V.__value === /*mode*/
      e[6], p(j, re), p(j, q), p(j, ee), p(j, Y), p(r, ae), p(r, M), p(M, P), je && je.m(P, null), p(M, I), le && le.m(M, null), p(M, J), we && we.m(M, null), p(t, G), Ce && Ce.m(t, null), p(t, z), p(t, K), p(K, te), p(te, de), p(K, oe), p(K, X), p(X, B), p(K, ue), p(K, se), p(se, N), p(K, ce), p(K, ye), p(ye, me), p(K, ze), p(K, Oe), p(Oe, He), p(K, ke), Se && Se.m(K, null), p(t, Ze), p(t, Qe), Me && Me.m(Qe, null), Re = !0, et || (pt = [
        Z(
          s,
          "change",
          /*input0_change_handler*/
          e[34]
        ),
        Z(
          m,
          "change",
          /*input1_change_handler*/
          e[36]
        ),
        Z(
          E,
          "change",
          /*input2_change_handler*/
          e[37]
        ),
        Z(
          V,
          "change",
          /*input3_change_handler*/
          e[38]
        ),
        Z(te, "click", Ee(
          /*doCalculation*/
          e[29]
        )),
        Z(X, "click", Ee(
          /*click_handler_2*/
          e[46]
        )),
        Z(se, "click", Ee(
          /*click_handler_3*/
          e[47]
        )),
        Z(ye, "click", Ee(
          /*click_handler_4*/
          e[48]
        )),
        Z(Oe, "click", Ee(
          /*click_handler_5*/
          e[49]
        ))
      ], et = !0);
    },
    p($e, W) {
      W[0] & /*mode*/
      64 && (s.checked = s.__value === /*mode*/
      $e[6]), (!Re || W[0] & /*data*/
      4096 && g !== (g = /*data*/
      $e[12].features.length == 0)) && (m.disabled = g), W[0] & /*mode*/
      64 && (m.checked = m.__value === /*mode*/
      $e[6]), (!Re || W[0] & /*data*/
      4096) && ve(
        v,
        "disabled",
        /*data*/
        $e[12].features.length == 0
      ), W[0] & /*mode*/
      64 && (E.checked = E.__value === /*mode*/
      $e[6]), W[0] & /*mode*/
      64 && (V.checked = V.__value === /*mode*/
      $e[6]), /*mode*/
      $e[6] === "current_gene" ? je ? je.p($e, W) : (je = _m($e), je.c(), je.m(P, null)) : je && (je.d(1), je = null), /*mode*/
      $e[6] === "custom_range" ? le ? le.p($e, W) : (le = Sm($e), le.c(), le.m(M, J)) : le && (le.d(1), le = null), /*mode*/
      $e[6] === "variant_positions" ? we ? (we.p($e, W), W[0] & /*mode*/
      64 && ne(we, 1)) : (we = Om($e), we.c(), ne(we, 1), we.m(M, null)) : we && (Je(), fe(we, 1, 1, () => {
        we = null;
      }), Ye()), (!Re || W[0] & /*mode*/
      64) && ve(
        M,
        "inactive",
        /*mode*/
        $e[6] === "current_viewport"
      ), /*showSnpWindowInfobox*/
      $e[18] ? Ce ? (Ce.p($e, W), W[0] & /*showSnpWindowInfobox*/
      262144 && ne(Ce, 1)) : (Ce = $m($e), Ce.c(), ne(Ce, 1), Ce.m(t, z)) : Ce && (Je(), fe(Ce, 1, 1, () => {
        Ce = null;
      }), Ye()), (!Re || W[0] & /*doCalcBtnDisabled*/
      524288) && (te.disabled = /*doCalcBtnDisabled*/
      $e[19]), (!Re || W[0] & /*doCalcBtnDisabled*/
      524288) && (X.disabled = /*doCalcBtnDisabled*/
      $e[19]), (!Re || W[0] & /*btnExportDisabled*/
      1048576) && (se.disabled = /*btnExportDisabled*/
      $e[20]), (!Re || W[0] & /*btnExportDisabled*/
      1048576) && (ye.disabled = /*btnExportDisabled*/
      $e[20]), (!Re || W[0] & /*btnExportDisabled*/
      1048576) && (Oe.disabled = /*btnExportDisabled*/
      $e[20]), /*showLoadingAnimation*/
      $e[13] ? Se ? W[0] & /*showLoadingAnimation*/
      8192 && ne(Se, 1) : (Se = Am(), Se.c(), ne(Se, 1), Se.m(K, null)) : Se && (Je(), fe(Se, 1, 1, () => {
        Se = null;
      }), Ye()), /*errorMsg*/
      $e[5] ? Me ? (Me.p($e, W), W[0] & /*errorMsg*/
      32 && ne(Me, 1)) : (Me = Im($e), Me.c(), ne(Me, 1), Me.m(Qe, null)) : Me && (Je(), fe(Me, 1, 1, () => {
        Me = null;
      }), Ye());
    },
    i($e) {
      Re || (ne(we), ne(Ce), ne(Se), ne(Me), Re = !0);
    },
    o($e) {
      fe(we), fe(Ce), fe(Se), fe(Me), Re = !1;
    },
    d($e) {
      $e && x(t), e[35][0].splice(
        /*$$binding_groups*/
        e[35][0].indexOf(s),
        1
      ), e[35][0].splice(
        /*$$binding_groups*/
        e[35][0].indexOf(m),
        1
      ), e[35][0].splice(
        /*$$binding_groups*/
        e[35][0].indexOf(E),
        1
      ), e[35][0].splice(
        /*$$binding_groups*/
        e[35][0].indexOf(V),
        1
      ), je && je.d(), le && le.d(), we && we.d(), Ce && Ce.d(), Se && Se.d(), Me && Me.d(), et = !1, Le(pt);
    }
  };
}
function eY(e, t, r) {
  let n, { onCallToAction: a = null } = t, { openClustermapModal: i = null } = t, { callbackExportVcf: o = null } = t, { callbackExportCsv: s = null } = t, { callbackExportGff: l = null } = t, { settings: u } = t, f;
  function d(le) {
    r(5, f = le);
  }
  const h = We("app");
  let { appId: v, controller: m, eventbus: g } = h.app();
  const { variantFilterSettings: _ } = Et();
  dt(e, _, (le) => r(52, n = le));
  let b = !1;
  const S = {
    show: () => r(13, b = !0),
    hide: () => r(13, b = !1)
  };
  let k = !1, w = "current_viewport", C = !1, E, A, D, F = "", R = !0, $ = null, j = {}, V = !0, re = !0, q = !0, ee = "", Y = "", ae = "", M = [], P = [], I = [], J = m.data;
  g.on("data:display:changed", (le) => {
    r(12, J = le), j = {}, J.features.forEach((we) => {
      j[we.ID] = we;
    });
  });
  function G(le, we) {
    let Ce;
    le === void 0 && we === void 0 ? Ce = { positions: M } : Ce = {
      startpos: parseInt(le),
      endpos: parseInt(we)
    }, C && (Ce.variantFilterSettings = n), r(14, k = !0), r(25, I = []), m.genomic_window_summary(Ce, (Se) => {
      r(5, f = !1), r(14, k = !1), Se.positions_not_found ? (r(25, I = Se.positions_not_found), r(20, q = !0)) : (Se.positions && r(24, P = Se.positions), r(15, D = Se.number_of_variants_in_window_filtered), D > 0 && (r(8, E = Se.startpos), r(9, A = Se.endpos), r(20, q = !1)), D > 4 ? (r(8, E = Se.startpos), r(9, A = Se.endpos), w === "current_gene" ? $ !== null && $ !== "" && r(19, re = !1) : r(19, re = !1)) : (r(19, re = !0), r(5, f = "Too few variants for data analysis. Please provide a genomic region that has at least 5 variants.")));
    });
  }
  function z(le) {
    switch (le) {
      case "current_viewport":
        r(8, E = J.coordinate_first), r(9, A = J.coordinate_last), r(15, D = J.variants_coordinates.length), G(E, A), r(18, V = !0), r(19, re = !1), r(17, R = !0);
        break;
      case "current_gene":
        r(19, re = !0), r(20, q = !0), r(10, $ = ""), r(17, R = !0), r(8, E = 0), r(9, A = 0), r(15, D = "<i>undefined</i>");
        break;
      case "custom_range":
        r(15, D = "<i>undefined</i>"), r(19, re = !0), r(20, q = !0), r(17, R = !1), r(8, E = 0), r(9, A = 0);
        break;
      case "variant_positions":
        r(15, D = "<i>undefined</i>"), r(19, re = !0), r(20, q = !0), r(17, R = !1), r(8, E = 0), r(9, A = 0);
        break;
    }
  }
  function K(le) {
    if (w === "current_gene" && (r(15, D = "<i>undefined</i>"), le !== null && le !== "")) {
      let we = j[le];
      r(8, E = we.start), r(9, A = we.end), G(E, A), r(18, V = !0);
    }
  }
  function te() {
    if (w === "custom_range" && ee === "" && Y === "")
      return !1;
    G(E, A);
  }
  function de(le, we) {
    le > 0 && we > 0 ? r(16, F = le + " &#8211; " + we) : r(16, F = "<i>undefined</i>");
  }
  const oe = () => {
    r(19, re = !1), a(E, A, C, () => {
      r(19, re = !0);
    });
  };
  function X(le) {
    le.includes(",") ? r(23, M = le.split(",")) : le.includes(";") ? r(23, M = le.split(";")) : le.includes(`
`) ? r(23, M = le.split(`
`)) : le.includes(" ") ? r(23, M = le.split(" ")) : r(23, M = [le]), r(23, M = M.filter((we) => we.length > 0)), z("variant_positions");
  }
  const B = () => {
    g.emit("modal:open", {
      component: "VariantFilter",
      onClose: () => {
        te();
      }
    });
  }, ue = [[]];
  function se() {
    w = this.__value, r(6, w);
  }
  function N() {
    w = this.__value, r(6, w);
  }
  function ce() {
    w = this.__value, r(6, w);
  }
  function ye() {
    w = this.__value, r(6, w);
  }
  function me() {
    $ = pr(this), r(10, $), r(12, J), r(26, m);
  }
  function ze() {
    ee = this.value, r(21, ee);
  }
  function Oe() {
    Y = this.value, r(22, Y);
  }
  const He = () => G(ee, Y);
  function ke() {
    ae = this.value, r(11, ae);
  }
  const Ze = () => G();
  function Qe() {
    C = this.checked, r(7, C);
  }
  const Re = () => i(E, A, C), et = () => o(E, A, C, P, () => {
  }), pt = () => s(E, A, C, P, () => {
  }), je = () => l(E, A, C, () => {
  });
  return e.$$set = (le) => {
    "onCallToAction" in le && r(31, a = le.onCallToAction), "openClustermapModal" in le && r(0, i = le.openClustermapModal), "callbackExportVcf" in le && r(1, o = le.callbackExportVcf), "callbackExportCsv" in le && r(2, s = le.callbackExportCsv), "callbackExportGff" in le && r(3, l = le.callbackExportGff), "settings" in le && r(4, u = le.settings);
  }, e.$$.update = () => {
    e.$$.dirty[0] & /*data*/
    4096 && (r(12, J = m.data), j = {}, J.features.forEach((le) => {
      j[le.ID] = le;
    })), e.$$.dirty[0] & /*mode*/
    64 && z(w), e.$$.dirty[0] & /*selectedFeature*/
    1024 && K($), e.$$.dirty[0] & /*useVariantFilter*/
    128 && te(), e.$$.dirty[0] & /*startpos, endpos*/
    768 && de(E, A), e.$$.dirty[0] & /*variant_positions_textarea*/
    2048 && X(ae), e.$$.dirty[0] & /*errorMsg*/
    32 && f && setTimeout(
      function() {
        r(5, f = !1);
      },
      8e3
    );
  }, [
    i,
    o,
    s,
    l,
    u,
    f,
    w,
    C,
    E,
    A,
    $,
    ae,
    J,
    b,
    k,
    D,
    F,
    R,
    V,
    re,
    q,
    ee,
    Y,
    M,
    P,
    I,
    m,
    _,
    G,
    oe,
    B,
    a,
    d,
    S,
    se,
    ue,
    N,
    ce,
    ye,
    me,
    ze,
    Oe,
    He,
    ke,
    Ze,
    Qe,
    Re,
    et,
    pt,
    je
  ];
}
class tY extends Ue {
  constructor(t) {
    super(), qe(
      this,
      t,
      eY,
      ZJ,
      Be,
      {
        onCallToAction: 31,
        openClustermapModal: 0,
        callbackExportVcf: 1,
        callbackExportCsv: 2,
        callbackExportGff: 3,
        settings: 4,
        setErrorMsg: 32,
        loadingAnimation: 33
      },
      KJ,
      [-1, -1, -1]
    );
  }
  get onCallToAction() {
    return this.$$.ctx[31];
  }
  set onCallToAction(t) {
    this.$$set({ onCallToAction: t }), Dr();
  }
  get openClustermapModal() {
    return this.$$.ctx[0];
  }
  set openClustermapModal(t) {
    this.$$set({ openClustermapModal: t }), Dr();
  }
  get callbackExportVcf() {
    return this.$$.ctx[1];
  }
  set callbackExportVcf(t) {
    this.$$set({ callbackExportVcf: t }), Dr();
  }
  get callbackExportCsv() {
    return this.$$.ctx[2];
  }
  set callbackExportCsv(t) {
    this.$$set({ callbackExportCsv: t }), Dr();
  }
  get callbackExportGff() {
    return this.$$.ctx[3];
  }
  set callbackExportGff(t) {
    this.$$set({ callbackExportGff: t }), Dr();
  }
  get settings() {
    return this.$$.ctx[4];
  }
  set settings(t) {
    this.$$set({ settings: t }), Dr();
  }
  get setErrorMsg() {
    return this.$$.ctx[32];
  }
  get loadingAnimation() {
    return this.$$.ctx[33];
  }
}
function Pm(e) {
  let t, r;
  return {
    c() {
      t = y("input"), c(t, "type", "hidden"), c(t, "name", "variant_filter_settings"), t.value = r = JSON.stringify(
        /*$variantFilterSettings*/
        e[8]
      );
    },
    m(n, a) {
      L(n, t, a);
    },
    p(n, a) {
      a & /*$variantFilterSettings*/
      256 && r !== (r = JSON.stringify(
        /*$variantFilterSettings*/
        n[8]
      )) && (t.value = r);
    },
    d(n) {
      n && x(t);
    }
  };
}
function rY(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m, g, _, b, S, k, w, C, E, A, D, F, R = {
    onCallToAction: (
      /*openDataAnalysisModal*/
      e[12]
    ),
    openClustermapModal: (
      /*openClustermapModal*/
      e[13]
    ),
    callbackExportVcf: (
      /*callbackExportVcf*/
      e[14]
    ),
    callbackExportCsv: (
      /*callbackExportCsv*/
      e[15]
    ),
    callbackExportGff: (
      /*callbackExportGff*/
      e[16]
    ),
    settings: (
      /*settingsSelectSnpsDialogue*/
      e[17]
    )
  };
  a = new tY({ props: R }), e[18](a);
  let $ = (
    /*useVariantFilter*/
    e[5] && Pm(e)
  );
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "Data Analysis and Export", n = T(), xe(a.$$.fragment), i = T(), o = y("form"), s = y("input"), l = T(), u = y("input"), f = T(), d = y("input"), h = T(), v = y("input"), g = T(), _ = y("input"), b = T(), $ && $.c(), S = T(), k = y("form"), w = y("input"), C = T(), E = y("input"), A = T(), D = y("input"), c(r, "class", "divbrowse-modal-dialogue-headline"), c(s, "type", "hidden"), c(s, "name", "chrom"), s.value = /*controller*/
      e[9].chromosome, c(u, "type", "hidden"), c(u, "name", "startpos"), u.value = /*startpos*/
      e[3], c(d, "type", "hidden"), c(d, "name", "endpos"), d.value = /*endpos*/
      e[4], c(v, "type", "hidden"), c(v, "name", "positions"), v.value = m = JSON.stringify(
        /*positions*/
        e[6]
      ), c(_, "type", "hidden"), c(_, "name", "samples"), _.value = JSON.stringify(
        /*controller*/
        e[9].config.samples
      ), c(
        o,
        "action",
        /*apiUrlVcfExport*/
        e[1]
      ), c(o, "method", "post"), c(w, "type", "hidden"), c(w, "name", "chrom"), w.value = /*controller*/
      e[9].chromosome, c(E, "type", "hidden"), c(E, "name", "startpos"), E.value = /*startpos*/
      e[3], c(D, "type", "hidden"), c(D, "name", "endpos"), D.value = /*endpos*/
      e[4], c(
        k,
        "action",
        /*apiUrlGffExport*/
        e[11]
      ), c(k, "method", "post"), O(t, "min-width", "700px");
    },
    m(j, V) {
      L(j, t, V), p(t, r), p(t, n), Ne(a, t, null), p(t, i), p(t, o), p(o, s), p(o, l), p(o, u), p(o, f), p(o, d), p(o, h), p(o, v), p(o, g), p(o, _), p(o, b), $ && $.m(o, null), e[19](o), p(t, S), p(t, k), p(k, w), p(k, C), p(k, E), p(k, A), p(k, D), e[20](k), F = !0;
    },
    p(j, [V]) {
      const re = {};
      a.$set(re), (!F || V & /*startpos*/
      8) && (u.value = /*startpos*/
      j[3]), (!F || V & /*endpos*/
      16) && (d.value = /*endpos*/
      j[4]), (!F || V & /*positions*/
      64 && m !== (m = JSON.stringify(
        /*positions*/
        j[6]
      ))) && (v.value = m), /*useVariantFilter*/
      j[5] ? $ ? $.p(j, V) : ($ = Pm(j), $.c(), $.m(o, null)) : $ && ($.d(1), $ = null), (!F || V & /*apiUrlVcfExport*/
      2) && c(
        o,
        "action",
        /*apiUrlVcfExport*/
        j[1]
      ), (!F || V & /*startpos*/
      8) && (E.value = /*startpos*/
      j[3]), (!F || V & /*endpos*/
      16) && (D.value = /*endpos*/
      j[4]);
    },
    i(j) {
      F || (ne(a.$$.fragment, j), F = !0);
    },
    o(j) {
      fe(a.$$.fragment, j), F = !1;
    },
    d(j) {
      j && x(t), e[18](null), De(a), $ && $.d(), e[19](null), e[20](null);
    }
  };
}
function nY(e, t, r) {
  let n;
  const a = We("app");
  let { controller: i, eventbus: o } = a.app();
  const { variantFilterSettings: s } = Et();
  dt(e, s, ($) => r(8, n = $));
  let l, u = i.config.apiBaseUrl + "/vcf_export";
  i.config.apiBaseUrl + "";
  let f, d = i.config.apiBaseUrl + "/gff3_export", h, v, m, g = [], _;
  function b($, j, V, re) {
    let q = { startpos: $, endpos: j };
    V && (q.variantFilterSettings = n), o.emit("modal:open", {
      component: "DataAnalysis",
      props: { params: q }
    });
  }
  function S($, j, V, re = null) {
    let q = { startpos: $, endpos: j };
    V && (q.variantFilterSettings = n), o.emit("modal:open", {
      component: "Clustermap",
      props: { params: q }
    });
  }
  function k($, j, V, re, q) {
    r(1, u = i.config.apiBaseUrl + "/vcf_export"), C($, j, V, re);
  }
  function w($, j, V, re, q) {
    r(1, u = i.config.apiBaseUrl + "/csv_export"), C($, j, V, re);
  }
  function C($, j, V, re, q) {
    r(5, m = V), r(3, h = $), r(4, v = j);
    let ee = { startpos: h, endpos: v };
    re.length > 0 && (ee.positions = re, r(6, g = re)), V && (ee.variantFilterSettings = n), _.loadingAnimation.show(), i.vcf_export_check(ee, (Y) => {
      _.loadingAnimation.hide(), Y.success === !0 && Y.status === "export_possible" ? l.submit() : Y.success === !1 && Y.status === "error_snp_window_too_big" && _.setErrorMsg(Y.message);
    });
  }
  function E($, j, V, re) {
    r(3, h = $), r(4, v = j), setTimeout(() => f.submit(), 500);
  }
  let A = {
    modeSelectLabel: "Setup genomic region:",
    ctaBtnLabel: "Perform calculation now"
  };
  function D($) {
    lt[$ ? "unshift" : "push"](() => {
      _ = $, r(7, _);
    });
  }
  function F($) {
    lt[$ ? "unshift" : "push"](() => {
      l = $, r(0, l);
    });
  }
  function R($) {
    lt[$ ? "unshift" : "push"](() => {
      f = $, r(2, f);
    });
  }
  return [
    l,
    u,
    f,
    h,
    v,
    m,
    g,
    _,
    n,
    i,
    s,
    d,
    b,
    S,
    k,
    w,
    E,
    A,
    D,
    F,
    R
  ];
}
class aY extends Ue {
  constructor(t) {
    super(), qe(this, t, nY, rY, Be, {});
  }
}
function iY(e) {
  rt(e, "svelte-15bu771", ".js-plotly-plot .plotly,.js-plotly-plot .plotly div{direction:ltr;font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0}.js-plotly-plot .plotly input,.js-plotly-plot .plotly button{font-family:'Open Sans', verdana, arial, sans-serif}.js-plotly-plot .plotly input:focus,.js-plotly-plot .plotly button:focus{outline:none}.js-plotly-plot .plotly a{text-decoration:none}.js-plotly-plot .plotly a:hover{text-decoration:none}.js-plotly-plot .plotly .crisp{shape-rendering:crispEdges}.js-plotly-plot .plotly .user-select-none{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.js-plotly-plot .plotly svg{overflow:hidden}.js-plotly-plot .plotly svg a{fill:#447adb}.js-plotly-plot .plotly svg a:hover{fill:#3c6dc5}.js-plotly-plot .plotly .main-svg{position:absolute;top:0;left:0;pointer-events:none}.js-plotly-plot .plotly .main-svg .draglayer{pointer-events:all}.js-plotly-plot .plotly .cursor-default{cursor:default}.js-plotly-plot .plotly .cursor-pointer{cursor:pointer}.js-plotly-plot .plotly .cursor-crosshair{cursor:crosshair}.js-plotly-plot .plotly .cursor-move{cursor:move}.js-plotly-plot .plotly .cursor-col-resize{cursor:col-resize}.js-plotly-plot .plotly .cursor-row-resize{cursor:row-resize}.js-plotly-plot .plotly .cursor-ns-resize{cursor:ns-resize}.js-plotly-plot .plotly .cursor-ew-resize{cursor:ew-resize}.js-plotly-plot .plotly .cursor-sw-resize{cursor:sw-resize}.js-plotly-plot .plotly .cursor-s-resize{cursor:s-resize}.js-plotly-plot .plotly .cursor-se-resize{cursor:se-resize}.js-plotly-plot .plotly .cursor-w-resize{cursor:w-resize}.js-plotly-plot .plotly .cursor-e-resize{cursor:e-resize}.js-plotly-plot .plotly .cursor-nw-resize{cursor:nw-resize}.js-plotly-plot .plotly .cursor-n-resize{cursor:n-resize}.js-plotly-plot .plotly .cursor-ne-resize{cursor:ne-resize}.js-plotly-plot .plotly .cursor-grab{cursor:-webkit-grab;cursor:grab}.js-plotly-plot .plotly .modebar{position:absolute;top:2px;right:2px}.js-plotly-plot .plotly .ease-bg{-webkit-transition:background-color 0.3s ease 0s;-moz-transition:background-color 0.3s ease 0s;-ms-transition:background-color 0.3s ease 0s;-o-transition:background-color 0.3s ease 0s;transition:background-color 0.3s ease 0s}.js-plotly-plot .plotly .modebar--hover>:not(.watermark){opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s}.js-plotly-plot .plotly:hover .modebar--hover .modebar-group{opacity:1}.js-plotly-plot .plotly .modebar-group{float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap}.js-plotly-plot .plotly .modebar-btn{position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box}.js-plotly-plot .plotly .modebar-btn svg{position:relative;top:2px}.js-plotly-plot .plotly .modebar.vertical{display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%}.js-plotly-plot .plotly .modebar.vertical svg{top:-1px}.js-plotly-plot .plotly .modebar.vertical .modebar-group{display:block;float:none;padding-left:0px;padding-bottom:8px}.js-plotly-plot .plotly .modebar.vertical .modebar-group .modebar-btn{display:block;text-align:center}.js-plotly-plot .plotly [data-title]:before,.js-plotly-plot .plotly [data-title]:after{position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%}.js-plotly-plot .plotly [data-title]:hover:before,.js-plotly-plot .plotly [data-title]:hover:after{display:block;opacity:1}.js-plotly-plot .plotly [data-title]:before{content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px}.js-plotly-plot .plotly [data-title]:after{content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px}.js-plotly-plot .plotly .vertical [data-title]:before,.js-plotly-plot .plotly .vertical [data-title]:after{top:0%;right:200%}.js-plotly-plot .plotly .vertical [data-title]:before{border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px}.js-plotly-plot .plotly .select-outline{fill:none;stroke-width:1;shape-rendering:crispEdges}.js-plotly-plot .plotly .select-outline-1{stroke:white}.js-plotly-plot .plotly .select-outline-2{stroke:black;stroke-dasharray:2px 2px}.plotly-notifier{font-family:'Open Sans', verdana, arial, sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px}.plotly-notifier p{margin:0}.plotly-notifier .notifier-note{min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140, 151, 175, 0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.plotly-notifier .notifier-close{color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px}.plotly-notifier .notifier-close:hover{color:#444;text-decoration:none;cursor:pointer}");
}
function Rm(e, t, r) {
  const n = e.slice();
  return n[37] = t[r], n;
}
function jm(e, t, r) {
  const n = e.slice();
  return n[40] = t[r][0], n[41] = t[r][1], n;
}
function Mm(e, t, r) {
  const n = e.slice();
  return n[40] = t[r][0], n[41] = t[r][1], n;
}
function Nm(e, t, r) {
  const n = e.slice();
  return n[40] = t[r][0], n[41] = t[r][1], n;
}
function Dm(e, t, r) {
  const n = e.slice();
  return n[40] = t[r][0], n[41] = t[r][1], n;
}
function xm(e) {
  let t, r, n;
  return r = new tn({ props: { size: "small" } }), {
    c() {
      t = y("div"), xe(r.$$.fragment), O(t, "float", "left"), O(t, "margin-left", "20px");
    },
    m(a, i) {
      L(a, t, i), Ne(r, t, null), n = !0;
    },
    i(a) {
      n || (ne(r.$$.fragment, a), n = !0);
    },
    o(a) {
      fe(r.$$.fragment, a), n = !1;
    },
    d(a) {
      a && x(t), De(r);
    }
  };
}
function Fm(e) {
  let t, r, n, a, i, o, s, l, u, f, d = Object.entries(
    /*pcs*/
    e[5]
  ), h = [];
  for (let g = 0; g < d.length; g += 1)
    h[g] = Lm(Dm(e, d, g));
  let v = Object.entries(
    /*pcs*/
    e[5]
  ), m = [];
  for (let g = 0; g < v.length; g += 1)
    m[g] = Bm(Nm(e, v, g));
  return {
    c() {
      t = y("div"), r = y("label"), r.textContent = "X axis:", n = T(), a = y("select");
      for (let g = 0; g < h.length; g += 1)
        h[g].c();
      i = T(), o = y("label"), o.textContent = "Y axis:", s = T(), l = y("select");
      for (let g = 0; g < m.length; g += 1)
        m[g].c();
      c(r, "class", "form-label"), c(r, "for", "pcaPlotAxisX"), c(a, "class", "divbrowse-form-control"), c(a, "id", "pcaPlotAxisX"), /*pcaPlotAxis*/
      e[6].left.x === void 0 && St(() => /*select0_change_handler*/
      e[15].call(a)), c(o, "class", "form-label"), c(o, "for", "pcaPlotAxisY"), c(l, "class", "divbrowse-form-control"), c(l, "id", "pcaPlotAxisY"), /*pcaPlotAxis*/
      e[6].left.y === void 0 && St(() => /*select1_change_handler*/
      e[17].call(l)), c(t, "class", "clearfix"), O(t, "float", "left"), O(t, "margin-left", "20px");
    },
    m(g, _) {
      L(g, t, _), p(t, r), p(t, n), p(t, a);
      for (let b = 0; b < h.length; b += 1)
        h[b].m(a, null);
      wt(
        a,
        /*pcaPlotAxis*/
        e[6].left.x
      ), p(t, i), p(t, o), p(t, s), p(t, l);
      for (let b = 0; b < m.length; b += 1)
        m[b].m(l, null);
      wt(
        l,
        /*pcaPlotAxis*/
        e[6].left.y
      ), u || (f = [
        Z(
          a,
          "change",
          /*select0_change_handler*/
          e[15]
        ),
        Z(
          a,
          "change",
          /*change_handler*/
          e[16]
        ),
        Z(
          l,
          "change",
          /*select1_change_handler*/
          e[17]
        ),
        Z(
          l,
          "change",
          /*change_handler_1*/
          e[18]
        )
      ], u = !0);
    },
    p(g, _) {
      if (_[0] & /*pcs*/
      32) {
        d = Object.entries(
          /*pcs*/
          g[5]
        );
        let b;
        for (b = 0; b < d.length; b += 1) {
          const S = Dm(g, d, b);
          h[b] ? h[b].p(S, _) : (h[b] = Lm(S), h[b].c(), h[b].m(a, null));
        }
        for (; b < h.length; b += 1)
          h[b].d(1);
        h.length = d.length;
      }
      if (_[0] & /*pcaPlotAxis, pcs*/
      96 && wt(
        a,
        /*pcaPlotAxis*/
        g[6].left.x
      ), _[0] & /*pcs*/
      32) {
        v = Object.entries(
          /*pcs*/
          g[5]
        );
        let b;
        for (b = 0; b < v.length; b += 1) {
          const S = Nm(g, v, b);
          m[b] ? m[b].p(S, _) : (m[b] = Bm(S), m[b].c(), m[b].m(l, null));
        }
        for (; b < m.length; b += 1)
          m[b].d(1);
        m.length = v.length;
      }
      _[0] & /*pcaPlotAxis, pcs*/
      96 && wt(
        l,
        /*pcaPlotAxis*/
        g[6].left.y
      );
    },
    d(g) {
      g && x(t), Ve(h, g), Ve(m, g), u = !1, Le(f);
    }
  };
}
function Lm(e) {
  let t, r = (
    /*label*/
    e[41] + ""
  ), n, a;
  return {
    c() {
      t = y("option"), n = Q(r), t.__value = a = /*pc*/
      e[40], t.value = t.__value;
    },
    m(i, o) {
      L(i, t, o), p(t, n);
    },
    p(i, o) {
      o[0] & /*pcs*/
      32 && r !== (r = /*label*/
      i[41] + "") && _e(n, r), o[0] & /*pcs*/
      32 && a !== (a = /*pc*/
      i[40]) && (t.__value = a, t.value = t.__value);
    },
    d(i) {
      i && x(t);
    }
  };
}
function Bm(e) {
  let t, r = (
    /*label*/
    e[41] + ""
  ), n, a;
  return {
    c() {
      t = y("option"), n = Q(r), t.__value = a = /*pc*/
      e[40], t.value = t.__value;
    },
    m(i, o) {
      L(i, t, o), p(t, n);
    },
    p(i, o) {
      o[0] & /*pcs*/
      32 && r !== (r = /*label*/
      i[41] + "") && _e(n, r), o[0] & /*pcs*/
      32 && a !== (a = /*pc*/
      i[40]) && (t.__value = a, t.value = t.__value);
    },
    d(i) {
      i && x(t);
    }
  };
}
function oY(e) {
  let t;
  return {
    c() {
      t = y("div"), t.textContent = "PCA", O(t, "float", "left"), O(t, "margin-top", "5px"), O(t, "font-weight", "400");
    },
    m(r, n) {
      L(r, t, n);
    },
    p: he,
    d(r) {
      r && x(t);
    }
  };
}
function sY(e) {
  let t, r, n, a, i;
  return {
    c() {
      t = y("select"), r = y("option"), r.textContent = "UMAP", n = y("option"), n.textContent = "PCA", r.__value = "umap", r.value = r.__value, n.__value = "pca", n.value = n.__value, c(t, "class", "divbrowse-form-control"), O(t, "float", "left"), c(t, "id", "rightPlotMethod"), /*rightPlotMethod*/
      e[4] === void 0 && St(() => /*select_change_handler*/
      e[19].call(t));
    },
    m(o, s) {
      L(o, t, s), p(t, r), p(t, n), wt(
        t,
        /*rightPlotMethod*/
        e[4]
      ), a || (i = [
        Z(
          t,
          "change",
          /*select_change_handler*/
          e[19]
        ),
        Z(
          t,
          "change",
          /*change_handler_2*/
          e[20]
        )
      ], a = !0);
    },
    p(o, s) {
      s[0] & /*rightPlotMethod*/
      16 && wt(
        t,
        /*rightPlotMethod*/
        o[4]
      );
    },
    d(o) {
      o && x(t), a = !1, Le(i);
    }
  };
}
function zm(e) {
  let t, r, n, a, i, o;
  return {
    c() {
      t = y("div"), r = y("label"), r.textContent = "UMAP Neighbors:", n = T(), a = y("input"), c(r, "for", "umap_n_neighbors"), O(r, "margin-left", "30px"), O(r, "font-size", "90%"), c(a, "type", "number"), c(a, "id", "umap_n_neighbors"), c(a, "class", "divbrowse-form-control"), O(a, "width", "60px"), O(a, "height", "30px"), O(a, "padding", "0 8px"), O(t, "float", "left");
    },
    m(s, l) {
      L(s, t, l), p(t, r), p(t, n), p(t, a), ht(
        a,
        /*umap_n_neighbors*/
        e[8]
      ), i || (o = Z(
        a,
        "input",
        /*input_input_handler*/
        e[21]
      ), i = !0);
    },
    p(s, l) {
      l[0] & /*umap_n_neighbors*/
      256 && lr(a.value) !== /*umap_n_neighbors*/
      s[8] && ht(
        a,
        /*umap_n_neighbors*/
        s[8]
      );
    },
    d(s) {
      s && x(t), i = !1, o();
    }
  };
}
function Vm(e) {
  let t, r, n, a, i, o, s, l, u, f, d = Object.entries(
    /*pcs*/
    e[5]
  ), h = [];
  for (let g = 0; g < d.length; g += 1)
    h[g] = qm(Mm(e, d, g));
  let v = Object.entries(
    /*pcs*/
    e[5]
  ), m = [];
  for (let g = 0; g < v.length; g += 1)
    m[g] = Um(jm(e, v, g));
  return {
    c() {
      t = y("div"), r = y("label"), r.textContent = "X axis:", n = T(), a = y("select");
      for (let g = 0; g < h.length; g += 1)
        h[g].c();
      i = T(), o = y("label"), o.textContent = "Y axis:", s = T(), l = y("select");
      for (let g = 0; g < m.length; g += 1)
        m[g].c();
      c(r, "class", "form-label"), c(r, "for", "pcaPlot2AxisX"), c(a, "class", "divbrowse-form-control"), c(a, "id", "pcaPlot2AxisX"), /*pcaPlotAxis*/
      e[6].right.x === void 0 && St(() => /*select0_change_handler_1*/
      e[22].call(a)), c(o, "class", "form-label"), c(o, "for", "pcaPlot2AxisY"), c(l, "class", "divbrowse-form-control"), c(l, "id", "pcaPlot2AxisY"), /*pcaPlotAxis*/
      e[6].right.y === void 0 && St(() => /*select1_change_handler_1*/
      e[24].call(l)), c(t, "class", "clearfix"), O(t, "float", "left"), O(t, "margin-left", "20px");
    },
    m(g, _) {
      L(g, t, _), p(t, r), p(t, n), p(t, a);
      for (let b = 0; b < h.length; b += 1)
        h[b].m(a, null);
      wt(
        a,
        /*pcaPlotAxis*/
        e[6].right.x
      ), p(t, i), p(t, o), p(t, s), p(t, l);
      for (let b = 0; b < m.length; b += 1)
        m[b].m(l, null);
      wt(
        l,
        /*pcaPlotAxis*/
        e[6].right.y
      ), u || (f = [
        Z(
          a,
          "change",
          /*select0_change_handler_1*/
          e[22]
        ),
        Z(
          a,
          "change",
          /*change_handler_3*/
          e[23]
        ),
        Z(
          l,
          "change",
          /*select1_change_handler_1*/
          e[24]
        ),
        Z(
          l,
          "change",
          /*change_handler_4*/
          e[25]
        )
      ], u = !0);
    },
    p(g, _) {
      if (_[0] & /*pcs*/
      32) {
        d = Object.entries(
          /*pcs*/
          g[5]
        );
        let b;
        for (b = 0; b < d.length; b += 1) {
          const S = Mm(g, d, b);
          h[b] ? h[b].p(S, _) : (h[b] = qm(S), h[b].c(), h[b].m(a, null));
        }
        for (; b < h.length; b += 1)
          h[b].d(1);
        h.length = d.length;
      }
      if (_[0] & /*pcaPlotAxis, pcs*/
      96 && wt(
        a,
        /*pcaPlotAxis*/
        g[6].right.x
      ), _[0] & /*pcs*/
      32) {
        v = Object.entries(
          /*pcs*/
          g[5]
        );
        let b;
        for (b = 0; b < v.length; b += 1) {
          const S = jm(g, v, b);
          m[b] ? m[b].p(S, _) : (m[b] = Um(S), m[b].c(), m[b].m(l, null));
        }
        for (; b < m.length; b += 1)
          m[b].d(1);
        m.length = v.length;
      }
      _[0] & /*pcaPlotAxis, pcs*/
      96 && wt(
        l,
        /*pcaPlotAxis*/
        g[6].right.y
      );
    },
    d(g) {
      g && x(t), Ve(h, g), Ve(m, g), u = !1, Le(f);
    }
  };
}
function qm(e) {
  let t, r = (
    /*label*/
    e[41] + ""
  ), n, a;
  return {
    c() {
      t = y("option"), n = Q(r), t.__value = a = /*pc*/
      e[40], t.value = t.__value;
    },
    m(i, o) {
      L(i, t, o), p(t, n);
    },
    p(i, o) {
      o[0] & /*pcs*/
      32 && r !== (r = /*label*/
      i[41] + "") && _e(n, r), o[0] & /*pcs*/
      32 && a !== (a = /*pc*/
      i[40]) && (t.__value = a, t.value = t.__value);
    },
    d(i) {
      i && x(t);
    }
  };
}
function Um(e) {
  let t, r = (
    /*label*/
    e[41] + ""
  ), n, a;
  return {
    c() {
      t = y("option"), n = Q(r), t.__value = a = /*pc*/
      e[40], t.value = t.__value;
    },
    m(i, o) {
      L(i, t, o), p(t, n);
    },
    p(i, o) {
      o[0] & /*pcs*/
      32 && r !== (r = /*label*/
      i[41] + "") && _e(n, r), o[0] & /*pcs*/
      32 && a !== (a = /*pc*/
      i[40]) && (t.__value = a, t.value = t.__value);
    },
    d(i) {
      i && x(t);
    }
  };
}
function Hm(e) {
  let t, r, n, a, i, o = (
    /*selectedSamples*/
    e[2].length + ""
  ), s, l, u, f, d, h, v = (
    /*selectedSamples*/
    e[2]
  ), m = [];
  for (let g = 0; g < v.length; g += 1)
    m[g] = Gm(Rm(e, v, g));
  return {
    c() {
      t = y("div"), r = y("button"), r.textContent = "Unset selection", n = T(), a = y("strong"), i = Q("You have selected "), s = Q(o), l = Q(" genotypes:"), u = y("br"), f = T();
      for (let g = 0; g < m.length; g += 1)
        m[g].c();
      O(r, "margin-bottom", "8px"), O(r, "display", "block"), O(t, "float", "left"), O(t, "width", "300px"), O(t, "font-size", "90%"), O(t, "margin-left", "25px"), O(t, "height", "500px"), O(t, "border", "1px solid rgb(100,100,100)"), O(t, "padding", "10px"), O(t, "overflow-y", "scroll");
    },
    m(g, _) {
      L(g, t, _), p(t, r), p(t, n), p(t, a), p(a, i), p(a, s), p(a, l), p(t, u), p(t, f);
      for (let b = 0; b < m.length; b += 1)
        m[b].m(t, null);
      d || (h = Z(r, "click", Ee(
        /*click_handler*/
        e[26]
      )), d = !0);
    },
    p(g, _) {
      if (_[0] & /*selectedSamples*/
      4 && o !== (o = /*selectedSamples*/
      g[2].length + "") && _e(s, o), _[0] & /*selectedSamples*/
      4) {
        v = /*selectedSamples*/
        g[2];
        let b;
        for (b = 0; b < v.length; b += 1) {
          const S = Rm(g, v, b);
          m[b] ? m[b].p(S, _) : (m[b] = Gm(S), m[b].c(), m[b].m(t, null));
        }
        for (; b < m.length; b += 1)
          m[b].d(1);
        m.length = v.length;
      }
    },
    d(g) {
      g && x(t), Ve(m, g), d = !1, h();
    }
  };
}
function Gm(e) {
  let t = (
    /*sample*/
    e[37] + ""
  ), r, n;
  return {
    c() {
      r = Q(t), n = y("br");
    },
    m(a, i) {
      L(a, r, i), L(a, n, i);
    },
    p(a, i) {
      i[0] & /*selectedSamples*/
      4 && t !== (t = /*sample*/
      a[37] + "") && _e(r, t);
    },
    d(a) {
      a && x(r), a && x(n);
    }
  };
}
function lY(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m, g, _, b, S, k, w, C, E, A, D, F, R, $, j = (
    /*showLoadingAnimation*/
    e[3] && xm()
  ), V = (
    /*showPcaComponentSelects*/
    e[7] && Fm(e)
  );
  function re(P, I) {
    return (
      /*controller*/
      P[9].metadata.features.umap ? sY : oY
    );
  }
  let ee = re(e)(e), Y = (
    /*rightPlotMethod*/
    e[4] === "umap" && zm(e)
  ), ae = (
    /*rightPlotMethod*/
    e[4] === "pca" && /*showPcaComponentSelects*/
    e[7] && Vm(e)
  ), M = (
    /*selectedSamples*/
    e[2].length > 0 && Hm(e)
  );
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "Data Analysis", n = T(), a = y("div"), i = y("button"), i.textContent = "Calculate", o = T(), j && j.c(), s = T(), l = y("div"), u = y("div"), f = y("div"), f.textContent = "PCA", d = T(), V && V.c(), h = T(), v = y("div"), m = T(), g = y("div"), _ = T(), b = y("div"), ee.c(), S = T(), Y && Y.c(), k = T(), ae && ae.c(), w = T(), C = y("div"), E = T(), A = y("div"), D = T(), M && M.c(), c(r, "class", "divbrowse-modal-dialogue-headline"), c(i, "type", "button"), c(i, "class", "divbrowse-btn divbrowse-btn-light"), O(i, "float", "left"), c(a, "class", "clearfix"), O(a, "margin-bottom", "10px"), O(f, "float", "left"), O(f, "margin-top", "5px"), O(f, "font-weight", "400"), O(v, "clear", "both"), c(g, "id", "plotDivLeft"), O(g, "margin-top", "20px"), O(g, "float", "left"), O(
        g,
        "display",
        /*showPcaResultPlot*/
        e[0]
      ), O(g, "width", "520px"), O(g, "height", "520px"), O(g, "padding", "5px"), O(g, "border", "1px solid rgb(200,200,200)"), O(g, "background", "white"), O(u, "float", "left"), O(u, "height", "600px"), O(u, "padding", "10px 20px"), O(u, "border", "1px solid rgb(100,100,100)"), O(u, "background", "rgb(240,240,240)"), O(C, "clear", "both"), c(A, "id", "plotDivRight"), O(A, "margin-top", "20px"), O(A, "float", "left"), O(
        A,
        "display",
        /*showUmapResultPlot*/
        e[1]
      ), O(A, "width", "520px"), O(A, "height", "520px"), O(A, "padding", "5px"), O(A, "border", "1px solid rgb(200,200,200)"), O(A, "background", "white"), O(b, "float", "left"), O(b, "height", "600px"), O(b, "padding", "10px 20px"), O(b, "border", "1px solid rgb(100,100,100)"), O(b, "background", "rgb(240,240,240)"), O(b, "margin-left", "20px"), c(l, "class", "clearfix");
    },
    m(P, I) {
      L(P, t, I), p(t, r), p(t, n), p(t, a), p(a, i), p(a, o), j && j.m(a, null), p(t, s), p(t, l), p(l, u), p(u, f), p(u, d), V && V.m(u, null), p(u, h), p(u, v), p(u, m), p(u, g), p(l, _), p(l, b), ee.m(b, null), p(b, S), Y && Y.m(b, null), p(b, k), ae && ae.m(b, null), p(b, w), p(b, C), p(b, E), p(b, A), p(l, D), M && M.m(l, null), F = !0, R || ($ = Z(i, "click", Ee(
        /*calc*/
        e[11]
      )), R = !0);
    },
    p(P, I) {
      /*showLoadingAnimation*/
      P[3] ? j ? I[0] & /*showLoadingAnimation*/
      8 && ne(j, 1) : (j = xm(), j.c(), ne(j, 1), j.m(a, null)) : j && (Je(), fe(j, 1, 1, () => {
        j = null;
      }), Ye()), /*showPcaComponentSelects*/
      P[7] ? V ? V.p(P, I) : (V = Fm(P), V.c(), V.m(u, h)) : V && (V.d(1), V = null), (!F || I[0] & /*showPcaResultPlot*/
      1) && O(
        g,
        "display",
        /*showPcaResultPlot*/
        P[0]
      ), ee.p(P, I), /*rightPlotMethod*/
      P[4] === "umap" ? Y ? Y.p(P, I) : (Y = zm(P), Y.c(), Y.m(b, k)) : Y && (Y.d(1), Y = null), /*rightPlotMethod*/
      P[4] === "pca" && /*showPcaComponentSelects*/
      P[7] ? ae ? ae.p(P, I) : (ae = Vm(P), ae.c(), ae.m(b, w)) : ae && (ae.d(1), ae = null), (!F || I[0] & /*showUmapResultPlot*/
      2) && O(
        A,
        "display",
        /*showUmapResultPlot*/
        P[1]
      ), /*selectedSamples*/
      P[2].length > 0 ? M ? M.p(P, I) : (M = Hm(P), M.c(), M.m(l, null)) : M && (M.d(1), M = null);
    },
    i(P) {
      F || (ne(j), F = !0);
    },
    o(P) {
      fe(j), F = !1;
    },
    d(P) {
      P && x(t), j && j.d(), V && V.d(), ee.d(), Y && Y.d(), ae && ae.d(), M && M.d(), R = !1, $();
    }
  };
}
function Gn(e, t, r, n) {
  let a = { size: 4, color: "#000000", opacity: 0.2 };
  return n === "highlighted" && (a = { size: 4, color: "#0000FF", opacity: 0.8 }), {
    x: e,
    y: t,
    text: r,
    mode: "markers",
    type: "scattergl",
    marker: a,
    selected: { marker: { color: "#0000FF" } }
  };
}
function uY(e, t, r) {
  let { params: n } = t;
  const a = We("app");
  let { controller: i } = a.app();
  const o = We("rootElem");
  let s = "block", l = "block", u = [], f = !1, d = {}, h = "umap";
  i.metadata.features.umap || (h = "pca");
  let v = Array.from(Array(10).keys()).map((z) => z + 1), m = v.map((z) => "PC " + z), g = Object.fromEntries(v.map((z, K) => [z, m[K]])), _ = {
    left: { x: "1", y: "2" },
    right: { x: "3", y: "4" }
  }, b = {
    plotDivLeft: !1,
    plotDivRight: !1
  };
  function S() {
    u.length > 0;
    let z = d.pca_result.filter((N) => u.includes(N[0])), K = d.pca_result.filter((N) => u.includes(N[0]) === !1), te, de;
    d.umap_result != null && (te = d.umap_result.filter((N) => u.includes(N[0])), de = d.umap_result.filter((N) => u.includes(N[0]) === !1));
    let oe, X, B, ue = [], se = [];
    return z.length > 0 && (oe = z.map((N) => N[_.left.x]), X = z.map((N) => N[_.left.y]), B = z.map((N) => N[0]), ue.push(Gn(oe, X, B, "highlighted"))), oe = K.map((N) => N[_.left.x]), X = K.map((N) => N[_.left.y]), B = K.map((N) => N[0]), ue.push(Gn(oe, X, B, "others")), h === "umap" && d.umap_result != null && (te.length > 0 && (oe = te.map((N) => N[1]), X = te.map((N) => N[2]), B = te.map((N) => N[0]), se.push(Gn(oe, X, B, "highlighted"))), oe = de.map((N) => N[1]), X = de.map((N) => N[2]), B = de.map((N) => N[0]), se.push(Gn(oe, X, B, "others"))), h === "pca" && (z.length > 0 && (oe = z.map((N) => N[_.right.x]), X = z.map((N) => N[_.right.y]), B = z.map((N) => N[0]), se.push(Gn(oe, X, B, "highlighted"))), oe = K.map((N) => N[_.right.x]), X = K.map((N) => N[_.right.y]), B = K.map((N) => N[0]), se.push(Gn(oe, X, B, "others"))), { left: ue, right: se };
  }
  function k(z) {
    let K = {
      zeroline: !1,
      ticks: "",
      showticklabels: !0,
      showline: !0,
      mirror: !1,
      showgrid: !1
    }, te = {
      width: 500,
      // 800
      height: 500,
      // 800
      uirevision: "true",
      autosize: !1,
      title: "",
      hovermode: "closest",
      showlegend: !1,
      margin: { t: 25, r: 10, b: 20, l: 45 },
      xaxis: { ...K },
      yaxis: { scaleanchor: "x", ...K }
    }, de = {
      modeBarButtonsToRemove: [
        "sendDataToCloud",
        "hoverCompareCartesian",
        "hoverClosestCartesian",
        "hoverClosestGl2d"
      ],
      displaylogo: !1
    }, oe = o.querySelector("#" + z.containerId);
    Plotly.react(oe, z.traces, te, de), b[z.containerId] === !1 && (b[z.containerId] = !0, E(z.containerId));
  }
  function w() {
    let z = S();
    k({
      containerId: "plotDivLeft",
      traces: z.left
    }), k({
      containerId: "plotDivRight",
      traces: z.right
    });
  }
  function C() {
    var z = {
      //'marker.color': 'red',
      //'selectedpoints': [selec],
      selectedpoints: [[]],
      selected: { marker: { color: "#0000FF" } },
      unselected: { marker: { color: "#000000" } }
    };
    Plotly.update(o.querySelector("#plotDivLeft"), z), Plotly.update(o.querySelector("#plotDivRight"), z);
  }
  function E(z) {
    o.querySelector("#" + z).on("plotly_selected", function(te) {
      if (te !== void 0) {
        r(2, u = []);
        for (let de of te.points)
          r(2, u = [...u, de.text]);
        u.length > 0 && (i.config.samplesSelectedCallback !== void 0 && typeof i.config.samplesSelectedCallback == "function" && i.config.samplesSelectedCallback(u), C(), w());
      }
    });
  }
  let A = !1, D = 25;
  function F() {
    r(3, f = !0), r(14, n.umap_n_neighbors = D, n), i.pca(n, (z) => {
      r(3, f = !1), d = z;
      let K = z.pca_result[0].length - 1;
      v = Array.from(Array(K).keys()).map((te) => te + 1), m = v.map((te) => "PC " + te), r(5, g = Object.fromEntries(v.map((te, de) => [te, m[de]]))), r(0, s = "block"), r(1, l = "block"), w(), r(7, A = !0);
    });
  }
  function R(z) {
    let K = S();
    z === "left" && k({
      containerId: "plotDivLeft",
      traces: K.left
    }), z === "right" && k({
      containerId: "plotDivRight",
      traces: K.right
    });
  }
  function $() {
    let z = S();
    k({
      containerId: "plotDivRight",
      traces: z.right
    });
  }
  function j() {
    _.left.x = pr(this), r(6, _), r(5, g);
  }
  const V = (z) => {
    R("left"), z.currentTarget.blur();
  };
  function re() {
    _.left.y = pr(this), r(6, _), r(5, g);
  }
  const q = (z) => {
    R("left"), z.currentTarget.blur();
  };
  function ee() {
    h = pr(this), r(4, h);
  }
  const Y = (z) => {
    $(), z.currentTarget.blur();
  };
  function ae() {
    D = lr(this.value), r(8, D);
  }
  function M() {
    _.right.x = pr(this), r(6, _), r(5, g);
  }
  const P = (z) => {
    R("right"), z.currentTarget.blur();
  };
  function I() {
    _.right.y = pr(this), r(6, _), r(5, g);
  }
  const J = (z) => {
    R("right"), z.currentTarget.blur();
  }, G = () => {
    C(), r(2, u = []);
  };
  return e.$$set = (z) => {
    "params" in z && r(14, n = z.params);
  }, [
    s,
    l,
    u,
    f,
    h,
    g,
    _,
    A,
    D,
    i,
    C,
    F,
    R,
    $,
    n,
    j,
    V,
    re,
    q,
    ee,
    Y,
    ae,
    M,
    P,
    I,
    J,
    G
  ];
}
class fY extends Ue {
  constructor(t) {
    super(), qe(this, t, uY, lY, Be, { params: 14 }, iY, [-1, -1]);
  }
}
function Wm(e) {
  let t, r, n;
  return r = new tn({ props: { size: "small" } }), {
    c() {
      t = y("div"), xe(r.$$.fragment), O(t, "float", "left"), O(t, "margin-left", "20px");
    },
    m(a, i) {
      L(a, t, i), Ne(r, t, null), n = !0;
    },
    i(a) {
      n || (ne(r.$$.fragment, a), n = !0);
    },
    o(a) {
      fe(r.$$.fragment, a), n = !1;
    },
    d(a) {
      a && x(t), De(r);
    }
  };
}
function Km(e) {
  let t, r;
  return {
    c() {
      t = y("img"), Uu(t.src, r = "data:image/png;base64," + /*base64imageStr*/
      e[4]) || c(t, "src", r), c(t, "alt", "clustermap"), O(
        t,
        "width",
        /*widthScaled*/
        e[1] + "px"
      );
    },
    m(n, a) {
      L(n, t, a);
    },
    p(n, a) {
      a & /*base64imageStr*/
      16 && !Uu(t.src, r = "data:image/png;base64," + /*base64imageStr*/
      n[4]) && c(t, "src", r), a & /*widthScaled*/
      2 && O(
        t,
        "width",
        /*widthScaled*/
        n[1] + "px"
      );
    },
    d(n) {
      n && x(t);
    }
  };
}
function cY(e) {
  let t, r, n, a, i, o, s, l, u, f, d = parseInt(
    /*zoomfactor*/
    e[5]
  ) + "", h, v, m, g, _, b, S, k, w, C, E, A, D, F, R = (
    /*showLoadingAnimation*/
    e[2] && Wm()
  ), $ = (
    /*base64imageStr*/
    e[4] && Km(e)
  );
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "Clustermap", n = T(), a = y("div"), i = y("button"), i.textContent = "Calculate", o = T(), R && R.c(), s = T(), l = y("div"), u = y("label"), f = Q("Zoom: "), h = Q(d), v = Q("%"), m = T(), g = y("input"), _ = T(), b = y("div"), S = y("label"), S.textContent = "Font size:", k = T(), w = y("input"), C = T(), E = y("div"), $ && $.c(), c(r, "class", "divbrowse-modal-dialogue-headline"), c(i, "type", "button"), c(i, "class", "divbrowse-btn divbrowse-btn-light"), O(i, "float", "left"), c(u, "for", "zoom"), c(g, "id", "zoom"), c(g, "type", "range"), c(g, "min", "0"), c(g, "max", "1"), c(g, "step", "any"), O(g, "position", "absolute"), O(g, "top", "3px"), O(g, "left", "110px"), O(l, "border", "1px solid rgb(150,150,150)"), O(l, "display", "inline-block"), O(l, "margin-left", "25px"), O(l, "padding", "5px 9px"), O(l, "position", "relative"), O(l, "width", "260px"), c(S, "for", "fontscale"), c(w, "id", "fontscale"), c(w, "type", "number"), c(w, "step", "0.1"), c(w, "min", "1"), c(w, "max", "3"), O(b, "border", "1px solid rgb(150,150,150)"), O(b, "display", "inline-block"), O(b, "margin-left", "25px"), O(b, "padding", "5px 9px"), O(b, "position", "relative"), c(a, "class", "clearfix"), O(a, "margin-bottom", "10px"), O(E, "border", "1px solid black"), O(E, "padding", "0"), O(E, "width", "610px"), O(E, "height", "610px"), O(E, "overflow", "auto"), O(E, "box-sizing", "content-box"), O(t, "width", "70vw");
    },
    m(j, V) {
      L(j, t, V), p(t, r), p(t, n), p(t, a), p(a, i), p(a, o), R && R.m(a, null), p(a, s), p(a, l), p(l, u), p(u, f), p(u, h), p(u, v), p(l, m), p(l, g), ht(
        g,
        /*zoomlvl*/
        e[0]
      ), p(a, _), p(a, b), p(b, S), p(b, k), p(b, w), ht(
        w,
        /*fontscale*/
        e[3]
      ), p(t, C), p(t, E), $ && $.m(E, null), A = !0, D || (F = [
        Z(i, "click", Ee(
          /*calc*/
          e[6]
        )),
        Z(
          g,
          "change",
          /*input0_change_input_handler*/
          e[8]
        ),
        Z(
          g,
          "input",
          /*input0_change_input_handler*/
          e[8]
        ),
        Z(
          w,
          "input",
          /*input1_input_handler*/
          e[9]
        )
      ], D = !0);
    },
    p(j, [V]) {
      /*showLoadingAnimation*/
      j[2] ? R ? V & /*showLoadingAnimation*/
      4 && ne(R, 1) : (R = Wm(), R.c(), ne(R, 1), R.m(a, s)) : R && (Je(), fe(R, 1, 1, () => {
        R = null;
      }), Ye()), (!A || V & /*zoomfactor*/
      32) && d !== (d = parseInt(
        /*zoomfactor*/
        j[5]
      ) + "") && _e(h, d), V & /*zoomlvl*/
      1 && ht(
        g,
        /*zoomlvl*/
        j[0]
      ), V & /*fontscale*/
      8 && lr(w.value) !== /*fontscale*/
      j[3] && ht(
        w,
        /*fontscale*/
        j[3]
      ), /*base64imageStr*/
      j[4] ? $ ? $.p(j, V) : ($ = Km(j), $.c(), $.m(E, null)) : $ && ($.d(1), $ = null);
    },
    i(j) {
      A || (ne(R), A = !0);
    },
    o(j) {
      fe(R), A = !1;
    },
    d(j) {
      j && x(t), R && R.d(), $ && $.d(), D = !1, Le(F);
    }
  };
}
let Jm = 1948, Ym = 600;
function dY(e, t, r) {
  let { params: n } = t;
  const a = We("app");
  let { controller: i } = a.app();
  We("rootElem");
  let o = !1, s = {};
  i.metadata.features.umap;
  let l = 2.5, u, f = 0, d = Jm, h, v;
  function m() {
    r(2, o = !0), r(7, n.fontscale = l, n), i.clustermap(n, (b) => {
      r(2, o = !1), s = b, r(4, u = s.clustermap);
    });
  }
  function g() {
    f = lr(this.value), r(0, f);
  }
  function _() {
    l = lr(this.value), r(3, l);
  }
  return e.$$set = (b) => {
    "params" in b && r(7, n = b.params);
  }, e.$$.update = () => {
    e.$$.dirty & /*zoomlvl*/
    1 && r(1, h = f * (d - Ym) + Ym), e.$$.dirty & /*widthScaled*/
    2 && r(5, v = h / Jm * 100);
  }, [
    f,
    h,
    o,
    l,
    u,
    v,
    m,
    n,
    g,
    _
  ];
}
class pY extends Ue {
  constructor(t) {
    super(), qe(this, t, dY, cY, Be, { params: 7 });
  }
}
function vY(e) {
  rt(e, "svelte-1bhlz4w", "table.svelte-1bhlz4w.svelte-1bhlz4w{border-spacing:0px;border-collapse:collapse}table.svelte-1bhlz4w tr td.svelte-1bhlz4w{vertical-align:top;border:1px solid rgb(120,120,120);border-collapse:collapse;padding:5px;margin:0px}");
}
function Xm(e, t, r) {
  const n = e.slice();
  return n[4] = t[r], n;
}
function hY(e) {
  let t, r, n, a, i, o = (
    /*controller*/
    e[0].metadata.dataset_descriptions.vcf_doi + ""
  ), s;
  return {
    c() {
      t = y("tr"), r = y("td"), r.textContent = "DOI/URL of VCF:", n = T(), a = y("td"), i = y("a"), s = Q(o), O(r, "width", "200px"), c(r, "class", "svelte-1bhlz4w"), c(
        i,
        "href",
        /*controller*/
        e[0].metadata.dataset_descriptions.vcf_doi
      ), c(i, "target", "_blank"), c(a, "class", "svelte-1bhlz4w");
    },
    m(l, u) {
      L(l, t, u), p(t, r), p(t, n), p(t, a), p(a, i), p(i, s);
    },
    p: he,
    d(l) {
      l && x(t);
    }
  };
}
function Qm(e) {
  let t = (
    /*chrom*/
    e[4].label + ""
  ), r, n, a = (
    /*chrom*/
    e[4].number_of_variants + ""
  ), i, o;
  return {
    c() {
      r = Q(t), n = Q(": "), i = Q(a), o = y("br");
    },
    m(s, l) {
      L(s, r, l), L(s, n, l), L(s, i, l), L(s, o, l);
    },
    p: he,
    d(s) {
      s && x(r), s && x(n), s && x(i), s && x(o);
    }
  };
}
function gY(e) {
  let t, r, n, a;
  return {
    c() {
      t = y("tr"), r = y("td"), r.textContent = "Number of genes provided by genome annotation:", n = T(), a = y("td"), a.textContent = `${/*controller*/
      e[0].metadata.gff3.count_genes}`, c(r, "class", "svelte-1bhlz4w"), c(a, "class", "svelte-1bhlz4w");
    },
    m(i, o) {
      L(i, t, o), p(t, r), p(t, n), p(t, a);
    },
    p: he,
    d(i) {
      i && x(t);
    }
  };
}
function mY(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m, g, _ = (
    /*controller*/
    e[0].metadata.dataset_descriptions.vcf_reference_genome_doi + ""
  ), b, S, k, w, C, E, A, D = (
    /*controller*/
    e[0].metadata.dataset_descriptions.gff3_doi + ""
  ), F, R, $, j, V, re, q, ee, Y, ae, M, P, I, J, G, z, K, te, de, oe, X, B, ue, se, N = (
    /*controller*/
    e[0].metadata.samples.map(
      /*func*/
      e[2]
    ).join("<br />") + ""
  ), ce = (
    /*controller*/
    e[0].metadata.dataset_descriptions.vcf_doi != null && /*controller*/
    e[0].metadata.dataset_descriptions.vcf_doi !== "" && hY(e)
  ), ye = (
    /*controller*/
    e[0].metadata.chromosomes
  ), me = [];
  for (let Oe = 0; Oe < ye.length; Oe += 1)
    me[Oe] = Qm(Xm(e, ye, Oe));
  let ze = (
    /*controller*/
    e[0].metadata.gff3.has_gff3 === !0 && gY(e)
  );
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "Data Summary", n = T(), a = y("table"), i = y("tr"), o = y("td"), o.textContent = "General description:", s = T(), l = y("td"), l.textContent = `${/*controller*/
      e[0].metadata.dataset_descriptions.general_description}`, u = T(), ce && ce.c(), f = T(), d = y("tr"), h = y("td"), h.textContent = "DOI/URL of reference genome:", v = T(), m = y("td"), g = y("a"), b = Q(_), S = T(), k = y("tr"), w = y("td"), w.textContent = "DOI/URL of genome annotation:", C = T(), E = y("td"), A = y("a"), F = Q(D), R = T(), $ = y("tr"), j = y("td"), j.textContent = "Number of genotypes:", V = T(), re = y("td"), re.textContent = `${/*controller*/
      e[0].metadata.count_genotypes}`, q = T(), ee = y("tr"), Y = y("td"), Y.textContent = "Number of variants:", ae = T(), M = y("td"), M.textContent = `${/*controller*/
      e[0].metadata.count_variants}`, P = T(), I = y("tr"), J = y("td"), J.textContent = "Number of variants per chromosome:", G = T(), z = y("td"), K = y("div");
      for (let Oe = 0; Oe < me.length; Oe += 1)
        me[Oe].c();
      te = T(), ze && ze.c(), de = T(), oe = y("tr"), X = y("td"), X.textContent = "Genotypes list:", B = T(), ue = y("td"), se = y("div"), c(r, "class", "divbrowse-modal-dialogue-headline"), O(o, "width", "200px"), c(o, "class", "svelte-1bhlz4w"), c(l, "class", "svelte-1bhlz4w"), O(h, "width", "200px"), c(h, "class", "svelte-1bhlz4w"), c(
        g,
        "href",
        /*controller*/
        e[0].metadata.dataset_descriptions.vcf_reference_genome_doi
      ), c(g, "target", "_blank"), c(m, "class", "svelte-1bhlz4w"), O(w, "width", "200px"), c(w, "class", "svelte-1bhlz4w"), c(
        A,
        "href",
        /*controller*/
        e[0].metadata.dataset_descriptions.gff3_doi
      ), c(A, "target", "_blank"), c(E, "class", "svelte-1bhlz4w"), c(j, "class", "svelte-1bhlz4w"), c(re, "class", "svelte-1bhlz4w"), O(Y, "width", "200px"), c(Y, "class", "svelte-1bhlz4w"), c(M, "class", "svelte-1bhlz4w"), O(J, "width", "200px"), c(J, "class", "svelte-1bhlz4w"), O(K, "height", "130px"), O(K, "overflow-y", "scroll"), O(K, "padding-right", "40px"), c(z, "class", "svelte-1bhlz4w"), c(X, "class", "svelte-1bhlz4w"), O(se, "height", "200px"), O(se, "overflow-y", "scroll"), O(se, "padding-right", "40px"), c(ue, "class", "svelte-1bhlz4w"), O(a, "width", "700px"), c(a, "class", "svelte-1bhlz4w");
    },
    m(Oe, He) {
      L(Oe, t, He), p(t, r), p(t, n), p(t, a), p(a, i), p(i, o), p(i, s), p(i, l), p(a, u), ce && ce.m(a, null), p(a, f), p(a, d), p(d, h), p(d, v), p(d, m), p(m, g), p(g, b), p(a, S), p(a, k), p(k, w), p(k, C), p(k, E), p(E, A), p(A, F), p(a, R), p(a, $), p($, j), p($, V), p($, re), p(a, q), p(a, ee), p(ee, Y), p(ee, ae), p(ee, M), p(a, P), p(a, I), p(I, J), p(I, G), p(I, z), p(z, K);
      for (let ke = 0; ke < me.length; ke += 1)
        me[ke].m(K, null);
      p(a, te), ze && ze.m(a, null), p(a, de), p(a, oe), p(oe, X), p(oe, B), p(oe, ue), p(ue, se), se.innerHTML = N;
    },
    p(Oe, [He]) {
      if (/*controller*/
      Oe[0].metadata.dataset_descriptions.vcf_doi != null && /*controller*/
      Oe[0].metadata.dataset_descriptions.vcf_doi !== "" && ce.p(Oe, He), He & /*controller*/
      1) {
        ye = /*controller*/
        Oe[0].metadata.chromosomes;
        let ke;
        for (ke = 0; ke < ye.length; ke += 1) {
          const Ze = Xm(Oe, ye, ke);
          me[ke] ? me[ke].p(Ze, He) : (me[ke] = Qm(Ze), me[ke].c(), me[ke].m(K, null));
        }
        for (; ke < me.length; ke += 1)
          me[ke].d(1);
        me.length = ye.length;
      }
      /*controller*/
      Oe[0].metadata.gff3.has_gff3 === !0 && ze.p(Oe, He);
    },
    i: he,
    o: he,
    d(Oe) {
      Oe && x(t), ce && ce.d(), Ve(me, Oe), ze && ze.d();
    }
  };
}
function bY(e) {
  const t = We("app");
  let { controller: r } = t.app();
  function n(i) {
    return r.config.sampleDisplayNameTransformer !== void 0 && typeof r.config.sampleDisplayNameTransformer == "function" && (i = r.config.sampleDisplayNameTransformer(i)), i;
  }
  return [r, n, (i) => n(i)];
}
class _Y extends Ue {
  constructor(t) {
    super(), qe(this, t, bY, mY, Be, {}, vY);
  }
}
function yY(e) {
  rt(e, "svelte-1eaip0p", "table.svelte-1eaip0p.svelte-1eaip0p{width:100%;border:0px solid black;border-collapse:collapse;font-size:95%}table.svelte-1eaip0p thead tr th.svelte-1eaip0p{padding:0 5px 10px 0;border-bottom:1px solid #aaaaaa;text-align:center}table.svelte-1eaip0p tbody tr.svelte-1eaip0p{border-bottom:1px solid #aaaaaa}table.svelte-1eaip0p tbody tr td.svelte-1eaip0p{padding:4px 10px;text-align:center}table.svelte-1eaip0p tbody tr td.description.svelte-1eaip0p{text-align:left;width:250px;max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}abbr[title].svelte-1eaip0p.svelte-1eaip0p{text-decoration:none}a.svelte-1eaip0p.svelte-1eaip0p{color:blue}");
}
const wY = (e) => ({}), Zm = (e) => ({});
function e1(e, t, r) {
  const n = e.slice();
  return n[18] = t[r], n;
}
function SY(e) {
  let t;
  return {
    c() {
      t = y("th"), t.innerHTML = "Number of<br/>variants (on exons)", c(t, "class", "svelte-1eaip0p");
    },
    m(r, n) {
      L(r, t, n);
    },
    d(r) {
      r && x(t);
    }
  };
}
function OY(e) {
  let t, r = (
    /*row*/
    e[18].number_of_variants + ""
  ), n, a, i = (
    /*row*/
    e[18].number_of_exon_variants + ""
  ), o, s;
  return {
    c() {
      t = y("td"), n = Q(r), a = Q(" ("), o = Q(i), s = Q(")"), c(t, "class", "svelte-1eaip0p");
    },
    m(l, u) {
      L(l, t, u), p(t, n), p(t, a), p(t, o), p(t, s);
    },
    p(l, u) {
      u & /*dataSlice*/
      4 && r !== (r = /*row*/
      l[18].number_of_variants + "") && _e(n, r), u & /*dataSlice*/
      4 && i !== (i = /*row*/
      l[18].number_of_exon_variants + "") && _e(o, i);
    },
    d(l) {
      l && x(t);
    }
  };
}
function t1(e) {
  let t, r, n, a = (
    /*row*/
    e[18].ID + ""
  ), i, o, s, l = (
    /*row*/
    e[18].type + ""
  ), u, f, d, h, v = (
    /*row*/
    e[18].description + ""
  ), m, g, _, b, S = (
    /*row*/
    e[18].seqid + ""
  ), k, w, C, E = (
    /*row*/
    e[18].start + ""
  ), A, D, F, R = (
    /*row*/
    e[18].end + ""
  ), $, j, V, re = (
    /*row*/
    e[18].primary_confidence_class + ""
  ), q, ee, Y, ae, M, P, I, J, G = (
    /*controller*/
    e[3].metadata.gff3.count_exon_variants !== void 0 && /*controller*/
    e[3].metadata.gff3.count_exon_variants === !0 && OY(e)
  );
  function z() {
    return (
      /*click_handler*/
      e[11](
        /*row*/
        e[18]
      )
    );
  }
  return {
    c() {
      t = y("tr"), r = y("td"), n = y("a"), i = Q(a), o = T(), s = y("td"), u = Q(l), f = T(), d = y("td"), h = y("abbr"), m = Q(v), _ = T(), b = y("td"), k = Q(S), w = T(), C = y("td"), A = Q(E), D = T(), F = y("td"), $ = Q(R), j = T(), V = y("td"), q = Q(re), ee = T(), G && G.c(), Y = T(), ae = y("td"), M = y("a"), M.textContent = "view", P = T(), c(n, "href", "#"), c(n, "class", "svelte-1eaip0p"), c(r, "class", "svelte-1eaip0p"), c(s, "class", "svelte-1eaip0p"), c(h, "title", g = /*row*/
      e[18].description), c(h, "class", "svelte-1eaip0p"), c(d, "class", "description svelte-1eaip0p"), c(b, "class", "svelte-1eaip0p"), c(C, "class", "svelte-1eaip0p"), c(F, "class", "svelte-1eaip0p"), c(V, "class", "svelte-1eaip0p"), c(M, "href", "#"), c(M, "class", "svelte-1eaip0p"), c(ae, "class", "svelte-1eaip0p"), c(t, "class", "svelte-1eaip0p");
    },
    m(K, te) {
      L(K, t, te), p(t, r), p(r, n), p(n, i), p(t, o), p(t, s), p(s, u), p(t, f), p(t, d), p(d, h), p(h, m), p(t, _), p(t, b), p(b, k), p(t, w), p(t, C), p(C, A), p(t, D), p(t, F), p(F, $), p(t, j), p(t, V), p(V, q), p(t, ee), G && G.m(t, null), p(t, Y), p(t, ae), p(ae, M), p(t, P), I || (J = [
        Z(n, "click", ia(Ee(function() {
          mt(
            /*openGeneDetailsModal*/
            e[5](
              /*row*/
              e[18].ID
            )
          ) && e[5](
            /*row*/
            e[18].ID
          ).apply(this, arguments);
        }))),
        Z(M, "click", ia(Ee(z)))
      ], I = !0);
    },
    p(K, te) {
      e = K, te & /*dataSlice*/
      4 && a !== (a = /*row*/
      e[18].ID + "") && _e(i, a), te & /*dataSlice*/
      4 && l !== (l = /*row*/
      e[18].type + "") && _e(u, l), te & /*dataSlice*/
      4 && v !== (v = /*row*/
      e[18].description + "") && _e(m, v), te & /*dataSlice*/
      4 && g !== (g = /*row*/
      e[18].description) && c(h, "title", g), te & /*dataSlice*/
      4 && S !== (S = /*row*/
      e[18].seqid + "") && _e(k, S), te & /*dataSlice*/
      4 && E !== (E = /*row*/
      e[18].start + "") && _e(A, E), te & /*dataSlice*/
      4 && R !== (R = /*row*/
      e[18].end + "") && _e($, R), te & /*dataSlice*/
      4 && re !== (re = /*row*/
      e[18].primary_confidence_class + "") && _e(q, re), /*controller*/
      e[3].metadata.gff3.count_exon_variants !== void 0 && /*controller*/
      e[3].metadata.gff3.count_exon_variants === !0 && G.p(e, te);
    },
    d(K) {
      K && x(t), G && G.d(), I = !1, Le(J);
    }
  };
}
function kY(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m, g, _, b, S, k, w, C, E, A, D, F, R, $, j, V, re, q, ee, Y = (
    /*$pagination*/
    e[1].currentPage + 1 + ""
  ), ae, M, P = (
    /*$pagination*/
    e[1].pages + ""
  ), I, J, G, z, K, te, de, oe, X = (
    /*controller*/
    e[3].metadata.gff3.count_exon_variants !== void 0 && /*controller*/
    e[3].metadata.gff3.count_exon_variants === !0 && SY()
  ), B = (
    /*dataSlice*/
    e[2]
  ), ue = [];
  for (let ce = 0; ce < B.length; ce += 1)
    ue[ce] = t1(e1(e, B, ce));
  const se = (
    /*#slots*/
    e[10].buttons
  ), N = Qf(
    se,
    e,
    /*$$scope*/
    e[9],
    Zm
  );
  return {
    c() {
      t = y("table"), r = y("thead"), n = y("tr"), a = y("th"), a.textContent = "ID", i = T(), o = y("th"), o.textContent = "Type", s = T(), l = y("th"), l.textContent = "Description", u = T(), f = y("th"), f.textContent = "Chromosome", d = T(), h = y("th"), h.textContent = "Start position", v = T(), m = y("th"), m.textContent = "End position", g = T(), _ = y("th"), _.innerHTML = "Primary<br/>confidence<br/>class", b = T(), X && X.c(), S = T(), k = y("th"), w = T(), C = y("tbody");
      for (let ce = 0; ce < ue.length; ce += 1)
        ue[ce].c();
      E = T(), A = y("div"), D = y("div"), N && N.c(), F = T(), R = y("div"), $ = y("button"), j = Q("Previous page"), re = T(), q = y("span"), ee = Q("Page "), ae = Q(Y), M = Q(" out of "), I = Q(P), J = T(), G = y("button"), z = Q("Next page"), c(a, "class", "svelte-1eaip0p"), c(o, "class", "svelte-1eaip0p"), c(l, "class", "svelte-1eaip0p"), c(f, "class", "svelte-1eaip0p"), c(h, "class", "svelte-1eaip0p"), c(m, "class", "svelte-1eaip0p"), c(_, "class", "svelte-1eaip0p"), c(k, "class", "svelte-1eaip0p"), c(n, "class", "svelte-1eaip0p"), c(t, "class", "svelte-1eaip0p"), O(D, "width", "49%"), O(D, "float", "left"), $.disabled = V = !/*$pagination*/
      e[1].hasPreviousPage, c($, "class", "divbrowse-btn divbrowse-btn-light"), O(q, "padding", "0 20px"), G.disabled = K = !/*$pagination*/
      e[1].hasNextPage, c(G, "class", "divbrowse-btn divbrowse-btn-light"), O(R, "width", "49%"), O(R, "float", "right"), O(R, "text-align", "right"), O(A, "margin-top", "15px"), O(A, "display", "flow-root");
    },
    m(ce, ye) {
      L(ce, t, ye), p(t, r), p(r, n), p(n, a), p(n, i), p(n, o), p(n, s), p(n, l), p(n, u), p(n, f), p(n, d), p(n, h), p(n, v), p(n, m), p(n, g), p(n, _), p(n, b), X && X.m(n, null), p(n, S), p(n, k), p(t, w), p(t, C);
      for (let me = 0; me < ue.length; me += 1)
        ue[me].m(C, null);
      L(ce, E, ye), L(ce, A, ye), p(A, D), N && N.m(D, null), p(A, F), p(A, R), p(R, $), p($, j), p(R, re), p(R, q), p(q, ee), p(q, ae), p(q, M), p(q, I), p(R, J), p(R, G), p(G, z), te = !0, de || (oe = [
        Z(
          $,
          "click",
          /*click_handler_1*/
          e[12]
        ),
        Z(
          G,
          "click",
          /*click_handler_2*/
          e[13]
        )
      ], de = !0);
    },
    p(ce, [ye]) {
      if (ye & /*goToPos, dataSlice, controller, undefined, openGeneDetailsModal*/
      108) {
        B = /*dataSlice*/
        ce[2];
        let me;
        for (me = 0; me < B.length; me += 1) {
          const ze = e1(ce, B, me);
          ue[me] ? ue[me].p(ze, ye) : (ue[me] = t1(ze), ue[me].c(), ue[me].m(C, null));
        }
        for (; me < ue.length; me += 1)
          ue[me].d(1);
        ue.length = B.length;
      }
      N && N.p && (!te || ye & /*$$scope*/
      512) && ec(
        N,
        se,
        ce,
        /*$$scope*/
        ce[9],
        te ? Zf(
          se,
          /*$$scope*/
          ce[9],
          ye,
          wY
        ) : tc(
          /*$$scope*/
          ce[9]
        ),
        Zm
      ), (!te || ye & /*$pagination*/
      2 && V !== (V = !/*$pagination*/
      ce[1].hasPreviousPage)) && ($.disabled = V), (!te || ye & /*$pagination*/
      2) && Y !== (Y = /*$pagination*/
      ce[1].currentPage + 1 + "") && _e(ae, Y), (!te || ye & /*$pagination*/
      2) && P !== (P = /*$pagination*/
      ce[1].pages + "") && _e(I, P), (!te || ye & /*$pagination*/
      2 && K !== (K = !/*$pagination*/
      ce[1].hasNextPage)) && (G.disabled = K);
    },
    i(ce) {
      te || (ne(N, ce), te = !0);
    },
    o(ce) {
      fe(N, ce), te = !1;
    },
    d(ce) {
      ce && x(t), X && X.d(), Ve(ue, ce), ce && x(E), ce && x(A), N && N.d(ce), de = !1, Le(oe);
    }
  };
}
function EY(e, t, r) {
  let n, a, i = he, o = () => (i(), i = Xf(f, (A) => r(8, a = A)), f);
  e.$$.on_destroy.push(() => i());
  let { $$slots: s = {}, $$scope: l } = t, { close: u } = t, { data: f } = t;
  o();
  const d = We("app");
  let { controller: h, eventbus: v } = d.app();
  const { snpPosHighlights: m } = Et(), g = Bt({
    pageSize: 15,
    pages: 1,
    currentPage: 0,
    hasPreviousPage: !1,
    hasNextPage: !0
  });
  dt(e, g, (A) => r(1, n = A));
  function _(A) {
    let D = A.currentPage * A.pageSize, F = A.currentPage * A.pageSize + A.pageSize;
    return a.slice(D, F);
  }
  let b = [];
  const S = (A) => {
    v.emit("modal:open", {
      component: "GeneDetails",
      props: { featureId: A }
    });
  };
  function k(A, D, F) {
    u();
    let R = h.metadata.gff3.gff3_to_vcf_chromosome_mapping;
    h.goToChromosomeAndPosition(R[A], D), m.set({ startpos: D, endpos: F });
  }
  const w = (A) => k(A.seqid, A.start, A.end), C = () => zt(g, n.currentPage--, n), E = () => zt(g, n.currentPage++, n);
  return e.$$set = (A) => {
    "close" in A && r(7, u = A.close), "data" in A && o(r(0, f = A.data)), "$$scope" in A && r(9, l = A.$$scope);
  }, e.$$.update = () => {
    e.$$.dirty & /*$data, $pagination*/
    258 && zt(g, n.pages = Math.ceil(a.length / n.pageSize), n), e.$$.dirty & /*$pagination*/
    2 && zt(g, n.hasPreviousPage = n.currentPage > 0, n), e.$$.dirty & /*$pagination*/
    2 && zt(
      g,
      n.hasNextPage = n.currentPage + 1 < n.pages,
      n
    ), e.$$.dirty & /*$pagination*/
    2 && r(2, b = _(n));
  }, [
    f,
    n,
    b,
    h,
    g,
    S,
    k,
    u,
    a,
    l,
    s,
    w,
    C,
    E
  ];
}
class $Y extends Ue {
  constructor(t) {
    super(), qe(this, t, EY, kY, Be, { close: 7, data: 0 }, yY);
  }
}
function TY(e) {
  rt(e, "svelte-1iimuz2", "#results.svelte-1iimuz2{background:#f2f2f2;padding:20px;border-radius:6px}");
}
function r1(e, t, r) {
  const n = e.slice();
  return n[30] = t[r], n;
}
function n1(e) {
  let t, r, n;
  return r = new tn({ props: { size: "small" } }), {
    c() {
      t = y("div"), xe(r.$$.fragment), O(t, "position", "absolute"), O(t, "top", "6px"), O(t, "left", "400px");
    },
    m(a, i) {
      L(a, t, i), Ne(r, t, null), n = !0;
    },
    i(a) {
      n || (ne(r.$$.fragment, a), n = !0);
    },
    o(a) {
      fe(r.$$.fragment, a), n = !1;
    },
    d(a) {
      a && x(t), De(r);
    }
  };
}
function a1(e) {
  let t, r, n, a, i, o, s, l, u, f, d = (
    /*controller*/
    e[6].metadata.chromosomes
  ), h = [];
  for (let v = 0; v < d.length; v += 1)
    h[v] = i1(r1(e, d, v));
  return {
    c() {
      t = y("div"), r = y("label"), r.textContent = "Chromosome:", n = T(), a = y("select");
      for (let v = 0; v < h.length; v += 1)
        h[v].c();
      i = T(), o = y("input"), s = T(), l = y("input"), c(r, "class", "form-label"), c(r, "for", "chromosome-selector"), c(a, "class", "divbrowse-form-control"), /*$store*/
      e[5].selectedChromosome === void 0 && St(() => /*select_change_handler*/
      e[16].call(a)), c(o, "placeholder", "start position"), c(o, "type", "number"), c(o, "id", "startpos"), c(o, "class", "divbrowse-form-control pos"), O(o, "width", "120px"), c(l, "placeholder", "end position"), c(l, "type", "number"), c(l, "id", "endpos"), c(l, "class", "divbrowse-form-control pos"), O(l, "width", "120px"), O(t, "float", "right"), O(t, "margin", "4px 0 0 25px");
    },
    m(v, m) {
      L(v, t, m), p(t, r), p(t, n), p(t, a);
      for (let g = 0; g < h.length; g += 1)
        h[g].m(a, null);
      wt(
        a,
        /*$store*/
        e[5].selectedChromosome
      ), p(t, i), p(t, o), ht(
        o,
        /*$store*/
        e[5].startpos
      ), p(t, s), p(t, l), ht(
        l,
        /*$store*/
        e[5].endpos
      ), u || (f = [
        Z(
          a,
          "change",
          /*select_change_handler*/
          e[16]
        ),
        Z(a, "change", Ee(
          /*change_handler_1*/
          e[17]
        )),
        Z(
          o,
          "input",
          /*input0_input_handler_1*/
          e[18]
        ),
        Z(o, "keyup", Ee(
          /*keyup_handler_1*/
          e[19]
        )),
        Z(
          l,
          "input",
          /*input1_input_handler*/
          e[20]
        ),
        Z(l, "keyup", Ee(
          /*keyup_handler_2*/
          e[21]
        ))
      ], u = !0);
    },
    p(v, m) {
      if (m[0] & /*controller*/
      64) {
        d = /*controller*/
        v[6].metadata.chromosomes;
        let g;
        for (g = 0; g < d.length; g += 1) {
          const _ = r1(v, d, g);
          h[g] ? h[g].p(_, m) : (h[g] = i1(_), h[g].c(), h[g].m(a, null));
        }
        for (; g < h.length; g += 1)
          h[g].d(1);
        h.length = d.length;
      }
      m[0] & /*$store, controller*/
      96 && wt(
        a,
        /*$store*/
        v[5].selectedChromosome
      ), m[0] & /*$store, controller*/
      96 && lr(o.value) !== /*$store*/
      v[5].startpos && ht(
        o,
        /*$store*/
        v[5].startpos
      ), m[0] & /*$store, controller*/
      96 && lr(l.value) !== /*$store*/
      v[5].endpos && ht(
        l,
        /*$store*/
        v[5].endpos
      );
    },
    d(v) {
      v && x(t), Ve(h, v), u = !1, Le(f);
    }
  };
}
function i1(e) {
  let t, r = (
    /*chromosome*/
    e[30].label + ""
  ), n;
  return {
    c() {
      t = y("option"), n = Q(r), t.__value = /*chromosome*/
      e[30].id, t.value = t.__value;
    },
    m(a, i) {
      L(a, t, i), p(t, n);
    },
    p: he,
    d(a) {
      a && x(t);
    }
  };
}
function o1(e) {
  let t, r;
  return {
    c() {
      t = Q(
        /*resultRowCount*/
        e[3]
      ), r = Q(" genes were found that match your search query.");
    },
    m(n, a) {
      L(n, t, a), L(n, r, a);
    },
    p(n, a) {
      a[0] & /*resultRowCount*/
      8 && _e(
        t,
        /*resultRowCount*/
        n[3]
      );
    },
    d(n) {
      n && x(t), n && x(r);
    }
  };
}
function s1(e) {
  let t, r, n;
  return r = new $Y({
    props: {
      data: (
        /*data*/
        e[8]
      ),
      close: (
        /*close*/
        e[0]
      ),
      $$slots: { buttons: [CY] },
      $$scope: { ctx: e }
    }
  }), {
    c() {
      t = y("div"), xe(r.$$.fragment), c(t, "id", "results"), c(t, "class", "svelte-1iimuz2");
    },
    m(a, i) {
      L(a, t, i), Ne(r, t, null), n = !0;
    },
    p(a, i) {
      const o = {};
      i[0] & /*close*/
      1 && (o.close = /*close*/
      a[0]), i[0] & /*result*/
      4 | i[1] & /*$$scope*/
      4 && (o.$$scope = { dirty: i, ctx: a }), r.$set(o);
    },
    i(a) {
      n || (ne(r.$$.fragment, a), n = !0);
    },
    o(a) {
      fe(r.$$.fragment, a), n = !1;
    },
    d(a) {
      a && x(t), De(r);
    }
  };
}
function CY(e) {
  let t, r, n, a, i;
  return {
    c() {
      t = y("button"), r = Q("Save result as CSV"), c(t, "slot", "buttons"), t.disabled = n = /*result*/
      e[2].length == 0, c(t, "class", "divbrowse-btn divbrowse-btn-light");
    },
    m(o, s) {
      L(o, t, s), p(t, r), a || (i = Z(t, "click", Ee(
        /*saveResultAsCsv*/
        e[11]
      )), a = !0);
    },
    p(o, s) {
      s[0] & /*result*/
      4 && n !== (n = /*result*/
      o[2].length == 0) && (t.disabled = n);
    },
    d(o) {
      o && x(t), a = !1, i();
    }
  };
}
function AY(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m, g, _, b, S, k, w, C, E, A = (
    /*showLoadingAnimation*/
    e[1] && n1()
  ), D = (
    /*$store*/
    e[5].searchInInterval && a1(e)
  ), F = (
    /*$store*/
    e[5].query.length > 0 && /*resultRowCount*/
    e[3] !== null && /*showGenesFoundText*/
    e[4] && o1(e)
  ), R = (
    /*result*/
    e[2] !== null && s1(e)
  );
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "Gene Search", n = T(), a = y("div"), i = y("div"), o = y("input"), s = T(), l = y("div"), l.innerHTML = '<svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"></path></svg>', u = T(), A && A.c(), f = T(), d = y("div"), h = y("input"), v = T(), m = y("label"), m.textContent = "Search within genomic region", g = T(), D && D.c(), _ = T(), b = y("p"), F && F.c(), S = Q("  "), k = T(), R && R.c(), c(r, "class", "divbrowse-modal-dialogue-headline"), c(o, "type", "text"), c(o, "placeholder", "The ID and the description can be searched..."), O(o, "font-size", "110%"), O(o, "padding-left", "35px"), O(o, "width", "420px"), O(o, "height", "36px"), c(o, "class", "divbrowse-form-control"), O(l, "position", "absolute"), O(l, "top", "7px"), O(l, "left", "6px"), O(i, "position", "relative"), O(i, "float", "left"), c(h, "id", "search-in-genomic-region"), c(h, "type", "checkbox"), O(h, "vertical-align", "-1.5px"), c(m, "for", "search-in-genomic-region"), O(d, "float", "left"), O(d, "margin", "10px 0 0 10px"), O(a, "display", "flow-root"), c(t, "id", "container"), O(t, "min-height", "600px"), O(t, "width", "70vw");
    },
    m($, j) {
      L($, t, j), p(t, r), p(t, n), p(t, a), p(a, i), p(i, o), ht(
        o,
        /*$store*/
        e[5].query
      ), p(i, s), p(i, l), p(i, u), A && A.m(i, null), p(a, f), p(a, d), p(d, h), h.checked = /*$store*/
      e[5].searchInInterval, p(d, v), p(d, m), p(a, g), D && D.m(a, null), p(t, _), p(t, b), F && F.m(b, null), p(b, S), p(t, k), R && R.m(t, null), w = !0, C || (E = [
        Z(
          o,
          "input",
          /*input0_input_handler*/
          e[12]
        ),
        Z(o, "keyup", Ee(
          /*keyup_handler*/
          e[13]
        )),
        Z(
          h,
          "change",
          /*input1_change_handler*/
          e[14]
        ),
        Z(
          h,
          "change",
          /*change_handler*/
          e[15]
        )
      ], C = !0);
    },
    p($, j) {
      j[0] & /*$store, controller*/
      96 && o.value !== /*$store*/
      $[5].query && ht(
        o,
        /*$store*/
        $[5].query
      ), /*showLoadingAnimation*/
      $[1] ? A ? j[0] & /*showLoadingAnimation*/
      2 && ne(A, 1) : (A = n1(), A.c(), ne(A, 1), A.m(i, null)) : A && (Je(), fe(A, 1, 1, () => {
        A = null;
      }), Ye()), j[0] & /*$store, controller*/
      96 && (h.checked = /*$store*/
      $[5].searchInInterval), /*$store*/
      $[5].searchInInterval ? D ? D.p($, j) : (D = a1($), D.c(), D.m(a, null)) : D && (D.d(1), D = null), /*$store*/
      $[5].query.length > 0 && /*resultRowCount*/
      $[3] !== null && /*showGenesFoundText*/
      $[4] ? F ? F.p($, j) : (F = o1($), F.c(), F.m(b, S)) : F && (F.d(1), F = null), /*result*/
      $[2] !== null ? R ? (R.p($, j), j[0] & /*result*/
      4 && ne(R, 1)) : (R = s1($), R.c(), ne(R, 1), R.m(t, null)) : R && (Je(), fe(R, 1, 1, () => {
        R = null;
      }), Ye());
    },
    i($) {
      w || (ne(A), ne(R), w = !0);
    },
    o($) {
      fe(A), fe(R), w = !1;
    },
    d($) {
      $ && x(t), A && A.d(), D && D.d(), F && F.d(), R && R.d(), C = !1, Le(E);
    }
  };
}
function IY(e, t, r) {
  let n, a, { close: i } = t;
  const o = We("app");
  let { controller: s } = o.app(), u = Et().geneSearch;
  dt(e, u, (ee) => r(5, a = ee)), a.selectedChromosome || zt(u, a.selectedChromosome = s.chromosome, a);
  const f = Bt([]);
  dt(e, f, (ee) => r(23, n = ee));
  let d = !1;
  const v = ((ee) => Object.assign({}, ...Object.entries(ee).map(([Y, ae]) => ({ [ae]: Y }))))(s.metadata.gff3.gff3_to_vcf_chromosome_mapping);
  let m = null, g = null, _ = null, b = !1;
  const S = (ee) => ee.replace("-", " ").toLowerCase();
  function k(ee) {
    if (_ = s.metadata.gff3._dataframe, a.searchInInterval === !0) {
      let M = v[a.selectedChromosome];
      _ = _.filter((P) => P.get("seqid") === M), a.startpos !== void 0 && a.startpos > 0 && (_ = _.filter((P) => P.get("start") >= a.startpos)), a.endpos !== void 0 && a.endpos > 0 && (_ = _.filter((P) => P.get("end") <= a.endpos));
    }
    let Y = a.query;
    if (Y === "")
      return r(2, m = _.toCollection()), zt(f, n = m, n), r(3, g = m.length), r(1, d = !1), r(4, b = !1), !1;
    r(1, d = !0);
    let ae = S(Y);
    _ = _.filter((M) => S(M.get("description")).includes(ae) === !0 || S(M.get("ID")).includes(ae) === !0), r(2, m = _.toCollection()), zt(f, n = m, n), r(3, g = m.length), r(1, d = !1), r(4, b = !0);
  }
  const w = mi(k, 750);
  function C() {
    let ee = _.toCSV(!0);
    const Y = document.createElement("a");
    Y.href = URL.createObjectURL(new Blob([ee], { type: "text/csv" })), Y.setAttribute("download", "genes.csv"), document.body.appendChild(Y), Y.click(), document.body.removeChild(Y);
  }
  qr(async () => {
    _ = s.metadata.gff3._dataframe, r(2, m = s.metadata.gff3._collection), zt(f, n = m, n), k();
  });
  function E() {
    a.query = this.value, u.set(a), r(6, s);
  }
  const A = () => w();
  function D() {
    a.searchInInterval = this.checked, u.set(a), r(6, s);
  }
  const F = () => k();
  function R() {
    a.selectedChromosome = pr(this), u.set(a), r(6, s);
  }
  const $ = () => k();
  function j() {
    a.startpos = lr(this.value), u.set(a), r(6, s);
  }
  const V = () => w();
  function re() {
    a.endpos = lr(this.value), u.set(a), r(6, s);
  }
  const q = () => w();
  return e.$$set = (ee) => {
    "close" in ee && r(0, i = ee.close);
  }, [
    i,
    d,
    m,
    g,
    b,
    a,
    s,
    u,
    f,
    k,
    w,
    C,
    E,
    A,
    D,
    F,
    R,
    $,
    j,
    V,
    re,
    q
  ];
}
class PY extends Ue {
  constructor(t) {
    super(), qe(this, t, IY, AY, Be, { close: 0 }, TY, [-1, -1]);
  }
}
function RY(e) {
  rt(e, "svelte-1uh78ic", "p.goterms.svelte-1uh78ic span.svelte-1uh78ic{margin-right:10px}table.svelte-1uh78ic.svelte-1uh78ic{width:100%;border-spacing:0px;border-collapse:collapse;border:1px solid rgb(150,150,150)}table.svelte-1uh78ic tr td.svelte-1uh78ic{vertical-align:top;border-top:0px solid rgb(120,120,120);border-bottom:0px solid rgb(120,120,120);border-collapse:collapse;padding:5px 6px;margin:0px}table.svelte-1uh78ic tr.svelte-1uh78ic:nth-child(odd){background:rgb(240,240,240)}div.links.svelte-1uh78ic.svelte-1uh78ic{margin-top:20px;border:1px solid rgb(150,150,150);padding:6px}div.links.svelte-1uh78ic p.svelte-1uh78ic{margin:0;padding:0}");
}
function l1(e, t, r) {
  const n = e.slice();
  return n[16] = t[r], n;
}
function u1(e, t, r) {
  const n = e.slice();
  return n[19] = t[r], n;
}
function f1(e) {
  let t, r;
  return {
    c() {
      t = Fe("svg"), r = Fe("polygon"), c(r, "points", "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"), c(t, "xmlns", "http://www.w3.org/2000/svg"), c(t, "width", "17"), c(t, "height", "17"), c(t, "viewBox", "0 0 24 24"), c(t, "fill", "rgb(0,0,255)"), c(t, "stroke", "rgb(0,0,255)"), c(t, "stroke-width", "1.5"), c(t, "stroke-linecap", "round"), c(t, "stroke-linejoin", "round"), c(t, "class", "feather feather-star");
    },
    m(n, a) {
      L(n, t, a), p(t, r);
    },
    d(n) {
      n && x(t);
    }
  };
}
function jY(e) {
  let t, r, n, a;
  return {
    c() {
      t = y("tr"), r = y("td"), r.textContent = "Primary confidence class", n = T(), a = y("td"), a.textContent = `${/*result*/
      e[3].primary_confidence_class}`, c(r, "class", "svelte-1uh78ic"), c(a, "class", "svelte-1uh78ic"), c(t, "class", "svelte-1uh78ic");
    },
    m(i, o) {
      L(i, t, o), p(t, r), p(t, n), p(t, a);
    },
    p: he,
    d(i) {
      i && x(t);
    }
  };
}
function MY(e) {
  let t, r, n, a, i, o, s, l, u;
  return {
    c() {
      t = y("tr"), r = y("td"), r.textContent = "Variants on whole gene", n = T(), a = y("td"), a.textContent = `${/*result*/
      e[3].number_of_variants}`, i = T(), o = y("tr"), s = y("td"), s.textContent = "Variants on exons of this gene", l = T(), u = y("td"), u.textContent = `${/*result*/
      e[3].number_of_exon_variants}`, c(r, "class", "svelte-1uh78ic"), c(a, "class", "svelte-1uh78ic"), c(t, "class", "svelte-1uh78ic"), c(s, "class", "svelte-1uh78ic"), c(u, "class", "svelte-1uh78ic"), c(o, "class", "svelte-1uh78ic");
    },
    m(f, d) {
      L(f, t, d), p(t, r), p(t, n), p(t, a), L(f, i, d), L(f, o, d), p(o, s), p(o, l), p(o, u);
    },
    p: he,
    d(f) {
      f && x(t), f && x(i), f && x(o);
    }
  };
}
function NY(e) {
  let t, r, n, a, i = (
    /*externalLinks*/
    e[5]
  ), o = [];
  for (let s = 0; s < i.length; s += 1)
    o[s] = c1(u1(e, i, s));
  return {
    c() {
      t = y("div"), r = y("p"), r.innerHTML = "<strong>External Links</strong>", n = T(), a = y("p");
      for (let s = 0; s < o.length; s += 1)
        o[s].c();
      O(r, "margin-bottom", "5px"), c(r, "class", "svelte-1uh78ic"), c(a, "class", "svelte-1uh78ic"), c(t, "class", "links svelte-1uh78ic");
    },
    m(s, l) {
      L(s, t, l), p(t, r), p(t, n), p(t, a);
      for (let u = 0; u < o.length; u += 1)
        o[u].m(a, null);
    },
    p(s, l) {
      if (l & /*externalLinks*/
      32) {
        i = /*externalLinks*/
        s[5];
        let u;
        for (u = 0; u < i.length; u += 1) {
          const f = u1(s, i, u);
          o[u] ? o[u].p(f, l) : (o[u] = c1(f), o[u].c(), o[u].m(a, null));
        }
        for (; u < o.length; u += 1)
          o[u].d(1);
        o.length = i.length;
      }
    },
    d(s) {
      s && x(t), Ve(o, s);
    }
  };
}
function c1(e) {
  let t, r = (
    /*link*/
    e[19].text + ""
  ), n, a;
  return {
    c() {
      t = y("a"), n = Q(r), a = y("br"), c(t, "target", "_blank"), c(
        t,
        "href",
        /*link*/
        e[19].url
      );
    },
    m(i, o) {
      L(i, t, o), p(t, n), L(i, a, o);
    },
    p: he,
    d(i) {
      i && x(t), i && x(a);
    }
  };
}
function DY(e) {
  let t, r, n, a, i = (
    /*ontologyLinks*/
    e[4]
  ), o = [];
  for (let s = 0; s < i.length; s += 1)
    o[s] = d1(l1(e, i, s));
  return {
    c() {
      t = y("div"), r = y("p"), r.innerHTML = "<strong>GO Terms</strong>", n = T(), a = y("p");
      for (let s = 0; s < o.length; s += 1)
        o[s].c();
      O(r, "margin-bottom", "5px"), c(r, "class", "svelte-1uh78ic"), c(a, "class", "goterms svelte-1uh78ic"), O(a, "width", "550px"), O(a, "overflow-wrap", "normal"), c(t, "class", "links svelte-1uh78ic");
    },
    m(s, l) {
      L(s, t, l), p(t, r), p(t, n), p(t, a);
      for (let u = 0; u < o.length; u += 1)
        o[u].m(a, null);
    },
    p(s, l) {
      if (l & /*ontologyLinks*/
      16) {
        i = /*ontologyLinks*/
        s[4];
        let u;
        for (u = 0; u < i.length; u += 1) {
          const f = l1(s, i, u);
          o[u] ? o[u].p(f, l) : (o[u] = d1(f), o[u].c(), o[u].m(a, null));
        }
        for (; u < o.length; u += 1)
          o[u].d(1);
        o.length = i.length;
      }
    },
    d(s) {
      s && x(t), Ve(o, s);
    }
  };
}
function d1(e) {
  let t, r, n = (
    /*o*/
    e[16].text + ""
  ), a, i;
  return {
    c() {
      t = y("span"), r = y("a"), a = Q(n), i = T(), c(r, "target", "_blank"), c(
        r,
        "href",
        /*o*/
        e[16].url
      ), c(t, "class", "svelte-1uh78ic");
    },
    m(o, s) {
      L(o, t, s), p(t, r), p(r, a), L(o, i, s);
    },
    p: he,
    d(o) {
      o && x(t), o && x(i);
    }
  };
}
function xY(e) {
  let t, r, n;
  return {
    c() {
      t = y("button"), t.textContent = "Add to my favorite genes", t.disabled = !1, c(t, "class", "divbrowse-btn divbrowse-btn-light");
    },
    m(a, i) {
      L(a, t, i), r || (n = Z(t, "click", Ee(
        /*click_handler_1*/
        e[9]
      )), r = !0);
    },
    p: he,
    d(a) {
      a && x(t), r = !1, n();
    }
  };
}
function FY(e) {
  let t, r, n;
  return {
    c() {
      t = y("button"), t.textContent = "Remove from my favorite genes", t.disabled = !1, c(t, "class", "divbrowse-btn divbrowse-btn-light");
    },
    m(a, i) {
      L(a, t, i), r || (n = Z(t, "click", Ee(
        /*click_handler*/
        e[8]
      )), r = !0);
    },
    p: he,
    d(a) {
      a && x(t), r = !1, n();
    }
  };
}
function LY(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m, g, _, b, S, k, w, C, E, A, D, F, R, $, j, V, re, q, ee, Y, ae, M, P, I, J, G, z, K = (
    /*isGeneBookmarked*/
    e[0] && f1()
  ), te = (
    /*controller*/
    e[1].metadata.gff3.key_confidence !== void 0 && /*controller*/
    e[1].metadata.gff3.key_confidence !== !1 && jY(e)
  ), de = (
    /*controller*/
    e[1].metadata.gff3.count_exon_variants !== void 0 && /*controller*/
    e[1].metadata.gff3.count_exon_variants === !0 && MY(e)
  ), oe = (
    /*externalLinks*/
    e[5].length > 0 && NY(e)
  ), X = (
    /*ontologyLinks*/
    e[4].length > 0 && DY(e)
  );
  function B(N, ce) {
    return (
      /*isGeneBookmarked*/
      N[0] ? FY : xY
    );
  }
  let ue = B(e), se = ue(e);
  return {
    c() {
      t = y("div"), r = y("div"), n = Q(`Gene Details\r
        `), K && K.c(), a = T(), i = y("table"), o = y("tr"), s = y("td"), s.textContent = "ID", l = T(), u = y("td"), u.textContent = `${/*result*/
      e[3].ID}`, f = T(), d = y("tr"), h = y("td"), h.textContent = "Type", v = T(), m = y("td"), m.textContent = `${/*result*/
      e[3].type}`, g = T(), _ = y("tr"), b = y("td"), b.textContent = "Chromosome", S = T(), k = y("td"), k.textContent = `${/*result*/
      e[3].seqid}`, w = T(), C = y("tr"), E = y("td"), E.textContent = "Position", A = T(), D = y("td"), D.textContent = `${/*result*/
      e[3].start} - ${/*result*/
      e[3].end}`, F = T(), R = y("tr"), $ = y("td"), $.textContent = "Strand", j = T(), V = y("td"), V.textContent = `${/*result*/
      e[3].strand}`, re = T(), q = y("tr"), ee = y("td"), ee.textContent = "Description", Y = T(), ae = y("td"), ae.textContent = `${/*result*/
      e[3].description}`, M = T(), te && te.c(), P = T(), de && de.c(), I = T(), oe && oe.c(), J = T(), X && X.c(), G = T(), z = y("div"), se.c(), c(r, "class", "divbrowse-modal-dialogue-headline"), c(s, "class", "svelte-1uh78ic"), c(u, "class", "svelte-1uh78ic"), c(o, "class", "svelte-1uh78ic"), c(h, "class", "svelte-1uh78ic"), c(m, "class", "svelte-1uh78ic"), c(d, "class", "svelte-1uh78ic"), c(b, "class", "svelte-1uh78ic"), c(k, "class", "svelte-1uh78ic"), c(_, "class", "svelte-1uh78ic"), c(E, "class", "svelte-1uh78ic"), c(D, "class", "svelte-1uh78ic"), c(C, "class", "svelte-1uh78ic"), c($, "class", "svelte-1uh78ic"), c(V, "class", "svelte-1uh78ic"), c(R, "class", "svelte-1uh78ic"), c(ee, "class", "svelte-1uh78ic"), c(ae, "class", "svelte-1uh78ic"), c(q, "class", "svelte-1uh78ic"), c(i, "class", "svelte-1uh78ic"), O(z, "margin-top", "15px"), O(t, "min-height", "400px"), O(t, "font-size", "90%");
    },
    m(N, ce) {
      L(N, t, ce), p(t, r), p(r, n), K && K.m(r, null), p(t, a), p(t, i), p(i, o), p(o, s), p(o, l), p(o, u), p(i, f), p(i, d), p(d, h), p(d, v), p(d, m), p(i, g), p(i, _), p(_, b), p(_, S), p(_, k), p(i, w), p(i, C), p(C, E), p(C, A), p(C, D), p(i, F), p(i, R), p(R, $), p(R, j), p(R, V), p(i, re), p(i, q), p(q, ee), p(q, Y), p(q, ae), p(i, M), te && te.m(i, null), p(i, P), de && de.m(i, null), p(t, I), oe && oe.m(t, null), p(t, J), X && X.m(t, null), p(t, G), p(t, z), se.m(z, null);
    },
    p(N, [ce]) {
      /*isGeneBookmarked*/
      N[0] ? K || (K = f1(), K.c(), K.m(r, null)) : K && (K.d(1), K = null), /*controller*/
      N[1].metadata.gff3.key_confidence !== void 0 && /*controller*/
      N[1].metadata.gff3.key_confidence !== !1 && te.p(N, ce), /*controller*/
      N[1].metadata.gff3.count_exon_variants !== void 0 && /*controller*/
      N[1].metadata.gff3.count_exon_variants === !0 && de.p(N, ce), /*externalLinks*/
      N[5].length > 0 && oe.p(N, ce), /*ontologyLinks*/
      N[4].length > 0 && X.p(N, ce), ue === (ue = B(N)) && se ? se.p(N, ce) : (se.d(1), se = ue(N), se && (se.c(), se.m(z, null)));
    },
    i: he,
    o: he,
    d(N) {
      N && x(t), K && K.d(), te && te.d(), de && de.d(), oe && oe.d(), X && X.d(), se.d();
    }
  };
}
function BY(e, t, r) {
  let n, { featureId: a } = t;
  const i = We("app");
  let { appId: o, controller: s } = i.app(), l = Et().genesBookmarks;
  dt(e, l, (k) => r(7, n = k)), console.log(l);
  let u = !1, h = s.metadata.gff3._dataframe.filter((k) => k.get("ID").includes(a) === !0).toCollection()[0], v = h.Ontology_term.split(","), m = s.metadata.gff3.external_link_ontology_term, g = [];
  if (m !== "" && m !== null && m !== !1)
    for (let k of v)
      g.push({
        url: m.replace("{ID}", k),
        text: k
      });
  let _ = [];
  if (Array.isArray(s.metadata.gff3.external_links) && s.metadata.gff3.external_links.length > 0)
    for (let k of s.metadata.gff3.external_links)
      _.push({
        url: k.url.replace("{FEATURE_ID}", h[k.feature_attribute]),
        text: k.linktext
      });
  const b = () => l.unbookmarkGene(h.ID), S = () => l.bookmarkGene(h.ID);
  return e.$$set = (k) => {
    "featureId" in k && r(6, a = k.featureId);
  }, e.$$.update = () => {
    e.$$.dirty & /*$store, featureId*/
    192 && r(0, u = n.has(a)), e.$$.dirty & /*$store*/
    128 && console.log(n);
  }, [
    u,
    s,
    l,
    h,
    g,
    _,
    a,
    n,
    b,
    S
  ];
}
class zY extends Ue {
  constructor(t) {
    super(), qe(this, t, BY, LY, Be, { featureId: 6 }, RY);
  }
}
function VY(e) {
  rt(e, "svelte-1o67cl4", "div.svelte-1o67cl4{border:2px dotted blue;padding:30px}");
}
function qY(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m;
  return {
    c() {
      t = y("div"), r = y("p"), r.innerHTML = "<strong>Dummy Modal Content</strong>", n = T(), a = y("button"), a.textContent = "Open another modal", i = T(), o = y("hr"), s = T(), l = y("button"), l.textContent = "Close this modal", u = T(), f = y("hr"), d = T(), h = Q(
        /*test*/
        e[1]
      ), c(t, "class", "svelte-1o67cl4");
    },
    m(g, _) {
      L(g, t, _), p(t, r), p(t, n), p(t, a), p(t, i), p(t, o), p(t, s), p(t, l), p(t, u), p(t, f), p(t, d), p(t, h), v || (m = [
        Z(a, "click", Ee(
          /*click_handler*/
          e[3]
        )),
        Z(l, "click", Ee(
          /*click_handler_1*/
          e[4]
        ))
      ], v = !0);
    },
    p(g, [_]) {
      _ & /*test*/
      2 && _e(
        h,
        /*test*/
        g[1]
      );
    },
    i: he,
    o: he,
    d(g) {
      g && x(t), v = !1, Le(m);
    }
  };
}
function UY(e, t, r) {
  let { close: n } = t, { test: a = "no prop set" } = t;
  const i = We("app");
  let { appId: o, eventbus: s, controller: l } = i.app();
  const u = () => s.emit("modal:open", "GeneSearchModalContent"), f = () => n();
  return e.$$set = (d) => {
    "close" in d && r(0, n = d.close), "test" in d && r(1, a = d.test);
  }, [n, a, s, u, f];
}
class HY extends Ue {
  constructor(t) {
    super(), qe(this, t, UY, qY, Be, { close: 0, test: 1 }, VY);
  }
}
function p1(e) {
  return Object.prototype.toString.call(e) === "[object Date]";
}
function Bf(e, t, r, n) {
  if (typeof r == "number" || p1(r)) {
    const a = n - r, i = (r - t) / (e.dt || 1 / 60), o = e.opts.stiffness * a, s = e.opts.damping * i, l = (o - s) * e.inv_mass, u = (i + l) * e.dt;
    return Math.abs(u) < e.opts.precision && Math.abs(a) < e.opts.precision ? n : (e.settled = !1, p1(r) ? new Date(r.getTime() + u) : r + u);
  } else {
    if (Array.isArray(r))
      return r.map((a, i) => Bf(e, t[i], r[i], n[i]));
    if (typeof r == "object") {
      const a = {};
      for (const i in r)
        a[i] = Bf(e, t[i], r[i], n[i]);
      return a;
    } else
      throw new Error(`Cannot spring ${typeof r} values`);
  }
}
function GY(e, t = {}) {
  const r = Bt(e), { stiffness: n = 0.15, damping: a = 0.8, precision: i = 0.01 } = t;
  let o, s, l, u = e, f = e, d = 1, h = 0, v = !1;
  function m(_, b = {}) {
    f = _;
    const S = l = {};
    return e == null || b.hard || g.stiffness >= 1 && g.damping >= 1 ? (v = !0, o = si(), u = _, r.set(e = f), Promise.resolve()) : (b.soft && (h = 1 / ((b.soft === !0 ? 0.5 : +b.soft) * 60), d = 0), s || (o = si(), v = !1, s = Ps((k) => {
      if (v)
        return v = !1, s = null, !1;
      d = Math.min(d + h, 1);
      const w = {
        inv_mass: d,
        opts: g,
        settled: !0,
        dt: (k - o) * 60 / 1e3
      }, C = Bf(w, u, e, f);
      return o = k, u = e, r.set(e = C), w.settled && (s = null), !w.settled;
    })), new Promise((k) => {
      s.promise.then(() => {
        S === l && k();
      });
    }));
  }
  const g = {
    set: m,
    update: (_, b) => m(_(f, e), b),
    subscribe: r.subscribe,
    stiffness: n,
    damping: a,
    precision: i
  };
  return g;
}
function WY(e) {
  rt(e, "svelte-19a3n3k", ".rangeSlider{--pip:var(--range-pip, lightslategray);--pip-text:var(--range-pip-text, var(--pip));--pip-active:var(--range-pip-active, darkslategrey);--pip-active-text:var(--range-pip-active-text, var(--pip-active));--pip-hover:var(--range-pip-hover, darkslategrey);--pip-hover-text:var(--range-pip-hover-text, var(--pip-hover));--pip-in-range:var(--range-pip-in-range, var(--pip-active));--pip-in-range-text:var(--range-pip-in-range-text, var(--pip-active-text))}.rangePips{position:absolute;height:1em;left:0;right:0;bottom:-1em}.rangePips.vertical{height:auto;width:1em;left:100%;right:auto;top:0;bottom:0}.rangePips .pip{height:0.4em;position:absolute;top:0.25em;width:1px;white-space:nowrap}.rangePips.vertical .pip{height:1px;width:0.4em;left:0.25em;top:auto;bottom:auto}.rangePips .pipVal{position:absolute;top:0.4em;transform:translate(-50%, 25%)}.rangePips.vertical .pipVal{position:absolute;top:0;left:0.4em;transform:translate(25%, -50%)}.rangePips .pip{transition:all 0.15s ease}.rangePips .pipVal{transition:all 0.15s ease, font-weight 0s linear}.rangePips .pip{color:lightslategray;color:var(--pip-text);background-color:lightslategray;background-color:var(--pip)}.rangePips .pip.selected{color:darkslategrey;color:var(--pip-active-text);background-color:darkslategrey;background-color:var(--pip-active)}.rangePips.hoverable:not(.disabled) .pip:hover{color:darkslategrey;color:var(--pip-hover-text);background-color:darkslategrey;background-color:var(--pip-hover)}.rangePips .pip.in-range{color:darkslategrey;color:var(--pip-in-range-text);background-color:darkslategrey;background-color:var(--pip-in-range)}.rangePips .pip.selected{height:0.75em}.rangePips.vertical .pip.selected{height:1px;width:0.75em}.rangePips .pip.selected .pipVal{font-weight:bold;top:0.75em}.rangePips.vertical .pip.selected .pipVal{top:0;left:0.75em}.rangePips.hoverable:not(.disabled) .pip:not(.selected):hover{transition:none}.rangePips.hoverable:not(.disabled) .pip:not(.selected):hover .pipVal{transition:none;font-weight:bold}");
}
function v1(e, t, r) {
  const n = e.slice();
  return n[28] = t[r], n[30] = r, n;
}
function h1(e) {
  let t, r, n, a, i = (
    /*all*/
    (e[6] === "label" || /*first*/
    e[7] === "label") && g1(e)
  );
  return {
    c() {
      t = y("span"), i && i.c(), c(t, "class", "pip first"), c(t, "style", r = /*orientationStart*/
      e[14] + ": 0%;"), ve(
        t,
        "selected",
        /*isSelected*/
        e[18](
          /*min*/
          e[0]
        )
      ), ve(
        t,
        "in-range",
        /*inRange*/
        e[17](
          /*min*/
          e[0]
        )
      );
    },
    m(o, s) {
      L(o, t, s), i && i.m(t, null), n || (a = [
        Z(t, "click", function() {
          mt(
            /*labelClick*/
            e[21](
              /*min*/
              e[0]
            )
          ) && e[21](
            /*min*/
            e[0]
          ).apply(this, arguments);
        }),
        Z(t, "touchend", Ee(function() {
          mt(
            /*labelClick*/
            e[21](
              /*min*/
              e[0]
            )
          ) && e[21](
            /*min*/
            e[0]
          ).apply(this, arguments);
        }))
      ], n = !0);
    },
    p(o, s) {
      e = o, /*all*/
      e[6] === "label" || /*first*/
      e[7] === "label" ? i ? i.p(e, s) : (i = g1(e), i.c(), i.m(t, null)) : i && (i.d(1), i = null), s & /*orientationStart*/
      16384 && r !== (r = /*orientationStart*/
      e[14] + ": 0%;") && c(t, "style", r), s & /*isSelected, min*/
      262145 && ve(
        t,
        "selected",
        /*isSelected*/
        e[18](
          /*min*/
          e[0]
        )
      ), s & /*inRange, min*/
      131073 && ve(
        t,
        "in-range",
        /*inRange*/
        e[17](
          /*min*/
          e[0]
        )
      );
    },
    d(o) {
      o && x(t), i && i.d(), n = !1, Le(a);
    }
  };
}
function g1(e) {
  let t, r = (
    /*formatter*/
    e[12](
      /*fixFloat*/
      e[16](
        /*min*/
        e[0]
      ),
      0,
      0
    ) + ""
  ), n, a = (
    /*prefix*/
    e[10] && m1(e)
  ), i = (
    /*suffix*/
    e[11] && b1(e)
  );
  return {
    c() {
      t = y("span"), a && a.c(), n = Q(r), i && i.c(), c(t, "class", "pipVal");
    },
    m(o, s) {
      L(o, t, s), a && a.m(t, null), p(t, n), i && i.m(t, null);
    },
    p(o, s) {
      /*prefix*/
      o[10] ? a ? a.p(o, s) : (a = m1(o), a.c(), a.m(t, n)) : a && (a.d(1), a = null), s & /*formatter, fixFloat, min*/
      69633 && r !== (r = /*formatter*/
      o[12](
        /*fixFloat*/
        o[16](
          /*min*/
          o[0]
        ),
        0,
        0
      ) + "") && _e(n, r), /*suffix*/
      o[11] ? i ? i.p(o, s) : (i = b1(o), i.c(), i.m(t, null)) : i && (i.d(1), i = null);
    },
    d(o) {
      o && x(t), a && a.d(), i && i.d();
    }
  };
}
function m1(e) {
  let t, r;
  return {
    c() {
      t = y("span"), r = Q(
        /*prefix*/
        e[10]
      ), c(t, "class", "pipVal-prefix");
    },
    m(n, a) {
      L(n, t, a), p(t, r);
    },
    p(n, a) {
      a & /*prefix*/
      1024 && _e(
        r,
        /*prefix*/
        n[10]
      );
    },
    d(n) {
      n && x(t);
    }
  };
}
function b1(e) {
  let t, r;
  return {
    c() {
      t = y("span"), r = Q(
        /*suffix*/
        e[11]
      ), c(t, "class", "pipVal-suffix");
    },
    m(n, a) {
      L(n, t, a), p(t, r);
    },
    p(n, a) {
      a & /*suffix*/
      2048 && _e(
        r,
        /*suffix*/
        n[11]
      );
    },
    d(n) {
      n && x(t);
    }
  };
}
function _1(e) {
  let t, r = Array(
    /*pipCount*/
    e[20] + 1
  ), n = [];
  for (let a = 0; a < r.length; a += 1)
    n[a] = k1(v1(e, r, a));
  return {
    c() {
      for (let a = 0; a < n.length; a += 1)
        n[a].c();
      t = vt();
    },
    m(a, i) {
      for (let o = 0; o < n.length; o += 1)
        n[o].m(a, i);
      L(a, t, i);
    },
    p(a, i) {
      if (i & /*orientationStart, percentOf, pipVal, isSelected, inRange, labelClick, suffix, formatter, prefix, all, rest, min, max, pipCount*/
      4120131) {
        r = Array(
          /*pipCount*/
          a[20] + 1
        );
        let o;
        for (o = 0; o < r.length; o += 1) {
          const s = v1(a, r, o);
          n[o] ? n[o].p(s, i) : (n[o] = k1(s), n[o].c(), n[o].m(t.parentNode, t));
        }
        for (; o < n.length; o += 1)
          n[o].d(1);
        n.length = r.length;
      }
    },
    d(a) {
      Ve(n, a), a && x(t);
    }
  };
}
function y1(e) {
  let t, r, n, a, i, o = (
    /*all*/
    (e[6] === "label" || /*rest*/
    e[9] === "label") && w1(e)
  );
  return {
    c() {
      t = y("span"), o && o.c(), r = T(), c(t, "class", "pip"), c(t, "style", n = /*orientationStart*/
      e[14] + ": " + /*percentOf*/
      e[15](
        /*pipVal*/
        e[19](
          /*i*/
          e[30]
        )
      ) + "%;"), ve(
        t,
        "selected",
        /*isSelected*/
        e[18](
          /*pipVal*/
          e[19](
            /*i*/
            e[30]
          )
        )
      ), ve(
        t,
        "in-range",
        /*inRange*/
        e[17](
          /*pipVal*/
          e[19](
            /*i*/
            e[30]
          )
        )
      );
    },
    m(s, l) {
      L(s, t, l), o && o.m(t, null), p(t, r), a || (i = [
        Z(t, "click", function() {
          mt(
            /*labelClick*/
            e[21](
              /*pipVal*/
              e[19](
                /*i*/
                e[30]
              )
            )
          ) && e[21](
            /*pipVal*/
            e[19](
              /*i*/
              e[30]
            )
          ).apply(this, arguments);
        }),
        Z(t, "touchend", Ee(function() {
          mt(
            /*labelClick*/
            e[21](
              /*pipVal*/
              e[19](
                /*i*/
                e[30]
              )
            )
          ) && e[21](
            /*pipVal*/
            e[19](
              /*i*/
              e[30]
            )
          ).apply(this, arguments);
        }))
      ], a = !0);
    },
    p(s, l) {
      e = s, /*all*/
      e[6] === "label" || /*rest*/
      e[9] === "label" ? o ? o.p(e, l) : (o = w1(e), o.c(), o.m(t, r)) : o && (o.d(1), o = null), l & /*orientationStart, percentOf, pipVal*/
      573440 && n !== (n = /*orientationStart*/
      e[14] + ": " + /*percentOf*/
      e[15](
        /*pipVal*/
        e[19](
          /*i*/
          e[30]
        )
      ) + "%;") && c(t, "style", n), l & /*isSelected, pipVal*/
      786432 && ve(
        t,
        "selected",
        /*isSelected*/
        e[18](
          /*pipVal*/
          e[19](
            /*i*/
            e[30]
          )
        )
      ), l & /*inRange, pipVal*/
      655360 && ve(
        t,
        "in-range",
        /*inRange*/
        e[17](
          /*pipVal*/
          e[19](
            /*i*/
            e[30]
          )
        )
      );
    },
    d(s) {
      s && x(t), o && o.d(), a = !1, Le(i);
    }
  };
}
function w1(e) {
  let t, r = (
    /*formatter*/
    e[12](
      /*pipVal*/
      e[19](
        /*i*/
        e[30]
      ),
      /*i*/
      e[30],
      /*percentOf*/
      e[15](
        /*pipVal*/
        e[19](
          /*i*/
          e[30]
        )
      )
    ) + ""
  ), n, a = (
    /*prefix*/
    e[10] && S1(e)
  ), i = (
    /*suffix*/
    e[11] && O1(e)
  );
  return {
    c() {
      t = y("span"), a && a.c(), n = Q(r), i && i.c(), c(t, "class", "pipVal");
    },
    m(o, s) {
      L(o, t, s), a && a.m(t, null), p(t, n), i && i.m(t, null);
    },
    p(o, s) {
      /*prefix*/
      o[10] ? a ? a.p(o, s) : (a = S1(o), a.c(), a.m(t, n)) : a && (a.d(1), a = null), s & /*formatter, pipVal, percentOf*/
      561152 && r !== (r = /*formatter*/
      o[12](
        /*pipVal*/
        o[19](
          /*i*/
          o[30]
        ),
        /*i*/
        o[30],
        /*percentOf*/
        o[15](
          /*pipVal*/
          o[19](
            /*i*/
            o[30]
          )
        )
      ) + "") && _e(n, r), /*suffix*/
      o[11] ? i ? i.p(o, s) : (i = O1(o), i.c(), i.m(t, null)) : i && (i.d(1), i = null);
    },
    d(o) {
      o && x(t), a && a.d(), i && i.d();
    }
  };
}
function S1(e) {
  let t, r;
  return {
    c() {
      t = y("span"), r = Q(
        /*prefix*/
        e[10]
      ), c(t, "class", "pipVal-prefix");
    },
    m(n, a) {
      L(n, t, a), p(t, r);
    },
    p(n, a) {
      a & /*prefix*/
      1024 && _e(
        r,
        /*prefix*/
        n[10]
      );
    },
    d(n) {
      n && x(t);
    }
  };
}
function O1(e) {
  let t, r;
  return {
    c() {
      t = y("span"), r = Q(
        /*suffix*/
        e[11]
      ), c(t, "class", "pipVal-suffix");
    },
    m(n, a) {
      L(n, t, a), p(t, r);
    },
    p(n, a) {
      a & /*suffix*/
      2048 && _e(
        r,
        /*suffix*/
        n[11]
      );
    },
    d(n) {
      n && x(t);
    }
  };
}
function k1(e) {
  let t = (
    /*pipVal*/
    e[19](
      /*i*/
      e[30]
    ) !== /*min*/
    e[0] && /*pipVal*/
    e[19](
      /*i*/
      e[30]
    ) !== /*max*/
    e[1]
  ), r, n = t && y1(e);
  return {
    c() {
      n && n.c(), r = vt();
    },
    m(a, i) {
      n && n.m(a, i), L(a, r, i);
    },
    p(a, i) {
      i & /*pipVal, min, max*/
      524291 && (t = /*pipVal*/
      a[19](
        /*i*/
        a[30]
      ) !== /*min*/
      a[0] && /*pipVal*/
      a[19](
        /*i*/
        a[30]
      ) !== /*max*/
      a[1]), t ? n ? n.p(a, i) : (n = y1(a), n.c(), n.m(r.parentNode, r)) : n && (n.d(1), n = null);
    },
    d(a) {
      n && n.d(a), a && x(r);
    }
  };
}
function E1(e) {
  let t, r, n, a, i = (
    /*all*/
    (e[6] === "label" || /*last*/
    e[8] === "label") && $1(e)
  );
  return {
    c() {
      t = y("span"), i && i.c(), c(t, "class", "pip last"), c(t, "style", r = /*orientationStart*/
      e[14] + ": 100%;"), ve(
        t,
        "selected",
        /*isSelected*/
        e[18](
          /*max*/
          e[1]
        )
      ), ve(
        t,
        "in-range",
        /*inRange*/
        e[17](
          /*max*/
          e[1]
        )
      );
    },
    m(o, s) {
      L(o, t, s), i && i.m(t, null), n || (a = [
        Z(t, "click", function() {
          mt(
            /*labelClick*/
            e[21](
              /*max*/
              e[1]
            )
          ) && e[21](
            /*max*/
            e[1]
          ).apply(this, arguments);
        }),
        Z(t, "touchend", Ee(function() {
          mt(
            /*labelClick*/
            e[21](
              /*max*/
              e[1]
            )
          ) && e[21](
            /*max*/
            e[1]
          ).apply(this, arguments);
        }))
      ], n = !0);
    },
    p(o, s) {
      e = o, /*all*/
      e[6] === "label" || /*last*/
      e[8] === "label" ? i ? i.p(e, s) : (i = $1(e), i.c(), i.m(t, null)) : i && (i.d(1), i = null), s & /*orientationStart*/
      16384 && r !== (r = /*orientationStart*/
      e[14] + ": 100%;") && c(t, "style", r), s & /*isSelected, max*/
      262146 && ve(
        t,
        "selected",
        /*isSelected*/
        e[18](
          /*max*/
          e[1]
        )
      ), s & /*inRange, max*/
      131074 && ve(
        t,
        "in-range",
        /*inRange*/
        e[17](
          /*max*/
          e[1]
        )
      );
    },
    d(o) {
      o && x(t), i && i.d(), n = !1, Le(a);
    }
  };
}
function $1(e) {
  let t, r = (
    /*formatter*/
    e[12](
      /*fixFloat*/
      e[16](
        /*max*/
        e[1]
      ),
      /*pipCount*/
      e[20],
      100
    ) + ""
  ), n, a = (
    /*prefix*/
    e[10] && T1(e)
  ), i = (
    /*suffix*/
    e[11] && C1(e)
  );
  return {
    c() {
      t = y("span"), a && a.c(), n = Q(r), i && i.c(), c(t, "class", "pipVal");
    },
    m(o, s) {
      L(o, t, s), a && a.m(t, null), p(t, n), i && i.m(t, null);
    },
    p(o, s) {
      /*prefix*/
      o[10] ? a ? a.p(o, s) : (a = T1(o), a.c(), a.m(t, n)) : a && (a.d(1), a = null), s & /*formatter, fixFloat, max, pipCount*/
      1118210 && r !== (r = /*formatter*/
      o[12](
        /*fixFloat*/
        o[16](
          /*max*/
          o[1]
        ),
        /*pipCount*/
        o[20],
        100
      ) + "") && _e(n, r), /*suffix*/
      o[11] ? i ? i.p(o, s) : (i = C1(o), i.c(), i.m(t, null)) : i && (i.d(1), i = null);
    },
    d(o) {
      o && x(t), a && a.d(), i && i.d();
    }
  };
}
function T1(e) {
  let t, r;
  return {
    c() {
      t = y("span"), r = Q(
        /*prefix*/
        e[10]
      ), c(t, "class", "pipVal-prefix");
    },
    m(n, a) {
      L(n, t, a), p(t, r);
    },
    p(n, a) {
      a & /*prefix*/
      1024 && _e(
        r,
        /*prefix*/
        n[10]
      );
    },
    d(n) {
      n && x(t);
    }
  };
}
function C1(e) {
  let t, r;
  return {
    c() {
      t = y("span"), r = Q(
        /*suffix*/
        e[11]
      ), c(t, "class", "pipVal-suffix");
    },
    m(n, a) {
      L(n, t, a), p(t, r);
    },
    p(n, a) {
      a & /*suffix*/
      2048 && _e(
        r,
        /*suffix*/
        n[11]
      );
    },
    d(n) {
      n && x(t);
    }
  };
}
function KY(e) {
  let t, r, n, a = (
    /*all*/
    (e[6] && /*first*/
    e[7] !== !1 || /*first*/
    e[7]) && h1(e)
  ), i = (
    /*all*/
    (e[6] && /*rest*/
    e[9] !== !1 || /*rest*/
    e[9]) && _1(e)
  ), o = (
    /*all*/
    (e[6] && /*last*/
    e[8] !== !1 || /*last*/
    e[8]) && E1(e)
  );
  return {
    c() {
      t = y("div"), a && a.c(), r = T(), i && i.c(), n = T(), o && o.c(), c(t, "class", "rangePips"), ve(
        t,
        "disabled",
        /*disabled*/
        e[5]
      ), ve(
        t,
        "hoverable",
        /*hoverable*/
        e[4]
      ), ve(
        t,
        "vertical",
        /*vertical*/
        e[2]
      ), ve(
        t,
        "reversed",
        /*reversed*/
        e[3]
      ), ve(
        t,
        "focus",
        /*focus*/
        e[13]
      );
    },
    m(s, l) {
      L(s, t, l), a && a.m(t, null), p(t, r), i && i.m(t, null), p(t, n), o && o.m(t, null);
    },
    p(s, [l]) {
      /*all*/
      s[6] && /*first*/
      s[7] !== !1 || /*first*/
      s[7] ? a ? a.p(s, l) : (a = h1(s), a.c(), a.m(t, r)) : a && (a.d(1), a = null), /*all*/
      s[6] && /*rest*/
      s[9] !== !1 || /*rest*/
      s[9] ? i ? i.p(s, l) : (i = _1(s), i.c(), i.m(t, n)) : i && (i.d(1), i = null), /*all*/
      s[6] && /*last*/
      s[8] !== !1 || /*last*/
      s[8] ? o ? o.p(s, l) : (o = E1(s), o.c(), o.m(t, null)) : o && (o.d(1), o = null), l & /*disabled*/
      32 && ve(
        t,
        "disabled",
        /*disabled*/
        s[5]
      ), l & /*hoverable*/
      16 && ve(
        t,
        "hoverable",
        /*hoverable*/
        s[4]
      ), l & /*vertical*/
      4 && ve(
        t,
        "vertical",
        /*vertical*/
        s[2]
      ), l & /*reversed*/
      8 && ve(
        t,
        "reversed",
        /*reversed*/
        s[3]
      ), l & /*focus*/
      8192 && ve(
        t,
        "focus",
        /*focus*/
        s[13]
      );
    },
    i: he,
    o: he,
    d(s) {
      s && x(t), a && a.d(), i && i.d(), o && o.d();
    }
  };
}
function JY(e, t, r) {
  let n, a, i, o, s, { range: l = !1 } = t, { min: u = 0 } = t, { max: f = 100 } = t, { step: d = 1 } = t, { values: h = [(f + u) / 2] } = t, { vertical: v = !1 } = t, { reversed: m = !1 } = t, { hoverable: g = !0 } = t, { disabled: _ = !1 } = t, { pipstep: b = void 0 } = t, { all: S = !0 } = t, { first: k = void 0 } = t, { last: w = void 0 } = t, { rest: C = void 0 } = t, { prefix: E = "" } = t, { suffix: A = "" } = t, { formatter: D = (q, ee) => q } = t, { focus: F = void 0 } = t, { orientationStart: R = void 0 } = t, { percentOf: $ = void 0 } = t, { moveHandle: j = void 0 } = t, { fixFloat: V = void 0 } = t;
  function re(q) {
    _ || j(void 0, q);
  }
  return e.$$set = (q) => {
    "range" in q && r(22, l = q.range), "min" in q && r(0, u = q.min), "max" in q && r(1, f = q.max), "step" in q && r(23, d = q.step), "values" in q && r(24, h = q.values), "vertical" in q && r(2, v = q.vertical), "reversed" in q && r(3, m = q.reversed), "hoverable" in q && r(4, g = q.hoverable), "disabled" in q && r(5, _ = q.disabled), "pipstep" in q && r(25, b = q.pipstep), "all" in q && r(6, S = q.all), "first" in q && r(7, k = q.first), "last" in q && r(8, w = q.last), "rest" in q && r(9, C = q.rest), "prefix" in q && r(10, E = q.prefix), "suffix" in q && r(11, A = q.suffix), "formatter" in q && r(12, D = q.formatter), "focus" in q && r(13, F = q.focus), "orientationStart" in q && r(14, R = q.orientationStart), "percentOf" in q && r(15, $ = q.percentOf), "moveHandle" in q && r(26, j = q.moveHandle), "fixFloat" in q && r(16, V = q.fixFloat);
  }, e.$$.update = () => {
    e.$$.dirty & /*pipstep, max, min, step, vertical*/
    41943047 && r(27, n = b || ((f - u) / d >= (v ? 50 : 100) ? (f - u) / (v ? 10 : 20) : 1)), e.$$.dirty & /*max, min, step, pipStep*/
    142606339 && r(20, a = parseInt((f - u) / (d * n), 10)), e.$$.dirty & /*fixFloat, min, step, pipStep*/
    142671873 && r(19, i = function(q) {
      return V(u + q * d * n);
    }), e.$$.dirty & /*values, fixFloat*/
    16842752 && r(18, o = function(q) {
      return h.some((ee) => V(ee) === V(q));
    }), e.$$.dirty & /*range, values*/
    20971520 && r(17, s = function(q) {
      if (l === "min")
        return h[0] > q;
      if (l === "max")
        return h[0] < q;
      if (l)
        return h[0] < q && h[1] > q;
    });
  }, [
    u,
    f,
    v,
    m,
    g,
    _,
    S,
    k,
    w,
    C,
    E,
    A,
    D,
    F,
    R,
    $,
    V,
    s,
    o,
    i,
    a,
    re,
    l,
    d,
    h,
    b,
    j,
    n
  ];
}
class YY extends Ue {
  constructor(t) {
    super(), qe(
      this,
      t,
      JY,
      KY,
      Be,
      {
        range: 22,
        min: 0,
        max: 1,
        step: 23,
        values: 24,
        vertical: 2,
        reversed: 3,
        hoverable: 4,
        disabled: 5,
        pipstep: 25,
        all: 6,
        first: 7,
        last: 8,
        rest: 9,
        prefix: 10,
        suffix: 11,
        formatter: 12,
        focus: 13,
        orientationStart: 14,
        percentOf: 15,
        moveHandle: 26,
        fixFloat: 16
      },
      WY
    );
  }
}
function XY(e) {
  rt(e, "svelte-1wc6jll", '.rangeSlider{--slider:var(--range-slider, #d7dada);--handle-inactive:var(--range-handle-inactive, #99a2a2);--handle:var(--range-handle, #838de7);--handle-focus:var(--range-handle-focus, #4a40d4);--handle-border:var(--range-handle-border, var(--handle));--range-inactive:var(--range-range-inactive, var(--handle-inactive));--range:var(--range-range, var(--handle-focus));--float-inactive:var(--range-float-inactive, var(--handle-inactive));--float:var(--range-float, var(--handle-focus));--float-text:var(--range-float-text, white)}.rangeSlider{position:relative;border-radius:100px;height:0.5em;margin:1em;transition:opacity 0.2s ease;user-select:none}.rangeSlider *{user-select:none}.rangeSlider.pips{margin-bottom:1.8em}.rangeSlider.pip-labels{margin-bottom:2.8em}.rangeSlider.vertical{display:inline-block;border-radius:100px;width:0.5em;min-height:200px}.rangeSlider.vertical.pips{margin-right:1.8em;margin-bottom:1em}.rangeSlider.vertical.pip-labels{margin-right:2.8em;margin-bottom:1em}.rangeSlider .rangeHandle{position:absolute;display:block;height:1.4em;width:1.4em;top:0.25em;bottom:auto;transform:translateY(-50%) translateX(-50%);outline-offset:2px;outline:2px solid transparent;border-radius:100px;z-index:2}.rangeSlider.reversed .rangeHandle{transform:translateY(-50%) translateX(50%)}.rangeSlider.vertical .rangeHandle{left:0.25em;top:auto;transform:translateY(50%) translateX(-50%)}.rangeSlider.vertical.reversed .rangeHandle{transform:translateY(-50%) translateX(-50%)}.rangeSlider .rangeNub,.rangeSlider .rangeHandle:before{position:absolute;left:0;top:0;display:block;border-radius:10em;height:100%;width:100%;transition:box-shadow 0.2s ease}.rangeSlider .rangeHandle:before{content:"";left:1px;top:1px;bottom:1px;right:1px;height:auto;width:auto;box-shadow:0 0 0 0px var(--handle-border);opacity:0}.rangeSlider.hoverable:not(.disabled) .rangeHandle:hover:before{box-shadow:0 0 0 8px var(--handle-border);opacity:0.2}.rangeSlider.hoverable:not(.disabled) .rangeHandle.press:before,.rangeSlider.hoverable:not(.disabled) .rangeHandle.press:hover:before{box-shadow:0 0 0 12px var(--handle-border);opacity:0.4}.rangeSlider.range .rangeNub{border-radius:10em 10em 10em 1.6em}.rangeSlider.range.min .rangeNub{border-radius:10em  1.6em 10em 10em}.rangeSlider.range .rangeHandle:nth-of-type(1) .rangeNub{transform:rotate(-135deg)}.rangeSlider.range .rangeHandle:nth-of-type(2) .rangeNub{transform:rotate(45deg)}.rangeSlider.range.reversed .rangeHandle:nth-of-type(1) .rangeNub{transform:rotate(45deg)}.rangeSlider.range.reversed .rangeHandle:nth-of-type(2) .rangeNub{transform:rotate(-135deg)}.rangeSlider.range.vertical .rangeHandle:nth-of-type(1) .rangeNub{transform:rotate(135deg)}.rangeSlider.range.vertical .rangeHandle:nth-of-type(2) .rangeNub{transform:rotate(-45deg)}.rangeSlider.range.vertical.reversed .rangeHandle:nth-of-type(1) .rangeNub{transform:rotate(-45deg)}.rangeSlider.range.vertical.reversed .rangeHandle:nth-of-type(2) .rangeNub{transform:rotate(135deg)}.rangeSlider .rangeFloat{display:block;position:absolute;left:50%;top:-0.5em;transform:translate(-50%, -100%);font-size:1em;text-align:center;opacity:0;pointer-events:none;white-space:nowrap;transition:all 0.2s ease;font-size:0.9em;padding:0.2em 0.4em;border-radius:0.2em}.rangeSlider .rangeHandle.active .rangeFloat,.rangeSlider.hoverable .rangeHandle:hover .rangeFloat{opacity:1;top:-0.2em;transform:translate(-50%, -100%)}.rangeSlider .rangeHandle.active:focus-visible .rangeFloat{top:-0.35em}.rangeSlider .rangeBar{position:absolute;display:block;transition:background 0.2s ease;border-radius:1em;height:0.5em;top:0;user-select:none;z-index:1}.rangeSlider.vertical .rangeBar{width:0.5em;height:auto}.rangeSlider{background-color:#d7dada;background-color:var(--slider)}.rangeSlider .rangeBar{background-color:#99a2a2;background-color:var(--range-inactive)}.rangeSlider.focus .rangeBar{background-color:#838de7;background-color:var(--range)}.rangeSlider .rangeNub{background-color:#99a2a2;background-color:var(--handle-inactive)}.rangeSlider.focus .rangeNub{background-color:#838de7;background-color:var(--handle)}.rangeSlider .rangeHandle.active .rangeNub{background-color:#4a40d4;background-color:var(--handle-focus)}.rangeSlider .rangeFloat{color:white;color:var(--float-text);background-color:#99a2a2;background-color:var(--float-inactive)}.rangeSlider.focus .rangeFloat{background-color:#4a40d4;background-color:var(--float)}.rangeSlider.disabled{opacity:0.5}.rangeSlider.disabled .rangeNub{background-color:#d7dada;background-color:var(--slider)}.rangeSlider .rangeHandle:focus{outline:none}.rangeSlider .rangeHandle:focus-visible{outline:2px solid #334}@supports not selector(:focus-visible){.rangeSlider .rangeHandle:focus{outline:1px solid #334;outline-offset:1px}}');
}
function A1(e, t, r) {
  const n = e.slice();
  return n[64] = t[r], n[66] = r, n;
}
function I1(e) {
  let t, r = (
    /*handleFormatter*/
    e[21](
      /*value*/
      e[64],
      /*index*/
      e[66],
      /*percentOf*/
      e[23](
        /*value*/
        e[64]
      )
    ) + ""
  ), n, a = (
    /*prefix*/
    e[18] && P1(e)
  ), i = (
    /*suffix*/
    e[19] && R1(e)
  );
  return {
    c() {
      t = y("span"), a && a.c(), n = Q(r), i && i.c(), c(t, "class", "rangeFloat");
    },
    m(o, s) {
      L(o, t, s), a && a.m(t, null), p(t, n), i && i.m(t, null);
    },
    p(o, s) {
      /*prefix*/
      o[18] ? a ? a.p(o, s) : (a = P1(o), a.c(), a.m(t, n)) : a && (a.d(1), a = null), s[0] & /*handleFormatter, values, percentOf*/
      10485761 && r !== (r = /*handleFormatter*/
      o[21](
        /*value*/
        o[64],
        /*index*/
        o[66],
        /*percentOf*/
        o[23](
          /*value*/
          o[64]
        )
      ) + "") && _e(n, r), /*suffix*/
      o[19] ? i ? i.p(o, s) : (i = R1(o), i.c(), i.m(t, null)) : i && (i.d(1), i = null);
    },
    d(o) {
      o && x(t), a && a.d(), i && i.d();
    }
  };
}
function P1(e) {
  let t, r;
  return {
    c() {
      t = y("span"), r = Q(
        /*prefix*/
        e[18]
      ), c(t, "class", "rangeFloat-prefix");
    },
    m(n, a) {
      L(n, t, a), p(t, r);
    },
    p(n, a) {
      a[0] & /*prefix*/
      262144 && _e(
        r,
        /*prefix*/
        n[18]
      );
    },
    d(n) {
      n && x(t);
    }
  };
}
function R1(e) {
  let t, r;
  return {
    c() {
      t = y("span"), r = Q(
        /*suffix*/
        e[19]
      ), c(t, "class", "rangeFloat-suffix");
    },
    m(n, a) {
      L(n, t, a), p(t, r);
    },
    p(n, a) {
      a[0] & /*suffix*/
      524288 && _e(
        r,
        /*suffix*/
        n[19]
      );
    },
    d(n) {
      n && x(t);
    }
  };
}
function j1(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v = (
    /*float*/
    e[7] && I1(e)
  );
  return {
    c() {
      t = y("span"), r = y("span"), n = T(), v && v.c(), c(r, "class", "rangeNub"), c(t, "role", "slider"), c(t, "class", "rangeHandle"), c(
        t,
        "data-handle",
        /*index*/
        e[66]
      ), c(t, "style", a = /*orientationStart*/
      e[28] + ": " + /*$springPositions*/
      e[29][
        /*index*/
        e[66]
      ] + "%; z-index: " + /*activeHandle*/
      (e[26] === /*index*/
      e[66] ? 3 : 2) + ";"), c(t, "aria-valuemin", i = /*range*/
      e[2] === !0 && /*index*/
      e[66] === 1 ? (
        /*values*/
        e[0][0]
      ) : (
        /*min*/
        e[3]
      )), c(t, "aria-valuemax", o = /*range*/
      e[2] === !0 && /*index*/
      e[66] === 0 ? (
        /*values*/
        e[0][1]
      ) : (
        /*max*/
        e[4]
      )), c(t, "aria-valuenow", s = /*value*/
      e[64]), c(t, "aria-valuetext", l = "" + /*prefix*/
      (e[18] + /*handleFormatter*/
      e[21](
        /*value*/
        e[64],
        /*index*/
        e[66],
        /*percentOf*/
        e[23](
          /*value*/
          e[64]
        )
      ) + /*suffix*/
      e[19])), c(t, "aria-orientation", u = /*vertical*/
      e[6] ? "vertical" : "horizontal"), c(
        t,
        "aria-disabled",
        /*disabled*/
        e[10]
      ), c(
        t,
        "disabled",
        /*disabled*/
        e[10]
      ), c(t, "tabindex", f = /*disabled*/
      e[10] ? -1 : 0), ve(
        t,
        "active",
        /*focus*/
        e[24] && /*activeHandle*/
        e[26] === /*index*/
        e[66]
      ), ve(
        t,
        "press",
        /*handlePressed*/
        e[25] && /*activeHandle*/
        e[26] === /*index*/
        e[66]
      );
    },
    m(m, g) {
      L(m, t, g), p(t, r), p(t, n), v && v.m(t, null), d || (h = [
        Z(
          t,
          "blur",
          /*sliderBlurHandle*/
          e[34]
        ),
        Z(
          t,
          "focus",
          /*sliderFocusHandle*/
          e[35]
        ),
        Z(
          t,
          "keydown",
          /*sliderKeydown*/
          e[36]
        )
      ], d = !0);
    },
    p(m, g) {
      /*float*/
      m[7] ? v ? v.p(m, g) : (v = I1(m), v.c(), v.m(t, null)) : v && (v.d(1), v = null), g[0] & /*orientationStart, $springPositions, activeHandle*/
      872415232 && a !== (a = /*orientationStart*/
      m[28] + ": " + /*$springPositions*/
      m[29][
        /*index*/
        m[66]
      ] + "%; z-index: " + /*activeHandle*/
      (m[26] === /*index*/
      m[66] ? 3 : 2) + ";") && c(t, "style", a), g[0] & /*range, values, min*/
      13 && i !== (i = /*range*/
      m[2] === !0 && /*index*/
      m[66] === 1 ? (
        /*values*/
        m[0][0]
      ) : (
        /*min*/
        m[3]
      )) && c(t, "aria-valuemin", i), g[0] & /*range, values, max*/
      21 && o !== (o = /*range*/
      m[2] === !0 && /*index*/
      m[66] === 0 ? (
        /*values*/
        m[0][1]
      ) : (
        /*max*/
        m[4]
      )) && c(t, "aria-valuemax", o), g[0] & /*values*/
      1 && s !== (s = /*value*/
      m[64]) && c(t, "aria-valuenow", s), g[0] & /*prefix, handleFormatter, values, percentOf, suffix*/
      11272193 && l !== (l = "" + /*prefix*/
      (m[18] + /*handleFormatter*/
      m[21](
        /*value*/
        m[64],
        /*index*/
        m[66],
        /*percentOf*/
        m[23](
          /*value*/
          m[64]
        )
      ) + /*suffix*/
      m[19])) && c(t, "aria-valuetext", l), g[0] & /*vertical*/
      64 && u !== (u = /*vertical*/
      m[6] ? "vertical" : "horizontal") && c(t, "aria-orientation", u), g[0] & /*disabled*/
      1024 && c(
        t,
        "aria-disabled",
        /*disabled*/
        m[10]
      ), g[0] & /*disabled*/
      1024 && c(
        t,
        "disabled",
        /*disabled*/
        m[10]
      ), g[0] & /*disabled*/
      1024 && f !== (f = /*disabled*/
      m[10] ? -1 : 0) && c(t, "tabindex", f), g[0] & /*focus, activeHandle*/
      83886080 && ve(
        t,
        "active",
        /*focus*/
        m[24] && /*activeHandle*/
        m[26] === /*index*/
        m[66]
      ), g[0] & /*handlePressed, activeHandle*/
      100663296 && ve(
        t,
        "press",
        /*handlePressed*/
        m[25] && /*activeHandle*/
        m[26] === /*index*/
        m[66]
      );
    },
    d(m) {
      m && x(t), v && v.d(), d = !1, Le(h);
    }
  };
}
function M1(e) {
  let t, r;
  return {
    c() {
      t = y("span"), c(t, "class", "rangeBar"), c(t, "style", r = /*orientationStart*/
      e[28] + ": " + /*rangeStart*/
      e[32](
        /*$springPositions*/
        e[29]
      ) + "%; " + /*orientationEnd*/
      e[27] + ": " + /*rangeEnd*/
      e[33](
        /*$springPositions*/
        e[29]
      ) + "%;");
    },
    m(n, a) {
      L(n, t, a);
    },
    p(n, a) {
      a[0] & /*orientationStart, $springPositions, orientationEnd*/
      939524096 && r !== (r = /*orientationStart*/
      n[28] + ": " + /*rangeStart*/
      n[32](
        /*$springPositions*/
        n[29]
      ) + "%; " + /*orientationEnd*/
      n[27] + ": " + /*rangeEnd*/
      n[33](
        /*$springPositions*/
        n[29]
      ) + "%;") && c(t, "style", r);
    },
    d(n) {
      n && x(t);
    }
  };
}
function N1(e) {
  let t, r;
  return t = new YY({
    props: {
      values: (
        /*values*/
        e[0]
      ),
      min: (
        /*min*/
        e[3]
      ),
      max: (
        /*max*/
        e[4]
      ),
      step: (
        /*step*/
        e[5]
      ),
      range: (
        /*range*/
        e[2]
      ),
      vertical: (
        /*vertical*/
        e[6]
      ),
      reversed: (
        /*reversed*/
        e[8]
      ),
      orientationStart: (
        /*orientationStart*/
        e[28]
      ),
      hoverable: (
        /*hoverable*/
        e[9]
      ),
      disabled: (
        /*disabled*/
        e[10]
      ),
      all: (
        /*all*/
        e[13]
      ),
      first: (
        /*first*/
        e[14]
      ),
      last: (
        /*last*/
        e[15]
      ),
      rest: (
        /*rest*/
        e[16]
      ),
      pipstep: (
        /*pipstep*/
        e[12]
      ),
      prefix: (
        /*prefix*/
        e[18]
      ),
      suffix: (
        /*suffix*/
        e[19]
      ),
      formatter: (
        /*formatter*/
        e[20]
      ),
      focus: (
        /*focus*/
        e[24]
      ),
      percentOf: (
        /*percentOf*/
        e[23]
      ),
      moveHandle: (
        /*moveHandle*/
        e[31]
      ),
      fixFloat: (
        /*fixFloat*/
        e[30]
      )
    }
  }), {
    c() {
      xe(t.$$.fragment);
    },
    m(n, a) {
      Ne(t, n, a), r = !0;
    },
    p(n, a) {
      const i = {};
      a[0] & /*values*/
      1 && (i.values = /*values*/
      n[0]), a[0] & /*min*/
      8 && (i.min = /*min*/
      n[3]), a[0] & /*max*/
      16 && (i.max = /*max*/
      n[4]), a[0] & /*step*/
      32 && (i.step = /*step*/
      n[5]), a[0] & /*range*/
      4 && (i.range = /*range*/
      n[2]), a[0] & /*vertical*/
      64 && (i.vertical = /*vertical*/
      n[6]), a[0] & /*reversed*/
      256 && (i.reversed = /*reversed*/
      n[8]), a[0] & /*orientationStart*/
      268435456 && (i.orientationStart = /*orientationStart*/
      n[28]), a[0] & /*hoverable*/
      512 && (i.hoverable = /*hoverable*/
      n[9]), a[0] & /*disabled*/
      1024 && (i.disabled = /*disabled*/
      n[10]), a[0] & /*all*/
      8192 && (i.all = /*all*/
      n[13]), a[0] & /*first*/
      16384 && (i.first = /*first*/
      n[14]), a[0] & /*last*/
      32768 && (i.last = /*last*/
      n[15]), a[0] & /*rest*/
      65536 && (i.rest = /*rest*/
      n[16]), a[0] & /*pipstep*/
      4096 && (i.pipstep = /*pipstep*/
      n[12]), a[0] & /*prefix*/
      262144 && (i.prefix = /*prefix*/
      n[18]), a[0] & /*suffix*/
      524288 && (i.suffix = /*suffix*/
      n[19]), a[0] & /*formatter*/
      1048576 && (i.formatter = /*formatter*/
      n[20]), a[0] & /*focus*/
      16777216 && (i.focus = /*focus*/
      n[24]), a[0] & /*percentOf*/
      8388608 && (i.percentOf = /*percentOf*/
      n[23]), t.$set(i);
    },
    i(n) {
      r || (ne(t.$$.fragment, n), r = !0);
    },
    o(n) {
      fe(t.$$.fragment, n), r = !1;
    },
    d(n) {
      De(t, n);
    }
  };
}
function QY(e) {
  let t, r, n, a, i, o, s = (
    /*values*/
    e[0]
  ), l = [];
  for (let d = 0; d < s.length; d += 1)
    l[d] = j1(A1(e, s, d));
  let u = (
    /*range*/
    e[2] && M1(e)
  ), f = (
    /*pips*/
    e[11] && N1(e)
  );
  return {
    c() {
      t = y("div");
      for (let d = 0; d < l.length; d += 1)
        l[d].c();
      r = T(), u && u.c(), n = T(), f && f.c(), c(
        t,
        "id",
        /*id*/
        e[17]
      ), c(t, "class", "rangeSlider"), ve(
        t,
        "range",
        /*range*/
        e[2]
      ), ve(
        t,
        "disabled",
        /*disabled*/
        e[10]
      ), ve(
        t,
        "hoverable",
        /*hoverable*/
        e[9]
      ), ve(
        t,
        "vertical",
        /*vertical*/
        e[6]
      ), ve(
        t,
        "reversed",
        /*reversed*/
        e[8]
      ), ve(
        t,
        "focus",
        /*focus*/
        e[24]
      ), ve(
        t,
        "min",
        /*range*/
        e[2] === "min"
      ), ve(
        t,
        "max",
        /*range*/
        e[2] === "max"
      ), ve(
        t,
        "pips",
        /*pips*/
        e[11]
      ), ve(
        t,
        "pip-labels",
        /*all*/
        e[13] === "label" || /*first*/
        e[14] === "label" || /*last*/
        e[15] === "label" || /*rest*/
        e[16] === "label"
      );
    },
    m(d, h) {
      L(d, t, h);
      for (let v = 0; v < l.length; v += 1)
        l[v].m(t, null);
      p(t, r), u && u.m(t, null), p(t, n), f && f.m(t, null), e[50](t), a = !0, i || (o = [
        Z(
          window,
          "mousedown",
          /*bodyInteractStart*/
          e[39]
        ),
        Z(
          window,
          "touchstart",
          /*bodyInteractStart*/
          e[39]
        ),
        Z(
          window,
          "mousemove",
          /*bodyInteract*/
          e[40]
        ),
        Z(
          window,
          "touchmove",
          /*bodyInteract*/
          e[40]
        ),
        Z(
          window,
          "mouseup",
          /*bodyMouseUp*/
          e[41]
        ),
        Z(
          window,
          "touchend",
          /*bodyTouchEnd*/
          e[42]
        ),
        Z(
          window,
          "keydown",
          /*bodyKeyDown*/
          e[43]
        ),
        Z(
          t,
          "mousedown",
          /*sliderInteractStart*/
          e[37]
        ),
        Z(
          t,
          "mouseup",
          /*sliderInteractEnd*/
          e[38]
        ),
        Z(t, "touchstart", Ee(
          /*sliderInteractStart*/
          e[37]
        )),
        Z(t, "touchend", Ee(
          /*sliderInteractEnd*/
          e[38]
        ))
      ], i = !0);
    },
    p(d, h) {
      if (h[0] & /*orientationStart, $springPositions, activeHandle, range, values, min, max, prefix, handleFormatter, percentOf, suffix, vertical, disabled, focus, handlePressed, float*/
      934020317 | h[1] & /*sliderBlurHandle, sliderFocusHandle, sliderKeydown*/
      56) {
        s = /*values*/
        d[0];
        let v;
        for (v = 0; v < s.length; v += 1) {
          const m = A1(d, s, v);
          l[v] ? l[v].p(m, h) : (l[v] = j1(m), l[v].c(), l[v].m(t, r));
        }
        for (; v < l.length; v += 1)
          l[v].d(1);
        l.length = s.length;
      }
      /*range*/
      d[2] ? u ? u.p(d, h) : (u = M1(d), u.c(), u.m(t, n)) : u && (u.d(1), u = null), /*pips*/
      d[11] ? f ? (f.p(d, h), h[0] & /*pips*/
      2048 && ne(f, 1)) : (f = N1(d), f.c(), ne(f, 1), f.m(t, null)) : f && (Je(), fe(f, 1, 1, () => {
        f = null;
      }), Ye()), (!a || h[0] & /*id*/
      131072) && c(
        t,
        "id",
        /*id*/
        d[17]
      ), (!a || h[0] & /*range*/
      4) && ve(
        t,
        "range",
        /*range*/
        d[2]
      ), (!a || h[0] & /*disabled*/
      1024) && ve(
        t,
        "disabled",
        /*disabled*/
        d[10]
      ), (!a || h[0] & /*hoverable*/
      512) && ve(
        t,
        "hoverable",
        /*hoverable*/
        d[9]
      ), (!a || h[0] & /*vertical*/
      64) && ve(
        t,
        "vertical",
        /*vertical*/
        d[6]
      ), (!a || h[0] & /*reversed*/
      256) && ve(
        t,
        "reversed",
        /*reversed*/
        d[8]
      ), (!a || h[0] & /*focus*/
      16777216) && ve(
        t,
        "focus",
        /*focus*/
        d[24]
      ), (!a || h[0] & /*range*/
      4) && ve(
        t,
        "min",
        /*range*/
        d[2] === "min"
      ), (!a || h[0] & /*range*/
      4) && ve(
        t,
        "max",
        /*range*/
        d[2] === "max"
      ), (!a || h[0] & /*pips*/
      2048) && ve(
        t,
        "pips",
        /*pips*/
        d[11]
      ), (!a || h[0] & /*all, first, last, rest*/
      122880) && ve(
        t,
        "pip-labels",
        /*all*/
        d[13] === "label" || /*first*/
        d[14] === "label" || /*last*/
        d[15] === "label" || /*rest*/
        d[16] === "label"
      );
    },
    i(d) {
      a || (ne(f), a = !0);
    },
    o(d) {
      fe(f), a = !1;
    },
    d(d) {
      d && x(t), Ve(l, d), u && u.d(), f && f.d(), e[50](null), i = !1, Le(o);
    }
  };
}
function D1(e) {
  if (!e)
    return -1;
  for (var t = 0; e = e.previousElementSibling; )
    t++;
  return t;
}
function xu(e) {
  return e.type.includes("touch") ? e.touches[0] : e;
}
function ZY(e, t, r) {
  let n, a, i, o, s, l, u = he, f = () => (u(), u = Xf(X, (W) => r(29, l = W)), X);
  e.$$.on_destroy.push(() => u());
  let { slider: d = void 0 } = t, { range: h = !1 } = t, { pushy: v = !1 } = t, { min: m = 0 } = t, { max: g = 100 } = t, { step: _ = 1 } = t, { values: b = [(g + m) / 2] } = t, { vertical: S = !1 } = t, { float: k = !1 } = t, { reversed: w = !1 } = t, { hoverable: C = !0 } = t, { disabled: E = !1 } = t, { pips: A = !1 } = t, { pipstep: D = void 0 } = t, { all: F = void 0 } = t, { first: R = void 0 } = t, { last: $ = void 0 } = t, { rest: j = void 0 } = t, { id: V = void 0 } = t, { prefix: re = "" } = t, { suffix: q = "" } = t, { formatter: ee = (W, H, pe) => W } = t, { handleFormatter: Y = ee } = t, { precision: ae = 2 } = t, { springValues: M = { stiffness: 0.15, damping: 0.4 } } = t;
  const P = O0();
  let I = 0, J = !1, G = !1, z = !1, K = !1, te = b.length - 1, de, oe, X;
  const B = (W) => parseFloat(W.toFixed(ae));
  function ue(W) {
    const H = d.querySelectorAll(".handle"), pe = Array.prototype.includes.call(H, W), U = Array.prototype.some.call(H, (Ae) => Ae.contains(W));
    return pe || U;
  }
  function se(W) {
    return h === "min" || h === "max" ? W.slice(0, 1) : h ? W.slice(0, 2) : W;
  }
  function N() {
    return d.getBoundingClientRect();
  }
  function ce(W) {
    const H = N();
    let pe = 0, U = 0, Ae = 0;
    S ? (pe = W.clientY - H.top, U = pe / H.height * 100, U = w ? U : 100 - U) : (pe = W.clientX - H.left, U = pe / H.width * 100, U = w ? 100 - U : U), Ae = (g - m) / 100 * U + m;
    let Te;
    return h === !0 && b[0] === b[1] ? Ae > b[1] ? 1 : 0 : (Te = b.indexOf([...b].sort((Ke, ut) => Math.abs(Ae - Ke) - Math.abs(Ae - ut))[0]), Te);
  }
  function ye(W) {
    const H = N();
    let pe = 0, U = 0, Ae = 0;
    S ? (pe = W.clientY - H.top, U = pe / H.height * 100, U = w ? U : 100 - U) : (pe = W.clientX - H.left, U = pe / H.width * 100, U = w ? 100 - U : U), Ae = (g - m) / 100 * U + m, me(te, Ae);
  }
  function me(W, H) {
    return H = i(H), typeof W > "u" && (W = te), h && (W === 0 && H > b[1] ? v ? r(0, b[1] = H, b) : H = b[1] : W === 1 && H < b[0] && (v ? r(0, b[0] = H, b) : H = b[0])), b[W] !== H && r(0, b[W] = H, b), oe !== H && (Me(), oe = H), H;
  }
  function ze(W) {
    return h === "min" ? 0 : W[0];
  }
  function Oe(W) {
    return h === "max" ? 0 : h === "min" ? 100 - W[0] : 100 - W[1];
  }
  function He(W) {
    K && (r(24, J = !1), G = !1, r(25, z = !1));
  }
  function ke(W) {
    E || (r(26, te = D1(W.target)), r(24, J = !0));
  }
  function Ze(W) {
    if (!E) {
      const H = D1(W.target);
      let pe = W.ctrlKey || W.metaKey || W.shiftKey ? _ * 10 : _, U = !1;
      switch (W.key) {
        case "PageDown":
          pe *= 10;
        case "ArrowRight":
        case "ArrowUp":
          me(H, b[H] + pe), U = !0;
          break;
        case "PageUp":
          pe *= 10;
        case "ArrowLeft":
        case "ArrowDown":
          me(H, b[H] - pe), U = !0;
          break;
        case "Home":
          me(H, m), U = !0;
          break;
        case "End":
          me(H, g), U = !0;
          break;
      }
      U && (W.preventDefault(), W.stopPropagation());
    }
  }
  function Qe(W) {
    if (!E) {
      const H = W.target, pe = xu(W);
      r(24, J = !0), G = !0, r(25, z = !0), r(26, te = ce(pe)), de = oe = i(b[te]), Ce(), W.type === "touchstart" && !H.matches(".pipVal") && ye(pe);
    }
  }
  function Re(W) {
    W.type === "touchend" && Se(), r(25, z = !1);
  }
  function et(W) {
    K = !1, J && W.target !== d && !d.contains(W.target) && r(24, J = !1);
  }
  function pt(W) {
    E || G && ye(xu(W));
  }
  function je(W) {
    if (!E) {
      const H = W.target;
      G && ((H === d || d.contains(H)) && (r(24, J = !0), !ue(H) && !H.matches(".pipVal") && ye(xu(W))), Se());
    }
    G = !1, r(25, z = !1);
  }
  function le(W) {
    G = !1, r(25, z = !1);
  }
  function we(W) {
    E || (W.target === d || d.contains(W.target)) && (K = !0);
  }
  function Ce() {
    !E && P("start", {
      activeHandle: te,
      value: de,
      values: b.map((W) => i(W))
    });
  }
  function Se() {
    !E && P("stop", {
      activeHandle: te,
      startValue: de,
      value: b[te],
      values: b.map((W) => i(W))
    });
  }
  function Me() {
    !E && P("change", {
      activeHandle: te,
      startValue: de,
      previousValue: typeof oe > "u" ? de : oe,
      value: b[te],
      values: b.map((W) => i(W))
    });
  }
  function $e(W) {
    lt[W ? "unshift" : "push"](() => {
      d = W, r(1, d);
    });
  }
  return e.$$set = (W) => {
    "slider" in W && r(1, d = W.slider), "range" in W && r(2, h = W.range), "pushy" in W && r(44, v = W.pushy), "min" in W && r(3, m = W.min), "max" in W && r(4, g = W.max), "step" in W && r(5, _ = W.step), "values" in W && r(0, b = W.values), "vertical" in W && r(6, S = W.vertical), "float" in W && r(7, k = W.float), "reversed" in W && r(8, w = W.reversed), "hoverable" in W && r(9, C = W.hoverable), "disabled" in W && r(10, E = W.disabled), "pips" in W && r(11, A = W.pips), "pipstep" in W && r(12, D = W.pipstep), "all" in W && r(13, F = W.all), "first" in W && r(14, R = W.first), "last" in W && r(15, $ = W.last), "rest" in W && r(16, j = W.rest), "id" in W && r(17, V = W.id), "prefix" in W && r(18, re = W.prefix), "suffix" in W && r(19, q = W.suffix), "formatter" in W && r(20, ee = W.formatter), "handleFormatter" in W && r(21, Y = W.handleFormatter), "precision" in W && r(45, ae = W.precision), "springValues" in W && r(46, M = W.springValues);
  }, e.$$.update = () => {
    e.$$.dirty[0] & /*min, max*/
    24 && r(49, a = function(W) {
      return W <= m ? m : W >= g ? g : W;
    }), e.$$.dirty[0] & /*min, max, step*/
    56 | e.$$.dirty[1] & /*clampValue*/
    262144 && r(48, i = function(W) {
      if (W <= m)
        return B(m);
      if (W >= g)
        return B(g);
      let H = (W - m) % _, pe = W - H;
      return Math.abs(H) * 2 >= _ && (pe += H > 0 ? _ : -_), pe = a(pe), B(pe);
    }), e.$$.dirty[0] & /*min, max*/
    24 && r(23, n = function(W) {
      let H = (W - m) / (g - m) * 100;
      return isNaN(H) || H <= 0 ? 0 : H >= 100 ? 100 : B(H);
    }), e.$$.dirty[0] & /*values, max, min, percentOf, springPositions*/
    12582937 | e.$$.dirty[1] & /*alignValueToStep, valueLength, springValues*/
    229376 && (Array.isArray(b) || (r(0, b = [(g + m) / 2]), console.error("'values' prop should be an Array (https://github.com/simeydotme/svelte-range-slider-pips#slider-props)")), r(0, b = se(b.map((W) => i(W)))), I !== b.length ? f(r(22, X = GY(b.map((W) => n(W)), M))) : X.set(b.map((W) => n(W))), r(47, I = b.length)), e.$$.dirty[0] & /*vertical, reversed*/
    320 && r(28, o = S ? w ? "top" : "bottom" : w ? "right" : "left"), e.$$.dirty[0] & /*vertical, reversed*/
    320 && r(27, s = S ? w ? "bottom" : "top" : w ? "left" : "right");
  }, [
    b,
    d,
    h,
    m,
    g,
    _,
    S,
    k,
    w,
    C,
    E,
    A,
    D,
    F,
    R,
    $,
    j,
    V,
    re,
    q,
    ee,
    Y,
    X,
    n,
    J,
    z,
    te,
    s,
    o,
    l,
    B,
    me,
    ze,
    Oe,
    He,
    ke,
    Ze,
    Qe,
    Re,
    et,
    pt,
    je,
    le,
    we,
    v,
    ae,
    M,
    I,
    i,
    a,
    $e
  ];
}
class ml extends Ue {
  constructor(t) {
    super(), qe(
      this,
      t,
      ZY,
      QY,
      Be,
      {
        slider: 1,
        range: 2,
        pushy: 44,
        min: 3,
        max: 4,
        step: 5,
        values: 0,
        vertical: 6,
        float: 7,
        reversed: 8,
        hoverable: 9,
        disabled: 10,
        pips: 11,
        pipstep: 12,
        all: 13,
        first: 14,
        last: 15,
        rest: 16,
        id: 17,
        prefix: 18,
        suffix: 19,
        formatter: 20,
        handleFormatter: 21,
        precision: 45,
        springValues: 46
      },
      XY,
      [-1, -1, -1]
    );
  }
}
function eX(e) {
  rt(e, "svelte-yqyfnx", ".sortmode.svelte-yqyfnx{border:1px solid rgb(180,180,180);padding:15px;margin-bottom:10px;background-color:rgb(248,248,248);border-radius:4px}#variant-filter-slider{height:6px}#variant-filter-slider .rangeBar{height:6px}#variant-filter-slider .rangeHandle{top:2px;height:16px;width:16px}#variant-filter-slider .rangeHandle .rangeNub{border:1px solid rgb(255, 255, 255)}");
}
function x1(e) {
  let t, r, n, a, i, o, s = Math.round(
    /*$variantFilterSettings*/
    e[0].maf[0] * 100
  ) + "", l, u, f = Math.round(
    /*$variantFilterSettings*/
    e[0].maf[1] * 100
  ) + "", d, h, v;
  function m(_) {
    e[3](_);
  }
  let g = {
    id: "variant-filter-slider",
    range: !0,
    pushy: !0,
    step: 0.01,
    min: 0,
    max: 0.5
  };
  return (
    /*$variantFilterSettings*/
    e[0].maf !== void 0 && (g.values = /*$variantFilterSettings*/
    e[0].maf), r = new ml({ props: g }), lt.push(() => mn(
      r,
      "values",
      m,
      /*$variantFilterSettings*/
      e[0].maf
    )), {
      c() {
        t = y("div"), xe(r.$$.fragment), a = T(), i = y("div"), o = Q("Minor allele frequency (MAF) must be between "), l = Q(s), u = Q("% and "), d = Q(f), h = Q("%"), O(t, "margin-top", "25px"), O(t, "--range-slider", "#d7dada"), O(t, "--range-handle-inactive", "rgb(140,140,140)"), O(t, "--range-range", "rgb(150,150,255)"), O(i, "margin-top", "25px");
      },
      m(_, b) {
        L(_, t, b), Ne(r, t, null), L(_, a, b), L(_, i, b), p(i, o), p(i, l), p(i, u), p(i, d), p(i, h), v = !0;
      },
      p(_, b) {
        const S = {};
        !n && b & /*$variantFilterSettings*/
        1 && (n = !0, S.values = /*$variantFilterSettings*/
        _[0].maf, hn(() => n = !1)), r.$set(S), (!v || b & /*$variantFilterSettings*/
        1) && s !== (s = Math.round(
          /*$variantFilterSettings*/
          _[0].maf[0] * 100
        ) + "") && _e(l, s), (!v || b & /*$variantFilterSettings*/
        1) && f !== (f = Math.round(
          /*$variantFilterSettings*/
          _[0].maf[1] * 100
        ) + "") && _e(d, f);
      },
      i(_) {
        v || (ne(r.$$.fragment, _), v = !0);
      },
      o(_) {
        fe(r.$$.fragment, _), v = !1;
      },
      d(_) {
        _ && x(t), De(r), _ && x(a), _ && x(i);
      }
    }
  );
}
function F1(e) {
  let t, r, n, a, i, o, s = Math.round(
    /*$variantFilterSettings*/
    e[0].missingFreq[0] * 100
  ) + "", l, u, f = Math.round(
    /*$variantFilterSettings*/
    e[0].missingFreq[1] * 100
  ) + "", d, h, v;
  function m(_) {
    e[5](_);
  }
  let g = {
    id: "variant-filter-slider",
    range: !0,
    pushy: !0,
    step: 0.01,
    min: 0,
    max: 1
  };
  return (
    /*$variantFilterSettings*/
    e[0].missingFreq !== void 0 && (g.values = /*$variantFilterSettings*/
    e[0].missingFreq), r = new ml({ props: g }), lt.push(() => mn(
      r,
      "values",
      m,
      /*$variantFilterSettings*/
      e[0].missingFreq
    )), {
      c() {
        t = y("div"), xe(r.$$.fragment), a = T(), i = y("div"), o = Q("Missing rate must be between "), l = Q(s), u = Q("% and "), d = Q(f), h = Q("%"), O(t, "margin-top", "25px"), O(t, "--range-slider", "#d7dada"), O(t, "--range-handle-inactive", "rgb(140,140,140)"), O(t, "--range-range", "rgb(150,150,255)"), O(i, "margin-top", "25px");
      },
      m(_, b) {
        L(_, t, b), Ne(r, t, null), L(_, a, b), L(_, i, b), p(i, o), p(i, l), p(i, u), p(i, d), p(i, h), v = !0;
      },
      p(_, b) {
        const S = {};
        !n && b & /*$variantFilterSettings*/
        1 && (n = !0, S.values = /*$variantFilterSettings*/
        _[0].missingFreq, hn(() => n = !1)), r.$set(S), (!v || b & /*$variantFilterSettings*/
        1) && s !== (s = Math.round(
          /*$variantFilterSettings*/
          _[0].missingFreq[0] * 100
        ) + "") && _e(l, s), (!v || b & /*$variantFilterSettings*/
        1) && f !== (f = Math.round(
          /*$variantFilterSettings*/
          _[0].missingFreq[1] * 100
        ) + "") && _e(d, f);
      },
      i(_) {
        v || (ne(r.$$.fragment, _), v = !0);
      },
      o(_) {
        fe(r.$$.fragment, _), v = !1;
      },
      d(_) {
        _ && x(t), De(r), _ && x(a), _ && x(i);
      }
    }
  );
}
function L1(e) {
  let t, r, n, a, i, o, s = Math.round(
    /*$variantFilterSettings*/
    e[0].heteroFreq[0] * 100
  ) + "", l, u, f = Math.round(
    /*$variantFilterSettings*/
    e[0].heteroFreq[1] * 100
  ) + "", d, h, v;
  function m(_) {
    e[7](_);
  }
  let g = {
    id: "variant-filter-slider",
    range: !0,
    pushy: !0,
    step: 0.01,
    min: 0,
    max: 1
  };
  return (
    /*$variantFilterSettings*/
    e[0].heteroFreq !== void 0 && (g.values = /*$variantFilterSettings*/
    e[0].heteroFreq), r = new ml({ props: g }), lt.push(() => mn(
      r,
      "values",
      m,
      /*$variantFilterSettings*/
      e[0].heteroFreq
    )), {
      c() {
        t = y("div"), xe(r.$$.fragment), a = T(), i = y("div"), o = Q("Heterozygosity frequency must be between "), l = Q(s), u = Q("% and "), d = Q(f), h = Q("%"), O(t, "margin-top", "25px"), O(i, "margin-top", "25px");
      },
      m(_, b) {
        L(_, t, b), Ne(r, t, null), L(_, a, b), L(_, i, b), p(i, o), p(i, l), p(i, u), p(i, d), p(i, h), v = !0;
      },
      p(_, b) {
        const S = {};
        !n && b & /*$variantFilterSettings*/
        1 && (n = !0, S.values = /*$variantFilterSettings*/
        _[0].heteroFreq, hn(() => n = !1)), r.$set(S), (!v || b & /*$variantFilterSettings*/
        1) && s !== (s = Math.round(
          /*$variantFilterSettings*/
          _[0].heteroFreq[0] * 100
        ) + "") && _e(l, s), (!v || b & /*$variantFilterSettings*/
        1) && f !== (f = Math.round(
          /*$variantFilterSettings*/
          _[0].heteroFreq[1] * 100
        ) + "") && _e(d, f);
      },
      i(_) {
        v || (ne(r.$$.fragment, _), v = !0);
      },
      o(_) {
        fe(r.$$.fragment, _), v = !1;
      },
      d(_) {
        _ && x(t), De(r), _ && x(a), _ && x(i);
      }
    }
  );
}
function B1(e) {
  let t, r, n, a, i, o, s = (
    /*$variantFilterSettings*/
    e[0].vcfQual[0] + ""
  ), l, u, f = (
    /*$variantFilterSettings*/
    e[0].vcfQual[1] + ""
  ), d, h;
  function v(g) {
    e[9](g);
  }
  let m = {
    id: "variant-filter-slider",
    range: !0,
    pushy: !0,
    step: 25,
    min: 0,
    max: 1e3
  };
  return (
    /*$variantFilterSettings*/
    e[0].vcfQual !== void 0 && (m.values = /*$variantFilterSettings*/
    e[0].vcfQual), r = new ml({ props: m }), lt.push(() => mn(
      r,
      "values",
      v,
      /*$variantFilterSettings*/
      e[0].vcfQual
    )), {
      c() {
        t = y("div"), xe(r.$$.fragment), a = T(), i = y("div"), o = Q("QUAL value must be between "), l = Q(s), u = Q(" and "), d = Q(f), O(t, "margin-top", "25px"), O(i, "margin-top", "25px");
      },
      m(g, _) {
        L(g, t, _), Ne(r, t, null), L(g, a, _), L(g, i, _), p(i, o), p(i, l), p(i, u), p(i, d), h = !0;
      },
      p(g, _) {
        const b = {};
        !n && _ & /*$variantFilterSettings*/
        1 && (n = !0, b.values = /*$variantFilterSettings*/
        g[0].vcfQual, hn(() => n = !1)), r.$set(b), (!h || _ & /*$variantFilterSettings*/
        1) && s !== (s = /*$variantFilterSettings*/
        g[0].vcfQual[0] + "") && _e(l, s), (!h || _ & /*$variantFilterSettings*/
        1) && f !== (f = /*$variantFilterSettings*/
        g[0].vcfQual[1] + "") && _e(d, f);
      },
      i(g) {
        h || (ne(r.$$.fragment, g), h = !0);
      },
      o(g) {
        fe(r.$$.fragment, g), h = !1;
      },
      d(g) {
        g && x(t), De(r), g && x(a), g && x(i);
      }
    }
  );
}
function tX(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m, g, _, b, S, k, w, C, E, A, D, F, R, $, j, V, re, q, ee, Y, ae, M, P = (
    /*$variantFilterSettings*/
    e[0].filterByMaf && x1(e)
  ), I = (
    /*$variantFilterSettings*/
    e[0].filterByMissingFreq && F1(e)
  ), J = (
    /*$variantFilterSettings*/
    e[0].filterByHeteroFreq && L1(e)
  ), G = (
    /*$variantFilterSettings*/
    e[0].filterByVcfQual && B1(e)
  );
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "Filter Variants", n = T(), a = y("div"), i = y("div"), o = y("input"), s = T(), l = y("label"), l.textContent = "Filter by minor allele frequency", u = T(), P && P.c(), f = T(), d = y("div"), h = y("div"), v = y("input"), m = T(), g = y("label"), g.textContent = "Filter by missing rate", _ = T(), I && I.c(), b = T(), S = y("div"), k = y("div"), w = y("input"), C = T(), E = y("label"), E.textContent = "Filter by heterozygosity frequency", A = T(), J && J.c(), D = T(), F = y("div"), R = y("div"), $ = y("input"), j = T(), V = y("label"), V.textContent = "Filter by QUAL value of VCF file", re = T(), G && G.c(), q = T(), ee = y("div"), c(r, "class", "divbrowse-modal-dialogue-headline"), c(o, "id", "filterByMaf"), c(o, "type", "checkbox"), O(o, "vertical-align", "-1px"), c(l, "for", "filterByMaf"), c(i, "class", "sortmode-option svelte-yqyfnx"), c(a, "class", "sortmode svelte-yqyfnx"), O(a, "margin-top", "30px"), c(v, "id", "filterByMissingFreq"), c(v, "type", "checkbox"), O(v, "vertical-align", "-1px"), c(g, "for", "filterByMissingFreq"), c(h, "class", "sortmode-option svelte-yqyfnx"), c(d, "class", "sortmode svelte-yqyfnx"), O(d, "margin-top", "20px"), c(w, "id", "filterByHeteroFreq"), c(w, "type", "checkbox"), O(w, "vertical-align", "-1px"), c(E, "for", "filterByHeteroFreq"), c(k, "class", "sortmode-option svelte-yqyfnx"), c(S, "class", "sortmode svelte-yqyfnx"), O(S, "margin-top", "20px"), c($, "id", "filterByVcfQual"), c($, "type", "checkbox"), O($, "vertical-align", "-1px"), c(V, "for", "filterByVcfQual"), c(R, "class", "sortmode-option svelte-yqyfnx"), c(F, "class", "sortmode svelte-yqyfnx"), O(F, "margin-top", "20px"), O(ee, "clear", "left"), O(t, "min-height", "500px"), O(t, "min-width", "700px");
    },
    m(z, K) {
      L(z, t, K), p(t, r), p(t, n), p(t, a), p(a, i), p(i, o), o.checked = /*$variantFilterSettings*/
      e[0].filterByMaf, p(i, s), p(i, l), p(a, u), P && P.m(a, null), p(t, f), p(t, d), p(d, h), p(h, v), v.checked = /*$variantFilterSettings*/
      e[0].filterByMissingFreq, p(h, m), p(h, g), p(d, _), I && I.m(d, null), p(t, b), p(t, S), p(S, k), p(k, w), w.checked = /*$variantFilterSettings*/
      e[0].filterByHeteroFreq, p(k, C), p(k, E), p(S, A), J && J.m(S, null), p(t, D), p(t, F), p(F, R), p(R, $), $.checked = /*$variantFilterSettings*/
      e[0].filterByVcfQual, p(R, j), p(R, V), p(F, re), G && G.m(F, null), p(t, q), p(t, ee), Y = !0, ae || (M = [
        Z(
          o,
          "change",
          /*input0_change_handler*/
          e[2]
        ),
        Z(
          v,
          "change",
          /*input1_change_handler*/
          e[4]
        ),
        Z(
          w,
          "change",
          /*input2_change_handler*/
          e[6]
        ),
        Z(
          $,
          "change",
          /*input3_change_handler*/
          e[8]
        )
      ], ae = !0);
    },
    p(z, [K]) {
      K & /*$variantFilterSettings*/
      1 && (o.checked = /*$variantFilterSettings*/
      z[0].filterByMaf), /*$variantFilterSettings*/
      z[0].filterByMaf ? P ? (P.p(z, K), K & /*$variantFilterSettings*/
      1 && ne(P, 1)) : (P = x1(z), P.c(), ne(P, 1), P.m(a, null)) : P && (Je(), fe(P, 1, 1, () => {
        P = null;
      }), Ye()), K & /*$variantFilterSettings*/
      1 && (v.checked = /*$variantFilterSettings*/
      z[0].filterByMissingFreq), /*$variantFilterSettings*/
      z[0].filterByMissingFreq ? I ? (I.p(z, K), K & /*$variantFilterSettings*/
      1 && ne(I, 1)) : (I = F1(z), I.c(), ne(I, 1), I.m(d, null)) : I && (Je(), fe(I, 1, 1, () => {
        I = null;
      }), Ye()), K & /*$variantFilterSettings*/
      1 && (w.checked = /*$variantFilterSettings*/
      z[0].filterByHeteroFreq), /*$variantFilterSettings*/
      z[0].filterByHeteroFreq ? J ? (J.p(z, K), K & /*$variantFilterSettings*/
      1 && ne(J, 1)) : (J = L1(z), J.c(), ne(J, 1), J.m(S, null)) : J && (Je(), fe(J, 1, 1, () => {
        J = null;
      }), Ye()), K & /*$variantFilterSettings*/
      1 && ($.checked = /*$variantFilterSettings*/
      z[0].filterByVcfQual), /*$variantFilterSettings*/
      z[0].filterByVcfQual ? G ? (G.p(z, K), K & /*$variantFilterSettings*/
      1 && ne(G, 1)) : (G = B1(z), G.c(), ne(G, 1), G.m(F, null)) : G && (Je(), fe(G, 1, 1, () => {
        G = null;
      }), Ye());
    },
    i(z) {
      Y || (ne(P), ne(I), ne(J), ne(G), Y = !0);
    },
    o(z) {
      fe(P), fe(I), fe(J), fe(G), Y = !1;
    },
    d(z) {
      z && x(t), P && P.d(), I && I.d(), J && J.d(), G && G.d(), ae = !1, Le(M);
    }
  };
}
function rX(e, t, r) {
  let n;
  const { variantFilterSettings: a } = Et();
  dt(e, a, (v) => r(0, n = v));
  function i() {
    n.filterByMaf = this.checked, a.set(n);
  }
  function o(v) {
    e.$$.not_equal(n.maf, v) && (n.maf = v, a.set(n));
  }
  function s() {
    n.filterByMissingFreq = this.checked, a.set(n);
  }
  function l(v) {
    e.$$.not_equal(n.missingFreq, v) && (n.missingFreq = v, a.set(n));
  }
  function u() {
    n.filterByHeteroFreq = this.checked, a.set(n);
  }
  function f(v) {
    e.$$.not_equal(n.heteroFreq, v) && (n.heteroFreq = v, a.set(n));
  }
  function d() {
    n.filterByVcfQual = this.checked, a.set(n);
  }
  function h(v) {
    e.$$.not_equal(n.vcfQual, v) && (n.vcfQual = v, a.set(n));
  }
  return [
    n,
    a,
    i,
    o,
    s,
    l,
    u,
    f,
    d,
    h
  ];
}
class nX extends Ue {
  constructor(t) {
    super(), qe(this, t, rX, tX, Be, {}, eX);
  }
}
function aX(e) {
  rt(e, "svelte-1fyc0uv", ".sortmode.svelte-1fyc0uv.svelte-1fyc0uv{border:1px solid rgb(180,180,180);padding:15px;margin-bottom:20px;background-color:rgb(248,248,248);border-radius:4px}.sortmode.svelte-1fyc0uv .headline.svelte-1fyc0uv{font-weight:500;margin-bottom:15px}.sortmode-option.svelte-1fyc0uv.svelte-1fyc0uv{margin-bottom:10px}");
}
function z1(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m;
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "Sort order", n = T(), a = y("div"), i = y("input"), o = T(), s = y("label"), s.textContent = "Sort ascending", l = T(), u = y("div"), f = y("input"), d = T(), h = y("label"), h.textContent = "Sort descending", c(r, "class", "headline svelte-1fyc0uv"), c(i, "type", "radio"), O(i, "vertical-align", "-1px"), i.__value = "ASC", i.value = i.__value, e[6][1].push(i), c(a, "class", "sortmode-option svelte-1fyc0uv"), c(f, "type", "radio"), O(f, "vertical-align", "-1px"), f.__value = "DESC", f.value = f.__value, e[6][1].push(f), c(u, "class", "sortmode-option svelte-1fyc0uv"), c(t, "class", "sortmode svelte-1fyc0uv");
    },
    m(g, _) {
      L(g, t, _), p(t, r), p(t, n), p(t, a), p(a, i), i.checked = i.__value === /*sortorder*/
      e[1], p(a, o), p(a, s), p(t, l), p(t, u), p(u, f), f.checked = f.__value === /*sortorder*/
      e[1], p(u, d), p(u, h), v || (m = [
        Z(
          i,
          "change",
          /*input0_change_handler_1*/
          e[9]
        ),
        Z(
          f,
          "change",
          /*input1_change_handler_1*/
          e[10]
        )
      ], v = !0);
    },
    p(g, _) {
      _ & /*sortorder*/
      2 && (i.checked = i.__value === /*sortorder*/
      g[1]), _ & /*sortorder*/
      2 && (f.checked = f.__value === /*sortorder*/
      g[1]);
    },
    d(g) {
      g && x(t), e[6][1].splice(
        /*$$binding_groups*/
        e[6][1].indexOf(i),
        1
      ), e[6][1].splice(
        /*$$binding_groups*/
        e[6][1].indexOf(f),
        1
      ), v = !1, Le(m);
    }
  };
}
function iX(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m, g, _, b, S, k, w, C, E, A, D, F, R = (
    /*$sortSettings*/
    e[2].sortmode !== "none" && z1(e)
  );
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "Sort Samples", n = T(), a = y("div"), i = y("div"), i.textContent = "Sort mode", o = T(), s = y("div"), l = y("input"), u = T(), f = y("label"), f.textContent = "No sorting", d = T(), h = y("div"), v = y("input"), m = T(), g = y("label"), g.textContent = "Sort sample list alphabetical", _ = T(), b = y("div"), S = y("input"), k = T(), w = y("label"), w.textContent = "Sort sample list by genetic distance to the reference genome", C = T(), R && R.c(), E = T(), A = y("div"), c(r, "class", "divbrowse-modal-dialogue-headline"), c(i, "class", "headline svelte-1fyc0uv"), c(l, "type", "radio"), O(l, "vertical-align", "-1px"), l.__value = "none", l.value = l.__value, e[6][0].push(l), c(s, "class", "sortmode-option svelte-1fyc0uv"), c(v, "type", "radio"), O(v, "vertical-align", "-1px"), v.__value = "alphabetical", v.value = v.__value, e[6][0].push(v), c(h, "class", "sortmode-option svelte-1fyc0uv"), c(S, "type", "radio"), O(S, "vertical-align", "-1px"), S.__value = "genetic_distance", S.value = S.__value, e[6][0].push(S), c(b, "class", "sortmode-option svelte-1fyc0uv"), c(a, "class", "sortmode svelte-1fyc0uv"), O(a, "margin-top", "30px"), O(A, "clear", "left"), O(t, "min-height", "400px"), O(t, "min-width", "700px");
    },
    m($, j) {
      L($, t, j), p(t, r), p(t, n), p(t, a), p(a, i), p(a, o), p(a, s), p(s, l), l.checked = l.__value === /*sortmode*/
      e[0], p(s, u), p(s, f), p(a, d), p(a, h), p(h, v), v.checked = v.__value === /*sortmode*/
      e[0], p(h, m), p(h, g), p(a, _), p(a, b), p(b, S), S.checked = S.__value === /*sortmode*/
      e[0], p(b, k), p(b, w), p(t, C), R && R.m(t, null), p(t, E), p(t, A), D || (F = [
        Z(
          l,
          "change",
          /*input0_change_handler*/
          e[5]
        ),
        Z(
          v,
          "change",
          /*input1_change_handler*/
          e[7]
        ),
        Z(
          S,
          "change",
          /*input2_change_handler*/
          e[8]
        )
      ], D = !0);
    },
    p($, [j]) {
      j & /*sortmode*/
      1 && (l.checked = l.__value === /*sortmode*/
      $[0]), j & /*sortmode*/
      1 && (v.checked = v.__value === /*sortmode*/
      $[0]), j & /*sortmode*/
      1 && (S.checked = S.__value === /*sortmode*/
      $[0]), /*$sortSettings*/
      $[2].sortmode !== "none" ? R ? R.p($, j) : (R = z1($), R.c(), R.m(t, E)) : R && (R.d(1), R = null);
    },
    i: he,
    o: he,
    d($) {
      $ && x(t), e[6][0].splice(
        /*$$binding_groups*/
        e[6][0].indexOf(l),
        1
      ), e[6][0].splice(
        /*$$binding_groups*/
        e[6][0].indexOf(v),
        1
      ), e[6][0].splice(
        /*$$binding_groups*/
        e[6][0].indexOf(S),
        1
      ), R && R.d(), D = !1, Le(F);
    }
  };
}
function oX(e, t, r) {
  let n, { close: a } = t;
  const { sortSettings: i } = Et();
  dt(e, i, (g) => r(2, n = g));
  let o = n.sortmode, s = n.sortorder;
  function l(g, _) {
    g === "none" && r(1, s = void 0), g !== "none" && _ === void 0 && r(1, s = "ASC");
    let b = { sortmode: o, sortorder: s };
    i.set(b);
  }
  const u = [[], []];
  function f() {
    o = this.__value, r(0, o);
  }
  function d() {
    o = this.__value, r(0, o);
  }
  function h() {
    o = this.__value, r(0, o);
  }
  function v() {
    s = this.__value, r(1, s);
  }
  function m() {
    s = this.__value, r(1, s);
  }
  return e.$$set = (g) => {
    "close" in g && r(4, a = g.close);
  }, e.$$.update = () => {
    e.$$.dirty & /*sortmode, sortorder*/
    3 && l(o, s);
  }, [
    o,
    s,
    n,
    i,
    a,
    f,
    u,
    d,
    h,
    v,
    m
  ];
}
class sX extends Ue {
  constructor(t) {
    super(), qe(this, t, oX, iX, Be, { close: 4 }, aX);
  }
}
function lX(e) {
  rt(e, "svelte-1tbpo2i", ".option.svelte-1tbpo2i{position:relative;padding:20px 0;border-bottom:1px dotted rgb(170,170,170)}");
}
function uX(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m, g, _;
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "Settings", n = T(), a = y("div"), i = y("label"), i.textContent = "SNP coloring", o = T(), s = y("select"), l = y("option"), l.textContent = "Reference mismatch", u = y("option"), u.textContent = "Nucleotides", f = T(), d = y("div"), h = y("label"), h.textContent = "Colour vision deficiency mode", v = T(), m = y("input"), c(r, "class", "divbrowse-modal-dialogue-headline"), c(i, "class", "form-label"), c(i, "for", "snp-coloring-selector"), O(i, "display", "inline-block"), O(i, "width", "300px"), l.__value = "reference_mismatch", l.value = l.__value, u.__value = "nucleotides", u.value = u.__value, c(s, "id", "snp-coloring-selector"), c(s, "class", "divbrowse-form-control"), /*$settings*/
      e[0].variantDisplayMode === void 0 && St(() => /*select_change_handler*/
      e[2].call(s)), c(a, "class", "option svelte-1tbpo2i"), c(h, "class", "form-label"), c(h, "for", "colorblind-mode"), O(h, "display", "inline-block"), O(h, "width", "300px"), O(h, "vertical-align", "middle"), O(m, "vertical-align", "middle"), O(m, "margin-left", "0"), c(m, "id", "colorblind-mode"), c(m, "type", "checkbox"), c(d, "class", "option svelte-1tbpo2i"), c(d, "style", ""), O(t, "min-width", "700px");
    },
    m(b, S) {
      L(b, t, S), p(t, r), p(t, n), p(t, a), p(a, i), p(a, o), p(a, s), p(s, l), p(s, u), wt(
        s,
        /*$settings*/
        e[0].variantDisplayMode
      ), p(t, f), p(t, d), p(d, h), p(d, v), p(d, m), m.checked = /*$settings*/
      e[0].statusColorblindMode, g || (_ = [
        Z(
          s,
          "change",
          /*select_change_handler*/
          e[2]
        ),
        Z(
          m,
          "change",
          /*input_change_handler*/
          e[3]
        )
      ], g = !0);
    },
    p(b, [S]) {
      S & /*$settings*/
      1 && wt(
        s,
        /*$settings*/
        b[0].variantDisplayMode
      ), S & /*$settings*/
      1 && (m.checked = /*$settings*/
      b[0].statusColorblindMode);
    },
    i: he,
    o: he,
    d(b) {
      b && x(t), g = !1, Le(_);
    }
  };
}
function fX(e, t, r) {
  let n;
  We("app").app();
  const { settings: i } = Et();
  dt(e, i, (l) => r(0, n = l));
  function o() {
    n.variantDisplayMode = pr(this), i.set(n);
  }
  function s() {
    n.statusColorblindMode = this.checked, i.set(n);
  }
  return [n, i, o, s];
}
class cX extends Ue {
  constructor(t) {
    super(), qe(this, t, fX, uX, Be, {}, lX);
  }
}
function dX(e) {
  rt(e, "svelte-1ft7w3w", "table#snpeff-annotations.svelte-1ft7w3w.svelte-1ft7w3w{font-size:90%}table#snpeff-annotations.svelte-1ft7w3w tr th.svelte-1ft7w3w,td.svelte-1ft7w3w.svelte-1ft7w3w{padding:3px}");
}
function V1(e, t, r) {
  const n = e.slice();
  return n[5] = t[r], n;
}
function q1(e, t, r) {
  const n = e.slice();
  return n[8] = t[r], n;
}
function U1(e, t, r) {
  const n = e.slice();
  return n[11] = t[r], n;
}
function H1(e) {
  let t, r = (
    /*attr*/
    e[11] + ""
  ), n;
  return {
    c() {
      t = y("th"), n = Q(r), c(t, "class", "svelte-1ft7w3w");
    },
    m(a, i) {
      L(a, t, i), p(t, n);
    },
    p: he,
    d(a) {
      a && x(t);
    }
  };
}
function G1(e) {
  let t, r = (
    /*attr_entry*/
    e[8] + ""
  ), n;
  return {
    c() {
      t = y("td"), n = Q(r), c(t, "class", "svelte-1ft7w3w");
    },
    m(a, i) {
      L(a, t, i), p(t, n);
    },
    p: he,
    d(a) {
      a && x(t);
    }
  };
}
function W1(e) {
  let t, r, n = (
    /*line*/
    e[5]
  ), a = [];
  for (let i = 0; i < n.length; i += 1)
    a[i] = G1(q1(e, n, i));
  return {
    c() {
      t = y("tr");
      for (let i = 0; i < a.length; i += 1)
        a[i].c();
      r = T();
    },
    m(i, o) {
      L(i, t, o);
      for (let s = 0; s < a.length; s += 1)
        a[s].m(t, null);
      p(t, r);
    },
    p(i, o) {
      if (o & /*lines*/
      4) {
        n = /*line*/
        i[5];
        let s;
        for (s = 0; s < n.length; s += 1) {
          const l = q1(i, n, s);
          a[s] ? a[s].p(l, o) : (a[s] = G1(l), a[s].c(), a[s].m(t, r));
        }
        for (; s < a.length; s += 1)
          a[s].d(1);
        a.length = n.length;
      }
    },
    d(i) {
      i && x(t), Ve(a, i);
    }
  };
}
function pX(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h = (
    /*snpeffAnnAttrs*/
    e[1]
  ), v = [];
  for (let _ = 0; _ < h.length; _ += 1)
    v[_] = H1(U1(e, h, _));
  let m = (
    /*lines*/
    e[2]
  ), g = [];
  for (let _ = 0; _ < m.length; _ += 1)
    g[_] = W1(V1(e, m, _));
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "SnpEff annotation", n = Q(`\r
\r
    Position: `), a = Q(
        /*position*/
        e[0]
      ), i = y("br"), o = y("br"), s = T(), l = y("div"), u = y("table"), f = y("tr");
      for (let _ = 0; _ < v.length; _ += 1)
        v[_].c();
      d = T();
      for (let _ = 0; _ < g.length; _ += 1)
        g[_].c();
      c(r, "class", "divbrowse-modal-dialogue-headline"), c(u, "id", "snpeff-annotations"), c(u, "border", "1"), c(u, "cellpadding", "0"), c(u, "cellspacing", "0"), c(u, "class", "svelte-1ft7w3w"), O(l, "width", "100%"), O(l, "overflow", "auto"), O(t, "max-width", "80vw");
    },
    m(_, b) {
      L(_, t, b), p(t, r), p(t, n), p(t, a), p(t, i), p(t, o), p(t, s), p(t, l), p(l, u), p(u, f);
      for (let S = 0; S < v.length; S += 1)
        v[S].m(f, null);
      p(u, d);
      for (let S = 0; S < g.length; S += 1)
        g[S].m(u, null);
    },
    p(_, [b]) {
      if (b & /*position*/
      1 && _e(
        a,
        /*position*/
        _[0]
      ), b & /*snpeffAnnAttrs*/
      2) {
        h = /*snpeffAnnAttrs*/
        _[1];
        let S;
        for (S = 0; S < h.length; S += 1) {
          const k = U1(_, h, S);
          v[S] ? v[S].p(k, b) : (v[S] = H1(k), v[S].c(), v[S].m(f, null));
        }
        for (; S < v.length; S += 1)
          v[S].d(1);
        v.length = h.length;
      }
      if (b & /*lines*/
      4) {
        m = /*lines*/
        _[2];
        let S;
        for (S = 0; S < m.length; S += 1) {
          const k = V1(_, m, S);
          g[S] ? g[S].p(k, b) : (g[S] = W1(k), g[S].c(), g[S].m(u, null));
        }
        for (; S < g.length; S += 1)
          g[S].d(1);
        g.length = m.length;
      }
    },
    i: he,
    o: he,
    d(_) {
      _ && x(t), Ve(v, _), Ve(g, _);
    }
  };
}
function vX(e, t, r) {
  let { close: n } = t, { position: a } = t, { snpeff_data: i } = t, o = [
    "Allele",
    "Annotation",
    "Annotation_Impact",
    "Gene_Name",
    "Gene_ID",
    "Feature_Type",
    "Feature_ID",
    "Transcript_BioType",
    "Rank",
    "HGVS.c",
    "HGVS.p",
    "cDNA.pos / cDNA.length",
    "CDS.pos / CDS.length",
    "AA.pos / AA.length",
    "Distance",
    "ERRORS / WARNINGS / INFO"
  ];
  Array.isArray(i) || (i = [i]);
  let s = [];
  return i.forEach((l) => {
    if (l !== "") {
      let u = l.split("|"), f = [];
      u.forEach((d) => {
        f.push(d);
      }), s.push(f);
    }
  }), e.$$set = (l) => {
    "close" in l && r(4, n = l.close), "position" in l && r(0, a = l.position), "snpeff_data" in l && r(3, i = l.snpeff_data);
  }, [a, o, s, i, n];
}
class hX extends Ue {
  constructor(t) {
    super(), qe(this, t, vX, pX, Be, { close: 4, position: 0, snpeff_data: 3 }, dX);
  }
}
function gX(e) {
  rt(e, "svelte-1yqwa39", ".divbrowse-modal-dialogue-headline{margin-bottom:15px;font-weight:bold;font-size:120%}");
}
function mX(e) {
  let t, r, n = {};
  return t = new FJ({ props: n }), e[1](t), {
    c() {
      xe(t.$$.fragment);
    },
    m(a, i) {
      Ne(t, a, i), r = !0;
    },
    p(a, [i]) {
      const o = {};
      t.$set(o);
    },
    i(a) {
      r || (ne(t.$$.fragment, a), r = !0);
    },
    o(a) {
      fe(t.$$.fragment, a), r = !1;
    },
    d(a) {
      e[1](null), De(t, a);
    }
  };
}
function bX(e, t, r) {
  const n = We("app");
  let { eventbus: a } = n.app(), i, o = {
    Blast: WJ,
    Dummy: HY,
    DataAnalysisAndExport: aY,
    DataAnalysis: fY,
    Clustermap: pY,
    DataSummary: _Y,
    GeneSearch: PY,
    GeneDetails: zY,
    SortSamples: sX,
    Settings: cX,
    SnpEffAnnotation: hX,
    VariantFilter: nX
  };
  a.on("modal:open", (l) => {
    l.component = o[l.component], l.props || (l.props = {}), i.newModal(l);
  });
  function s(l) {
    lt[l ? "unshift" : "push"](() => {
      i = l, r(0, i);
    });
  }
  return [i, s];
}
class _X extends Ue {
  constructor(t) {
    super(), qe(this, t, bX, mX, Be, {}, gX);
  }
}
var Mt = "top", Qt = "bottom", Zt = "right", Nt = "left", xd = "auto", eo = [Mt, Qt, Zt, Nt], da = "start", bi = "end", yX = "clippingParents", M2 = "viewport", Ka = "popper", wX = "reference", K1 = /* @__PURE__ */ eo.reduce(function(e, t) {
  return e.concat([t + "-" + da, t + "-" + bi]);
}, []), N2 = /* @__PURE__ */ [].concat(eo, [xd]).reduce(function(e, t) {
  return e.concat([t, t + "-" + da, t + "-" + bi]);
}, []), SX = "beforeRead", OX = "read", kX = "afterRead", EX = "beforeMain", $X = "main", TX = "afterMain", CX = "beforeWrite", AX = "write", IX = "afterWrite", PX = [SX, OX, kX, EX, $X, TX, CX, AX, IX];
function yr(e) {
  return e ? (e.nodeName || "").toLowerCase() : null;
}
function rr(e) {
  if (e == null)
    return window;
  if (e.toString() !== "[object Window]") {
    var t = e.ownerDocument;
    return t && t.defaultView || window;
  }
  return e;
}
function $n(e) {
  var t = rr(e).Element;
  return e instanceof t || e instanceof Element;
}
function Xt(e) {
  var t = rr(e).HTMLElement;
  return e instanceof t || e instanceof HTMLElement;
}
function Fd(e) {
  if (typeof ShadowRoot > "u")
    return !1;
  var t = rr(e).ShadowRoot;
  return e instanceof t || e instanceof ShadowRoot;
}
function RX(e) {
  var t = e.state;
  Object.keys(t.elements).forEach(function(r) {
    var n = t.styles[r] || {}, a = t.attributes[r] || {}, i = t.elements[r];
    !Xt(i) || !yr(i) || (Object.assign(i.style, n), Object.keys(a).forEach(function(o) {
      var s = a[o];
      s === !1 ? i.removeAttribute(o) : i.setAttribute(o, s === !0 ? "" : s);
    }));
  });
}
function jX(e) {
  var t = e.state, r = {
    popper: {
      position: t.options.strategy,
      left: "0",
      top: "0",
      margin: "0"
    },
    arrow: {
      position: "absolute"
    },
    reference: {}
  };
  return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
    Object.keys(t.elements).forEach(function(n) {
      var a = t.elements[n], i = t.attributes[n] || {}, o = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), s = o.reduce(function(l, u) {
        return l[u] = "", l;
      }, {});
      !Xt(a) || !yr(a) || (Object.assign(a.style, s), Object.keys(i).forEach(function(l) {
        a.removeAttribute(l);
      }));
    });
  };
}
const D2 = {
  name: "applyStyles",
  enabled: !0,
  phase: "write",
  fn: RX,
  effect: jX,
  requires: ["computeStyles"]
};
function mr(e) {
  return e.split("-")[0];
}
var wn = Math.max, Ss = Math.min, pa = Math.round;
function zf() {
  var e = navigator.userAgentData;
  return e != null && e.brands ? e.brands.map(function(t) {
    return t.brand + "/" + t.version;
  }).join(" ") : navigator.userAgent;
}
function x2() {
  return !/^((?!chrome|android).)*safari/i.test(zf());
}
function va(e, t, r) {
  t === void 0 && (t = !1), r === void 0 && (r = !1);
  var n = e.getBoundingClientRect(), a = 1, i = 1;
  t && Xt(e) && (a = e.offsetWidth > 0 && pa(n.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && pa(n.height) / e.offsetHeight || 1);
  var o = $n(e) ? rr(e) : window, s = o.visualViewport, l = !x2() && r, u = (n.left + (l && s ? s.offsetLeft : 0)) / a, f = (n.top + (l && s ? s.offsetTop : 0)) / i, d = n.width / a, h = n.height / i;
  return {
    width: d,
    height: h,
    top: f,
    right: u + d,
    bottom: f + h,
    left: u,
    x: u,
    y: f
  };
}
function Ld(e) {
  var t = va(e), r = e.offsetWidth, n = e.offsetHeight;
  return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
    x: e.offsetLeft,
    y: e.offsetTop,
    width: r,
    height: n
  };
}
function F2(e, t) {
  var r = t.getRootNode && t.getRootNode();
  if (e.contains(t))
    return !0;
  if (r && Fd(r)) {
    var n = t;
    do {
      if (n && e.isSameNode(n))
        return !0;
      n = n.parentNode || n.host;
    } while (n);
  }
  return !1;
}
function Cr(e) {
  return rr(e).getComputedStyle(e);
}
function MX(e) {
  return ["table", "td", "th"].indexOf(yr(e)) >= 0;
}
function rn(e) {
  return (($n(e) ? e.ownerDocument : (
    // $FlowFixMe[prop-missing]
    e.document
  )) || window.document).documentElement;
}
function bl(e) {
  return yr(e) === "html" ? e : (
    // this is a quicker (but less type safe) way to save quite some bytes from the bundle
    // $FlowFixMe[incompatible-return]
    // $FlowFixMe[prop-missing]
    e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
    e.parentNode || // DOM Element detected
    (Fd(e) ? e.host : null) || // ShadowRoot detected
    // $FlowFixMe[incompatible-call]: HTMLElement is a Node
    rn(e)
  );
}
function J1(e) {
  return !Xt(e) || // https://github.com/popperjs/popper-core/issues/837
  Cr(e).position === "fixed" ? null : e.offsetParent;
}
function NX(e) {
  var t = /firefox/i.test(zf()), r = /Trident/i.test(zf());
  if (r && Xt(e)) {
    var n = Cr(e);
    if (n.position === "fixed")
      return null;
  }
  var a = bl(e);
  for (Fd(a) && (a = a.host); Xt(a) && ["html", "body"].indexOf(yr(a)) < 0; ) {
    var i = Cr(a);
    if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || t && i.willChange === "filter" || t && i.filter && i.filter !== "none")
      return a;
    a = a.parentNode;
  }
  return null;
}
function to(e) {
  for (var t = rr(e), r = J1(e); r && MX(r) && Cr(r).position === "static"; )
    r = J1(r);
  return r && (yr(r) === "html" || yr(r) === "body" && Cr(r).position === "static") ? t : r || NX(e) || t;
}
function Bd(e) {
  return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
}
function ai(e, t, r) {
  return wn(e, Ss(t, r));
}
function DX(e, t, r) {
  var n = ai(e, t, r);
  return n > r ? r : n;
}
function L2() {
  return {
    top: 0,
    right: 0,
    bottom: 0,
    left: 0
  };
}
function B2(e) {
  return Object.assign({}, L2(), e);
}
function z2(e, t) {
  return t.reduce(function(r, n) {
    return r[n] = e, r;
  }, {});
}
var xX = function(t, r) {
  return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
    placement: r.placement
  })) : t, B2(typeof t != "number" ? t : z2(t, eo));
};
function FX(e) {
  var t, r = e.state, n = e.name, a = e.options, i = r.elements.arrow, o = r.modifiersData.popperOffsets, s = mr(r.placement), l = Bd(s), u = [Nt, Zt].indexOf(s) >= 0, f = u ? "height" : "width";
  if (!(!i || !o)) {
    var d = xX(a.padding, r), h = Ld(i), v = l === "y" ? Mt : Nt, m = l === "y" ? Qt : Zt, g = r.rects.reference[f] + r.rects.reference[l] - o[l] - r.rects.popper[f], _ = o[l] - r.rects.reference[l], b = to(i), S = b ? l === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, k = g / 2 - _ / 2, w = d[v], C = S - h[f] - d[m], E = S / 2 - h[f] / 2 + k, A = ai(w, E, C), D = l;
    r.modifiersData[n] = (t = {}, t[D] = A, t.centerOffset = A - E, t);
  }
}
function LX(e) {
  var t = e.state, r = e.options, n = r.element, a = n === void 0 ? "[data-popper-arrow]" : n;
  a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || F2(t.elements.popper, a) && (t.elements.arrow = a));
}
const BX = {
  name: "arrow",
  enabled: !0,
  phase: "main",
  fn: FX,
  effect: LX,
  requires: ["popperOffsets"],
  requiresIfExists: ["preventOverflow"]
};
function ha(e) {
  return e.split("-")[1];
}
var zX = {
  top: "auto",
  right: "auto",
  bottom: "auto",
  left: "auto"
};
function VX(e) {
  var t = e.x, r = e.y, n = window, a = n.devicePixelRatio || 1;
  return {
    x: pa(t * a) / a || 0,
    y: pa(r * a) / a || 0
  };
}
function Y1(e) {
  var t, r = e.popper, n = e.popperRect, a = e.placement, i = e.variation, o = e.offsets, s = e.position, l = e.gpuAcceleration, u = e.adaptive, f = e.roundOffsets, d = e.isFixed, h = o.x, v = h === void 0 ? 0 : h, m = o.y, g = m === void 0 ? 0 : m, _ = typeof f == "function" ? f({
    x: v,
    y: g
  }) : {
    x: v,
    y: g
  };
  v = _.x, g = _.y;
  var b = o.hasOwnProperty("x"), S = o.hasOwnProperty("y"), k = Nt, w = Mt, C = window;
  if (u) {
    var E = to(r), A = "clientHeight", D = "clientWidth";
    if (E === rr(r) && (E = rn(r), Cr(E).position !== "static" && s === "absolute" && (A = "scrollHeight", D = "scrollWidth")), E = E, a === Mt || (a === Nt || a === Zt) && i === bi) {
      w = Qt;
      var F = d && E === C && C.visualViewport ? C.visualViewport.height : (
        // $FlowFixMe[prop-missing]
        E[A]
      );
      g -= F - n.height, g *= l ? 1 : -1;
    }
    if (a === Nt || (a === Mt || a === Qt) && i === bi) {
      k = Zt;
      var R = d && E === C && C.visualViewport ? C.visualViewport.width : (
        // $FlowFixMe[prop-missing]
        E[D]
      );
      v -= R - n.width, v *= l ? 1 : -1;
    }
  }
  var $ = Object.assign({
    position: s
  }, u && zX), j = f === !0 ? VX({
    x: v,
    y: g
  }) : {
    x: v,
    y: g
  };
  if (v = j.x, g = j.y, l) {
    var V;
    return Object.assign({}, $, (V = {}, V[w] = S ? "0" : "", V[k] = b ? "0" : "", V.transform = (C.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + g + "px)" : "translate3d(" + v + "px, " + g + "px, 0)", V));
  }
  return Object.assign({}, $, (t = {}, t[w] = S ? g + "px" : "", t[k] = b ? v + "px" : "", t.transform = "", t));
}
function qX(e) {
  var t = e.state, r = e.options, n = r.gpuAcceleration, a = n === void 0 ? !0 : n, i = r.adaptive, o = i === void 0 ? !0 : i, s = r.roundOffsets, l = s === void 0 ? !0 : s, u = {
    placement: mr(t.placement),
    variation: ha(t.placement),
    popper: t.elements.popper,
    popperRect: t.rects.popper,
    gpuAcceleration: a,
    isFixed: t.options.strategy === "fixed"
  };
  t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Y1(Object.assign({}, u, {
    offsets: t.modifiersData.popperOffsets,
    position: t.options.strategy,
    adaptive: o,
    roundOffsets: l
  })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Y1(Object.assign({}, u, {
    offsets: t.modifiersData.arrow,
    position: "absolute",
    adaptive: !1,
    roundOffsets: l
  })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
    "data-popper-placement": t.placement
  });
}
const UX = {
  name: "computeStyles",
  enabled: !0,
  phase: "beforeWrite",
  fn: qX,
  data: {}
};
var No = {
  passive: !0
};
function HX(e) {
  var t = e.state, r = e.instance, n = e.options, a = n.scroll, i = a === void 0 ? !0 : a, o = n.resize, s = o === void 0 ? !0 : o, l = rr(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper);
  return i && u.forEach(function(f) {
    f.addEventListener("scroll", r.update, No);
  }), s && l.addEventListener("resize", r.update, No), function() {
    i && u.forEach(function(f) {
      f.removeEventListener("scroll", r.update, No);
    }), s && l.removeEventListener("resize", r.update, No);
  };
}
const GX = {
  name: "eventListeners",
  enabled: !0,
  phase: "write",
  fn: function() {
  },
  effect: HX,
  data: {}
};
var WX = {
  left: "right",
  right: "left",
  bottom: "top",
  top: "bottom"
};
function ts(e) {
  return e.replace(/left|right|bottom|top/g, function(t) {
    return WX[t];
  });
}
var KX = {
  start: "end",
  end: "start"
};
function X1(e) {
  return e.replace(/start|end/g, function(t) {
    return KX[t];
  });
}
function zd(e) {
  var t = rr(e), r = t.pageXOffset, n = t.pageYOffset;
  return {
    scrollLeft: r,
    scrollTop: n
  };
}
function Vd(e) {
  return va(rn(e)).left + zd(e).scrollLeft;
}
function JX(e, t) {
  var r = rr(e), n = rn(e), a = r.visualViewport, i = n.clientWidth, o = n.clientHeight, s = 0, l = 0;
  if (a) {
    i = a.width, o = a.height;
    var u = x2();
    (u || !u && t === "fixed") && (s = a.offsetLeft, l = a.offsetTop);
  }
  return {
    width: i,
    height: o,
    x: s + Vd(e),
    y: l
  };
}
function YX(e) {
  var t, r = rn(e), n = zd(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, i = wn(r.scrollWidth, r.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), o = wn(r.scrollHeight, r.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -n.scrollLeft + Vd(e), l = -n.scrollTop;
  return Cr(a || r).direction === "rtl" && (s += wn(r.clientWidth, a ? a.clientWidth : 0) - i), {
    width: i,
    height: o,
    x: s,
    y: l
  };
}
function qd(e) {
  var t = Cr(e), r = t.overflow, n = t.overflowX, a = t.overflowY;
  return /auto|scroll|overlay|hidden/.test(r + a + n);
}
function V2(e) {
  return ["html", "body", "#document"].indexOf(yr(e)) >= 0 ? e.ownerDocument.body : Xt(e) && qd(e) ? e : V2(bl(e));
}
function ii(e, t) {
  var r;
  t === void 0 && (t = []);
  var n = V2(e), a = n === ((r = e.ownerDocument) == null ? void 0 : r.body), i = rr(n), o = a ? [i].concat(i.visualViewport || [], qd(n) ? n : []) : n, s = t.concat(o);
  return a ? s : (
    // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
    s.concat(ii(bl(o)))
  );
}
function Vf(e) {
  return Object.assign({}, e, {
    left: e.x,
    top: e.y,
    right: e.x + e.width,
    bottom: e.y + e.height
  });
}
function XX(e, t) {
  var r = va(e, !1, t === "fixed");
  return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
}
function Q1(e, t, r) {
  return t === M2 ? Vf(JX(e, r)) : $n(t) ? XX(t, r) : Vf(YX(rn(e)));
}
function QX(e) {
  var t = ii(bl(e)), r = ["absolute", "fixed"].indexOf(Cr(e).position) >= 0, n = r && Xt(e) ? to(e) : e;
  return $n(n) ? t.filter(function(a) {
    return $n(a) && F2(a, n) && yr(a) !== "body";
  }) : [];
}
function ZX(e, t, r, n) {
  var a = t === "clippingParents" ? QX(e) : [].concat(t), i = [].concat(a, [r]), o = i[0], s = i.reduce(function(l, u) {
    var f = Q1(e, u, n);
    return l.top = wn(f.top, l.top), l.right = Ss(f.right, l.right), l.bottom = Ss(f.bottom, l.bottom), l.left = wn(f.left, l.left), l;
  }, Q1(e, o, n));
  return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
}
function q2(e) {
  var t = e.reference, r = e.element, n = e.placement, a = n ? mr(n) : null, i = n ? ha(n) : null, o = t.x + t.width / 2 - r.width / 2, s = t.y + t.height / 2 - r.height / 2, l;
  switch (a) {
    case Mt:
      l = {
        x: o,
        y: t.y - r.height
      };
      break;
    case Qt:
      l = {
        x: o,
        y: t.y + t.height
      };
      break;
    case Zt:
      l = {
        x: t.x + t.width,
        y: s
      };
      break;
    case Nt:
      l = {
        x: t.x - r.width,
        y: s
      };
      break;
    default:
      l = {
        x: t.x,
        y: t.y
      };
  }
  var u = a ? Bd(a) : null;
  if (u != null) {
    var f = u === "y" ? "height" : "width";
    switch (i) {
      case da:
        l[u] = l[u] - (t[f] / 2 - r[f] / 2);
        break;
      case bi:
        l[u] = l[u] + (t[f] / 2 - r[f] / 2);
        break;
    }
  }
  return l;
}
function _i(e, t) {
  t === void 0 && (t = {});
  var r = t, n = r.placement, a = n === void 0 ? e.placement : n, i = r.strategy, o = i === void 0 ? e.strategy : i, s = r.boundary, l = s === void 0 ? yX : s, u = r.rootBoundary, f = u === void 0 ? M2 : u, d = r.elementContext, h = d === void 0 ? Ka : d, v = r.altBoundary, m = v === void 0 ? !1 : v, g = r.padding, _ = g === void 0 ? 0 : g, b = B2(typeof _ != "number" ? _ : z2(_, eo)), S = h === Ka ? wX : Ka, k = e.rects.popper, w = e.elements[m ? S : h], C = ZX($n(w) ? w : w.contextElement || rn(e.elements.popper), l, f, o), E = va(e.elements.reference), A = q2({
    reference: E,
    element: k,
    strategy: "absolute",
    placement: a
  }), D = Vf(Object.assign({}, k, A)), F = h === Ka ? D : E, R = {
    top: C.top - F.top + b.top,
    bottom: F.bottom - C.bottom + b.bottom,
    left: C.left - F.left + b.left,
    right: F.right - C.right + b.right
  }, $ = e.modifiersData.offset;
  if (h === Ka && $) {
    var j = $[a];
    Object.keys(R).forEach(function(V) {
      var re = [Zt, Qt].indexOf(V) >= 0 ? 1 : -1, q = [Mt, Qt].indexOf(V) >= 0 ? "y" : "x";
      R[V] += j[q] * re;
    });
  }
  return R;
}
function eQ(e, t) {
  t === void 0 && (t = {});
  var r = t, n = r.placement, a = r.boundary, i = r.rootBoundary, o = r.padding, s = r.flipVariations, l = r.allowedAutoPlacements, u = l === void 0 ? N2 : l, f = ha(n), d = f ? s ? K1 : K1.filter(function(m) {
    return ha(m) === f;
  }) : eo, h = d.filter(function(m) {
    return u.indexOf(m) >= 0;
  });
  h.length === 0 && (h = d);
  var v = h.reduce(function(m, g) {
    return m[g] = _i(e, {
      placement: g,
      boundary: a,
      rootBoundary: i,
      padding: o
    })[mr(g)], m;
  }, {});
  return Object.keys(v).sort(function(m, g) {
    return v[m] - v[g];
  });
}
function tQ(e) {
  if (mr(e) === xd)
    return [];
  var t = ts(e);
  return [X1(e), t, X1(t)];
}
function rQ(e) {
  var t = e.state, r = e.options, n = e.name;
  if (!t.modifiersData[n]._skip) {
    for (var a = r.mainAxis, i = a === void 0 ? !0 : a, o = r.altAxis, s = o === void 0 ? !0 : o, l = r.fallbackPlacements, u = r.padding, f = r.boundary, d = r.rootBoundary, h = r.altBoundary, v = r.flipVariations, m = v === void 0 ? !0 : v, g = r.allowedAutoPlacements, _ = t.options.placement, b = mr(_), S = b === _, k = l || (S || !m ? [ts(_)] : tQ(_)), w = [_].concat(k).reduce(function(z, K) {
      return z.concat(mr(K) === xd ? eQ(t, {
        placement: K,
        boundary: f,
        rootBoundary: d,
        padding: u,
        flipVariations: m,
        allowedAutoPlacements: g
      }) : K);
    }, []), C = t.rects.reference, E = t.rects.popper, A = /* @__PURE__ */ new Map(), D = !0, F = w[0], R = 0; R < w.length; R++) {
      var $ = w[R], j = mr($), V = ha($) === da, re = [Mt, Qt].indexOf(j) >= 0, q = re ? "width" : "height", ee = _i(t, {
        placement: $,
        boundary: f,
        rootBoundary: d,
        altBoundary: h,
        padding: u
      }), Y = re ? V ? Zt : Nt : V ? Qt : Mt;
      C[q] > E[q] && (Y = ts(Y));
      var ae = ts(Y), M = [];
      if (i && M.push(ee[j] <= 0), s && M.push(ee[Y] <= 0, ee[ae] <= 0), M.every(function(z) {
        return z;
      })) {
        F = $, D = !1;
        break;
      }
      A.set($, M);
    }
    if (D)
      for (var P = m ? 3 : 1, I = function(K) {
        var te = w.find(function(de) {
          var oe = A.get(de);
          if (oe)
            return oe.slice(0, K).every(function(X) {
              return X;
            });
        });
        if (te)
          return F = te, "break";
      }, J = P; J > 0; J--) {
        var G = I(J);
        if (G === "break")
          break;
      }
    t.placement !== F && (t.modifiersData[n]._skip = !0, t.placement = F, t.reset = !0);
  }
}
const nQ = {
  name: "flip",
  enabled: !0,
  phase: "main",
  fn: rQ,
  requiresIfExists: ["offset"],
  data: {
    _skip: !1
  }
};
function Z1(e, t, r) {
  return r === void 0 && (r = {
    x: 0,
    y: 0
  }), {
    top: e.top - t.height - r.y,
    right: e.right - t.width + r.x,
    bottom: e.bottom - t.height + r.y,
    left: e.left - t.width - r.x
  };
}
function eb(e) {
  return [Mt, Zt, Qt, Nt].some(function(t) {
    return e[t] >= 0;
  });
}
function aQ(e) {
  var t = e.state, r = e.name, n = t.rects.reference, a = t.rects.popper, i = t.modifiersData.preventOverflow, o = _i(t, {
    elementContext: "reference"
  }), s = _i(t, {
    altBoundary: !0
  }), l = Z1(o, n), u = Z1(s, a, i), f = eb(l), d = eb(u);
  t.modifiersData[r] = {
    referenceClippingOffsets: l,
    popperEscapeOffsets: u,
    isReferenceHidden: f,
    hasPopperEscaped: d
  }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
    "data-popper-reference-hidden": f,
    "data-popper-escaped": d
  });
}
const iQ = {
  name: "hide",
  enabled: !0,
  phase: "main",
  requiresIfExists: ["preventOverflow"],
  fn: aQ
};
function oQ(e, t, r) {
  var n = mr(e), a = [Nt, Mt].indexOf(n) >= 0 ? -1 : 1, i = typeof r == "function" ? r(Object.assign({}, t, {
    placement: e
  })) : r, o = i[0], s = i[1];
  return o = o || 0, s = (s || 0) * a, [Nt, Zt].indexOf(n) >= 0 ? {
    x: s,
    y: o
  } : {
    x: o,
    y: s
  };
}
function sQ(e) {
  var t = e.state, r = e.options, n = e.name, a = r.offset, i = a === void 0 ? [0, 0] : a, o = N2.reduce(function(f, d) {
    return f[d] = oQ(d, t.rects, i), f;
  }, {}), s = o[t.placement], l = s.x, u = s.y;
  t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u), t.modifiersData[n] = o;
}
const lQ = {
  name: "offset",
  enabled: !0,
  phase: "main",
  requires: ["popperOffsets"],
  fn: sQ
};
function uQ(e) {
  var t = e.state, r = e.name;
  t.modifiersData[r] = q2({
    reference: t.rects.reference,
    element: t.rects.popper,
    strategy: "absolute",
    placement: t.placement
  });
}
const fQ = {
  name: "popperOffsets",
  enabled: !0,
  phase: "read",
  fn: uQ,
  data: {}
};
function cQ(e) {
  return e === "x" ? "y" : "x";
}
function dQ(e) {
  var t = e.state, r = e.options, n = e.name, a = r.mainAxis, i = a === void 0 ? !0 : a, o = r.altAxis, s = o === void 0 ? !1 : o, l = r.boundary, u = r.rootBoundary, f = r.altBoundary, d = r.padding, h = r.tether, v = h === void 0 ? !0 : h, m = r.tetherOffset, g = m === void 0 ? 0 : m, _ = _i(t, {
    boundary: l,
    rootBoundary: u,
    padding: d,
    altBoundary: f
  }), b = mr(t.placement), S = ha(t.placement), k = !S, w = Bd(b), C = cQ(w), E = t.modifiersData.popperOffsets, A = t.rects.reference, D = t.rects.popper, F = typeof g == "function" ? g(Object.assign({}, t.rects, {
    placement: t.placement
  })) : g, R = typeof F == "number" ? {
    mainAxis: F,
    altAxis: F
  } : Object.assign({
    mainAxis: 0,
    altAxis: 0
  }, F), $ = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, j = {
    x: 0,
    y: 0
  };
  if (E) {
    if (i) {
      var V, re = w === "y" ? Mt : Nt, q = w === "y" ? Qt : Zt, ee = w === "y" ? "height" : "width", Y = E[w], ae = Y + _[re], M = Y - _[q], P = v ? -D[ee] / 2 : 0, I = S === da ? A[ee] : D[ee], J = S === da ? -D[ee] : -A[ee], G = t.elements.arrow, z = v && G ? Ld(G) : {
        width: 0,
        height: 0
      }, K = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : L2(), te = K[re], de = K[q], oe = ai(0, A[ee], z[ee]), X = k ? A[ee] / 2 - P - oe - te - R.mainAxis : I - oe - te - R.mainAxis, B = k ? -A[ee] / 2 + P + oe + de + R.mainAxis : J + oe + de + R.mainAxis, ue = t.elements.arrow && to(t.elements.arrow), se = ue ? w === "y" ? ue.clientTop || 0 : ue.clientLeft || 0 : 0, N = (V = $ == null ? void 0 : $[w]) != null ? V : 0, ce = Y + X - N - se, ye = Y + B - N, me = ai(v ? Ss(ae, ce) : ae, Y, v ? wn(M, ye) : M);
      E[w] = me, j[w] = me - Y;
    }
    if (s) {
      var ze, Oe = w === "x" ? Mt : Nt, He = w === "x" ? Qt : Zt, ke = E[C], Ze = C === "y" ? "height" : "width", Qe = ke + _[Oe], Re = ke - _[He], et = [Mt, Nt].indexOf(b) !== -1, pt = (ze = $ == null ? void 0 : $[C]) != null ? ze : 0, je = et ? Qe : ke - A[Ze] - D[Ze] - pt + R.altAxis, le = et ? ke + A[Ze] + D[Ze] - pt - R.altAxis : Re, we = v && et ? DX(je, ke, le) : ai(v ? je : Qe, ke, v ? le : Re);
      E[C] = we, j[C] = we - ke;
    }
    t.modifiersData[n] = j;
  }
}
const pQ = {
  name: "preventOverflow",
  enabled: !0,
  phase: "main",
  fn: dQ,
  requiresIfExists: ["offset"]
};
function vQ(e) {
  return {
    scrollLeft: e.scrollLeft,
    scrollTop: e.scrollTop
  };
}
function hQ(e) {
  return e === rr(e) || !Xt(e) ? zd(e) : vQ(e);
}
function gQ(e) {
  var t = e.getBoundingClientRect(), r = pa(t.width) / e.offsetWidth || 1, n = pa(t.height) / e.offsetHeight || 1;
  return r !== 1 || n !== 1;
}
function mQ(e, t, r) {
  r === void 0 && (r = !1);
  var n = Xt(t), a = Xt(t) && gQ(t), i = rn(t), o = va(e, a, r), s = {
    scrollLeft: 0,
    scrollTop: 0
  }, l = {
    x: 0,
    y: 0
  };
  return (n || !n && !r) && ((yr(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
  qd(i)) && (s = hQ(t)), Xt(t) ? (l = va(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : i && (l.x = Vd(i))), {
    x: o.left + s.scrollLeft - l.x,
    y: o.top + s.scrollTop - l.y,
    width: o.width,
    height: o.height
  };
}
function bQ(e) {
  var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
  e.forEach(function(i) {
    t.set(i.name, i);
  });
  function a(i) {
    r.add(i.name);
    var o = [].concat(i.requires || [], i.requiresIfExists || []);
    o.forEach(function(s) {
      if (!r.has(s)) {
        var l = t.get(s);
        l && a(l);
      }
    }), n.push(i);
  }
  return e.forEach(function(i) {
    r.has(i.name) || a(i);
  }), n;
}
function _Q(e) {
  var t = bQ(e);
  return PX.reduce(function(r, n) {
    return r.concat(t.filter(function(a) {
      return a.phase === n;
    }));
  }, []);
}
function yQ(e) {
  var t;
  return function() {
    return t || (t = new Promise(function(r) {
      Promise.resolve().then(function() {
        t = void 0, r(e());
      });
    })), t;
  };
}
function wQ(e) {
  var t = e.reduce(function(r, n) {
    var a = r[n.name];
    return r[n.name] = a ? Object.assign({}, a, n, {
      options: Object.assign({}, a.options, n.options),
      data: Object.assign({}, a.data, n.data)
    }) : n, r;
  }, {});
  return Object.keys(t).map(function(r) {
    return t[r];
  });
}
var tb = {
  placement: "bottom",
  modifiers: [],
  strategy: "absolute"
};
function rb() {
  for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
    t[r] = arguments[r];
  return !t.some(function(n) {
    return !(n && typeof n.getBoundingClientRect == "function");
  });
}
function SQ(e) {
  e === void 0 && (e = {});
  var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, a = t.defaultOptions, i = a === void 0 ? tb : a;
  return function(s, l, u) {
    u === void 0 && (u = i);
    var f = {
      placement: "bottom",
      orderedModifiers: [],
      options: Object.assign({}, tb, i),
      modifiersData: {},
      elements: {
        reference: s,
        popper: l
      },
      attributes: {},
      styles: {}
    }, d = [], h = !1, v = {
      state: f,
      setOptions: function(b) {
        var S = typeof b == "function" ? b(f.options) : b;
        g(), f.options = Object.assign({}, i, f.options, S), f.scrollParents = {
          reference: $n(s) ? ii(s) : s.contextElement ? ii(s.contextElement) : [],
          popper: ii(l)
        };
        var k = _Q(wQ([].concat(n, f.options.modifiers)));
        return f.orderedModifiers = k.filter(function(w) {
          return w.enabled;
        }), m(), v.update();
      },
      // Sync update – it will always be executed, even if not necessary. This
      // is useful for low frequency updates where sync behavior simplifies the
      // logic.
      // For high frequency updates (e.g. `resize` and `scroll` events), always
      // prefer the async Popper#update method
      forceUpdate: function() {
        if (!h) {
          var b = f.elements, S = b.reference, k = b.popper;
          if (rb(S, k)) {
            f.rects = {
              reference: mQ(S, to(k), f.options.strategy === "fixed"),
              popper: Ld(k)
            }, f.reset = !1, f.placement = f.options.placement, f.orderedModifiers.forEach(function(R) {
              return f.modifiersData[R.name] = Object.assign({}, R.data);
            });
            for (var w = 0; w < f.orderedModifiers.length; w++) {
              if (f.reset === !0) {
                f.reset = !1, w = -1;
                continue;
              }
              var C = f.orderedModifiers[w], E = C.fn, A = C.options, D = A === void 0 ? {} : A, F = C.name;
              typeof E == "function" && (f = E({
                state: f,
                options: D,
                name: F,
                instance: v
              }) || f);
            }
          }
        }
      },
      // Async and optimistically optimized update – it will not be executed if
      // not necessary (debounced to run at most once-per-tick)
      update: yQ(function() {
        return new Promise(function(_) {
          v.forceUpdate(), _(f);
        });
      }),
      destroy: function() {
        g(), h = !0;
      }
    };
    if (!rb(s, l))
      return v;
    v.setOptions(u).then(function(_) {
      !h && u.onFirstUpdate && u.onFirstUpdate(_);
    });
    function m() {
      f.orderedModifiers.forEach(function(_) {
        var b = _.name, S = _.options, k = S === void 0 ? {} : S, w = _.effect;
        if (typeof w == "function") {
          var C = w({
            state: f,
            name: b,
            instance: v,
            options: k
          }), E = function() {
          };
          d.push(C || E);
        }
      });
    }
    function g() {
      d.forEach(function(_) {
        return _();
      }), d = [];
    }
    return v;
  };
}
var OQ = [GX, fQ, UX, D2, lQ, nQ, pQ, BX, iQ], kQ = /* @__PURE__ */ SQ({
  defaultModifiers: OQ
}), EQ = "tippy-box", U2 = "tippy-content", $Q = "tippy-backdrop", H2 = "tippy-arrow", G2 = "tippy-svg-arrow", xr = {
  passive: !0,
  capture: !0
}, W2 = function() {
  return document.body;
};
function Fu(e, t, r) {
  if (Array.isArray(e)) {
    var n = e[t];
    return n ?? (Array.isArray(r) ? r[t] : r);
  }
  return e;
}
function Ud(e, t) {
  var r = {}.toString.call(e);
  return r.indexOf("[object") === 0 && r.indexOf(t + "]") > -1;
}
function K2(e, t) {
  return typeof e == "function" ? e.apply(void 0, t) : e;
}
function nb(e, t) {
  if (t === 0)
    return e;
  var r;
  return function(n) {
    clearTimeout(r), r = setTimeout(function() {
      e(n);
    }, t);
  };
}
function TQ(e, t) {
  var r = Object.assign({}, e);
  return t.forEach(function(n) {
    delete r[n];
  }), r;
}
function CQ(e) {
  return e.split(/\s+/).filter(Boolean);
}
function pn(e) {
  return [].concat(e);
}
function ab(e, t) {
  e.indexOf(t) === -1 && e.push(t);
}
function AQ(e) {
  return e.filter(function(t, r) {
    return e.indexOf(t) === r;
  });
}
function IQ(e) {
  return e.split("-")[0];
}
function Os(e) {
  return [].slice.call(e);
}
function ib(e) {
  return Object.keys(e).reduce(function(t, r) {
    return e[r] !== void 0 && (t[r] = e[r]), t;
  }, {});
}
function oi() {
  return document.createElement("div");
}
function _l(e) {
  return ["Element", "Fragment"].some(function(t) {
    return Ud(e, t);
  });
}
function PQ(e) {
  return Ud(e, "NodeList");
}
function RQ(e) {
  return Ud(e, "MouseEvent");
}
function jQ(e) {
  return !!(e && e._tippy && e._tippy.reference === e);
}
function MQ(e) {
  return _l(e) ? [e] : PQ(e) ? Os(e) : Array.isArray(e) ? e : Os(document.querySelectorAll(e));
}
function Lu(e, t) {
  e.forEach(function(r) {
    r && (r.style.transitionDuration = t + "ms");
  });
}
function ob(e, t) {
  e.forEach(function(r) {
    r && r.setAttribute("data-state", t);
  });
}
function NQ(e) {
  var t, r = pn(e), n = r[0];
  return n != null && (t = n.ownerDocument) != null && t.body ? n.ownerDocument : document;
}
function DQ(e, t) {
  var r = t.clientX, n = t.clientY;
  return e.every(function(a) {
    var i = a.popperRect, o = a.popperState, s = a.props, l = s.interactiveBorder, u = IQ(o.placement), f = o.modifiersData.offset;
    if (!f)
      return !0;
    var d = u === "bottom" ? f.top.y : 0, h = u === "top" ? f.bottom.y : 0, v = u === "right" ? f.left.x : 0, m = u === "left" ? f.right.x : 0, g = i.top - n + d > l, _ = n - i.bottom - h > l, b = i.left - r + v > l, S = r - i.right - m > l;
    return g || _ || b || S;
  });
}
function Bu(e, t, r) {
  var n = t + "EventListener";
  ["transitionend", "webkitTransitionEnd"].forEach(function(a) {
    e[n](a, r);
  });
}
function sb(e, t) {
  for (var r = t; r; ) {
    var n;
    if (e.contains(r))
      return !0;
    r = r.getRootNode == null || (n = r.getRootNode()) == null ? void 0 : n.host;
  }
  return !1;
}
var dr = {
  isTouch: !1
}, lb = 0;
function xQ() {
  dr.isTouch || (dr.isTouch = !0, window.performance && document.addEventListener("mousemove", J2));
}
function J2() {
  var e = performance.now();
  e - lb < 20 && (dr.isTouch = !1, document.removeEventListener("mousemove", J2)), lb = e;
}
function FQ() {
  var e = document.activeElement;
  if (jQ(e)) {
    var t = e._tippy;
    e.blur && !t.state.isVisible && e.blur();
  }
}
function LQ() {
  document.addEventListener("touchstart", xQ, xr), window.addEventListener("blur", FQ);
}
var BQ = typeof window < "u" && typeof document < "u", zQ = BQ ? (
  // @ts-ignore
  !!window.msCrypto
) : !1, VQ = {
  animateFill: !1,
  followCursor: !1,
  inlinePositioning: !1,
  sticky: !1
}, qQ = {
  allowHTML: !1,
  animation: "fade",
  arrow: !0,
  content: "",
  inertia: !1,
  maxWidth: 350,
  role: "tooltip",
  theme: "",
  zIndex: 9999
}, qt = Object.assign({
  appendTo: W2,
  aria: {
    content: "auto",
    expanded: "auto"
  },
  delay: 0,
  duration: [300, 250],
  getReferenceClientRect: null,
  hideOnClick: !0,
  ignoreAttributes: !1,
  interactive: !1,
  interactiveBorder: 2,
  interactiveDebounce: 0,
  moveTransition: "",
  offset: [0, 10],
  onAfterUpdate: function() {
  },
  onBeforeUpdate: function() {
  },
  onCreate: function() {
  },
  onDestroy: function() {
  },
  onHidden: function() {
  },
  onHide: function() {
  },
  onMount: function() {
  },
  onShow: function() {
  },
  onShown: function() {
  },
  onTrigger: function() {
  },
  onUntrigger: function() {
  },
  onClickOutside: function() {
  },
  placement: "top",
  plugins: [],
  popperOptions: {},
  render: null,
  showOnCreate: !1,
  touch: !0,
  trigger: "mouseenter focus",
  triggerTarget: null
}, VQ, qQ), UQ = Object.keys(qt), HQ = function(t) {
  var r = Object.keys(t);
  r.forEach(function(n) {
    qt[n] = t[n];
  });
};
function Y2(e) {
  var t = e.plugins || [], r = t.reduce(function(n, a) {
    var i = a.name, o = a.defaultValue;
    if (i) {
      var s;
      n[i] = e[i] !== void 0 ? e[i] : (s = qt[i]) != null ? s : o;
    }
    return n;
  }, {});
  return Object.assign({}, e, r);
}
function GQ(e, t) {
  var r = t ? Object.keys(Y2(Object.assign({}, qt, {
    plugins: t
  }))) : UQ, n = r.reduce(function(a, i) {
    var o = (e.getAttribute("data-tippy-" + i) || "").trim();
    if (!o)
      return a;
    if (i === "content")
      a[i] = o;
    else
      try {
        a[i] = JSON.parse(o);
      } catch {
        a[i] = o;
      }
    return a;
  }, {});
  return n;
}
function ub(e, t) {
  var r = Object.assign({}, t, {
    content: K2(t.content, [e])
  }, t.ignoreAttributes ? {} : GQ(e, t.plugins));
  return r.aria = Object.assign({}, qt.aria, r.aria), r.aria = {
    expanded: r.aria.expanded === "auto" ? t.interactive : r.aria.expanded,
    content: r.aria.content === "auto" ? t.interactive ? null : "describedby" : r.aria.content
  }, r;
}
var WQ = function() {
  return "innerHTML";
};
function qf(e, t) {
  e[WQ()] = t;
}
function fb(e) {
  var t = oi();
  return e === !0 ? t.className = H2 : (t.className = G2, _l(e) ? t.appendChild(e) : qf(t, e)), t;
}
function cb(e, t) {
  _l(t.content) ? (qf(e, ""), e.appendChild(t.content)) : typeof t.content != "function" && (t.allowHTML ? qf(e, t.content) : e.textContent = t.content);
}
function Uf(e) {
  var t = e.firstElementChild, r = Os(t.children);
  return {
    box: t,
    content: r.find(function(n) {
      return n.classList.contains(U2);
    }),
    arrow: r.find(function(n) {
      return n.classList.contains(H2) || n.classList.contains(G2);
    }),
    backdrop: r.find(function(n) {
      return n.classList.contains($Q);
    })
  };
}
function X2(e) {
  var t = oi(), r = oi();
  r.className = EQ, r.setAttribute("data-state", "hidden"), r.setAttribute("tabindex", "-1");
  var n = oi();
  n.className = U2, n.setAttribute("data-state", "hidden"), cb(n, e.props), t.appendChild(r), r.appendChild(n), a(e.props, e.props);
  function a(i, o) {
    var s = Uf(t), l = s.box, u = s.content, f = s.arrow;
    o.theme ? l.setAttribute("data-theme", o.theme) : l.removeAttribute("data-theme"), typeof o.animation == "string" ? l.setAttribute("data-animation", o.animation) : l.removeAttribute("data-animation"), o.inertia ? l.setAttribute("data-inertia", "") : l.removeAttribute("data-inertia"), l.style.maxWidth = typeof o.maxWidth == "number" ? o.maxWidth + "px" : o.maxWidth, o.role ? l.setAttribute("role", o.role) : l.removeAttribute("role"), (i.content !== o.content || i.allowHTML !== o.allowHTML) && cb(u, e.props), o.arrow ? f ? i.arrow !== o.arrow && (l.removeChild(f), l.appendChild(fb(o.arrow))) : l.appendChild(fb(o.arrow)) : f && l.removeChild(f);
  }
  return {
    popper: t,
    onUpdate: a
  };
}
X2.$$tippy = !0;
var KQ = 1, Do = [], zu = [];
function JQ(e, t) {
  var r = ub(e, Object.assign({}, qt, Y2(ib(t)))), n, a, i, o = !1, s = !1, l = !1, u = !1, f, d, h, v = [], m = nb(ce, r.interactiveDebounce), g, _ = KQ++, b = null, S = AQ(r.plugins), k = {
    // Is the instance currently enabled?
    isEnabled: !0,
    // Is the tippy currently showing and not transitioning out?
    isVisible: !1,
    // Has the instance been destroyed?
    isDestroyed: !1,
    // Is the tippy currently mounted to the DOM?
    isMounted: !1,
    // Has the tippy finished transitioning in?
    isShown: !1
  }, w = {
    // properties
    id: _,
    reference: e,
    popper: oi(),
    popperInstance: b,
    props: r,
    state: k,
    plugins: S,
    // methods
    clearDelayTimeouts: je,
    setProps: le,
    setContent: we,
    show: Ce,
    hide: Se,
    hideWithInteractivity: Me,
    enable: et,
    disable: pt,
    unmount: $e,
    destroy: W
  };
  if (!r.render)
    return w;
  var C = r.render(w), E = C.popper, A = C.onUpdate;
  E.setAttribute("data-tippy-root", ""), E.id = "tippy-" + w.id, w.popper = E, e._tippy = w, E._tippy = w;
  var D = S.map(function(H) {
    return H.fn(w);
  }), F = e.hasAttribute("aria-expanded");
  return ue(), P(), Y(), ae("onCreate", [w]), r.showOnCreate && Qe(), E.addEventListener("mouseenter", function() {
    w.props.interactive && w.state.isVisible && w.clearDelayTimeouts();
  }), E.addEventListener("mouseleave", function() {
    w.props.interactive && w.props.trigger.indexOf("mouseenter") >= 0 && re().addEventListener("mousemove", m);
  }), w;
  function R() {
    var H = w.props.touch;
    return Array.isArray(H) ? H : [H, 0];
  }
  function $() {
    return R()[0] === "hold";
  }
  function j() {
    var H;
    return !!((H = w.props.render) != null && H.$$tippy);
  }
  function V() {
    return g || e;
  }
  function re() {
    var H = V().parentNode;
    return H ? NQ(H) : document;
  }
  function q() {
    return Uf(E);
  }
  function ee(H) {
    return w.state.isMounted && !w.state.isVisible || dr.isTouch || f && f.type === "focus" ? 0 : Fu(w.props.delay, H ? 0 : 1, qt.delay);
  }
  function Y(H) {
    H === void 0 && (H = !1), E.style.pointerEvents = w.props.interactive && !H ? "" : "none", E.style.zIndex = "" + w.props.zIndex;
  }
  function ae(H, pe, U) {
    if (U === void 0 && (U = !0), D.forEach(function(Te) {
      Te[H] && Te[H].apply(Te, pe);
    }), U) {
      var Ae;
      (Ae = w.props)[H].apply(Ae, pe);
    }
  }
  function M() {
    var H = w.props.aria;
    if (H.content) {
      var pe = "aria-" + H.content, U = E.id, Ae = pn(w.props.triggerTarget || e);
      Ae.forEach(function(Te) {
        var Ke = Te.getAttribute(pe);
        if (w.state.isVisible)
          Te.setAttribute(pe, Ke ? Ke + " " + U : U);
        else {
          var ut = Ke && Ke.replace(U, "").trim();
          ut ? Te.setAttribute(pe, ut) : Te.removeAttribute(pe);
        }
      });
    }
  }
  function P() {
    if (!(F || !w.props.aria.expanded)) {
      var H = pn(w.props.triggerTarget || e);
      H.forEach(function(pe) {
        w.props.interactive ? pe.setAttribute("aria-expanded", w.state.isVisible && pe === V() ? "true" : "false") : pe.removeAttribute("aria-expanded");
      });
    }
  }
  function I() {
    re().removeEventListener("mousemove", m), Do = Do.filter(function(H) {
      return H !== m;
    });
  }
  function J(H) {
    if (!(dr.isTouch && (l || H.type === "mousedown"))) {
      var pe = H.composedPath && H.composedPath()[0] || H.target;
      if (!(w.props.interactive && sb(E, pe))) {
        if (pn(w.props.triggerTarget || e).some(function(U) {
          return sb(U, pe);
        })) {
          if (dr.isTouch || w.state.isVisible && w.props.trigger.indexOf("click") >= 0)
            return;
        } else
          ae("onClickOutside", [w, H]);
        w.props.hideOnClick === !0 && (w.clearDelayTimeouts(), w.hide(), s = !0, setTimeout(function() {
          s = !1;
        }), w.state.isMounted || te());
      }
    }
  }
  function G() {
    l = !0;
  }
  function z() {
    l = !1;
  }
  function K() {
    var H = re();
    H.addEventListener("mousedown", J, !0), H.addEventListener("touchend", J, xr), H.addEventListener("touchstart", z, xr), H.addEventListener("touchmove", G, xr);
  }
  function te() {
    var H = re();
    H.removeEventListener("mousedown", J, !0), H.removeEventListener("touchend", J, xr), H.removeEventListener("touchstart", z, xr), H.removeEventListener("touchmove", G, xr);
  }
  function de(H, pe) {
    X(H, function() {
      !w.state.isVisible && E.parentNode && E.parentNode.contains(E) && pe();
    });
  }
  function oe(H, pe) {
    X(H, pe);
  }
  function X(H, pe) {
    var U = q().box;
    function Ae(Te) {
      Te.target === U && (Bu(U, "remove", Ae), pe());
    }
    if (H === 0)
      return pe();
    Bu(U, "remove", d), Bu(U, "add", Ae), d = Ae;
  }
  function B(H, pe, U) {
    U === void 0 && (U = !1);
    var Ae = pn(w.props.triggerTarget || e);
    Ae.forEach(function(Te) {
      Te.addEventListener(H, pe, U), v.push({
        node: Te,
        eventType: H,
        handler: pe,
        options: U
      });
    });
  }
  function ue() {
    $() && (B("touchstart", N, {
      passive: !0
    }), B("touchend", ye, {
      passive: !0
    })), CQ(w.props.trigger).forEach(function(H) {
      if (H !== "manual")
        switch (B(H, N), H) {
          case "mouseenter":
            B("mouseleave", ye);
            break;
          case "focus":
            B(zQ ? "focusout" : "blur", me);
            break;
          case "focusin":
            B("focusout", me);
            break;
        }
    });
  }
  function se() {
    v.forEach(function(H) {
      var pe = H.node, U = H.eventType, Ae = H.handler, Te = H.options;
      pe.removeEventListener(U, Ae, Te);
    }), v = [];
  }
  function N(H) {
    var pe, U = !1;
    if (!(!w.state.isEnabled || ze(H) || s)) {
      var Ae = ((pe = f) == null ? void 0 : pe.type) === "focus";
      f = H, g = H.currentTarget, P(), !w.state.isVisible && RQ(H) && Do.forEach(function(Te) {
        return Te(H);
      }), H.type === "click" && (w.props.trigger.indexOf("mouseenter") < 0 || o) && w.props.hideOnClick !== !1 && w.state.isVisible ? U = !0 : Qe(H), H.type === "click" && (o = !U), U && !Ae && Re(H);
    }
  }
  function ce(H) {
    var pe = H.target, U = V().contains(pe) || E.contains(pe);
    if (!(H.type === "mousemove" && U)) {
      var Ae = Ze().concat(E).map(function(Te) {
        var Ke, ut = Te._tippy, Rr = (Ke = ut.popperInstance) == null ? void 0 : Ke.state;
        return Rr ? {
          popperRect: Te.getBoundingClientRect(),
          popperState: Rr,
          props: r
        } : null;
      }).filter(Boolean);
      DQ(Ae, H) && (I(), Re(H));
    }
  }
  function ye(H) {
    var pe = ze(H) || w.props.trigger.indexOf("click") >= 0 && o;
    if (!pe) {
      if (w.props.interactive) {
        w.hideWithInteractivity(H);
        return;
      }
      Re(H);
    }
  }
  function me(H) {
    w.props.trigger.indexOf("focusin") < 0 && H.target !== V() || w.props.interactive && H.relatedTarget && E.contains(H.relatedTarget) || Re(H);
  }
  function ze(H) {
    return dr.isTouch ? $() !== H.type.indexOf("touch") >= 0 : !1;
  }
  function Oe() {
    He();
    var H = w.props, pe = H.popperOptions, U = H.placement, Ae = H.offset, Te = H.getReferenceClientRect, Ke = H.moveTransition, ut = j() ? Uf(E).arrow : null, Rr = Te ? {
      getBoundingClientRect: Te,
      contextElement: Te.contextElement || V()
    } : e, Jd = {
      name: "$$tippy",
      enabled: !0,
      phase: "beforeWrite",
      requires: ["computeStyles"],
      fn: function(no) {
        var Mn = no.state;
        if (j()) {
          var oS = q(), wl = oS.box;
          ["placement", "reference-hidden", "escaped"].forEach(function(ao) {
            ao === "placement" ? wl.setAttribute("data-placement", Mn.placement) : Mn.attributes.popper["data-popper-" + ao] ? wl.setAttribute("data-" + ao, "") : wl.removeAttribute("data-" + ao);
          }), Mn.attributes.popper = {};
        }
      }
    }, nn = [{
      name: "offset",
      options: {
        offset: Ae
      }
    }, {
      name: "preventOverflow",
      options: {
        padding: {
          top: 2,
          bottom: 2,
          left: 5,
          right: 5
        }
      }
    }, {
      name: "flip",
      options: {
        padding: 5
      }
    }, {
      name: "computeStyles",
      options: {
        adaptive: !Ke
      }
    }, Jd];
    j() && ut && nn.push({
      name: "arrow",
      options: {
        element: ut,
        padding: 3
      }
    }), nn.push.apply(nn, (pe == null ? void 0 : pe.modifiers) || []), w.popperInstance = kQ(Rr, E, Object.assign({}, pe, {
      placement: U,
      onFirstUpdate: h,
      modifiers: nn
    }));
  }
  function He() {
    w.popperInstance && (w.popperInstance.destroy(), w.popperInstance = null);
  }
  function ke() {
    var H = w.props.appendTo, pe, U = V();
    w.props.interactive && H === W2 || H === "parent" ? pe = U.parentNode : pe = K2(H, [U]), pe.contains(E) || pe.appendChild(E), w.state.isMounted = !0, Oe();
  }
  function Ze() {
    return Os(E.querySelectorAll("[data-tippy-root]"));
  }
  function Qe(H) {
    w.clearDelayTimeouts(), H && ae("onTrigger", [w, H]), K();
    var pe = ee(!0), U = R(), Ae = U[0], Te = U[1];
    dr.isTouch && Ae === "hold" && Te && (pe = Te), pe ? n = setTimeout(function() {
      w.show();
    }, pe) : w.show();
  }
  function Re(H) {
    if (w.clearDelayTimeouts(), ae("onUntrigger", [w, H]), !w.state.isVisible) {
      te();
      return;
    }
    if (!(w.props.trigger.indexOf("mouseenter") >= 0 && w.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(H.type) >= 0 && o)) {
      var pe = ee(!1);
      pe ? a = setTimeout(function() {
        w.state.isVisible && w.hide();
      }, pe) : i = requestAnimationFrame(function() {
        w.hide();
      });
    }
  }
  function et() {
    w.state.isEnabled = !0;
  }
  function pt() {
    w.hide(), w.state.isEnabled = !1;
  }
  function je() {
    clearTimeout(n), clearTimeout(a), cancelAnimationFrame(i);
  }
  function le(H) {
    if (!w.state.isDestroyed) {
      ae("onBeforeUpdate", [w, H]), se();
      var pe = w.props, U = ub(e, Object.assign({}, pe, ib(H), {
        ignoreAttributes: !0
      }));
      w.props = U, ue(), pe.interactiveDebounce !== U.interactiveDebounce && (I(), m = nb(ce, U.interactiveDebounce)), pe.triggerTarget && !U.triggerTarget ? pn(pe.triggerTarget).forEach(function(Ae) {
        Ae.removeAttribute("aria-expanded");
      }) : U.triggerTarget && e.removeAttribute("aria-expanded"), P(), Y(), A && A(pe, U), w.popperInstance && (Oe(), Ze().forEach(function(Ae) {
        requestAnimationFrame(Ae._tippy.popperInstance.forceUpdate);
      })), ae("onAfterUpdate", [w, H]);
    }
  }
  function we(H) {
    w.setProps({
      content: H
    });
  }
  function Ce() {
    var H = w.state.isVisible, pe = w.state.isDestroyed, U = !w.state.isEnabled, Ae = dr.isTouch && !w.props.touch, Te = Fu(w.props.duration, 0, qt.duration);
    if (!(H || pe || U || Ae) && !V().hasAttribute("disabled") && (ae("onShow", [w], !1), w.props.onShow(w) !== !1)) {
      if (w.state.isVisible = !0, j() && (E.style.visibility = "visible"), Y(), K(), w.state.isMounted || (E.style.transition = "none"), j()) {
        var Ke = q(), ut = Ke.box, Rr = Ke.content;
        Lu([ut, Rr], 0);
      }
      h = function() {
        var nn;
        if (!(!w.state.isVisible || u)) {
          if (u = !0, E.offsetHeight, E.style.transition = w.props.moveTransition, j() && w.props.animation) {
            var yl = q(), no = yl.box, Mn = yl.content;
            Lu([no, Mn], Te), ob([no, Mn], "visible");
          }
          M(), P(), ab(zu, w), (nn = w.popperInstance) == null || nn.forceUpdate(), ae("onMount", [w]), w.props.animation && j() && oe(Te, function() {
            w.state.isShown = !0, ae("onShown", [w]);
          });
        }
      }, ke();
    }
  }
  function Se() {
    var H = !w.state.isVisible, pe = w.state.isDestroyed, U = !w.state.isEnabled, Ae = Fu(w.props.duration, 1, qt.duration);
    if (!(H || pe || U) && (ae("onHide", [w], !1), w.props.onHide(w) !== !1)) {
      if (w.state.isVisible = !1, w.state.isShown = !1, u = !1, o = !1, j() && (E.style.visibility = "hidden"), I(), te(), Y(!0), j()) {
        var Te = q(), Ke = Te.box, ut = Te.content;
        w.props.animation && (Lu([Ke, ut], Ae), ob([Ke, ut], "hidden"));
      }
      M(), P(), w.props.animation ? j() && de(Ae, w.unmount) : w.unmount();
    }
  }
  function Me(H) {
    re().addEventListener("mousemove", m), ab(Do, m), m(H);
  }
  function $e() {
    w.state.isVisible && w.hide(), w.state.isMounted && (He(), Ze().forEach(function(H) {
      H._tippy.unmount();
    }), E.parentNode && E.parentNode.removeChild(E), zu = zu.filter(function(H) {
      return H !== w;
    }), w.state.isMounted = !1, ae("onHidden", [w]));
  }
  function W() {
    w.state.isDestroyed || (w.clearDelayTimeouts(), w.unmount(), se(), delete e._tippy, w.state.isDestroyed = !0, ae("onDestroy", [w]));
  }
}
function ga(e, t) {
  t === void 0 && (t = {});
  var r = qt.plugins.concat(t.plugins || []);
  LQ();
  var n = Object.assign({}, t, {
    plugins: r
  }), a = MQ(e), i = a.reduce(function(o, s) {
    var l = s && JQ(s, n);
    return l && o.push(l), o;
  }, []);
  return _l(e) ? i[0] : i;
}
ga.defaultProps = qt;
ga.setDefaultProps = HQ;
ga.currentInput = dr;
Object.assign({}, D2, {
  effect: function(t) {
    var r = t.state, n = {
      popper: {
        position: r.options.strategy,
        left: "0",
        top: "0",
        margin: "0"
      },
      arrow: {
        position: "absolute"
      },
      reference: {}
    };
    Object.assign(r.elements.popper.style, n.popper), r.styles = n, r.elements.arrow && Object.assign(r.elements.arrow.style, n.arrow);
  }
});
var YQ = {
  mouseover: "mouseenter",
  focusin: "focus",
  click: "click"
};
function Ma(e, t) {
  var r = [], n = [], a = !1, i = t.target, o = TQ(t, ["target"]), s = Object.assign({}, o, {
    trigger: "manual",
    touch: !1
  }), l = Object.assign({
    touch: qt.touch
  }, o, {
    showOnCreate: !0
  }), u = ga(e, s), f = pn(u);
  function d(_) {
    if (!(!_.target || a)) {
      var b = _.target.closest(i);
      if (b) {
        var S = b.getAttribute("data-tippy-trigger") || t.trigger || qt.trigger;
        if (!b._tippy && !(_.type === "touchstart" && typeof l.touch == "boolean") && !(_.type !== "touchstart" && S.indexOf(YQ[_.type]) < 0)) {
          var k = ga(b, l);
          k && (n = n.concat(k));
        }
      }
    }
  }
  function h(_, b, S, k) {
    k === void 0 && (k = !1), _.addEventListener(b, S, k), r.push({
      node: _,
      eventType: b,
      handler: S,
      options: k
    });
  }
  function v(_) {
    var b = _.reference;
    h(b, "touchstart", d, xr), h(b, "mouseover", d), h(b, "focusin", d), h(b, "click", d);
  }
  function m() {
    r.forEach(function(_) {
      var b = _.node, S = _.eventType, k = _.handler, w = _.options;
      b.removeEventListener(S, k, w);
    }), r = [];
  }
  function g(_) {
    var b = _.destroy, S = _.enable, k = _.disable;
    _.destroy = function(w) {
      w === void 0 && (w = !0), w && n.forEach(function(C) {
        C.destroy();
      }), n = [], m(), b();
    }, _.enable = function() {
      S(), n.forEach(function(w) {
        return w.enable();
      }), a = !1;
    }, _.disable = function() {
      k(), n.forEach(function(w) {
        return w.disable();
      }), a = !0;
    }, v(_);
  }
  return f.forEach(g), u;
}
ga.setDefaultProps({
  render: X2
});
function XQ(e) {
  rt(e, "svelte-1tqh76q", "svelte-virtual-list-viewport.svelte-1tqh76q{position:relative;overflow-y:auto;-webkit-overflow-scrolling:touch;display:block}svelte-virtual-list-contents.svelte-1tqh76q,svelte-virtual-list-row.svelte-1tqh76q{display:block}svelte-virtual-list-row.svelte-1tqh76q{overflow:hidden}");
}
function db(e, t, r) {
  const n = e.slice();
  return n[23] = t[r], n;
}
const QQ = (e) => ({ item: e & /*visible*/
16 }), pb = (e) => ({ item: (
  /*row*/
  e[23].data
) });
function ZQ(e) {
  let t;
  return {
    c() {
      t = Q("Missing template");
    },
    m(r, n) {
      L(r, t, n);
    },
    d(r) {
      r && x(t);
    }
  };
}
function vb(e, t) {
  let r, n, a;
  const i = (
    /*#slots*/
    t[14].default
  ), o = Qf(
    i,
    t,
    /*$$scope*/
    t[13],
    pb
  ), s = o || ZQ();
  return {
    key: e,
    first: null,
    c() {
      r = y("svelte-virtual-list-row"), s && s.c(), n = T(), Hu(r, "class", "svelte-1tqh76q"), this.first = r;
    },
    m(l, u) {
      L(l, r, u), s && s.m(r, null), p(r, n), a = !0;
    },
    p(l, u) {
      t = l, o && o.p && (!a || u & /*$$scope, visible*/
      8208) && ec(
        o,
        i,
        t,
        /*$$scope*/
        t[13],
        a ? Zf(
          i,
          /*$$scope*/
          t[13],
          u,
          QQ
        ) : tc(
          /*$$scope*/
          t[13]
        ),
        pb
      );
    },
    i(l) {
      a || (ne(s, l), a = !0);
    },
    o(l) {
      fe(s, l), a = !1;
    },
    d(l) {
      l && x(r), s && s.d(l);
    }
  };
}
function eZ(e) {
  let t, r, n = [], a = /* @__PURE__ */ new Map(), i, o, s, l, u = (
    /*visible*/
    e[4]
  );
  const f = (d) => /*row*/
  d[23].index;
  for (let d = 0; d < u.length; d += 1) {
    let h = db(e, u, d), v = f(h);
    a.set(v, n[d] = vb(v, h));
  }
  return {
    c() {
      t = y("svelte-virtual-list-viewport"), r = y("svelte-virtual-list-contents");
      for (let d = 0; d < n.length; d += 1)
        n[d].c();
      O(
        r,
        "padding-top",
        /*top*/
        e[5] + "px"
      ), O(
        r,
        "padding-bottom",
        /*bottom*/
        e[6] + "px"
      ), Hu(r, "class", "svelte-1tqh76q"), O(
        t,
        "height",
        /*height*/
        e[0]
      ), Hu(t, "class", "svelte-1tqh76q"), St(() => /*svelte_virtual_list_viewport_elementresize_handler*/
      e[17].call(t));
    },
    m(d, h) {
      L(d, t, h), p(t, r);
      for (let v = 0; v < n.length; v += 1)
        n[v].m(r, null);
      e[15](r), e[16](t), i = cS(
        t,
        /*svelte_virtual_list_viewport_elementresize_handler*/
        e[17].bind(t)
      ), o = !0, s || (l = Z(
        t,
        "scroll",
        /*handle_scroll*/
        e[7]
      ), s = !0);
    },
    p(d, [h]) {
      h & /*$$scope, visible*/
      8208 && (u = /*visible*/
      d[4], Je(), n = SS(n, h, f, 1, d, u, a, r, wS, vb, null, db), Ye()), (!o || h & /*top*/
      32) && O(
        r,
        "padding-top",
        /*top*/
        d[5] + "px"
      ), (!o || h & /*bottom*/
      64) && O(
        r,
        "padding-bottom",
        /*bottom*/
        d[6] + "px"
      ), (!o || h & /*height*/
      1) && O(
        t,
        "height",
        /*height*/
        d[0]
      );
    },
    i(d) {
      if (!o) {
        for (let h = 0; h < u.length; h += 1)
          ne(n[h]);
        o = !0;
      }
    },
    o(d) {
      for (let h = 0; h < n.length; h += 1)
        fe(n[h]);
      o = !1;
    },
    d(d) {
      d && x(t);
      for (let h = 0; h < n.length; h += 1)
        n[h].d();
      e[15](null), e[16](null), i(), s = !1, l();
    }
  };
}
function tZ(e, t, r) {
  let { $$slots: n = {}, $$scope: a } = t, { items: i } = t, { height: o = "100%" } = t, { itemHeight: s = void 0 } = t, { start: l = 0 } = t, { end: u = 0 } = t, f = [], d, h, v, m = 0, g, _, b = 0, S = 0, k;
  async function w(F, R, $) {
    const { scrollTop: j } = h;
    await Sl();
    let V = b - j, re = l;
    for (; V < R && re < F.length; ) {
      let ee = d[re - l];
      ee || (r(9, u = re + 1), await Sl(), ee = d[re - l]);
      const Y = f[re] = $ || ee.offsetHeight;
      V += Y, re += 1;
    }
    r(9, u = re);
    const q = F.length - u;
    k = (b + V) / u, r(6, S = q * k), f.length = F.length;
  }
  async function C() {
    const { scrollTop: F } = h, R = l;
    for (let re = 0; re < d.length; re += 1)
      f[l + re] = s || d[re].offsetHeight;
    let $ = 0, j = 0;
    for (; $ < i.length; ) {
      const re = f[$] || k;
      if (j + re > F) {
        r(8, l = $), r(5, b = j);
        break;
      }
      j += re, $ += 1;
    }
    for (; $ < i.length && (j += f[$] || k, $ += 1, !(j > F + m)); )
      ;
    r(9, u = $);
    const V = i.length - u;
    for (k = j / u; $ < i.length; )
      f[$++] = k;
    if (r(6, S = V * k), l < R) {
      await Sl();
      let re = 0, q = 0;
      for (let Y = l; Y < R; Y += 1)
        d[Y - l] && (re += f[Y], q += s || d[Y - l].offsetHeight);
      const ee = q - re;
      h.scrollTo(0, F + ee);
    }
  }
  qr(() => {
    d = v.getElementsByTagName("svelte-virtual-list-row"), r(12, _ = !0);
  });
  function E(F) {
    lt[F ? "unshift" : "push"](() => {
      v = F, r(3, v);
    });
  }
  function A(F) {
    lt[F ? "unshift" : "push"](() => {
      h = F, r(2, h);
    });
  }
  function D() {
    m = this.offsetHeight, r(1, m);
  }
  return e.$$set = (F) => {
    "items" in F && r(10, i = F.items), "height" in F && r(0, o = F.height), "itemHeight" in F && r(11, s = F.itemHeight), "start" in F && r(8, l = F.start), "end" in F && r(9, u = F.end), "$$scope" in F && r(13, a = F.$$scope);
  }, e.$$.update = () => {
    e.$$.dirty & /*items, start, end*/
    1792 && r(4, g = i.slice(l, u).map((F, R) => ({ index: R + l, data: F }))), e.$$.dirty & /*mounted, items, viewport_height, itemHeight*/
    7170 && _ && w(i, m, s);
  }, [
    o,
    m,
    h,
    v,
    g,
    b,
    S,
    C,
    l,
    u,
    i,
    s,
    _,
    a,
    n,
    E,
    A,
    D
  ];
}
class rZ extends Ue {
  constructor(t) {
    super(), qe(
      this,
      t,
      tZ,
      eZ,
      Be,
      {
        items: 10,
        height: 0,
        itemHeight: 11,
        start: 8,
        end: 9
      },
      XQ
    );
  }
}
function nZ(e) {
  rt(e, "svelte-rosycj", "div.track.chromosome-minimap.svelte-rosycj{height:30px}.chromosome-fragment.svelte-rosycj{width:400px;height:14px;background:rgb(240,240,240);border:1px solid rgb(150,150,150);border-radius:7px;position:absolute;top:0px;cursor:pointer}#pos-indicator.svelte-rosycj{position:absolute;top:0px;height:14px;width:3px;background:black}#pos-coordinates.svelte-rosycj{position:absolute;left:420px;top:0px;font-size:12px;color:rgb(80,80,80)}");
}
function aZ(e) {
  let t;
  return {
    c() {
      t = y("div"), c(t, "class", "chromosome-fragment svelte-rosycj"), O(t, "width", "400px"), O(t, "left", "0px:");
    },
    m(r, n) {
      L(r, t, n);
    },
    p: he,
    d(r) {
      r && x(t);
    }
  };
}
function iZ(e) {
  let t, r, n;
  return {
    c() {
      t = y("div"), r = T(), n = y("div"), c(t, "class", "chromosome-fragment svelte-rosycj"), O(
        t,
        "width",
        /*widthLeftFragment*/
        e[5] + "px"
      ), O(t, "left", "0px:"), c(n, "class", "chromosome-fragment svelte-rosycj"), O(
        n,
        "width",
        /*widthRightFragment*/
        e[6] + "px"
      ), O(
        n,
        "left",
        /*widthLeftFragment*/
        e[5] + "px"
      );
    },
    m(a, i) {
      L(a, t, i), L(a, r, i), L(a, n, i);
    },
    p(a, i) {
      i & /*widthLeftFragment*/
      32 && O(
        t,
        "width",
        /*widthLeftFragment*/
        a[5] + "px"
      ), i & /*widthRightFragment*/
      64 && O(
        n,
        "width",
        /*widthRightFragment*/
        a[6] + "px"
      ), i & /*widthLeftFragment*/
      32 && O(
        n,
        "left",
        /*widthLeftFragment*/
        a[5] + "px"
      );
    },
    d(a) {
      a && x(t), a && x(r), a && x(n);
    }
  };
}
function oZ(e) {
  let t, r, n, a, i, o, s, l, u, f, d = (
    /*data*/
    e[0].variants_coordinates.length + ""
  ), h, v, m = Wn(
    /*currChromEnd*/
    e[3]
  ) + "", g, _, b = Wn(
    /*data*/
    e[0].coordinate_first
  ) + "", S, k, w = Wn(
    /*data*/
    e[0].coordinate_last
  ) + "", C, E, A;
  function D($, j) {
    return (
      /*currChromCentromerePos*/
      $[4] > 0 ? iZ : aZ
    );
  }
  let F = D(e), R = F(e);
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "Position on chromosome", n = T(), a = y("div"), i = y("div"), R.c(), o = T(), s = y("div"), l = T(), u = y("div"), f = Q("showing "), h = Q(d), v = Q(" of "), g = Q(m), _ = Q(" variants in the range "), S = Q(b), k = Q(" - "), C = Q(w), c(r, "class", "label"), c(s, "id", "pos-indicator"), O(
        s,
        "left",
        /*posIndicatorLeft*/
        e[1] + "px"
      ), c(s, "class", "svelte-rosycj"), c(u, "id", "pos-coordinates"), c(u, "class", "svelte-rosycj"), O(i, "position", "relative"), O(i, "height", "18px"), O(
        a,
        "width",
        /*widthAllVariants*/
        e[2] + "px"
      ), c(t, "class", "track chromosome-minimap svelte-rosycj"), O(t, "width", "100%");
    },
    m($, j) {
      L($, t, j), p(t, r), p(t, n), p(t, a), p(a, i), R.m(i, null), p(i, o), p(i, s), p(i, l), p(i, u), p(u, f), p(u, h), p(u, v), p(u, g), p(u, _), p(u, S), p(u, k), p(u, C), E || (A = Z(
        i,
        "click",
        /*onClickMinimap*/
        e[7]
      ), E = !0);
    },
    p($, [j]) {
      F === (F = D($)) && R ? R.p($, j) : (R.d(1), R = F($), R && (R.c(), R.m(i, o))), j & /*posIndicatorLeft*/
      2 && O(
        s,
        "left",
        /*posIndicatorLeft*/
        $[1] + "px"
      ), j & /*data*/
      1 && d !== (d = /*data*/
      $[0].variants_coordinates.length + "") && _e(h, d), j & /*currChromEnd*/
      8 && m !== (m = Wn(
        /*currChromEnd*/
        $[3]
      ) + "") && _e(g, m), j & /*data*/
      1 && b !== (b = Wn(
        /*data*/
        $[0].coordinate_first
      ) + "") && _e(S, b), j & /*data*/
      1 && w !== (w = Wn(
        /*data*/
        $[0].coordinate_last
      ) + "") && _e(C, w), j & /*widthAllVariants*/
      4 && O(
        a,
        "width",
        /*widthAllVariants*/
        $[2] + "px"
      );
    },
    i: he,
    o: he,
    d($) {
      $ && x(t), R.d(), E = !1, A();
    }
  };
}
function Wn(e) {
  return parseInt(e).toLocaleString();
}
function sZ(e, t, r) {
  let { data: n } = t;
  const a = We("app");
  let { controller: i } = a.app(), o = 0, s = 5, l = i.getMetadata(), u = i.getCurrentWidthOfVariants(), f = l.chromosomesById[i.chromosome].start, d = l.chromosomesById[i.chromosome].end, h = l.chromosomesById[i.chromosome].centromere_position, v = h / d, m = Math.floor(200 * v), g = 400 - m;
  function _(b) {
    let S = b.currentTarget.getBoundingClientRect(), k = b.clientX - S.left;
    if (k >= 0 && k <= 400) {
      let w = 0, C = 400, E = f, A = d, D = Math.floor((k - w) * (A - E) / (C - w) + E);
      i.goToPosition(D);
    }
  }
  return e.$$set = (b) => {
    "data" in b && r(0, n = b.data);
  }, e.$$.update = () => {
    if (e.$$.dirty & /*currChromCentromerePos, currChromEnd, centromerePosFrac, widthLeftFragment, data, posIndicatorLeft, widthAllVariants, posIndicatorTrapezLeft*/
    831) {
      r(2, u = i.getCurrentWidthOfVariants()), f = l.chromosomesById[i.chromosome].start, r(3, d = l.chromosomesById[i.chromosome].end), r(4, h = l.chromosomesById[i.chromosome].centromere_position), r(9, v = h / d), r(5, m = Math.floor(400 * v)), r(6, g = 400 - m);
      let b = n.coordinate_first / d;
      r(1, o = Math.floor(b * 390) + 5), r(8, s = o + 2);
    }
  }, [
    n,
    o,
    u,
    d,
    h,
    m,
    g,
    _,
    s,
    v
  ];
}
class lZ extends Ue {
  constructor(t) {
    super(), qe(this, t, sZ, oZ, Be, { data: 0 }, nZ);
  }
}
function uZ(e) {
  rt(e, "svelte-1xcqmsg", ".gridline.svelte-1xcqmsg{stroke:rgb(100,100,100);stroke-width:1}.small.svelte-1xcqmsg{font-family:sans-serif;font-size:10px}");
}
function hb(e, t, r) {
  const n = e.slice();
  return n[7] = t[r], n;
}
function gb(e) {
  let t, r = (
    /*position*/
    e[7].toLocaleString() + ""
  ), n, a, i, o, s;
  return {
    c() {
      t = Fe("text"), n = Q(r), i = Fe("line"), c(t, "text-anchor", "middle"), c(t, "x", a = /*position*/
      (e[7] - /*data*/
      e[0].coordinate_first) / /*maxmin*/
      e[2] * /*widthAllVariants*/
      (e[1] - 5)), c(t, "y", "10"), c(t, "class", "small svelte-1xcqmsg"), c(i, "class", "gridline svelte-1xcqmsg"), c(i, "stroke-dasharray", "1, 4"), c(i, "x1", o = /*position*/
      (e[7] - /*data*/
      e[0].coordinate_first) / /*maxmin*/
      e[2] * /*widthAllVariants*/
      (e[1] - 5)), c(i, "y1", "12"), c(i, "x2", s = /*position*/
      (e[7] - /*data*/
      e[0].coordinate_first) / /*maxmin*/
      e[2] * /*widthAllVariants*/
      (e[1] - 5)), c(i, "y2", "45"), c(i, "stroke-linecap", "butt");
    },
    m(l, u) {
      L(l, t, u), p(t, n), L(l, i, u);
    },
    p(l, u) {
      u & /*gridPositionsY*/
      8 && r !== (r = /*position*/
      l[7].toLocaleString() + "") && _e(n, r), u & /*gridPositionsY, data, maxmin, widthAllVariants*/
      15 && a !== (a = /*position*/
      (l[7] - /*data*/
      l[0].coordinate_first) / /*maxmin*/
      l[2] * /*widthAllVariants*/
      (l[1] - 5)) && c(t, "x", a), u & /*gridPositionsY, data, maxmin, widthAllVariants*/
      15 && o !== (o = /*position*/
      (l[7] - /*data*/
      l[0].coordinate_first) / /*maxmin*/
      l[2] * /*widthAllVariants*/
      (l[1] - 5)) && c(i, "x1", o), u & /*gridPositionsY, data, maxmin, widthAllVariants*/
      15 && s !== (s = /*position*/
      (l[7] - /*data*/
      l[0].coordinate_first) / /*maxmin*/
      l[2] * /*widthAllVariants*/
      (l[1] - 5)) && c(i, "x2", s);
    },
    d(l) {
      l && x(t), l && x(i);
    }
  };
}
function fZ(e) {
  let t, r = (
    /*gridPositionsY*/
    e[3]
  ), n = [];
  for (let a = 0; a < r.length; a += 1)
    n[a] = gb(hb(e, r, a));
  return {
    c() {
      t = Fe("g");
      for (let a = 0; a < n.length; a += 1)
        n[a].c();
    },
    m(a, i) {
      L(a, t, i);
      for (let o = 0; o < n.length; o += 1)
        n[o].m(t, null);
    },
    p(a, [i]) {
      if (i & /*gridPositionsY, data, maxmin, widthAllVariants*/
      15) {
        r = /*gridPositionsY*/
        a[3];
        let o;
        for (o = 0; o < r.length; o += 1) {
          const s = hb(a, r, o);
          n[o] ? n[o].p(s, i) : (n[o] = gb(s), n[o].c(), n[o].m(t, null));
        }
        for (; o < n.length; o += 1)
          n[o].d(1);
        n.length = r.length;
      }
    },
    i: he,
    o: he,
    d(a) {
      a && x(t), Ve(n, a);
    }
  };
}
function cZ(e, t, r) {
  let { data: n } = t, { controller: a } = We("app").app(), i, o, s, l = [];
  const u = (f, d) => {
    let h = Math.ceil(f.length / d);
    return f.slice(0, h * d).filter((v, m) => m % h == 0);
  };
  return e.$$set = (f) => {
    "data" in f && r(0, n = f.data);
  }, e.$$.update = () => {
    if (e.$$.dirty & /*data, maxmin, widthAllVariants, gridPositionsY, maxNumberOfLabels*/
    31) {
      r(1, i = a.getCurrentWidthOfVariants()), r(2, s = n.coordinate_last - n.coordinate_first);
      let d = 10 ** (Math.ceil(Math.log10(s + 1)) - 2);
      s < 1e3 && (d = 100);
      let h = Math.ceil(n.coordinate_first / d) * d, v = Math.floor(n.coordinate_last / d) * d;
      r(3, l = [...Array((v - h) / d + 1)].map((m, g) => h + d * g)), r(4, o = Math.floor(i / 100)), l.length > o && r(3, l = u(l, o));
    }
  }, [n, i, s, l, o];
}
class dZ extends Ue {
  constructor(t) {
    super(), qe(this, t, cZ, fZ, Be, { data: 0 }, uZ);
  }
}
function pZ(e) {
  rt(e, "svelte-5vonq5", "#cursorline.svelte-5vonq5{position:absolute;top:-1px;width:1px;height:81px;border-left:1.5px dotted rgb(50,50,50)}#cursorline-pos.svelte-5vonq5{position:absolute;top:4px;padding:3px;margin-left:1px;border:1px solid black;background:white;font-size:11px}#arrow.svelte-5vonq5{transform-origin:50% 50%}.highlight-snp{fill:#0000FF;stroke:#0000FF}div.track.genomic-region.svelte-5vonq5{height:80px}#svg-container.svelte-5vonq5{height:80px}#genomic-region.svelte-5vonq5{width:400px;height:14px;background:rgb(240,240,240);border:1px solid rgb(150,150,150);border-radius:7px;position:relative}.gene.svelte-5vonq5:hover{stroke:rgba(0,0,0,0.1);cursor:pointer}path.curve.svelte-5vonq5{stroke-width:1;stroke:rgb(215,215,215);stroke-linecap:round;fill:none}.highlight-variant-bezier{stroke:#0000FF !important;stroke-width:2 !important}");
}
function mb(e, t, r) {
  const n = e.slice();
  return n[24] = t[r], n[26] = r, n;
}
function bb(e, t, r) {
  const n = e.slice();
  return n[27] = t[r], n;
}
function _b(e, t, r) {
  const n = e.slice();
  return n[27] = t[r], n;
}
function yb(e, t, r) {
  const n = e.slice();
  return n[27] = t[r], n;
}
function wb(e, t, r) {
  const n = e.slice();
  return n[27] = t[r], n;
}
function Sb(e, t, r) {
  const n = e.slice();
  return n[27] = t[r], n;
}
function Ob(e, t, r) {
  const n = e.slice();
  return n[27] = t[r], n;
}
function kb(e, t, r) {
  const n = e.slice();
  return n[24] = t[r], n;
}
function Eb(e) {
  let t, r, n;
  return {
    c() {
      t = Fe("rect"), c(t, "id", r = "snp-" + /*position*/
      e[24]), c(t, "x", n = /*position*/
      (e[24] - /*data*/
      e[0].coordinate_first) / /*maxmin*/
      e[1] * /*widthAllVariants*/
      (e[3] - 5)), c(
        t,
        "y",
        /*yOffset*/
        e[10].variant
      ), c(t, "width", "5"), c(t, "height", "5"), c(t, "stroke", "rgb(140,140,140)"), c(t, "fill", "none"), c(t, "class", "svelte-5vonq5");
    },
    m(a, i) {
      L(a, t, i);
    },
    p(a, i) {
      i[0] & /*data*/
      1 && r !== (r = "snp-" + /*position*/
      a[24]) && c(t, "id", r), i[0] & /*data, maxmin, widthAllVariants*/
      11 && n !== (n = /*position*/
      (a[24] - /*data*/
      a[0].coordinate_first) / /*maxmin*/
      a[1] * /*widthAllVariants*/
      (a[3] - 5)) && c(t, "x", n);
    },
    d(a) {
      a && x(t);
    }
  };
}
function $b(e) {
  let t, r;
  return {
    c() {
      t = Fe("use"), w0(t, "xlink:href", "#arrow"), c(t, "x", r = /*feature*/
      e[27].x2 * /*widthAllVariants*/
      e[3] + 1), c(
        t,
        "y",
        /*yOffset*/
        e[10].plusStrand - 6
      );
    },
    m(n, a) {
      L(n, t, a);
    },
    p(n, a) {
      a[0] & /*features, widthAllVariants*/
      12 && r !== (r = /*feature*/
      n[27].x2 * /*widthAllVariants*/
      n[3] + 1) && c(t, "x", r);
    },
    d(n) {
      n && x(t);
    }
  };
}
function Tb(e) {
  let t, r, n, a, i, o, s = (
    /*feature*/
    e[27].x2 < 0.99 && $b(e)
  );
  return {
    c() {
      t = Fe("line"), s && s.c(), o = vt(), c(t, "id", r = /*feature*/
      e[27].ID), c(t, "data-feature-id", n = /*feature*/
      e[27].ID), c(t, "class", "mrna svelte-5vonq5"), c(t, "x1", a = /*feature*/
      e[27].x1 * /*widthAllVariants*/
      e[3]), c(
        t,
        "y1",
        /*yOffset*/
        e[10].plusStrand
      ), c(t, "x2", i = /*feature*/
      e[27].x2 * /*widthAllVariants*/
      e[3]), c(
        t,
        "y2",
        /*yOffset*/
        e[10].plusStrand
      ), c(t, "stroke-width", "3"), c(t, "stroke", "rgb(200,200,200)");
    },
    m(l, u) {
      L(l, t, u), s && s.m(l, u), L(l, o, u);
    },
    p(l, u) {
      u[0] & /*features*/
      4 && r !== (r = /*feature*/
      l[27].ID) && c(t, "id", r), u[0] & /*features*/
      4 && n !== (n = /*feature*/
      l[27].ID) && c(t, "data-feature-id", n), u[0] & /*features, widthAllVariants*/
      12 && a !== (a = /*feature*/
      l[27].x1 * /*widthAllVariants*/
      l[3]) && c(t, "x1", a), u[0] & /*features, widthAllVariants*/
      12 && i !== (i = /*feature*/
      l[27].x2 * /*widthAllVariants*/
      l[3]) && c(t, "x2", i), /*feature*/
      l[27].x2 < 0.99 ? s ? s.p(l, u) : (s = $b(l), s.c(), s.m(o.parentNode, o)) : s && (s.d(1), s = null);
    },
    d(l) {
      l && x(t), s && s.d(l), l && x(o);
    }
  };
}
function Cb(e) {
  let t, r, n;
  return {
    c() {
      t = Fe("line"), c(t, "class", "exon"), c(t, "x1", r = /*feature*/
      e[27].x1 * /*widthAllVariants*/
      e[3]), c(
        t,
        "y1",
        /*yOffset*/
        e[10].plusStrand
      ), c(t, "x2", n = /*feature*/
      e[27].x2 * /*widthAllVariants*/
      e[3]), c(
        t,
        "y2",
        /*yOffset*/
        e[10].plusStrand
      ), c(t, "stroke-width", "7"), c(t, "stroke", "rgb(0,190,0)");
    },
    m(a, i) {
      L(a, t, i);
    },
    p(a, i) {
      i[0] & /*features, widthAllVariants*/
      12 && r !== (r = /*feature*/
      a[27].x1 * /*widthAllVariants*/
      a[3]) && c(t, "x1", r), i[0] & /*features, widthAllVariants*/
      12 && n !== (n = /*feature*/
      a[27].x2 * /*widthAllVariants*/
      a[3]) && c(t, "x2", n);
    },
    d(a) {
      a && x(t);
    }
  };
}
function Ab(e) {
  let t, r, n, a, i, o, s, l;
  return {
    c() {
      t = Fe("a"), r = Fe("line"), c(r, "id", n = /*feature*/
      e[27].ID), c(r, "data-feature-id", a = /*feature*/
      e[27].ID), c(r, "class", "gene svelte-5vonq5"), c(r, "x1", i = /*feature*/
      e[27].x1 * /*widthAllVariants*/
      e[3]), c(
        r,
        "y1",
        /*yOffset*/
        e[10].plusStrand
      ), c(r, "x2", o = /*feature*/
      e[27].x2 * /*widthAllVariants*/
      e[3]), c(
        r,
        "y2",
        /*yOffset*/
        e[10].plusStrand
      ), c(r, "stroke-width", "9"), c(r, "stroke", "rgba(200,200,200,0.0)"), c(t, "target", "_blank"), c(t, "href", "#");
    },
    m(u, f) {
      L(u, t, f), p(t, r), s || (l = Z(t, "click", Ee(function() {
        mt(
          /*openGeneDetailsModal*/
          e[11](
            /*feature*/
            e[27].ID
          )
        ) && e[11](
          /*feature*/
          e[27].ID
        ).apply(this, arguments);
      })), s = !0);
    },
    p(u, f) {
      e = u, f[0] & /*features*/
      4 && n !== (n = /*feature*/
      e[27].ID) && c(r, "id", n), f[0] & /*features*/
      4 && a !== (a = /*feature*/
      e[27].ID) && c(r, "data-feature-id", a), f[0] & /*features, widthAllVariants*/
      12 && i !== (i = /*feature*/
      e[27].x1 * /*widthAllVariants*/
      e[3]) && c(r, "x1", i), f[0] & /*features, widthAllVariants*/
      12 && o !== (o = /*feature*/
      e[27].x2 * /*widthAllVariants*/
      e[3]) && c(r, "x2", o);
    },
    d(u) {
      u && x(t), s = !1, l();
    }
  };
}
function Ib(e) {
  let t, r;
  return {
    c() {
      t = Fe("use"), w0(t, "xlink:href", "#arrow-reverse"), c(t, "x", r = /*feature*/
      e[27].x1 * /*widthAllVariants*/
      e[3] - 14), c(
        t,
        "y",
        /*yOffset*/
        e[10].minusStrand - 6
      );
    },
    m(n, a) {
      L(n, t, a);
    },
    p(n, a) {
      a[0] & /*features, widthAllVariants*/
      12 && r !== (r = /*feature*/
      n[27].x1 * /*widthAllVariants*/
      n[3] - 14) && c(t, "x", r);
    },
    d(n) {
      n && x(t);
    }
  };
}
function Pb(e) {
  let t, r, n, a, i, o, s = (
    /*feature*/
    e[27].x1 > 0.01 && Ib(e)
  );
  return {
    c() {
      t = Fe("line"), s && s.c(), o = vt(), c(t, "id", r = /*feature*/
      e[27].ID), c(t, "data-feature-id", n = /*feature*/
      e[27].ID), c(t, "class", "mrna svelte-5vonq5"), c(t, "x1", a = /*feature*/
      e[27].x1 * /*widthAllVariants*/
      e[3]), c(
        t,
        "y1",
        /*yOffset*/
        e[10].minusStrand
      ), c(t, "x2", i = /*feature*/
      e[27].x2 * /*widthAllVariants*/
      e[3]), c(
        t,
        "y2",
        /*yOffset*/
        e[10].minusStrand
      ), c(t, "stroke-width", "3"), c(t, "stroke", "rgb(200,200,200)");
    },
    m(l, u) {
      L(l, t, u), s && s.m(l, u), L(l, o, u);
    },
    p(l, u) {
      u[0] & /*features*/
      4 && r !== (r = /*feature*/
      l[27].ID) && c(t, "id", r), u[0] & /*features*/
      4 && n !== (n = /*feature*/
      l[27].ID) && c(t, "data-feature-id", n), u[0] & /*features, widthAllVariants*/
      12 && a !== (a = /*feature*/
      l[27].x1 * /*widthAllVariants*/
      l[3]) && c(t, "x1", a), u[0] & /*features, widthAllVariants*/
      12 && i !== (i = /*feature*/
      l[27].x2 * /*widthAllVariants*/
      l[3]) && c(t, "x2", i), /*feature*/
      l[27].x1 > 0.01 ? s ? s.p(l, u) : (s = Ib(l), s.c(), s.m(o.parentNode, o)) : s && (s.d(1), s = null);
    },
    d(l) {
      l && x(t), s && s.d(l), l && x(o);
    }
  };
}
function Rb(e) {
  let t, r, n;
  return {
    c() {
      t = Fe("line"), c(t, "class", "exon"), c(t, "x1", r = /*feature*/
      e[27].x1 * /*widthAllVariants*/
      e[3]), c(
        t,
        "y1",
        /*yOffset*/
        e[10].minusStrand
      ), c(t, "x2", n = /*feature*/
      e[27].x2 * /*widthAllVariants*/
      e[3]), c(
        t,
        "y2",
        /*yOffset*/
        e[10].minusStrand
      ), c(t, "stroke-width", "7"), c(t, "stroke", "rgb(0,190,0)");
    },
    m(a, i) {
      L(a, t, i);
    },
    p(a, i) {
      i[0] & /*features, widthAllVariants*/
      12 && r !== (r = /*feature*/
      a[27].x1 * /*widthAllVariants*/
      a[3]) && c(t, "x1", r), i[0] & /*features, widthAllVariants*/
      12 && n !== (n = /*feature*/
      a[27].x2 * /*widthAllVariants*/
      a[3]) && c(t, "x2", n);
    },
    d(a) {
      a && x(t);
    }
  };
}
function jb(e) {
  let t, r, n, a, i, o, s, l;
  return {
    c() {
      t = Fe("a"), r = Fe("line"), c(r, "id", n = /*feature*/
      e[27].ID), c(r, "data-feature-id", a = /*feature*/
      e[27].ID), c(r, "class", "gene svelte-5vonq5"), c(r, "x1", i = /*feature*/
      e[27].x1 * /*widthAllVariants*/
      e[3]), c(
        r,
        "y1",
        /*yOffset*/
        e[10].minusStrand
      ), c(r, "x2", o = /*feature*/
      e[27].x2 * /*widthAllVariants*/
      e[3]), c(
        r,
        "y2",
        /*yOffset*/
        e[10].minusStrand
      ), c(r, "stroke-width", "9"), c(r, "stroke", "rgba(200,200,200,0.0)"), c(t, "target", "_blank"), c(t, "href", "#");
    },
    m(u, f) {
      L(u, t, f), p(t, r), s || (l = Z(t, "click", Ee(function() {
        mt(
          /*openGeneDetailsModal*/
          e[11](
            /*feature*/
            e[27].ID
          )
        ) && e[11](
          /*feature*/
          e[27].ID
        ).apply(this, arguments);
      })), s = !0);
    },
    p(u, f) {
      e = u, f[0] & /*features*/
      4 && n !== (n = /*feature*/
      e[27].ID) && c(r, "id", n), f[0] & /*features*/
      4 && a !== (a = /*feature*/
      e[27].ID) && c(r, "data-feature-id", a), f[0] & /*features, widthAllVariants*/
      12 && i !== (i = /*feature*/
      e[27].x1 * /*widthAllVariants*/
      e[3]) && c(r, "x1", i), f[0] & /*features, widthAllVariants*/
      12 && o !== (o = /*feature*/
      e[27].x2 * /*widthAllVariants*/
      e[3]) && c(r, "x2", o);
    },
    d(u) {
      u && x(t), s = !1, l();
    }
  };
}
function Mb(e) {
  let t, r, n;
  return {
    c() {
      t = Fe("path"), c(t, "id", r = "variant-bezier-" + /*position*/
      e[24]), c(t, "class", "curve svelte-5vonq5"), c(t, "d", n = "M" + /*position*/
      ((e[24] - /*data*/
      e[0].coordinate_first) / /*maxmin*/
      e[1] * /*widthAllVariants*/
      (e[3] - 5) + 3) + "," + /*yOffset*/
      e[10].curveTop + " C" + /*position*/
      ((e[24] - /*data*/
      e[0].coordinate_first) / /*maxmin*/
      e[1] * /*widthAllVariants*/
      (e[3] - 5) + 3) + "," + /*yOffset*/
      e[10].controlPoint + " " + /*col*/
      (e[26] * /*$variantWidth*/
      e[8] + 10) + "," + /*yOffset*/
      e[10].controlPoint + " " + /*col*/
      (e[26] * /*$variantWidth*/
      e[8] + 10) + "," + /*yOffset*/
      e[10].curveBottom);
    },
    m(a, i) {
      L(a, t, i);
    },
    p(a, i) {
      i[0] & /*data*/
      1 && r !== (r = "variant-bezier-" + /*position*/
      a[24]) && c(t, "id", r), i[0] & /*data, maxmin, widthAllVariants, $variantWidth*/
      267 && n !== (n = "M" + /*position*/
      ((a[24] - /*data*/
      a[0].coordinate_first) / /*maxmin*/
      a[1] * /*widthAllVariants*/
      (a[3] - 5) + 3) + "," + /*yOffset*/
      a[10].curveTop + " C" + /*position*/
      ((a[24] - /*data*/
      a[0].coordinate_first) / /*maxmin*/
      a[1] * /*widthAllVariants*/
      (a[3] - 5) + 3) + "," + /*yOffset*/
      a[10].controlPoint + " " + /*col*/
      (a[26] * /*$variantWidth*/
      a[8] + 10) + "," + /*yOffset*/
      a[10].controlPoint + " " + /*col*/
      (a[26] * /*$variantWidth*/
      a[8] + 10) + "," + /*yOffset*/
      a[10].curveBottom) && c(t, "d", n);
    },
    d(a) {
      a && x(t);
    }
  };
}
function vZ(e) {
  let t, r, n, a, i, o, s, l = (
    /*cursorlabelPos*/
    e[6].toLocaleString() + ""
  ), u, f, d, h, v, m, g, _, b, S, k, w, C, E, A, D, F, R, $, j, V, re = (
    /*data*/
    e[0].variants_coordinates
  ), q = [];
  for (let B = 0; B < re.length; B += 1)
    q[B] = Eb(kb(e, re, B));
  let ee = (
    /*features*/
    e[2].plus.gene
  ), Y = [];
  for (let B = 0; B < ee.length; B += 1)
    Y[B] = Tb(Ob(e, ee, B));
  let ae = (
    /*features*/
    e[2].plus.exon
  ), M = [];
  for (let B = 0; B < ae.length; B += 1)
    M[B] = Cb(Sb(e, ae, B));
  let P = (
    /*features*/
    e[2].plus.gene
  ), I = [];
  for (let B = 0; B < P.length; B += 1)
    I[B] = Ab(wb(e, P, B));
  let J = (
    /*features*/
    e[2].minus.gene
  ), G = [];
  for (let B = 0; B < J.length; B += 1)
    G[B] = Pb(yb(e, J, B));
  let z = (
    /*features*/
    e[2].minus.exon
  ), K = [];
  for (let B = 0; B < z.length; B += 1)
    K[B] = Rb(_b(e, z, B));
  let te = (
    /*features*/
    e[2].minus.gene
  ), de = [];
  for (let B = 0; B < te.length; B += 1)
    de[B] = jb(bb(e, te, B));
  let oe = (
    /*data*/
    e[0].variants_coordinates
  ), X = [];
  for (let B = 0; B < oe.length; B += 1)
    X[B] = Mb(mb(e, oe, B));
  return j = new dZ({ props: { data: (
    /*data*/
    e[0]
  ) } }), {
    c() {
      t = y("div"), r = y("div"), r.innerHTML = "Genes and variants<br/>in genomic region", n = T(), a = y("div"), i = y("div"), o = T(), s = y("div"), u = Q(l), f = T(), d = y("div"), h = Fe("svg"), v = Fe("defs"), m = Fe("symbol"), g = Fe("g"), _ = Fe("path"), b = Fe("symbol"), S = Fe("g"), k = Fe("path");
      for (let B = 0; B < q.length; B += 1)
        q[B].c();
      w = vt();
      for (let B = 0; B < Y.length; B += 1)
        Y[B].c();
      C = vt();
      for (let B = 0; B < M.length; B += 1)
        M[B].c();
      E = vt();
      for (let B = 0; B < I.length; B += 1)
        I[B].c();
      A = vt();
      for (let B = 0; B < G.length; B += 1)
        G[B].c();
      D = vt();
      for (let B = 0; B < K.length; B += 1)
        K[B].c();
      F = vt();
      for (let B = 0; B < de.length; B += 1)
        de[B].c();
      R = vt();
      for (let B = 0; B < X.length; B += 1)
        X[B].c();
      $ = vt(), xe(j.$$.fragment), c(r, "class", "label"), c(r, "style", ""), c(i, "id", "cursorline"), c(i, "class", "svelte-5vonq5"), O(
        i,
        "left",
        /*cursorlinePos*/
        e[5]
      ), O(i, "visibility", Nb), c(s, "id", "cursorline-pos"), c(s, "class", "svelte-5vonq5"), O(
        s,
        "left",
        /*cursorlinePos*/
        e[5]
      ), O(s, "visibility", Nb), c(_, "d", "M21.883 12l-7.527 6.235.644.765 9-7.521-9-7.479-.645.764 7.529 6.236h-21.884v1h21.883z"), c(g, "transform", "scale(0.5)"), c(m, "id", "arrow"), c(m, "viewBox", "0 0 50 50"), c(m, "width", "50"), c(m, "height", "50"), c(m, "class", "svelte-5vonq5"), c(k, "d", "M21.883 12l-7.527 6.235.644.765 9-7.521-9-7.479-.645.764 7.529 6.236h-21.884v1h21.883z"), c(S, "transform", "scale(0.5) scale(-1 1) translate(-25 0)"), c(b, "id", "arrow-reverse"), c(b, "viewBox", "0 0 50 50"), c(b, "width", "50"), c(b, "height", "50"), c(
        h,
        "width",
        /*widthAllVariants*/
        e[3]
      ), c(h, "height", "80"), c(d, "id", "svg-container"), O(
        d,
        "width",
        /*widthAllVariants*/
        e[3] + "px"
      ), c(d, "class", "svelte-5vonq5"), O(
        a,
        "width",
        /*widthAllVariants*/
        e[3] + "px"
      ), O(a, "border", "1px solid black"), O(a, "position", "relative"), c(t, "class", "track genomic-region svelte-5vonq5"), c(t, "style", "");
    },
    m(B, ue) {
      L(B, t, ue), p(t, r), p(t, n), p(t, a), p(a, i), p(a, o), p(a, s), p(s, u), p(a, f), p(a, d), p(d, h), p(h, v), p(v, m), p(m, g), p(g, _), p(v, b), p(b, S), p(S, k);
      for (let se = 0; se < q.length; se += 1)
        q[se].m(h, null);
      p(h, w);
      for (let se = 0; se < Y.length; se += 1)
        Y[se].m(h, null);
      p(h, C);
      for (let se = 0; se < M.length; se += 1)
        M[se].m(h, null);
      p(h, E);
      for (let se = 0; se < I.length; se += 1)
        I[se].m(h, null);
      p(h, A);
      for (let se = 0; se < G.length; se += 1)
        G[se].m(h, null);
      p(h, D);
      for (let se = 0; se < K.length; se += 1)
        K[se].m(h, null);
      p(h, F);
      for (let se = 0; se < de.length; se += 1)
        de[se].m(h, null);
      p(h, R);
      for (let se = 0; se < X.length; se += 1)
        X[se].m(h, null);
      p(h, $), Ne(j, h, null), e[13](h), e[14](a), V = !0;
    },
    p(B, ue) {
      if (ue[0] & /*cursorlinePos*/
      32 && O(
        i,
        "left",
        /*cursorlinePos*/
        B[5]
      ), (!V || ue[0] & /*cursorlabelPos*/
      64) && l !== (l = /*cursorlabelPos*/
      B[6].toLocaleString() + "") && _e(u, l), ue[0] & /*cursorlinePos*/
      32 && O(
        s,
        "left",
        /*cursorlinePos*/
        B[5]
      ), ue[0] & /*data, maxmin, widthAllVariants, yOffset*/
      1035) {
        re = /*data*/
        B[0].variants_coordinates;
        let N;
        for (N = 0; N < re.length; N += 1) {
          const ce = kb(B, re, N);
          q[N] ? q[N].p(ce, ue) : (q[N] = Eb(ce), q[N].c(), q[N].m(h, w));
        }
        for (; N < q.length; N += 1)
          q[N].d(1);
        q.length = re.length;
      }
      if (ue[0] & /*features, widthAllVariants, yOffset*/
      1036) {
        ee = /*features*/
        B[2].plus.gene;
        let N;
        for (N = 0; N < ee.length; N += 1) {
          const ce = Ob(B, ee, N);
          Y[N] ? Y[N].p(ce, ue) : (Y[N] = Tb(ce), Y[N].c(), Y[N].m(h, C));
        }
        for (; N < Y.length; N += 1)
          Y[N].d(1);
        Y.length = ee.length;
      }
      if (ue[0] & /*features, widthAllVariants, yOffset*/
      1036) {
        ae = /*features*/
        B[2].plus.exon;
        let N;
        for (N = 0; N < ae.length; N += 1) {
          const ce = Sb(B, ae, N);
          M[N] ? M[N].p(ce, ue) : (M[N] = Cb(ce), M[N].c(), M[N].m(h, E));
        }
        for (; N < M.length; N += 1)
          M[N].d(1);
        M.length = ae.length;
      }
      if (ue[0] & /*openGeneDetailsModal, features, widthAllVariants, yOffset*/
      3084) {
        P = /*features*/
        B[2].plus.gene;
        let N;
        for (N = 0; N < P.length; N += 1) {
          const ce = wb(B, P, N);
          I[N] ? I[N].p(ce, ue) : (I[N] = Ab(ce), I[N].c(), I[N].m(h, A));
        }
        for (; N < I.length; N += 1)
          I[N].d(1);
        I.length = P.length;
      }
      if (ue[0] & /*features, widthAllVariants, yOffset*/
      1036) {
        J = /*features*/
        B[2].minus.gene;
        let N;
        for (N = 0; N < J.length; N += 1) {
          const ce = yb(B, J, N);
          G[N] ? G[N].p(ce, ue) : (G[N] = Pb(ce), G[N].c(), G[N].m(h, D));
        }
        for (; N < G.length; N += 1)
          G[N].d(1);
        G.length = J.length;
      }
      if (ue[0] & /*features, widthAllVariants, yOffset*/
      1036) {
        z = /*features*/
        B[2].minus.exon;
        let N;
        for (N = 0; N < z.length; N += 1) {
          const ce = _b(B, z, N);
          K[N] ? K[N].p(ce, ue) : (K[N] = Rb(ce), K[N].c(), K[N].m(h, F));
        }
        for (; N < K.length; N += 1)
          K[N].d(1);
        K.length = z.length;
      }
      if (ue[0] & /*openGeneDetailsModal, features, widthAllVariants, yOffset*/
      3084) {
        te = /*features*/
        B[2].minus.gene;
        let N;
        for (N = 0; N < te.length; N += 1) {
          const ce = bb(B, te, N);
          de[N] ? de[N].p(ce, ue) : (de[N] = jb(ce), de[N].c(), de[N].m(h, R));
        }
        for (; N < de.length; N += 1)
          de[N].d(1);
        de.length = te.length;
      }
      if (ue[0] & /*data, maxmin, widthAllVariants, yOffset, $variantWidth*/
      1291) {
        oe = /*data*/
        B[0].variants_coordinates;
        let N;
        for (N = 0; N < oe.length; N += 1) {
          const ce = mb(B, oe, N);
          X[N] ? X[N].p(ce, ue) : (X[N] = Mb(ce), X[N].c(), X[N].m(h, $));
        }
        for (; N < X.length; N += 1)
          X[N].d(1);
        X.length = oe.length;
      }
      const se = {};
      ue[0] & /*data*/
      1 && (se.data = /*data*/
      B[0]), j.$set(se), (!V || ue[0] & /*widthAllVariants*/
      8) && c(
        h,
        "width",
        /*widthAllVariants*/
        B[3]
      ), (!V || ue[0] & /*widthAllVariants*/
      8) && O(
        d,
        "width",
        /*widthAllVariants*/
        B[3] + "px"
      ), (!V || ue[0] & /*widthAllVariants*/
      8) && O(
        a,
        "width",
        /*widthAllVariants*/
        B[3] + "px"
      );
    },
    i(B) {
      V || (ne(j.$$.fragment, B), V = !0);
    },
    o(B) {
      fe(j.$$.fragment, B), V = !1;
    },
    d(B) {
      B && x(t), Ve(q, B), Ve(Y, B), Ve(M, B), Ve(I, B), Ve(G, B), Ve(K, B), Ve(de, B), Ve(X, B), De(j), e[13](null), e[14](null);
    }
  };
}
let Nb = "hidden";
function hZ(e, t, r) {
  let n, { data: a } = t, { appId: i, eventbus: o, controller: s } = We("app").app();
  const l = We("rootElem"), { variantWidth: u } = Et();
  dt(e, u, (D) => r(8, n = D));
  let f, d, h = {}, v = {}, m = {
    plusStrand: 20,
    minusStrand: 32,
    variant: 40,
    curveTop: 45,
    controlPoint: 62,
    curveBottom: 80
  };
  const g = {
    delay: 0,
    appendTo: l,
    target: "div#" + i + " line.gene",
    animation: !1,
    placement: "bottom",
    allowHTML: !0,
    onShow(D) {
      let F = "Type: " + v[D.reference.dataset.featureId].type;
      F += "<br /><br />ID: " + D.reference.dataset.featureId, v[D.reference.dataset.featureId].description !== "." && (F += "<br /><br />Description: " + v[D.reference.dataset.featureId].description), F += "<br /><br />Click to show more details.", D.setContent(F);
    }
  };
  let _, b;
  const S = (D) => {
    o.emit("modal:open", {
      component: "GeneDetails",
      props: { featureId: D }
    });
  };
  let k = "0px", w = 0, C;
  function E(D) {
    lt[D ? "unshift" : "push"](() => {
      _ = D, r(4, _);
    });
  }
  function A(D) {
    lt[D ? "unshift" : "push"](() => {
      C = D, r(7, C);
    });
  }
  return e.$$set = (D) => {
    "data" in D && r(0, a = D.data);
  }, e.$$.update = () => {
    if (e.$$.dirty[0] & /*data, maxmin, features, tippyInstance*/
    4103) {
      r(3, f = s.getCurrentWidthOfVariants()), r(1, d = a.coordinate_last - a.coordinate_first), r(2, h = {
        plus: { gene: [], exon: [] },
        minus: { gene: [], exon: [] }
      });
      let D, F;
      for (const R of a.features)
        v[R.ID] = R, D = 0, F = 1, R.strand == "+" && (R.start > a.coordinate_first && (D = (R.start - a.coordinate_first) / d), R.end < a.coordinate_last && (F = (R.end - a.coordinate_first) / d), s.metadata.gff3.main_feature_types_for_genes_track.includes(R.type) && h.plus.gene.push({
          x1: D,
          x2: F,
          description: R.description,
          ID: R.ID,
          gff3: R
        }), R.type == "exon" && h.plus.exon.push({ x1: D, x2: F })), R.strand == "-" && (R.start > a.coordinate_first && (D = (R.start - a.coordinate_first) / d), R.end < a.coordinate_last && (F = (R.end - a.coordinate_first) / d), s.metadata.gff3.main_feature_types_for_genes_track.includes(R.type) && h.minus.gene.push({
          x1: D,
          x2: F,
          description: R.description,
          ID: R.ID,
          gff3: R
        }), R.type == "exon" && h.minus.exon.push({ x1: D, x2: F }));
      b !== void 0 && typeof b.destroy == "function" && b.destroy(), r(12, b = Ma(l.querySelector("#tracks-container"), g));
    }
  }, [
    a,
    d,
    h,
    f,
    _,
    k,
    w,
    C,
    n,
    u,
    m,
    S,
    b,
    E,
    A
  ];
}
class gZ extends Ue {
  constructor(t) {
    super(), qe(this, t, hZ, vZ, Be, { data: 0 }, pZ, [-1, -1]);
  }
}
function mZ(e) {
  rt(e, "svelte-q1mnjb", "span.snpeff-indicator.svelte-q1mnjb{display:inline-block;text-align:center;margin:0;padding:0;box-sizing:border-box;min-height:20px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.snpeff-tooltip{font-size:12px;line-height:1.0em !important}");
}
function Db(e, t, r) {
  const n = e.slice();
  return n[13] = t[r], n;
}
function xb(e) {
  let t, r = (
    /*data*/
    e[0].variants_coordinates
  ), n = [];
  for (let a = 0; a < r.length; a += 1)
    n[a] = Fb(Db(e, r, a));
  return {
    c() {
      for (let a = 0; a < n.length; a += 1)
        n[a].c();
      t = vt();
    },
    m(a, i) {
      for (let o = 0; o < n.length; o += 1)
        n[o].m(a, i);
      L(a, t, i);
    },
    p(a, i) {
      if (i & /*data, $variantWidth, showModal, width, height, viewBox, iconColor*/
      123) {
        r = /*data*/
        a[0].variants_coordinates;
        let o;
        for (o = 0; o < r.length; o += 1) {
          const s = Db(a, r, o);
          n[o] ? n[o].p(s, i) : (n[o] = Fb(s), n[o].c(), n[o].m(t.parentNode, t));
        }
        for (; o < n.length; o += 1)
          n[o].d(1);
        n.length = r.length;
      }
    },
    d(a) {
      Ve(n, a), a && x(t);
    }
  };
}
function Fb(e) {
  let t, r, n, a, i, o, s, l;
  return {
    c() {
      t = y("span"), r = Fe("svg"), n = Fe("path"), i = T(), c(n, "fill", a = /*iconColor*/
      e[4](
        /*position*/
        e[13]
      )), c(n, "d", "M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"), c(
        r,
        "width",
        /*width*/
        e[5]
      ), c(
        r,
        "height",
        /*height*/
        e[6]
      ), c(r, "viewBox", _Z), c(t, "class", "variant-hover snpeff-indicator svelte-q1mnjb"), c(t, "data-tippy-content", "SnpEff annotation"), c(t, "data-position", o = /*position*/
      e[13]), O(
        t,
        "width",
        /*$variantWidth*/
        e[1] + "px"
      );
    },
    m(u, f) {
      L(u, t, f), p(t, r), p(r, n), p(t, i), s || (l = Z(t, "click", Ee(function() {
        mt(
          /*showModal*/
          e[3](
            /*position*/
            e[13]
          )
        ) && e[3](
          /*position*/
          e[13]
        ).apply(this, arguments);
      })), s = !0);
    },
    p(u, f) {
      e = u, f & /*data*/
      1 && a !== (a = /*iconColor*/
      e[4](
        /*position*/
        e[13]
      )) && c(n, "fill", a), f & /*data*/
      1 && o !== (o = /*position*/
      e[13]) && c(t, "data-position", o), f & /*$variantWidth*/
      2 && O(
        t,
        "width",
        /*$variantWidth*/
        e[1] + "px"
      );
    },
    d(u) {
      u && x(t), s = !1, l();
    }
  };
}
function bZ(e) {
  let t, r, n, a = (
    /*data*/
    e[0].snpeff_variants !== void 0 && xb(e)
  );
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "SnpEff annotations", n = T(), a && a.c(), c(r, "class", "label"), c(t, "class", "track snpeff"), O(t, "height", "23px");
    },
    m(i, o) {
      L(i, t, o), p(t, r), p(t, n), a && a.m(t, null);
    },
    p(i, [o]) {
      /*data*/
      i[0].snpeff_variants !== void 0 ? a ? a.p(i, o) : (a = xb(i), a.c(), a.m(t, null)) : a && (a.d(1), a = null);
    },
    i: he,
    o: he,
    d(i) {
      i && x(t), a && a.d();
    }
  };
}
let Lb = "20px", _Z = "0 0 24 24";
function yZ(e, t, r) {
  let n, { data: a } = t;
  const i = We("app");
  let { appId: o, eventbus: s } = i.app();
  const l = We("rootElem"), { variantWidth: u } = Et();
  dt(e, u, (g) => r(1, n = g));
  const f = (g) => {
    let _ = a.snpeff_variants[g];
    s.emit("modal:open", {
      component: "SnpEffAnnotation",
      props: { snpeff_data: _, position: g }
    });
  }, d = {
    delay: 0,
    appendTo: l,
    target: "div#" + o + " span.snpeff-indicator",
    animation: !1,
    placement: "right-start",
    allowHTML: !0,
    onShow(g) {
      g.reference.dataset.position, g.setContent("Please click to display the SnpEff annotation.");
    }
  };
  function h(g) {
    let _ = a.snpeff_variants[g];
    Array.isArray(_) || (_ = [_]);
    let b = !1;
    _.forEach((k) => {
      (k.includes("missense_variant") || k.includes("splice_region_variant") || k.includes("intron_variant")) && (b = !0);
    });
    let S = "rgb(165,165,165)";
    return b && (S = "rgb(255,35,25)"), S;
  }
  qr(async () => {
    Ma(l.querySelector("#tracks-container"), d);
  });
  let v = Lb, m = Lb;
  return e.$$set = (g) => {
    "data" in g && r(0, a = g.data);
  }, [a, n, u, f, h, v, m];
}
class wZ extends Ue {
  constructor(t) {
    super(), qe(this, t, yZ, bZ, Be, { data: 0 }, mZ);
  }
}
function rs(e, t) {
  return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
function SZ(e, t) {
  return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
}
function Q2(e) {
  let t, r, n;
  e.length !== 2 ? (t = rs, r = (s, l) => rs(e(s), l), n = (s, l) => e(s) - l) : (t = e === rs || e === SZ ? e : OZ, r = e, n = e);
  function a(s, l, u = 0, f = s.length) {
    if (u < f) {
      if (t(l, l) !== 0)
        return f;
      do {
        const d = u + f >>> 1;
        r(s[d], l) < 0 ? u = d + 1 : f = d;
      } while (u < f);
    }
    return u;
  }
  function i(s, l, u = 0, f = s.length) {
    if (u < f) {
      if (t(l, l) !== 0)
        return f;
      do {
        const d = u + f >>> 1;
        r(s[d], l) <= 0 ? u = d + 1 : f = d;
      } while (u < f);
    }
    return u;
  }
  function o(s, l, u = 0, f = s.length) {
    const d = a(s, l, u, f - 1);
    return d > u && n(s[d - 1], l) > -n(s[d], l) ? d - 1 : d;
  }
  return { left: a, center: o, right: i };
}
function OZ() {
  return 0;
}
function kZ(e) {
  return e === null ? NaN : +e;
}
const EZ = Q2(rs), $Z = EZ.right;
Q2(kZ).center;
const TZ = $Z;
var Hf = Math.sqrt(50), Gf = Math.sqrt(10), Wf = Math.sqrt(2);
function CZ(e, t, r) {
  var n, a = -1, i, o, s;
  if (t = +t, e = +e, r = +r, e === t && r > 0)
    return [e];
  if ((n = t < e) && (i = e, e = t, t = i), (s = Z2(e, t, r)) === 0 || !isFinite(s))
    return [];
  if (s > 0) {
    let l = Math.round(e / s), u = Math.round(t / s);
    for (l * s < e && ++l, u * s > t && --u, o = new Array(i = u - l + 1); ++a < i; )
      o[a] = (l + a) * s;
  } else {
    s = -s;
    let l = Math.round(e * s), u = Math.round(t * s);
    for (l / s < e && ++l, u / s > t && --u, o = new Array(i = u - l + 1); ++a < i; )
      o[a] = (l + a) / s;
  }
  return n && o.reverse(), o;
}
function Z2(e, t, r) {
  var n = (t - e) / Math.max(0, r), a = Math.floor(Math.log(n) / Math.LN10), i = n / Math.pow(10, a);
  return a >= 0 ? (i >= Hf ? 10 : i >= Gf ? 5 : i >= Wf ? 2 : 1) * Math.pow(10, a) : -Math.pow(10, -a) / (i >= Hf ? 10 : i >= Gf ? 5 : i >= Wf ? 2 : 1);
}
function AZ(e, t, r) {
  var n = Math.abs(t - e) / Math.max(0, r), a = Math.pow(10, Math.floor(Math.log(n) / Math.LN10)), i = n / a;
  return i >= Hf ? a *= 10 : i >= Gf ? a *= 5 : i >= Wf && (a *= 2), t < e ? -a : a;
}
function IZ(e, t) {
  switch (arguments.length) {
    case 0:
      break;
    case 1:
      this.range(e);
      break;
    default:
      this.range(t).domain(e);
      break;
  }
  return this;
}
function Hd(e, t, r) {
  e.prototype = t.prototype = r, r.constructor = e;
}
function eS(e, t) {
  var r = Object.create(e.prototype);
  for (var n in t)
    r[n] = t[n];
  return r;
}
function ro() {
}
var yi = 0.7, ks = 1 / yi, aa = "\\s*([+-]?\\d+)\\s*", wi = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", br = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", PZ = /^#([0-9a-f]{3,8})$/, RZ = new RegExp(`^rgb\\(${aa},${aa},${aa}\\)$`), jZ = new RegExp(`^rgb\\(${br},${br},${br}\\)$`), MZ = new RegExp(`^rgba\\(${aa},${aa},${aa},${wi}\\)$`), NZ = new RegExp(`^rgba\\(${br},${br},${br},${wi}\\)$`), DZ = new RegExp(`^hsl\\(${wi},${br},${br}\\)$`), xZ = new RegExp(`^hsla\\(${wi},${br},${br},${wi}\\)$`), Bb = {
  aliceblue: 15792383,
  antiquewhite: 16444375,
  aqua: 65535,
  aquamarine: 8388564,
  azure: 15794175,
  beige: 16119260,
  bisque: 16770244,
  black: 0,
  blanchedalmond: 16772045,
  blue: 255,
  blueviolet: 9055202,
  brown: 10824234,
  burlywood: 14596231,
  cadetblue: 6266528,
  chartreuse: 8388352,
  chocolate: 13789470,
  coral: 16744272,
  cornflowerblue: 6591981,
  cornsilk: 16775388,
  crimson: 14423100,
  cyan: 65535,
  darkblue: 139,
  darkcyan: 35723,
  darkgoldenrod: 12092939,
  darkgray: 11119017,
  darkgreen: 25600,
  darkgrey: 11119017,
  darkkhaki: 12433259,
  darkmagenta: 9109643,
  darkolivegreen: 5597999,
  darkorange: 16747520,
  darkorchid: 10040012,
  darkred: 9109504,
  darksalmon: 15308410,
  darkseagreen: 9419919,
  darkslateblue: 4734347,
  darkslategray: 3100495,
  darkslategrey: 3100495,
  darkturquoise: 52945,
  darkviolet: 9699539,
  deeppink: 16716947,
  deepskyblue: 49151,
  dimgray: 6908265,
  dimgrey: 6908265,
  dodgerblue: 2003199,
  firebrick: 11674146,
  floralwhite: 16775920,
  forestgreen: 2263842,
  fuchsia: 16711935,
  gainsboro: 14474460,
  ghostwhite: 16316671,
  gold: 16766720,
  goldenrod: 14329120,
  gray: 8421504,
  green: 32768,
  greenyellow: 11403055,
  grey: 8421504,
  honeydew: 15794160,
  hotpink: 16738740,
  indianred: 13458524,
  indigo: 4915330,
  ivory: 16777200,
  khaki: 15787660,
  lavender: 15132410,
  lavenderblush: 16773365,
  lawngreen: 8190976,
  lemonchiffon: 16775885,
  lightblue: 11393254,
  lightcoral: 15761536,
  lightcyan: 14745599,
  lightgoldenrodyellow: 16448210,
  lightgray: 13882323,
  lightgreen: 9498256,
  lightgrey: 13882323,
  lightpink: 16758465,
  lightsalmon: 16752762,
  lightseagreen: 2142890,
  lightskyblue: 8900346,
  lightslategray: 7833753,
  lightslategrey: 7833753,
  lightsteelblue: 11584734,
  lightyellow: 16777184,
  lime: 65280,
  limegreen: 3329330,
  linen: 16445670,
  magenta: 16711935,
  maroon: 8388608,
  mediumaquamarine: 6737322,
  mediumblue: 205,
  mediumorchid: 12211667,
  mediumpurple: 9662683,
  mediumseagreen: 3978097,
  mediumslateblue: 8087790,
  mediumspringgreen: 64154,
  mediumturquoise: 4772300,
  mediumvioletred: 13047173,
  midnightblue: 1644912,
  mintcream: 16121850,
  mistyrose: 16770273,
  moccasin: 16770229,
  navajowhite: 16768685,
  navy: 128,
  oldlace: 16643558,
  olive: 8421376,
  olivedrab: 7048739,
  orange: 16753920,
  orangered: 16729344,
  orchid: 14315734,
  palegoldenrod: 15657130,
  palegreen: 10025880,
  paleturquoise: 11529966,
  palevioletred: 14381203,
  papayawhip: 16773077,
  peachpuff: 16767673,
  peru: 13468991,
  pink: 16761035,
  plum: 14524637,
  powderblue: 11591910,
  purple: 8388736,
  rebeccapurple: 6697881,
  red: 16711680,
  rosybrown: 12357519,
  royalblue: 4286945,
  saddlebrown: 9127187,
  salmon: 16416882,
  sandybrown: 16032864,
  seagreen: 3050327,
  seashell: 16774638,
  sienna: 10506797,
  silver: 12632256,
  skyblue: 8900331,
  slateblue: 6970061,
  slategray: 7372944,
  slategrey: 7372944,
  snow: 16775930,
  springgreen: 65407,
  steelblue: 4620980,
  tan: 13808780,
  teal: 32896,
  thistle: 14204888,
  tomato: 16737095,
  turquoise: 4251856,
  violet: 15631086,
  wheat: 16113331,
  white: 16777215,
  whitesmoke: 16119285,
  yellow: 16776960,
  yellowgreen: 10145074
};
Hd(ro, Si, {
  copy(e) {
    return Object.assign(new this.constructor(), this, e);
  },
  displayable() {
    return this.rgb().displayable();
  },
  hex: zb,
  // Deprecated! Use color.formatHex.
  formatHex: zb,
  formatHex8: FZ,
  formatHsl: LZ,
  formatRgb: Vb,
  toString: Vb
});
function zb() {
  return this.rgb().formatHex();
}
function FZ() {
  return this.rgb().formatHex8();
}
function LZ() {
  return tS(this).formatHsl();
}
function Vb() {
  return this.rgb().formatRgb();
}
function Si(e) {
  var t, r;
  return e = (e + "").trim().toLowerCase(), (t = PZ.exec(e)) ? (r = t[1].length, t = parseInt(t[1], 16), r === 6 ? qb(t) : r === 3 ? new jt(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : r === 8 ? xo(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : r === 4 ? xo(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = RZ.exec(e)) ? new jt(t[1], t[2], t[3], 1) : (t = jZ.exec(e)) ? new jt(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = MZ.exec(e)) ? xo(t[1], t[2], t[3], t[4]) : (t = NZ.exec(e)) ? xo(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = DZ.exec(e)) ? Gb(t[1], t[2] / 100, t[3] / 100, 1) : (t = xZ.exec(e)) ? Gb(t[1], t[2] / 100, t[3] / 100, t[4]) : Bb.hasOwnProperty(e) ? qb(Bb[e]) : e === "transparent" ? new jt(NaN, NaN, NaN, 0) : null;
}
function qb(e) {
  return new jt(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
}
function xo(e, t, r, n) {
  return n <= 0 && (e = t = r = NaN), new jt(e, t, r, n);
}
function BZ(e) {
  return e instanceof ro || (e = Si(e)), e ? (e = e.rgb(), new jt(e.r, e.g, e.b, e.opacity)) : new jt();
}
function Kf(e, t, r, n) {
  return arguments.length === 1 ? BZ(e) : new jt(e, t, r, n ?? 1);
}
function jt(e, t, r, n) {
  this.r = +e, this.g = +t, this.b = +r, this.opacity = +n;
}
Hd(jt, Kf, eS(ro, {
  brighter(e) {
    return e = e == null ? ks : Math.pow(ks, e), new jt(this.r * e, this.g * e, this.b * e, this.opacity);
  },
  darker(e) {
    return e = e == null ? yi : Math.pow(yi, e), new jt(this.r * e, this.g * e, this.b * e, this.opacity);
  },
  rgb() {
    return this;
  },
  clamp() {
    return new jt(Sn(this.r), Sn(this.g), Sn(this.b), Es(this.opacity));
  },
  displayable() {
    return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
  },
  hex: Ub,
  // Deprecated! Use color.formatHex.
  formatHex: Ub,
  formatHex8: zZ,
  formatRgb: Hb,
  toString: Hb
}));
function Ub() {
  return `#${vn(this.r)}${vn(this.g)}${vn(this.b)}`;
}
function zZ() {
  return `#${vn(this.r)}${vn(this.g)}${vn(this.b)}${vn((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
}
function Hb() {
  const e = Es(this.opacity);
  return `${e === 1 ? "rgb(" : "rgba("}${Sn(this.r)}, ${Sn(this.g)}, ${Sn(this.b)}${e === 1 ? ")" : `, ${e})`}`;
}
function Es(e) {
  return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
}
function Sn(e) {
  return Math.max(0, Math.min(255, Math.round(e) || 0));
}
function vn(e) {
  return e = Sn(e), (e < 16 ? "0" : "") + e.toString(16);
}
function Gb(e, t, r, n) {
  return n <= 0 ? e = t = r = NaN : r <= 0 || r >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new sr(e, t, r, n);
}
function tS(e) {
  if (e instanceof sr)
    return new sr(e.h, e.s, e.l, e.opacity);
  if (e instanceof ro || (e = Si(e)), !e)
    return new sr();
  if (e instanceof sr)
    return e;
  e = e.rgb();
  var t = e.r / 255, r = e.g / 255, n = e.b / 255, a = Math.min(t, r, n), i = Math.max(t, r, n), o = NaN, s = i - a, l = (i + a) / 2;
  return s ? (t === i ? o = (r - n) / s + (r < n) * 6 : r === i ? o = (n - t) / s + 2 : o = (t - r) / s + 4, s /= l < 0.5 ? i + a : 2 - i - a, o *= 60) : s = l > 0 && l < 1 ? 0 : o, new sr(o, s, l, e.opacity);
}
function VZ(e, t, r, n) {
  return arguments.length === 1 ? tS(e) : new sr(e, t, r, n ?? 1);
}
function sr(e, t, r, n) {
  this.h = +e, this.s = +t, this.l = +r, this.opacity = +n;
}
Hd(sr, VZ, eS(ro, {
  brighter(e) {
    return e = e == null ? ks : Math.pow(ks, e), new sr(this.h, this.s, this.l * e, this.opacity);
  },
  darker(e) {
    return e = e == null ? yi : Math.pow(yi, e), new sr(this.h, this.s, this.l * e, this.opacity);
  },
  rgb() {
    var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, r = this.l, n = r + (r < 0.5 ? r : 1 - r) * t, a = 2 * r - n;
    return new jt(
      Vu(e >= 240 ? e - 240 : e + 120, a, n),
      Vu(e, a, n),
      Vu(e < 120 ? e + 240 : e - 120, a, n),
      this.opacity
    );
  },
  clamp() {
    return new sr(Wb(this.h), Fo(this.s), Fo(this.l), Es(this.opacity));
  },
  displayable() {
    return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
  },
  formatHsl() {
    const e = Es(this.opacity);
    return `${e === 1 ? "hsl(" : "hsla("}${Wb(this.h)}, ${Fo(this.s) * 100}%, ${Fo(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
  }
}));
function Wb(e) {
  return e = (e || 0) % 360, e < 0 ? e + 360 : e;
}
function Fo(e) {
  return Math.max(0, Math.min(1, e || 0));
}
function Vu(e, t, r) {
  return (e < 60 ? t + (r - t) * e / 60 : e < 180 ? r : e < 240 ? t + (r - t) * (240 - e) / 60 : t) * 255;
}
const Gd = (e) => () => e;
function qZ(e, t) {
  return function(r) {
    return e + r * t;
  };
}
function UZ(e, t, r) {
  return e = Math.pow(e, r), t = Math.pow(t, r) - e, r = 1 / r, function(n) {
    return Math.pow(e + n * t, r);
  };
}
function HZ(e) {
  return (e = +e) == 1 ? rS : function(t, r) {
    return r - t ? UZ(t, r, e) : Gd(isNaN(t) ? r : t);
  };
}
function rS(e, t) {
  var r = t - e;
  return r ? qZ(e, r) : Gd(isNaN(e) ? t : e);
}
const Kb = function e(t) {
  var r = HZ(t);
  function n(a, i) {
    var o = r((a = Kf(a)).r, (i = Kf(i)).r), s = r(a.g, i.g), l = r(a.b, i.b), u = rS(a.opacity, i.opacity);
    return function(f) {
      return a.r = o(f), a.g = s(f), a.b = l(f), a.opacity = u(f), a + "";
    };
  }
  return n.gamma = e, n;
}(1);
function GZ(e, t) {
  t || (t = []);
  var r = e ? Math.min(t.length, e.length) : 0, n = t.slice(), a;
  return function(i) {
    for (a = 0; a < r; ++a)
      n[a] = e[a] * (1 - i) + t[a] * i;
    return n;
  };
}
function WZ(e) {
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
}
function KZ(e, t) {
  var r = t ? t.length : 0, n = e ? Math.min(r, e.length) : 0, a = new Array(n), i = new Array(r), o;
  for (o = 0; o < n; ++o)
    a[o] = Wd(e[o], t[o]);
  for (; o < r; ++o)
    i[o] = t[o];
  return function(s) {
    for (o = 0; o < n; ++o)
      i[o] = a[o](s);
    return i;
  };
}
function JZ(e, t) {
  var r = new Date();
  return e = +e, t = +t, function(n) {
    return r.setTime(e * (1 - n) + t * n), r;
  };
}
function $s(e, t) {
  return e = +e, t = +t, function(r) {
    return e * (1 - r) + t * r;
  };
}
function YZ(e, t) {
  var r = {}, n = {}, a;
  (e === null || typeof e != "object") && (e = {}), (t === null || typeof t != "object") && (t = {});
  for (a in t)
    a in e ? r[a] = Wd(e[a], t[a]) : n[a] = t[a];
  return function(i) {
    for (a in r)
      n[a] = r[a](i);
    return n;
  };
}
var Jf = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, qu = new RegExp(Jf.source, "g");
function XZ(e) {
  return function() {
    return e;
  };
}
function QZ(e) {
  return function(t) {
    return e(t) + "";
  };
}
function ZZ(e, t) {
  var r = Jf.lastIndex = qu.lastIndex = 0, n, a, i, o = -1, s = [], l = [];
  for (e = e + "", t = t + ""; (n = Jf.exec(e)) && (a = qu.exec(t)); )
    (i = a.index) > r && (i = t.slice(r, i), s[o] ? s[o] += i : s[++o] = i), (n = n[0]) === (a = a[0]) ? s[o] ? s[o] += a : s[++o] = a : (s[++o] = null, l.push({ i: o, x: $s(n, a) })), r = qu.lastIndex;
  return r < t.length && (i = t.slice(r), s[o] ? s[o] += i : s[++o] = i), s.length < 2 ? l[0] ? QZ(l[0].x) : XZ(t) : (t = l.length, function(u) {
    for (var f = 0, d; f < t; ++f)
      s[(d = l[f]).i] = d.x(u);
    return s.join("");
  });
}
function Wd(e, t) {
  var r = typeof t, n;
  return t == null || r === "boolean" ? Gd(t) : (r === "number" ? $s : r === "string" ? (n = Si(t)) ? (t = n, Kb) : ZZ : t instanceof Si ? Kb : t instanceof Date ? JZ : WZ(t) ? GZ : Array.isArray(t) ? KZ : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? YZ : $s)(e, t);
}
function eee(e, t) {
  return e = +e, t = +t, function(r) {
    return Math.round(e * (1 - r) + t * r);
  };
}
function tee(e) {
  return function() {
    return e;
  };
}
function ree(e) {
  return +e;
}
var Jb = [0, 1];
function ea(e) {
  return e;
}
function Yf(e, t) {
  return (t -= e = +e) ? function(r) {
    return (r - e) / t;
  } : tee(isNaN(t) ? NaN : 0.5);
}
function nee(e, t) {
  var r;
  return e > t && (r = e, e = t, t = r), function(n) {
    return Math.max(e, Math.min(t, n));
  };
}
function aee(e, t, r) {
  var n = e[0], a = e[1], i = t[0], o = t[1];
  return a < n ? (n = Yf(a, n), i = r(o, i)) : (n = Yf(n, a), i = r(i, o)), function(s) {
    return i(n(s));
  };
}
function iee(e, t, r) {
  var n = Math.min(e.length, t.length) - 1, a = new Array(n), i = new Array(n), o = -1;
  for (e[n] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++o < n; )
    a[o] = Yf(e[o], e[o + 1]), i[o] = r(t[o], t[o + 1]);
  return function(s) {
    var l = TZ(e, s, 1, n) - 1;
    return i[l](a[l](s));
  };
}
function oee(e, t) {
  return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
}
function see() {
  var e = Jb, t = Jb, r = Wd, n, a, i, o = ea, s, l, u;
  function f() {
    var h = Math.min(e.length, t.length);
    return o !== ea && (o = nee(e[0], e[h - 1])), s = h > 2 ? iee : aee, l = u = null, d;
  }
  function d(h) {
    return h == null || isNaN(h = +h) ? i : (l || (l = s(e.map(n), t, r)))(n(o(h)));
  }
  return d.invert = function(h) {
    return o(a((u || (u = s(t, e.map(n), $s)))(h)));
  }, d.domain = function(h) {
    return arguments.length ? (e = Array.from(h, ree), f()) : e.slice();
  }, d.range = function(h) {
    return arguments.length ? (t = Array.from(h), f()) : t.slice();
  }, d.rangeRound = function(h) {
    return t = Array.from(h), r = eee, f();
  }, d.clamp = function(h) {
    return arguments.length ? (o = h ? !0 : ea, f()) : o !== ea;
  }, d.interpolate = function(h) {
    return arguments.length ? (r = h, f()) : r;
  }, d.unknown = function(h) {
    return arguments.length ? (i = h, d) : i;
  }, function(h, v) {
    return n = h, a = v, f();
  };
}
function lee() {
  return see()(ea, ea);
}
function uee(e) {
  return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
}
function Ts(e, t) {
  if ((r = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e")) < 0)
    return null;
  var r, n = e.slice(0, r);
  return [
    n.length > 1 ? n[0] + n.slice(2) : n,
    +e.slice(r + 1)
  ];
}
function ma(e) {
  return e = Ts(Math.abs(e)), e ? e[1] : NaN;
}
function fee(e, t) {
  return function(r, n) {
    for (var a = r.length, i = [], o = 0, s = e[0], l = 0; a > 0 && s > 0 && (l + s + 1 > n && (s = Math.max(1, n - l)), i.push(r.substring(a -= s, a + s)), !((l += s + 1) > n)); )
      s = e[o = (o + 1) % e.length];
    return i.reverse().join(t);
  };
}
function cee(e) {
  return function(t) {
    return t.replace(/[0-9]/g, function(r) {
      return e[+r];
    });
  };
}
var dee = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
function Cs(e) {
  if (!(t = dee.exec(e)))
    throw new Error("invalid format: " + e);
  var t;
  return new Kd({
    fill: t[1],
    align: t[2],
    sign: t[3],
    symbol: t[4],
    zero: t[5],
    width: t[6],
    comma: t[7],
    precision: t[8] && t[8].slice(1),
    trim: t[9],
    type: t[10]
  });
}
Cs.prototype = Kd.prototype;
function Kd(e) {
  this.fill = e.fill === void 0 ? " " : e.fill + "", this.align = e.align === void 0 ? ">" : e.align + "", this.sign = e.sign === void 0 ? "-" : e.sign + "", this.symbol = e.symbol === void 0 ? "" : e.symbol + "", this.zero = !!e.zero, this.width = e.width === void 0 ? void 0 : +e.width, this.comma = !!e.comma, this.precision = e.precision === void 0 ? void 0 : +e.precision, this.trim = !!e.trim, this.type = e.type === void 0 ? "" : e.type + "";
}
Kd.prototype.toString = function() {
  return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
};
function pee(e) {
  e:
    for (var t = e.length, r = 1, n = -1, a; r < t; ++r)
      switch (e[r]) {
        case ".":
          n = a = r;
          break;
        case "0":
          n === 0 && (n = r), a = r;
          break;
        default:
          if (!+e[r])
            break e;
          n > 0 && (n = 0);
          break;
      }
  return n > 0 ? e.slice(0, n) + e.slice(a + 1) : e;
}
var nS;
function vee(e, t) {
  var r = Ts(e, t);
  if (!r)
    return e + "";
  var n = r[0], a = r[1], i = a - (nS = Math.max(-8, Math.min(8, Math.floor(a / 3))) * 3) + 1, o = n.length;
  return i === o ? n : i > o ? n + new Array(i - o + 1).join("0") : i > 0 ? n.slice(0, i) + "." + n.slice(i) : "0." + new Array(1 - i).join("0") + Ts(e, Math.max(0, t + i - 1))[0];
}
function Yb(e, t) {
  var r = Ts(e, t);
  if (!r)
    return e + "";
  var n = r[0], a = r[1];
  return a < 0 ? "0." + new Array(-a).join("0") + n : n.length > a + 1 ? n.slice(0, a + 1) + "." + n.slice(a + 1) : n + new Array(a - n.length + 2).join("0");
}
const Xb = {
  "%": (e, t) => (e * 100).toFixed(t),
  b: (e) => Math.round(e).toString(2),
  c: (e) => e + "",
  d: uee,
  e: (e, t) => e.toExponential(t),
  f: (e, t) => e.toFixed(t),
  g: (e, t) => e.toPrecision(t),
  o: (e) => Math.round(e).toString(8),
  p: (e, t) => Yb(e * 100, t),
  r: Yb,
  s: vee,
  X: (e) => Math.round(e).toString(16).toUpperCase(),
  x: (e) => Math.round(e).toString(16)
};
function Qb(e) {
  return e;
}
var Zb = Array.prototype.map, e0 = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
function hee(e) {
  var t = e.grouping === void 0 || e.thousands === void 0 ? Qb : fee(Zb.call(e.grouping, Number), e.thousands + ""), r = e.currency === void 0 ? "" : e.currency[0] + "", n = e.currency === void 0 ? "" : e.currency[1] + "", a = e.decimal === void 0 ? "." : e.decimal + "", i = e.numerals === void 0 ? Qb : cee(Zb.call(e.numerals, String)), o = e.percent === void 0 ? "%" : e.percent + "", s = e.minus === void 0 ? "−" : e.minus + "", l = e.nan === void 0 ? "NaN" : e.nan + "";
  function u(d) {
    d = Cs(d);
    var h = d.fill, v = d.align, m = d.sign, g = d.symbol, _ = d.zero, b = d.width, S = d.comma, k = d.precision, w = d.trim, C = d.type;
    C === "n" ? (S = !0, C = "g") : Xb[C] || (k === void 0 && (k = 12), w = !0, C = "g"), (_ || h === "0" && v === "=") && (_ = !0, h = "0", v = "=");
    var E = g === "$" ? r : g === "#" && /[boxX]/.test(C) ? "0" + C.toLowerCase() : "", A = g === "$" ? n : /[%p]/.test(C) ? o : "", D = Xb[C], F = /[defgprs%]/.test(C);
    k = k === void 0 ? 6 : /[gprs]/.test(C) ? Math.max(1, Math.min(21, k)) : Math.max(0, Math.min(20, k));
    function R($) {
      var j = E, V = A, re, q, ee;
      if (C === "c")
        V = D($) + V, $ = "";
      else {
        $ = +$;
        var Y = $ < 0 || 1 / $ < 0;
        if ($ = isNaN($) ? l : D(Math.abs($), k), w && ($ = pee($)), Y && +$ == 0 && m !== "+" && (Y = !1), j = (Y ? m === "(" ? m : s : m === "-" || m === "(" ? "" : m) + j, V = (C === "s" ? e0[8 + nS / 3] : "") + V + (Y && m === "(" ? ")" : ""), F) {
          for (re = -1, q = $.length; ++re < q; )
            if (ee = $.charCodeAt(re), 48 > ee || ee > 57) {
              V = (ee === 46 ? a + $.slice(re + 1) : $.slice(re)) + V, $ = $.slice(0, re);
              break;
            }
        }
      }
      S && !_ && ($ = t($, 1 / 0));
      var ae = j.length + $.length + V.length, M = ae < b ? new Array(b - ae + 1).join(h) : "";
      switch (S && _ && ($ = t(M + $, M.length ? b - V.length : 1 / 0), M = ""), v) {
        case "<":
          $ = j + $ + V + M;
          break;
        case "=":
          $ = j + M + $ + V;
          break;
        case "^":
          $ = M.slice(0, ae = M.length >> 1) + j + $ + V + M.slice(ae);
          break;
        default:
          $ = M + j + $ + V;
          break;
      }
      return i($);
    }
    return R.toString = function() {
      return d + "";
    }, R;
  }
  function f(d, h) {
    var v = u((d = Cs(d), d.type = "f", d)), m = Math.max(-8, Math.min(8, Math.floor(ma(h) / 3))) * 3, g = Math.pow(10, -m), _ = e0[8 + m / 3];
    return function(b) {
      return v(g * b) + _;
    };
  }
  return {
    format: u,
    formatPrefix: f
  };
}
var Lo, aS, iS;
gee({
  thousands: ",",
  grouping: [3],
  currency: ["$", ""]
});
function gee(e) {
  return Lo = hee(e), aS = Lo.format, iS = Lo.formatPrefix, Lo;
}
function mee(e) {
  return Math.max(0, -ma(Math.abs(e)));
}
function bee(e, t) {
  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(ma(t) / 3))) * 3 - ma(Math.abs(e)));
}
function _ee(e, t) {
  return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, ma(t) - ma(e)) + 1;
}
function yee(e, t, r, n) {
  var a = AZ(e, t, r), i;
  switch (n = Cs(n ?? ",f"), n.type) {
    case "s": {
      var o = Math.max(Math.abs(e), Math.abs(t));
      return n.precision == null && !isNaN(i = bee(a, o)) && (n.precision = i), iS(n, o);
    }
    case "":
    case "e":
    case "g":
    case "p":
    case "r": {
      n.precision == null && !isNaN(i = _ee(a, Math.max(Math.abs(e), Math.abs(t)))) && (n.precision = i - (n.type === "e"));
      break;
    }
    case "f":
    case "%": {
      n.precision == null && !isNaN(i = mee(a)) && (n.precision = i - (n.type === "%") * 2);
      break;
    }
  }
  return aS(n);
}
function wee(e) {
  var t = e.domain;
  return e.ticks = function(r) {
    var n = t();
    return CZ(n[0], n[n.length - 1], r ?? 10);
  }, e.tickFormat = function(r, n) {
    var a = t();
    return yee(a[0], a[a.length - 1], r ?? 10, n);
  }, e.nice = function(r) {
    r == null && (r = 10);
    var n = t(), a = 0, i = n.length - 1, o = n[a], s = n[i], l, u, f = 10;
    for (s < o && (u = o, o = s, s = u, u = a, a = i, i = u); f-- > 0; ) {
      if (u = Z2(o, s, r), u === l)
        return n[a] = o, n[i] = s, t(n);
      if (u > 0)
        o = Math.floor(o / u) * u, s = Math.ceil(s / u) * u;
      else if (u < 0)
        o = Math.ceil(o * u) / u, s = Math.floor(s * u) / u;
      else
        break;
      l = u;
    }
    return e;
  }, e;
}
function As() {
  var e = lee();
  return e.copy = function() {
    return oee(e, As());
  }, IZ.apply(e, arguments), wee(e);
}
function t0(e, t, r) {
  const n = e.slice();
  return n[10] = t[r], n[12] = r, n;
}
function r0(e) {
  let t, r, n, a;
  return {
    c() {
      t = y("span"), r = Q(" "), c(t, "class", "variant-hover maf-indicator"), c(t, "data-tippy-content", n = "MAF = " + /*maf*/
      e[10].toFixed(3)), c(t, "data-position", a = /*data*/
      e[0].variants_coordinates[
        /*i*/
        e[12]
      ]), O(t, "background-color", "rgba(220,0,0, " + /*scale*/
      e[4](
        /*maf*/
        e[10]
      ) + ")"), O(
        t,
        "width",
        /*$variantWidth*/
        e[2] + "px"
      );
    },
    m(i, o) {
      L(i, t, o), p(t, r);
    },
    p(i, o) {
      o & /*mafs*/
      2 && n !== (n = "MAF = " + /*maf*/
      i[10].toFixed(3)) && c(t, "data-tippy-content", n), o & /*data*/
      1 && a !== (a = /*data*/
      i[0].variants_coordinates[
        /*i*/
        i[12]
      ]) && c(t, "data-position", a), o & /*mafs*/
      2 && O(t, "background-color", "rgba(220,0,0, " + /*scale*/
      i[4](
        /*maf*/
        i[10]
      ) + ")"), o & /*$variantWidth*/
      4 && O(
        t,
        "width",
        /*$variantWidth*/
        i[2] + "px"
      );
    },
    d(i) {
      i && x(t);
    }
  };
}
function See(e) {
  let t, r, n, a = (
    /*mafs*/
    e[1]
  ), i = [];
  for (let o = 0; o < a.length; o += 1)
    i[o] = r0(t0(e, a, o));
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "MAF indicator", n = T();
      for (let o = 0; o < i.length; o += 1)
        i[o].c();
      c(r, "class", "label"), c(t, "class", "track mafvis"), O(t, "height", "20px"), O(t, "margin-top", "1px");
    },
    m(o, s) {
      L(o, t, s), p(t, r), p(t, n);
      for (let l = 0; l < i.length; l += 1)
        i[l].m(t, null);
    },
    p(o, [s]) {
      if (s & /*mafs, data, scale, $variantWidth*/
      23) {
        a = /*mafs*/
        o[1];
        let l;
        for (l = 0; l < a.length; l += 1) {
          const u = t0(o, a, l);
          i[l] ? i[l].p(u, s) : (i[l] = r0(u), i[l].c(), i[l].m(t, null));
        }
        for (; l < i.length; l += 1)
          i[l].d(1);
        i.length = a.length;
      }
    },
    i: he,
    o: he,
    d(o) {
      o && x(t), Ve(i, o);
    }
  };
}
function Oee(e, t, r) {
  let n, { data: a } = t;
  const { variantWidth: i } = Et();
  dt(e, i, (v) => r(2, n = v));
  const o = We("app");
  let { appId: s } = o.app();
  const l = We("rootElem");
  let u = As().domain([0, 0.5]).range([1, 0]);
  const f = {
    delay: 0,
    appendTo: l,
    target: "div#" + s + " span.maf-indicator",
    animation: !1,
    placement: "bottom",
    allowHTML: !0
  };
  let d, h;
  return e.$$set = (v) => {
    "data" in v && r(0, a = v.data);
  }, e.$$.update = () => {
    e.$$.dirty & /*data, tippyInstance*/
    33 && (r(1, d = a.per_variant_stats.maf), h !== void 0 && typeof h.destroy == "function" && h.destroy(), r(5, h = Ma(l.querySelector("#tracks-container"), f)));
  }, [a, d, n, i, u, h];
}
class kee extends Ue {
  constructor(t) {
    super(), qe(this, t, Oee, See, Be, { data: 0 });
  }
}
function n0(e, t, r) {
  const n = e.slice();
  return n[10] = t[r], n[12] = r, n;
}
function a0(e) {
  let t, r, n, a;
  return {
    c() {
      t = y("span"), r = Q(" "), c(t, "class", "variant-hover het-indicator"), c(t, "data-tippy-content", n = "HET = " + /*het*/
      e[10].toFixed(3)), c(t, "data-position", a = /*data*/
      e[0].variants_coordinates[
        /*i*/
        e[12]
      ]), O(t, "background-color", "rgba(255, 136, 71, " + /*scale*/
      e[2](
        /*het*/
        e[10]
      ) + ")"), O(
        t,
        "width",
        /*$variantWidth*/
        e[3] + "px"
      );
    },
    m(i, o) {
      L(i, t, o), p(t, r);
    },
    p(i, o) {
      o & /*hets*/
      2 && n !== (n = "HET = " + /*het*/
      i[10].toFixed(3)) && c(t, "data-tippy-content", n), o & /*data*/
      1 && a !== (a = /*data*/
      i[0].variants_coordinates[
        /*i*/
        i[12]
      ]) && c(t, "data-position", a), o & /*scale, hets*/
      6 && O(t, "background-color", "rgba(255, 136, 71, " + /*scale*/
      i[2](
        /*het*/
        i[10]
      ) + ")"), o & /*$variantWidth*/
      8 && O(
        t,
        "width",
        /*$variantWidth*/
        i[3] + "px"
      );
    },
    d(i) {
      i && x(t);
    }
  };
}
function Eee(e) {
  let t, r, n, a = (
    /*hets*/
    e[1]
  ), i = [];
  for (let o = 0; o < a.length; o += 1)
    i[o] = a0(n0(e, a, o));
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "Heterozygosity indicator", n = T();
      for (let o = 0; o < i.length; o += 1)
        i[o].c();
      c(r, "class", "label"), c(t, "class", "track heterozygous-calls-freq"), O(t, "height", "20px");
    },
    m(o, s) {
      L(o, t, s), p(t, r), p(t, n);
      for (let l = 0; l < i.length; l += 1)
        i[l].m(t, null);
    },
    p(o, [s]) {
      if (s & /*hets, data, scale, $variantWidth*/
      15) {
        a = /*hets*/
        o[1];
        let l;
        for (l = 0; l < a.length; l += 1) {
          const u = n0(o, a, l);
          i[l] ? i[l].p(u, s) : (i[l] = a0(u), i[l].c(), i[l].m(t, null));
        }
        for (; l < i.length; l += 1)
          i[l].d(1);
        i.length = a.length;
      }
    },
    i: he,
    o: he,
    d(o) {
      o && x(t), Ve(i, o);
    }
  };
}
function $ee(e, t, r) {
  let n, { data: a } = t;
  const { variantWidth: i } = Et();
  dt(e, i, (v) => r(3, n = v));
  const o = We("app");
  let { appId: s } = o.app();
  const l = We("rootElem");
  let u = As().domain([0, 0.1]).range([0, 1]);
  const f = {
    delay: 0,
    appendTo: l,
    target: "div#" + s + " span.het-indicator",
    animation: !1,
    placement: "bottom",
    allowHTML: !0
  };
  let d, h;
  return e.$$set = (v) => {
    "data" in v && r(0, a = v.data);
  }, e.$$.update = () => {
    e.$$.dirty & /*data, hets, tippyInstance*/
    35 && (r(1, d = a.per_variant_stats.heterozygosity_freq), r(2, u = As().domain([0, Math.max(...d)]).range([0, 1])), h !== void 0 && typeof h.destroy == "function" && h.destroy(), r(5, h = Ma(l.querySelector("#tracks-container"), f)));
  }, [a, d, u, n, i, h];
}
class Tee extends Ue {
  constructor(t) {
    super(), qe(this, t, $ee, Eee, Be, { data: 0 });
  }
}
function i0(e, t, r) {
  const n = e.slice();
  return n[10] = t[r], n[12] = r, n;
}
function Cee(e) {
  let t, r, n, a;
  return {
    c() {
      t = y("span"), c(t, "class", "variant-hover snp reference ref-indel"), c(t, "data-tippy-content", r = "Variant type: INDEL<br />Position: " + /*data*/
      e[0].variants_coordinates[
        /*i*/
        e[12]
      ]), c(t, "data-position", n = /*data*/
      e[0].variants_coordinates[
        /*i*/
        e[12]
      ]), c(t, "style", a = "width: " + /*$variantWidth*/
      e[2] + "px; " + /*isFiltered*/
      e[4](
        /*data*/
        e[0].variants_coordinates[
          /*i*/
          e[12]
        ]
      )), ve(
        t,
        "noletter",
        /*$variantWidth*/
        e[2] < 10
      );
    },
    m(i, o) {
      L(i, t, o);
    },
    p(i, o) {
      o & /*data*/
      1 && r !== (r = "Variant type: INDEL<br />Position: " + /*data*/
      i[0].variants_coordinates[
        /*i*/
        i[12]
      ]) && c(t, "data-tippy-content", r), o & /*data*/
      1 && n !== (n = /*data*/
      i[0].variants_coordinates[
        /*i*/
        i[12]
      ]) && c(t, "data-position", n), o & /*$variantWidth, data*/
      5 && a !== (a = "width: " + /*$variantWidth*/
      i[2] + "px; " + /*isFiltered*/
      i[4](
        /*data*/
        i[0].variants_coordinates[
          /*i*/
          i[12]
        ]
      )) && c(t, "style", a), o & /*$variantWidth*/
      4 && ve(
        t,
        "noletter",
        /*$variantWidth*/
        i[2] < 10
      );
    },
    d(i) {
      i && x(t);
    }
  };
}
function Aee(e) {
  let t, r, n, a, i;
  return {
    c() {
      t = y("span"), c(t, "class", r = "variant-hover snp reference ref-" + /*nucleotide*/
      e[10]), c(t, "data-tippy-content", n = "Variant type: SNP<br />Position: " + /*data*/
      e[0].variants_coordinates[
        /*i*/
        e[12]
      ]), c(t, "data-position", a = /*data*/
      e[0].variants_coordinates[
        /*i*/
        e[12]
      ]), c(t, "style", i = "width: " + /*$variantWidth*/
      e[2] + "px; " + /*isFiltered*/
      e[4](
        /*data*/
        e[0].variants_coordinates[
          /*i*/
          e[12]
        ]
      )), ve(
        t,
        "noletter",
        /*$variantWidth*/
        e[2] < 10
      );
    },
    m(o, s) {
      L(o, t, s);
    },
    p(o, s) {
      s & /*reference*/
      2 && r !== (r = "variant-hover snp reference ref-" + /*nucleotide*/
      o[10]) && c(t, "class", r), s & /*data*/
      1 && n !== (n = "Variant type: SNP<br />Position: " + /*data*/
      o[0].variants_coordinates[
        /*i*/
        o[12]
      ]) && c(t, "data-tippy-content", n), s & /*data*/
      1 && a !== (a = /*data*/
      o[0].variants_coordinates[
        /*i*/
        o[12]
      ]) && c(t, "data-position", a), s & /*$variantWidth, data*/
      5 && i !== (i = "width: " + /*$variantWidth*/
      o[2] + "px; " + /*isFiltered*/
      o[4](
        /*data*/
        o[0].variants_coordinates[
          /*i*/
          o[12]
        ]
      )) && c(t, "style", i), s & /*reference, $variantWidth*/
      6 && ve(
        t,
        "noletter",
        /*$variantWidth*/
        o[2] < 10
      );
    },
    d(o) {
      o && x(t);
    }
  };
}
function o0(e) {
  let t;
  function r(i, o) {
    return (
      /*nucleotide*/
      i[10].length == 1 ? Aee : Cee
    );
  }
  let n = r(e), a = n(e);
  return {
    c() {
      a.c(), t = vt();
    },
    m(i, o) {
      a.m(i, o), L(i, t, o);
    },
    p(i, o) {
      n === (n = r(i)) && a ? a.p(i, o) : (a.d(1), a = n(i), a && (a.c(), a.m(t.parentNode, t)));
    },
    d(i) {
      a.d(i), i && x(t);
    }
  };
}
function Iee(e) {
  let t, r, n, a = (
    /*reference*/
    e[1]
  ), i = [];
  for (let o = 0; o < a.length; o += 1)
    i[o] = o0(i0(e, a, o));
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "Reference allele", n = T();
      for (let o = 0; o < i.length; o += 1)
        i[o].c();
      c(r, "class", "label"), c(t, "class", "track reference");
    },
    m(o, s) {
      L(o, t, s), p(t, r), p(t, n);
      for (let l = 0; l < i.length; l += 1)
        i[l].m(t, null);
    },
    p(o, [s]) {
      if (s & /*reference, data, $variantWidth, isFiltered*/
      23) {
        a = /*reference*/
        o[1];
        let l;
        for (l = 0; l < a.length; l += 1) {
          const u = i0(o, a, l);
          i[l] ? i[l].p(u, s) : (i[l] = o0(u), i[l].c(), i[l].m(t, null));
        }
        for (; l < i.length; l += 1)
          i[l].d(1);
        i.length = a.length;
      }
    },
    i: he,
    o: he,
    d(o) {
      o && x(t), Ve(i, o);
    }
  };
}
function Pee(e, t, r) {
  let n, { data: a } = t;
  const i = We("app");
  let { appId: o } = i.app();
  const s = We("rootElem"), { variantWidth: l } = Et();
  dt(e, l, (v) => r(2, n = v));
  let u;
  function f(v) {
    return a.filtered_variants_coordinates.includes(v) === !1 ? "background-color: rgb(240,240,240);" : "";
  }
  const d = {
    delay: 0,
    appendTo: s,
    target: "div#" + o + " span.reference",
    animation: !1,
    placement: "bottom",
    allowHTML: !0
  };
  let h;
  return e.$$set = (v) => {
    "data" in v && r(0, a = v.data);
  }, e.$$.update = () => {
    e.$$.dirty & /*data, tippyInstance*/
    33 && (r(1, h = a.reference), u !== void 0 && typeof u.destroy == "function" && u.destroy(), r(5, u = Ma(s.querySelector("#tracks-container"), d)));
  }, [a, h, n, l, f, u];
}
class Ree extends Ue {
  constructor(t) {
    super(), qe(this, t, Pee, Iee, Be, { data: 0 });
  }
}
function jee(e) {
  rt(e, "svelte-1tgsos8", ".track.minimap.svelte-1tgsos8{background:white;border-bottom:1px solid #646464;box-sizing:border-box}.label.svelte-1tgsos8{background:white}");
}
function Mee(e) {
  let t, r, n, a, i, o, s;
  return {
    c() {
      t = y("div"), r = y("div"), r.textContent = "Compressed view", n = T(), a = y("div"), i = y("canvas"), c(r, "class", "label svelte-1tgsos8"), c(i, "id", "canvas-minimap"), c(
        i,
        "width",
        /*widthAllVariants*/
        e[1]
      ), c(
        i,
        "height",
        /*canvasHeight*/
        e[2]
      ), c(a, "id", "test"), O(a, "max-height", "399px"), O(a, "overflow-y", "scroll"), O(a, "flex-grow", "1"), O(a, "margin-top", "1px"), c(t, "class", "track minimap svelte-1tgsos8"), O(t, "position", "absolute"), O(t, "top", "0px"), O(t, "left", "0px"), O(t, "z-index", "900"), O(t, "height", "400px"), O(t, "width", "100%");
    },
    m(l, u) {
      L(l, t, u), p(t, r), p(t, n), p(t, a), p(a, i), e[7](i), o || (s = Z(a, "scroll", ia(
        /*scroll_handler*/
        e[8]
      )), o = !0);
    },
    p(l, [u]) {
      u & /*widthAllVariants*/
      2 && c(
        i,
        "width",
        /*widthAllVariants*/
        l[1]
      ), u & /*canvasHeight*/
      4 && c(
        i,
        "height",
        /*canvasHeight*/
        l[2]
      );
    },
    i: he,
    o: he,
    d(l) {
      l && x(t), e[7](null), o = !1, s();
    }
  };
}
function Nee(e, t) {
  let r = e.getBoundingClientRect();
  return {
    x: t.clientX - r.left,
    y: t.clientY - r.top
  };
}
function Dee(e, t, r) {
  let n, { data: a } = t, { samples: i } = t;
  const o = We("app");
  let { appId: s, eventbus: l, controller: u } = o.app();
  const { sortSettings: f, variantWidth: d, variantFilterSettings: h, filteredVariantsCoordinates: v } = Et();
  dt(e, d, ($) => r(12, n = $));
  let m, g, _, b = i.length, S = 0, k = !1;
  const w = u.metadata.ploidy, C = Dd.getFunction(w);
  function E($, j) {
    return j.every((V) => V < 0) ? !1 : a.filtered_variants_coordinates.includes($) === !1;
  }
  function A($, j = "") {
    if (m === void 0)
      return console.log("drawSampleVariants() EARLY EXIT no canvas available"), !1;
    let V = 0;
    $ = $.slice(S, S + 500);
    let re = $.map((q) => q[0]);
    u.DataLoader.lazyLoadVariantCalls(re, () => !1), function q() {
      let ee = S;
      for (let Y of $) {
        let ae = Y[0], M = 0;
        for (let P = 0; P < a.variants_coordinates.length; P++) {
          if (M = P * n, a.calls.get(ae) === null)
            continue;
          let I = C(a.calls.get(ae)[P]);
          I == -1 && (k.fillStyle = "rgb(255,255,255)"), I == 0 && (k.fillStyle = "rgb(219, 240, 216)"), I == 1 && (k.fillStyle = "rgb(255, 136, 71)"), I == 2 && (k.fillStyle = "rgb(133, 171, 222)"), E(a.variants_coordinates[P], a.calls.get(ae)[P]) && (k.fillStyle = "rgb(255,255,255)"), k.fillRect(M, ee, n, 1);
        }
        ee += 1;
      }
      _ = requestAnimationFrame(q), V += 1, V > 5 && cancelAnimationFrame(_);
    }();
  }
  f.subscribe(($) => {
  }), qr(() => {
    k = m.getContext("2d");
    let $ = i.slice(0, 500).map((j) => j[0]);
    u.DataLoader.lazyLoadVariantCalls($), A(i, "onMount"), m.addEventListener(
      "click",
      function(j) {
        let V = Nee(m, j);
        l.emit("minimap:click", { y: V.y });
      },
      !1
    );
  });
  const D = mi(
    ($) => {
      let j = parseInt($);
      S = j;
      let V = j + 500, re = i.slice(j, V).map((q) => q[0]);
      u.DataLoader.lazyLoadVariantCalls(re, () => {
        A(i, "canvasOnScrollDebounced");
      });
    },
    500
  );
  qr(async () => {
  });
  function F($) {
    lt[$ ? "unshift" : "push"](() => {
      m = $, r(0, m);
    });
  }
  const R = ($) => D($.target.scrollTop);
  return e.$$set = ($) => {
    "data" in $ && r(5, a = $.data), "samples" in $ && r(6, i = $.samples);
  }, e.$$.update = () => {
    e.$$.dirty & /*samples*/
    64 && (r(2, b = i.length), r(1, g = u.getCurrentWidthOfVariants()), A(i, "reactive block"));
  }, [
    m,
    g,
    b,
    d,
    D,
    a,
    i,
    F,
    R
  ];
}
class xee extends Ue {
  constructor(t) {
    super(), qe(this, t, Dee, Mee, Be, { data: 5, samples: 6 }, jee);
  }
}
function Fee(e) {
  rt(e, "svelte-o6u47j", "div.track div.label{width:170px;margin:0;padding:0;box-sizing:border-box;padding-left:4px;font-size:12px;line-height:12px;display:inline-flex;align-items:center;min-height:20px}div.track div.label.lastNode{box-shadow:inset 0 -2px 1px -1px #464646}div.label.svelte-o6u47j{position:relative}div.track-separator.svelte-o6u47j{height:1px;background:#d2d2d2}");
}
function s0(e, t, r) {
  const n = e.slice();
  return n[16] = t[r], n[18] = r, n;
}
function Lee(e) {
  let t, r, n, a, i;
  function o(u, f) {
    return (
      /*sampleData*/
      u[3].isLastNode === !0 ? qee : Vee
    );
  }
  let s = o(e), l = s(e);
  return {
    c() {
      t = y("div"), r = Fe("svg"), l.c(), n = Fe("line"), a = T(), i = Q(
        /*sampleId*/
        e[0]
      ), c(n, "x1", "5"), c(n, "y1", "10"), c(n, "x2", "13"), c(n, "y2", "10"), c(n, "stroke-width", "1"), c(n, "stroke", "black"), O(r, "position", "absolute"), O(r, "top", "0px"), O(r, "left", "0px"), c(r, "width", "15"), c(r, "height", "20"), c(r, "xmlns", "http://www.w3.org/2000/svg"), c(t, "class", "label svelte-o6u47j"), O(t, "padding-left", "15px"), ve(
        t,
        "lastNode",
        /*sampleData*/
        e[3].isLastNode === !0
      );
    },
    m(u, f) {
      L(u, t, f), p(t, r), l.m(r, null), p(r, n), p(t, a), p(t, i);
    },
    p(u, f) {
      s !== (s = o(u)) && (l.d(1), l = s(u), l && (l.c(), l.m(r, n))), f & /*sampleId*/
      1 && _e(
        i,
        /*sampleId*/
        u[0]
      ), f & /*sampleData*/
      8 && ve(
        t,
        "lastNode",
        /*sampleData*/
        u[3].isLastNode === !0
      );
    },
    d(u) {
      u && x(t), l.d();
    }
  };
}
function Bee(e) {
  let t, r, n;
  return {
    c() {
      t = y("div"), r = y("strong"), n = Q(
        /*sampleId*/
        e[0]
      ), c(t, "class", "label firstNode svelte-o6u47j"), O(t, "padding-left", "4px");
    },
    m(a, i) {
      L(a, t, i), p(t, r), p(r, n);
    },
    p(a, i) {
      i & /*sampleId*/
      1 && _e(
        n,
        /*sampleId*/
        a[0]
      );
    },
    d(a) {
      a && x(t);
    }
  };
}
function zee(e) {
  let t, r = (
    /*sampleDisplayName*/
    e[9](
      /*sampleId*/
      e[0],
      /*sampleData*/
      e[3]
    ) + ""
  );
  return {
    c() {
      t = y("div"), c(t, "class", "label svelte-o6u47j"), O(t, "padding-left", "4px");
    },
    m(n, a) {
      L(n, t, a), t.innerHTML = r;
    },
    p(n, a) {
      a & /*sampleId, sampleData*/
      9 && r !== (r = /*sampleDisplayName*/
      n[9](
        /*sampleId*/
        n[0],
        /*sampleData*/
        n[3]
      ) + "") && (t.innerHTML = r);
    },
    d(n) {
      n && x(t);
    }
  };
}
function Vee(e) {
  let t;
  return {
    c() {
      t = Fe("line"), c(t, "x1", "5"), c(t, "y1", "0"), c(t, "x2", "5"), c(t, "y2", "20"), c(t, "stroke-width", "1"), c(t, "stroke", "black");
    },
    m(r, n) {
      L(r, t, n);
    },
    d(r) {
      r && x(t);
    }
  };
}
function qee(e) {
  let t;
  return {
    c() {
      t = Fe("line"), c(t, "x1", "5"), c(t, "y1", "0"), c(t, "x2", "5"), c(t, "y2", "11"), c(t, "stroke-width", "1"), c(t, "stroke", "black");
    },
    m(r, n) {
      L(r, t, n);
    },
    d(r) {
      r && x(t);
    }
  };
}
function l0(e) {
  let t, r = (
    /*data*/
    e[1].variants_coordinates
  ), n = [];
  for (let a = 0; a < r.length; a += 1)
    n[a] = f0(s0(e, r, a));
  return {
    c() {
      for (let a = 0; a < n.length; a += 1)
        n[a].c();
      t = vt();
    },
    m(a, i) {
      for (let o = 0; o < n.length; o += 1)
        n[o].m(a, i);
      L(a, t, i);
    },
    p(a, i) {
      if (i & /*coords, snpClass, data, sampleId, ref_and_alt, $variantWidth, ploidy, isFiltered*/
      1463) {
        r = /*data*/
        a[1].variants_coordinates;
        let o;
        for (o = 0; o < r.length; o += 1) {
          const s = s0(a, r, o);
          n[o] ? n[o].p(s, i) : (n[o] = f0(s), n[o].c(), n[o].m(t.parentNode, t));
        }
        for (; o < n.length; o += 1)
          n[o].d(1);
        n.length = r.length;
      }
    },
    d(a) {
      Ve(n, a), a && x(t);
    }
  };
}
function u0(e) {
  let t;
  function r(i, o) {
    if (/*ploidy*/
    i[7] === 1)
      return Hee;
    if (/*ploidy*/
    i[7] === 2)
      return Uee;
  }
  let n = r(e), a = n && n(e);
  return {
    c() {
      a && a.c(), t = vt();
    },
    m(i, o) {
      a && a.m(i, o), L(i, t, o);
    },
    p(i, o) {
      a && a.p(i, o);
    },
    d(i) {
      a && a.d(i), i && x(t);
    }
  };
}
function Uee(e) {
  let t, r, n, a, i;
  return {
    c() {
      t = y("span"), c(t, "data-tippy-content", r = "Pos: " + /*coords*/
      e[2][
        /*i*/
        e[18]
      ]), c(t, "class", n = "variant-hover snp snp-" + /*snpClass*/
      e[8](
        /*data*/
        e[1].calls.get(
          /*sampleId*/
          e[0]
        )[
          /*i*/
          e[18]
        ]
      ) + " ref-" + /*ref_and_alt*/
      e[4][
        /*i*/
        e[18]
      ][
        /*data*/
        e[1].calls.get(
          /*sampleId*/
          e[0]
        )[
          /*i*/
          e[18]
        ][0]
      ] + " alt-" + /*ref_and_alt*/
      e[4][
        /*i*/
        e[18]
      ][
        /*data*/
        e[1].calls.get(
          /*sampleId*/
          e[0]
        )[
          /*i*/
          e[18]
        ][1]
      ]), c(
        t,
        "data-sample-id",
        /*sampleId*/
        e[0]
      ), c(t, "data-position", a = /*coords*/
      e[2][
        /*i*/
        e[18]
      ]), c(
        t,
        "data-position-index",
        /*i*/
        e[18]
      ), c(t, "style", i = "width: " + /*$variantWidth*/
      e[5] + "px; " + /*isFiltered*/
      e[10](
        /*coords*/
        e[2][
          /*i*/
          e[18]
        ],
        /*data*/
        e[1].calls.get(
          /*sampleId*/
          e[0]
        )[
          /*i*/
          e[18]
        ]
      )), ve(
        t,
        "noletter",
        /*$variantWidth*/
        e[5] < 10
      );
    },
    m(o, s) {
      L(o, t, s);
    },
    p(o, s) {
      s & /*coords*/
      4 && r !== (r = "Pos: " + /*coords*/
      o[2][
        /*i*/
        o[18]
      ]) && c(t, "data-tippy-content", r), s & /*data, sampleId, ref_and_alt*/
      19 && n !== (n = "variant-hover snp snp-" + /*snpClass*/
      o[8](
        /*data*/
        o[1].calls.get(
          /*sampleId*/
          o[0]
        )[
          /*i*/
          o[18]
        ]
      ) + " ref-" + /*ref_and_alt*/
      o[4][
        /*i*/
        o[18]
      ][
        /*data*/
        o[1].calls.get(
          /*sampleId*/
          o[0]
        )[
          /*i*/
          o[18]
        ][0]
      ] + " alt-" + /*ref_and_alt*/
      o[4][
        /*i*/
        o[18]
      ][
        /*data*/
        o[1].calls.get(
          /*sampleId*/
          o[0]
        )[
          /*i*/
          o[18]
        ][1]
      ]) && c(t, "class", n), s & /*sampleId*/
      1 && c(
        t,
        "data-sample-id",
        /*sampleId*/
        o[0]
      ), s & /*coords*/
      4 && a !== (a = /*coords*/
      o[2][
        /*i*/
        o[18]
      ]) && c(t, "data-position", a), s & /*$variantWidth, coords, data, sampleId*/
      39 && i !== (i = "width: " + /*$variantWidth*/
      o[5] + "px; " + /*isFiltered*/
      o[10](
        /*coords*/
        o[2][
          /*i*/
          o[18]
        ],
        /*data*/
        o[1].calls.get(
          /*sampleId*/
          o[0]
        )[
          /*i*/
          o[18]
        ]
      )) && c(t, "style", i), s & /*data, sampleId, ref_and_alt, $variantWidth*/
      51 && ve(
        t,
        "noletter",
        /*$variantWidth*/
        o[5] < 10
      );
    },
    d(o) {
      o && x(t);
    }
  };
}
function Hee(e) {
  let t, r, n, a;
  return {
    c() {
      t = y("span"), c(t, "data-tippy-content", r = "Pos: " + /*coords*/
      e[2][
        /*i*/
        e[18]
      ]), c(t, "class", n = "variant-hover snp snp-" + /*snpClass*/
      e[8](
        /*data*/
        e[1].calls.get(
          /*sampleId*/
          e[0]
        )[
          /*i*/
          e[18]
        ]
      ) + " ref-" + /*ref_and_alt*/
      e[4][
        /*i*/
        e[18]
      ][
        /*data*/
        e[1].calls.get(
          /*sampleId*/
          e[0]
        )[
          /*i*/
          e[18]
        ]
      ] + " alt-" + /*ref_and_alt*/
      e[4][
        /*i*/
        e[18]
      ][
        /*data*/
        e[1].calls.get(
          /*sampleId*/
          e[0]
        )[
          /*i*/
          e[18]
        ]
      ]), c(
        t,
        "data-sample-id",
        /*sampleId*/
        e[0]
      ), c(t, "data-position", a = /*coords*/
      e[2][
        /*i*/
        e[18]
      ]), c(
        t,
        "data-position-index",
        /*i*/
        e[18]
      ), O(
        t,
        "width",
        /*$variantWidth*/
        e[5] + "px"
      ), ve(
        t,
        "noletter",
        /*$variantWidth*/
        e[5] < 10
      );
    },
    m(i, o) {
      L(i, t, o);
    },
    p(i, o) {
      o & /*coords*/
      4 && r !== (r = "Pos: " + /*coords*/
      i[2][
        /*i*/
        i[18]
      ]) && c(t, "data-tippy-content", r), o & /*data, sampleId, ref_and_alt*/
      19 && n !== (n = "variant-hover snp snp-" + /*snpClass*/
      i[8](
        /*data*/
        i[1].calls.get(
          /*sampleId*/
          i[0]
        )[
          /*i*/
          i[18]
        ]
      ) + " ref-" + /*ref_and_alt*/
      i[4][
        /*i*/
        i[18]
      ][
        /*data*/
        i[1].calls.get(
          /*sampleId*/
          i[0]
        )[
          /*i*/
          i[18]
        ]
      ] + " alt-" + /*ref_and_alt*/
      i[4][
        /*i*/
        i[18]
      ][
        /*data*/
        i[1].calls.get(
          /*sampleId*/
          i[0]
        )[
          /*i*/
          i[18]
        ]
      ]) && c(t, "class", n), o & /*sampleId*/
      1 && c(
        t,
        "data-sample-id",
        /*sampleId*/
        i[0]
      ), o & /*coords*/
      4 && a !== (a = /*coords*/
      i[2][
        /*i*/
        i[18]
      ]) && c(t, "data-position", a), o & /*$variantWidth*/
      32 && O(
        t,
        "width",
        /*$variantWidth*/
        i[5] + "px"
      ), o & /*data, sampleId, ref_and_alt, $variantWidth*/
      51 && ve(
        t,
        "noletter",
        /*$variantWidth*/
        i[5] < 10
      );
    },
    d(i) {
      i && x(t);
    }
  };
}
function f0(e) {
  let t = (
    /*data*/
    e[1].calls.get(
      /*sampleId*/
      e[0]
    ) !== null
  ), r, n = t && u0(e);
  return {
    c() {
      n && n.c(), r = vt();
    },
    m(a, i) {
      n && n.m(a, i), L(a, r, i);
    },
    p(a, i) {
      i & /*data, sampleId*/
      3 && (t = /*data*/
      a[1].calls.get(
        /*sampleId*/
        a[0]
      ) !== null), t ? n ? n.p(a, i) : (n = u0(a), n.c(), n.m(r.parentNode, r)) : n && (n.d(1), n = null);
    },
    d(a) {
      n && n.d(a), a && x(r);
    }
  };
}
function Gee(e) {
  let t, r, n, a, i;
  function o(f, d) {
    return (
      /*sampleData*/
      f[3].status == "single" ? zee : (
        /*sampleData*/
        f[3].status == "group-root" ? Bee : Lee
      )
    );
  }
  let s = o(e), l = s(e), u = (
    /*data*/
    e[1].filtered_variants_coordinates.length > 0 && l0(e)
  );
  return {
    c() {
      t = y("div"), r = y("div"), l.c(), n = T(), u && u.c(), a = T(), i = y("div"), c(r, "class", "track svelte-o6u47j"), c(i, "class", "track-separator svelte-o6u47j");
    },
    m(f, d) {
      L(f, t, d), p(t, r), l.m(r, null), p(r, n), u && u.m(r, null), p(t, a), p(t, i);
    },
    p(f, [d]) {
      s === (s = o(f)) && l ? l.p(f, d) : (l.d(1), l = s(f), l && (l.c(), l.m(r, n))), /*data*/
      f[1].filtered_variants_coordinates.length > 0 ? u ? u.p(f, d) : (u = l0(f), u.c(), u.m(r, null)) : u && (u.d(1), u = null);
    },
    i: he,
    o: he,
    d(f) {
      f && x(t), l.d(), u && u.d();
    }
  };
}
function Wee(e, t, r) {
  let n, { sampleId: a } = t, { data: i } = t, { item: o } = t;
  const s = We("app");
  let { controller: l } = s.app();
  const { variantWidth: u } = Et();
  dt(e, u, (b) => r(5, n = b));
  let f, d, h;
  const v = l.metadata.ploidy, m = Dd.getFunction(v);
  function g(b, S) {
    return S.metadata !== void 0 && (S.metadata.link !== void 0 ? b = S.metadata.link : S.metadata.displayName !== void 0 && (b = S.metadata.displayName)), l.config.sampleDisplayNameTransformer !== void 0 && typeof l.config.sampleDisplayNameTransformer == "function" && (b = l.config.sampleDisplayNameTransformer(b)), b;
  }
  function _(b, S) {
    return S.every((k) => k < 0) ? "" : i.filtered_variants_coordinates.includes(b) === !1 ? "background-color: rgb(255,255,255); color: rgb(255,255,255);" : "";
  }
  return e.$$set = (b) => {
    "sampleId" in b && r(0, a = b.sampleId), "data" in b && r(1, i = b.data), "item" in b && r(11, o = b.item);
  }, e.$$.update = () => {
    e.$$.dirty & /*data, item*/
    2050 && (r(2, f = i.variants_coordinates), i.reference, i.alternates, r(4, h = i.ref_and_alt), r(0, a = o[0]), r(3, d = o[1]));
  }, [
    a,
    i,
    f,
    d,
    h,
    n,
    u,
    v,
    m,
    g,
    _,
    o
  ];
}
class Kee extends Ue {
  constructor(t) {
    super(), qe(this, t, Wee, Gee, Be, { sampleId: 0, data: 1, item: 11 }, Fee);
  }
}
function Jee(e) {
  rt(e, "svelte-12zm6j3", "#loading-overlay.svelte-12zm6j3{box-sizing:border-box;position:absolute;z-index:999;top:0;left:0;width:100%;height:100%;background:rgba(255, 255, 255, 0.55);padding:0;margin:0;display:flex;align-items:center;justify-content:center}#sample-tracks-container.svelte-12zm6j3{height:400px;min-height:400px;position:relative}");
}
function c0(e) {
  let t, r, n;
  return r = new tn({ props: { size: "large" } }), {
    c() {
      t = y("div"), xe(r.$$.fragment), c(t, "id", "loading-overlay"), c(t, "class", "svelte-12zm6j3");
    },
    m(a, i) {
      L(a, t, i), Ne(r, t, null), n = !0;
    },
    i(a) {
      n || (ne(r.$$.fragment, a), n = !0);
    },
    o(a) {
      fe(r.$$.fragment, a), n = !1;
    },
    d(a) {
      a && x(t), De(r);
    }
  };
}
function Yee(e) {
  let t;
  return {
    c() {
      t = y("p"), t.textContent = "Before variants can be displayed, a collection must first be selected.", O(t, "width", "90%"), O(t, "padding", "30px");
    },
    m(r, n) {
      L(r, t, n);
    },
    p: he,
    i: he,
    o: he,
    d(r) {
      r && x(t);
    }
  };
}
function Xee(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m;
  t = new lZ({ props: { data: (
    /*data*/
    e[1]
  ) } });
  let g = (
    /*data*/
    e[1].features !== void 0 && d0(e)
  ), _ = (
    /*data*/
    e[1].snpeff_variants !== void 0 && p0(e)
  );
  i = new kee({ props: { data: (
    /*data*/
    e[1]
  ) } }), s = new Tee({ props: { data: (
    /*data*/
    e[1]
  ) } }), u = new Ree({ props: { data: (
    /*data*/
    e[1]
  ) } });
  const b = [ete, Zee], S = [];
  function k(w, C) {
    return (
      /*$settings*/
      w[7].statusShowMinimap ? 0 : 1
    );
  }
  return h = k(e), v = S[h] = b[h](e), {
    c() {
      xe(t.$$.fragment), r = T(), g && g.c(), n = T(), _ && _.c(), a = T(), xe(i.$$.fragment), o = T(), xe(s.$$.fragment), l = T(), xe(u.$$.fragment), f = T(), d = y("div"), v.c(), c(d, "id", "sample-tracks-container"), c(d, "class", ir(
        /*appId*/
        e[8]
      ) + " svelte-12zm6j3");
    },
    m(w, C) {
      Ne(t, w, C), L(w, r, C), g && g.m(w, C), L(w, n, C), _ && _.m(w, C), L(w, a, C), Ne(i, w, C), L(w, o, C), Ne(s, w, C), L(w, l, C), Ne(u, w, C), L(w, f, C), L(w, d, C), S[h].m(d, null), e[16](d), m = !0;
    },
    p(w, C) {
      const E = {};
      C[0] & /*data*/
      2 && (E.data = /*data*/
      w[1]), t.$set(E), /*data*/
      w[1].features !== void 0 ? g ? (g.p(w, C), C[0] & /*data*/
      2 && ne(g, 1)) : (g = d0(w), g.c(), ne(g, 1), g.m(n.parentNode, n)) : g && (Je(), fe(g, 1, 1, () => {
        g = null;
      }), Ye()), /*data*/
      w[1].snpeff_variants !== void 0 ? _ ? (_.p(w, C), C[0] & /*data*/
      2 && ne(_, 1)) : (_ = p0(w), _.c(), ne(_, 1), _.m(a.parentNode, a)) : _ && (Je(), fe(_, 1, 1, () => {
        _ = null;
      }), Ye());
      const A = {};
      C[0] & /*data*/
      2 && (A.data = /*data*/
      w[1]), i.$set(A);
      const D = {};
      C[0] & /*data*/
      2 && (D.data = /*data*/
      w[1]), s.$set(D);
      const F = {};
      C[0] & /*data*/
      2 && (F.data = /*data*/
      w[1]), u.$set(F);
      let R = h;
      h = k(w), h === R ? S[h].p(w, C) : (Je(), fe(S[R], 1, 1, () => {
        S[R] = null;
      }), Ye(), v = S[h], v ? v.p(w, C) : (v = S[h] = b[h](w), v.c()), ne(v, 1), v.m(d, null));
    },
    i(w) {
      m || (ne(t.$$.fragment, w), ne(g), ne(_), ne(i.$$.fragment, w), ne(s.$$.fragment, w), ne(u.$$.fragment, w), ne(v), m = !0);
    },
    o(w) {
      fe(t.$$.fragment, w), fe(g), fe(_), fe(i.$$.fragment, w), fe(s.$$.fragment, w), fe(u.$$.fragment, w), fe(v), m = !1;
    },
    d(w) {
      De(t, w), w && x(r), g && g.d(w), w && x(n), _ && _.d(w), w && x(a), De(i, w), w && x(o), De(s, w), w && x(l), De(u, w), w && x(f), w && x(d), S[h].d(), e[16](null);
    }
  };
}
function d0(e) {
  let t, r;
  return t = new gZ({ props: { data: (
    /*data*/
    e[1]
  ) } }), {
    c() {
      xe(t.$$.fragment);
    },
    m(n, a) {
      Ne(t, n, a), r = !0;
    },
    p(n, a) {
      const i = {};
      a[0] & /*data*/
      2 && (i.data = /*data*/
      n[1]), t.$set(i);
    },
    i(n) {
      r || (ne(t.$$.fragment, n), r = !0);
    },
    o(n) {
      fe(t.$$.fragment, n), r = !1;
    },
    d(n) {
      De(t, n);
    }
  };
}
function p0(e) {
  let t, r;
  return t = new TJ({
    props: {
      $$slots: { default: [Qee] },
      $$scope: { ctx: e }
    }
  }), {
    c() {
      xe(t.$$.fragment);
    },
    m(n, a) {
      Ne(t, n, a), r = !0;
    },
    p(n, a) {
      const i = {};
      a[0] & /*data*/
      2 | a[1] & /*$$scope*/
      256 && (i.$$scope = { dirty: a, ctx: n }), t.$set(i);
    },
    i(n) {
      r || (ne(t.$$.fragment, n), r = !0);
    },
    o(n) {
      fe(t.$$.fragment, n), r = !1;
    },
    d(n) {
      De(t, n);
    }
  };
}
function Qee(e) {
  let t, r;
  return t = new wZ({ props: { data: (
    /*data*/
    e[1]
  ) } }), {
    c() {
      xe(t.$$.fragment);
    },
    m(n, a) {
      Ne(t, n, a), r = !0;
    },
    p(n, a) {
      const i = {};
      a[0] & /*data*/
      2 && (i.data = /*data*/
      n[1]), t.$set(i);
    },
    i(n) {
      r || (ne(t.$$.fragment, n), r = !0);
    },
    o(n) {
      fe(t.$$.fragment, n), r = !1;
    },
    d(n) {
      De(t, n);
    }
  };
}
function Zee(e) {
  let t, r, n, a, i;
  function o(f) {
    e[13](f);
  }
  function s(f) {
    e[14](f);
  }
  function l(f) {
    e[15](f);
  }
  let u = {
    itemHeight: 20,
    items: (
      /*samples*/
      e[2]
    ),
    $$slots: {
      default: [
        tte,
        ({ item: f }) => ({ 38: f }),
        ({ item: f }) => [0, f ? 128 : 0]
      ]
    },
    $$scope: { ctx: e }
  };
  return (
    /*viewport*/
    e[6] !== void 0 && (u.viewport = /*viewport*/
    e[6]), /*start*/
    e[0] !== void 0 && (u.start = /*start*/
    e[0]), /*end*/
    e[3] !== void 0 && (u.end = /*end*/
    e[3]), t = new rZ({ props: u }), lt.push(() => mn(
      t,
      "viewport",
      o,
      /*viewport*/
      e[6]
    )), lt.push(() => mn(
      t,
      "start",
      s,
      /*start*/
      e[0]
    )), lt.push(() => mn(
      t,
      "end",
      l,
      /*end*/
      e[3]
    )), {
      c() {
        xe(t.$$.fragment);
      },
      m(f, d) {
        Ne(t, f, d), i = !0;
      },
      p(f, d) {
        const h = {};
        d[0] & /*samples*/
        4 && (h.items = /*samples*/
        f[2]), d[0] & /*data*/
        2 | d[1] & /*$$scope, item*/
        384 && (h.$$scope = { dirty: d, ctx: f }), !r && d[0] & /*viewport*/
        64 && (r = !0, h.viewport = /*viewport*/
        f[6], hn(() => r = !1)), !n && d[0] & /*start*/
        1 && (n = !0, h.start = /*start*/
        f[0], hn(() => n = !1)), !a && d[0] & /*end*/
        8 && (a = !0, h.end = /*end*/
        f[3], hn(() => a = !1)), t.$set(h);
      },
      i(f) {
        i || (ne(t.$$.fragment, f), i = !0);
      },
      o(f) {
        fe(t.$$.fragment, f), i = !1;
      },
      d(f) {
        De(t, f);
      }
    }
  );
}
function ete(e) {
  let t, r;
  return t = new xee({
    props: {
      data: (
        /*data*/
        e[1]
      ),
      samples: (
        /*samples*/
        e[2]
      )
    }
  }), {
    c() {
      xe(t.$$.fragment);
    },
    m(n, a) {
      Ne(t, n, a), r = !0;
    },
    p(n, a) {
      const i = {};
      a[0] & /*data*/
      2 && (i.data = /*data*/
      n[1]), a[0] & /*samples*/
      4 && (i.samples = /*samples*/
      n[2]), t.$set(i);
    },
    i(n) {
      r || (ne(t.$$.fragment, n), r = !0);
    },
    o(n) {
      fe(t.$$.fragment, n), r = !1;
    },
    d(n) {
      De(t, n);
    }
  };
}
function tte(e) {
  let t, r;
  return t = new Kee({
    props: {
      data: (
        /*data*/
        e[1]
      ),
      item: (
        /*item*/
        e[38]
      ),
      sampleId: (
        /*item*/
        e[38][0]
      )
    }
  }), {
    c() {
      xe(t.$$.fragment);
    },
    m(n, a) {
      Ne(t, n, a), r = !0;
    },
    p(n, a) {
      const i = {};
      a[0] & /*data*/
      2 && (i.data = /*data*/
      n[1]), a[1] & /*item*/
      128 && (i.item = /*item*/
      n[38]), a[1] & /*item*/
      128 && (i.sampleId = /*item*/
      n[38][0]), t.$set(i);
    },
    i(n) {
      r || (ne(t.$$.fragment, n), r = !0);
    },
    o(n) {
      fe(t.$$.fragment, n), r = !1;
    },
    d(n) {
      De(t, n);
    }
  };
}
function rte(e) {
  let t, r, n, a, i, o = (
    /*showLoadingAnimation*/
    e[5] && c0()
  );
  const s = [Xee, Yee], l = [];
  function u(f, d) {
    return (
      /*data*/
      f[1] !== !1 ? 0 : 1
    );
  }
  return n = u(e), a = l[n] = s[n](e), {
    c() {
      t = y("div"), o && o.c(), r = T(), a.c(), c(t, "id", "tracks-container"), O(t, "position", "relative"), O(t, "box-sizing", "border-box");
    },
    m(f, d) {
      L(f, t, d), o && o.m(t, null), p(t, r), l[n].m(t, null), i = !0;
    },
    p(f, d) {
      /*showLoadingAnimation*/
      f[5] ? o ? d[0] & /*showLoadingAnimation*/
      32 && ne(o, 1) : (o = c0(), o.c(), ne(o, 1), o.m(t, r)) : o && (Je(), fe(o, 1, 1, () => {
        o = null;
      }), Ye());
      let h = n;
      n = u(f), n === h ? l[n].p(f, d) : (Je(), fe(l[h], 1, 1, () => {
        l[h] = null;
      }), Ye(), a = l[n], a ? a.p(f, d) : (a = l[n] = s[n](f), a.c()), ne(a, 1), a.m(t, null));
    },
    i(f) {
      i || (ne(o), ne(a), i = !0);
    },
    o(f) {
      fe(o), fe(a), i = !1;
    },
    d(f) {
      f && x(t), o && o.d(), l[n].d();
    }
  };
}
function nte(e, t, r) {
  let n, a, i, o;
  const s = We("app");
  let { appId: l, eventbus: u, controller: f } = s.app();
  const d = We("rootElem"), { settings: h, groups: v, sortSettings: m, variantFilterSettings: g, filteredVariantsCoordinates: _ } = Et();
  dt(e, h, (I) => r(7, i = I)), dt(e, v, (I) => r(20, a = I)), dt(e, m, (I) => r(19, n = I)), dt(e, g, (I) => r(21, o = I));
  let b = !1, S, k, w, C;
  function E(I) {
    let J = [
      "#F9ACAA",
      "#FCD9B6",
      "#FFF9C2",
      "#A2F5BF",
      "#A0F0ED",
      "#BCDEFA",
      "#B2B7FF",
      "#FFBBCA",
      "#EF5753",
      "#FAAD63",
      "#FFF382",
      "#51D88A",
      "#64D5CA",
      "#6CB2EB",
      "#7886D7",
      "#FA7EA8"
    ], G = I.sampleIds, z = G.slice(), K = [], te = [], de = [];
    if (I.sortSettings.sortmode === "alphabetical") {
      let oe = G.slice();
      if (f.config.samplesMetadata !== !1 && Object.values(f.config.samplesMetadata)[0].displayName !== void 0) {
        let X = [];
        oe.forEach((B) => {
          X.push([B, f.config.samplesMetadata[B].displayName]);
        }), X.sort((B, ue) => B[1].localeCompare(ue[1])), z = X.map((B) => B[0]);
      } else
        I.sortSettings.sortorder !== void 0 && (oe.sort((X, B) => X.localeCompare(B)), z = oe.slice());
      I.sortSettings.sortorder === "DESC" && z.reverse();
    }
    if (I.sortSettings.sortmode === "genetic_distance" && I.sortSettings.sortorder !== void 0) {
      let oe = I.distances.slice();
      oe.sort((X, B) => X[1] - B[1]), I.sortSettings.sortorder === "DESC" && oe.reverse(), z = oe.map((X) => X[0]);
    }
    if (I.groups !== void 0 && Object.keys(I.groups).length > 0) {
      te = Object.values(I.groups).flat(), de = Object.keys(I.groups);
      for (let oe of te)
        z = z.filter((X) => X !== oe);
      z = [...Object.keys(I.groups), ...z];
    }
    for (let oe of z) {
      let X = {}, B = {};
      if (de.includes(oe) ? (B[oe] = J.shift(), X = {
        status: "group-root",
        color: B[oe]
      }) : (X = { status: "single", color: "#FFFFFF" }, f.config.samplesMetadata !== void 0 && f.config.samplesMetadata[oe] !== void 0 && (X.metadata = f.config.samplesMetadata[oe])), K.push([oe, X]), de.includes(oe)) {
        let ue = I.groups[oe].sort(), se = ue.length, N = 1;
        for (let ce of ue) {
          let ye = !1;
          N == se && (ye = !0), X = {
            status: "group-node",
            color: B[oe],
            isLastNode: ye
          }, K.push([ce, X]), N += 1;
        }
      }
    }
    return K;
  }
  function A(I) {
    if (I === !1)
      return !1;
    let J = [
      "variants_coordinates",
      "maf",
      "missing_freq",
      "heterozygosity_freq",
      "vcf_qual"
    ], G = {
      variants_coordinates: I.variants_coordinates,
      maf: I.per_variant_stats.maf,
      missing_freq: I.per_variant_stats.missing_freq,
      heterozygosity_freq: I.per_variant_stats.heterozygosity_freq,
      vcf_qual: I.per_variant_stats.vcf_qual
    };
    return new P2(G, J);
  }
  function D(I) {
    o.filterByMaf === !0 && (I = I.filter((G) => G.get("maf") >= o.maf[0] && G.get("maf") <= o.maf[1])), o.filterByMissingFreq === !0 && (I = I.filter((G) => G.get("missing_freq") >= o.missingFreq[0] && G.get("missing_freq") <= o.missingFreq[1])), o.filterByHeteroFreq === !0 && (I = I.filter((G) => G.get("heterozygosity_freq") >= o.heteroFreq[0] && G.get("heterozygosity_freq") <= o.heteroFreq[1])), o.filterByVcfQual === !0 && (I = I.filter((G) => G.get("vcf_qual") >= o.vcfQual[0] && G.get("vcf_qual") <= o.vcfQual[1]));
    let J = I.toArray("variants_coordinates");
    return _.set(J), J;
  }
  function F(I) {
    if (k !== void 0 && w !== void 0 && i.statusShowMinimap === !1 && I !== void 0 && I.length > 0) {
      let J = I.slice(k, w).map((G) => G[0]);
      f.DataLoader.lazyLoadVariantCalls(J);
    }
  }
  function R() {
    b !== !1 && b.error === void 0 && (r(1, b.filtered_variants_coordinates = D(A(b)), b), r(2, S = E({
      sampleIds: f.config.samples,
      // Object.keys(data.variants)
      distances: b.hamming_distances_to_reference,
      groups: a,
      sortSettings: n
    })), F(S), r(
      1,
      b.ref_and_alt = b.alternates.map((I, J) => {
        let G = I.slice();
        return G.unshift(b.reference[J]), G;
      }),
      b
    ));
  }
  m.subscribe((I) => {
    R();
  });
  const $ = mi(() => R(), 500);
  g.subscribe(() => {
    $();
  }), u.on("data:display:changed", (I) => {
    r(1, b = I), R();
  });
  const j = mi(
    (I) => {
      F(S);
    },
    200
  );
  let V = !1;
  u.on("loading:animation", (I) => {
    r(5, V = I.status);
  });
  let re = {
    delay: 0,
    //appendTo: 'parent',
    //appendTo: document.querySelector('#tracks-container'),
    appendTo: d,
    target: "." + l + " span.snp",
    //target: 'span.snp', // tracks-container
    animation: !1,
    content: "<span class='tooltip'></span>",
    placement: "bottom",
    allowHTML: !0,
    onShow(I) {
      let J = I.reference.dataset.sampleId, G = I.reference.dataset.position, z = I.reference.dataset.positionIndex, K = [];
      b.reference[z].length > 1 ? K.push("Variant type: INDEL") : K.push("Variant type: SNP"), K.push("Position: " + G), K.push("Reference Allele: " + b.reference[z]);
      let te = [];
      for (let B of b.alternates[z])
        B.length > 0 && te.push(B);
      te.length > 1 ? K.push("Alternate Alleles: " + te.join(" / ")) : K.push("Alternate Allele: " + te.join(" / "));
      let de = [b.reference[z], ...b.alternates[z]], oe = b.calls.get(J)[z], X = [...new Set(oe)];
      if (X.length == 1 && X[0] === -1)
        K.push("Variant called: none");
      else {
        let B = X.map((ue, se) => de[ue]);
        K.push("Variant called: " + B.join(" or "));
      }
      b.calls_metadata !== void 0 && (b.calls_metadata.DP !== void 0 && K.push("DP: " + b.calls_metadata.DP.get(J)[z]), b.calls_metadata.DV !== void 0 && K.push("DV: " + b.calls_metadata.DV.get(J)[z])), I.setContent(K.join("<br />"));
    }
  }, q = !1;
  qr(async () => {
    q === !1 && (Ma(d.querySelector("#tracks-container"), re), q = !0);
  });
  let ee;
  u.on("minimap:click", (I) => {
    console.log("EVENT: minimap:click"), ee.scrollTo(0, I.y * 23);
  });
  function Y(I) {
    ee = I, r(6, ee);
  }
  function ae(I) {
    k = I, r(0, k);
  }
  function M(I) {
    w = I, r(3, w);
  }
  function P(I) {
    lt[I ? "unshift" : "push"](() => {
      C = I, r(4, C);
    });
  }
  return e.$$.update = () => {
    e.$$.dirty[0] & /*start*/
    1 && j(k);
  }, [
    k,
    b,
    S,
    w,
    C,
    V,
    ee,
    i,
    l,
    h,
    v,
    m,
    g,
    Y,
    ae,
    M,
    P
  ];
}
class ate extends Ue {
  constructor(t) {
    super(), qe(this, t, nte, rte, Be, {}, Jee, [-1, -1]);
  }
}
function ite(e) {
  rt(e, "svelte-nu515o", `*,
*::before,
*::after{box-sizing:border-box}:host{font-size:15px;all:initial}.divbrowse-container.svelte-nu515o{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:15px;border:1px solid #000000;padding:10px;font-family:'Arial', sans-serif;background:#dcdcdc}#tracks-renderer-container.svelte-nu515o{border:1px solid #464646;background:#ffffff;min-height:300px}.divbrowse-form-control{padding:4px 8px;margin:0px;border:1px solid #787878;border-radius:2px;margin-right:5px}select.divbrowse-form-control{padding:2px 8px;height:30px}input.divbrowse-form-control{padding:2px 8px;height:30px}.divbrowse-btn{height:30px;padding:1px 8px;border-radius:4px;cursor:pointer}.divbrowse-btn-light{box-shadow:inset 1px 1px 1px 0px #FFF, inset -1px -1px 0px 0px rgba(0, 0, 0, 0.4);border-radius:2px;background:#f8f9fa;background:linear-gradient(to bottom, #f0f0f0, #e0e0e0);border:1px solid #b4b4b4;border-top:1px solid #969696;border-left:1px solid #969696}.divbrowse-btn-light:hover{background:#f8f9fa;background:linear-gradient(to bottom, #f0f0f0, #e0e0e0);border:1px solid #969696}.divbrowse-btn-light[disabled]{opacity:0.6}.divbrowse-btn-light[disabled]:hover{background:#f8f9fa;background:linear-gradient(to bottom, #f8f9fa, #e9e9e9);border:1px solid #c8c8c8}.clearfix{display:flow-root}div.track{height:20px;box-sizing:border-box;padding-top:0px;display:flex;align-items:center;justify-content:flex-start}div.track.reference{font-weight:500;height:39px}div.track.positions{border-bottom:1px solid #dcdcdc;height:100px;box-sizing:border-box}div.track.positions>div.label{height:100px}span.snp{font-family:'Source Code Pro', monospace;display:inline-block;text-align:center;margin:0;padding:0;box-sizing:border-box;min-height:20px;display:inline-flex;align-items:center;justify-content:center;border-radius:1px;margin-right:0px;font-size:13px;line-height:13px;font-weight:500}span.positions{writing-mode:vertical-rl;box-sizing:border-box;height:100px;display:inline-flex;align-items:center;justify-content:flex-start;border:0px solid black;border-left:1px solid #c8c8c8;border-right:1px solid white;padding-top:10px;font-size:12px;line-height:12px;font-weight:500}span.positions.highlight{background-color:#c8c8c8 !important}span.reference.ref-A:before{content:"A"}span.reference.ref-G:before{content:"G"}span.reference.ref-T:before{content:"T"}span.reference.ref-C:before{content:"C"}span.reference.ref-indel{border:1px solid black;font-size:11px !important}span.reference.ref-indel:before{content:"IN"}span.reference.ref-A{background-color:#2ecc71}span.reference.ref-G{background-color:#f1c40f}span.reference.ref-T{background-color:#e74c3c}span.reference.ref-C{background-color:#3498db}span.reference.noletter:before{content:"" !important}#tracks-renderer-container.colorblind span.reference.ref-A{background-color:#F0E442}#tracks-renderer-container.colorblind span.reference.ref-G{background-color:#a6cee3}#tracks-renderer-container.colorblind span.reference.ref-T{background-color:#E69F00}#tracks-renderer-container.colorblind span.reference.ref-C{background-color:#1f78b4}span.snp.snp--1{background-color:white}span.snp.snp--1:before{content:"\\00a0"}span.snp.snp-0{background-color:#dbf0d8;color:#bebebe}span.snp.snp-0.ref-A:before{content:"A"}span.snp.snp-0.ref-G:before{content:"G"}span.snp.snp-0.ref-T:before{content:"T"}span.snp.snp-0.ref-C:before{content:"C"}span.snp.snp-0.ref-indel{border:1px solid black;font-size:11px !important}span.snp.snp-0.ref-indel:before{content:"IN"}span.snp.snp-1{background-color:#ff8847}span.snp.snp-1.ref-T.alt-C:before,span.snp.snp-1.alt-T.ref-C:before{content:"Y"}span.snp.snp-1.ref-T.alt-G:before,span.snp.snp-1.ref-G.alt-T:before{content:"K"}span.snp.snp-1.ref-C.alt-A:before,span.snp.snp-1.ref-A.alt-C:before{content:"M"}span.snp.snp-1.ref-C.alt-G:before,span.snp.snp-1.ref-G.alt-C:before{content:"S"}span.snp.snp-1.ref-T.alt-A:before,span.snp.snp-1.ref-A.alt-T:before{content:"W"}span.snp.snp-1.ref-G.alt-A:before,span.snp.snp-1.ref-A.alt-G:before{content:"R"}span.snp.snp-2{background-color:#99bfde}span.snp.snp-2.alt-A:before{content:"A"}span.snp.snp-2.alt-G:before{content:"G"}span.snp.snp-2.alt-T:before{content:"T"}span.snp.snp-2.alt-C:before{content:"C"}span.snp.noletter:before{content:"" !important}#tracks-renderer-container.nucleotides span.snp.snp--1{background-color:white}#tracks-renderer-container.nucleotides span.snp.snp--1:before{content:"\\00a0"}#tracks-renderer-container.nucleotides span.snp.snp-0{border:0px solid black;color:black}#tracks-renderer-container.nucleotides span.snp.snp-0.ref-A:before{content:"A"}#tracks-renderer-container.nucleotides span.snp.snp-0.ref-G:before{content:"G"}#tracks-renderer-container.nucleotides span.snp.snp-0.ref-T:before{content:"T"}#tracks-renderer-container.nucleotides span.snp.snp-0.ref-C:before{content:"C"}#tracks-renderer-container.nucleotides span.snp.snp-0.ref-indel{border:1px solid black;font-size:11px !important}#tracks-renderer-container.nucleotides span.snp.snp-0.ref-indel:before{content:"IN"}#tracks-renderer-container.nucleotides span.snp.snp-0.ref-A{background-color:#2ecc71}#tracks-renderer-container.nucleotides span.snp.snp-0.ref-G{background-color:#f1c40f}#tracks-renderer-container.nucleotides span.snp.snp-0.ref-T{background-color:#e74c3c}#tracks-renderer-container.nucleotides span.snp.snp-0.ref-C{background-color:#3498db}#tracks-renderer-container.nucleotides span.snp.snp-1{background-color:#aa34ff}#tracks-renderer-container.nucleotides span.snp.snp-1.ref-T.alt-C:before,#tracks-renderer-container.nucleotides span.snp.snp-1.alt-T.ref-C:before{content:"Y"}#tracks-renderer-container.nucleotides span.snp.snp-1.ref-T.alt-G:before,#tracks-renderer-container.nucleotides span.snp.snp-1.ref-G.alt-T:before{content:"K"}#tracks-renderer-container.nucleotides span.snp.snp-1.ref-C.alt-A:before,#tracks-renderer-container.nucleotides span.snp.snp-1.ref-A.alt-C:before{content:"M"}#tracks-renderer-container.nucleotides span.snp.snp-1.ref-C.alt-G:before,#tracks-renderer-container.nucleotides span.snp.snp-1.ref-G.alt-C:before{content:"S"}#tracks-renderer-container.nucleotides span.snp.snp-1.ref-T.alt-A:before,#tracks-renderer-container.nucleotides span.snp.snp-1.ref-A.alt-T:before{content:"W"}#tracks-renderer-container.nucleotides span.snp.snp-1.ref-G.alt-A:before,#tracks-renderer-container.nucleotides span.snp.snp-1.ref-A.alt-G:before{content:"R"}#tracks-renderer-container.nucleotides span.snp.snp-2.alt-A:before{content:"A"}#tracks-renderer-container.nucleotides span.snp.snp-2.alt-G:before{content:"G"}#tracks-renderer-container.nucleotides span.snp.snp-2.alt-T:before{content:"T"}#tracks-renderer-container.nucleotides span.snp.snp-2.alt-C:before{content:"C"}#tracks-renderer-container.nucleotides span.snp.snp-2.alt-A{background-color:#2ecc71}#tracks-renderer-container.nucleotides span.snp.snp-2.alt-G{background-color:#f1c40f}#tracks-renderer-container.nucleotides span.snp.snp-2.alt-T{background-color:#e74c3c}#tracks-renderer-container.nucleotides span.snp.snp-2.alt-C{background-color:#3498db}#tracks-renderer-container.colorblind.nucleotides span.snp.snp--1{background-color:white}#tracks-renderer-container.colorblind.nucleotides span.snp.snp--1:before{content:"\\00a0"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-0{color:black}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-0.ref-A:before{content:"A"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-0.ref-G:before{content:"G"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-0.ref-T:before{content:"T"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-0.ref-C:before{content:"C"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-0.ref-indel{border:1px solid black;font-size:11px !important}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-0.ref-indel:before{content:"IN"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-0.ref-A{background-color:#F0E442}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-0.ref-G{background-color:#a6cee3}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-0.ref-T{background-color:#E69F00}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-0.ref-C{background-color:#1f78b4}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-1{background-color:#aa34ff}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-1.ref-T.alt-C:before,#tracks-renderer-container.colorblind.nucleotides span.snp.snp-1.alt-T.ref-C:before{content:"Y"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-1.ref-T.alt-G:before,#tracks-renderer-container.colorblind.nucleotides span.snp.snp-1.ref-G.alt-T:before{content:"K"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-1.ref-C.alt-A:before,#tracks-renderer-container.colorblind.nucleotides span.snp.snp-1.ref-A.alt-C:before{content:"M"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-1.ref-C.alt-G:before,#tracks-renderer-container.colorblind.nucleotides span.snp.snp-1.ref-G.alt-C:before{content:"S"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-1.ref-T.alt-A:before,#tracks-renderer-container.colorblind.nucleotides span.snp.snp-1.ref-A.alt-T:before{content:"W"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-1.ref-G.alt-A:before,#tracks-renderer-container.colorblind.nucleotides span.snp.snp-1.ref-A.alt-G:before{content:"R"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-2.alt-A:before{content:"A"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-2.alt-G:before{content:"G"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-2.alt-T:before{content:"T"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-2.alt-C:before{content:"C"}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-2.alt-A{background-color:#F0E442}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-2.alt-G{background-color:#a6cee3}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-2.alt-T{background-color:#E69F00}#tracks-renderer-container.colorblind.nucleotides span.snp.snp-2.alt-C{background-color:#1f78b4}`);
}
function ote(e) {
  let t, r;
  return t = new ate({}), {
    c() {
      xe(t.$$.fragment);
    },
    m(n, a) {
      Ne(t, n, a), r = !0;
    },
    p: he,
    i(n) {
      r || (ne(t.$$.fragment, n), r = !0);
    },
    o(n) {
      fe(t.$$.fragment, n), r = !1;
    },
    d(n) {
      De(t, n);
    }
  };
}
function ste(e) {
  let t, r, n, a = (
    /*data*/
    e[2].error + ""
  ), i;
  return {
    c() {
      t = y("div"), r = y("p"), n = Q("Error: "), i = Q(a), O(r, "padding", "30px");
    },
    m(o, s) {
      L(o, t, s), p(t, r), p(r, n), p(r, i);
    },
    p(o, s) {
      s & /*data*/
      4 && a !== (a = /*data*/
      o[2].error + "") && _e(i, a);
    },
    i: he,
    o: he,
    d(o) {
      o && x(t);
    }
  };
}
function lte(e) {
  let t, r;
  return {
    c() {
      t = y("div"), r = y("p"), r.textContent = `The size of your collection exceeds the maximum of ${v0} samples to be displayed simultaneously.
        Please decrease the size of your collection below the value of ${v0} samples.`, O(r, "padding", "30px");
    },
    m(n, a) {
      L(n, t, a), p(t, r);
    },
    p: he,
    i: he,
    o: he,
    d(n) {
      n && x(t);
    }
  };
}
function ute(e) {
  let t, r, n, a, i, o, s, l, u, f, d, h, v, m;
  r = new PJ({});
  const g = [lte, ste, ote], _ = [];
  function b(S, k) {
    return (
      /*data*/
      S[2].error !== void 0 ? 1 : 2
    );
  }
  return i = b(e), o = _[i] = g[i](e), l = new jJ({}), f = new _X({}), {
    c() {
      t = y("div"), xe(r.$$.fragment), n = T(), a = y("div"), o.c(), s = T(), xe(l.$$.fragment), u = T(), xe(f.$$.fragment), d = T(), h = y("script"), c(a, "id", "tracks-renderer-container"), c(a, "class", "svelte-nu515o"), ve(
        a,
        "colorblind",
        /*$settings*/
        e[3].statusColorblindMode
      ), ve(
        a,
        "nucleotides",
        /*$settings*/
        e[3].variantDisplayMode === "nucleotides"
      ), c(
        t,
        "id",
        /*appId*/
        e[0]
      ), c(t, "class", "divbrowse-container svelte-nu515o"), Uu(h.src, v = "https://cdnjs.cloudflare.com/ajax/libs/plotly.js/2.8.0/plotly.min.js") || c(h, "src", v);
    },
    m(S, k) {
      L(S, t, k), Ne(r, t, null), p(t, n), p(t, a), _[i].m(a, null), e[10](a), p(t, s), Ne(l, t, null), p(t, u), Ne(f, t, null), L(S, d, k), p(document.head, h), m = !0;
    },
    p(S, [k]) {
      let w = i;
      i = b(S), i === w ? _[i].p(S, k) : (Je(), fe(_[w], 1, 1, () => {
        _[w] = null;
      }), Ye(), o = _[i], o ? o.p(S, k) : (o = _[i] = g[i](S), o.c()), ne(o, 1), o.m(a, null)), (!m || k & /*$settings*/
      8) && ve(
        a,
        "colorblind",
        /*$settings*/
        S[3].statusColorblindMode
      ), (!m || k & /*$settings*/
      8) && ve(
        a,
        "nucleotides",
        /*$settings*/
        S[3].variantDisplayMode === "nucleotides"
      ), (!m || k & /*appId*/
      1) && c(
        t,
        "id",
        /*appId*/
        S[0]
      );
    },
    i(S) {
      m || (ne(r.$$.fragment, S), ne(o), ne(l.$$.fragment, S), ne(f.$$.fragment, S), m = !0);
    },
    o(S) {
      fe(r.$$.fragment, S), fe(o), fe(l.$$.fragment, S), fe(f.$$.fragment, S), m = !1;
    },
    d(S) {
      S && x(t), De(r), _[i].d(), e[10](null), De(l), De(f), S && x(d), x(h);
    }
  };
}
let v0 = 5e3;
function fte(e, t) {
  new IntersectionObserver((r, n) => {
    r.forEach((a) => {
      a.intersectionRatio > 0 && (t(e), n.disconnect());
    });
  }).observe(e);
}
function cte(e, t, r) {
  let n, { config: a } = t, { appId: i } = t, { rootElem: o } = t;
  ss("rootElem", o);
  const s = new a4(), l = new mJ(s), u = { appId: i, eventbus: s, controller: l };
  ss("app", { app: () => u });
  const { settings: f, groups: d } = Et();
  dt(e, f, (S) => r(3, n = S));
  function h(S) {
    l.setSamples(S);
  }
  function v(S, k) {
    l.goToChromosomeAndPosition(S, k);
  }
  function m(S) {
    d.set(S);
  }
  let g;
  s.on("metadata:loaded", (S) => {
    fte(g, () => {
      l.draw();
    });
    let k = !1, w = () => {
      new ResizeObserver(mi(
        function(E) {
          k === !1 ? k = !0 : E[0].contentBoxSize[0].inlineSize > 0 && l.draw();
        },
        500
      )).observe(g);
    };
    setTimeout(() => w(), 1e3);
  }), qr(async () => {
    l.setup({ tracksRendererContainer: g, config: a }), o.addEventListener(
      "mouseenter",
      function(S) {
        if (S.target.matches("div#" + i + " .variant-hover")) {
          let k = S.target.dataset.position, w = o.querySelector("#snp-" + k);
          w.classList.add("highlight-snp"), w = o.querySelector("#variant-bezier-" + k), w.classList.add("highlight-variant-bezier");
        }
      },
      !0
    ), o.addEventListener(
      "mouseleave",
      function(S) {
        if (S.target.matches("div#" + i + " .variant-hover")) {
          let k = S.target.dataset.position, w = o.querySelector("#snp-" + k);
          w.classList.remove("highlight-snp"), w = o.querySelector("#variant-bezier-" + k), w.classList.remove("highlight-variant-bezier");
        }
      },
      !0
    );
  });
  let _ = !1;
  s.on("data:display:changed", (S) => {
    r(2, _ = S);
  });
  function b(S) {
    lt[S ? "unshift" : "push"](() => {
      g = S, r(1, g);
    });
  }
  return e.$$set = (S) => {
    "config" in S && r(5, a = S.config), "appId" in S && r(0, i = S.appId), "rootElem" in S && r(6, o = S.rootElem);
  }, [
    i,
    g,
    _,
    n,
    f,
    a,
    o,
    h,
    v,
    m,
    b
  ];
}
class dte extends Ue {
  constructor(t) {
    super(), qe(
      this,
      t,
      cte,
      ute,
      Be,
      {
        config: 5,
        appId: 0,
        rootElem: 6,
        setSamples: 7,
        goToChromosomeAndPosition: 8,
        setGroups: 9
      },
      ite
    );
  }
  get setSamples() {
    return this.$$.ctx[7];
  }
  get goToChromosomeAndPosition() {
    return this.$$.ctx[8];
  }
  get setGroups() {
    return this.$$.ctx[9];
  }
}
function pte(e, t) {
  let r = "#" + e, n = document.querySelector(r), a;
  a = n.attachShadow({ mode: "open" });
  let i = Object.assign({}, t);
  return new dte({
    target: a,
    props: {
      config: i,
      appId: "divbrowse-" + e,
      rootElem: a
    }
  });
}
window.divbrowse = {
  startApp: pte
};
//# sourceMappingURL=divbrowse.js.map
