import { getCurrentScope as Tee, onScopeDispose as im, unref as z, getCurrentInstance as In, onMounted as _t, nextTick as Bt, ref as ee, readonly as Pee, watch as me, defineComponent as ae, openBlock as be, createElementBlock as Ue, createElementVNode as tt, warn as oxe, computed as V, watchEffect as Vt, onBeforeUnmount as Qt, inject as et, isRef as Vs, shallowRef as ve, onBeforeMount as $ee, provide as Et, mergeProps as Xn, renderSlot as dn, toRef as Lr, onUnmounted as qu, useAttrs as sxe, useSlots as D_, createCommentVNode as Ot, Fragment as Wt, normalizeClass as Ge, createBlock as Je, withCtx as ke, resolveDynamicComponent as As, withModifiers as ai, createVNode as D, toDisplayString as xi, normalizeStyle as dr, withDirectives as _r, cloneVNode as ku, Text as KT, Comment as Aee, Teleport as R_, Transition as mo, vShow as ho, onDeactivated as lxe, reactive as zn, toRaw as es, vModelCheckbox as Bw, createTextVNode as Pn, toRefs as k_, vModelRadio as Eee, toHandlers as uxe, renderList as hh, withKeys as gF, h as ff, createSlots as cxe, resolveComponent as $r, onUpdated as rp, isVNode as df, triggerRef as fxe, resolveDirective as dxe, render as Ih, onBeforeUpdate as Mee, TransitionGroup as X4, onActivated as hxe, createApp as pxe, pushScopeId as JT, popScopeId as e2 } from "vue";
var kr = /* @__PURE__ */ ((t) => (t[t.STATIC = 0] = "STATIC", t[t.API = 1] = "API", t[t.BASIC_PATH = 2] = "BASIC_PATH", t[t.VIEW_CODE = 3] = "VIEW_CODE", t))(kr || {});
const mu = (t, e, { checkForDefaultPrevented: n = !0 } = {}) => (i) => {
  const a = t == null ? void 0 : t(i);
  if (n === !1 || !a)
    return e == null ? void 0 : e(i);
};
var mF;
const Fr = typeof window < "u", vxe = (t) => typeof t == "string", Iee = () => {
}, gxe = Fr && ((mF = window == null ? void 0 : window.navigator) == null ? void 0 : mF.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function Y4(t) {
  return typeof t == "function" ? t() : z(t);
}
function mxe(t) {
  return t;
}
function t2(t) {
  return Tee() ? (im(t), !0) : !1;
}
function yxe(t, e = !0) {
  In() ? _t(t) : e ? t() : Bt(t);
}
function yF(t, e, n = {}) {
  const {
    immediate: r = !0
  } = n, i = ee(!1);
  let a = null;
  function o() {
    a && (clearTimeout(a), a = null);
  }
  function s() {
    i.value = !1, o();
  }
  function l(...u) {
    o(), i.value = !0, a = setTimeout(() => {
      i.value = !1, a = null, t(...u);
    }, Y4(e));
  }
  return r && (i.value = !0, Fr && l()), t2(s), {
    isPending: Pee(i),
    start: l,
    stop: s
  };
}
function zc(t) {
  var e;
  const n = Y4(t);
  return (e = n == null ? void 0 : n.$el) != null ? e : n;
}
const q4 = Fr ? window : void 0;
function Iy(...t) {
  let e, n, r, i;
  if (vxe(t[0]) || Array.isArray(t[0]) ? ([n, r, i] = t, e = q4) : [e, n, r, i] = t, !e)
    return Iee;
  Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
  const a = [], o = () => {
    a.forEach((c) => c()), a.length = 0;
  }, s = (c, f, d, h) => (c.addEventListener(f, d, h), () => c.removeEventListener(f, d, h)), l = me(() => [zc(e), Y4(i)], ([c, f]) => {
    o(), c && a.push(...n.flatMap((d) => r.map((h) => s(c, d, h, f))));
  }, { immediate: !0, flush: "post" }), u = () => {
    l(), o();
  };
  return t2(u), u;
}
let bF = !1;
function bxe(t, e, n = {}) {
  const { window: r = q4, ignore: i = [], capture: a = !0, detectIframe: o = !1 } = n;
  if (!r)
    return;
  gxe && !bF && (bF = !0, Array.from(r.document.body.children).forEach((d) => d.addEventListener("click", Iee)));
  let s = !0;
  const l = (d) => i.some((h) => {
    if (typeof h == "string")
      return Array.from(r.document.querySelectorAll(h)).some((p) => p === d.target || d.composedPath().includes(p));
    {
      const p = zc(h);
      return p && (d.target === p || d.composedPath().includes(p));
    }
  }), c = [
    Iy(r, "click", (d) => {
      const h = zc(t);
      if (!(!h || h === d.target || d.composedPath().includes(h))) {
        if (d.detail === 0 && (s = !l(d)), !s) {
          s = !0;
          return;
        }
        e(d);
      }
    }, { passive: !0, capture: a }),
    Iy(r, "pointerdown", (d) => {
      const h = zc(t);
      h && (s = !d.composedPath().includes(h) && !l(d));
    }, { passive: !0 }),
    o && Iy(r, "blur", (d) => {
      var h;
      const p = zc(t);
      ((h = r.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(p != null && p.contains(r.document.activeElement)) && e(d);
    })
  ].filter(Boolean);
  return () => c.forEach((d) => d());
}
function _xe(t, e = !1) {
  const n = ee(), r = () => n.value = !!t();
  return r(), yxe(r, e), n;
}
const _F = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, OF = "__vueuse_ssr_handlers__";
_F[OF] = _F[OF] || {};
var SF = Object.getOwnPropertySymbols, Oxe = Object.prototype.hasOwnProperty, Sxe = Object.prototype.propertyIsEnumerable, xxe = (t, e) => {
  var n = {};
  for (var r in t)
    Oxe.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && SF)
    for (var r of SF(t))
      e.indexOf(r) < 0 && Sxe.call(t, r) && (n[r] = t[r]);
  return n;
};
function wxe(t, e, n = {}) {
  const r = n, { window: i = q4 } = r, a = xxe(r, ["window"]);
  let o;
  const s = _xe(() => i && "ResizeObserver" in i), l = () => {
    o && (o.disconnect(), o = void 0);
  }, u = me(() => zc(t), (f) => {
    l(), s.value && i && f && (o = new ResizeObserver(e), o.observe(f, a));
  }, { immediate: !0, flush: "post" }), c = () => {
    l(), u();
  };
  return t2(c), {
    isSupported: s,
    stop: c
  };
}
var xF;
(function(t) {
  t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
})(xF || (xF = {}));
var Cxe = Object.defineProperty, wF = Object.getOwnPropertySymbols, Txe = Object.prototype.hasOwnProperty, Pxe = Object.prototype.propertyIsEnumerable, CF = (t, e, n) => e in t ? Cxe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, $xe = (t, e) => {
  for (var n in e || (e = {}))
    Txe.call(e, n) && CF(t, n, e[n]);
  if (wF)
    for (var n of wF(e))
      Pxe.call(e, n) && CF(t, n, e[n]);
  return t;
};
const Axe = {
  easeInSine: [0.12, 0, 0.39, 0],
  easeOutSine: [0.61, 1, 0.88, 1],
  easeInOutSine: [0.37, 0, 0.63, 1],
  easeInQuad: [0.11, 0, 0.5, 0],
  easeOutQuad: [0.5, 1, 0.89, 1],
  easeInOutQuad: [0.45, 0, 0.55, 1],
  easeInCubic: [0.32, 0, 0.67, 0],
  easeOutCubic: [0.33, 1, 0.68, 1],
  easeInOutCubic: [0.65, 0, 0.35, 1],
  easeInQuart: [0.5, 0, 0.75, 0],
  easeOutQuart: [0.25, 1, 0.5, 1],
  easeInOutQuart: [0.76, 0, 0.24, 1],
  easeInQuint: [0.64, 0, 0.78, 0],
  easeOutQuint: [0.22, 1, 0.36, 1],
  easeInOutQuint: [0.83, 0, 0.17, 1],
  easeInExpo: [0.7, 0, 0.84, 0],
  easeOutExpo: [0.16, 1, 0.3, 1],
  easeInOutExpo: [0.87, 0, 0.13, 1],
  easeInCirc: [0.55, 0, 1, 0.45],
  easeOutCirc: [0, 0.55, 0.45, 1],
  easeInOutCirc: [0.85, 0, 0.15, 1],
  easeInBack: [0.36, 0, 0.66, -0.56],
  easeOutBack: [0.34, 1.56, 0.64, 1],
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
};
$xe({
  linear: mxe
}, Axe);
const Exe = () => Fr && /firefox/i.test(window.navigator.userAgent), K4 = (t) => {
  let e, n;
  return t.type === "touchend" ? (n = t.changedTouches[0].clientY, e = t.changedTouches[0].clientX) : t.type.startsWith("touch") ? (n = t.touches[0].clientY, e = t.touches[0].clientX) : (n = t.clientY, e = t.clientX), {
    clientX: e,
    clientY: n
  };
};
/**
* @vue/shared v3.4.31
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
process.env.NODE_ENV !== "production" && Object.freeze({});
process.env.NODE_ENV !== "production" && Object.freeze([]);
const Kc = () => {
}, Mxe = Object.prototype.hasOwnProperty, Dh = (t, e) => Mxe.call(t, e), dg = Array.isArray, Jd = (t) => typeof t == "function", ia = (t) => typeof t == "string", Rh = (t) => t !== null && typeof t == "object", Ixe = (t) => {
  const e = /* @__PURE__ */ Object.create(null);
  return (n) => e[n] || (e[n] = t(n));
}, Dxe = /-(\w)/g, Rxe = Ixe((t) => t.replace(Dxe, (e, n) => n ? n.toUpperCase() : ""));
var Dee = typeof global == "object" && global && global.Object === Object && global, kxe = typeof self == "object" && self && self.Object === Object && self, Ys = Dee || kxe || Function("return this")(), ts = Ys.Symbol, Ree = Object.prototype, Lxe = Ree.hasOwnProperty, Nxe = Ree.toString, p0 = ts ? ts.toStringTag : void 0;
function Bxe(t) {
  var e = Lxe.call(t, p0), n = t[p0];
  try {
    t[p0] = void 0;
    var r = !0;
  } catch {
  }
  var i = Nxe.call(t);
  return r && (e ? t[p0] = n : delete t[p0]), i;
}
var zxe = Object.prototype, Vxe = zxe.toString;
function Fxe(t) {
  return Vxe.call(t);
}
var Wxe = "[object Null]", Qxe = "[object Undefined]", TF = ts ? ts.toStringTag : void 0;
function Ef(t) {
  return t == null ? t === void 0 ? Qxe : Wxe : TF && TF in Object(t) ? Bxe(t) : Fxe(t);
}
function Fs(t) {
  return t != null && typeof t == "object";
}
var Hxe = "[object Symbol]";
function n2(t) {
  return typeof t == "symbol" || Fs(t) && Ef(t) == Hxe;
}
function r2(t, e) {
  for (var n = -1, r = t == null ? 0 : t.length, i = Array(r); ++n < r; )
    i[n] = e(t[n], n, t);
  return i;
}
var za = Array.isArray, Gxe = 1 / 0, PF = ts ? ts.prototype : void 0, $F = PF ? PF.toString : void 0;
function kee(t) {
  if (typeof t == "string")
    return t;
  if (za(t))
    return r2(t, kee) + "";
  if (n2(t))
    return $F ? $F.call(t) : "";
  var e = t + "";
  return e == "0" && 1 / t == -Gxe ? "-0" : e;
}
var jxe = /\s/;
function Zxe(t) {
  for (var e = t.length; e-- && jxe.test(t.charAt(e)); )
    ;
  return e;
}
var Uxe = /^\s+/;
function Xxe(t) {
  return t && t.slice(0, Zxe(t) + 1).replace(Uxe, "");
}
function Ti(t) {
  var e = typeof t;
  return t != null && (e == "object" || e == "function");
}
var AF = NaN, Yxe = /^[-+]0x[0-9a-f]+$/i, qxe = /^0b[01]+$/i, Kxe = /^0o[0-7]+$/i, Jxe = parseInt;
function WD(t) {
  if (typeof t == "number")
    return t;
  if (n2(t))
    return AF;
  if (Ti(t)) {
    var e = typeof t.valueOf == "function" ? t.valueOf() : t;
    t = Ti(e) ? e + "" : e;
  }
  if (typeof t != "string")
    return t === 0 ? t : +t;
  t = Xxe(t);
  var n = qxe.test(t);
  return n || Kxe.test(t) ? Jxe(t.slice(2), n ? 2 : 8) : Yxe.test(t) ? AF : +t;
}
var EF = 1 / 0, ewe = 17976931348623157e292;
function twe(t) {
  if (!t)
    return t === 0 ? t : 0;
  if (t = WD(t), t === EF || t === -EF) {
    var e = t < 0 ? -1 : 1;
    return e * ewe;
  }
  return t === t ? t : 0;
}
function nwe(t) {
  var e = twe(t), n = e % 1;
  return e === e ? n ? e - n : e : 0;
}
function J4(t) {
  return t;
}
var rwe = "[object AsyncFunction]", iwe = "[object Function]", awe = "[object GeneratorFunction]", owe = "[object Proxy]";
function eN(t) {
  if (!Ti(t))
    return !1;
  var e = Ef(t);
  return e == iwe || e == awe || e == rwe || e == owe;
}
var RA = Ys["__core-js_shared__"], MF = function() {
  var t = /[^.]+$/.exec(RA && RA.keys && RA.keys.IE_PROTO || "");
  return t ? "Symbol(src)_1." + t : "";
}();
function swe(t) {
  return !!MF && MF in t;
}
var lwe = Function.prototype, uwe = lwe.toString;
function ip(t) {
  if (t != null) {
    try {
      return uwe.call(t);
    } catch {
    }
    try {
      return t + "";
    } catch {
    }
  }
  return "";
}
var cwe = /[\\^$.*+?()[\]{}|]/g, fwe = /^\[object .+?Constructor\]$/, dwe = Function.prototype, hwe = Object.prototype, pwe = dwe.toString, vwe = hwe.hasOwnProperty, gwe = RegExp(
  "^" + pwe.call(vwe).replace(cwe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function mwe(t) {
  if (!Ti(t) || swe(t))
    return !1;
  var e = eN(t) ? gwe : fwe;
  return e.test(ip(t));
}
function ywe(t, e) {
  return t == null ? void 0 : t[e];
}
function ap(t, e) {
  var n = ywe(t, e);
  return mwe(n) ? n : void 0;
}
var QD = ap(Ys, "WeakMap"), IF = Object.create, bwe = /* @__PURE__ */ function() {
  function t() {
  }
  return function(e) {
    if (!Ti(e))
      return {};
    if (IF)
      return IF(e);
    t.prototype = e;
    var n = new t();
    return t.prototype = void 0, n;
  };
}();
function Lee(t, e, n) {
  switch (n.length) {
    case 0:
      return t.call(e);
    case 1:
      return t.call(e, n[0]);
    case 2:
      return t.call(e, n[0], n[1]);
    case 3:
      return t.call(e, n[0], n[1], n[2]);
  }
  return t.apply(e, n);
}
function _we() {
}
function Nee(t, e) {
  var n = -1, r = t.length;
  for (e || (e = Array(r)); ++n < r; )
    e[n] = t[n];
  return e;
}
var Owe = 800, Swe = 16, xwe = Date.now;
function wwe(t) {
  var e = 0, n = 0;
  return function() {
    var r = xwe(), i = Swe - (r - n);
    if (n = r, i > 0) {
      if (++e >= Owe)
        return arguments[0];
    } else
      e = 0;
    return t.apply(void 0, arguments);
  };
}
function Cwe(t) {
  return function() {
    return t;
  };
}
var zw = function() {
  try {
    var t = ap(Object, "defineProperty");
    return t({}, "", {}), t;
  } catch {
  }
}(), Twe = zw ? function(t, e) {
  return zw(t, "toString", {
    configurable: !0,
    enumerable: !1,
    value: Cwe(e),
    writable: !0
  });
} : J4, Bee = wwe(Twe);
function Pwe(t, e) {
  for (var n = -1, r = t == null ? 0 : t.length; ++n < r && e(t[n], n, t) !== !1; )
    ;
  return t;
}
function zee(t, e, n, r) {
  for (var i = t.length, a = n + -1; ++a < i; )
    if (e(t[a], a, t))
      return a;
  return -1;
}
function $we(t) {
  return t !== t;
}
function Awe(t, e, n) {
  for (var r = n - 1, i = t.length; ++r < i; )
    if (t[r] === e)
      return r;
  return -1;
}
function Ewe(t, e, n) {
  return e === e ? Awe(t, e, n) : zee(t, $we, n);
}
function Vee(t, e) {
  var n = t == null ? 0 : t.length;
  return !!n && Ewe(t, e, 0) > -1;
}
var Mwe = 9007199254740991, Iwe = /^(?:0|[1-9]\d*)$/;
function i2(t, e) {
  var n = typeof t;
  return e = e ?? Mwe, !!e && (n == "number" || n != "symbol" && Iwe.test(t)) && t > -1 && t % 1 == 0 && t < e;
}
function tN(t, e, n) {
  e == "__proto__" && zw ? zw(t, e, {
    configurable: !0,
    enumerable: !0,
    value: n,
    writable: !0
  }) : t[e] = n;
}
function L_(t, e) {
  return t === e || t !== t && e !== e;
}
var Dwe = Object.prototype, Rwe = Dwe.hasOwnProperty;
function nN(t, e, n) {
  var r = t[e];
  (!(Rwe.call(t, e) && L_(r, n)) || n === void 0 && !(e in t)) && tN(t, e, n);
}
function am(t, e, n, r) {
  var i = !n;
  n || (n = {});
  for (var a = -1, o = e.length; ++a < o; ) {
    var s = e[a], l = void 0;
    l === void 0 && (l = t[s]), i ? tN(n, s, l) : nN(n, s, l);
  }
  return n;
}
var DF = Math.max;
function Fee(t, e, n) {
  return e = DF(e === void 0 ? t.length - 1 : e, 0), function() {
    for (var r = arguments, i = -1, a = DF(r.length - e, 0), o = Array(a); ++i < a; )
      o[i] = r[e + i];
    i = -1;
    for (var s = Array(e + 1); ++i < e; )
      s[i] = r[i];
    return s[e] = n(o), Lee(t, this, s);
  };
}
function rN(t, e) {
  return Bee(Fee(t, e, J4), t + "");
}
var kwe = 9007199254740991;
function iN(t) {
  return typeof t == "number" && t > -1 && t % 1 == 0 && t <= kwe;
}
function om(t) {
  return t != null && iN(t.length) && !eN(t);
}
function Lwe(t, e, n) {
  if (!Ti(n))
    return !1;
  var r = typeof e;
  return (r == "number" ? om(n) && i2(e, n.length) : r == "string" && e in n) ? L_(n[e], t) : !1;
}
function Nwe(t) {
  return rN(function(e, n) {
    var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
    for (a = t.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && Lwe(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), e = Object(e); ++r < i; ) {
      var s = n[r];
      s && t(e, s, r, a);
    }
    return e;
  });
}
var Bwe = Object.prototype;
function a2(t) {
  var e = t && t.constructor, n = typeof e == "function" && e.prototype || Bwe;
  return t === n;
}
function zwe(t, e) {
  for (var n = -1, r = Array(t); ++n < t; )
    r[n] = e(n);
  return r;
}
var Vwe = "[object Arguments]";
function RF(t) {
  return Fs(t) && Ef(t) == Vwe;
}
var Wee = Object.prototype, Fwe = Wee.hasOwnProperty, Wwe = Wee.propertyIsEnumerable, hg = RF(/* @__PURE__ */ function() {
  return arguments;
}()) ? RF : function(t) {
  return Fs(t) && Fwe.call(t, "callee") && !Wwe.call(t, "callee");
};
function Qwe() {
  return !1;
}
var Qee = typeof exports == "object" && exports && !exports.nodeType && exports, kF = Qee && typeof module == "object" && module && !module.nodeType && module, Hwe = kF && kF.exports === Qee, LF = Hwe ? Ys.Buffer : void 0, Gwe = LF ? LF.isBuffer : void 0, pg = Gwe || Qwe, jwe = "[object Arguments]", Zwe = "[object Array]", Uwe = "[object Boolean]", Xwe = "[object Date]", Ywe = "[object Error]", qwe = "[object Function]", Kwe = "[object Map]", Jwe = "[object Number]", eCe = "[object Object]", tCe = "[object RegExp]", nCe = "[object Set]", rCe = "[object String]", iCe = "[object WeakMap]", aCe = "[object ArrayBuffer]", oCe = "[object DataView]", sCe = "[object Float32Array]", lCe = "[object Float64Array]", uCe = "[object Int8Array]", cCe = "[object Int16Array]", fCe = "[object Int32Array]", dCe = "[object Uint8Array]", hCe = "[object Uint8ClampedArray]", pCe = "[object Uint16Array]", vCe = "[object Uint32Array]", Kn = {};
Kn[sCe] = Kn[lCe] = Kn[uCe] = Kn[cCe] = Kn[fCe] = Kn[dCe] = Kn[hCe] = Kn[pCe] = Kn[vCe] = !0;
Kn[jwe] = Kn[Zwe] = Kn[aCe] = Kn[Uwe] = Kn[oCe] = Kn[Xwe] = Kn[Ywe] = Kn[qwe] = Kn[Kwe] = Kn[Jwe] = Kn[eCe] = Kn[tCe] = Kn[nCe] = Kn[rCe] = Kn[iCe] = !1;
function gCe(t) {
  return Fs(t) && iN(t.length) && !!Kn[Ef(t)];
}
function o2(t) {
  return function(e) {
    return t(e);
  };
}
var Hee = typeof exports == "object" && exports && !exports.nodeType && exports, Dy = Hee && typeof module == "object" && module && !module.nodeType && module, mCe = Dy && Dy.exports === Hee, kA = mCe && Dee.process, vg = function() {
  try {
    var t = Dy && Dy.require && Dy.require("util").types;
    return t || kA && kA.binding && kA.binding("util");
  } catch {
  }
}(), NF = vg && vg.isTypedArray, s2 = NF ? o2(NF) : gCe, yCe = Object.prototype, bCe = yCe.hasOwnProperty;
function Gee(t, e) {
  var n = za(t), r = !n && hg(t), i = !n && !r && pg(t), a = !n && !r && !i && s2(t), o = n || r || i || a, s = o ? zwe(t.length, String) : [], l = s.length;
  for (var u in t)
    (e || bCe.call(t, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
    (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
    i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
    a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
    i2(u, l))) && s.push(u);
  return s;
}
function jee(t, e) {
  return function(n) {
    return t(e(n));
  };
}
var _Ce = jee(Object.keys, Object), OCe = Object.prototype, SCe = OCe.hasOwnProperty;
function Zee(t) {
  if (!a2(t))
    return _Ce(t);
  var e = [];
  for (var n in Object(t))
    SCe.call(t, n) && n != "constructor" && e.push(n);
  return e;
}
function N_(t) {
  return om(t) ? Gee(t) : Zee(t);
}
function xCe(t) {
  var e = [];
  if (t != null)
    for (var n in Object(t))
      e.push(n);
  return e;
}
var wCe = Object.prototype, CCe = wCe.hasOwnProperty;
function TCe(t) {
  if (!Ti(t))
    return xCe(t);
  var e = a2(t), n = [];
  for (var r in t)
    r == "constructor" && (e || !CCe.call(t, r)) || n.push(r);
  return n;
}
function B_(t) {
  return om(t) ? Gee(t, !0) : TCe(t);
}
var PCe = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, $Ce = /^\w*$/;
function aN(t, e) {
  if (za(t))
    return !1;
  var n = typeof t;
  return n == "number" || n == "symbol" || n == "boolean" || t == null || n2(t) ? !0 : $Ce.test(t) || !PCe.test(t) || e != null && t in Object(e);
}
var bb = ap(Object, "create");
function ACe() {
  this.__data__ = bb ? bb(null) : {}, this.size = 0;
}
function ECe(t) {
  var e = this.has(t) && delete this.__data__[t];
  return this.size -= e ? 1 : 0, e;
}
var MCe = "__lodash_hash_undefined__", ICe = Object.prototype, DCe = ICe.hasOwnProperty;
function RCe(t) {
  var e = this.__data__;
  if (bb) {
    var n = e[t];
    return n === MCe ? void 0 : n;
  }
  return DCe.call(e, t) ? e[t] : void 0;
}
var kCe = Object.prototype, LCe = kCe.hasOwnProperty;
function NCe(t) {
  var e = this.__data__;
  return bb ? e[t] !== void 0 : LCe.call(e, t);
}
var BCe = "__lodash_hash_undefined__";
function zCe(t, e) {
  var n = this.__data__;
  return this.size += this.has(t) ? 0 : 1, n[t] = bb && e === void 0 ? BCe : e, this;
}
function kh(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var r = t[e];
    this.set(r[0], r[1]);
  }
}
kh.prototype.clear = ACe;
kh.prototype.delete = ECe;
kh.prototype.get = RCe;
kh.prototype.has = NCe;
kh.prototype.set = zCe;
function VCe() {
  this.__data__ = [], this.size = 0;
}
function l2(t, e) {
  for (var n = t.length; n--; )
    if (L_(t[n][0], e))
      return n;
  return -1;
}
var FCe = Array.prototype, WCe = FCe.splice;
function QCe(t) {
  var e = this.__data__, n = l2(e, t);
  if (n < 0)
    return !1;
  var r = e.length - 1;
  return n == r ? e.pop() : WCe.call(e, n, 1), --this.size, !0;
}
function HCe(t) {
  var e = this.__data__, n = l2(e, t);
  return n < 0 ? void 0 : e[n][1];
}
function GCe(t) {
  return l2(this.__data__, t) > -1;
}
function jCe(t, e) {
  var n = this.__data__, r = l2(n, t);
  return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
}
function Ku(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var r = t[e];
    this.set(r[0], r[1]);
  }
}
Ku.prototype.clear = VCe;
Ku.prototype.delete = QCe;
Ku.prototype.get = HCe;
Ku.prototype.has = GCe;
Ku.prototype.set = jCe;
var _b = ap(Ys, "Map");
function ZCe() {
  this.size = 0, this.__data__ = {
    hash: new kh(),
    map: new (_b || Ku)(),
    string: new kh()
  };
}
function UCe(t) {
  var e = typeof t;
  return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
}
function u2(t, e) {
  var n = t.__data__;
  return UCe(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
}
function XCe(t) {
  var e = u2(this, t).delete(t);
  return this.size -= e ? 1 : 0, e;
}
function YCe(t) {
  return u2(this, t).get(t);
}
function qCe(t) {
  return u2(this, t).has(t);
}
function KCe(t, e) {
  var n = u2(this, t), r = n.size;
  return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
}
function Ju(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var r = t[e];
    this.set(r[0], r[1]);
  }
}
Ju.prototype.clear = ZCe;
Ju.prototype.delete = XCe;
Ju.prototype.get = YCe;
Ju.prototype.has = qCe;
Ju.prototype.set = KCe;
var JCe = "Expected a function";
function oN(t, e) {
  if (typeof t != "function" || e != null && typeof e != "function")
    throw new TypeError(JCe);
  var n = function() {
    var r = arguments, i = e ? e.apply(this, r) : r[0], a = n.cache;
    if (a.has(i))
      return a.get(i);
    var o = t.apply(this, r);
    return n.cache = a.set(i, o) || a, o;
  };
  return n.cache = new (oN.Cache || Ju)(), n;
}
oN.Cache = Ju;
var eTe = 500;
function tTe(t) {
  var e = oN(t, function(r) {
    return n.size === eTe && n.clear(), r;
  }), n = e.cache;
  return e;
}
var nTe = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, rTe = /\\(\\)?/g, iTe = tTe(function(t) {
  var e = [];
  return t.charCodeAt(0) === 46 && e.push(""), t.replace(nTe, function(n, r, i, a) {
    e.push(i ? a.replace(rTe, "$1") : r || n);
  }), e;
});
function aTe(t) {
  return t == null ? "" : kee(t);
}
function sm(t, e) {
  return za(t) ? t : aN(t, e) ? [t] : iTe(aTe(t));
}
var oTe = 1 / 0;
function lm(t) {
  if (typeof t == "string" || n2(t))
    return t;
  var e = t + "";
  return e == "0" && 1 / t == -oTe ? "-0" : e;
}
function c2(t, e) {
  e = sm(e, t);
  for (var n = 0, r = e.length; t != null && n < r; )
    t = t[lm(e[n++])];
  return n && n == r ? t : void 0;
}
function vn(t, e, n) {
  var r = t == null ? void 0 : c2(t, e);
  return r === void 0 ? n : r;
}
function sN(t, e) {
  for (var n = -1, r = e.length, i = t.length; ++n < r; )
    t[i + n] = e[n];
  return t;
}
var BF = ts ? ts.isConcatSpreadable : void 0;
function sTe(t) {
  return za(t) || hg(t) || !!(BF && t && t[BF]);
}
function lTe(t, e, n, r, i) {
  var a = -1, o = t.length;
  for (n || (n = sTe), i || (i = []); ++a < o; ) {
    var s = t[a];
    n(s) ? sN(i, s) : i[i.length] = s;
  }
  return i;
}
function uTe(t) {
  var e = t == null ? 0 : t.length;
  return e ? lTe(t) : [];
}
function Uee(t) {
  return Bee(Fee(t, void 0, uTe), t + "");
}
var lN = jee(Object.getPrototypeOf, Object), cTe = "[object Object]", fTe = Function.prototype, dTe = Object.prototype, Xee = fTe.toString, hTe = dTe.hasOwnProperty, pTe = Xee.call(Object);
function uN(t) {
  if (!Fs(t) || Ef(t) != cTe)
    return !1;
  var e = lN(t);
  if (e === null)
    return !0;
  var n = hTe.call(e, "constructor") && e.constructor;
  return typeof n == "function" && n instanceof n && Xee.call(n) == pTe;
}
function vTe(t, e, n) {
  var r = -1, i = t.length;
  e < 0 && (e = -e > i ? 0 : i + e), n = n > i ? i : n, n < 0 && (n += i), i = e > n ? 0 : n - e >>> 0, e >>>= 0;
  for (var a = Array(i); ++r < i; )
    a[r] = t[r + e];
  return a;
}
function gTe() {
  this.__data__ = new Ku(), this.size = 0;
}
function mTe(t) {
  var e = this.__data__, n = e.delete(t);
  return this.size = e.size, n;
}
function yTe(t) {
  return this.__data__.get(t);
}
function bTe(t) {
  return this.__data__.has(t);
}
var _Te = 200;
function OTe(t, e) {
  var n = this.__data__;
  if (n instanceof Ku) {
    var r = n.__data__;
    if (!_b || r.length < _Te - 1)
      return r.push([t, e]), this.size = ++n.size, this;
    n = this.__data__ = new Ju(r);
  }
  return n.set(t, e), this.size = n.size, this;
}
function Rs(t) {
  var e = this.__data__ = new Ku(t);
  this.size = e.size;
}
Rs.prototype.clear = gTe;
Rs.prototype.delete = mTe;
Rs.prototype.get = yTe;
Rs.prototype.has = bTe;
Rs.prototype.set = OTe;
function STe(t, e) {
  return t && am(e, N_(e), t);
}
function xTe(t, e) {
  return t && am(e, B_(e), t);
}
var Yee = typeof exports == "object" && exports && !exports.nodeType && exports, zF = Yee && typeof module == "object" && module && !module.nodeType && module, wTe = zF && zF.exports === Yee, VF = wTe ? Ys.Buffer : void 0, FF = VF ? VF.allocUnsafe : void 0;
function qee(t, e) {
  if (e)
    return t.slice();
  var n = t.length, r = FF ? FF(n) : new t.constructor(n);
  return t.copy(r), r;
}
function CTe(t, e) {
  for (var n = -1, r = t == null ? 0 : t.length, i = 0, a = []; ++n < r; ) {
    var o = t[n];
    e(o, n, t) && (a[i++] = o);
  }
  return a;
}
function Kee() {
  return [];
}
var TTe = Object.prototype, PTe = TTe.propertyIsEnumerable, WF = Object.getOwnPropertySymbols, cN = WF ? function(t) {
  return t == null ? [] : (t = Object(t), CTe(WF(t), function(e) {
    return PTe.call(t, e);
  }));
} : Kee;
function $Te(t, e) {
  return am(t, cN(t), e);
}
var ATe = Object.getOwnPropertySymbols, Jee = ATe ? function(t) {
  for (var e = []; t; )
    sN(e, cN(t)), t = lN(t);
  return e;
} : Kee;
function ETe(t, e) {
  return am(t, Jee(t), e);
}
function ete(t, e, n) {
  var r = e(t);
  return za(t) ? r : sN(r, n(t));
}
function HD(t) {
  return ete(t, N_, cN);
}
function tte(t) {
  return ete(t, B_, Jee);
}
var GD = ap(Ys, "DataView"), jD = ap(Ys, "Promise"), zv = ap(Ys, "Set"), QF = "[object Map]", MTe = "[object Object]", HF = "[object Promise]", GF = "[object Set]", jF = "[object WeakMap]", ZF = "[object DataView]", ITe = ip(GD), DTe = ip(_b), RTe = ip(jD), kTe = ip(zv), LTe = ip(QD), Wo = Ef;
(GD && Wo(new GD(new ArrayBuffer(1))) != ZF || _b && Wo(new _b()) != QF || jD && Wo(jD.resolve()) != HF || zv && Wo(new zv()) != GF || QD && Wo(new QD()) != jF) && (Wo = function(t) {
  var e = Ef(t), n = e == MTe ? t.constructor : void 0, r = n ? ip(n) : "";
  if (r)
    switch (r) {
      case ITe:
        return ZF;
      case DTe:
        return QF;
      case RTe:
        return HF;
      case kTe:
        return GF;
      case LTe:
        return jF;
    }
  return e;
});
var NTe = Object.prototype, BTe = NTe.hasOwnProperty;
function zTe(t) {
  var e = t.length, n = new t.constructor(e);
  return e && typeof t[0] == "string" && BTe.call(t, "index") && (n.index = t.index, n.input = t.input), n;
}
var Vw = Ys.Uint8Array;
function fN(t) {
  var e = new t.constructor(t.byteLength);
  return new Vw(e).set(new Vw(t)), e;
}
function VTe(t, e) {
  var n = e ? fN(t.buffer) : t.buffer;
  return new t.constructor(n, t.byteOffset, t.byteLength);
}
var FTe = /\w*$/;
function WTe(t) {
  var e = new t.constructor(t.source, FTe.exec(t));
  return e.lastIndex = t.lastIndex, e;
}
var UF = ts ? ts.prototype : void 0, XF = UF ? UF.valueOf : void 0;
function QTe(t) {
  return XF ? Object(XF.call(t)) : {};
}
function nte(t, e) {
  var n = e ? fN(t.buffer) : t.buffer;
  return new t.constructor(n, t.byteOffset, t.length);
}
var HTe = "[object Boolean]", GTe = "[object Date]", jTe = "[object Map]", ZTe = "[object Number]", UTe = "[object RegExp]", XTe = "[object Set]", YTe = "[object String]", qTe = "[object Symbol]", KTe = "[object ArrayBuffer]", JTe = "[object DataView]", e2e = "[object Float32Array]", t2e = "[object Float64Array]", n2e = "[object Int8Array]", r2e = "[object Int16Array]", i2e = "[object Int32Array]", a2e = "[object Uint8Array]", o2e = "[object Uint8ClampedArray]", s2e = "[object Uint16Array]", l2e = "[object Uint32Array]";
function u2e(t, e, n) {
  var r = t.constructor;
  switch (e) {
    case KTe:
      return fN(t);
    case HTe:
    case GTe:
      return new r(+t);
    case JTe:
      return VTe(t, n);
    case e2e:
    case t2e:
    case n2e:
    case r2e:
    case i2e:
    case a2e:
    case o2e:
    case s2e:
    case l2e:
      return nte(t, n);
    case jTe:
      return new r();
    case ZTe:
    case YTe:
      return new r(t);
    case UTe:
      return WTe(t);
    case XTe:
      return new r();
    case qTe:
      return QTe(t);
  }
}
function rte(t) {
  return typeof t.constructor == "function" && !a2(t) ? bwe(lN(t)) : {};
}
var c2e = "[object Map]";
function f2e(t) {
  return Fs(t) && Wo(t) == c2e;
}
var YF = vg && vg.isMap, d2e = YF ? o2(YF) : f2e, h2e = "[object Set]";
function p2e(t) {
  return Fs(t) && Wo(t) == h2e;
}
var qF = vg && vg.isSet, v2e = qF ? o2(qF) : p2e, g2e = 1, m2e = 2, y2e = 4, ite = "[object Arguments]", b2e = "[object Array]", _2e = "[object Boolean]", O2e = "[object Date]", S2e = "[object Error]", ate = "[object Function]", x2e = "[object GeneratorFunction]", w2e = "[object Map]", C2e = "[object Number]", ote = "[object Object]", T2e = "[object RegExp]", P2e = "[object Set]", $2e = "[object String]", A2e = "[object Symbol]", E2e = "[object WeakMap]", M2e = "[object ArrayBuffer]", I2e = "[object DataView]", D2e = "[object Float32Array]", R2e = "[object Float64Array]", k2e = "[object Int8Array]", L2e = "[object Int16Array]", N2e = "[object Int32Array]", B2e = "[object Uint8Array]", z2e = "[object Uint8ClampedArray]", V2e = "[object Uint16Array]", F2e = "[object Uint32Array]", Zn = {};
Zn[ite] = Zn[b2e] = Zn[M2e] = Zn[I2e] = Zn[_2e] = Zn[O2e] = Zn[D2e] = Zn[R2e] = Zn[k2e] = Zn[L2e] = Zn[N2e] = Zn[w2e] = Zn[C2e] = Zn[ote] = Zn[T2e] = Zn[P2e] = Zn[$2e] = Zn[A2e] = Zn[B2e] = Zn[z2e] = Zn[V2e] = Zn[F2e] = !0;
Zn[S2e] = Zn[ate] = Zn[E2e] = !1;
function Ry(t, e, n, r, i, a) {
  var o, s = e & g2e, l = e & m2e, u = e & y2e;
  if (n && (o = i ? n(t, r, i, a) : n(t)), o !== void 0)
    return o;
  if (!Ti(t))
    return t;
  var c = za(t);
  if (c) {
    if (o = zTe(t), !s)
      return Nee(t, o);
  } else {
    var f = Wo(t), d = f == ate || f == x2e;
    if (pg(t))
      return qee(t, s);
    if (f == ote || f == ite || d && !i) {
      if (o = l || d ? {} : rte(t), !s)
        return l ? ETe(t, xTe(o, t)) : $Te(t, STe(o, t));
    } else {
      if (!Zn[f])
        return i ? t : {};
      o = u2e(t, f, s);
    }
  }
  a || (a = new Rs());
  var h = a.get(t);
  if (h)
    return h;
  a.set(t, o), v2e(t) ? t.forEach(function(g) {
    o.add(Ry(g, e, n, g, t, a));
  }) : d2e(t) && t.forEach(function(g, m) {
    o.set(m, Ry(g, e, n, m, t, a));
  });
  var p = u ? l ? tte : HD : l ? B_ : N_, v = c ? void 0 : p(t);
  return Pwe(v || t, function(g, m) {
    v && (m = g, g = t[m]), nN(o, m, Ry(g, e, n, m, t, a));
  }), o;
}
var W2e = 1, Q2e = 4;
function ph(t) {
  return Ry(t, W2e | Q2e);
}
var H2e = "__lodash_hash_undefined__";
function G2e(t) {
  return this.__data__.set(t, H2e), this;
}
function j2e(t) {
  return this.__data__.has(t);
}
function gg(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.__data__ = new Ju(); ++e < n; )
    this.add(t[e]);
}
gg.prototype.add = gg.prototype.push = G2e;
gg.prototype.has = j2e;
function Z2e(t, e) {
  for (var n = -1, r = t == null ? 0 : t.length; ++n < r; )
    if (e(t[n], n, t))
      return !0;
  return !1;
}
function Fw(t, e) {
  return t.has(e);
}
var U2e = 1, X2e = 2;
function ste(t, e, n, r, i, a) {
  var o = n & U2e, s = t.length, l = e.length;
  if (s != l && !(o && l > s))
    return !1;
  var u = a.get(t), c = a.get(e);
  if (u && c)
    return u == e && c == t;
  var f = -1, d = !0, h = n & X2e ? new gg() : void 0;
  for (a.set(t, e), a.set(e, t); ++f < s; ) {
    var p = t[f], v = e[f];
    if (r)
      var g = o ? r(v, p, f, e, t, a) : r(p, v, f, t, e, a);
    if (g !== void 0) {
      if (g)
        continue;
      d = !1;
      break;
    }
    if (h) {
      if (!Z2e(e, function(m, y) {
        if (!Fw(h, y) && (p === m || i(p, m, n, r, a)))
          return h.push(y);
      })) {
        d = !1;
        break;
      }
    } else if (!(p === v || i(p, v, n, r, a))) {
      d = !1;
      break;
    }
  }
  return a.delete(t), a.delete(e), d;
}
function Y2e(t) {
  var e = -1, n = Array(t.size);
  return t.forEach(function(r, i) {
    n[++e] = [i, r];
  }), n;
}
function dN(t) {
  var e = -1, n = Array(t.size);
  return t.forEach(function(r) {
    n[++e] = r;
  }), n;
}
var q2e = 1, K2e = 2, J2e = "[object Boolean]", ePe = "[object Date]", tPe = "[object Error]", nPe = "[object Map]", rPe = "[object Number]", iPe = "[object RegExp]", aPe = "[object Set]", oPe = "[object String]", sPe = "[object Symbol]", lPe = "[object ArrayBuffer]", uPe = "[object DataView]", KF = ts ? ts.prototype : void 0, LA = KF ? KF.valueOf : void 0;
function cPe(t, e, n, r, i, a, o) {
  switch (n) {
    case uPe:
      if (t.byteLength != e.byteLength || t.byteOffset != e.byteOffset)
        return !1;
      t = t.buffer, e = e.buffer;
    case lPe:
      return !(t.byteLength != e.byteLength || !a(new Vw(t), new Vw(e)));
    case J2e:
    case ePe:
    case rPe:
      return L_(+t, +e);
    case tPe:
      return t.name == e.name && t.message == e.message;
    case iPe:
    case oPe:
      return t == e + "";
    case nPe:
      var s = Y2e;
    case aPe:
      var l = r & q2e;
      if (s || (s = dN), t.size != e.size && !l)
        return !1;
      var u = o.get(t);
      if (u)
        return u == e;
      r |= K2e, o.set(t, e);
      var c = ste(s(t), s(e), r, i, a, o);
      return o.delete(t), c;
    case sPe:
      if (LA)
        return LA.call(t) == LA.call(e);
  }
  return !1;
}
var fPe = 1, dPe = Object.prototype, hPe = dPe.hasOwnProperty;
function pPe(t, e, n, r, i, a) {
  var o = n & fPe, s = HD(t), l = s.length, u = HD(e), c = u.length;
  if (l != c && !o)
    return !1;
  for (var f = l; f--; ) {
    var d = s[f];
    if (!(o ? d in e : hPe.call(e, d)))
      return !1;
  }
  var h = a.get(t), p = a.get(e);
  if (h && p)
    return h == e && p == t;
  var v = !0;
  a.set(t, e), a.set(e, t);
  for (var g = o; ++f < l; ) {
    d = s[f];
    var m = t[d], y = e[d];
    if (r)
      var _ = o ? r(y, m, d, e, t, a) : r(m, y, d, t, e, a);
    if (!(_ === void 0 ? m === y || i(m, y, n, r, a) : _)) {
      v = !1;
      break;
    }
    g || (g = d == "constructor");
  }
  if (v && !g) {
    var O = t.constructor, S = e.constructor;
    O != S && "constructor" in t && "constructor" in e && !(typeof O == "function" && O instanceof O && typeof S == "function" && S instanceof S) && (v = !1);
  }
  return a.delete(t), a.delete(e), v;
}
var vPe = 1, JF = "[object Arguments]", eW = "[object Array]", IO = "[object Object]", gPe = Object.prototype, tW = gPe.hasOwnProperty;
function mPe(t, e, n, r, i, a) {
  var o = za(t), s = za(e), l = o ? eW : Wo(t), u = s ? eW : Wo(e);
  l = l == JF ? IO : l, u = u == JF ? IO : u;
  var c = l == IO, f = u == IO, d = l == u;
  if (d && pg(t)) {
    if (!pg(e))
      return !1;
    o = !0, c = !1;
  }
  if (d && !c)
    return a || (a = new Rs()), o || s2(t) ? ste(t, e, n, r, i, a) : cPe(t, e, l, n, r, i, a);
  if (!(n & vPe)) {
    var h = c && tW.call(t, "__wrapped__"), p = f && tW.call(e, "__wrapped__");
    if (h || p) {
      var v = h ? t.value() : t, g = p ? e.value() : e;
      return a || (a = new Rs()), i(v, g, n, r, a);
    }
  }
  return d ? (a || (a = new Rs()), pPe(t, e, n, r, i, a)) : !1;
}
function f2(t, e, n, r, i) {
  return t === e ? !0 : t == null || e == null || !Fs(t) && !Fs(e) ? t !== t && e !== e : mPe(t, e, n, r, f2, i);
}
var yPe = 1, bPe = 2;
function _Pe(t, e, n, r) {
  var i = n.length, a = i;
  if (t == null)
    return !a;
  for (t = Object(t); i--; ) {
    var o = n[i];
    if (o[2] ? o[1] !== t[o[0]] : !(o[0] in t))
      return !1;
  }
  for (; ++i < a; ) {
    o = n[i];
    var s = o[0], l = t[s], u = o[1];
    if (o[2]) {
      if (l === void 0 && !(s in t))
        return !1;
    } else {
      var c = new Rs(), f;
      if (!(f === void 0 ? f2(u, l, yPe | bPe, r, c) : f))
        return !1;
    }
  }
  return !0;
}
function lte(t) {
  return t === t && !Ti(t);
}
function OPe(t) {
  for (var e = N_(t), n = e.length; n--; ) {
    var r = e[n], i = t[r];
    e[n] = [r, i, lte(i)];
  }
  return e;
}
function ute(t, e) {
  return function(n) {
    return n == null ? !1 : n[t] === e && (e !== void 0 || t in Object(n));
  };
}
function SPe(t) {
  var e = OPe(t);
  return e.length == 1 && e[0][2] ? ute(e[0][0], e[0][1]) : function(n) {
    return n === t || _Pe(n, t, e);
  };
}
function xPe(t, e) {
  return t != null && e in Object(t);
}
function wPe(t, e, n) {
  e = sm(e, t);
  for (var r = -1, i = e.length, a = !1; ++r < i; ) {
    var o = lm(e[r]);
    if (!(a = t != null && n(t, o)))
      break;
    t = t[o];
  }
  return a || ++r != i ? a : (i = t == null ? 0 : t.length, !!i && iN(i) && i2(o, i) && (za(t) || hg(t)));
}
function cte(t, e) {
  return t != null && wPe(t, e, xPe);
}
var CPe = 1, TPe = 2;
function PPe(t, e) {
  return aN(t) && lte(e) ? ute(lm(t), e) : function(n) {
    var r = vn(n, t);
    return r === void 0 && r === e ? cte(n, t) : f2(e, r, CPe | TPe);
  };
}
function $Pe(t) {
  return function(e) {
    return e == null ? void 0 : e[t];
  };
}
function APe(t) {
  return function(e) {
    return c2(e, t);
  };
}
function EPe(t) {
  return aN(t) ? $Pe(lm(t)) : APe(t);
}
function fte(t) {
  return typeof t == "function" ? t : t == null ? J4 : typeof t == "object" ? za(t) ? PPe(t[0], t[1]) : SPe(t) : EPe(t);
}
function MPe(t) {
  return function(e, n, r) {
    for (var i = -1, a = Object(e), o = r(e), s = o.length; s--; ) {
      var l = o[++i];
      if (n(a[l], l, a) === !1)
        break;
    }
    return e;
  };
}
var IPe = MPe(), NA = function() {
  return Ys.Date.now();
}, DPe = "Expected a function", RPe = Math.max, kPe = Math.min;
function hN(t, e, n) {
  var r, i, a, o, s, l, u = 0, c = !1, f = !1, d = !0;
  if (typeof t != "function")
    throw new TypeError(DPe);
  e = WD(e) || 0, Ti(n) && (c = !!n.leading, f = "maxWait" in n, a = f ? RPe(WD(n.maxWait) || 0, e) : a, d = "trailing" in n ? !!n.trailing : d);
  function h(x) {
    var C = r, P = i;
    return r = i = void 0, u = x, o = t.apply(P, C), o;
  }
  function p(x) {
    return u = x, s = setTimeout(m, e), c ? h(x) : o;
  }
  function v(x) {
    var C = x - l, P = x - u, $ = e - C;
    return f ? kPe($, a - P) : $;
  }
  function g(x) {
    var C = x - l, P = x - u;
    return l === void 0 || C >= e || C < 0 || f && P >= a;
  }
  function m() {
    var x = NA();
    if (g(x))
      return y(x);
    s = setTimeout(m, v(x));
  }
  function y(x) {
    return s = void 0, d && r ? h(x) : (r = i = void 0, o);
  }
  function _() {
    s !== void 0 && clearTimeout(s), u = 0, r = l = i = s = void 0;
  }
  function O() {
    return s === void 0 ? o : y(NA());
  }
  function S() {
    var x = NA(), C = g(x);
    if (r = arguments, i = this, l = x, C) {
      if (s === void 0)
        return p(l);
      if (f)
        return clearTimeout(s), s = setTimeout(m, e), h(l);
    }
    return s === void 0 && (s = setTimeout(m, e)), o;
  }
  return S.cancel = _, S.flush = O, S;
}
function ZD(t, e, n) {
  (n !== void 0 && !L_(t[e], n) || n === void 0 && !(e in t)) && tN(t, e, n);
}
function dte(t) {
  return Fs(t) && om(t);
}
function UD(t, e) {
  if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
    return t[e];
}
function LPe(t) {
  return am(t, B_(t));
}
function NPe(t, e, n, r, i, a, o) {
  var s = UD(t, n), l = UD(e, n), u = o.get(l);
  if (u) {
    ZD(t, n, u);
    return;
  }
  var c = a ? a(s, l, n + "", t, e, o) : void 0, f = c === void 0;
  if (f) {
    var d = za(l), h = !d && pg(l), p = !d && !h && s2(l);
    c = l, d || h || p ? za(s) ? c = s : dte(s) ? c = Nee(s) : h ? (f = !1, c = qee(l, !0)) : p ? (f = !1, c = nte(l, !0)) : c = [] : uN(l) || hg(l) ? (c = s, hg(s) ? c = LPe(s) : (!Ti(s) || eN(s)) && (c = rte(l))) : f = !1;
  }
  f && (o.set(l, c), i(c, l, r, a, o), o.delete(l)), ZD(t, n, c);
}
function pN(t, e, n, r, i) {
  t !== e && IPe(e, function(a, o) {
    if (i || (i = new Rs()), Ti(a))
      NPe(t, e, o, n, pN, r, i);
    else {
      var s = r ? r(UD(t, o), a, o + "", t, e, i) : void 0;
      s === void 0 && (s = a), ZD(t, o, s);
    }
  }, B_);
}
function hte(t, e, n, r, i, a) {
  return Ti(t) && Ti(e) && (a.set(e, t), pN(t, e, void 0, hte, a), a.delete(e)), t;
}
var BPe = Nwe(function(t, e, n, r) {
  pN(t, e, n, r);
}), pte = rN(function(t) {
  return t.push(void 0, hte), Lee(BPe, void 0, t);
});
function zPe(t) {
  var e = t == null ? 0 : t.length;
  return e ? t[e - 1] : void 0;
}
function VPe(t) {
  return function(e, n, r) {
    var i = Object(e);
    if (!om(e)) {
      var a = fte(n);
      e = N_(e), n = function(s) {
        return a(i[s], s, i);
      };
    }
    var o = t(e, n, r);
    return o > -1 ? i[a ? e[o] : o] : void 0;
  };
}
var FPe = Math.max;
function WPe(t, e, n) {
  var r = t == null ? 0 : t.length;
  if (!r)
    return -1;
  var i = n == null ? 0 : nwe(n);
  return i < 0 && (i = FPe(r + i, 0)), zee(t, fte(e), i);
}
var QPe = VPe(WPe);
function Ww(t) {
  for (var e = -1, n = t == null ? 0 : t.length, r = {}; ++e < n; ) {
    var i = t[e];
    r[i[0]] = i[1];
  }
  return r;
}
var HPe = Math.min;
function GPe(t, e, n) {
  for (var r = Vee, i = t[0].length, a = t.length, o = a, s = Array(a), l = 1 / 0, u = []; o--; ) {
    var c = t[o];
    o && e && (c = r2(c, o2(e))), l = HPe(c.length, l), s[o] = i >= 120 && c.length >= 120 ? new gg(o && c) : void 0;
  }
  c = t[0];
  var f = -1, d = s[0];
  e:
    for (; ++f < i && u.length < l; ) {
      var h = c[f], p = h;
      if (h = h !== 0 ? h : 0, !(d ? Fw(d, p) : r(u, p))) {
        for (o = a; --o; ) {
          var v = s[o];
          if (!(v ? Fw(v, p) : r(t[o], p)))
            continue e;
        }
        d && d.push(p), u.push(h);
      }
    }
  return u;
}
function jPe(t) {
  return dte(t) ? t : [];
}
var ZPe = rN(function(t) {
  var e = r2(t, jPe);
  return e.length && e[0] === t[0] ? GPe(e) : [];
});
function UPe(t, e) {
  return e.length < 2 ? t : c2(t, vTe(e, 0, -1));
}
var XPe = "[object Map]", YPe = "[object Set]", qPe = Object.prototype, KPe = qPe.hasOwnProperty;
function vte(t) {
  if (t == null)
    return !0;
  if (om(t) && (za(t) || typeof t == "string" || typeof t.splice == "function" || pg(t) || s2(t) || hg(t)))
    return !t.length;
  var e = Wo(t);
  if (e == XPe || e == YPe)
    return !t.size;
  if (a2(t))
    return !Zee(t).length;
  for (var n in t)
    if (KPe.call(t, n))
      return !1;
  return !0;
}
function z_(t, e) {
  return f2(t, e);
}
var JPe = "[object Number]";
function e$e(t) {
  return typeof t == "number" || Fs(t) && Ef(t) == JPe;
}
function Jc(t) {
  return t == null;
}
function gte(t) {
  return t === void 0;
}
function t$e(t, e) {
  return e = sm(e, t), t = UPe(t, e), t == null || delete t[lm(zPe(e))];
}
function n$e(t) {
  return uN(t) ? void 0 : t;
}
var r$e = 1, i$e = 2, a$e = 4, mte = Uee(function(t, e) {
  var n = {};
  if (t == null)
    return n;
  var r = !1;
  e = r2(e, function(a) {
    return a = sm(a, t), r || (r = a.length > 1), a;
  }), am(t, tte(t), n), r && (n = Ry(n, r$e | i$e | a$e, n$e));
  for (var i = e.length; i--; )
    t$e(n, e[i]);
  return n;
});
function yte(t, e, n, r) {
  if (!Ti(t))
    return t;
  e = sm(e, t);
  for (var i = -1, a = e.length, o = a - 1, s = t; s != null && ++i < a; ) {
    var l = lm(e[i]), u = n;
    if (l === "__proto__" || l === "constructor" || l === "prototype")
      return t;
    if (i != o) {
      var c = s[l];
      u = void 0, u === void 0 && (u = Ti(c) ? c : i2(e[i + 1]) ? [] : {});
    }
    nN(s, l, u), s = s[l];
  }
  return t;
}
function o$e(t, e, n) {
  for (var r = -1, i = e.length, a = {}; ++r < i; ) {
    var o = e[r], s = c2(t, o);
    n(s, o) && yte(a, sm(o, t), s);
  }
  return a;
}
function s$e(t, e) {
  return o$e(t, e, function(n, r) {
    return cte(t, r);
  });
}
var mg = Uee(function(t, e) {
  return t == null ? {} : s$e(t, e);
});
function vN(t, e, n) {
  return t == null ? t : yte(t, e, n);
}
var l$e = "Expected a function";
function u$e(t, e, n) {
  var r = !0, i = !0;
  if (typeof t != "function")
    throw new TypeError(l$e);
  return Ti(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), hN(t, e, {
    leading: r,
    maxWait: e,
    trailing: i
  });
}
var c$e = 1 / 0, f$e = zv && 1 / dN(new zv([, -0]))[1] == c$e ? function(t) {
  return new zv(t);
} : _we, d$e = 200;
function h$e(t, e, n) {
  var r = -1, i = Vee, a = t.length, o = !0, s = [], l = s;
  if (a >= d$e) {
    var u = f$e(t);
    if (u)
      return dN(u);
    o = !1, i = Fw, l = new gg();
  } else
    l = s;
  e:
    for (; ++r < a; ) {
      var c = t[r], f = c;
      if (c = c !== 0 ? c : 0, o && f === f) {
        for (var d = l.length; d--; )
          if (l[d] === f)
            continue e;
        s.push(c);
      } else i(l, f, n) || (l !== s && l.push(f), s.push(c));
    }
  return s;
}
function BA(t) {
  return t && t.length ? h$e(t) : [];
}
const Qw = (t) => t === void 0, hf = (t) => typeof t == "boolean", Ws = (t) => typeof t == "number", Ob = (t) => typeof Element > "u" ? !1 : t instanceof Element, yg = (t) => Jc(t), p$e = (t) => ia(t) ? !Number.isNaN(Number(t)) : !1;
class bte extends Error {
  constructor(e) {
    super(e), this.name = "ElementPlusError";
  }
}
function v$e(t, e) {
  throw new bte(`[${t}] ${e}`);
}
function Vi(t, e) {
  if (process.env.NODE_ENV !== "production") {
    const n = ia(t) ? new bte(`[${t}] ${e}`) : t;
    console.warn(n);
  }
}
const g$e = "utils/dom/style", _te = (t = "") => t.split(" ").filter((e) => !!e.trim()), nW = (t, e) => {
  if (!t || !e)
    return !1;
  if (e.includes(" "))
    throw new Error("className should not contain space.");
  return t.classList.contains(e);
}, Ote = (t, e) => {
  !t || !e.trim() || t.classList.add(..._te(e));
}, Lx = (t, e) => {
  !t || !e.trim() || t.classList.remove(..._te(e));
}, m$e = (t, e) => {
  var n;
  if (!Fr || !t || !e)
    return "";
  let r = Rxe(e);
  r === "float" && (r = "cssFloat");
  try {
    const i = t.style[r];
    if (i)
      return i;
    const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(t, "");
    return a ? a[r] : "";
  } catch {
    return t.style[r];
  }
};
function bg(t, e = "px") {
  if (!t)
    return "";
  if (Ws(t) || p$e(t))
    return `${t}${e}`;
  if (ia(t))
    return t;
  Vi(g$e, "binding value must be a string or number");
}
let DO;
const y$e = (t) => {
  var e;
  if (!Fr)
    return 0;
  if (DO !== void 0)
    return DO;
  const n = document.createElement("div");
  n.className = `${t}-scrollbar__wrap`, n.style.visibility = "hidden", n.style.width = "100px", n.style.position = "absolute", n.style.top = "-9999px", document.body.appendChild(n);
  const r = n.offsetWidth;
  n.style.overflow = "scroll";
  const i = document.createElement("div");
  i.style.width = "100%", n.appendChild(i);
  const a = i.offsetWidth;
  return (e = n.parentNode) == null || e.removeChild(n), DO = r - a, DO;
};
/*! Element Plus Icons Vue v2.3.1 */
var b$e = /* @__PURE__ */ ae({
  name: "ArrowDown",
  __name: "arrow-down",
  setup(t) {
    return (e, n) => (be(), Ue("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      tt("path", {
        fill: "currentColor",
        d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"
      })
    ]));
  }
}), _$e = b$e, O$e = /* @__PURE__ */ ae({
  name: "CaretRight",
  __name: "caret-right",
  setup(t) {
    return (e, n) => (be(), Ue("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      tt("path", {
        fill: "currentColor",
        d: "M384 192v640l384-320.064z"
      })
    ]));
  }
}), S$e = O$e, x$e = /* @__PURE__ */ ae({
  name: "CircleCheck",
  __name: "circle-check",
  setup(t) {
    return (e, n) => (be(), Ue("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      tt("path", {
        fill: "currentColor",
        d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
      }),
      tt("path", {
        fill: "currentColor",
        d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
      })
    ]));
  }
}), w$e = x$e, C$e = /* @__PURE__ */ ae({
  name: "CircleClose",
  __name: "circle-close",
  setup(t) {
    return (e, n) => (be(), Ue("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      tt("path", {
        fill: "currentColor",
        d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"
      }),
      tt("path", {
        fill: "currentColor",
        d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
      })
    ]));
  }
}), Ste = C$e, T$e = /* @__PURE__ */ ae({
  name: "Close",
  __name: "close",
  setup(t) {
    return (e, n) => (be(), Ue("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      tt("path", {
        fill: "currentColor",
        d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
      })
    ]));
  }
}), xte = T$e, P$e = /* @__PURE__ */ ae({
  name: "Hide",
  __name: "hide",
  setup(t) {
    return (e, n) => (be(), Ue("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      tt("path", {
        fill: "currentColor",
        d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"
      }),
      tt("path", {
        fill: "currentColor",
        d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"
      })
    ]));
  }
}), $$e = P$e, A$e = /* @__PURE__ */ ae({
  name: "Loading",
  __name: "loading",
  setup(t) {
    return (e, n) => (be(), Ue("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      tt("path", {
        fill: "currentColor",
        d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
      })
    ]));
  }
}), gN = A$e, E$e = /* @__PURE__ */ ae({
  name: "View",
  __name: "view",
  setup(t) {
    return (e, n) => (be(), Ue("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      tt("path", {
        fill: "currentColor",
        d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"
      })
    ]));
  }
}), M$e = E$e;
const wte = "__epPropKey", mn = (t) => t, I$e = (t) => Rh(t) && !!t[wte], d2 = (t, e) => {
  if (!Rh(t) || I$e(t))
    return t;
  const { values: n, required: r, default: i, type: a, validator: o } = t, l = {
    type: a,
    required: !!r,
    validator: n || o ? (u) => {
      let c = !1, f = [];
      if (n && (f = Array.from(n), Dh(t, "default") && f.push(i), c || (c = f.includes(u))), o && (c || (c = o(u))), !c && f.length > 0) {
        const d = [...new Set(f)].map((h) => JSON.stringify(h)).join(", ");
        oxe(`Invalid prop: validation failed${e ? ` for prop "${e}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(u)}.`);
      }
      return c;
    } : void 0,
    [wte]: !0
  };
  return Dh(t, "default") && (l.default = i), l;
}, hr = (t) => Ww(Object.entries(t).map(([e, n]) => [
  e,
  d2(n, e)
])), _g = mn([
  String,
  Object,
  Function
]), D$e = {
  Close: xte
}, R$e = {
  validating: gN,
  success: w$e,
  error: Ste
}, ec = (t, e) => {
  if (t.install = (n) => {
    for (const r of [t, ...Object.values(e ?? {})])
      n.component(r.name, r);
  }, e)
    for (const [n, r] of Object.entries(e))
      t[n] = r;
  return t;
}, V_ = (t) => (t.install = Kc, t), k$e = (...t) => (e) => {
  t.forEach((n) => {
    Jd(n) ? n(e) : n.value = e;
  });
}, wa = {
  tab: "Tab",
  enter: "Enter",
  space: "Space",
  left: "ArrowLeft",
  up: "ArrowUp",
  right: "ArrowRight",
  down: "ArrowDown",
  esc: "Escape",
  delete: "Delete",
  backspace: "Backspace",
  numpadEnter: "NumpadEnter",
  pageUp: "PageUp",
  pageDown: "PageDown",
  home: "Home",
  end: "End"
}, ca = "update:modelValue", Cte = "change", L$e = ["", "default", "small", "large"];
var Nx = /* @__PURE__ */ ((t) => (t[t.TEXT = 1] = "TEXT", t[t.CLASS = 2] = "CLASS", t[t.STYLE = 4] = "STYLE", t[t.PROPS = 8] = "PROPS", t[t.FULL_PROPS = 16] = "FULL_PROPS", t[t.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", t[t.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", t[t.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", t[t.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", t[t.NEED_PATCH = 512] = "NEED_PATCH", t[t.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", t[t.HOISTED = -1] = "HOISTED", t[t.BAIL = -2] = "BAIL", t))(Nx || {});
const N$e = (t) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t), B$e = (t) => t, z$e = ["class", "style"], V$e = /^on[A-Z]/, F$e = (t = {}) => {
  const { excludeListeners: e = !1, excludeKeys: n } = t, r = V(() => ((n == null ? void 0 : n.value) || []).concat(z$e)), i = In();
  return i ? V(() => {
    var a;
    return Ww(Object.entries((a = i.proxy) == null ? void 0 : a.$attrs).filter(([o]) => !r.value.includes(o) && !(e && V$e.test(o))));
  }) : (Vi("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), V(() => ({})));
}, Es = ({ from: t, replacement: e, scope: n, version: r, ref: i, type: a = "API" }, o) => {
  me(() => z(o), (s) => {
    s && Vi(n, `[${a}] ${t} is about to be deprecated in version ${r}, please use ${e} instead.
For more detail, please visit: ${i}
`);
  }, {
    immediate: !0
  });
}, W$e = (t, e, n, r) => {
  let i = {
    offsetX: 0,
    offsetY: 0
  };
  const a = (l) => {
    const u = l.clientX, c = l.clientY, { offsetX: f, offsetY: d } = i, h = t.value.getBoundingClientRect(), p = h.left, v = h.top, g = h.width, m = h.height, y = document.documentElement.clientWidth, _ = document.documentElement.clientHeight, O = -p + f, S = -v + d, x = y - p - g + f, C = _ - v - m + d, P = (T) => {
      let E = f + T.clientX - u, M = d + T.clientY - c;
      r != null && r.value || (E = Math.min(Math.max(E, O), x), M = Math.min(Math.max(M, S), C)), i = {
        offsetX: E,
        offsetY: M
      }, t.value && (t.value.style.transform = `translate(${bg(E)}, ${bg(M)})`);
    }, $ = () => {
      document.removeEventListener("mousemove", P), document.removeEventListener("mouseup", $);
    };
    document.addEventListener("mousemove", P), document.addEventListener("mouseup", $);
  }, o = () => {
    e.value && t.value && e.value.addEventListener("mousedown", a);
  }, s = () => {
    e.value && t.value && e.value.removeEventListener("mousedown", a);
  };
  _t(() => {
    Vt(() => {
      n.value ? o() : s();
    });
  }), Qt(() => {
    s();
  });
};
var Q$e = {
  name: "en",
  el: {
    breadcrumb: {
      label: "Breadcrumb"
    },
    colorpicker: {
      confirm: "OK",
      clear: "Clear",
      defaultLabel: "color picker",
      description: "current color is {color}. press enter to select a new color."
    },
    datepicker: {
      now: "Now",
      today: "Today",
      cancel: "Cancel",
      clear: "Clear",
      confirm: "OK",
      dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
      monthTablePrompt: "Use the arrow keys and enter to select the month",
      yearTablePrompt: "Use the arrow keys and enter to select the year",
      selectedDate: "Selected date",
      selectDate: "Select date",
      selectTime: "Select time",
      startDate: "Start Date",
      startTime: "Start Time",
      endDate: "End Date",
      endTime: "End Time",
      prevYear: "Previous Year",
      nextYear: "Next Year",
      prevMonth: "Previous Month",
      nextMonth: "Next Month",
      year: "",
      month1: "January",
      month2: "February",
      month3: "March",
      month4: "April",
      month5: "May",
      month6: "June",
      month7: "July",
      month8: "August",
      month9: "September",
      month10: "October",
      month11: "November",
      month12: "December",
      week: "week",
      weeks: {
        sun: "Sun",
        mon: "Mon",
        tue: "Tue",
        wed: "Wed",
        thu: "Thu",
        fri: "Fri",
        sat: "Sat"
      },
      weeksFull: {
        sun: "Sunday",
        mon: "Monday",
        tue: "Tuesday",
        wed: "Wednesday",
        thu: "Thursday",
        fri: "Friday",
        sat: "Saturday"
      },
      months: {
        jan: "Jan",
        feb: "Feb",
        mar: "Mar",
        apr: "Apr",
        may: "May",
        jun: "Jun",
        jul: "Jul",
        aug: "Aug",
        sep: "Sep",
        oct: "Oct",
        nov: "Nov",
        dec: "Dec"
      }
    },
    inputNumber: {
      decrease: "decrease number",
      increase: "increase number"
    },
    select: {
      loading: "Loading",
      noMatch: "No matching data",
      noData: "No data",
      placeholder: "Select"
    },
    dropdown: {
      toggleDropdown: "Toggle Dropdown"
    },
    cascader: {
      noMatch: "No matching data",
      loading: "Loading",
      placeholder: "Select",
      noData: "No data"
    },
    pagination: {
      goto: "Go to",
      pagesize: "/page",
      total: "Total {total}",
      pageClassifier: "",
      page: "Page",
      prev: "Go to previous page",
      next: "Go to next page",
      currentPage: "page {pager}",
      prevPages: "Previous {pager} pages",
      nextPages: "Next {pager} pages",
      deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
    },
    dialog: {
      close: "Close this dialog"
    },
    drawer: {
      close: "Close this dialog"
    },
    messagebox: {
      title: "Message",
      confirm: "OK",
      cancel: "Cancel",
      error: "Illegal input",
      close: "Close this dialog"
    },
    upload: {
      deleteTip: "press delete to remove",
      delete: "Delete",
      preview: "Preview",
      continue: "Continue"
    },
    slider: {
      defaultLabel: "slider between {min} and {max}",
      defaultRangeStartLabel: "pick start value",
      defaultRangeEndLabel: "pick end value"
    },
    table: {
      emptyText: "No Data",
      confirmFilter: "Confirm",
      resetFilter: "Reset",
      clearFilter: "All",
      sumText: "Sum"
    },
    tour: {
      next: "Next",
      previous: "Previous",
      finish: "Finish"
    },
    tree: {
      emptyText: "No Data"
    },
    transfer: {
      noMatch: "No matching data",
      noData: "No data",
      titles: ["List 1", "List 2"],
      filterPlaceholder: "Enter keyword",
      noCheckedFormat: "{total} items",
      hasCheckedFormat: "{checked}/{total} checked"
    },
    image: {
      error: "FAILED"
    },
    pageHeader: {
      title: "Back"
    },
    popconfirm: {
      confirmButtonText: "Yes",
      cancelButtonText: "No"
    },
    carousel: {
      leftArrow: "Carousel arrow left",
      rightArrow: "Carousel arrow right",
      indicator: "Carousel switch to index {index}"
    }
  }
};
const H$e = (t) => (e, n) => G$e(e, n, z(t)), G$e = (t, e, n) => vn(n, t, t).replace(/\{(\w+)\}/g, (r, i) => {
  var a;
  return `${(a = e == null ? void 0 : e[i]) != null ? a : `{${i}}`}`;
}), j$e = (t) => {
  const e = V(() => z(t).name), n = Vs(t) ? t : ee(t);
  return {
    lang: e,
    locale: n,
    t: H$e(t)
  };
}, Z$e = Symbol("localeContextKey"), mN = (t) => {
  const e = et(Z$e, ee());
  return j$e(V(() => e.value || Q$e));
}, Bx = "el", U$e = "is-", nd = (t, e, n, r, i) => {
  let a = `${t}-${e}`;
  return n && (a += `-${n}`), r && (a += `__${r}`), i && (a += `--${i}`), a;
}, X$e = Symbol("namespaceContextKey"), yN = (t) => {
  const e = In() ? et(X$e, ee(Bx)) : ee(Bx);
  return V(() => z(e) || Bx);
}, $n = (t, e) => {
  const n = yN();
  return {
    namespace: n,
    b: (v = "") => nd(n.value, t, v, "", ""),
    e: (v) => v ? nd(n.value, t, "", v, "") : "",
    m: (v) => v ? nd(n.value, t, "", "", v) : "",
    be: (v, g) => v && g ? nd(n.value, t, v, g, "") : "",
    em: (v, g) => v && g ? nd(n.value, t, "", v, g) : "",
    bm: (v, g) => v && g ? nd(n.value, t, v, "", g) : "",
    bem: (v, g, m) => v && g && m ? nd(n.value, t, v, g, m) : "",
    is: (v, ...g) => {
      const m = g.length >= 1 ? g[0] : !0;
      return v && m ? `${U$e}${v}` : "";
    },
    cssVar: (v) => {
      const g = {};
      for (const m in v)
        v[m] && (g[`--${n.value}-${m}`] = v[m]);
      return g;
    },
    cssVarName: (v) => `--${n.value}-${v}`,
    cssVarBlock: (v) => {
      const g = {};
      for (const m in v)
        v[m] && (g[`--${n.value}-${t}-${m}`] = v[m]);
      return g;
    },
    cssVarBlockName: (v) => `--${n.value}-${t}-${v}`
  };
}, Y$e = (t, e = {}) => {
  Vs(t) || v$e("[useLockscreen]", "You need to pass a ref param to this function");
  const n = e.ns || $n("popup"), r = V(() => n.bm("parent", "hidden"));
  if (!Fr || nW(document.body, r.value))
    return;
  let i = 0, a = !1, o = "0";
  const s = () => {
    setTimeout(() => {
      Lx(document == null ? void 0 : document.body, r.value), a && document && (document.body.style.width = o);
    }, 200);
  };
  me(t, (l) => {
    if (!l) {
      s();
      return;
    }
    a = !nW(document.body, r.value), a && (o = document.body.style.width), i = y$e(n.namespace.value);
    const u = document.documentElement.clientHeight < document.body.scrollHeight, c = m$e(document.body, "overflowY");
    i > 0 && (u || c === "scroll") && a && (document.body.style.width = `calc(100% - ${i}px)`), Ote(document.body, r.value);
  }), im(() => s());
}, q$e = d2({
  type: mn(Boolean),
  default: null
}), K$e = d2({
  type: mn(Function)
}), Tte = (t) => {
  const e = `update:${t}`, n = `onUpdate:${t}`, r = [e], i = {
    [t]: q$e,
    [n]: K$e
  };
  return {
    useModelToggle: ({
      indicator: o,
      toggleReason: s,
      shouldHideWhenRouteChanges: l,
      shouldProceed: u,
      onShow: c,
      onHide: f
    }) => {
      const d = In(), { emit: h } = d, p = d.props, v = V(() => Jd(p[n])), g = V(() => p[t] === null), m = (C) => {
        o.value !== !0 && (o.value = !0, s && (s.value = C), Jd(c) && c(C));
      }, y = (C) => {
        o.value !== !1 && (o.value = !1, s && (s.value = C), Jd(f) && f(C));
      }, _ = (C) => {
        if (p.disabled === !0 || Jd(u) && !u())
          return;
        const P = v.value && Fr;
        P && h(e, !0), (g.value || !P) && m(C);
      }, O = (C) => {
        if (p.disabled === !0 || !Fr)
          return;
        const P = v.value && Fr;
        P && h(e, !1), (g.value || !P) && y(C);
      }, S = (C) => {
        hf(C) && (p.disabled && C ? v.value && h(e, !1) : o.value !== C && (C ? m() : y()));
      }, x = () => {
        o.value ? O() : _();
      };
      return me(() => p[t], S), l && d.appContext.config.globalProperties.$route !== void 0 && me(() => ({
        ...d.proxy.$route
      }), () => {
        l.value && o.value && O();
      }), _t(() => {
        S(p[t]);
      }), {
        hide: O,
        show: _,
        toggle: x,
        hasUpdateHandler: v
      };
    },
    useModelToggleProps: i,
    useModelToggleEmits: r
  };
};
Tte("modelValue");
const Pte = (t) => {
  const e = In();
  return V(() => {
    var n, r;
    return (r = (n = e == null ? void 0 : e.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[t];
  });
};
var Ra = "top", ns = "bottom", rs = "right", ka = "left", bN = "auto", F_ = [Ra, ns, rs, ka], Og = "start", Sb = "end", J$e = "clippingParents", $te = "viewport", v0 = "popper", eAe = "reference", rW = F_.reduce(function(t, e) {
  return t.concat([e + "-" + Og, e + "-" + Sb]);
}, []), _N = [].concat(F_, [bN]).reduce(function(t, e) {
  return t.concat([e, e + "-" + Og, e + "-" + Sb]);
}, []), tAe = "beforeRead", nAe = "read", rAe = "afterRead", iAe = "beforeMain", aAe = "main", oAe = "afterMain", sAe = "beforeWrite", lAe = "write", uAe = "afterWrite", cAe = [tAe, nAe, rAe, iAe, aAe, oAe, sAe, lAe, uAe];
function zl(t) {
  return t ? (t.nodeName || "").toLowerCase() : null;
}
function qs(t) {
  if (t == null) return window;
  if (t.toString() !== "[object Window]") {
    var e = t.ownerDocument;
    return e && e.defaultView || window;
  }
  return t;
}
function Sg(t) {
  var e = qs(t).Element;
  return t instanceof e || t instanceof Element;
}
function Xo(t) {
  var e = qs(t).HTMLElement;
  return t instanceof e || t instanceof HTMLElement;
}
function ON(t) {
  if (typeof ShadowRoot > "u") return !1;
  var e = qs(t).ShadowRoot;
  return t instanceof e || t instanceof ShadowRoot;
}
function fAe(t) {
  var e = t.state;
  Object.keys(e.elements).forEach(function(n) {
    var r = e.styles[n] || {}, i = e.attributes[n] || {}, a = e.elements[n];
    !Xo(a) || !zl(a) || (Object.assign(a.style, r), Object.keys(i).forEach(function(o) {
      var s = i[o];
      s === !1 ? a.removeAttribute(o) : a.setAttribute(o, s === !0 ? "" : s);
    }));
  });
}
function dAe(t) {
  var e = t.state, n = { popper: { position: e.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
  return Object.assign(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() {
    Object.keys(e.elements).forEach(function(r) {
      var i = e.elements[r], a = e.attributes[r] || {}, o = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), s = o.reduce(function(l, u) {
        return l[u] = "", l;
      }, {});
      !Xo(i) || !zl(i) || (Object.assign(i.style, s), Object.keys(a).forEach(function(l) {
        i.removeAttribute(l);
      }));
    });
  };
}
var Ate = { name: "applyStyles", enabled: !0, phase: "write", fn: fAe, effect: dAe, requires: ["computeStyles"] };
function Rl(t) {
  return t.split("-")[0];
}
var vh = Math.max, Hw = Math.min, xg = Math.round;
function wg(t, e) {
  e === void 0 && (e = !1);
  var n = t.getBoundingClientRect(), r = 1, i = 1;
  if (Xo(t) && e) {
    var a = t.offsetHeight, o = t.offsetWidth;
    o > 0 && (r = xg(n.width) / o || 1), a > 0 && (i = xg(n.height) / a || 1);
  }
  return { width: n.width / r, height: n.height / i, top: n.top / i, right: n.right / r, bottom: n.bottom / i, left: n.left / r, x: n.left / r, y: n.top / i };
}
function SN(t) {
  var e = wg(t), n = t.offsetWidth, r = t.offsetHeight;
  return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), { x: t.offsetLeft, y: t.offsetTop, width: n, height: r };
}
function Ete(t, e) {
  var n = e.getRootNode && e.getRootNode();
  if (t.contains(e)) return !0;
  if (n && ON(n)) {
    var r = e;
    do {
      if (r && t.isSameNode(r)) return !0;
      r = r.parentNode || r.host;
    } while (r);
  }
  return !1;
}
function Lu(t) {
  return qs(t).getComputedStyle(t);
}
function hAe(t) {
  return ["table", "td", "th"].indexOf(zl(t)) >= 0;
}
function Mf(t) {
  return ((Sg(t) ? t.ownerDocument : t.document) || window.document).documentElement;
}
function h2(t) {
  return zl(t) === "html" ? t : t.assignedSlot || t.parentNode || (ON(t) ? t.host : null) || Mf(t);
}
function iW(t) {
  return !Xo(t) || Lu(t).position === "fixed" ? null : t.offsetParent;
}
function pAe(t) {
  var e = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
  if (n && Xo(t)) {
    var r = Lu(t);
    if (r.position === "fixed") return null;
  }
  var i = h2(t);
  for (ON(i) && (i = i.host); Xo(i) && ["html", "body"].indexOf(zl(i)) < 0; ) {
    var a = Lu(i);
    if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || e && a.willChange === "filter" || e && a.filter && a.filter !== "none") return i;
    i = i.parentNode;
  }
  return null;
}
function W_(t) {
  for (var e = qs(t), n = iW(t); n && hAe(n) && Lu(n).position === "static"; ) n = iW(n);
  return n && (zl(n) === "html" || zl(n) === "body" && Lu(n).position === "static") ? e : n || pAe(t) || e;
}
function xN(t) {
  return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
}
function ky(t, e, n) {
  return vh(t, Hw(e, n));
}
function vAe(t, e, n) {
  var r = ky(t, e, n);
  return r > n ? n : r;
}
function Mte() {
  return { top: 0, right: 0, bottom: 0, left: 0 };
}
function Ite(t) {
  return Object.assign({}, Mte(), t);
}
function Dte(t, e) {
  return e.reduce(function(n, r) {
    return n[r] = t, n;
  }, {});
}
var gAe = function(t, e) {
  return t = typeof t == "function" ? t(Object.assign({}, e.rects, { placement: e.placement })) : t, Ite(typeof t != "number" ? t : Dte(t, F_));
};
function mAe(t) {
  var e, n = t.state, r = t.name, i = t.options, a = n.elements.arrow, o = n.modifiersData.popperOffsets, s = Rl(n.placement), l = xN(s), u = [ka, rs].indexOf(s) >= 0, c = u ? "height" : "width";
  if (!(!a || !o)) {
    var f = gAe(i.padding, n), d = SN(a), h = l === "y" ? Ra : ka, p = l === "y" ? ns : rs, v = n.rects.reference[c] + n.rects.reference[l] - o[l] - n.rects.popper[c], g = o[l] - n.rects.reference[l], m = W_(a), y = m ? l === "y" ? m.clientHeight || 0 : m.clientWidth || 0 : 0, _ = v / 2 - g / 2, O = f[h], S = y - d[c] - f[p], x = y / 2 - d[c] / 2 + _, C = ky(O, x, S), P = l;
    n.modifiersData[r] = (e = {}, e[P] = C, e.centerOffset = C - x, e);
  }
}
function yAe(t) {
  var e = t.state, n = t.options, r = n.element, i = r === void 0 ? "[data-popper-arrow]" : r;
  i != null && (typeof i == "string" && (i = e.elements.popper.querySelector(i), !i) || !Ete(e.elements.popper, i) || (e.elements.arrow = i));
}
var bAe = { name: "arrow", enabled: !0, phase: "main", fn: mAe, effect: yAe, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
function Cg(t) {
  return t.split("-")[1];
}
var _Ae = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
function OAe(t) {
  var e = t.x, n = t.y, r = window, i = r.devicePixelRatio || 1;
  return { x: xg(e * i) / i || 0, y: xg(n * i) / i || 0 };
}
function aW(t) {
  var e, n = t.popper, r = t.popperRect, i = t.placement, a = t.variation, o = t.offsets, s = t.position, l = t.gpuAcceleration, u = t.adaptive, c = t.roundOffsets, f = t.isFixed, d = o.x, h = d === void 0 ? 0 : d, p = o.y, v = p === void 0 ? 0 : p, g = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v };
  h = g.x, v = g.y;
  var m = o.hasOwnProperty("x"), y = o.hasOwnProperty("y"), _ = ka, O = Ra, S = window;
  if (u) {
    var x = W_(n), C = "clientHeight", P = "clientWidth";
    if (x === qs(n) && (x = Mf(n), Lu(x).position !== "static" && s === "absolute" && (C = "scrollHeight", P = "scrollWidth")), x = x, i === Ra || (i === ka || i === rs) && a === Sb) {
      O = ns;
      var $ = f && x === S && S.visualViewport ? S.visualViewport.height : x[C];
      v -= $ - r.height, v *= l ? 1 : -1;
    }
    if (i === ka || (i === Ra || i === ns) && a === Sb) {
      _ = rs;
      var T = f && x === S && S.visualViewport ? S.visualViewport.width : x[P];
      h -= T - r.width, h *= l ? 1 : -1;
    }
  }
  var E = Object.assign({ position: s }, u && _Ae), M = c === !0 ? OAe({ x: h, y: v }) : { x: h, y: v };
  if (h = M.x, v = M.y, l) {
    var R;
    return Object.assign({}, E, (R = {}, R[O] = y ? "0" : "", R[_] = m ? "0" : "", R.transform = (S.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", R));
  }
  return Object.assign({}, E, (e = {}, e[O] = y ? v + "px" : "", e[_] = m ? h + "px" : "", e.transform = "", e));
}
function SAe(t) {
  var e = t.state, n = t.options, r = n.gpuAcceleration, i = r === void 0 ? !0 : r, a = n.adaptive, o = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: Rl(e.placement), variation: Cg(e.placement), popper: e.elements.popper, popperRect: e.rects.popper, gpuAcceleration: i, isFixed: e.options.strategy === "fixed" };
  e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, aW(Object.assign({}, u, { offsets: e.modifiersData.popperOffsets, position: e.options.strategy, adaptive: o, roundOffsets: l })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, aW(Object.assign({}, u, { offsets: e.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-placement": e.placement });
}
var Rte = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: SAe, data: {} }, RO = { passive: !0 };
function xAe(t) {
  var e = t.state, n = t.instance, r = t.options, i = r.scroll, a = i === void 0 ? !0 : i, o = r.resize, s = o === void 0 ? !0 : o, l = qs(e.elements.popper), u = [].concat(e.scrollParents.reference, e.scrollParents.popper);
  return a && u.forEach(function(c) {
    c.addEventListener("scroll", n.update, RO);
  }), s && l.addEventListener("resize", n.update, RO), function() {
    a && u.forEach(function(c) {
      c.removeEventListener("scroll", n.update, RO);
    }), s && l.removeEventListener("resize", n.update, RO);
  };
}
var kte = { name: "eventListeners", enabled: !0, phase: "write", fn: function() {
}, effect: xAe, data: {} }, wAe = { left: "right", right: "left", bottom: "top", top: "bottom" };
function zx(t) {
  return t.replace(/left|right|bottom|top/g, function(e) {
    return wAe[e];
  });
}
var CAe = { start: "end", end: "start" };
function oW(t) {
  return t.replace(/start|end/g, function(e) {
    return CAe[e];
  });
}
function wN(t) {
  var e = qs(t), n = e.pageXOffset, r = e.pageYOffset;
  return { scrollLeft: n, scrollTop: r };
}
function CN(t) {
  return wg(Mf(t)).left + wN(t).scrollLeft;
}
function TAe(t) {
  var e = qs(t), n = Mf(t), r = e.visualViewport, i = n.clientWidth, a = n.clientHeight, o = 0, s = 0;
  return r && (i = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (o = r.offsetLeft, s = r.offsetTop)), { width: i, height: a, x: o + CN(t), y: s };
}
function PAe(t) {
  var e, n = Mf(t), r = wN(t), i = (e = t.ownerDocument) == null ? void 0 : e.body, a = vh(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), o = vh(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), s = -r.scrollLeft + CN(t), l = -r.scrollTop;
  return Lu(i || n).direction === "rtl" && (s += vh(n.clientWidth, i ? i.clientWidth : 0) - a), { width: a, height: o, x: s, y: l };
}
function TN(t) {
  var e = Lu(t), n = e.overflow, r = e.overflowX, i = e.overflowY;
  return /auto|scroll|overlay|hidden/.test(n + i + r);
}
function Lte(t) {
  return ["html", "body", "#document"].indexOf(zl(t)) >= 0 ? t.ownerDocument.body : Xo(t) && TN(t) ? t : Lte(h2(t));
}
function Ly(t, e) {
  var n;
  e === void 0 && (e = []);
  var r = Lte(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), a = qs(r), o = i ? [a].concat(a.visualViewport || [], TN(r) ? r : []) : r, s = e.concat(o);
  return i ? s : s.concat(Ly(h2(o)));
}
function XD(t) {
  return Object.assign({}, t, { left: t.x, top: t.y, right: t.x + t.width, bottom: t.y + t.height });
}
function $Ae(t) {
  var e = wg(t);
  return e.top = e.top + t.clientTop, e.left = e.left + t.clientLeft, e.bottom = e.top + t.clientHeight, e.right = e.left + t.clientWidth, e.width = t.clientWidth, e.height = t.clientHeight, e.x = e.left, e.y = e.top, e;
}
function sW(t, e) {
  return e === $te ? XD(TAe(t)) : Sg(e) ? $Ae(e) : XD(PAe(Mf(t)));
}
function AAe(t) {
  var e = Ly(h2(t)), n = ["absolute", "fixed"].indexOf(Lu(t).position) >= 0, r = n && Xo(t) ? W_(t) : t;
  return Sg(r) ? e.filter(function(i) {
    return Sg(i) && Ete(i, r) && zl(i) !== "body";
  }) : [];
}
function EAe(t, e, n) {
  var r = e === "clippingParents" ? AAe(t) : [].concat(e), i = [].concat(r, [n]), a = i[0], o = i.reduce(function(s, l) {
    var u = sW(t, l);
    return s.top = vh(u.top, s.top), s.right = Hw(u.right, s.right), s.bottom = Hw(u.bottom, s.bottom), s.left = vh(u.left, s.left), s;
  }, sW(t, a));
  return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
}
function Nte(t) {
  var e = t.reference, n = t.element, r = t.placement, i = r ? Rl(r) : null, a = r ? Cg(r) : null, o = e.x + e.width / 2 - n.width / 2, s = e.y + e.height / 2 - n.height / 2, l;
  switch (i) {
    case Ra:
      l = { x: o, y: e.y - n.height };
      break;
    case ns:
      l = { x: o, y: e.y + e.height };
      break;
    case rs:
      l = { x: e.x + e.width, y: s };
      break;
    case ka:
      l = { x: e.x - n.width, y: s };
      break;
    default:
      l = { x: e.x, y: e.y };
  }
  var u = i ? xN(i) : null;
  if (u != null) {
    var c = u === "y" ? "height" : "width";
    switch (a) {
      case Og:
        l[u] = l[u] - (e[c] / 2 - n[c] / 2);
        break;
      case Sb:
        l[u] = l[u] + (e[c] / 2 - n[c] / 2);
        break;
    }
  }
  return l;
}
function xb(t, e) {
  e === void 0 && (e = {});
  var n = e, r = n.placement, i = r === void 0 ? t.placement : r, a = n.boundary, o = a === void 0 ? J$e : a, s = n.rootBoundary, l = s === void 0 ? $te : s, u = n.elementContext, c = u === void 0 ? v0 : u, f = n.altBoundary, d = f === void 0 ? !1 : f, h = n.padding, p = h === void 0 ? 0 : h, v = Ite(typeof p != "number" ? p : Dte(p, F_)), g = c === v0 ? eAe : v0, m = t.rects.popper, y = t.elements[d ? g : c], _ = EAe(Sg(y) ? y : y.contextElement || Mf(t.elements.popper), o, l), O = wg(t.elements.reference), S = Nte({ reference: O, element: m, strategy: "absolute", placement: i }), x = XD(Object.assign({}, m, S)), C = c === v0 ? x : O, P = { top: _.top - C.top + v.top, bottom: C.bottom - _.bottom + v.bottom, left: _.left - C.left + v.left, right: C.right - _.right + v.right }, $ = t.modifiersData.offset;
  if (c === v0 && $) {
    var T = $[i];
    Object.keys(P).forEach(function(E) {
      var M = [rs, ns].indexOf(E) >= 0 ? 1 : -1, R = [Ra, ns].indexOf(E) >= 0 ? "y" : "x";
      P[E] += T[R] * M;
    });
  }
  return P;
}
function MAe(t, e) {
  e === void 0 && (e = {});
  var n = e, r = n.placement, i = n.boundary, a = n.rootBoundary, o = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? _N : l, c = Cg(r), f = c ? s ? rW : rW.filter(function(p) {
    return Cg(p) === c;
  }) : F_, d = f.filter(function(p) {
    return u.indexOf(p) >= 0;
  });
  d.length === 0 && (d = f);
  var h = d.reduce(function(p, v) {
    return p[v] = xb(t, { placement: v, boundary: i, rootBoundary: a, padding: o })[Rl(v)], p;
  }, {});
  return Object.keys(h).sort(function(p, v) {
    return h[p] - h[v];
  });
}
function IAe(t) {
  if (Rl(t) === bN) return [];
  var e = zx(t);
  return [oW(t), e, oW(e)];
}
function DAe(t) {
  var e = t.state, n = t.options, r = t.name;
  if (!e.modifiersData[r]._skip) {
    for (var i = n.mainAxis, a = i === void 0 ? !0 : i, o = n.altAxis, s = o === void 0 ? !0 : o, l = n.fallbackPlacements, u = n.padding, c = n.boundary, f = n.rootBoundary, d = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, g = e.options.placement, m = Rl(g), y = m === g, _ = l || (y || !p ? [zx(g)] : IAe(g)), O = [g].concat(_).reduce(function(fe, ue) {
      return fe.concat(Rl(ue) === bN ? MAe(e, { placement: ue, boundary: c, rootBoundary: f, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ue);
    }, []), S = e.rects.reference, x = e.rects.popper, C = /* @__PURE__ */ new Map(), P = !0, $ = O[0], T = 0; T < O.length; T++) {
      var E = O[T], M = Rl(E), R = Cg(E) === Og, N = [Ra, ns].indexOf(M) >= 0, I = N ? "width" : "height", B = xb(e, { placement: E, boundary: c, rootBoundary: f, altBoundary: d, padding: u }), Q = N ? R ? rs : ka : R ? ns : Ra;
      S[I] > x[I] && (Q = zx(Q));
      var W = zx(Q), H = [];
      if (a && H.push(B[M] <= 0), s && H.push(B[Q] <= 0, B[W] <= 0), H.every(function(fe) {
        return fe;
      })) {
        $ = E, P = !1;
        break;
      }
      C.set(E, H);
    }
    if (P) for (var U = p ? 3 : 1, j = function(fe) {
      var ue = O.find(function(ye) {
        var se = C.get(ye);
        if (se) return se.slice(0, fe).every(function(he) {
          return he;
        });
      });
      if (ue) return $ = ue, "break";
    }, Y = U; Y > 0; Y--) {
      var ne = j(Y);
      if (ne === "break") break;
    }
    e.placement !== $ && (e.modifiersData[r]._skip = !0, e.placement = $, e.reset = !0);
  }
}
var RAe = { name: "flip", enabled: !0, phase: "main", fn: DAe, requiresIfExists: ["offset"], data: { _skip: !1 } };
function lW(t, e, n) {
  return n === void 0 && (n = { x: 0, y: 0 }), { top: t.top - e.height - n.y, right: t.right - e.width + n.x, bottom: t.bottom - e.height + n.y, left: t.left - e.width - n.x };
}
function uW(t) {
  return [Ra, rs, ns, ka].some(function(e) {
    return t[e] >= 0;
  });
}
function kAe(t) {
  var e = t.state, n = t.name, r = e.rects.reference, i = e.rects.popper, a = e.modifiersData.preventOverflow, o = xb(e, { elementContext: "reference" }), s = xb(e, { altBoundary: !0 }), l = lW(o, r), u = lW(s, i, a), c = uW(l), f = uW(u);
  e.modifiersData[n] = { referenceClippingOffsets: l, popperEscapeOffsets: u, isReferenceHidden: c, hasPopperEscaped: f }, e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-reference-hidden": c, "data-popper-escaped": f });
}
var LAe = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: kAe };
function NAe(t, e, n) {
  var r = Rl(t), i = [ka, Ra].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, e, { placement: t })) : n, o = a[0], s = a[1];
  return o = o || 0, s = (s || 0) * i, [ka, rs].indexOf(r) >= 0 ? { x: s, y: o } : { x: o, y: s };
}
function BAe(t) {
  var e = t.state, n = t.options, r = t.name, i = n.offset, a = i === void 0 ? [0, 0] : i, o = _N.reduce(function(c, f) {
    return c[f] = NAe(f, e.rects, a), c;
  }, {}), s = o[e.placement], l = s.x, u = s.y;
  e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += u), e.modifiersData[r] = o;
}
var zAe = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: BAe };
function VAe(t) {
  var e = t.state, n = t.name;
  e.modifiersData[n] = Nte({ reference: e.rects.reference, element: e.rects.popper, strategy: "absolute", placement: e.placement });
}
var Bte = { name: "popperOffsets", enabled: !0, phase: "read", fn: VAe, data: {} };
function FAe(t) {
  return t === "x" ? "y" : "x";
}
function WAe(t) {
  var e = t.state, n = t.options, r = t.name, i = n.mainAxis, a = i === void 0 ? !0 : i, o = n.altAxis, s = o === void 0 ? !1 : o, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, f = n.padding, d = n.tether, h = d === void 0 ? !0 : d, p = n.tetherOffset, v = p === void 0 ? 0 : p, g = xb(e, { boundary: l, rootBoundary: u, padding: f, altBoundary: c }), m = Rl(e.placement), y = Cg(e.placement), _ = !y, O = xN(m), S = FAe(O), x = e.modifiersData.popperOffsets, C = e.rects.reference, P = e.rects.popper, $ = typeof v == "function" ? v(Object.assign({}, e.rects, { placement: e.placement })) : v, T = typeof $ == "number" ? { mainAxis: $, altAxis: $ } : Object.assign({ mainAxis: 0, altAxis: 0 }, $), E = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, M = { x: 0, y: 0 };
  if (x) {
    if (a) {
      var R, N = O === "y" ? Ra : ka, I = O === "y" ? ns : rs, B = O === "y" ? "height" : "width", Q = x[O], W = Q + g[N], H = Q - g[I], U = h ? -P[B] / 2 : 0, j = y === Og ? C[B] : P[B], Y = y === Og ? -P[B] : -C[B], ne = e.elements.arrow, fe = h && ne ? SN(ne) : { width: 0, height: 0 }, ue = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Mte(), ye = ue[N], se = ue[I], he = ky(0, C[B], fe[B]), re = _ ? C[B] / 2 - U - he - ye - T.mainAxis : j - he - ye - T.mainAxis, q = _ ? -C[B] / 2 + U + he + se + T.mainAxis : Y + he + se + T.mainAxis, K = e.elements.arrow && W_(e.elements.arrow), de = K ? O === "y" ? K.clientTop || 0 : K.clientLeft || 0 : 0, xe = (R = E == null ? void 0 : E[O]) != null ? R : 0, we = Q + re - xe - de, He = Q + q - xe, je = ky(h ? Hw(W, we) : W, Q, h ? vh(H, He) : H);
      x[O] = je, M[O] = je - Q;
    }
    if (s) {
      var Be, Le = O === "x" ? Ra : ka, Pe = O === "x" ? ns : rs, Fe = x[S], Ye = S === "y" ? "height" : "width", xt = Fe + g[Le], It = Fe - g[Pe], an = [Ra, ka].indexOf(m) !== -1, Ae = (Be = E == null ? void 0 : E[S]) != null ? Be : 0, gt = an ? xt : Fe - C[Ye] - P[Ye] - Ae + T.altAxis, Xt = an ? Fe + C[Ye] + P[Ye] - Ae - T.altAxis : It, Bn = h && an ? vAe(gt, Fe, Xt) : ky(h ? gt : xt, Fe, h ? Xt : It);
      x[S] = Bn, M[S] = Bn - Fe;
    }
    e.modifiersData[r] = M;
  }
}
var QAe = { name: "preventOverflow", enabled: !0, phase: "main", fn: WAe, requiresIfExists: ["offset"] };
function HAe(t) {
  return { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop };
}
function GAe(t) {
  return t === qs(t) || !Xo(t) ? wN(t) : HAe(t);
}
function jAe(t) {
  var e = t.getBoundingClientRect(), n = xg(e.width) / t.offsetWidth || 1, r = xg(e.height) / t.offsetHeight || 1;
  return n !== 1 || r !== 1;
}
function ZAe(t, e, n) {
  n === void 0 && (n = !1);
  var r = Xo(e), i = Xo(e) && jAe(e), a = Mf(e), o = wg(t, i), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 };
  return (r || !r && !n) && ((zl(e) !== "body" || TN(a)) && (s = GAe(e)), Xo(e) ? (l = wg(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : a && (l.x = CN(a))), { x: o.left + s.scrollLeft - l.x, y: o.top + s.scrollTop - l.y, width: o.width, height: o.height };
}
function UAe(t) {
  var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
  t.forEach(function(a) {
    e.set(a.name, a);
  });
  function i(a) {
    n.add(a.name);
    var o = [].concat(a.requires || [], a.requiresIfExists || []);
    o.forEach(function(s) {
      if (!n.has(s)) {
        var l = e.get(s);
        l && i(l);
      }
    }), r.push(a);
  }
  return t.forEach(function(a) {
    n.has(a.name) || i(a);
  }), r;
}
function XAe(t) {
  var e = UAe(t);
  return cAe.reduce(function(n, r) {
    return n.concat(e.filter(function(i) {
      return i.phase === r;
    }));
  }, []);
}
function YAe(t) {
  var e;
  return function() {
    return e || (e = new Promise(function(n) {
      Promise.resolve().then(function() {
        e = void 0, n(t());
      });
    })), e;
  };
}
function qAe(t) {
  var e = t.reduce(function(n, r) {
    var i = n[r.name];
    return n[r.name] = i ? Object.assign({}, i, r, { options: Object.assign({}, i.options, r.options), data: Object.assign({}, i.data, r.data) }) : r, n;
  }, {});
  return Object.keys(e).map(function(n) {
    return e[n];
  });
}
var cW = { placement: "bottom", modifiers: [], strategy: "absolute" };
function fW() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
  return !e.some(function(r) {
    return !(r && typeof r.getBoundingClientRect == "function");
  });
}
function PN(t) {
  t === void 0 && (t = {});
  var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, i = e.defaultOptions, a = i === void 0 ? cW : i;
  return function(o, s, l) {
    l === void 0 && (l = a);
    var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, cW, a), modifiersData: {}, elements: { reference: o, popper: s }, attributes: {}, styles: {} }, c = [], f = !1, d = { state: u, setOptions: function(v) {
      var g = typeof v == "function" ? v(u.options) : v;
      p(), u.options = Object.assign({}, a, u.options, g), u.scrollParents = { reference: Sg(o) ? Ly(o) : o.contextElement ? Ly(o.contextElement) : [], popper: Ly(s) };
      var m = XAe(qAe([].concat(r, u.options.modifiers)));
      return u.orderedModifiers = m.filter(function(y) {
        return y.enabled;
      }), h(), d.update();
    }, forceUpdate: function() {
      if (!f) {
        var v = u.elements, g = v.reference, m = v.popper;
        if (fW(g, m)) {
          u.rects = { reference: ZAe(g, W_(m), u.options.strategy === "fixed"), popper: SN(m) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(P) {
            return u.modifiersData[P.name] = Object.assign({}, P.data);
          });
          for (var y = 0; y < u.orderedModifiers.length; y++) {
            if (u.reset === !0) {
              u.reset = !1, y = -1;
              continue;
            }
            var _ = u.orderedModifiers[y], O = _.fn, S = _.options, x = S === void 0 ? {} : S, C = _.name;
            typeof O == "function" && (u = O({ state: u, options: x, name: C, instance: d }) || u);
          }
        }
      }
    }, update: YAe(function() {
      return new Promise(function(v) {
        d.forceUpdate(), v(u);
      });
    }), destroy: function() {
      p(), f = !0;
    } };
    if (!fW(o, s)) return d;
    d.setOptions(l).then(function(v) {
      !f && l.onFirstUpdate && l.onFirstUpdate(v);
    });
    function h() {
      u.orderedModifiers.forEach(function(v) {
        var g = v.name, m = v.options, y = m === void 0 ? {} : m, _ = v.effect;
        if (typeof _ == "function") {
          var O = _({ state: u, name: g, instance: d, options: y }), S = function() {
          };
          c.push(O || S);
        }
      });
    }
    function p() {
      c.forEach(function(v) {
        return v();
      }), c = [];
    }
    return d;
  };
}
PN();
var KAe = [kte, Bte, Rte, Ate];
PN({ defaultModifiers: KAe });
var JAe = [kte, Bte, Rte, Ate, zAe, RAe, QAe, bAe, LAe], eEe = PN({ defaultModifiers: JAe });
const tEe = (t, e, n = {}) => {
  const r = {
    name: "updateState",
    enabled: !0,
    phase: "write",
    fn: ({ state: l }) => {
      const u = nEe(l);
      Object.assign(o.value, u);
    },
    requires: ["computeStyles"]
  }, i = V(() => {
    const { onFirstUpdate: l, placement: u, strategy: c, modifiers: f } = z(n);
    return {
      onFirstUpdate: l,
      placement: u || "bottom",
      strategy: c || "absolute",
      modifiers: [
        ...f || [],
        r,
        { name: "applyStyles", enabled: !1 }
      ]
    };
  }), a = ve(), o = ee({
    styles: {
      popper: {
        position: z(i).strategy,
        left: "0",
        top: "0"
      },
      arrow: {
        position: "absolute"
      }
    },
    attributes: {}
  }), s = () => {
    a.value && (a.value.destroy(), a.value = void 0);
  };
  return me(i, (l) => {
    const u = z(a);
    u && u.setOptions(l);
  }, {
    deep: !0
  }), me([t, e], ([l, u]) => {
    s(), !(!l || !u) && (a.value = eEe(l, u, z(i)));
  }), Qt(() => {
    s();
  }), {
    state: V(() => {
      var l;
      return { ...((l = z(a)) == null ? void 0 : l.state) || {} };
    }),
    styles: V(() => z(o).styles),
    attributes: V(() => z(o).attributes),
    update: () => {
      var l;
      return (l = z(a)) == null ? void 0 : l.update();
    },
    forceUpdate: () => {
      var l;
      return (l = z(a)) == null ? void 0 : l.forceUpdate();
    },
    instanceRef: V(() => z(a))
  };
};
function nEe(t) {
  const e = Object.keys(t.elements), n = Ww(e.map((i) => [i, t.styles[i] || {}])), r = Ww(e.map((i) => [i, t.attributes[i]]));
  return {
    styles: n,
    attributes: r
  };
}
const zte = (t) => {
  if (!t)
    return { onClick: Kc, onMousedown: Kc, onMouseup: Kc };
  let e = !1, n = !1;
  return { onClick: (o) => {
    e && n && t(o), e = n = !1;
  }, onMousedown: (o) => {
    e = o.target === o.currentTarget;
  }, onMouseup: (o) => {
    n = o.target === o.currentTarget;
  } };
};
function dW() {
  let t;
  const e = (r, i) => {
    n(), t = window.setTimeout(r, i);
  }, n = () => window.clearTimeout(t);
  return t2(() => n()), {
    registerTimeout: e,
    cancelTimeout: n
  };
}
const YD = {
  prefix: Math.floor(Math.random() * 1e4),
  current: 0
}, rEe = Symbol("elIdInjection"), Vte = () => In() ? et(rEe, YD) : YD, wb = (t) => {
  const e = Vte();
  !Fr && e === YD && Vi("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
usage: app.provide(ID_INJECTION_KEY, {
  prefix: number,
  current: number,
})`);
  const n = yN();
  return V(() => z(t) || `${n.value}-id-${e.prefix}-${e.current++}`);
};
let mv = [];
const hW = (t) => {
  const e = t;
  e.key === wa.esc && mv.forEach((n) => n(e));
}, iEe = (t) => {
  _t(() => {
    mv.length === 0 && document.addEventListener("keydown", hW), Fr && mv.push(t);
  }), Qt(() => {
    mv = mv.filter((e) => e !== t), mv.length === 0 && Fr && document.removeEventListener("keydown", hW);
  });
};
let pW;
const Fte = () => {
  const t = yN(), e = Vte(), n = V(() => `${t.value}-popper-container-${e.prefix}`), r = V(() => `#${n.value}`);
  return {
    id: n,
    selector: r
  };
}, aEe = (t) => {
  const e = document.createElement("div");
  return e.id = t, document.body.appendChild(e), e;
}, oEe = () => {
  const { id: t, selector: e } = Fte();
  return $ee(() => {
    Fr && (process.env.NODE_ENV === "test" || !pW && !document.body.querySelector(e.value)) && (pW = aEe(t.value));
  }), {
    id: t,
    selector: e
  };
}, sEe = hr({
  showAfter: {
    type: Number,
    default: 0
  },
  hideAfter: {
    type: Number,
    default: 200
  },
  autoClose: {
    type: Number,
    default: 0
  }
}), lEe = ({
  showAfter: t,
  hideAfter: e,
  autoClose: n,
  open: r,
  close: i
}) => {
  const { registerTimeout: a } = dW(), {
    registerTimeout: o,
    cancelTimeout: s
  } = dW();
  return {
    onOpen: (c) => {
      a(() => {
        r(c);
        const f = z(n);
        Ws(f) && f > 0 && o(() => {
          i(c);
        }, f);
      }, z(t));
    },
    onClose: (c) => {
      s(), a(() => {
        i(c);
      }, z(e));
    }
  };
}, Wte = Symbol("elForwardRef"), uEe = (t) => {
  Et(Wte, {
    setForwardRef: (n) => {
      t.value = n;
    }
  });
}, cEe = (t) => ({
  mounted(e) {
    t(e);
  },
  updated(e) {
    t(e);
  },
  unmounted() {
    t(null);
  }
}), vW = {
  current: 0
}, gW = ee(0), fEe = 2e3, mW = Symbol("elZIndexContextKey"), dEe = Symbol("zIndexContextKey"), Qte = (t) => {
  const e = In() ? et(mW, vW) : vW, n = In() ? et(dEe, void 0) : void 0, r = V(() => {
    const o = z(n);
    return Ws(o) ? o : fEe;
  }), i = V(() => r.value + gW.value), a = () => (e.current++, gW.value = e.current, i.value);
  return !Fr && !et(mW) && Vi("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
    initialZIndex: r,
    currentZIndex: i,
    nextZIndex: a
  };
};
function hEe(t) {
  const e = ee();
  function n() {
    if (t.value == null)
      return;
    const { selectionStart: i, selectionEnd: a, value: o } = t.value;
    if (i == null || a == null)
      return;
    const s = o.slice(0, Math.max(0, i)), l = o.slice(Math.max(0, a));
    e.value = {
      selectionStart: i,
      selectionEnd: a,
      value: o,
      beforeTxt: s,
      afterTxt: l
    };
  }
  function r() {
    if (t.value == null || e.value == null)
      return;
    const { value: i } = t.value, { beforeTxt: a, afterTxt: o, selectionStart: s } = e.value;
    if (a == null || o == null || s == null)
      return;
    let l = i.length;
    if (i.endsWith(o))
      l = i.length - o.length;
    else if (i.startsWith(a))
      l = a.length;
    else {
      const u = a[s - 1], c = i.indexOf(u, s - 1);
      c !== -1 && (l = c + 1);
    }
    t.value.setSelectionRange(l, l);
  }
  return [n, r];
}
const op = d2({
  type: String,
  values: L$e,
  required: !1
}), pEe = Symbol("size"), vEe = () => {
  const t = et(pEe, {});
  return V(() => z(t.size) || "");
};
function Hte(t, { afterFocus: e, beforeBlur: n, afterBlur: r } = {}) {
  const i = In(), { emit: a } = i, o = ve(), s = ee(!1), l = (f) => {
    s.value || (s.value = !0, a("focus", f), e == null || e());
  }, u = (f) => {
    var d;
    Jd(n) && n(f) || f.relatedTarget && ((d = o.value) != null && d.contains(f.relatedTarget)) || (s.value = !1, a("blur", f), r == null || r());
  }, c = () => {
    var f;
    (f = t.value) == null || f.focus();
  };
  return me(o, (f) => {
    f && f.setAttribute("tabindex", "-1");
  }), Iy(o, "click", c), {
    wrapperRef: o,
    isFocused: s,
    handleFocus: l,
    handleBlur: u
  };
}
const gEe = hr({
  ariaLabel: String,
  ariaOrientation: {
    type: String,
    values: ["horizontal", "vertical", "undefined"]
  },
  ariaControls: String
}), sp = (t) => mg(gEe, t), mEe = Symbol(), yW = ee();
function Gte(t, e = void 0) {
  const n = In() ? et(mEe, yW) : yW;
  return t ? V(() => {
    var r, i;
    return (i = (r = n.value) == null ? void 0 : r[t]) != null ? i : e;
  }) : n;
}
var Nn = (t, e) => {
  const n = t.__vccOpts || t;
  for (const [r, i] of e)
    n[r] = i;
  return n;
};
const yEe = hr({
  size: {
    type: mn([Number, String])
  },
  color: {
    type: String
  }
}), bEe = ae({
  name: "ElIcon",
  inheritAttrs: !1
}), _Ee = /* @__PURE__ */ ae({
  ...bEe,
  props: yEe,
  setup(t) {
    const e = t, n = $n("icon"), r = V(() => {
      const { size: i, color: a } = e;
      return !i && !a ? {} : {
        fontSize: Qw(i) ? void 0 : bg(i),
        "--color": a
      };
    });
    return (i, a) => (be(), Ue("i", Xn({
      class: z(n).b(),
      style: z(r)
    }, i.$attrs), [
      dn(i.$slots, "default")
    ], 16));
  }
});
var OEe = /* @__PURE__ */ Nn(_Ee, [["__file", "icon.vue"]]);
const $s = ec(OEe), $N = Symbol("formContextKey"), Cb = Symbol("formItemContextKey"), Tg = (t, e = {}) => {
  const n = ee(void 0), r = e.prop ? n : Pte("size"), i = e.global ? n : vEe(), a = e.form ? { size: void 0 } : et($N, void 0), o = e.formItem ? { size: void 0 } : et(Cb, void 0);
  return V(() => r.value || z(t) || (o == null ? void 0 : o.size) || (a == null ? void 0 : a.size) || i.value || "");
}, um = (t) => {
  const e = Pte("disabled"), n = et($N, void 0);
  return V(() => e.value || z(t) || (n == null ? void 0 : n.disabled) || !1);
}, lp = () => {
  const t = et($N, void 0), e = et(Cb, void 0);
  return {
    form: t,
    formItem: e
  };
}, Q_ = (t, {
  formItemContext: e,
  disableIdGeneration: n,
  disableIdManagement: r
}) => {
  n || (n = ee(!1)), r || (r = ee(!1));
  const i = ee();
  let a;
  const o = V(() => {
    var s;
    return !!(!(t.label || t.ariaLabel) && e && e.inputIds && ((s = e.inputIds) == null ? void 0 : s.length) <= 1);
  });
  return _t(() => {
    a = me([Lr(t, "id"), n], ([s, l]) => {
      const u = s ?? (l ? void 0 : wb().value);
      u !== i.value && (e != null && e.removeInputId && (i.value && e.removeInputId(i.value), !(r != null && r.value) && !l && u && e.addInputId(u)), i.value = u);
    }, { immediate: !0 });
  }), qu(() => {
    a && a(), e != null && e.removeInputId && i.value && e.removeInputId(i.value);
  }), {
    isLabeledByFormItem: o,
    inputId: i
  };
};
function eh() {
  return eh = Object.assign ? Object.assign.bind() : function(t) {
    for (var e = 1; e < arguments.length; e++) {
      var n = arguments[e];
      for (var r in n)
        Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
    }
    return t;
  }, eh.apply(this, arguments);
}
function SEe(t, e) {
  t.prototype = Object.create(e.prototype), t.prototype.constructor = t, Tb(t, e);
}
function qD(t) {
  return qD = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
    return n.__proto__ || Object.getPrototypeOf(n);
  }, qD(t);
}
function Tb(t, e) {
  return Tb = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, i) {
    return r.__proto__ = i, r;
  }, Tb(t, e);
}
function xEe() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
    })), !0;
  } catch {
    return !1;
  }
}
function Vx(t, e, n) {
  return xEe() ? Vx = Reflect.construct.bind() : Vx = function(i, a, o) {
    var s = [null];
    s.push.apply(s, a);
    var l = Function.bind.apply(i, s), u = new l();
    return o && Tb(u, o.prototype), u;
  }, Vx.apply(null, arguments);
}
function wEe(t) {
  return Function.toString.call(t).indexOf("[native code]") !== -1;
}
function KD(t) {
  var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  return KD = function(r) {
    if (r === null || !wEe(r)) return r;
    if (typeof r != "function")
      throw new TypeError("Super expression must either be null or a function");
    if (typeof e < "u") {
      if (e.has(r)) return e.get(r);
      e.set(r, i);
    }
    function i() {
      return Vx(r, arguments, qD(this).constructor);
    }
    return i.prototype = Object.create(r.prototype, {
      constructor: {
        value: i,
        enumerable: !1,
        writable: !0,
        configurable: !0
      }
    }), Tb(i, r);
  }, KD(t);
}
var CEe = /%[sdj%]/g, jte = function() {
};
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (jte = function(e, n) {
  typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(r) {
    return typeof r == "string";
  }) && console.warn(e, n);
});
function JD(t) {
  if (!t || !t.length) return null;
  var e = {};
  return t.forEach(function(n) {
    var r = n.field;
    e[r] = e[r] || [], e[r].push(n);
  }), e;
}
function io(t) {
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
    n[r - 1] = arguments[r];
  var i = 0, a = n.length;
  if (typeof t == "function")
    return t.apply(null, n);
  if (typeof t == "string") {
    var o = t.replace(CEe, function(s) {
      if (s === "%%")
        return "%";
      if (i >= a)
        return s;
      switch (s) {
        case "%s":
          return String(n[i++]);
        case "%d":
          return Number(n[i++]);
        case "%j":
          try {
            return JSON.stringify(n[i++]);
          } catch {
            return "[Circular]";
          }
          break;
        default:
          return s;
      }
    });
    return o;
  }
  return t;
}
function TEe(t) {
  return t === "string" || t === "url" || t === "hex" || t === "email" || t === "date" || t === "pattern";
}
function Jr(t, e) {
  return !!(t == null || e === "array" && Array.isArray(t) && !t.length || TEe(e) && typeof t == "string" && !t);
}
function PEe(t, e, n) {
  var r = [], i = 0, a = t.length;
  function o(s) {
    r.push.apply(r, s || []), i++, i === a && n(r);
  }
  t.forEach(function(s) {
    e(s, o);
  });
}
function bW(t, e, n) {
  var r = 0, i = t.length;
  function a(o) {
    if (o && o.length) {
      n(o);
      return;
    }
    var s = r;
    r = r + 1, s < i ? e(t[s], a) : n([]);
  }
  a([]);
}
function $Ee(t) {
  var e = [];
  return Object.keys(t).forEach(function(n) {
    e.push.apply(e, t[n] || []);
  }), e;
}
var _W = /* @__PURE__ */ function(t) {
  SEe(e, t);
  function e(n, r) {
    var i;
    return i = t.call(this, "Async Validation Error") || this, i.errors = n, i.fields = r, i;
  }
  return e;
}(/* @__PURE__ */ KD(Error));
function AEe(t, e, n, r, i) {
  if (e.first) {
    var a = new Promise(function(d, h) {
      var p = function(m) {
        return r(m), m.length ? h(new _W(m, JD(m))) : d(i);
      }, v = $Ee(t);
      bW(v, n, p);
    });
    return a.catch(function(d) {
      return d;
    }), a;
  }
  var o = e.firstFields === !0 ? Object.keys(t) : e.firstFields || [], s = Object.keys(t), l = s.length, u = 0, c = [], f = new Promise(function(d, h) {
    var p = function(g) {
      if (c.push.apply(c, g), u++, u === l)
        return r(c), c.length ? h(new _W(c, JD(c))) : d(i);
    };
    s.length || (r(c), d(i)), s.forEach(function(v) {
      var g = t[v];
      o.indexOf(v) !== -1 ? bW(g, n, p) : PEe(g, n, p);
    });
  });
  return f.catch(function(d) {
    return d;
  }), f;
}
function EEe(t) {
  return !!(t && t.message !== void 0);
}
function MEe(t, e) {
  for (var n = t, r = 0; r < e.length; r++) {
    if (n == null)
      return n;
    n = n[e[r]];
  }
  return n;
}
function OW(t, e) {
  return function(n) {
    var r;
    return t.fullFields ? r = MEe(e, t.fullFields) : r = e[n.field || t.fullField], EEe(n) ? (n.field = n.field || t.fullField, n.fieldValue = r, n) : {
      message: typeof n == "function" ? n() : n,
      fieldValue: r,
      field: n.field || t.fullField
    };
  };
}
function SW(t, e) {
  if (e) {
    for (var n in e)
      if (e.hasOwnProperty(n)) {
        var r = e[n];
        typeof r == "object" && typeof t[n] == "object" ? t[n] = eh({}, t[n], r) : t[n] = r;
      }
  }
  return t;
}
var Zte = function(e, n, r, i, a, o) {
  e.required && (!r.hasOwnProperty(e.field) || Jr(n, o || e.type)) && i.push(io(a.messages.required, e.fullField));
}, IEe = function(e, n, r, i, a) {
  (/^\s+$/.test(n) || n === "") && i.push(io(a.messages.whitespace, e.fullField));
}, kO, DEe = function() {
  if (kO)
    return kO;
  var t = "[a-fA-F\\d:]", e = function(O) {
    return O && O.includeBoundaries ? "(?:(?<=\\s|^)(?=" + t + ")|(?<=" + t + ")(?=\\s|$))" : "";
  }, n = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", r = "[a-fA-F\\d]{1,4}", i = (`
(?:
(?:` + r + ":){7}(?:" + r + `|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8
(?:` + r + ":){6}(?:" + n + "|:" + r + `|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4
(?:` + r + ":){5}(?::" + n + "|(?::" + r + `){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4
(?:` + r + ":){4}(?:(?::" + r + "){0,1}:" + n + "|(?::" + r + `){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4
(?:` + r + ":){3}(?:(?::" + r + "){0,2}:" + n + "|(?::" + r + `){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4
(?:` + r + ":){2}(?:(?::" + r + "){0,3}:" + n + "|(?::" + r + `){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4
(?:` + r + ":){1}(?:(?::" + r + "){0,4}:" + n + "|(?::" + r + `){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4
(?::(?:(?::` + r + "){0,5}:" + n + "|(?::" + r + `){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), a = new RegExp("(?:^" + n + "$)|(?:^" + i + "$)"), o = new RegExp("^" + n + "$"), s = new RegExp("^" + i + "$"), l = function(O) {
    return O && O.exact ? a : new RegExp("(?:" + e(O) + n + e(O) + ")|(?:" + e(O) + i + e(O) + ")", "g");
  };
  l.v4 = function(_) {
    return _ && _.exact ? o : new RegExp("" + e(_) + n + e(_), "g");
  }, l.v6 = function(_) {
    return _ && _.exact ? s : new RegExp("" + e(_) + i + e(_), "g");
  };
  var u = "(?:(?:[a-z]+:)?//)", c = "(?:\\S+(?::\\S*)?@)?", f = l.v4().source, d = l.v6().source, h = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", v = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", g = "(?::\\d{2,5})?", m = '(?:[/?#][^\\s"]*)?', y = "(?:" + u + "|www\\.)" + c + "(?:localhost|" + f + "|" + d + "|" + h + p + v + ")" + g + m;
  return kO = new RegExp("(?:^" + y + "$)", "i"), kO;
}, xW = {
  // http://emailregex.com/
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
  // url: new RegExp(
  //   '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
  //   'i',
  // ),
  hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
}, uy = {
  integer: function(e) {
    return uy.number(e) && parseInt(e, 10) === e;
  },
  float: function(e) {
    return uy.number(e) && !uy.integer(e);
  },
  array: function(e) {
    return Array.isArray(e);
  },
  regexp: function(e) {
    if (e instanceof RegExp)
      return !0;
    try {
      return !!new RegExp(e);
    } catch {
      return !1;
    }
  },
  date: function(e) {
    return typeof e.getTime == "function" && typeof e.getMonth == "function" && typeof e.getYear == "function" && !isNaN(e.getTime());
  },
  number: function(e) {
    return isNaN(e) ? !1 : typeof e == "number";
  },
  object: function(e) {
    return typeof e == "object" && !uy.array(e);
  },
  method: function(e) {
    return typeof e == "function";
  },
  email: function(e) {
    return typeof e == "string" && e.length <= 320 && !!e.match(xW.email);
  },
  url: function(e) {
    return typeof e == "string" && e.length <= 2048 && !!e.match(DEe());
  },
  hex: function(e) {
    return typeof e == "string" && !!e.match(xW.hex);
  }
}, REe = function(e, n, r, i, a) {
  if (e.required && n === void 0) {
    Zte(e, n, r, i, a);
    return;
  }
  var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], s = e.type;
  o.indexOf(s) > -1 ? uy[s](n) || i.push(io(a.messages.types[s], e.fullField, e.type)) : s && typeof n !== e.type && i.push(io(a.messages.types[s], e.fullField, e.type));
}, kEe = function(e, n, r, i, a) {
  var o = typeof e.len == "number", s = typeof e.min == "number", l = typeof e.max == "number", u = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, c = n, f = null, d = typeof n == "number", h = typeof n == "string", p = Array.isArray(n);
  if (d ? f = "number" : h ? f = "string" : p && (f = "array"), !f)
    return !1;
  p && (c = n.length), h && (c = n.replace(u, "_").length), o ? c !== e.len && i.push(io(a.messages[f].len, e.fullField, e.len)) : s && !l && c < e.min ? i.push(io(a.messages[f].min, e.fullField, e.min)) : l && !s && c > e.max ? i.push(io(a.messages[f].max, e.fullField, e.max)) : s && l && (c < e.min || c > e.max) && i.push(io(a.messages[f].range, e.fullField, e.min, e.max));
}, zp = "enum", LEe = function(e, n, r, i, a) {
  e[zp] = Array.isArray(e[zp]) ? e[zp] : [], e[zp].indexOf(n) === -1 && i.push(io(a.messages[zp], e.fullField, e[zp].join(", ")));
}, NEe = function(e, n, r, i, a) {
  if (e.pattern) {
    if (e.pattern instanceof RegExp)
      e.pattern.lastIndex = 0, e.pattern.test(n) || i.push(io(a.messages.pattern.mismatch, e.fullField, n, e.pattern));
    else if (typeof e.pattern == "string") {
      var o = new RegExp(e.pattern);
      o.test(n) || i.push(io(a.messages.pattern.mismatch, e.fullField, n, e.pattern));
    }
  }
}, fn = {
  required: Zte,
  whitespace: IEe,
  type: REe,
  range: kEe,
  enum: LEe,
  pattern: NEe
}, BEe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Jr(n, "string") && !e.required)
      return r();
    fn.required(e, n, i, o, a, "string"), Jr(n, "string") || (fn.type(e, n, i, o, a), fn.range(e, n, i, o, a), fn.pattern(e, n, i, o, a), e.whitespace === !0 && fn.whitespace(e, n, i, o, a));
  }
  r(o);
}, zEe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Jr(n) && !e.required)
      return r();
    fn.required(e, n, i, o, a), n !== void 0 && fn.type(e, n, i, o, a);
  }
  r(o);
}, VEe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (n === "" && (n = void 0), Jr(n) && !e.required)
      return r();
    fn.required(e, n, i, o, a), n !== void 0 && (fn.type(e, n, i, o, a), fn.range(e, n, i, o, a));
  }
  r(o);
}, FEe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Jr(n) && !e.required)
      return r();
    fn.required(e, n, i, o, a), n !== void 0 && fn.type(e, n, i, o, a);
  }
  r(o);
}, WEe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Jr(n) && !e.required)
      return r();
    fn.required(e, n, i, o, a), Jr(n) || fn.type(e, n, i, o, a);
  }
  r(o);
}, QEe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Jr(n) && !e.required)
      return r();
    fn.required(e, n, i, o, a), n !== void 0 && (fn.type(e, n, i, o, a), fn.range(e, n, i, o, a));
  }
  r(o);
}, HEe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Jr(n) && !e.required)
      return r();
    fn.required(e, n, i, o, a), n !== void 0 && (fn.type(e, n, i, o, a), fn.range(e, n, i, o, a));
  }
  r(o);
}, GEe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (n == null && !e.required)
      return r();
    fn.required(e, n, i, o, a, "array"), n != null && (fn.type(e, n, i, o, a), fn.range(e, n, i, o, a));
  }
  r(o);
}, jEe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Jr(n) && !e.required)
      return r();
    fn.required(e, n, i, o, a), n !== void 0 && fn.type(e, n, i, o, a);
  }
  r(o);
}, ZEe = "enum", UEe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Jr(n) && !e.required)
      return r();
    fn.required(e, n, i, o, a), n !== void 0 && fn[ZEe](e, n, i, o, a);
  }
  r(o);
}, XEe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Jr(n, "string") && !e.required)
      return r();
    fn.required(e, n, i, o, a), Jr(n, "string") || fn.pattern(e, n, i, o, a);
  }
  r(o);
}, YEe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Jr(n, "date") && !e.required)
      return r();
    if (fn.required(e, n, i, o, a), !Jr(n, "date")) {
      var l;
      n instanceof Date ? l = n : l = new Date(n), fn.type(e, l, i, o, a), l && fn.range(e, l.getTime(), i, o, a);
    }
  }
  r(o);
}, qEe = function(e, n, r, i, a) {
  var o = [], s = Array.isArray(n) ? "array" : typeof n;
  fn.required(e, n, i, o, a, s), r(o);
}, zA = function(e, n, r, i, a) {
  var o = e.type, s = [], l = e.required || !e.required && i.hasOwnProperty(e.field);
  if (l) {
    if (Jr(n, o) && !e.required)
      return r();
    fn.required(e, n, i, s, a, o), Jr(n, o) || fn.type(e, n, i, s, a);
  }
  r(s);
}, KEe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Jr(n) && !e.required)
      return r();
    fn.required(e, n, i, o, a);
  }
  r(o);
}, Ny = {
  string: BEe,
  method: zEe,
  number: VEe,
  boolean: FEe,
  regexp: WEe,
  integer: QEe,
  float: HEe,
  array: GEe,
  object: jEe,
  enum: UEe,
  pattern: XEe,
  date: YEe,
  url: zA,
  hex: zA,
  email: zA,
  required: qEe,
  any: KEe
};
function eR() {
  return {
    default: "Validation error on field %s",
    required: "%s is required",
    enum: "%s must be one of %s",
    whitespace: "%s cannot be empty",
    date: {
      format: "%s date %s is invalid for format %s",
      parse: "%s date could not be parsed, %s is invalid ",
      invalid: "%s date %s is invalid"
    },
    types: {
      string: "%s is not a %s",
      method: "%s is not a %s (function)",
      array: "%s is not an %s",
      object: "%s is not an %s",
      number: "%s is not a %s",
      date: "%s is not a %s",
      boolean: "%s is not a %s",
      integer: "%s is not an %s",
      float: "%s is not a %s",
      regexp: "%s is not a valid %s",
      email: "%s is not a valid %s",
      url: "%s is not a valid %s",
      hex: "%s is not a valid %s"
    },
    string: {
      len: "%s must be exactly %s characters",
      min: "%s must be at least %s characters",
      max: "%s cannot be longer than %s characters",
      range: "%s must be between %s and %s characters"
    },
    number: {
      len: "%s must equal %s",
      min: "%s cannot be less than %s",
      max: "%s cannot be greater than %s",
      range: "%s must be between %s and %s"
    },
    array: {
      len: "%s must be exactly %s in length",
      min: "%s cannot be less than %s in length",
      max: "%s cannot be greater than %s in length",
      range: "%s must be between %s and %s in length"
    },
    pattern: {
      mismatch: "%s value %s does not match pattern %s"
    },
    clone: function() {
      var e = JSON.parse(JSON.stringify(this));
      return e.clone = this.clone, e;
    }
  };
}
var tR = eR(), H_ = /* @__PURE__ */ function() {
  function t(n) {
    this.rules = null, this._messages = tR, this.define(n);
  }
  var e = t.prototype;
  return e.define = function(r) {
    var i = this;
    if (!r)
      throw new Error("Cannot configure a schema with no rules");
    if (typeof r != "object" || Array.isArray(r))
      throw new Error("Rules must be an object");
    this.rules = {}, Object.keys(r).forEach(function(a) {
      var o = r[a];
      i.rules[a] = Array.isArray(o) ? o : [o];
    });
  }, e.messages = function(r) {
    return r && (this._messages = SW(eR(), r)), this._messages;
  }, e.validate = function(r, i, a) {
    var o = this;
    i === void 0 && (i = {}), a === void 0 && (a = function() {
    });
    var s = r, l = i, u = a;
    if (typeof l == "function" && (u = l, l = {}), !this.rules || Object.keys(this.rules).length === 0)
      return u && u(null, s), Promise.resolve(s);
    function c(v) {
      var g = [], m = {};
      function y(O) {
        if (Array.isArray(O)) {
          var S;
          g = (S = g).concat.apply(S, O);
        } else
          g.push(O);
      }
      for (var _ = 0; _ < v.length; _++)
        y(v[_]);
      g.length ? (m = JD(g), u(g, m)) : u(null, s);
    }
    if (l.messages) {
      var f = this.messages();
      f === tR && (f = eR()), SW(f, l.messages), l.messages = f;
    } else
      l.messages = this.messages();
    var d = {}, h = l.keys || Object.keys(this.rules);
    h.forEach(function(v) {
      var g = o.rules[v], m = s[v];
      g.forEach(function(y) {
        var _ = y;
        typeof _.transform == "function" && (s === r && (s = eh({}, s)), m = s[v] = _.transform(m)), typeof _ == "function" ? _ = {
          validator: _
        } : _ = eh({}, _), _.validator = o.getValidationMethod(_), _.validator && (_.field = v, _.fullField = _.fullField || v, _.type = o.getType(_), d[v] = d[v] || [], d[v].push({
          rule: _,
          value: m,
          source: s,
          field: v
        }));
      });
    });
    var p = {};
    return AEe(d, l, function(v, g) {
      var m = v.rule, y = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
      y = y && (m.required || !m.required && v.value), m.field = v.field;
      function _(x, C) {
        return eh({}, C, {
          fullField: m.fullField + "." + x,
          fullFields: m.fullFields ? [].concat(m.fullFields, [x]) : [x]
        });
      }
      function O(x) {
        x === void 0 && (x = []);
        var C = Array.isArray(x) ? x : [x];
        !l.suppressWarning && C.length && t.warning("async-validator:", C), C.length && m.message !== void 0 && (C = [].concat(m.message));
        var P = C.map(OW(m, s));
        if (l.first && P.length)
          return p[m.field] = 1, g(P);
        if (!y)
          g(P);
        else {
          if (m.required && !v.value)
            return m.message !== void 0 ? P = [].concat(m.message).map(OW(m, s)) : l.error && (P = [l.error(m, io(l.messages.required, m.field))]), g(P);
          var $ = {};
          m.defaultField && Object.keys(v.value).map(function(M) {
            $[M] = m.defaultField;
          }), $ = eh({}, $, v.rule.fields);
          var T = {};
          Object.keys($).forEach(function(M) {
            var R = $[M], N = Array.isArray(R) ? R : [R];
            T[M] = N.map(_.bind(null, M));
          });
          var E = new t(T);
          E.messages(l.messages), v.rule.options && (v.rule.options.messages = l.messages, v.rule.options.error = l.error), E.validate(v.value, v.rule.options || l, function(M) {
            var R = [];
            P && P.length && R.push.apply(R, P), M && M.length && R.push.apply(R, M), g(R.length ? R : null);
          });
        }
      }
      var S;
      if (m.asyncValidator)
        S = m.asyncValidator(m, v.value, O, v.source, l);
      else if (m.validator) {
        try {
          S = m.validator(m, v.value, O, v.source, l);
        } catch (x) {
          console.error == null || console.error(x), l.suppressValidatorError || setTimeout(function() {
            throw x;
          }, 0), O(x.message);
        }
        S === !0 ? O() : S === !1 ? O(typeof m.message == "function" ? m.message(m.fullField || m.field) : m.message || (m.fullField || m.field) + " fails") : S instanceof Array ? O(S) : S instanceof Error && O(S.message);
      }
      S && S.then && S.then(function() {
        return O();
      }, function(x) {
        return O(x);
      });
    }, function(v) {
      c(v);
    }, s);
  }, e.getType = function(r) {
    if (r.type === void 0 && r.pattern instanceof RegExp && (r.type = "pattern"), typeof r.validator != "function" && r.type && !Ny.hasOwnProperty(r.type))
      throw new Error(io("Unknown rule type %s", r.type));
    return r.type || "string";
  }, e.getValidationMethod = function(r) {
    if (typeof r.validator == "function")
      return r.validator;
    var i = Object.keys(r), a = i.indexOf("message");
    return a !== -1 && i.splice(a, 1), i.length === 1 && i[0] === "required" ? Ny.required : Ny[this.getType(r)] || void 0;
  }, t;
}();
H_.register = function(e, n) {
  if (typeof n != "function")
    throw new Error("Cannot register a validator by type, validator is not a function");
  Ny[e] = n;
};
H_.warning = jte;
H_.messages = tR;
H_.validators = Ny;
let Os;
const JEe = `
  height:0 !important;
  visibility:hidden !important;
  ${Exe() ? "" : "overflow:hidden !important;"}
  position:absolute !important;
  z-index:-1000 !important;
  top:0 !important;
  right:0 !important;
`, eMe = [
  "letter-spacing",
  "line-height",
  "padding-top",
  "padding-bottom",
  "font-family",
  "font-weight",
  "font-size",
  "text-rendering",
  "text-transform",
  "width",
  "text-indent",
  "padding-left",
  "padding-right",
  "border-width",
  "box-sizing"
];
function tMe(t) {
  const e = window.getComputedStyle(t), n = e.getPropertyValue("box-sizing"), r = Number.parseFloat(e.getPropertyValue("padding-bottom")) + Number.parseFloat(e.getPropertyValue("padding-top")), i = Number.parseFloat(e.getPropertyValue("border-bottom-width")) + Number.parseFloat(e.getPropertyValue("border-top-width"));
  return { contextStyle: eMe.map((o) => `${o}:${e.getPropertyValue(o)}`).join(";"), paddingSize: r, borderSize: i, boxSizing: n };
}
function wW(t, e = 1, n) {
  var r;
  Os || (Os = document.createElement("textarea"), document.body.appendChild(Os));
  const { paddingSize: i, borderSize: a, boxSizing: o, contextStyle: s } = tMe(t);
  Os.setAttribute("style", `${s};${JEe}`), Os.value = t.value || t.placeholder || "";
  let l = Os.scrollHeight;
  const u = {};
  o === "border-box" ? l = l + a : o === "content-box" && (l = l - i), Os.value = "";
  const c = Os.scrollHeight - i;
  if (Ws(e)) {
    let f = c * e;
    o === "border-box" && (f = f + i + a), l = Math.max(f, l), u.minHeight = `${f}px`;
  }
  if (Ws(n)) {
    let f = c * n;
    o === "border-box" && (f = f + i + a), l = Math.min(f, l);
  }
  return u.height = `${l}px`, (r = Os.parentNode) == null || r.removeChild(Os), Os = void 0, u;
}
const nMe = hr({
  id: {
    type: String,
    default: void 0
  },
  size: op,
  disabled: Boolean,
  modelValue: {
    type: mn([
      String,
      Number,
      Object
    ]),
    default: ""
  },
  maxlength: {
    type: [String, Number]
  },
  minlength: {
    type: [String, Number]
  },
  type: {
    type: String,
    default: "text"
  },
  resize: {
    type: String,
    values: ["none", "both", "horizontal", "vertical"]
  },
  autosize: {
    type: mn([Boolean, Object]),
    default: !1
  },
  autocomplete: {
    type: String,
    default: "off"
  },
  formatter: {
    type: Function
  },
  parser: {
    type: Function
  },
  placeholder: {
    type: String
  },
  form: {
    type: String
  },
  readonly: {
    type: Boolean,
    default: !1
  },
  clearable: {
    type: Boolean,
    default: !1
  },
  showPassword: {
    type: Boolean,
    default: !1
  },
  showWordLimit: {
    type: Boolean,
    default: !1
  },
  suffixIcon: {
    type: _g
  },
  prefixIcon: {
    type: _g
  },
  containerRole: {
    type: String,
    default: void 0
  },
  label: {
    type: String,
    default: void 0
  },
  tabindex: {
    type: [String, Number],
    default: 0
  },
  validateEvent: {
    type: Boolean,
    default: !0
  },
  inputStyle: {
    type: mn([Object, Array, String]),
    default: () => B$e({})
  },
  autofocus: {
    type: Boolean,
    default: !1
  },
  ...sp(["ariaLabel"])
}), rMe = {
  [ca]: (t) => ia(t),
  input: (t) => ia(t),
  change: (t) => ia(t),
  focus: (t) => t instanceof FocusEvent,
  blur: (t) => t instanceof FocusEvent,
  clear: () => !0,
  mouseleave: (t) => t instanceof MouseEvent,
  mouseenter: (t) => t instanceof MouseEvent,
  keydown: (t) => t instanceof Event,
  compositionstart: (t) => t instanceof CompositionEvent,
  compositionupdate: (t) => t instanceof CompositionEvent,
  compositionend: (t) => t instanceof CompositionEvent
}, iMe = ["role"], aMe = ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus"], oMe = ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus"], sMe = ae({
  name: "ElInput",
  inheritAttrs: !1
}), lMe = /* @__PURE__ */ ae({
  ...sMe,
  props: nMe,
  emits: rMe,
  setup(t, { expose: e, emit: n }) {
    const r = t, i = sxe(), a = D_(), o = V(() => {
      const Ae = {};
      return r.containerRole === "combobox" && (Ae["aria-haspopup"] = i["aria-haspopup"], Ae["aria-owns"] = i["aria-owns"], Ae["aria-expanded"] = i["aria-expanded"]), Ae;
    }), s = V(() => [
      r.type === "textarea" ? g.b() : v.b(),
      v.m(h.value),
      v.is("disabled", p.value),
      v.is("exceed", fe.value),
      {
        [v.b("group")]: a.prepend || a.append,
        [v.m("prefix")]: a.prefix || r.prefixIcon,
        [v.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword,
        [v.bm("suffix", "password-clear")]: U.value && j.value,
        [v.b("hidden")]: r.type === "hidden"
      },
      i.class
    ]), l = V(() => [
      v.e("wrapper"),
      v.is("focus", T.value)
    ]), u = F$e({
      excludeKeys: V(() => Object.keys(o.value))
    }), { form: c, formItem: f } = lp(), { inputId: d } = Q_(r, {
      formItemContext: f
    }), h = Tg(), p = um(), v = $n("input"), g = $n("textarea"), m = ve(), y = ve(), _ = ee(!1), O = ee(!1), S = ee(!1), x = ee(), C = ve(r.inputStyle), P = V(() => m.value || y.value), { wrapperRef: $, isFocused: T, handleFocus: E, handleBlur: M } = Hte(P, {
      afterBlur() {
        var Ae;
        r.validateEvent && ((Ae = f == null ? void 0 : f.validate) == null || Ae.call(f, "blur").catch((gt) => Vi(gt)));
      }
    }), R = V(() => {
      var Ae;
      return (Ae = c == null ? void 0 : c.statusIcon) != null ? Ae : !1;
    }), N = V(() => (f == null ? void 0 : f.validateState) || ""), I = V(() => N.value && R$e[N.value]), B = V(() => S.value ? M$e : $$e), Q = V(() => [
      i.style
    ]), W = V(() => [
      r.inputStyle,
      C.value,
      { resize: r.resize }
    ]), H = V(() => Jc(r.modelValue) ? "" : String(r.modelValue)), U = V(() => r.clearable && !p.value && !r.readonly && !!H.value && (T.value || _.value)), j = V(() => r.showPassword && !p.value && !r.readonly && !!H.value && (!!H.value || T.value)), Y = V(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), ne = V(() => H.value.length), fe = V(() => !!Y.value && ne.value > Number(r.maxlength)), ue = V(() => !!a.suffix || !!r.suffixIcon || U.value || r.showPassword || Y.value || !!N.value && R.value), [ye, se] = hEe(m);
    wxe(y, (Ae) => {
      if (q(), !Y.value || r.resize !== "both")
        return;
      const gt = Ae[0], { width: Xt } = gt.contentRect;
      x.value = {
        right: `calc(100% - ${Xt + 15 + 6}px)`
      };
    });
    const he = () => {
      const { type: Ae, autosize: gt } = r;
      if (!(!Fr || Ae !== "textarea" || !y.value))
        if (gt) {
          const Xt = Rh(gt) ? gt.minRows : void 0, Bn = Rh(gt) ? gt.maxRows : void 0, Dn = wW(y.value, Xt, Bn);
          C.value = {
            overflowY: "hidden",
            ...Dn
          }, Bt(() => {
            y.value.offsetHeight, C.value = Dn;
          });
        } else
          C.value = {
            minHeight: wW(y.value).minHeight
          };
    }, q = ((Ae) => {
      let gt = !1;
      return () => {
        var Xt;
        if (gt || !r.autosize)
          return;
        ((Xt = y.value) == null ? void 0 : Xt.offsetParent) === null || (Ae(), gt = !0);
      };
    })(he), K = () => {
      const Ae = P.value, gt = r.formatter ? r.formatter(H.value) : H.value;
      !Ae || Ae.value === gt || (Ae.value = gt);
    }, de = async (Ae) => {
      ye();
      let { value: gt } = Ae.target;
      if (r.formatter && (gt = r.parser ? r.parser(gt) : gt), !O.value) {
        if (gt === H.value) {
          K();
          return;
        }
        n(ca, gt), n("input", gt), await Bt(), K(), se();
      }
    }, xe = (Ae) => {
      n("change", Ae.target.value);
    }, we = (Ae) => {
      n("compositionstart", Ae), O.value = !0;
    }, He = (Ae) => {
      var gt;
      n("compositionupdate", Ae);
      const Xt = (gt = Ae.target) == null ? void 0 : gt.value, Bn = Xt[Xt.length - 1] || "";
      O.value = !N$e(Bn);
    }, je = (Ae) => {
      n("compositionend", Ae), O.value && (O.value = !1, de(Ae));
    }, Be = () => {
      S.value = !S.value, Le();
    }, Le = async () => {
      var Ae;
      await Bt(), (Ae = P.value) == null || Ae.focus();
    }, Pe = () => {
      var Ae;
      return (Ae = P.value) == null ? void 0 : Ae.blur();
    }, Fe = (Ae) => {
      _.value = !1, n("mouseleave", Ae);
    }, Ye = (Ae) => {
      _.value = !0, n("mouseenter", Ae);
    }, xt = (Ae) => {
      n("keydown", Ae);
    }, It = () => {
      var Ae;
      (Ae = P.value) == null || Ae.select();
    }, an = () => {
      n(ca, ""), n("change", ""), n("clear"), n("input", "");
    };
    return me(() => r.modelValue, () => {
      var Ae;
      Bt(() => he()), r.validateEvent && ((Ae = f == null ? void 0 : f.validate) == null || Ae.call(f, "change").catch((gt) => Vi(gt)));
    }), me(H, () => K()), me(() => r.type, async () => {
      await Bt(), K(), he();
    }), _t(() => {
      !r.formatter && r.parser && Vi("ElInput", "If you set the parser, you also need to set the formatter."), K(), Bt(he);
    }), Es({
      from: "label",
      replacement: "aria-label",
      version: "2.8.0",
      scope: "el-input",
      ref: "https://element-plus.org/en-US/component/input.html"
    }, V(() => !!r.label)), e({
      input: m,
      textarea: y,
      ref: P,
      textareaStyle: W,
      autosize: Lr(r, "autosize"),
      focus: Le,
      blur: Pe,
      select: It,
      clear: an,
      resizeTextarea: he
    }), (Ae, gt) => (be(), Ue("div", Xn(z(o), {
      class: [
        z(s),
        {
          [z(v).bm("group", "append")]: Ae.$slots.append,
          [z(v).bm("group", "prepend")]: Ae.$slots.prepend
        }
      ],
      style: z(Q),
      role: Ae.containerRole,
      onMouseenter: Ye,
      onMouseleave: Fe
    }), [
      Ot(" input "),
      Ae.type !== "textarea" ? (be(), Ue(Wt, { key: 0 }, [
        Ot(" prepend slot "),
        Ae.$slots.prepend ? (be(), Ue("div", {
          key: 0,
          class: Ge(z(v).be("group", "prepend"))
        }, [
          dn(Ae.$slots, "prepend")
        ], 2)) : Ot("v-if", !0),
        tt("div", {
          ref_key: "wrapperRef",
          ref: $,
          class: Ge(z(l))
        }, [
          Ot(" prefix slot "),
          Ae.$slots.prefix || Ae.prefixIcon ? (be(), Ue("span", {
            key: 0,
            class: Ge(z(v).e("prefix"))
          }, [
            tt("span", {
              class: Ge(z(v).e("prefix-inner"))
            }, [
              dn(Ae.$slots, "prefix"),
              Ae.prefixIcon ? (be(), Je(z($s), {
                key: 0,
                class: Ge(z(v).e("icon"))
              }, {
                default: ke(() => [
                  (be(), Je(As(Ae.prefixIcon)))
                ]),
                _: 1
              }, 8, ["class"])) : Ot("v-if", !0)
            ], 2)
          ], 2)) : Ot("v-if", !0),
          tt("input", Xn({
            id: z(d),
            ref_key: "input",
            ref: m,
            class: z(v).e("inner")
          }, z(u), {
            minlength: Ae.minlength,
            maxlength: Ae.maxlength,
            type: Ae.showPassword ? S.value ? "text" : "password" : Ae.type,
            disabled: z(p),
            readonly: Ae.readonly,
            autocomplete: Ae.autocomplete,
            tabindex: Ae.tabindex,
            "aria-label": Ae.label || Ae.ariaLabel,
            placeholder: Ae.placeholder,
            style: Ae.inputStyle,
            form: Ae.form,
            autofocus: Ae.autofocus,
            onCompositionstart: we,
            onCompositionupdate: He,
            onCompositionend: je,
            onInput: de,
            onFocus: gt[0] || (gt[0] = (...Xt) => z(E) && z(E)(...Xt)),
            onBlur: gt[1] || (gt[1] = (...Xt) => z(M) && z(M)(...Xt)),
            onChange: xe,
            onKeydown: xt
          }), null, 16, aMe),
          Ot(" suffix slot "),
          z(ue) ? (be(), Ue("span", {
            key: 1,
            class: Ge(z(v).e("suffix"))
          }, [
            tt("span", {
              class: Ge(z(v).e("suffix-inner"))
            }, [
              !z(U) || !z(j) || !z(Y) ? (be(), Ue(Wt, { key: 0 }, [
                dn(Ae.$slots, "suffix"),
                Ae.suffixIcon ? (be(), Je(z($s), {
                  key: 0,
                  class: Ge(z(v).e("icon"))
                }, {
                  default: ke(() => [
                    (be(), Je(As(Ae.suffixIcon)))
                  ]),
                  _: 1
                }, 8, ["class"])) : Ot("v-if", !0)
              ], 64)) : Ot("v-if", !0),
              z(U) ? (be(), Je(z($s), {
                key: 1,
                class: Ge([z(v).e("icon"), z(v).e("clear")]),
                onMousedown: ai(z(Kc), ["prevent"]),
                onClick: an
              }, {
                default: ke(() => [
                  D(z(Ste))
                ]),
                _: 1
              }, 8, ["class", "onMousedown"])) : Ot("v-if", !0),
              z(j) ? (be(), Je(z($s), {
                key: 2,
                class: Ge([z(v).e("icon"), z(v).e("password")]),
                onClick: Be
              }, {
                default: ke(() => [
                  (be(), Je(As(z(B))))
                ]),
                _: 1
              }, 8, ["class"])) : Ot("v-if", !0),
              z(Y) ? (be(), Ue("span", {
                key: 3,
                class: Ge(z(v).e("count"))
              }, [
                tt("span", {
                  class: Ge(z(v).e("count-inner"))
                }, xi(z(ne)) + " / " + xi(Ae.maxlength), 3)
              ], 2)) : Ot("v-if", !0),
              z(N) && z(I) && z(R) ? (be(), Je(z($s), {
                key: 4,
                class: Ge([
                  z(v).e("icon"),
                  z(v).e("validateIcon"),
                  z(v).is("loading", z(N) === "validating")
                ])
              }, {
                default: ke(() => [
                  (be(), Je(As(z(I))))
                ]),
                _: 1
              }, 8, ["class"])) : Ot("v-if", !0)
            ], 2)
          ], 2)) : Ot("v-if", !0)
        ], 2),
        Ot(" append slot "),
        Ae.$slots.append ? (be(), Ue("div", {
          key: 1,
          class: Ge(z(v).be("group", "append"))
        }, [
          dn(Ae.$slots, "append")
        ], 2)) : Ot("v-if", !0)
      ], 64)) : (be(), Ue(Wt, { key: 1 }, [
        Ot(" textarea "),
        tt("textarea", Xn({
          id: z(d),
          ref_key: "textarea",
          ref: y,
          class: [z(g).e("inner"), z(v).is("focus", z(T))]
        }, z(u), {
          minlength: Ae.minlength,
          maxlength: Ae.maxlength,
          tabindex: Ae.tabindex,
          disabled: z(p),
          readonly: Ae.readonly,
          autocomplete: Ae.autocomplete,
          style: z(W),
          "aria-label": Ae.label || Ae.ariaLabel,
          placeholder: Ae.placeholder,
          form: Ae.form,
          autofocus: Ae.autofocus,
          onCompositionstart: we,
          onCompositionupdate: He,
          onCompositionend: je,
          onInput: de,
          onFocus: gt[2] || (gt[2] = (...Xt) => z(E) && z(E)(...Xt)),
          onBlur: gt[3] || (gt[3] = (...Xt) => z(M) && z(M)(...Xt)),
          onChange: xe,
          onKeydown: xt
        }), null, 16, oMe),
        z(Y) ? (be(), Ue("span", {
          key: 0,
          style: dr(x.value),
          class: Ge(z(v).e("count"))
        }, xi(z(ne)) + " / " + xi(Ae.maxlength), 7)) : Ot("v-if", !0)
      ], 64))
    ], 16, iMe));
  }
});
var uMe = /* @__PURE__ */ Nn(lMe, [["__file", "input.vue"]]);
const p2 = ec(uMe), AN = Symbol("popper"), Ute = Symbol("popperContent"), cMe = [
  "dialog",
  "grid",
  "group",
  "listbox",
  "menu",
  "navigation",
  "tooltip",
  "tree"
], Xte = hr({
  role: {
    type: String,
    values: cMe,
    default: "tooltip"
  }
}), fMe = ae({
  name: "ElPopper",
  inheritAttrs: !1
}), dMe = /* @__PURE__ */ ae({
  ...fMe,
  props: Xte,
  setup(t, { expose: e }) {
    const n = t, r = ee(), i = ee(), a = ee(), o = ee(), s = V(() => n.role), l = {
      triggerRef: r,
      popperInstanceRef: i,
      contentRef: a,
      referenceRef: o,
      role: s
    };
    return e(l), Et(AN, l), (u, c) => dn(u.$slots, "default");
  }
});
var hMe = /* @__PURE__ */ Nn(dMe, [["__file", "popper.vue"]]);
const Yte = hr({
  arrowOffset: {
    type: Number,
    default: 5
  }
}), pMe = ae({
  name: "ElPopperArrow",
  inheritAttrs: !1
}), vMe = /* @__PURE__ */ ae({
  ...pMe,
  props: Yte,
  setup(t, { expose: e }) {
    const n = t, r = $n("popper"), { arrowOffset: i, arrowRef: a, arrowStyle: o } = et(Ute, void 0);
    return me(() => n.arrowOffset, (s) => {
      i.value = s;
    }), Qt(() => {
      a.value = void 0;
    }), e({
      arrowRef: a
    }), (s, l) => (be(), Ue("span", {
      ref_key: "arrowRef",
      ref: a,
      class: Ge(z(r).e("arrow")),
      style: dr(z(o)),
      "data-popper-arrow": ""
    }, null, 6));
  }
});
var gMe = /* @__PURE__ */ Nn(vMe, [["__file", "arrow.vue"]]);
const VA = "ElOnlyChild", mMe = ae({
  name: VA,
  setup(t, {
    slots: e,
    attrs: n
  }) {
    var r;
    const i = et(Wte), a = cEe((r = i == null ? void 0 : i.setForwardRef) != null ? r : Kc);
    return () => {
      var o;
      const s = (o = e.default) == null ? void 0 : o.call(e, n);
      if (!s)
        return null;
      if (s.length > 1)
        return Vi(VA, "requires exact only one valid child."), null;
      const l = qte(s);
      return l ? _r(ku(l, n), [[a]]) : (Vi(VA, "no valid child node found"), null);
    };
  }
});
function qte(t) {
  if (!t)
    return null;
  const e = t;
  for (const n of e) {
    if (Rh(n))
      switch (n.type) {
        case Aee:
          continue;
        case KT:
        case "svg":
          return CW(n);
        case Wt:
          return qte(n.children);
        default:
          return n;
      }
    return CW(n);
  }
  return null;
}
function CW(t) {
  const e = $n("only-child");
  return D("span", {
    class: e.e("content")
  }, [t]);
}
const Kte = hr({
  virtualRef: {
    type: mn(Object)
  },
  virtualTriggering: Boolean,
  onMouseenter: {
    type: mn(Function)
  },
  onMouseleave: {
    type: mn(Function)
  },
  onClick: {
    type: mn(Function)
  },
  onKeydown: {
    type: mn(Function)
  },
  onFocus: {
    type: mn(Function)
  },
  onBlur: {
    type: mn(Function)
  },
  onContextmenu: {
    type: mn(Function)
  },
  id: String,
  open: Boolean
}), yMe = ae({
  name: "ElPopperTrigger",
  inheritAttrs: !1
}), bMe = /* @__PURE__ */ ae({
  ...yMe,
  props: Kte,
  setup(t, { expose: e }) {
    const n = t, { role: r, triggerRef: i } = et(AN, void 0);
    uEe(i);
    const a = V(() => s.value ? n.id : void 0), o = V(() => {
      if (r && r.value === "tooltip")
        return n.open && n.id ? n.id : void 0;
    }), s = V(() => {
      if (r && r.value !== "tooltip")
        return r.value;
    }), l = V(() => s.value ? `${n.open}` : void 0);
    let u;
    return _t(() => {
      me(() => n.virtualRef, (c) => {
        c && (i.value = zc(c));
      }, {
        immediate: !0
      }), me(i, (c, f) => {
        u == null || u(), u = void 0, Ob(c) && ([
          "onMouseenter",
          "onMouseleave",
          "onClick",
          "onKeydown",
          "onFocus",
          "onBlur",
          "onContextmenu"
        ].forEach((d) => {
          var h;
          const p = n[d];
          p && (c.addEventListener(d.slice(2).toLowerCase(), p), (h = f == null ? void 0 : f.removeEventListener) == null || h.call(f, d.slice(2).toLowerCase(), p));
        }), u = me([a, o, s, l], (d) => {
          [
            "aria-controls",
            "aria-describedby",
            "aria-haspopup",
            "aria-expanded"
          ].forEach((h, p) => {
            Jc(d[p]) ? c.removeAttribute(h) : c.setAttribute(h, d[p]);
          });
        }, { immediate: !0 })), Ob(f) && [
          "aria-controls",
          "aria-describedby",
          "aria-haspopup",
          "aria-expanded"
        ].forEach((d) => f.removeAttribute(d));
      }, {
        immediate: !0
      });
    }), Qt(() => {
      u == null || u(), u = void 0;
    }), e({
      triggerRef: i
    }), (c, f) => c.virtualTriggering ? Ot("v-if", !0) : (be(), Je(z(mMe), Xn({ key: 0 }, c.$attrs, {
      "aria-controls": z(a),
      "aria-describedby": z(o),
      "aria-expanded": z(l),
      "aria-haspopup": z(s)
    }), {
      default: ke(() => [
        dn(c.$slots, "default")
      ]),
      _: 3
    }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
  }
});
var _Me = /* @__PURE__ */ Nn(bMe, [["__file", "trigger.vue"]]);
const FA = "focus-trap.focus-after-trapped", WA = "focus-trap.focus-after-released", OMe = "focus-trap.focusout-prevented", TW = {
  cancelable: !0,
  bubbles: !1
}, SMe = {
  cancelable: !0,
  bubbles: !1
}, PW = "focusAfterTrapped", $W = "focusAfterReleased", Jte = Symbol("elFocusTrap"), EN = ee(), v2 = ee(0), MN = ee(0);
let LO = 0;
const ene = (t) => {
  const e = [], n = document.createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
    acceptNode: (r) => {
      const i = r.tagName === "INPUT" && r.type === "hidden";
      return r.disabled || r.hidden || i ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
    }
  });
  for (; n.nextNode(); )
    e.push(n.currentNode);
  return e;
}, AW = (t, e) => {
  for (const n of t)
    if (!xMe(n, e))
      return n;
}, xMe = (t, e) => {
  if (process.env.NODE_ENV === "test")
    return !1;
  if (getComputedStyle(t).visibility === "hidden")
    return !0;
  for (; t; ) {
    if (e && t === e)
      return !1;
    if (getComputedStyle(t).display === "none")
      return !0;
    t = t.parentElement;
  }
  return !1;
}, wMe = (t) => {
  const e = ene(t), n = AW(e, t), r = AW(e.reverse(), t);
  return [n, r];
}, CMe = (t) => t instanceof HTMLInputElement && "select" in t, Pc = (t, e) => {
  if (t && t.focus) {
    const n = document.activeElement;
    t.focus({ preventScroll: !0 }), MN.value = window.performance.now(), t !== n && CMe(t) && e && t.select();
  }
};
function EW(t, e) {
  const n = [...t], r = t.indexOf(e);
  return r !== -1 && n.splice(r, 1), n;
}
const TMe = () => {
  let t = [];
  return {
    push: (r) => {
      const i = t[0];
      i && r !== i && i.pause(), t = EW(t, r), t.unshift(r);
    },
    remove: (r) => {
      var i, a;
      t = EW(t, r), (a = (i = t[0]) == null ? void 0 : i.resume) == null || a.call(i);
    }
  };
}, PMe = (t, e = !1) => {
  const n = document.activeElement;
  for (const r of t)
    if (Pc(r, e), document.activeElement !== n)
      return;
}, MW = TMe(), $Me = () => v2.value > MN.value, NO = () => {
  EN.value = "pointer", v2.value = window.performance.now();
}, IW = () => {
  EN.value = "keyboard", v2.value = window.performance.now();
}, AMe = () => (_t(() => {
  LO === 0 && (document.addEventListener("mousedown", NO), document.addEventListener("touchstart", NO), document.addEventListener("keydown", IW)), LO++;
}), Qt(() => {
  LO--, LO <= 0 && (document.removeEventListener("mousedown", NO), document.removeEventListener("touchstart", NO), document.removeEventListener("keydown", IW));
}), {
  focusReason: EN,
  lastUserFocusTimestamp: v2,
  lastAutomatedFocusTimestamp: MN
}), BO = (t) => new CustomEvent(OMe, {
  ...SMe,
  detail: t
}), EMe = ae({
  name: "ElFocusTrap",
  inheritAttrs: !1,
  props: {
    loop: Boolean,
    trapped: Boolean,
    focusTrapEl: Object,
    focusStartEl: {
      type: [Object, String],
      default: "first"
    }
  },
  emits: [
    PW,
    $W,
    "focusin",
    "focusout",
    "focusout-prevented",
    "release-requested"
  ],
  setup(t, { emit: e }) {
    const n = ee();
    let r, i;
    const { focusReason: a } = AMe();
    iEe((p) => {
      t.trapped && !o.paused && e("release-requested", p);
    });
    const o = {
      paused: !1,
      pause() {
        this.paused = !0;
      },
      resume() {
        this.paused = !1;
      }
    }, s = (p) => {
      if (!t.loop && !t.trapped || o.paused)
        return;
      const { key: v, altKey: g, ctrlKey: m, metaKey: y, currentTarget: _, shiftKey: O } = p, { loop: S } = t, x = v === wa.tab && !g && !m && !y, C = document.activeElement;
      if (x && C) {
        const P = _, [$, T] = wMe(P);
        if ($ && T) {
          if (!O && C === T) {
            const M = BO({
              focusReason: a.value
            });
            e("focusout-prevented", M), M.defaultPrevented || (p.preventDefault(), S && Pc($, !0));
          } else if (O && [$, P].includes(C)) {
            const M = BO({
              focusReason: a.value
            });
            e("focusout-prevented", M), M.defaultPrevented || (p.preventDefault(), S && Pc(T, !0));
          }
        } else if (C === P) {
          const M = BO({
            focusReason: a.value
          });
          e("focusout-prevented", M), M.defaultPrevented || p.preventDefault();
        }
      }
    };
    Et(Jte, {
      focusTrapRef: n,
      onKeydown: s
    }), me(() => t.focusTrapEl, (p) => {
      p && (n.value = p);
    }, { immediate: !0 }), me([n], ([p], [v]) => {
      p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", f)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", f));
    });
    const l = (p) => {
      e(PW, p);
    }, u = (p) => e($W, p), c = (p) => {
      const v = z(n);
      if (!v)
        return;
      const g = p.target, m = p.relatedTarget, y = g && v.contains(g);
      t.trapped || m && v.contains(m) || (r = m), y && e("focusin", p), !o.paused && t.trapped && (y ? i = g : Pc(i, !0));
    }, f = (p) => {
      const v = z(n);
      if (!(o.paused || !v))
        if (t.trapped) {
          const g = p.relatedTarget;
          !Jc(g) && !v.contains(g) && setTimeout(() => {
            if (!o.paused && t.trapped) {
              const m = BO({
                focusReason: a.value
              });
              e("focusout-prevented", m), m.defaultPrevented || Pc(i, !0);
            }
          }, 0);
        } else {
          const g = p.target;
          g && v.contains(g) || e("focusout", p);
        }
    };
    async function d() {
      await Bt();
      const p = z(n);
      if (p) {
        MW.push(o);
        const v = p.contains(document.activeElement) ? r : document.activeElement;
        if (r = v, !p.contains(v)) {
          const m = new Event(FA, TW);
          p.addEventListener(FA, l), p.dispatchEvent(m), m.defaultPrevented || Bt(() => {
            let y = t.focusStartEl;
            ia(y) || (Pc(y), document.activeElement !== y && (y = "first")), y === "first" && PMe(ene(p), !0), (document.activeElement === v || y === "container") && Pc(p);
          });
        }
      }
    }
    function h() {
      const p = z(n);
      if (p) {
        p.removeEventListener(FA, l);
        const v = new CustomEvent(WA, {
          ...TW,
          detail: {
            focusReason: a.value
          }
        });
        p.addEventListener(WA, u), p.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !$Me() || p.contains(document.activeElement)) && Pc(r ?? document.body), p.removeEventListener(WA, u), MW.remove(o);
      }
    }
    return _t(() => {
      t.trapped && d(), me(() => t.trapped, (p) => {
        p ? d() : h();
      });
    }), Qt(() => {
      t.trapped && h();
    }), {
      onKeydown: s
    };
  }
});
function MMe(t, e, n, r, i, a) {
  return dn(t.$slots, "default", { handleKeydown: t.onKeydown });
}
var tne = /* @__PURE__ */ Nn(EMe, [["render", MMe], ["__file", "focus-trap.vue"]]);
const IMe = ["fixed", "absolute"], DMe = hr({
  boundariesPadding: {
    type: Number,
    default: 0
  },
  fallbackPlacements: {
    type: mn(Array),
    default: void 0
  },
  gpuAcceleration: {
    type: Boolean,
    default: !0
  },
  offset: {
    type: Number,
    default: 12
  },
  placement: {
    type: String,
    values: _N,
    default: "bottom"
  },
  popperOptions: {
    type: mn(Object),
    default: () => ({})
  },
  strategy: {
    type: String,
    values: IMe,
    default: "absolute"
  }
}), nne = hr({
  ...DMe,
  id: String,
  style: {
    type: mn([String, Array, Object])
  },
  className: {
    type: mn([String, Array, Object])
  },
  effect: {
    type: String,
    default: "dark"
  },
  visible: Boolean,
  enterable: {
    type: Boolean,
    default: !0
  },
  pure: Boolean,
  focusOnShow: {
    type: Boolean,
    default: !1
  },
  trapping: {
    type: Boolean,
    default: !1
  },
  popperClass: {
    type: mn([String, Array, Object])
  },
  popperStyle: {
    type: mn([String, Array, Object])
  },
  referenceEl: {
    type: mn(Object)
  },
  triggerTargetEl: {
    type: mn(Object)
  },
  stopPopperMouseEvent: {
    type: Boolean,
    default: !0
  },
  virtualTriggering: Boolean,
  zIndex: Number,
  ...sp(["ariaLabel"])
}), RMe = {
  mouseenter: (t) => t instanceof MouseEvent,
  mouseleave: (t) => t instanceof MouseEvent,
  focus: () => !0,
  blur: () => !0,
  close: () => !0
}, kMe = (t, e = []) => {
  const { placement: n, strategy: r, popperOptions: i } = t, a = {
    placement: n,
    strategy: r,
    ...i,
    modifiers: [...NMe(t), ...e]
  };
  return BMe(a, i == null ? void 0 : i.modifiers), a;
}, LMe = (t) => {
  if (Fr)
    return zc(t);
};
function NMe(t) {
  const { offset: e, gpuAcceleration: n, fallbackPlacements: r } = t;
  return [
    {
      name: "offset",
      options: {
        offset: [0, e ?? 12]
      }
    },
    {
      name: "preventOverflow",
      options: {
        padding: {
          top: 2,
          bottom: 2,
          left: 5,
          right: 5
        }
      }
    },
    {
      name: "flip",
      options: {
        padding: 5,
        fallbackPlacements: r
      }
    },
    {
      name: "computeStyles",
      options: {
        gpuAcceleration: n
      }
    }
  ];
}
function BMe(t, e) {
  e && (t.modifiers = [...t.modifiers, ...e ?? []]);
}
const zMe = 0, VMe = (t) => {
  const { popperInstanceRef: e, contentRef: n, triggerRef: r, role: i } = et(AN, void 0), a = ee(), o = ee(), s = V(() => ({
    name: "eventListeners",
    enabled: !!t.visible
  })), l = V(() => {
    var m;
    const y = z(a), _ = (m = z(o)) != null ? m : zMe;
    return {
      name: "arrow",
      enabled: !gte(y),
      options: {
        element: y,
        padding: _
      }
    };
  }), u = V(() => ({
    onFirstUpdate: () => {
      p();
    },
    ...kMe(t, [
      z(l),
      z(s)
    ])
  })), c = V(() => LMe(t.referenceEl) || z(r)), { attributes: f, state: d, styles: h, update: p, forceUpdate: v, instanceRef: g } = tEe(c, n, u);
  return me(g, (m) => e.value = m), _t(() => {
    me(() => {
      var m;
      return (m = z(c)) == null ? void 0 : m.getBoundingClientRect();
    }, () => {
      p();
    });
  }), {
    attributes: f,
    arrowRef: a,
    contentRef: n,
    instanceRef: g,
    state: d,
    styles: h,
    role: i,
    forceUpdate: v,
    update: p
  };
}, FMe = (t, {
  attributes: e,
  styles: n,
  role: r
}) => {
  const { nextZIndex: i } = Qte(), a = $n("popper"), o = V(() => z(e).popper), s = ee(Ws(t.zIndex) ? t.zIndex : i()), l = V(() => [
    a.b(),
    a.is("pure", t.pure),
    a.is(t.effect),
    t.popperClass
  ]), u = V(() => [
    { zIndex: z(s) },
    z(n).popper,
    t.popperStyle || {}
  ]), c = V(() => r.value === "dialog" ? "false" : void 0), f = V(() => z(n).arrow || {});
  return {
    ariaModal: c,
    arrowStyle: f,
    contentAttrs: o,
    contentClass: l,
    contentStyle: u,
    contentZIndex: s,
    updateZIndex: () => {
      s.value = Ws(t.zIndex) ? t.zIndex : i();
    }
  };
}, WMe = (t, e) => {
  const n = ee(!1), r = ee();
  return {
    focusStartRef: r,
    trapped: n,
    onFocusAfterReleased: (u) => {
      var c;
      ((c = u.detail) == null ? void 0 : c.focusReason) !== "pointer" && (r.value = "first", e("blur"));
    },
    onFocusAfterTrapped: () => {
      e("focus");
    },
    onFocusInTrap: (u) => {
      t.visible && !n.value && (u.target && (r.value = u.target), n.value = !0);
    },
    onFocusoutPrevented: (u) => {
      t.trapping || (u.detail.focusReason === "pointer" && u.preventDefault(), n.value = !1);
    },
    onReleaseRequested: () => {
      n.value = !1, e("close");
    }
  };
}, QMe = ae({
  name: "ElPopperContent"
}), HMe = /* @__PURE__ */ ae({
  ...QMe,
  props: nne,
  emits: RMe,
  setup(t, { expose: e, emit: n }) {
    const r = t, {
      focusStartRef: i,
      trapped: a,
      onFocusAfterReleased: o,
      onFocusAfterTrapped: s,
      onFocusInTrap: l,
      onFocusoutPrevented: u,
      onReleaseRequested: c
    } = WMe(r, n), { attributes: f, arrowRef: d, contentRef: h, styles: p, instanceRef: v, role: g, update: m } = VMe(r), {
      ariaModal: y,
      arrowStyle: _,
      contentAttrs: O,
      contentClass: S,
      contentStyle: x,
      updateZIndex: C
    } = FMe(r, {
      styles: p,
      attributes: f,
      role: g
    }), P = et(Cb, void 0), $ = ee();
    Et(Ute, {
      arrowStyle: _,
      arrowRef: d,
      arrowOffset: $
    }), P && Et(Cb, {
      ...P,
      addInputId: Kc,
      removeInputId: Kc
    });
    let T;
    const E = (R = !0) => {
      m(), R && C();
    }, M = () => {
      E(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1);
    };
    return _t(() => {
      me(() => r.triggerTargetEl, (R, N) => {
        T == null || T(), T = void 0;
        const I = z(R || h.value), B = z(N || h.value);
        Ob(I) && (T = me([g, () => r.ariaLabel, y, () => r.id], (Q) => {
          ["role", "aria-label", "aria-modal", "id"].forEach((W, H) => {
            Jc(Q[H]) ? I.removeAttribute(W) : I.setAttribute(W, Q[H]);
          });
        }, { immediate: !0 })), B !== I && Ob(B) && ["role", "aria-label", "aria-modal", "id"].forEach((Q) => {
          B.removeAttribute(Q);
        });
      }, { immediate: !0 }), me(() => r.visible, M, { immediate: !0 });
    }), Qt(() => {
      T == null || T(), T = void 0;
    }), e({
      popperContentRef: h,
      popperInstanceRef: v,
      updatePopper: E,
      contentStyle: x
    }), (R, N) => (be(), Ue("div", Xn({
      ref_key: "contentRef",
      ref: h
    }, z(O), {
      style: z(x),
      class: z(S),
      tabindex: "-1",
      onMouseenter: N[0] || (N[0] = (I) => R.$emit("mouseenter", I)),
      onMouseleave: N[1] || (N[1] = (I) => R.$emit("mouseleave", I))
    }), [
      D(z(tne), {
        trapped: z(a),
        "trap-on-focus-in": !0,
        "focus-trap-el": z(h),
        "focus-start-el": z(i),
        onFocusAfterTrapped: z(s),
        onFocusAfterReleased: z(o),
        onFocusin: z(l),
        onFocusoutPrevented: z(u),
        onReleaseRequested: z(c)
      }, {
        default: ke(() => [
          dn(R.$slots, "default")
        ]),
        _: 3
      }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
    ], 16));
  }
});
var GMe = /* @__PURE__ */ Nn(HMe, [["__file", "content.vue"]]);
const jMe = ec(hMe), IN = Symbol("elTooltip"), DN = hr({
  ...sEe,
  ...nne,
  appendTo: {
    type: mn([String, Object])
  },
  content: {
    type: String,
    default: ""
  },
  rawContent: {
    type: Boolean,
    default: !1
  },
  persistent: Boolean,
  visible: {
    type: mn(Boolean),
    default: null
  },
  transition: String,
  teleported: {
    type: Boolean,
    default: !0
  },
  disabled: Boolean,
  ...sp(["ariaLabel"])
}), rne = hr({
  ...Kte,
  disabled: Boolean,
  trigger: {
    type: mn([String, Array]),
    default: "hover"
  },
  triggerKeys: {
    type: mn(Array),
    default: () => [wa.enter, wa.space]
  }
}), {
  useModelToggleProps: ZMe,
  useModelToggleEmits: UMe,
  useModelToggle: XMe
} = Tte("visible"), YMe = hr({
  ...Xte,
  ...ZMe,
  ...DN,
  ...rne,
  ...Yte,
  showArrow: {
    type: Boolean,
    default: !0
  }
}), qMe = [
  ...UMe,
  "before-show",
  "before-hide",
  "show",
  "hide",
  "open",
  "close"
], KMe = (t, e) => dg(t) ? t.includes(e) : t === e, Vp = (t, e, n) => (r) => {
  KMe(z(t), e) && n(r);
}, JMe = ae({
  name: "ElTooltipTrigger"
}), eIe = /* @__PURE__ */ ae({
  ...JMe,
  props: rne,
  setup(t, { expose: e }) {
    const n = t, r = $n("tooltip"), { controlled: i, id: a, open: o, onOpen: s, onClose: l, onToggle: u } = et(IN, void 0), c = ee(null), f = () => {
      if (z(i) || n.disabled)
        return !0;
    }, d = Lr(n, "trigger"), h = mu(f, Vp(d, "hover", s)), p = mu(f, Vp(d, "hover", l)), v = mu(f, Vp(d, "click", (O) => {
      O.button === 0 && u(O);
    })), g = mu(f, Vp(d, "focus", s)), m = mu(f, Vp(d, "focus", l)), y = mu(f, Vp(d, "contextmenu", (O) => {
      O.preventDefault(), u(O);
    })), _ = mu(f, (O) => {
      const { code: S } = O;
      n.triggerKeys.includes(S) && (O.preventDefault(), u(O));
    });
    return e({
      triggerRef: c
    }), (O, S) => (be(), Je(z(_Me), {
      id: z(a),
      "virtual-ref": O.virtualRef,
      open: z(o),
      "virtual-triggering": O.virtualTriggering,
      class: Ge(z(r).e("trigger")),
      onBlur: z(m),
      onClick: z(v),
      onContextmenu: z(y),
      onFocus: z(g),
      onMouseenter: z(h),
      onMouseleave: z(p),
      onKeydown: z(_)
    }, {
      default: ke(() => [
        dn(O.$slots, "default")
      ]),
      _: 3
    }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
  }
});
var tIe = /* @__PURE__ */ Nn(eIe, [["__file", "trigger.vue"]]);
const nIe = ae({
  name: "ElTooltipContent",
  inheritAttrs: !1
}), rIe = /* @__PURE__ */ ae({
  ...nIe,
  props: DN,
  setup(t, { expose: e }) {
    const n = t, { selector: r } = Fte(), i = $n("tooltip"), a = ee(null), o = ee(!1), {
      controlled: s,
      id: l,
      open: u,
      trigger: c,
      onClose: f,
      onOpen: d,
      onShow: h,
      onHide: p,
      onBeforeShow: v,
      onBeforeHide: g
    } = et(IN, void 0), m = V(() => n.transition || `${i.namespace.value}-fade-in-linear`), y = V(() => process.env.NODE_ENV === "test" ? !0 : n.persistent);
    Qt(() => {
      o.value = !0;
    });
    const _ = V(() => z(y) ? !0 : z(u)), O = V(() => n.disabled ? !1 : z(u)), S = V(() => n.appendTo || r.value), x = V(() => {
      var Q;
      return (Q = n.style) != null ? Q : {};
    }), C = V(() => !z(u)), P = () => {
      p();
    }, $ = () => {
      if (z(s))
        return !0;
    }, T = mu($, () => {
      n.enterable && z(c) === "hover" && d();
    }), E = mu($, () => {
      z(c) === "hover" && f();
    }), M = () => {
      var Q, W;
      (W = (Q = a.value) == null ? void 0 : Q.updatePopper) == null || W.call(Q), v == null || v();
    }, R = () => {
      g == null || g();
    }, N = () => {
      h(), B = bxe(V(() => {
        var Q;
        return (Q = a.value) == null ? void 0 : Q.popperContentRef;
      }), () => {
        if (z(s))
          return;
        z(c) !== "hover" && f();
      });
    }, I = () => {
      n.virtualTriggering || f();
    };
    let B;
    return me(() => z(u), (Q) => {
      Q || B == null || B();
    }, {
      flush: "post"
    }), me(() => n.content, () => {
      var Q, W;
      (W = (Q = a.value) == null ? void 0 : Q.updatePopper) == null || W.call(Q);
    }), e({
      contentRef: a
    }), (Q, W) => (be(), Je(R_, {
      disabled: !Q.teleported,
      to: z(S)
    }, [
      D(mo, {
        name: z(m),
        onAfterLeave: P,
        onBeforeEnter: M,
        onAfterEnter: N,
        onBeforeLeave: R
      }, {
        default: ke(() => [
          z(_) ? _r((be(), Je(z(GMe), Xn({
            key: 0,
            id: z(l),
            ref_key: "contentRef",
            ref: a
          }, Q.$attrs, {
            "aria-label": Q.ariaLabel,
            "aria-hidden": z(C),
            "boundaries-padding": Q.boundariesPadding,
            "fallback-placements": Q.fallbackPlacements,
            "gpu-acceleration": Q.gpuAcceleration,
            offset: Q.offset,
            placement: Q.placement,
            "popper-options": Q.popperOptions,
            strategy: Q.strategy,
            effect: Q.effect,
            enterable: Q.enterable,
            pure: Q.pure,
            "popper-class": Q.popperClass,
            "popper-style": [Q.popperStyle, z(x)],
            "reference-el": Q.referenceEl,
            "trigger-target-el": Q.triggerTargetEl,
            visible: z(O),
            "z-index": Q.zIndex,
            onMouseenter: z(T),
            onMouseleave: z(E),
            onBlur: I,
            onClose: z(f)
          }), {
            default: ke(() => [
              o.value ? Ot("v-if", !0) : dn(Q.$slots, "default", { key: 0 })
            ]),
            _: 3
          }, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [
            [ho, z(O)]
          ]) : Ot("v-if", !0)
        ]),
        _: 3
      }, 8, ["name"])
    ], 8, ["disabled", "to"]));
  }
});
var iIe = /* @__PURE__ */ Nn(rIe, [["__file", "content.vue"]]);
const aIe = ["innerHTML"], oIe = { key: 1 }, sIe = ae({
  name: "ElTooltip"
}), lIe = /* @__PURE__ */ ae({
  ...sIe,
  props: YMe,
  emits: qMe,
  setup(t, { expose: e, emit: n }) {
    const r = t;
    oEe();
    const i = wb(), a = ee(), o = ee(), s = () => {
      var m;
      const y = z(a);
      y && ((m = y.popperInstanceRef) == null || m.update());
    }, l = ee(!1), u = ee(), { show: c, hide: f, hasUpdateHandler: d } = XMe({
      indicator: l,
      toggleReason: u
    }), { onOpen: h, onClose: p } = lEe({
      showAfter: Lr(r, "showAfter"),
      hideAfter: Lr(r, "hideAfter"),
      autoClose: Lr(r, "autoClose"),
      open: c,
      close: f
    }), v = V(() => hf(r.visible) && !d.value);
    Et(IN, {
      controlled: v,
      id: i,
      open: Pee(l),
      trigger: Lr(r, "trigger"),
      onOpen: (m) => {
        h(m);
      },
      onClose: (m) => {
        p(m);
      },
      onToggle: (m) => {
        z(l) ? p(m) : h(m);
      },
      onShow: () => {
        n("show", u.value);
      },
      onHide: () => {
        n("hide", u.value);
      },
      onBeforeShow: () => {
        n("before-show", u.value);
      },
      onBeforeHide: () => {
        n("before-hide", u.value);
      },
      updatePopper: s
    }), me(() => r.disabled, (m) => {
      m && l.value && (l.value = !1);
    });
    const g = (m) => {
      var y, _;
      const O = (_ = (y = o.value) == null ? void 0 : y.contentRef) == null ? void 0 : _.popperContentRef, S = (m == null ? void 0 : m.relatedTarget) || document.activeElement;
      return O && O.contains(S);
    };
    return lxe(() => l.value && f()), e({
      popperRef: a,
      contentRef: o,
      isFocusInsideContent: g,
      updatePopper: s,
      onOpen: h,
      onClose: p,
      hide: f
    }), (m, y) => (be(), Je(z(jMe), {
      ref_key: "popperRef",
      ref: a,
      role: m.role
    }, {
      default: ke(() => [
        D(tIe, {
          disabled: m.disabled,
          trigger: m.trigger,
          "trigger-keys": m.triggerKeys,
          "virtual-ref": m.virtualRef,
          "virtual-triggering": m.virtualTriggering
        }, {
          default: ke(() => [
            m.$slots.default ? dn(m.$slots, "default", { key: 0 }) : Ot("v-if", !0)
          ]),
          _: 3
        }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
        D(iIe, {
          ref_key: "contentRef",
          ref: o,
          "aria-label": m.ariaLabel,
          "boundaries-padding": m.boundariesPadding,
          content: m.content,
          disabled: m.disabled,
          effect: m.effect,
          enterable: m.enterable,
          "fallback-placements": m.fallbackPlacements,
          "hide-after": m.hideAfter,
          "gpu-acceleration": m.gpuAcceleration,
          offset: m.offset,
          persistent: m.persistent,
          "popper-class": m.popperClass,
          "popper-style": m.popperStyle,
          placement: m.placement,
          "popper-options": m.popperOptions,
          pure: m.pure,
          "raw-content": m.rawContent,
          "reference-el": m.referenceEl,
          "trigger-target-el": m.triggerTargetEl,
          "show-after": m.showAfter,
          strategy: m.strategy,
          teleported: m.teleported,
          transition: m.transition,
          "virtual-triggering": m.virtualTriggering,
          "z-index": m.zIndex,
          "append-to": m.appendTo
        }, {
          default: ke(() => [
            dn(m.$slots, "content", {}, () => [
              m.rawContent ? (be(), Ue("span", {
                key: 0,
                innerHTML: m.content
              }, null, 8, aIe)) : (be(), Ue("span", oIe, xi(m.content), 1))
            ]),
            m.showArrow ? (be(), Je(z(gMe), {
              key: 0,
              "arrow-offset": m.arrowOffset
            }, null, 8, ["arrow-offset"])) : Ot("v-if", !0)
          ]),
          _: 3
        }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"])
      ]),
      _: 3
    }, 8, ["role"]));
  }
});
var uIe = /* @__PURE__ */ Nn(lIe, [["__file", "tooltip.vue"]]);
const cIe = ec(uIe), ine = Symbol("buttonGroupContextKey"), fIe = (t, e) => {
  Es({
    from: "type.text",
    replacement: "link",
    version: "3.0.0",
    scope: "props",
    ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
  }, V(() => t.type === "text"));
  const n = et(ine, void 0), r = Gte("button"), { form: i } = lp(), a = Tg(V(() => n == null ? void 0 : n.size)), o = um(), s = ee(), l = D_(), u = V(() => t.type || (n == null ? void 0 : n.type) || ""), c = V(() => {
    var p, v, g;
    return (g = (v = t.autoInsertSpace) != null ? v : (p = r.value) == null ? void 0 : p.autoInsertSpace) != null ? g : !1;
  }), f = V(() => t.tag === "button" ? {
    ariaDisabled: o.value || t.loading,
    disabled: o.value || t.loading,
    autofocus: t.autofocus,
    type: t.nativeType
  } : {}), d = V(() => {
    var p;
    const v = (p = l.default) == null ? void 0 : p.call(l);
    if (c.value && (v == null ? void 0 : v.length) === 1) {
      const g = v[0];
      if ((g == null ? void 0 : g.type) === KT) {
        const m = g.children;
        return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim());
      }
    }
    return !1;
  });
  return {
    _disabled: o,
    _size: a,
    _type: u,
    _ref: s,
    _props: f,
    shouldAddSpace: d,
    handleClick: (p) => {
      t.nativeType === "reset" && (i == null || i.resetFields()), e("click", p);
    }
  };
}, dIe = [
  "default",
  "primary",
  "success",
  "warning",
  "info",
  "danger",
  "text",
  ""
], hIe = ["button", "submit", "reset"], nR = hr({
  size: op,
  disabled: Boolean,
  type: {
    type: String,
    values: dIe,
    default: ""
  },
  icon: {
    type: _g
  },
  nativeType: {
    type: String,
    values: hIe,
    default: "button"
  },
  loading: Boolean,
  loadingIcon: {
    type: _g,
    default: () => gN
  },
  plain: Boolean,
  text: Boolean,
  link: Boolean,
  bg: Boolean,
  autofocus: Boolean,
  round: Boolean,
  circle: Boolean,
  color: String,
  dark: Boolean,
  autoInsertSpace: {
    type: Boolean,
    default: void 0
  },
  tag: {
    type: mn([String, Object]),
    default: "button"
  }
}), pIe = {
  click: (t) => t instanceof MouseEvent
};
function Ci(t, e) {
  vIe(t) && (t = "100%");
  var n = gIe(t);
  return t = e === 360 ? t : Math.min(e, Math.max(0, parseFloat(t))), n && (t = parseInt(String(t * e), 10) / 100), Math.abs(t - e) < 1e-6 ? 1 : (e === 360 ? t = (t < 0 ? t % e + e : t % e) / parseFloat(String(e)) : t = t % e / parseFloat(String(e)), t);
}
function zO(t) {
  return Math.min(1, Math.max(0, t));
}
function vIe(t) {
  return typeof t == "string" && t.indexOf(".") !== -1 && parseFloat(t) === 1;
}
function gIe(t) {
  return typeof t == "string" && t.indexOf("%") !== -1;
}
function ane(t) {
  return t = parseFloat(t), (isNaN(t) || t < 0 || t > 1) && (t = 1), t;
}
function VO(t) {
  return t <= 1 ? "".concat(Number(t) * 100, "%") : t;
}
function th(t) {
  return t.length === 1 ? "0" + t : String(t);
}
function mIe(t, e, n) {
  return {
    r: Ci(t, 255) * 255,
    g: Ci(e, 255) * 255,
    b: Ci(n, 255) * 255
  };
}
function DW(t, e, n) {
  t = Ci(t, 255), e = Ci(e, 255), n = Ci(n, 255);
  var r = Math.max(t, e, n), i = Math.min(t, e, n), a = 0, o = 0, s = (r + i) / 2;
  if (r === i)
    o = 0, a = 0;
  else {
    var l = r - i;
    switch (o = s > 0.5 ? l / (2 - r - i) : l / (r + i), r) {
      case t:
        a = (e - n) / l + (e < n ? 6 : 0);
        break;
      case e:
        a = (n - t) / l + 2;
        break;
      case n:
        a = (t - e) / l + 4;
        break;
    }
    a /= 6;
  }
  return { h: a, s: o, l: s };
}
function QA(t, e, n) {
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * (6 * n) : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
}
function yIe(t, e, n) {
  var r, i, a;
  if (t = Ci(t, 360), e = Ci(e, 100), n = Ci(n, 100), e === 0)
    i = n, a = n, r = n;
  else {
    var o = n < 0.5 ? n * (1 + e) : n + e - n * e, s = 2 * n - o;
    r = QA(s, o, t + 1 / 3), i = QA(s, o, t), a = QA(s, o, t - 1 / 3);
  }
  return { r: r * 255, g: i * 255, b: a * 255 };
}
function rR(t, e, n) {
  t = Ci(t, 255), e = Ci(e, 255), n = Ci(n, 255);
  var r = Math.max(t, e, n), i = Math.min(t, e, n), a = 0, o = r, s = r - i, l = r === 0 ? 0 : s / r;
  if (r === i)
    a = 0;
  else {
    switch (r) {
      case t:
        a = (e - n) / s + (e < n ? 6 : 0);
        break;
      case e:
        a = (n - t) / s + 2;
        break;
      case n:
        a = (t - e) / s + 4;
        break;
    }
    a /= 6;
  }
  return { h: a, s: l, v: o };
}
function bIe(t, e, n) {
  t = Ci(t, 360) * 6, e = Ci(e, 100), n = Ci(n, 100);
  var r = Math.floor(t), i = t - r, a = n * (1 - e), o = n * (1 - i * e), s = n * (1 - (1 - i) * e), l = r % 6, u = [n, o, a, a, s, n][l], c = [s, n, n, o, a, a][l], f = [a, a, s, n, n, o][l];
  return { r: u * 255, g: c * 255, b: f * 255 };
}
function iR(t, e, n, r) {
  var i = [
    th(Math.round(t).toString(16)),
    th(Math.round(e).toString(16)),
    th(Math.round(n).toString(16))
  ];
  return r && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
}
function _Ie(t, e, n, r, i) {
  var a = [
    th(Math.round(t).toString(16)),
    th(Math.round(e).toString(16)),
    th(Math.round(n).toString(16)),
    th(OIe(r))
  ];
  return i && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
}
function OIe(t) {
  return Math.round(parseFloat(t) * 255).toString(16);
}
function RW(t) {
  return Ka(t) / 255;
}
function Ka(t) {
  return parseInt(t, 16);
}
function SIe(t) {
  return {
    r: t >> 16,
    g: (t & 65280) >> 8,
    b: t & 255
  };
}
var aR = {
  aliceblue: "#f0f8ff",
  antiquewhite: "#faebd7",
  aqua: "#00ffff",
  aquamarine: "#7fffd4",
  azure: "#f0ffff",
  beige: "#f5f5dc",
  bisque: "#ffe4c4",
  black: "#000000",
  blanchedalmond: "#ffebcd",
  blue: "#0000ff",
  blueviolet: "#8a2be2",
  brown: "#a52a2a",
  burlywood: "#deb887",
  cadetblue: "#5f9ea0",
  chartreuse: "#7fff00",
  chocolate: "#d2691e",
  coral: "#ff7f50",
  cornflowerblue: "#6495ed",
  cornsilk: "#fff8dc",
  crimson: "#dc143c",
  cyan: "#00ffff",
  darkblue: "#00008b",
  darkcyan: "#008b8b",
  darkgoldenrod: "#b8860b",
  darkgray: "#a9a9a9",
  darkgreen: "#006400",
  darkgrey: "#a9a9a9",
  darkkhaki: "#bdb76b",
  darkmagenta: "#8b008b",
  darkolivegreen: "#556b2f",
  darkorange: "#ff8c00",
  darkorchid: "#9932cc",
  darkred: "#8b0000",
  darksalmon: "#e9967a",
  darkseagreen: "#8fbc8f",
  darkslateblue: "#483d8b",
  darkslategray: "#2f4f4f",
  darkslategrey: "#2f4f4f",
  darkturquoise: "#00ced1",
  darkviolet: "#9400d3",
  deeppink: "#ff1493",
  deepskyblue: "#00bfff",
  dimgray: "#696969",
  dimgrey: "#696969",
  dodgerblue: "#1e90ff",
  firebrick: "#b22222",
  floralwhite: "#fffaf0",
  forestgreen: "#228b22",
  fuchsia: "#ff00ff",
  gainsboro: "#dcdcdc",
  ghostwhite: "#f8f8ff",
  goldenrod: "#daa520",
  gold: "#ffd700",
  gray: "#808080",
  green: "#008000",
  greenyellow: "#adff2f",
  grey: "#808080",
  honeydew: "#f0fff0",
  hotpink: "#ff69b4",
  indianred: "#cd5c5c",
  indigo: "#4b0082",
  ivory: "#fffff0",
  khaki: "#f0e68c",
  lavenderblush: "#fff0f5",
  lavender: "#e6e6fa",
  lawngreen: "#7cfc00",
  lemonchiffon: "#fffacd",
  lightblue: "#add8e6",
  lightcoral: "#f08080",
  lightcyan: "#e0ffff",
  lightgoldenrodyellow: "#fafad2",
  lightgray: "#d3d3d3",
  lightgreen: "#90ee90",
  lightgrey: "#d3d3d3",
  lightpink: "#ffb6c1",
  lightsalmon: "#ffa07a",
  lightseagreen: "#20b2aa",
  lightskyblue: "#87cefa",
  lightslategray: "#778899",
  lightslategrey: "#778899",
  lightsteelblue: "#b0c4de",
  lightyellow: "#ffffe0",
  lime: "#00ff00",
  limegreen: "#32cd32",
  linen: "#faf0e6",
  magenta: "#ff00ff",
  maroon: "#800000",
  mediumaquamarine: "#66cdaa",
  mediumblue: "#0000cd",
  mediumorchid: "#ba55d3",
  mediumpurple: "#9370db",
  mediumseagreen: "#3cb371",
  mediumslateblue: "#7b68ee",
  mediumspringgreen: "#00fa9a",
  mediumturquoise: "#48d1cc",
  mediumvioletred: "#c71585",
  midnightblue: "#191970",
  mintcream: "#f5fffa",
  mistyrose: "#ffe4e1",
  moccasin: "#ffe4b5",
  navajowhite: "#ffdead",
  navy: "#000080",
  oldlace: "#fdf5e6",
  olive: "#808000",
  olivedrab: "#6b8e23",
  orange: "#ffa500",
  orangered: "#ff4500",
  orchid: "#da70d6",
  palegoldenrod: "#eee8aa",
  palegreen: "#98fb98",
  paleturquoise: "#afeeee",
  palevioletred: "#db7093",
  papayawhip: "#ffefd5",
  peachpuff: "#ffdab9",
  peru: "#cd853f",
  pink: "#ffc0cb",
  plum: "#dda0dd",
  powderblue: "#b0e0e6",
  purple: "#800080",
  rebeccapurple: "#663399",
  red: "#ff0000",
  rosybrown: "#bc8f8f",
  royalblue: "#4169e1",
  saddlebrown: "#8b4513",
  salmon: "#fa8072",
  sandybrown: "#f4a460",
  seagreen: "#2e8b57",
  seashell: "#fff5ee",
  sienna: "#a0522d",
  silver: "#c0c0c0",
  skyblue: "#87ceeb",
  slateblue: "#6a5acd",
  slategray: "#708090",
  slategrey: "#708090",
  snow: "#fffafa",
  springgreen: "#00ff7f",
  steelblue: "#4682b4",
  tan: "#d2b48c",
  teal: "#008080",
  thistle: "#d8bfd8",
  tomato: "#ff6347",
  turquoise: "#40e0d0",
  violet: "#ee82ee",
  wheat: "#f5deb3",
  white: "#ffffff",
  whitesmoke: "#f5f5f5",
  yellow: "#ffff00",
  yellowgreen: "#9acd32"
};
function yv(t) {
  var e = { r: 0, g: 0, b: 0 }, n = 1, r = null, i = null, a = null, o = !1, s = !1;
  return typeof t == "string" && (t = CIe(t)), typeof t == "object" && (du(t.r) && du(t.g) && du(t.b) ? (e = mIe(t.r, t.g, t.b), o = !0, s = String(t.r).substr(-1) === "%" ? "prgb" : "rgb") : du(t.h) && du(t.s) && du(t.v) ? (r = VO(t.s), i = VO(t.v), e = bIe(t.h, r, i), o = !0, s = "hsv") : du(t.h) && du(t.s) && du(t.l) && (r = VO(t.s), a = VO(t.l), e = yIe(t.h, r, a), o = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(t, "a") && (n = t.a)), n = ane(n), {
    ok: o,
    format: t.format || s,
    r: Math.min(255, Math.max(e.r, 0)),
    g: Math.min(255, Math.max(e.g, 0)),
    b: Math.min(255, Math.max(e.b, 0)),
    a: n
  };
}
var xIe = "[-\\+]?\\d+%?", wIe = "[-\\+]?\\d*\\.\\d+%?", Vc = "(?:".concat(wIe, ")|(?:").concat(xIe, ")"), HA = "[\\s|\\(]+(".concat(Vc, ")[,|\\s]+(").concat(Vc, ")[,|\\s]+(").concat(Vc, ")\\s*\\)?"), GA = "[\\s|\\(]+(".concat(Vc, ")[,|\\s]+(").concat(Vc, ")[,|\\s]+(").concat(Vc, ")[,|\\s]+(").concat(Vc, ")\\s*\\)?"), xs = {
  CSS_UNIT: new RegExp(Vc),
  rgb: new RegExp("rgb" + HA),
  rgba: new RegExp("rgba" + GA),
  hsl: new RegExp("hsl" + HA),
  hsla: new RegExp("hsla" + GA),
  hsv: new RegExp("hsv" + HA),
  hsva: new RegExp("hsva" + GA),
  hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
};
function CIe(t) {
  if (t = t.trim().toLowerCase(), t.length === 0)
    return !1;
  var e = !1;
  if (aR[t])
    t = aR[t], e = !0;
  else if (t === "transparent")
    return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  var n = xs.rgb.exec(t);
  return n ? { r: n[1], g: n[2], b: n[3] } : (n = xs.rgba.exec(t), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = xs.hsl.exec(t), n ? { h: n[1], s: n[2], l: n[3] } : (n = xs.hsla.exec(t), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = xs.hsv.exec(t), n ? { h: n[1], s: n[2], v: n[3] } : (n = xs.hsva.exec(t), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = xs.hex8.exec(t), n ? {
    r: Ka(n[1]),
    g: Ka(n[2]),
    b: Ka(n[3]),
    a: RW(n[4]),
    format: e ? "name" : "hex8"
  } : (n = xs.hex6.exec(t), n ? {
    r: Ka(n[1]),
    g: Ka(n[2]),
    b: Ka(n[3]),
    format: e ? "name" : "hex"
  } : (n = xs.hex4.exec(t), n ? {
    r: Ka(n[1] + n[1]),
    g: Ka(n[2] + n[2]),
    b: Ka(n[3] + n[3]),
    a: RW(n[4] + n[4]),
    format: e ? "name" : "hex8"
  } : (n = xs.hex3.exec(t), n ? {
    r: Ka(n[1] + n[1]),
    g: Ka(n[2] + n[2]),
    b: Ka(n[3] + n[3]),
    format: e ? "name" : "hex"
  } : !1)))))))));
}
function du(t) {
  return !!xs.CSS_UNIT.exec(String(t));
}
var Hn = (
  /** @class */
  function() {
    function t(e, n) {
      e === void 0 && (e = ""), n === void 0 && (n = {});
      var r;
      if (e instanceof t)
        return e;
      typeof e == "number" && (e = SIe(e)), this.originalInput = e;
      var i = yv(e);
      this.originalInput = e, this.r = i.r, this.g = i.g, this.b = i.b, this.a = i.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : i.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = i.ok;
    }
    return t.prototype.isDark = function() {
      return this.getBrightness() < 128;
    }, t.prototype.isLight = function() {
      return !this.isDark();
    }, t.prototype.getBrightness = function() {
      var e = this.toRgb();
      return (e.r * 299 + e.g * 587 + e.b * 114) / 1e3;
    }, t.prototype.getLuminance = function() {
      var e = this.toRgb(), n, r, i, a = e.r / 255, o = e.g / 255, s = e.b / 255;
      return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), o <= 0.03928 ? r = o / 12.92 : r = Math.pow((o + 0.055) / 1.055, 2.4), s <= 0.03928 ? i = s / 12.92 : i = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * i;
    }, t.prototype.getAlpha = function() {
      return this.a;
    }, t.prototype.setAlpha = function(e) {
      return this.a = ane(e), this.roundA = Math.round(100 * this.a) / 100, this;
    }, t.prototype.isMonochrome = function() {
      var e = this.toHsl().s;
      return e === 0;
    }, t.prototype.toHsv = function() {
      var e = rR(this.r, this.g, this.b);
      return { h: e.h * 360, s: e.s, v: e.v, a: this.a };
    }, t.prototype.toHsvString = function() {
      var e = rR(this.r, this.g, this.b), n = Math.round(e.h * 360), r = Math.round(e.s * 100), i = Math.round(e.v * 100);
      return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(i, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(i, "%, ").concat(this.roundA, ")");
    }, t.prototype.toHsl = function() {
      var e = DW(this.r, this.g, this.b);
      return { h: e.h * 360, s: e.s, l: e.l, a: this.a };
    }, t.prototype.toHslString = function() {
      var e = DW(this.r, this.g, this.b), n = Math.round(e.h * 360), r = Math.round(e.s * 100), i = Math.round(e.l * 100);
      return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(i, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(i, "%, ").concat(this.roundA, ")");
    }, t.prototype.toHex = function(e) {
      return e === void 0 && (e = !1), iR(this.r, this.g, this.b, e);
    }, t.prototype.toHexString = function(e) {
      return e === void 0 && (e = !1), "#" + this.toHex(e);
    }, t.prototype.toHex8 = function(e) {
      return e === void 0 && (e = !1), _Ie(this.r, this.g, this.b, this.a, e);
    }, t.prototype.toHex8String = function(e) {
      return e === void 0 && (e = !1), "#" + this.toHex8(e);
    }, t.prototype.toHexShortString = function(e) {
      return e === void 0 && (e = !1), this.a === 1 ? this.toHexString(e) : this.toHex8String(e);
    }, t.prototype.toRgb = function() {
      return {
        r: Math.round(this.r),
        g: Math.round(this.g),
        b: Math.round(this.b),
        a: this.a
      };
    }, t.prototype.toRgbString = function() {
      var e = Math.round(this.r), n = Math.round(this.g), r = Math.round(this.b);
      return this.a === 1 ? "rgb(".concat(e, ", ").concat(n, ", ").concat(r, ")") : "rgba(".concat(e, ", ").concat(n, ", ").concat(r, ", ").concat(this.roundA, ")");
    }, t.prototype.toPercentageRgb = function() {
      var e = function(n) {
        return "".concat(Math.round(Ci(n, 255) * 100), "%");
      };
      return {
        r: e(this.r),
        g: e(this.g),
        b: e(this.b),
        a: this.a
      };
    }, t.prototype.toPercentageRgbString = function() {
      var e = function(n) {
        return Math.round(Ci(n, 255) * 100);
      };
      return this.a === 1 ? "rgb(".concat(e(this.r), "%, ").concat(e(this.g), "%, ").concat(e(this.b), "%)") : "rgba(".concat(e(this.r), "%, ").concat(e(this.g), "%, ").concat(e(this.b), "%, ").concat(this.roundA, ")");
    }, t.prototype.toName = function() {
      if (this.a === 0)
        return "transparent";
      if (this.a < 1)
        return !1;
      for (var e = "#" + iR(this.r, this.g, this.b, !1), n = 0, r = Object.entries(aR); n < r.length; n++) {
        var i = r[n], a = i[0], o = i[1];
        if (e === o)
          return a;
      }
      return !1;
    }, t.prototype.toString = function(e) {
      var n = !!e;
      e = e ?? this.format;
      var r = !1, i = this.a < 1 && this.a >= 0, a = !n && i && (e.startsWith("hex") || e === "name");
      return a ? e === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (e === "rgb" && (r = this.toRgbString()), e === "prgb" && (r = this.toPercentageRgbString()), (e === "hex" || e === "hex6") && (r = this.toHexString()), e === "hex3" && (r = this.toHexString(!0)), e === "hex4" && (r = this.toHex8String(!0)), e === "hex8" && (r = this.toHex8String()), e === "name" && (r = this.toName()), e === "hsl" && (r = this.toHslString()), e === "hsv" && (r = this.toHsvString()), r || this.toHexString());
    }, t.prototype.toNumber = function() {
      return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
    }, t.prototype.clone = function() {
      return new t(this.toString());
    }, t.prototype.lighten = function(e) {
      e === void 0 && (e = 10);
      var n = this.toHsl();
      return n.l += e / 100, n.l = zO(n.l), new t(n);
    }, t.prototype.brighten = function(e) {
      e === void 0 && (e = 10);
      var n = this.toRgb();
      return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(e / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(e / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(e / 100)))), new t(n);
    }, t.prototype.darken = function(e) {
      e === void 0 && (e = 10);
      var n = this.toHsl();
      return n.l -= e / 100, n.l = zO(n.l), new t(n);
    }, t.prototype.tint = function(e) {
      return e === void 0 && (e = 10), this.mix("white", e);
    }, t.prototype.shade = function(e) {
      return e === void 0 && (e = 10), this.mix("black", e);
    }, t.prototype.desaturate = function(e) {
      e === void 0 && (e = 10);
      var n = this.toHsl();
      return n.s -= e / 100, n.s = zO(n.s), new t(n);
    }, t.prototype.saturate = function(e) {
      e === void 0 && (e = 10);
      var n = this.toHsl();
      return n.s += e / 100, n.s = zO(n.s), new t(n);
    }, t.prototype.greyscale = function() {
      return this.desaturate(100);
    }, t.prototype.spin = function(e) {
      var n = this.toHsl(), r = (n.h + e) % 360;
      return n.h = r < 0 ? 360 + r : r, new t(n);
    }, t.prototype.mix = function(e, n) {
      n === void 0 && (n = 50);
      var r = this.toRgb(), i = new t(e).toRgb(), a = n / 100, o = {
        r: (i.r - r.r) * a + r.r,
        g: (i.g - r.g) * a + r.g,
        b: (i.b - r.b) * a + r.b,
        a: (i.a - r.a) * a + r.a
      };
      return new t(o);
    }, t.prototype.analogous = function(e, n) {
      e === void 0 && (e = 6), n === void 0 && (n = 30);
      var r = this.toHsl(), i = 360 / n, a = [this];
      for (r.h = (r.h - (i * e >> 1) + 720) % 360; --e; )
        r.h = (r.h + i) % 360, a.push(new t(r));
      return a;
    }, t.prototype.complement = function() {
      var e = this.toHsl();
      return e.h = (e.h + 180) % 360, new t(e);
    }, t.prototype.monochromatic = function(e) {
      e === void 0 && (e = 6);
      for (var n = this.toHsv(), r = n.h, i = n.s, a = n.v, o = [], s = 1 / e; e--; )
        o.push(new t({ h: r, s: i, v: a })), a = (a + s) % 1;
      return o;
    }, t.prototype.splitcomplement = function() {
      var e = this.toHsl(), n = e.h;
      return [
        this,
        new t({ h: (n + 72) % 360, s: e.s, l: e.l }),
        new t({ h: (n + 216) % 360, s: e.s, l: e.l })
      ];
    }, t.prototype.onBackground = function(e) {
      var n = this.toRgb(), r = new t(e).toRgb(), i = n.a + r.a * (1 - n.a);
      return new t({
        r: (n.r * n.a + r.r * r.a * (1 - n.a)) / i,
        g: (n.g * n.a + r.g * r.a * (1 - n.a)) / i,
        b: (n.b * n.a + r.b * r.a * (1 - n.a)) / i,
        a: i
      });
    }, t.prototype.triad = function() {
      return this.polyad(3);
    }, t.prototype.tetrad = function() {
      return this.polyad(4);
    }, t.prototype.polyad = function(e) {
      for (var n = this.toHsl(), r = n.h, i = [this], a = 360 / e, o = 1; o < e; o++)
        i.push(new t({ h: (r + o * a) % 360, s: n.s, l: n.l }));
      return i;
    }, t.prototype.equals = function(e) {
      return this.toRgbString() === new t(e).toRgbString();
    }, t;
  }()
);
function mc(t, e = 20) {
  return t.mix("#141414", e).toString();
}
function TIe(t) {
  const e = um(), n = $n("button");
  return V(() => {
    let r = {}, i = t.color;
    if (i) {
      const a = i.match(/var\((.*?)\)/);
      a && (i = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
      const o = new Hn(i), s = t.dark ? o.tint(20).toString() : mc(o, 20);
      if (t.plain)
        r = n.cssVarBlock({
          "bg-color": t.dark ? mc(o, 90) : o.tint(90).toString(),
          "text-color": i,
          "border-color": t.dark ? mc(o, 50) : o.tint(50).toString(),
          "hover-text-color": `var(${n.cssVarName("color-white")})`,
          "hover-bg-color": i,
          "hover-border-color": i,
          "active-bg-color": s,
          "active-text-color": `var(${n.cssVarName("color-white")})`,
          "active-border-color": s
        }), e.value && (r[n.cssVarBlockName("disabled-bg-color")] = t.dark ? mc(o, 90) : o.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = t.dark ? mc(o, 50) : o.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = t.dark ? mc(o, 80) : o.tint(80).toString());
      else {
        const l = t.dark ? mc(o, 30) : o.tint(30).toString(), u = o.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
        if (r = n.cssVarBlock({
          "bg-color": i,
          "text-color": u,
          "border-color": i,
          "hover-bg-color": l,
          "hover-text-color": u,
          "hover-border-color": l,
          "active-bg-color": s,
          "active-border-color": s
        }), e.value) {
          const c = t.dark ? mc(o, 50) : o.tint(50).toString();
          r[n.cssVarBlockName("disabled-bg-color")] = c, r[n.cssVarBlockName("disabled-text-color")] = t.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, r[n.cssVarBlockName("disabled-border-color")] = c;
        }
      }
    }
    return r;
  });
}
const PIe = ae({
  name: "ElButton"
}), $Ie = /* @__PURE__ */ ae({
  ...PIe,
  props: nR,
  emits: pIe,
  setup(t, { expose: e, emit: n }) {
    const r = t, i = TIe(r), a = $n("button"), { _ref: o, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: f, handleClick: d } = fIe(r, n), h = V(() => [
      a.b(),
      a.m(l.value),
      a.m(s.value),
      a.is("disabled", u.value),
      a.is("loading", r.loading),
      a.is("plain", r.plain),
      a.is("round", r.round),
      a.is("circle", r.circle),
      a.is("text", r.text),
      a.is("link", r.link),
      a.is("has-bg", r.bg)
    ]);
    return e({
      ref: o,
      size: s,
      type: l,
      disabled: u,
      shouldAddSpace: f
    }), (p, v) => (be(), Je(As(p.tag), Xn({
      ref_key: "_ref",
      ref: o
    }, z(c), {
      class: z(h),
      style: z(i),
      onClick: z(d)
    }), {
      default: ke(() => [
        p.loading ? (be(), Ue(Wt, { key: 0 }, [
          p.$slots.loading ? dn(p.$slots, "loading", { key: 0 }) : (be(), Je(z($s), {
            key: 1,
            class: Ge(z(a).is("loading"))
          }, {
            default: ke(() => [
              (be(), Je(As(p.loadingIcon)))
            ]),
            _: 1
          }, 8, ["class"]))
        ], 64)) : p.icon || p.$slots.icon ? (be(), Je(z($s), { key: 1 }, {
          default: ke(() => [
            p.icon ? (be(), Je(As(p.icon), { key: 0 })) : dn(p.$slots, "icon", { key: 1 })
          ]),
          _: 3
        })) : Ot("v-if", !0),
        p.$slots.default ? (be(), Ue("span", {
          key: 2,
          class: Ge({ [z(a).em("text", "expand")]: z(f) })
        }, [
          dn(p.$slots, "default")
        ], 2)) : Ot("v-if", !0)
      ]),
      _: 3
    }, 16, ["class", "style", "onClick"]));
  }
});
var AIe = /* @__PURE__ */ Nn($Ie, [["__file", "button.vue"]]);
const EIe = {
  size: nR.size,
  type: nR.type
}, MIe = ae({
  name: "ElButtonGroup"
}), IIe = /* @__PURE__ */ ae({
  ...MIe,
  props: EIe,
  setup(t) {
    const e = t;
    Et(ine, zn({
      size: Lr(e, "size"),
      type: Lr(e, "type")
    }));
    const n = $n("button");
    return (r, i) => (be(), Ue("div", {
      class: Ge(`${z(n).b("group")}`)
    }, [
      dn(r.$slots, "default")
    ], 2));
  }
});
var one = /* @__PURE__ */ Nn(IIe, [["__file", "button-group.vue"]]);
const oR = ec(AIe, {
  ButtonGroup: one
});
V_(one);
var Su = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function g2(t) {
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
}
const $c = /* @__PURE__ */ new Map();
let kW;
Fr && (document.addEventListener("mousedown", (t) => kW = t), document.addEventListener("mouseup", (t) => {
  for (const e of $c.values())
    for (const { documentHandler: n } of e)
      n(t, kW);
}));
function LW(t, e) {
  let n = [];
  return Array.isArray(e.arg) ? n = e.arg : Ob(e.arg) && n.push(e.arg), function(r, i) {
    const a = e.instance.popperRef, o = r.target, s = i == null ? void 0 : i.target, l = !e || !e.instance, u = !o || !s, c = t.contains(o) || t.contains(s), f = t === o, d = n.length && n.some((p) => p == null ? void 0 : p.contains(o)) || n.length && n.includes(s), h = a && (a.contains(o) || a.contains(s));
    l || u || c || f || d || h || e.value(r, i);
  };
}
const DIe = {
  beforeMount(t, e) {
    $c.has(t) || $c.set(t, []), $c.get(t).push({
      documentHandler: LW(t, e),
      bindingFn: e.value
    });
  },
  updated(t, e) {
    $c.has(t) || $c.set(t, []);
    const n = $c.get(t), r = n.findIndex((a) => a.bindingFn === e.oldValue), i = {
      documentHandler: LW(t, e),
      bindingFn: e.value
    };
    r >= 0 ? n.splice(r, 1, i) : n.push(i);
  },
  unmounted(t) {
    $c.delete(t);
  }
}, sne = {
  modelValue: {
    type: [Number, String, Boolean],
    default: void 0
  },
  label: {
    type: [String, Boolean, Number, Object],
    default: void 0
  },
  value: {
    type: [String, Boolean, Number, Object],
    default: void 0
  },
  indeterminate: Boolean,
  disabled: Boolean,
  checked: Boolean,
  name: {
    type: String,
    default: void 0
  },
  trueValue: {
    type: [String, Number],
    default: void 0
  },
  falseValue: {
    type: [String, Number],
    default: void 0
  },
  trueLabel: {
    type: [String, Number],
    default: void 0
  },
  falseLabel: {
    type: [String, Number],
    default: void 0
  },
  id: {
    type: String,
    default: void 0
  },
  controls: {
    type: String,
    default: void 0
  },
  border: Boolean,
  size: op,
  tabindex: [String, Number],
  validateEvent: {
    type: Boolean,
    default: !0
  },
  ...sp(["ariaControls"])
}, lne = {
  [ca]: (t) => ia(t) || Ws(t) || hf(t),
  change: (t) => ia(t) || Ws(t) || hf(t)
}, cm = Symbol("checkboxGroupContextKey"), RIe = ({
  model: t,
  isChecked: e
}) => {
  const n = et(cm, void 0), r = V(() => {
    var a, o;
    const s = (a = n == null ? void 0 : n.max) == null ? void 0 : a.value, l = (o = n == null ? void 0 : n.min) == null ? void 0 : o.value;
    return !Qw(s) && t.value.length >= s && !e.value || !Qw(l) && t.value.length <= l && e.value;
  });
  return {
    isDisabled: um(V(() => (n == null ? void 0 : n.disabled.value) || r.value)),
    isLimitDisabled: r
  };
}, kIe = (t, {
  model: e,
  isLimitExceeded: n,
  hasOwnLabel: r,
  isDisabled: i,
  isLabeledByFormItem: a
}) => {
  const o = et(cm, void 0), { formItem: s } = lp(), { emit: l } = In();
  function u(p) {
    var v, g, m, y;
    return [!0, t.trueValue, t.trueLabel].includes(p) ? (g = (v = t.trueValue) != null ? v : t.trueLabel) != null ? g : !0 : (y = (m = t.falseValue) != null ? m : t.falseLabel) != null ? y : !1;
  }
  function c(p, v) {
    l("change", u(p), v);
  }
  function f(p) {
    if (n.value)
      return;
    const v = p.target;
    l("change", u(v.checked), p);
  }
  async function d(p) {
    n.value || !r.value && !i.value && a.value && (p.composedPath().some((m) => m.tagName === "LABEL") || (e.value = u([!1, t.falseValue, t.falseLabel].includes(e.value)), await Bt(), c(e.value, p)));
  }
  const h = V(() => (o == null ? void 0 : o.validateEvent) || t.validateEvent);
  return me(() => t.modelValue, () => {
    h.value && (s == null || s.validate("change").catch((p) => Vi(p)));
  }), {
    handleChange: f,
    onClickRoot: d
  };
}, LIe = (t) => {
  const e = ee(!1), { emit: n } = In(), r = et(cm, void 0), i = V(() => Qw(r) === !1), a = ee(!1), o = V({
    get() {
      var s, l;
      return i.value ? (s = r == null ? void 0 : r.modelValue) == null ? void 0 : s.value : (l = t.modelValue) != null ? l : e.value;
    },
    set(s) {
      var l, u;
      i.value && dg(s) ? (a.value = ((l = r == null ? void 0 : r.max) == null ? void 0 : l.value) !== void 0 && s.length > (r == null ? void 0 : r.max.value) && s.length > o.value.length, a.value === !1 && ((u = r == null ? void 0 : r.changeEvent) == null || u.call(r, s))) : (n(ca, s), e.value = s);
    }
  });
  return {
    model: o,
    isGroup: i,
    isLimitExceeded: a
  };
}, NIe = (t, e, { model: n }) => {
  const r = et(cm, void 0), i = ee(!1), a = V(() => yg(t.value) ? t.label : t.value), o = V(() => {
    const c = n.value;
    return hf(c) ? c : dg(c) ? Rh(a.value) ? c.map(es).some((f) => z_(f, a.value)) : c.map(es).includes(a.value) : c != null ? c === t.trueValue || c === t.trueLabel : !!c;
  }), s = Tg(V(() => {
    var c;
    return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value;
  }), {
    prop: !0
  }), l = Tg(V(() => {
    var c;
    return (c = r == null ? void 0 : r.size) == null ? void 0 : c.value;
  })), u = V(() => !!e.default || !yg(a.value));
  return {
    checkboxButtonSize: s,
    isChecked: o,
    isFocused: i,
    checkboxSize: l,
    hasOwnLabel: u,
    actualValue: a
  };
}, une = (t, e) => {
  const { formItem: n } = lp(), { model: r, isGroup: i, isLimitExceeded: a } = LIe(t), {
    isFocused: o,
    isChecked: s,
    checkboxButtonSize: l,
    checkboxSize: u,
    hasOwnLabel: c,
    actualValue: f
  } = NIe(t, e, { model: r }), { isDisabled: d } = RIe({ model: r, isChecked: s }), { inputId: h, isLabeledByFormItem: p } = Q_(t, {
    formItemContext: n,
    disableIdGeneration: c,
    disableIdManagement: i
  }), { handleChange: v, onClickRoot: g } = kIe(t, {
    model: r,
    isLimitExceeded: a,
    hasOwnLabel: c,
    isDisabled: d,
    isLabeledByFormItem: p
  });
  return (() => {
    function y() {
      var _, O;
      dg(r.value) && !r.value.includes(f.value) ? r.value.push(f.value) : r.value = (O = (_ = t.trueValue) != null ? _ : t.trueLabel) != null ? O : !0;
    }
    t.checked && y();
  })(), Es({
    from: "controls",
    replacement: "aria-controls",
    version: "2.8.0",
    scope: "el-checkbox",
    ref: "https://element-plus.org/en-US/component/checkbox.html"
  }, V(() => !!t.controls)), Es({
    from: "label act as value",
    replacement: "value",
    version: "3.0.0",
    scope: "el-checkbox",
    ref: "https://element-plus.org/en-US/component/checkbox.html"
  }, V(() => i.value && yg(t.value))), Es({
    from: "true-label",
    replacement: "true-value",
    version: "3.0.0",
    scope: "el-checkbox",
    ref: "https://element-plus.org/en-US/component/checkbox.html"
  }, V(() => !!t.trueLabel)), Es({
    from: "false-label",
    replacement: "false-value",
    version: "3.0.0",
    scope: "el-checkbox",
    ref: "https://element-plus.org/en-US/component/checkbox.html"
  }, V(() => !!t.falseLabel)), {
    inputId: h,
    isLabeledByFormItem: p,
    isChecked: s,
    isDisabled: d,
    isFocused: o,
    checkboxButtonSize: l,
    checkboxSize: u,
    hasOwnLabel: c,
    model: r,
    actualValue: f,
    handleChange: v,
    onClickRoot: g
  };
}, BIe = ["id", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value"], zIe = ["id", "indeterminate", "disabled", "value", "name", "tabindex"], VIe = ae({
  name: "ElCheckbox"
}), FIe = /* @__PURE__ */ ae({
  ...VIe,
  props: sne,
  emits: lne,
  setup(t) {
    const e = t, n = D_(), {
      inputId: r,
      isLabeledByFormItem: i,
      isChecked: a,
      isDisabled: o,
      isFocused: s,
      checkboxSize: l,
      hasOwnLabel: u,
      model: c,
      actualValue: f,
      handleChange: d,
      onClickRoot: h
    } = une(e, n), p = $n("checkbox"), v = V(() => [
      p.b(),
      p.m(l.value),
      p.is("disabled", o.value),
      p.is("bordered", e.border),
      p.is("checked", a.value)
    ]), g = V(() => [
      p.e("input"),
      p.is("disabled", o.value),
      p.is("checked", a.value),
      p.is("indeterminate", e.indeterminate),
      p.is("focus", s.value)
    ]);
    return (m, y) => (be(), Je(As(!z(u) && z(i) ? "span" : "label"), {
      class: Ge(z(v)),
      "aria-controls": m.indeterminate ? m.controls || m.ariaControls : null,
      onClick: z(h)
    }, {
      default: ke(() => {
        var _, O;
        return [
          tt("span", {
            class: Ge(z(g))
          }, [
            m.trueValue || m.falseValue || m.trueLabel || m.falseLabel ? _r((be(), Ue("input", {
              key: 0,
              id: z(r),
              "onUpdate:modelValue": y[0] || (y[0] = (S) => Vs(c) ? c.value = S : null),
              class: Ge(z(p).e("original")),
              type: "checkbox",
              indeterminate: m.indeterminate,
              name: m.name,
              tabindex: m.tabindex,
              disabled: z(o),
              "true-value": (_ = m.trueValue) != null ? _ : m.trueLabel,
              "false-value": (O = m.falseValue) != null ? O : m.falseLabel,
              onChange: y[1] || (y[1] = (...S) => z(d) && z(d)(...S)),
              onFocus: y[2] || (y[2] = (S) => s.value = !0),
              onBlur: y[3] || (y[3] = (S) => s.value = !1),
              onClick: y[4] || (y[4] = ai(() => {
              }, ["stop"]))
            }, null, 42, BIe)), [
              [Bw, z(c)]
            ]) : _r((be(), Ue("input", {
              key: 1,
              id: z(r),
              "onUpdate:modelValue": y[5] || (y[5] = (S) => Vs(c) ? c.value = S : null),
              class: Ge(z(p).e("original")),
              type: "checkbox",
              indeterminate: m.indeterminate,
              disabled: z(o),
              value: z(f),
              name: m.name,
              tabindex: m.tabindex,
              onChange: y[6] || (y[6] = (...S) => z(d) && z(d)(...S)),
              onFocus: y[7] || (y[7] = (S) => s.value = !0),
              onBlur: y[8] || (y[8] = (S) => s.value = !1),
              onClick: y[9] || (y[9] = ai(() => {
              }, ["stop"]))
            }, null, 42, zIe)), [
              [Bw, z(c)]
            ]),
            tt("span", {
              class: Ge(z(p).e("inner"))
            }, null, 2)
          ], 2),
          z(u) ? (be(), Ue("span", {
            key: 0,
            class: Ge(z(p).e("label"))
          }, [
            dn(m.$slots, "default"),
            m.$slots.default ? Ot("v-if", !0) : (be(), Ue(Wt, { key: 0 }, [
              Pn(xi(m.label), 1)
            ], 64))
          ], 2)) : Ot("v-if", !0)
        ];
      }),
      _: 3
    }, 8, ["class", "aria-controls", "onClick"]));
  }
});
var WIe = /* @__PURE__ */ Nn(FIe, [["__file", "checkbox.vue"]]);
const QIe = ["name", "tabindex", "disabled", "true-value", "false-value"], HIe = ["name", "tabindex", "disabled", "value"], GIe = ae({
  name: "ElCheckboxButton"
}), jIe = /* @__PURE__ */ ae({
  ...GIe,
  props: sne,
  emits: lne,
  setup(t) {
    const e = t, n = D_(), {
      isFocused: r,
      isChecked: i,
      isDisabled: a,
      checkboxButtonSize: o,
      model: s,
      actualValue: l,
      handleChange: u
    } = une(e, n), c = et(cm, void 0), f = $n("checkbox"), d = V(() => {
      var p, v, g, m;
      const y = (v = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? v : "";
      return {
        backgroundColor: y,
        borderColor: y,
        color: (m = (g = c == null ? void 0 : c.textColor) == null ? void 0 : g.value) != null ? m : "",
        boxShadow: y ? `-1px 0 0 0 ${y}` : void 0
      };
    }), h = V(() => [
      f.b("button"),
      f.bm("button", o.value),
      f.is("disabled", a.value),
      f.is("checked", i.value),
      f.is("focus", r.value)
    ]);
    return (p, v) => {
      var g, m;
      return be(), Ue("label", {
        class: Ge(z(h))
      }, [
        p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? _r((be(), Ue("input", {
          key: 0,
          "onUpdate:modelValue": v[0] || (v[0] = (y) => Vs(s) ? s.value = y : null),
          class: Ge(z(f).be("button", "original")),
          type: "checkbox",
          name: p.name,
          tabindex: p.tabindex,
          disabled: z(a),
          "true-value": (g = p.trueValue) != null ? g : p.trueLabel,
          "false-value": (m = p.falseValue) != null ? m : p.falseLabel,
          onChange: v[1] || (v[1] = (...y) => z(u) && z(u)(...y)),
          onFocus: v[2] || (v[2] = (y) => r.value = !0),
          onBlur: v[3] || (v[3] = (y) => r.value = !1),
          onClick: v[4] || (v[4] = ai(() => {
          }, ["stop"]))
        }, null, 42, QIe)), [
          [Bw, z(s)]
        ]) : _r((be(), Ue("input", {
          key: 1,
          "onUpdate:modelValue": v[5] || (v[5] = (y) => Vs(s) ? s.value = y : null),
          class: Ge(z(f).be("button", "original")),
          type: "checkbox",
          name: p.name,
          tabindex: p.tabindex,
          disabled: z(a),
          value: z(l),
          onChange: v[6] || (v[6] = (...y) => z(u) && z(u)(...y)),
          onFocus: v[7] || (v[7] = (y) => r.value = !0),
          onBlur: v[8] || (v[8] = (y) => r.value = !1),
          onClick: v[9] || (v[9] = ai(() => {
          }, ["stop"]))
        }, null, 42, HIe)), [
          [Bw, z(s)]
        ]),
        p.$slots.default || p.label ? (be(), Ue("span", {
          key: 2,
          class: Ge(z(f).be("button", "inner")),
          style: dr(z(i) ? z(d) : void 0)
        }, [
          dn(p.$slots, "default", {}, () => [
            Pn(xi(p.label), 1)
          ])
        ], 6)) : Ot("v-if", !0)
      ], 2);
    };
  }
});
var cne = /* @__PURE__ */ Nn(jIe, [["__file", "checkbox-button.vue"]]);
const ZIe = hr({
  modelValue: {
    type: mn(Array),
    default: () => []
  },
  disabled: Boolean,
  min: Number,
  max: Number,
  size: op,
  label: String,
  fill: String,
  textColor: String,
  tag: {
    type: String,
    default: "div"
  },
  validateEvent: {
    type: Boolean,
    default: !0
  },
  ...sp(["ariaLabel"])
}), UIe = {
  [ca]: (t) => dg(t),
  change: (t) => dg(t)
}, XIe = ae({
  name: "ElCheckboxGroup"
}), YIe = /* @__PURE__ */ ae({
  ...XIe,
  props: ZIe,
  emits: UIe,
  setup(t, { emit: e }) {
    const n = t, r = $n("checkbox"), { formItem: i } = lp(), { inputId: a, isLabeledByFormItem: o } = Q_(n, {
      formItemContext: i
    }), s = async (u) => {
      e(ca, u), await Bt(), e("change", u);
    }, l = V({
      get() {
        return n.modelValue;
      },
      set(u) {
        s(u);
      }
    });
    return Et(cm, {
      ...mg(k_(n), [
        "size",
        "min",
        "max",
        "disabled",
        "validateEvent",
        "fill",
        "textColor"
      ]),
      modelValue: l,
      changeEvent: s
    }), Es({
      from: "label",
      replacement: "aria-label",
      version: "2.8.0",
      scope: "el-checkbox-group",
      ref: "https://element-plus.org/en-US/component/checkbox.html"
    }, V(() => !!n.label)), me(() => n.modelValue, () => {
      n.validateEvent && (i == null || i.validate("change").catch((u) => Vi(u)));
    }), (u, c) => {
      var f;
      return be(), Je(As(u.tag), {
        id: z(a),
        class: Ge(z(r).b("group")),
        role: "group",
        "aria-label": z(o) ? void 0 : u.label || u.ariaLabel || "checkbox-group",
        "aria-labelledby": z(o) ? (f = z(i)) == null ? void 0 : f.labelId : void 0
      }, {
        default: ke(() => [
          dn(u.$slots, "default")
        ]),
        _: 3
      }, 8, ["id", "class", "aria-label", "aria-labelledby"]);
    };
  }
});
var fne = /* @__PURE__ */ Nn(YIe, [["__file", "checkbox-group.vue"]]);
const qIe = ec(WIe, {
  CheckboxButton: cne,
  CheckboxGroup: fne
});
V_(cne);
V_(fne);
const dne = hr({
  modelValue: {
    type: [String, Number, Boolean],
    default: void 0
  },
  size: op,
  disabled: Boolean,
  label: {
    type: [String, Number, Boolean],
    default: void 0
  },
  value: {
    type: [String, Number, Boolean],
    default: void 0
  },
  name: {
    type: String,
    default: void 0
  }
}), KIe = hr({
  ...dne,
  border: Boolean
}), hne = {
  [ca]: (t) => ia(t) || Ws(t) || hf(t),
  [Cte]: (t) => ia(t) || Ws(t) || hf(t)
}, pne = Symbol("radioGroupKey"), vne = (t, e) => {
  const n = ee(), r = et(pne, void 0), i = V(() => !!r), a = V(() => yg(t.value) ? t.label : t.value), o = V({
    get() {
      return i.value ? r.modelValue : t.modelValue;
    },
    set(f) {
      i.value ? r.changeEvent(f) : e && e(ca, f), n.value.checked = t.modelValue === a.value;
    }
  }), s = Tg(V(() => r == null ? void 0 : r.size)), l = um(V(() => r == null ? void 0 : r.disabled)), u = ee(!1), c = V(() => l.value || i.value && o.value !== a.value ? -1 : 0);
  return Es({
    from: "label act as value",
    replacement: "value",
    version: "3.0.0",
    scope: "el-radio",
    ref: "https://element-plus.org/en-US/component/radio.html"
  }, V(() => i.value && yg(t.value))), {
    radioRef: n,
    isGroup: i,
    radioGroup: r,
    focus: u,
    size: s,
    disabled: l,
    tabIndex: c,
    modelValue: o,
    actualValue: a
  };
}, JIe = ["value", "name", "disabled"], eDe = ae({
  name: "ElRadio"
}), tDe = /* @__PURE__ */ ae({
  ...eDe,
  props: KIe,
  emits: hne,
  setup(t, { emit: e }) {
    const n = t, r = $n("radio"), { radioRef: i, radioGroup: a, focus: o, size: s, disabled: l, modelValue: u, actualValue: c } = vne(n, e);
    function f() {
      Bt(() => e("change", u.value));
    }
    return (d, h) => {
      var p;
      return be(), Ue("label", {
        class: Ge([
          z(r).b(),
          z(r).is("disabled", z(l)),
          z(r).is("focus", z(o)),
          z(r).is("bordered", d.border),
          z(r).is("checked", z(u) === z(c)),
          z(r).m(z(s))
        ])
      }, [
        tt("span", {
          class: Ge([
            z(r).e("input"),
            z(r).is("disabled", z(l)),
            z(r).is("checked", z(u) === z(c))
          ])
        }, [
          _r(tt("input", {
            ref_key: "radioRef",
            ref: i,
            "onUpdate:modelValue": h[0] || (h[0] = (v) => Vs(u) ? u.value = v : null),
            class: Ge(z(r).e("original")),
            value: z(c),
            name: d.name || ((p = z(a)) == null ? void 0 : p.name),
            disabled: z(l),
            type: "radio",
            onFocus: h[1] || (h[1] = (v) => o.value = !0),
            onBlur: h[2] || (h[2] = (v) => o.value = !1),
            onChange: f,
            onClick: h[3] || (h[3] = ai(() => {
            }, ["stop"]))
          }, null, 42, JIe), [
            [Eee, z(u)]
          ]),
          tt("span", {
            class: Ge(z(r).e("inner"))
          }, null, 2)
        ], 2),
        tt("span", {
          class: Ge(z(r).e("label")),
          onKeydown: h[4] || (h[4] = ai(() => {
          }, ["stop"]))
        }, [
          dn(d.$slots, "default", {}, () => [
            Pn(xi(d.label), 1)
          ])
        ], 34)
      ], 2);
    };
  }
});
var nDe = /* @__PURE__ */ Nn(tDe, [["__file", "radio.vue"]]);
const rDe = hr({
  ...dne
}), iDe = ["value", "name", "disabled"], aDe = ae({
  name: "ElRadioButton"
}), oDe = /* @__PURE__ */ ae({
  ...aDe,
  props: rDe,
  setup(t) {
    const e = t, n = $n("radio"), { radioRef: r, focus: i, size: a, disabled: o, modelValue: s, radioGroup: l, actualValue: u } = vne(e), c = V(() => ({
      backgroundColor: (l == null ? void 0 : l.fill) || "",
      borderColor: (l == null ? void 0 : l.fill) || "",
      boxShadow: l != null && l.fill ? `-1px 0 0 0 ${l.fill}` : "",
      color: (l == null ? void 0 : l.textColor) || ""
    }));
    return (f, d) => {
      var h;
      return be(), Ue("label", {
        class: Ge([
          z(n).b("button"),
          z(n).is("active", z(s) === z(u)),
          z(n).is("disabled", z(o)),
          z(n).is("focus", z(i)),
          z(n).bm("button", z(a))
        ])
      }, [
        _r(tt("input", {
          ref_key: "radioRef",
          ref: r,
          "onUpdate:modelValue": d[0] || (d[0] = (p) => Vs(s) ? s.value = p : null),
          class: Ge(z(n).be("button", "original-radio")),
          value: z(u),
          type: "radio",
          name: f.name || ((h = z(l)) == null ? void 0 : h.name),
          disabled: z(o),
          onFocus: d[1] || (d[1] = (p) => i.value = !0),
          onBlur: d[2] || (d[2] = (p) => i.value = !1),
          onClick: d[3] || (d[3] = ai(() => {
          }, ["stop"]))
        }, null, 42, iDe), [
          [Eee, z(s)]
        ]),
        tt("span", {
          class: Ge(z(n).be("button", "inner")),
          style: dr(z(s) === z(u) ? z(c) : {}),
          onKeydown: d[4] || (d[4] = ai(() => {
          }, ["stop"]))
        }, [
          dn(f.$slots, "default", {}, () => [
            Pn(xi(f.label), 1)
          ])
        ], 38)
      ], 2);
    };
  }
});
var gne = /* @__PURE__ */ Nn(oDe, [["__file", "radio-button.vue"]]);
const sDe = hr({
  id: {
    type: String,
    default: void 0
  },
  size: op,
  disabled: Boolean,
  modelValue: {
    type: [String, Number, Boolean],
    default: void 0
  },
  fill: {
    type: String,
    default: ""
  },
  label: {
    type: String,
    default: void 0
  },
  textColor: {
    type: String,
    default: ""
  },
  name: {
    type: String,
    default: void 0
  },
  validateEvent: {
    type: Boolean,
    default: !0
  },
  ...sp(["ariaLabel"])
}), lDe = hne, uDe = ["id", "aria-label", "aria-labelledby"], cDe = ae({
  name: "ElRadioGroup"
}), fDe = /* @__PURE__ */ ae({
  ...cDe,
  props: sDe,
  emits: lDe,
  setup(t, { emit: e }) {
    const n = t, r = $n("radio"), i = wb(), a = ee(), { formItem: o } = lp(), { inputId: s, isLabeledByFormItem: l } = Q_(n, {
      formItemContext: o
    }), u = (f) => {
      e(ca, f), Bt(() => e("change", f));
    };
    _t(() => {
      const f = a.value.querySelectorAll("[type=radio]"), d = f[0];
      !Array.from(f).some((h) => h.checked) && d && (d.tabIndex = 0);
    });
    const c = V(() => n.name || i.value);
    return Et(pne, zn({
      ...k_(n),
      changeEvent: u,
      name: c
    })), me(() => n.modelValue, () => {
      n.validateEvent && (o == null || o.validate("change").catch((f) => Vi(f)));
    }), Es({
      from: "label",
      replacement: "aria-label",
      version: "2.8.0",
      scope: "el-radio-group",
      ref: "https://element-plus.org/en-US/component/radio.html"
    }, V(() => !!n.label)), (f, d) => (be(), Ue("div", {
      id: z(s),
      ref_key: "radioGroupRef",
      ref: a,
      class: Ge(z(r).b("group")),
      role: "radiogroup",
      "aria-label": z(l) ? void 0 : f.label || f.ariaLabel || "radio-group",
      "aria-labelledby": z(l) ? z(o).labelId : void 0
    }, [
      dn(f.$slots, "default")
    ], 10, uDe));
  }
});
var mne = /* @__PURE__ */ Nn(fDe, [["__file", "radio-group.vue"]]);
ec(nDe, {
  RadioButton: gne,
  RadioGroup: mne
});
const yne = V_(mne), By = V_(gne), dDe = ae({
  name: "ElCollapseTransition"
}), hDe = /* @__PURE__ */ ae({
  ...dDe,
  setup(t) {
    const e = $n("collapse-transition"), n = (i) => {
      i.style.maxHeight = "", i.style.overflow = i.dataset.oldOverflow, i.style.paddingTop = i.dataset.oldPaddingTop, i.style.paddingBottom = i.dataset.oldPaddingBottom;
    }, r = {
      beforeEnter(i) {
        i.dataset || (i.dataset = {}), i.dataset.oldPaddingTop = i.style.paddingTop, i.dataset.oldPaddingBottom = i.style.paddingBottom, i.style.height && (i.dataset.elExistsHeight = i.style.height), i.style.maxHeight = 0, i.style.paddingTop = 0, i.style.paddingBottom = 0;
      },
      enter(i) {
        requestAnimationFrame(() => {
          i.dataset.oldOverflow = i.style.overflow, i.dataset.elExistsHeight ? i.style.maxHeight = i.dataset.elExistsHeight : i.scrollHeight !== 0 ? i.style.maxHeight = `${i.scrollHeight}px` : i.style.maxHeight = 0, i.style.paddingTop = i.dataset.oldPaddingTop, i.style.paddingBottom = i.dataset.oldPaddingBottom, i.style.overflow = "hidden";
        });
      },
      afterEnter(i) {
        i.style.maxHeight = "", i.style.overflow = i.dataset.oldOverflow;
      },
      enterCancelled(i) {
        n(i);
      },
      beforeLeave(i) {
        i.dataset || (i.dataset = {}), i.dataset.oldPaddingTop = i.style.paddingTop, i.dataset.oldPaddingBottom = i.style.paddingBottom, i.dataset.oldOverflow = i.style.overflow, i.style.maxHeight = `${i.scrollHeight}px`, i.style.overflow = "hidden";
      },
      leave(i) {
        i.scrollHeight !== 0 && (i.style.maxHeight = 0, i.style.paddingTop = 0, i.style.paddingBottom = 0);
      },
      afterLeave(i) {
        n(i);
      },
      leaveCancelled(i) {
        n(i);
      }
    };
    return (i, a) => (be(), Je(mo, Xn({
      name: z(e).b()
    }, uxe(r)), {
      default: ke(() => [
        dn(i.$slots, "default")
      ]),
      _: 3
    }, 16, ["name"]));
  }
});
var Fx = /* @__PURE__ */ Nn(hDe, [["__file", "collapse-transition.vue"]]);
Fx.install = (t) => {
  t.component(Fx.name, Fx);
};
const pDe = Fx, vDe = hr({
  color: {
    type: mn(Object),
    required: !0
  },
  vertical: {
    type: Boolean,
    default: !1
  }
});
let jA = !1;
function Pb(t, e) {
  if (!Fr)
    return;
  const n = function(a) {
    var o;
    (o = e.drag) == null || o.call(e, a);
  }, r = function(a) {
    var o;
    document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), document.onselectstart = null, document.ondragstart = null, jA = !1, (o = e.end) == null || o.call(e, a);
  }, i = function(a) {
    var o;
    jA || (a.preventDefault(), document.onselectstart = () => !1, document.ondragstart = () => !1, document.addEventListener("mousemove", n), document.addEventListener("mouseup", r), document.addEventListener("touchmove", n), document.addEventListener("touchend", r), jA = !0, (o = e.start) == null || o.call(e, a));
  };
  t.addEventListener("mousedown", i), t.addEventListener("touchstart", i);
}
const gDe = (t) => {
  const e = In(), n = ve(), r = ve();
  function i(o) {
    o.target !== n.value && a(o);
  }
  function a(o) {
    if (!r.value || !n.value)
      return;
    const l = e.vnode.el.getBoundingClientRect(), { clientX: u, clientY: c } = K4(o);
    if (t.vertical) {
      let f = c - l.top;
      f = Math.max(n.value.offsetHeight / 2, f), f = Math.min(f, l.height - n.value.offsetHeight / 2), t.color.set("alpha", Math.round((f - n.value.offsetHeight / 2) / (l.height - n.value.offsetHeight) * 100));
    } else {
      let f = u - l.left;
      f = Math.max(n.value.offsetWidth / 2, f), f = Math.min(f, l.width - n.value.offsetWidth / 2), t.color.set("alpha", Math.round((f - n.value.offsetWidth / 2) / (l.width - n.value.offsetWidth) * 100));
    }
  }
  return {
    thumb: n,
    bar: r,
    handleDrag: a,
    handleClick: i
  };
}, mDe = (t, {
  bar: e,
  thumb: n,
  handleDrag: r
}) => {
  const i = In(), a = $n("color-alpha-slider"), o = ee(0), s = ee(0), l = ee();
  function u() {
    if (!n.value || t.vertical)
      return 0;
    const y = i.vnode.el, _ = t.color.get("alpha");
    return y ? Math.round(_ * (y.offsetWidth - n.value.offsetWidth / 2) / 100) : 0;
  }
  function c() {
    if (!n.value)
      return 0;
    const y = i.vnode.el;
    if (!t.vertical)
      return 0;
    const _ = t.color.get("alpha");
    return y ? Math.round(_ * (y.offsetHeight - n.value.offsetHeight / 2) / 100) : 0;
  }
  function f() {
    if (t.color && t.color.value) {
      const { r: y, g: _, b: O } = t.color.toRgb();
      return `linear-gradient(to right, rgba(${y}, ${_}, ${O}, 0) 0%, rgba(${y}, ${_}, ${O}, 1) 100%)`;
    }
    return "";
  }
  function d() {
    o.value = u(), s.value = c(), l.value = f();
  }
  _t(() => {
    if (!e.value || !n.value)
      return;
    const y = {
      drag: (_) => {
        r(_);
      },
      end: (_) => {
        r(_);
      }
    };
    Pb(e.value, y), Pb(n.value, y), d();
  }), me(() => t.color.get("alpha"), () => d()), me(() => t.color.value, () => d());
  const h = V(() => [a.b(), a.is("vertical", t.vertical)]), p = V(() => a.e("bar")), v = V(() => a.e("thumb")), g = V(() => ({ background: l.value })), m = V(() => ({
    left: bg(o.value),
    top: bg(s.value)
  }));
  return { rootKls: h, barKls: p, barStyle: g, thumbKls: v, thumbStyle: m, update: d };
}, yDe = "ElColorAlphaSlider", bDe = ae({
  name: yDe
}), _De = /* @__PURE__ */ ae({
  ...bDe,
  props: vDe,
  setup(t, { expose: e }) {
    const n = t, { bar: r, thumb: i, handleDrag: a, handleClick: o } = gDe(n), { rootKls: s, barKls: l, barStyle: u, thumbKls: c, thumbStyle: f, update: d } = mDe(n, {
      bar: r,
      thumb: i,
      handleDrag: a
    });
    return e({
      update: d,
      bar: r,
      thumb: i
    }), (h, p) => (be(), Ue("div", {
      class: Ge(z(s))
    }, [
      tt("div", {
        ref_key: "bar",
        ref: r,
        class: Ge(z(l)),
        style: dr(z(u)),
        onClick: p[0] || (p[0] = (...v) => z(o) && z(o)(...v))
      }, null, 6),
      tt("div", {
        ref_key: "thumb",
        ref: i,
        class: Ge(z(c)),
        style: dr(z(f))
      }, null, 6)
    ], 2));
  }
});
var ODe = /* @__PURE__ */ Nn(_De, [["__file", "alpha-slider.vue"]]);
const SDe = ae({
  name: "ElColorHueSlider",
  props: {
    color: {
      type: Object,
      required: !0
    },
    vertical: Boolean
  },
  setup(t) {
    const e = $n("color-hue-slider"), n = In(), r = ee(), i = ee(), a = ee(0), o = ee(0), s = V(() => t.color.get("hue"));
    me(() => s.value, () => {
      d();
    });
    function l(h) {
      h.target !== r.value && u(h);
    }
    function u(h) {
      if (!i.value || !r.value)
        return;
      const v = n.vnode.el.getBoundingClientRect(), { clientX: g, clientY: m } = K4(h);
      let y;
      if (t.vertical) {
        let _ = m - v.top;
        _ = Math.min(_, v.height - r.value.offsetHeight / 2), _ = Math.max(r.value.offsetHeight / 2, _), y = Math.round((_ - r.value.offsetHeight / 2) / (v.height - r.value.offsetHeight) * 360);
      } else {
        let _ = g - v.left;
        _ = Math.min(_, v.width - r.value.offsetWidth / 2), _ = Math.max(r.value.offsetWidth / 2, _), y = Math.round((_ - r.value.offsetWidth / 2) / (v.width - r.value.offsetWidth) * 360);
      }
      t.color.set("hue", y);
    }
    function c() {
      if (!r.value)
        return 0;
      const h = n.vnode.el;
      if (t.vertical)
        return 0;
      const p = t.color.get("hue");
      return h ? Math.round(p * (h.offsetWidth - r.value.offsetWidth / 2) / 360) : 0;
    }
    function f() {
      if (!r.value)
        return 0;
      const h = n.vnode.el;
      if (!t.vertical)
        return 0;
      const p = t.color.get("hue");
      return h ? Math.round(p * (h.offsetHeight - r.value.offsetHeight / 2) / 360) : 0;
    }
    function d() {
      a.value = c(), o.value = f();
    }
    return _t(() => {
      if (!i.value || !r.value)
        return;
      const h = {
        drag: (p) => {
          u(p);
        },
        end: (p) => {
          u(p);
        }
      };
      Pb(i.value, h), Pb(r.value, h), d();
    }), {
      bar: i,
      thumb: r,
      thumbLeft: a,
      thumbTop: o,
      hueValue: s,
      handleClick: l,
      update: d,
      ns: e
    };
  }
});
function xDe(t, e, n, r, i, a) {
  return be(), Ue("div", {
    class: Ge([t.ns.b(), t.ns.is("vertical", t.vertical)])
  }, [
    tt("div", {
      ref: "bar",
      class: Ge(t.ns.e("bar")),
      onClick: e[0] || (e[0] = (...o) => t.handleClick && t.handleClick(...o))
    }, null, 2),
    tt("div", {
      ref: "thumb",
      class: Ge(t.ns.e("thumb")),
      style: dr({
        left: t.thumbLeft + "px",
        top: t.thumbTop + "px"
      })
    }, null, 6)
  ], 2);
}
var wDe = /* @__PURE__ */ Nn(SDe, [["render", xDe], ["__file", "hue-slider.vue"]]);
const CDe = hr({
  modelValue: String,
  id: String,
  showAlpha: Boolean,
  colorFormat: String,
  disabled: Boolean,
  size: op,
  popperClass: {
    type: String,
    default: ""
  },
  label: {
    type: String,
    default: void 0
  },
  tabindex: {
    type: [String, Number],
    default: 0
  },
  teleported: DN.teleported,
  predefine: {
    type: mn(Array)
  },
  validateEvent: {
    type: Boolean,
    default: !0
  },
  ...sp(["ariaLabel"])
}), TDe = {
  [ca]: (t) => ia(t) || Jc(t),
  [Cte]: (t) => ia(t) || Jc(t),
  activeChange: (t) => ia(t) || Jc(t),
  focus: (t) => t instanceof FocusEvent,
  blur: (t) => t instanceof FocusEvent
}, bne = Symbol("colorPickerContextKey"), NW = function(t, e, n) {
  return [
    t,
    e * n / ((t = (2 - e) * n) < 1 ? t : 2 - t) || 0,
    t / 2
  ];
}, PDe = function(t) {
  return typeof t == "string" && t.includes(".") && Number.parseFloat(t) === 1;
}, $De = function(t) {
  return typeof t == "string" && t.includes("%");
}, Vv = function(t, e) {
  PDe(t) && (t = "100%");
  const n = $De(t);
  return t = Math.min(e, Math.max(0, Number.parseFloat(`${t}`))), n && (t = Number.parseInt(`${t * e}`, 10) / 100), Math.abs(t - e) < 1e-6 ? 1 : t % e / Number.parseFloat(e);
}, BW = {
  10: "A",
  11: "B",
  12: "C",
  13: "D",
  14: "E",
  15: "F"
}, Wx = (t) => {
  t = Math.min(Math.round(t), 255);
  const e = Math.floor(t / 16), n = t % 16;
  return `${BW[e] || e}${BW[n] || n}`;
}, zW = function({ r: t, g: e, b: n }) {
  return Number.isNaN(+t) || Number.isNaN(+e) || Number.isNaN(+n) ? "" : `#${Wx(t)}${Wx(e)}${Wx(n)}`;
}, ZA = {
  A: 10,
  B: 11,
  C: 12,
  D: 13,
  E: 14,
  F: 15
}, rd = function(t) {
  return t.length === 2 ? (ZA[t[0].toUpperCase()] || +t[0]) * 16 + (ZA[t[1].toUpperCase()] || +t[1]) : ZA[t[1].toUpperCase()] || +t[1];
}, ADe = function(t, e, n) {
  e = e / 100, n = n / 100;
  let r = e;
  const i = Math.max(n, 0.01);
  n *= 2, e *= n <= 1 ? n : 2 - n, r *= i <= 1 ? i : 2 - i;
  const a = (n + e) / 2, o = n === 0 ? 2 * r / (i + r) : 2 * e / (n + e);
  return {
    h: t,
    s: o * 100,
    v: a * 100
  };
}, VW = (t, e, n) => {
  t = Vv(t, 255), e = Vv(e, 255), n = Vv(n, 255);
  const r = Math.max(t, e, n), i = Math.min(t, e, n);
  let a;
  const o = r, s = r - i, l = r === 0 ? 0 : s / r;
  if (r === i)
    a = 0;
  else {
    switch (r) {
      case t: {
        a = (e - n) / s + (e < n ? 6 : 0);
        break;
      }
      case e: {
        a = (n - t) / s + 2;
        break;
      }
      case n: {
        a = (t - e) / s + 4;
        break;
      }
    }
    a /= 6;
  }
  return { h: a * 360, s: l * 100, v: o * 100 };
}, g0 = function(t, e, n) {
  t = Vv(t, 360) * 6, e = Vv(e, 100), n = Vv(n, 100);
  const r = Math.floor(t), i = t - r, a = n * (1 - e), o = n * (1 - i * e), s = n * (1 - (1 - i) * e), l = r % 6, u = [n, o, a, a, s, n][l], c = [s, n, n, o, a, a][l], f = [a, a, s, n, n, o][l];
  return {
    r: Math.round(u * 255),
    g: Math.round(c * 255),
    b: Math.round(f * 255)
  };
};
class zy {
  constructor(e = {}) {
    this._hue = 0, this._saturation = 100, this._value = 100, this._alpha = 100, this.enableAlpha = !1, this.format = "hex", this.value = "";
    for (const n in e)
      Dh(e, n) && (this[n] = e[n]);
    e.value ? this.fromString(e.value) : this.doOnChange();
  }
  set(e, n) {
    if (arguments.length === 1 && typeof e == "object") {
      for (const r in e)
        Dh(e, r) && this.set(r, e[r]);
      return;
    }
    this[`_${e}`] = n, this.doOnChange();
  }
  get(e) {
    return e === "alpha" ? Math.floor(this[`_${e}`]) : this[`_${e}`];
  }
  toRgb() {
    return g0(this._hue, this._saturation, this._value);
  }
  fromString(e) {
    if (!e) {
      this._hue = 0, this._saturation = 100, this._value = 100, this.doOnChange();
      return;
    }
    const n = (r, i, a) => {
      this._hue = Math.max(0, Math.min(360, r)), this._saturation = Math.max(0, Math.min(100, i)), this._value = Math.max(0, Math.min(100, a)), this.doOnChange();
    };
    if (e.includes("hsl")) {
      const r = e.replace(/hsla|hsl|\(|\)/gm, "").split(/\s|,/g).filter((i) => i !== "").map((i, a) => a > 2 ? Number.parseFloat(i) : Number.parseInt(i, 10));
      if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) {
        const { h: i, s: a, v: o } = ADe(r[0], r[1], r[2]);
        n(i, a, o);
      }
    } else if (e.includes("hsv")) {
      const r = e.replace(/hsva|hsv|\(|\)/gm, "").split(/\s|,/g).filter((i) => i !== "").map((i, a) => a > 2 ? Number.parseFloat(i) : Number.parseInt(i, 10));
      r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3 && n(r[0], r[1], r[2]);
    } else if (e.includes("rgb")) {
      const r = e.replace(/rgba|rgb|\(|\)/gm, "").split(/\s|,/g).filter((i) => i !== "").map((i, a) => a > 2 ? Number.parseFloat(i) : Number.parseInt(i, 10));
      if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) {
        const { h: i, s: a, v: o } = VW(r[0], r[1], r[2]);
        n(i, a, o);
      }
    } else if (e.includes("#")) {
      const r = e.replace("#", "").trim();
      if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r))
        return;
      let i, a, o;
      r.length === 3 ? (i = rd(r[0] + r[0]), a = rd(r[1] + r[1]), o = rd(r[2] + r[2])) : (r.length === 6 || r.length === 8) && (i = rd(r.slice(0, 2)), a = rd(r.slice(2, 4)), o = rd(r.slice(4, 6))), r.length === 8 ? this._alpha = rd(r.slice(6)) / 255 * 100 : (r.length === 3 || r.length === 6) && (this._alpha = 100);
      const { h: s, s: l, v: u } = VW(i, a, o);
      n(s, l, u);
    }
  }
  compare(e) {
    return Math.abs(e._hue - this._hue) < 2 && Math.abs(e._saturation - this._saturation) < 1 && Math.abs(e._value - this._value) < 1 && Math.abs(e._alpha - this._alpha) < 1;
  }
  doOnChange() {
    const { _hue: e, _saturation: n, _value: r, _alpha: i, format: a } = this;
    if (this.enableAlpha)
      switch (a) {
        case "hsl": {
          const o = NW(e, n / 100, r / 100);
          this.value = `hsla(${e}, ${Math.round(o[1] * 100)}%, ${Math.round(o[2] * 100)}%, ${this.get("alpha") / 100})`;
          break;
        }
        case "hsv": {
          this.value = `hsva(${e}, ${Math.round(n)}%, ${Math.round(r)}%, ${this.get("alpha") / 100})`;
          break;
        }
        case "hex": {
          this.value = `${zW(g0(e, n, r))}${Wx(i * 255 / 100)}`;
          break;
        }
        default: {
          const { r: o, g: s, b: l } = g0(e, n, r);
          this.value = `rgba(${o}, ${s}, ${l}, ${this.get("alpha") / 100})`;
        }
      }
    else
      switch (a) {
        case "hsl": {
          const o = NW(e, n / 100, r / 100);
          this.value = `hsl(${e}, ${Math.round(o[1] * 100)}%, ${Math.round(o[2] * 100)}%)`;
          break;
        }
        case "hsv": {
          this.value = `hsv(${e}, ${Math.round(n)}%, ${Math.round(r)}%)`;
          break;
        }
        case "rgb": {
          const { r: o, g: s, b: l } = g0(e, n, r);
          this.value = `rgb(${o}, ${s}, ${l})`;
          break;
        }
        default:
          this.value = zW(g0(e, n, r));
      }
  }
}
const EDe = ae({
  props: {
    colors: {
      type: Array,
      required: !0
    },
    color: {
      type: Object,
      required: !0
    },
    enableAlpha: {
      type: Boolean,
      required: !0
    }
  },
  setup(t) {
    const e = $n("color-predefine"), { currentColor: n } = et(bne), r = ee(a(t.colors, t.color));
    me(() => n.value, (o) => {
      const s = new zy();
      s.fromString(o), r.value.forEach((l) => {
        l.selected = s.compare(l);
      });
    }), Vt(() => {
      r.value = a(t.colors, t.color);
    });
    function i(o) {
      t.color.fromString(t.colors[o]);
    }
    function a(o, s) {
      return o.map((l) => {
        const u = new zy();
        return u.enableAlpha = t.enableAlpha, u.format = "rgba", u.fromString(l), u.selected = u.value === s.value, u;
      });
    }
    return {
      rgbaColors: r,
      handleSelect: i,
      ns: e
    };
  }
}), MDe = ["onClick"];
function IDe(t, e, n, r, i, a) {
  return be(), Ue("div", {
    class: Ge(t.ns.b())
  }, [
    tt("div", {
      class: Ge(t.ns.e("colors"))
    }, [
      (be(!0), Ue(Wt, null, hh(t.rgbaColors, (o, s) => (be(), Ue("div", {
        key: t.colors[s],
        class: Ge([
          t.ns.e("color-selector"),
          t.ns.is("alpha", o._alpha < 100),
          { selected: o.selected }
        ]),
        onClick: (l) => t.handleSelect(s)
      }, [
        tt("div", {
          style: dr({ backgroundColor: o.value })
        }, null, 4)
      ], 10, MDe))), 128))
    ], 2)
  ], 2);
}
var DDe = /* @__PURE__ */ Nn(EDe, [["render", IDe], ["__file", "predefine.vue"]]);
const RDe = ae({
  name: "ElSlPanel",
  props: {
    color: {
      type: Object,
      required: !0
    }
  },
  setup(t) {
    const e = $n("color-svpanel"), n = In(), r = ee(0), i = ee(0), a = ee("hsl(0, 100%, 50%)"), o = V(() => {
      const u = t.color.get("hue"), c = t.color.get("value");
      return { hue: u, value: c };
    });
    function s() {
      const u = t.color.get("saturation"), c = t.color.get("value"), f = n.vnode.el, { clientWidth: d, clientHeight: h } = f;
      i.value = u * d / 100, r.value = (100 - c) * h / 100, a.value = `hsl(${t.color.get("hue")}, 100%, 50%)`;
    }
    function l(u) {
      const f = n.vnode.el.getBoundingClientRect(), { clientX: d, clientY: h } = K4(u);
      let p = d - f.left, v = h - f.top;
      p = Math.max(0, p), p = Math.min(p, f.width), v = Math.max(0, v), v = Math.min(v, f.height), i.value = p, r.value = v, t.color.set({
        saturation: p / f.width * 100,
        value: 100 - v / f.height * 100
      });
    }
    return me(() => o.value, () => {
      s();
    }), _t(() => {
      Pb(n.vnode.el, {
        drag: (u) => {
          l(u);
        },
        end: (u) => {
          l(u);
        }
      }), s();
    }), {
      cursorTop: r,
      cursorLeft: i,
      background: a,
      colorValue: o,
      handleDrag: l,
      update: s,
      ns: e
    };
  }
}), kDe = /* @__PURE__ */ tt("div", null, null, -1), LDe = [
  kDe
];
function NDe(t, e, n, r, i, a) {
  return be(), Ue("div", {
    class: Ge(t.ns.b()),
    style: dr({
      backgroundColor: t.background
    })
  }, [
    tt("div", {
      class: Ge(t.ns.e("white"))
    }, null, 2),
    tt("div", {
      class: Ge(t.ns.e("black"))
    }, null, 2),
    tt("div", {
      class: Ge(t.ns.e("cursor")),
      style: dr({
        top: t.cursorTop + "px",
        left: t.cursorLeft + "px"
      })
    }, LDe, 6)
  ], 6);
}
var BDe = /* @__PURE__ */ Nn(RDe, [["render", NDe], ["__file", "sv-panel.vue"]]);
const zDe = ["onKeydown"], VDe = ["id", "aria-label", "aria-labelledby", "aria-description", "aria-disabled", "tabindex"], FDe = ae({
  name: "ElColorPicker"
}), WDe = /* @__PURE__ */ ae({
  ...FDe,
  props: CDe,
  emits: TDe,
  setup(t, { expose: e, emit: n }) {
    const r = t, { t: i } = mN(), a = $n("color"), { formItem: o } = lp(), s = Tg(), l = um(), { inputId: u, isLabeledByFormItem: c } = Q_(r, {
      formItemContext: o
    }), f = ee(), d = ee(), h = ee(), p = ee(), v = ee(), g = ee(), {
      isFocused: m,
      handleFocus: y,
      handleBlur: _
    } = Hte(v, {
      beforeBlur(q) {
        var K;
        return (K = p.value) == null ? void 0 : K.isFocusInsideContent(q);
      },
      afterBlur() {
        B(!1), U();
      }
    }), O = (q) => {
      if (l.value)
        return re();
      y(q);
    };
    let S = !0;
    const x = zn(new zy({
      enableAlpha: r.showAlpha,
      format: r.colorFormat || "",
      value: r.modelValue
    })), C = ee(!1), P = ee(!1), $ = ee(""), T = V(() => !r.modelValue && !P.value ? "transparent" : I(x, r.showAlpha)), E = V(() => !r.modelValue && !P.value ? "" : x.value), M = V(() => c.value ? void 0 : r.label || r.ariaLabel || i("el.colorpicker.defaultLabel"));
    Es({
      from: "label",
      replacement: "aria-label",
      version: "2.8.0",
      scope: "el-color-picker",
      ref: "https://element-plus.org/en-US/component/color-picker.html"
    }, V(() => !!r.label));
    const R = V(() => c.value ? o == null ? void 0 : o.labelId : void 0), N = V(() => [
      a.b("picker"),
      a.is("disabled", l.value),
      a.bm("picker", s.value),
      a.is("focused", m.value)
    ]);
    function I(q, K) {
      if (!(q instanceof zy))
        throw new TypeError("color should be instance of _color Class");
      const { r: de, g: xe, b: we } = q.toRgb();
      return K ? `rgba(${de}, ${xe}, ${we}, ${q.get("alpha") / 100})` : `rgb(${de}, ${xe}, ${we})`;
    }
    function B(q) {
      C.value = q;
    }
    const Q = hN(B, 100, { leading: !0 });
    function W() {
      l.value || B(!0);
    }
    function H() {
      Q(!1), U();
    }
    function U() {
      Bt(() => {
        r.modelValue ? x.fromString(r.modelValue) : (x.value = "", Bt(() => {
          P.value = !1;
        }));
      });
    }
    function j() {
      l.value || Q(!C.value);
    }
    function Y() {
      x.fromString($.value);
    }
    function ne() {
      const q = x.value;
      n(ca, q), n("change", q), r.validateEvent && (o == null || o.validate("change").catch((K) => Vi(K))), Q(!1), Bt(() => {
        const K = new zy({
          enableAlpha: r.showAlpha,
          format: r.colorFormat || "",
          value: r.modelValue
        });
        x.compare(K) || U();
      });
    }
    function fe() {
      Q(!1), n(ca, null), n("change", null), r.modelValue !== null && r.validateEvent && (o == null || o.validate("change").catch((q) => Vi(q))), U();
    }
    function ue(q) {
      if (C.value && (H(), m.value)) {
        const K = new FocusEvent("focus", q);
        _(K);
      }
    }
    function ye(q) {
      q.preventDefault(), q.stopPropagation(), B(!1), U();
    }
    function se(q) {
      switch (q.code) {
        case wa.enter:
        case wa.space:
          q.preventDefault(), q.stopPropagation(), W(), g.value.focus();
          break;
        case wa.esc:
          ye(q);
          break;
      }
    }
    function he() {
      v.value.focus();
    }
    function re() {
      v.value.blur();
    }
    return _t(() => {
      r.modelValue && ($.value = E.value);
    }), me(() => r.modelValue, (q) => {
      q ? q && q !== x.value && (S = !1, x.fromString(q)) : P.value = !1;
    }), me(() => E.value, (q) => {
      $.value = q, S && n("activeChange", q), S = !0;
    }), me(() => x.value, () => {
      !r.modelValue && !P.value && (P.value = !0);
    }), me(() => C.value, () => {
      Bt(() => {
        var q, K, de;
        (q = f.value) == null || q.update(), (K = d.value) == null || K.update(), (de = h.value) == null || de.update();
      });
    }), Et(bne, {
      currentColor: E
    }), e({
      color: x,
      show: W,
      hide: H,
      focus: he,
      blur: re
    }), (q, K) => (be(), Je(z(cIe), {
      ref_key: "popper",
      ref: p,
      visible: C.value,
      "show-arrow": !1,
      "fallback-placements": ["bottom", "top", "right", "left"],
      offset: 0,
      "gpu-acceleration": !1,
      "popper-class": [z(a).be("picker", "panel"), z(a).b("dropdown"), q.popperClass],
      "stop-popper-mouse-event": !1,
      effect: "light",
      trigger: "click",
      teleported: q.teleported,
      transition: `${z(a).namespace.value}-zoom-in-top`,
      persistent: "",
      onHide: K[2] || (K[2] = (de) => B(!1))
    }, {
      content: ke(() => [
        _r((be(), Ue("div", {
          onKeydown: gF(ye, ["esc"])
        }, [
          tt("div", {
            class: Ge(z(a).be("dropdown", "main-wrapper"))
          }, [
            D(wDe, {
              ref_key: "hue",
              ref: f,
              class: "hue-slider",
              color: z(x),
              vertical: ""
            }, null, 8, ["color"]),
            D(BDe, {
              ref_key: "sv",
              ref: d,
              color: z(x)
            }, null, 8, ["color"])
          ], 2),
          q.showAlpha ? (be(), Je(ODe, {
            key: 0,
            ref_key: "alpha",
            ref: h,
            color: z(x)
          }, null, 8, ["color"])) : Ot("v-if", !0),
          q.predefine ? (be(), Je(DDe, {
            key: 1,
            ref: "predefine",
            "enable-alpha": q.showAlpha,
            color: z(x),
            colors: q.predefine
          }, null, 8, ["enable-alpha", "color", "colors"])) : Ot("v-if", !0),
          tt("div", {
            class: Ge(z(a).be("dropdown", "btns"))
          }, [
            tt("span", {
              class: Ge(z(a).be("dropdown", "value"))
            }, [
              D(z(p2), {
                ref_key: "inputRef",
                ref: g,
                modelValue: $.value,
                "onUpdate:modelValue": K[0] || (K[0] = (de) => $.value = de),
                "validate-event": !1,
                size: "small",
                onKeyup: gF(Y, ["enter"]),
                onBlur: Y
              }, null, 8, ["modelValue", "onKeyup"])
            ], 2),
            D(z(oR), {
              class: Ge(z(a).be("dropdown", "link-btn")),
              text: "",
              size: "small",
              onClick: fe
            }, {
              default: ke(() => [
                Pn(xi(z(i)("el.colorpicker.clear")), 1)
              ]),
              _: 1
            }, 8, ["class"]),
            D(z(oR), {
              plain: "",
              size: "small",
              class: Ge(z(a).be("dropdown", "btn")),
              onClick: ne
            }, {
              default: ke(() => [
                Pn(xi(z(i)("el.colorpicker.confirm")), 1)
              ]),
              _: 1
            }, 8, ["class"])
          ], 2)
        ], 40, zDe)), [
          [z(DIe), ue]
        ])
      ]),
      default: ke(() => [
        tt("div", Xn({
          id: z(u),
          ref_key: "triggerRef",
          ref: v
        }, q.$attrs, {
          class: z(N),
          role: "button",
          "aria-label": z(M),
          "aria-labelledby": z(R),
          "aria-description": z(i)("el.colorpicker.description", { color: q.modelValue || "" }),
          "aria-disabled": z(l),
          tabindex: z(l) ? -1 : q.tabindex,
          onKeydown: se,
          onFocus: O,
          onBlur: K[1] || (K[1] = (...de) => z(_) && z(_)(...de))
        }), [
          z(l) ? (be(), Ue("div", {
            key: 0,
            class: Ge(z(a).be("picker", "mask"))
          }, null, 2)) : Ot("v-if", !0),
          tt("div", {
            class: Ge(z(a).be("picker", "trigger")),
            onClick: j
          }, [
            tt("span", {
              class: Ge([z(a).be("picker", "color"), z(a).is("alpha", q.showAlpha)])
            }, [
              tt("span", {
                class: Ge(z(a).be("picker", "color-inner")),
                style: dr({
                  backgroundColor: z(T)
                })
              }, [
                _r(D(z($s), {
                  class: Ge([z(a).be("picker", "icon"), z(a).is("icon-arrow-down")])
                }, {
                  default: ke(() => [
                    D(z(_$e))
                  ]),
                  _: 1
                }, 8, ["class"]), [
                  [ho, q.modelValue || P.value]
                ]),
                _r(D(z($s), {
                  class: Ge([z(a).be("picker", "empty"), z(a).is("icon-close")])
                }, {
                  default: ke(() => [
                    D(z(xte))
                  ]),
                  _: 1
                }, 8, ["class"]), [
                  [ho, !q.modelValue && !P.value]
                ])
              ], 6)
            ], 2)
          ], 2)
        ], 16, VDe)
      ]),
      _: 1
    }, 8, ["visible", "popper-class", "teleported", "transition"]));
  }
});
var QDe = /* @__PURE__ */ Nn(WDe, [["__file", "color-picker.vue"]]);
const Fv = ec(QDe), HDe = hr({
  mask: {
    type: Boolean,
    default: !0
  },
  customMaskEvent: {
    type: Boolean,
    default: !1
  },
  overlayClass: {
    type: mn([
      String,
      Array,
      Object
    ])
  },
  zIndex: {
    type: mn([String, Number])
  }
}), GDe = {
  click: (t) => t instanceof MouseEvent
}, jDe = "overlay";
var ZDe = ae({
  name: "ElOverlay",
  props: HDe,
  emits: GDe,
  setup(t, { slots: e, emit: n }) {
    const r = $n(jDe), i = (l) => {
      n("click", l);
    }, { onClick: a, onMousedown: o, onMouseup: s } = zte(t.customMaskEvent ? void 0 : i);
    return () => t.mask ? D("div", {
      class: [r.b(), t.overlayClass],
      style: {
        zIndex: t.zIndex
      },
      onClick: a,
      onMousedown: o,
      onMouseup: s
    }, [dn(e, "default")], Nx.STYLE | Nx.CLASS | Nx.PROPS, ["onClick", "onMouseup", "onMousedown"]) : ff("div", {
      class: t.overlayClass,
      style: {
        zIndex: t.zIndex,
        position: "fixed",
        top: "0px",
        right: "0px",
        bottom: "0px",
        left: "0px"
      }
    }, [dn(e, "default")]);
  }
});
const UDe = ZDe, _ne = Symbol("dialogInjectionKey"), One = hr({
  center: Boolean,
  alignCenter: Boolean,
  closeIcon: {
    type: _g
  },
  draggable: Boolean,
  overflow: Boolean,
  fullscreen: Boolean,
  showClose: {
    type: Boolean,
    default: !0
  },
  title: {
    type: String,
    default: ""
  },
  ariaLevel: {
    type: String,
    default: "2"
  }
}), XDe = {
  close: () => !0
}, YDe = ["aria-level"], qDe = ["aria-label"], KDe = ["id"], JDe = ae({ name: "ElDialogContent" }), eRe = /* @__PURE__ */ ae({
  ...JDe,
  props: One,
  emits: XDe,
  setup(t) {
    const e = t, { t: n } = mN(), { Close: r } = D$e, { dialogRef: i, headerRef: a, bodyId: o, ns: s, style: l } = et(_ne), { focusTrapRef: u } = et(Jte), c = V(() => [
      s.b(),
      s.is("fullscreen", e.fullscreen),
      s.is("draggable", e.draggable),
      s.is("align-center", e.alignCenter),
      { [s.m("center")]: e.center }
    ]), f = k$e(u, i), d = V(() => e.draggable), h = V(() => e.overflow);
    return W$e(i, a, d, h), (p, v) => (be(), Ue("div", {
      ref: z(f),
      class: Ge(z(c)),
      style: dr(z(l)),
      tabindex: "-1"
    }, [
      tt("header", {
        ref_key: "headerRef",
        ref: a,
        class: Ge([z(s).e("header"), { "show-close": p.showClose }])
      }, [
        dn(p.$slots, "header", {}, () => [
          tt("span", {
            role: "heading",
            "aria-level": p.ariaLevel,
            class: Ge(z(s).e("title"))
          }, xi(p.title), 11, YDe)
        ]),
        p.showClose ? (be(), Ue("button", {
          key: 0,
          "aria-label": z(n)("el.dialog.close"),
          class: Ge(z(s).e("headerbtn")),
          type: "button",
          onClick: v[0] || (v[0] = (g) => p.$emit("close"))
        }, [
          D(z($s), {
            class: Ge(z(s).e("close"))
          }, {
            default: ke(() => [
              (be(), Je(As(p.closeIcon || z(r))))
            ]),
            _: 1
          }, 8, ["class"])
        ], 10, qDe)) : Ot("v-if", !0)
      ], 2),
      tt("div", {
        id: z(o),
        class: Ge(z(s).e("body"))
      }, [
        dn(p.$slots, "default")
      ], 10, KDe),
      p.$slots.footer ? (be(), Ue("footer", {
        key: 0,
        class: Ge(z(s).e("footer"))
      }, [
        dn(p.$slots, "footer")
      ], 2)) : Ot("v-if", !0)
    ], 6));
  }
});
var tRe = /* @__PURE__ */ Nn(eRe, [["__file", "dialog-content.vue"]]);
const nRe = hr({
  ...One,
  appendToBody: Boolean,
  appendTo: {
    type: mn(String),
    default: "body"
  },
  beforeClose: {
    type: mn(Function)
  },
  destroyOnClose: Boolean,
  closeOnClickModal: {
    type: Boolean,
    default: !0
  },
  closeOnPressEscape: {
    type: Boolean,
    default: !0
  },
  lockScroll: {
    type: Boolean,
    default: !0
  },
  modal: {
    type: Boolean,
    default: !0
  },
  openDelay: {
    type: Number,
    default: 0
  },
  closeDelay: {
    type: Number,
    default: 0
  },
  top: {
    type: String
  },
  modelValue: Boolean,
  modalClass: String,
  width: {
    type: [String, Number]
  },
  zIndex: {
    type: Number
  },
  trapFocus: {
    type: Boolean,
    default: !1
  },
  headerAriaLevel: {
    type: String,
    default: "2"
  }
}), rRe = {
  open: () => !0,
  opened: () => !0,
  close: () => !0,
  closed: () => !0,
  [ca]: (t) => hf(t),
  openAutoFocus: () => !0,
  closeAutoFocus: () => !0
}, iRe = (t, e) => {
  var n;
  const i = In().emit, { nextZIndex: a } = Qte();
  let o = "";
  const s = wb(), l = wb(), u = ee(!1), c = ee(!1), f = ee(!1), d = ee((n = t.zIndex) != null ? n : a());
  let h, p;
  const v = Gte("namespace", Bx), g = V(() => {
    const I = {}, B = `--${v.value}-dialog`;
    return t.fullscreen || (t.top && (I[`${B}-margin-top`] = t.top), t.width && (I[`${B}-width`] = bg(t.width))), I;
  }), m = V(() => t.alignCenter ? { display: "flex" } : {});
  function y() {
    i("opened");
  }
  function _() {
    i("closed"), i(ca, !1), t.destroyOnClose && (f.value = !1);
  }
  function O() {
    i("close");
  }
  function S() {
    p == null || p(), h == null || h(), t.openDelay && t.openDelay > 0 ? { stop: h } = yF(() => $(), t.openDelay) : $();
  }
  function x() {
    h == null || h(), p == null || p(), t.closeDelay && t.closeDelay > 0 ? { stop: p } = yF(() => T(), t.closeDelay) : T();
  }
  function C() {
    function I(B) {
      B || (c.value = !0, u.value = !1);
    }
    t.beforeClose ? t.beforeClose(I) : x();
  }
  function P() {
    t.closeOnClickModal && C();
  }
  function $() {
    Fr && (u.value = !0);
  }
  function T() {
    u.value = !1;
  }
  function E() {
    i("openAutoFocus");
  }
  function M() {
    i("closeAutoFocus");
  }
  function R(I) {
    var B;
    ((B = I.detail) == null ? void 0 : B.focusReason) === "pointer" && I.preventDefault();
  }
  t.lockScroll && Y$e(u);
  function N() {
    t.closeOnPressEscape && C();
  }
  return me(() => t.modelValue, (I) => {
    I ? (c.value = !1, S(), f.value = !0, d.value = gte(t.zIndex) ? a() : d.value++, Bt(() => {
      i("open"), e.value && (e.value.scrollTop = 0);
    })) : u.value && x();
  }), me(() => t.fullscreen, (I) => {
    e.value && (I ? (o = e.value.style.transform, e.value.style.transform = "") : e.value.style.transform = o);
  }), _t(() => {
    t.modelValue && (u.value = !0, f.value = !0, S());
  }), {
    afterEnter: y,
    afterLeave: _,
    beforeLeave: O,
    handleClose: C,
    onModalClick: P,
    close: x,
    doClose: T,
    onOpenAutoFocus: E,
    onCloseAutoFocus: M,
    onCloseRequested: N,
    onFocusoutPrevented: R,
    titleId: s,
    bodyId: l,
    closed: c,
    style: g,
    overlayDialogStyle: m,
    rendered: f,
    visible: u,
    zIndex: d
  };
}, aRe = ["aria-label", "aria-labelledby", "aria-describedby"], oRe = ae({
  name: "ElDialog",
  inheritAttrs: !1
}), sRe = /* @__PURE__ */ ae({
  ...oRe,
  props: nRe,
  emits: rRe,
  setup(t, { expose: e }) {
    const n = t, r = D_();
    Es({
      scope: "el-dialog",
      from: "the title slot",
      replacement: "the header slot",
      version: "3.0.0",
      ref: "https://element-plus.org/en-US/component/dialog.html#slots"
    }, V(() => !!r.title));
    const i = $n("dialog"), a = ee(), o = ee(), s = ee(), {
      visible: l,
      titleId: u,
      bodyId: c,
      style: f,
      overlayDialogStyle: d,
      rendered: h,
      zIndex: p,
      afterEnter: v,
      afterLeave: g,
      beforeLeave: m,
      handleClose: y,
      onModalClick: _,
      onOpenAutoFocus: O,
      onCloseAutoFocus: S,
      onCloseRequested: x,
      onFocusoutPrevented: C
    } = iRe(n, a);
    Et(_ne, {
      dialogRef: a,
      headerRef: o,
      bodyId: c,
      ns: i,
      rendered: h,
      style: f
    });
    const P = zte(_), $ = V(() => n.draggable && !n.fullscreen);
    return e({
      visible: l,
      dialogContentRef: s
    }), (T, E) => (be(), Je(R_, {
      to: T.appendTo,
      disabled: T.appendTo !== "body" ? !1 : !T.appendToBody
    }, [
      D(mo, {
        name: "dialog-fade",
        onAfterEnter: z(v),
        onAfterLeave: z(g),
        onBeforeLeave: z(m),
        persisted: ""
      }, {
        default: ke(() => [
          _r(D(z(UDe), {
            "custom-mask-event": "",
            mask: T.modal,
            "overlay-class": T.modalClass,
            "z-index": z(p)
          }, {
            default: ke(() => [
              tt("div", {
                role: "dialog",
                "aria-modal": "true",
                "aria-label": T.title || void 0,
                "aria-labelledby": T.title ? void 0 : z(u),
                "aria-describedby": z(c),
                class: Ge(`${z(i).namespace.value}-overlay-dialog`),
                style: dr(z(d)),
                onClick: E[0] || (E[0] = (...M) => z(P).onClick && z(P).onClick(...M)),
                onMousedown: E[1] || (E[1] = (...M) => z(P).onMousedown && z(P).onMousedown(...M)),
                onMouseup: E[2] || (E[2] = (...M) => z(P).onMouseup && z(P).onMouseup(...M))
              }, [
                D(z(tne), {
                  loop: "",
                  trapped: z(l),
                  "focus-start-el": "container",
                  onFocusAfterTrapped: z(O),
                  onFocusAfterReleased: z(S),
                  onFocusoutPrevented: z(C),
                  onReleaseRequested: z(x)
                }, {
                  default: ke(() => [
                    z(h) ? (be(), Je(tRe, Xn({
                      key: 0,
                      ref_key: "dialogContentRef",
                      ref: s
                    }, T.$attrs, {
                      center: T.center,
                      "align-center": T.alignCenter,
                      "close-icon": T.closeIcon,
                      draggable: z($),
                      overflow: T.overflow,
                      fullscreen: T.fullscreen,
                      "show-close": T.showClose,
                      title: T.title,
                      "aria-level": T.headerAriaLevel,
                      onClose: z(y)
                    }), cxe({
                      header: ke(() => [
                        T.$slots.title ? dn(T.$slots, "title", { key: 1 }) : dn(T.$slots, "header", {
                          key: 0,
                          close: z(y),
                          titleId: z(u),
                          titleClass: z(i).e("title")
                        })
                      ]),
                      default: ke(() => [
                        dn(T.$slots, "default")
                      ]),
                      _: 2
                    }, [
                      T.$slots.footer ? {
                        name: "footer",
                        fn: ke(() => [
                          dn(T.$slots, "footer")
                        ])
                      } : void 0
                    ]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "show-close", "title", "aria-level", "onClose"])) : Ot("v-if", !0)
                  ]),
                  _: 3
                }, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
              ], 46, aRe)
            ]),
            _: 3
          }, 8, ["mask", "overlay-class", "z-index"]), [
            [ho, z(l)]
          ])
        ]),
        _: 3
      }, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
    ], 8, ["to", "disabled"]));
  }
});
var lRe = /* @__PURE__ */ Nn(sRe, [["__file", "dialog.vue"]]);
const uRe = ec(lRe), cRe = Symbol("ElSelect"), Wv = "$treeNodeId", FW = function(t, e) {
  !e || e[Wv] || Object.defineProperty(e, Wv, {
    value: t.id,
    enumerable: !1,
    configurable: !1,
    writable: !1
  });
}, RN = function(t, e) {
  return t ? e[t] : e[Wv];
}, sR = (t, e, n) => {
  const r = t.value.currentNode;
  n();
  const i = t.value.currentNode;
  r !== i && e("current-change", i ? i.data : null, i);
}, lR = (t) => {
  let e = !0, n = !0, r = !0;
  for (let i = 0, a = t.length; i < a; i++) {
    const o = t[i];
    (o.checked !== !0 || o.indeterminate) && (e = !1, o.disabled || (r = !1)), (o.checked !== !1 || o.indeterminate) && (n = !1);
  }
  return { all: e, none: n, allWithoutDisable: r, half: !e && !n };
}, cy = function(t) {
  if (t.childNodes.length === 0 || t.loading)
    return;
  const { all: e, none: n, half: r } = lR(t.childNodes);
  e ? (t.checked = !0, t.indeterminate = !1) : r ? (t.checked = !1, t.indeterminate = !0) : n && (t.checked = !1, t.indeterminate = !1);
  const i = t.parent;
  !i || i.level === 0 || t.store.checkStrictly || cy(i);
}, FO = function(t, e) {
  const n = t.store.props, r = t.data || {}, i = n[e];
  if (typeof i == "function")
    return i(r, t);
  if (typeof i == "string")
    return r[i];
  if (typeof i > "u") {
    const a = r[e];
    return a === void 0 ? "" : a;
  }
};
let fRe = 0;
class gh {
  constructor(e) {
    this.id = fRe++, this.text = null, this.checked = !1, this.indeterminate = !1, this.data = null, this.expanded = !1, this.parent = null, this.visible = !0, this.isCurrent = !1, this.canFocus = !1;
    for (const n in e)
      Dh(e, n) && (this[n] = e[n]);
    this.level = 0, this.loaded = !1, this.childNodes = [], this.loading = !1, this.parent && (this.level = this.parent.level + 1);
  }
  initialize() {
    const e = this.store;
    if (!e)
      throw new Error("[Node]store is required!");
    e.registerNode(this);
    const n = e.props;
    if (n && typeof n.isLeaf < "u") {
      const a = FO(this, "isLeaf");
      typeof a == "boolean" && (this.isLeafByUser = a);
    }
    if (e.lazy !== !0 && this.data ? (this.setData(this.data), e.defaultExpandAll && (this.expanded = !0, this.canFocus = !0)) : this.level > 0 && e.lazy && e.defaultExpandAll && this.expand(), Array.isArray(this.data) || FW(this, this.data), !this.data)
      return;
    const r = e.defaultExpandedKeys, i = e.key;
    i && r && r.includes(this.key) && this.expand(null, e.autoExpandParent), i && e.currentNodeKey !== void 0 && this.key === e.currentNodeKey && (e.currentNode = this, e.currentNode.isCurrent = !0), e.lazy && e._initDefaultCheckedNode(this), this.updateLeafState(), this.parent && (this.level === 1 || this.parent.expanded === !0) && (this.canFocus = !0);
  }
  setData(e) {
    Array.isArray(e) || FW(this, e), this.data = e, this.childNodes = [];
    let n;
    this.level === 0 && Array.isArray(this.data) ? n = this.data : n = FO(this, "children") || [];
    for (let r = 0, i = n.length; r < i; r++)
      this.insertChild({ data: n[r] });
  }
  get label() {
    return FO(this, "label");
  }
  get key() {
    const e = this.store.key;
    return this.data ? this.data[e] : null;
  }
  get disabled() {
    return FO(this, "disabled");
  }
  get nextSibling() {
    const e = this.parent;
    if (e) {
      const n = e.childNodes.indexOf(this);
      if (n > -1)
        return e.childNodes[n + 1];
    }
    return null;
  }
  get previousSibling() {
    const e = this.parent;
    if (e) {
      const n = e.childNodes.indexOf(this);
      if (n > -1)
        return n > 0 ? e.childNodes[n - 1] : null;
    }
    return null;
  }
  contains(e, n = !0) {
    return (this.childNodes || []).some((r) => r === e || n && r.contains(e));
  }
  remove() {
    const e = this.parent;
    e && e.removeChild(this);
  }
  insertChild(e, n, r) {
    if (!e)
      throw new Error("InsertChild error: child is required.");
    if (!(e instanceof gh)) {
      if (!r) {
        const i = this.getChildren(!0);
        i.includes(e.data) || (typeof n > "u" || n < 0 ? i.push(e.data) : i.splice(n, 0, e.data));
      }
      Object.assign(e, {
        parent: this,
        store: this.store
      }), e = zn(new gh(e)), e instanceof gh && e.initialize();
    }
    e.level = this.level + 1, typeof n > "u" || n < 0 ? this.childNodes.push(e) : this.childNodes.splice(n, 0, e), this.updateLeafState();
  }
  insertBefore(e, n) {
    let r;
    n && (r = this.childNodes.indexOf(n)), this.insertChild(e, r);
  }
  insertAfter(e, n) {
    let r;
    n && (r = this.childNodes.indexOf(n), r !== -1 && (r += 1)), this.insertChild(e, r);
  }
  removeChild(e) {
    const n = this.getChildren() || [], r = n.indexOf(e.data);
    r > -1 && n.splice(r, 1);
    const i = this.childNodes.indexOf(e);
    i > -1 && (this.store && this.store.deregisterNode(e), e.parent = null, this.childNodes.splice(i, 1)), this.updateLeafState();
  }
  removeChildByData(e) {
    let n = null;
    for (let r = 0; r < this.childNodes.length; r++)
      if (this.childNodes[r].data === e) {
        n = this.childNodes[r];
        break;
      }
    n && this.removeChild(n);
  }
  expand(e, n) {
    const r = () => {
      if (n) {
        let i = this.parent;
        for (; i.level > 0; )
          i.expanded = !0, i = i.parent;
      }
      this.expanded = !0, e && e(), this.childNodes.forEach((i) => {
        i.canFocus = !0;
      });
    };
    this.shouldLoadData() ? this.loadData((i) => {
      Array.isArray(i) && (this.checked ? this.setChecked(!0, !0) : this.store.checkStrictly || cy(this), r());
    }) : r();
  }
  doCreateChildren(e, n = {}) {
    e.forEach((r) => {
      this.insertChild(Object.assign({ data: r }, n), void 0, !0);
    });
  }
  collapse() {
    this.expanded = !1, this.childNodes.forEach((e) => {
      e.canFocus = !1;
    });
  }
  shouldLoadData() {
    return this.store.lazy === !0 && this.store.load && !this.loaded;
  }
  updateLeafState() {
    if (this.store.lazy === !0 && this.loaded !== !0 && typeof this.isLeafByUser < "u") {
      this.isLeaf = this.isLeafByUser;
      return;
    }
    const e = this.childNodes;
    if (!this.store.lazy || this.store.lazy === !0 && this.loaded === !0) {
      this.isLeaf = !e || e.length === 0;
      return;
    }
    this.isLeaf = !1;
  }
  setChecked(e, n, r, i) {
    if (this.indeterminate = e === "half", this.checked = e === !0, this.store.checkStrictly)
      return;
    if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
      const { all: o, allWithoutDisable: s } = lR(this.childNodes);
      !this.isLeaf && !o && s && (this.checked = !1, e = !1);
      const l = () => {
        if (n) {
          const u = this.childNodes;
          for (let d = 0, h = u.length; d < h; d++) {
            const p = u[d];
            i = i || e !== !1;
            const v = p.disabled ? p.checked : i;
            p.setChecked(v, n, !0, i);
          }
          const { half: c, all: f } = lR(u);
          f || (this.checked = f, this.indeterminate = c);
        }
      };
      if (this.shouldLoadData()) {
        this.loadData(() => {
          l(), cy(this);
        }, {
          checked: e !== !1
        });
        return;
      } else
        l();
    }
    const a = this.parent;
    !a || a.level === 0 || r || cy(a);
  }
  getChildren(e = !1) {
    if (this.level === 0)
      return this.data;
    const n = this.data;
    if (!n)
      return null;
    const r = this.store.props;
    let i = "children";
    return r && (i = r.children || "children"), n[i] === void 0 && (n[i] = null), e && !n[i] && (n[i] = []), n[i];
  }
  updateChildren() {
    const e = this.getChildren() || [], n = this.childNodes.map((a) => a.data), r = {}, i = [];
    e.forEach((a, o) => {
      const s = a[Wv];
      !!s && n.findIndex((u) => u[Wv] === s) >= 0 ? r[s] = { index: o, data: a } : i.push({ index: o, data: a });
    }), this.store.lazy || n.forEach((a) => {
      r[a[Wv]] || this.removeChildByData(a);
    }), i.forEach(({ index: a, data: o }) => {
      this.insertChild({ data: o }, a);
    }), this.updateLeafState();
  }
  loadData(e, n = {}) {
    if (this.store.lazy === !0 && this.store.load && !this.loaded && (!this.loading || Object.keys(n).length)) {
      this.loading = !0;
      const r = (a) => {
        this.childNodes = [], this.doCreateChildren(a, n), this.loaded = !0, this.loading = !1, this.updateLeafState(), e && e.call(this, a);
      }, i = () => {
        this.loading = !1;
      };
      this.store.load(this, r, i);
    } else
      e && e.call(this);
  }
  eachNode(e) {
    const n = [this];
    for (; n.length; ) {
      const r = n.shift();
      n.unshift(...r.childNodes), e(r);
    }
  }
  reInitChecked() {
    this.store.checkStrictly || cy(this);
  }
}
class dRe {
  constructor(e) {
    this.currentNode = null, this.currentNodeKey = null;
    for (const n in e)
      Dh(e, n) && (this[n] = e[n]);
    this.nodesMap = {};
  }
  initialize() {
    if (this.root = new gh({
      data: this.data,
      store: this
    }), this.root.initialize(), this.lazy && this.load) {
      const e = this.load;
      e(this.root, (n) => {
        this.root.doCreateChildren(n), this._initDefaultCheckedNodes();
      });
    } else
      this._initDefaultCheckedNodes();
  }
  filter(e) {
    const n = this.filterNodeMethod, r = this.lazy, i = function(a) {
      const o = a.root ? a.root.childNodes : a.childNodes;
      if (o.forEach((s) => {
        s.visible = n.call(s, e, s.data, s), i(s);
      }), !a.visible && o.length) {
        let s = !0;
        s = !o.some((l) => l.visible), a.root ? a.root.visible = s === !1 : a.visible = s === !1;
      }
      e && a.visible && !a.isLeaf && (!r || a.loaded) && a.expand();
    };
    i(this);
  }
  setData(e) {
    e !== this.root.data ? (this.root.setData(e), this._initDefaultCheckedNodes()) : this.root.updateChildren();
  }
  getNode(e) {
    if (e instanceof gh)
      return e;
    const n = Rh(e) ? RN(this.key, e) : e;
    return this.nodesMap[n] || null;
  }
  insertBefore(e, n) {
    const r = this.getNode(n);
    r.parent.insertBefore({ data: e }, r);
  }
  insertAfter(e, n) {
    const r = this.getNode(n);
    r.parent.insertAfter({ data: e }, r);
  }
  remove(e) {
    const n = this.getNode(e);
    n && n.parent && (n === this.currentNode && (this.currentNode = null), n.parent.removeChild(n));
  }
  append(e, n) {
    const r = yg(n) ? this.root : this.getNode(n);
    r && r.insertChild({ data: e });
  }
  _initDefaultCheckedNodes() {
    const e = this.defaultCheckedKeys || [], n = this.nodesMap;
    e.forEach((r) => {
      const i = n[r];
      i && i.setChecked(!0, !this.checkStrictly);
    });
  }
  _initDefaultCheckedNode(e) {
    (this.defaultCheckedKeys || []).includes(e.key) && e.setChecked(!0, !this.checkStrictly);
  }
  setDefaultCheckedKey(e) {
    e !== this.defaultCheckedKeys && (this.defaultCheckedKeys = e, this._initDefaultCheckedNodes());
  }
  registerNode(e) {
    const n = this.key;
    !e || !e.data || (n ? e.key !== void 0 && (this.nodesMap[e.key] = e) : this.nodesMap[e.id] = e);
  }
  deregisterNode(e) {
    !this.key || !e || !e.data || (e.childNodes.forEach((r) => {
      this.deregisterNode(r);
    }), delete this.nodesMap[e.key]);
  }
  getCheckedNodes(e = !1, n = !1) {
    const r = [], i = function(a) {
      (a.root ? a.root.childNodes : a.childNodes).forEach((s) => {
        (s.checked || n && s.indeterminate) && (!e || e && s.isLeaf) && r.push(s.data), i(s);
      });
    };
    return i(this), r;
  }
  getCheckedKeys(e = !1) {
    return this.getCheckedNodes(e).map((n) => (n || {})[this.key]);
  }
  getHalfCheckedNodes() {
    const e = [], n = function(r) {
      (r.root ? r.root.childNodes : r.childNodes).forEach((a) => {
        a.indeterminate && e.push(a.data), n(a);
      });
    };
    return n(this), e;
  }
  getHalfCheckedKeys() {
    return this.getHalfCheckedNodes().map((e) => (e || {})[this.key]);
  }
  _getAllNodes() {
    const e = [], n = this.nodesMap;
    for (const r in n)
      Dh(n, r) && e.push(n[r]);
    return e;
  }
  updateChildren(e, n) {
    const r = this.nodesMap[e];
    if (!r)
      return;
    const i = r.childNodes;
    for (let a = i.length - 1; a >= 0; a--) {
      const o = i[a];
      this.remove(o.data);
    }
    for (let a = 0, o = n.length; a < o; a++) {
      const s = n[a];
      this.append(s, r.data);
    }
  }
  _setCheckedKeys(e, n = !1, r) {
    const i = this._getAllNodes().sort((l, u) => l.level - u.level), a = /* @__PURE__ */ Object.create(null), o = Object.keys(r);
    i.forEach((l) => l.setChecked(!1, !1));
    const s = (l) => {
      l.childNodes.forEach((u) => {
        var c;
        a[u.data[e]] = !0, (c = u.childNodes) != null && c.length && s(u);
      });
    };
    for (let l = 0, u = i.length; l < u; l++) {
      const c = i[l], f = c.data[e].toString();
      if (!o.includes(f)) {
        c.checked && !a[f] && c.setChecked(!1, !1);
        continue;
      }
      if (c.childNodes.length && s(c), c.isLeaf || this.checkStrictly) {
        c.setChecked(!0, !1);
        continue;
      }
      if (c.setChecked(!0, !0), n) {
        c.setChecked(!1, !1);
        const h = function(p) {
          p.childNodes.forEach((g) => {
            g.isLeaf || g.setChecked(!1, !1), h(g);
          });
        };
        h(c);
      }
    }
  }
  setCheckedNodes(e, n = !1) {
    const r = this.key, i = {};
    e.forEach((a) => {
      i[(a || {})[r]] = !0;
    }), this._setCheckedKeys(r, n, i);
  }
  setCheckedKeys(e, n = !1) {
    this.defaultCheckedKeys = e;
    const r = this.key, i = {};
    e.forEach((a) => {
      i[a] = !0;
    }), this._setCheckedKeys(r, n, i);
  }
  setDefaultExpandedKeys(e) {
    e = e || [], this.defaultExpandedKeys = e, e.forEach((n) => {
      const r = this.getNode(n);
      r && r.expand(null, this.autoExpandParent);
    });
  }
  setChecked(e, n, r) {
    const i = this.getNode(e);
    i && i.setChecked(!!n, r);
  }
  getCurrentNode() {
    return this.currentNode;
  }
  setCurrentNode(e) {
    const n = this.currentNode;
    n && (n.isCurrent = !1), this.currentNode = e, this.currentNode.isCurrent = !0;
  }
  setUserCurrentNode(e, n = !0) {
    const r = e[this.key], i = this.nodesMap[r];
    this.setCurrentNode(i), n && this.currentNode.level > 1 && this.currentNode.parent.expand(null, !0);
  }
  setCurrentNodeKey(e, n = !0) {
    if (e == null) {
      this.currentNode && (this.currentNode.isCurrent = !1), this.currentNode = null;
      return;
    }
    const r = this.getNode(e);
    r && (this.setCurrentNode(r), n && this.currentNode.level > 1 && this.currentNode.parent.expand(null, !0));
  }
}
const hRe = ae({
  name: "ElTreeNodeContent",
  props: {
    node: {
      type: Object,
      required: !0
    },
    renderContent: Function
  },
  setup(t) {
    const e = $n("tree"), n = et("NodeInstance"), r = et("RootTree");
    return () => {
      const i = t.node, { data: a, store: o } = i;
      return t.renderContent ? t.renderContent(ff, { _self: n, node: i, data: a, store: o }) : dn(r.ctx.slots, "default", { node: i, data: a }, () => [
        ff("span", { class: e.be("node", "label") }, [i.label])
      ]);
    };
  }
});
var pRe = /* @__PURE__ */ Nn(hRe, [["__file", "tree-node-content.vue"]]);
function Sne(t) {
  const e = et("TreeNodeMap", null), n = {
    treeNodeExpand: (r) => {
      t.node !== r && t.node.collapse();
    },
    children: []
  };
  return e && e.children.push(n), Et("TreeNodeMap", n), {
    broadcastExpanded: (r) => {
      if (t.accordion)
        for (const i of n.children)
          i.treeNodeExpand(r);
    }
  };
}
const xne = Symbol("dragEvents");
function vRe({ props: t, ctx: e, el$: n, dropIndicator$: r, store: i }) {
  const a = $n("tree"), o = ee({
    showDropIndicator: !1,
    draggingNode: null,
    dropNode: null,
    allowDrop: !0,
    dropType: null
  });
  return Et(xne, {
    treeNodeDragStart: ({ event: c, treeNode: f }) => {
      if (typeof t.allowDrag == "function" && !t.allowDrag(f.node))
        return c.preventDefault(), !1;
      c.dataTransfer.effectAllowed = "move";
      try {
        c.dataTransfer.setData("text/plain", "");
      } catch {
      }
      o.value.draggingNode = f, e.emit("node-drag-start", f.node, c);
    },
    treeNodeDragOver: ({ event: c, treeNode: f }) => {
      const d = f, h = o.value.dropNode;
      h && h.node.id !== d.node.id && Lx(h.$el, a.is("drop-inner"));
      const p = o.value.draggingNode;
      if (!p || !d)
        return;
      let v = !0, g = !0, m = !0, y = !0;
      typeof t.allowDrop == "function" && (v = t.allowDrop(p.node, d.node, "prev"), y = g = t.allowDrop(p.node, d.node, "inner"), m = t.allowDrop(p.node, d.node, "next")), c.dataTransfer.dropEffect = g || v || m ? "move" : "none", (v || g || m) && (h == null ? void 0 : h.node.id) !== d.node.id && (h && e.emit("node-drag-leave", p.node, h.node, c), e.emit("node-drag-enter", p.node, d.node, c)), v || g || m ? o.value.dropNode = d : o.value.dropNode = null, d.node.nextSibling === p.node && (m = !1), d.node.previousSibling === p.node && (v = !1), d.node.contains(p.node, !1) && (g = !1), (p.node === d.node || p.node.contains(d.node)) && (v = !1, g = !1, m = !1);
      const _ = d.$el.querySelector(`.${a.be("node", "content")}`).getBoundingClientRect(), O = n.value.getBoundingClientRect();
      let S;
      const x = v ? g ? 0.25 : m ? 0.45 : 1 : -1, C = m ? g ? 0.75 : v ? 0.55 : 0 : 1;
      let P = -9999;
      const $ = c.clientY - _.top;
      $ < _.height * x ? S = "before" : $ > _.height * C ? S = "after" : g ? S = "inner" : S = "none";
      const T = d.$el.querySelector(`.${a.be("node", "expand-icon")}`).getBoundingClientRect(), E = r.value;
      S === "before" ? P = T.top - O.top : S === "after" && (P = T.bottom - O.top), E.style.top = `${P}px`, E.style.left = `${T.right - O.left}px`, S === "inner" ? Ote(d.$el, a.is("drop-inner")) : Lx(d.$el, a.is("drop-inner")), o.value.showDropIndicator = S === "before" || S === "after", o.value.allowDrop = o.value.showDropIndicator || y, o.value.dropType = S, e.emit("node-drag-over", p.node, d.node, c);
    },
    treeNodeDragEnd: (c) => {
      const { draggingNode: f, dropType: d, dropNode: h } = o.value;
      if (c.preventDefault(), c.dataTransfer.dropEffect = "move", f && h) {
        const p = { data: f.node.data };
        d !== "none" && f.node.remove(), d === "before" ? h.node.parent.insertBefore(p, h.node) : d === "after" ? h.node.parent.insertAfter(p, h.node) : d === "inner" && h.node.insertChild(p), d !== "none" && (i.value.registerNode(p), i.value.key && f.node.eachNode((v) => {
          var g;
          (g = i.value.nodesMap[v.data[i.value.key]]) == null || g.setChecked(v.checked, !i.value.checkStrictly);
        })), Lx(h.$el, a.is("drop-inner")), e.emit("node-drag-end", f.node, h.node, d, c), d !== "none" && e.emit("node-drop", f.node, h.node, d, c);
      }
      f && !h && e.emit("node-drag-end", f.node, null, d, c), o.value.showDropIndicator = !1, o.value.draggingNode = null, o.value.dropNode = null, o.value.allowDrop = !0;
    }
  }), {
    dragState: o
  };
}
const gRe = ae({
  name: "ElTreeNode",
  components: {
    ElCollapseTransition: pDe,
    ElCheckbox: qIe,
    NodeContent: pRe,
    ElIcon: $s,
    Loading: gN
  },
  props: {
    node: {
      type: gh,
      default: () => ({})
    },
    props: {
      type: Object,
      default: () => ({})
    },
    accordion: Boolean,
    renderContent: Function,
    renderAfterExpand: Boolean,
    showCheckbox: {
      type: Boolean,
      default: !1
    }
  },
  emits: ["node-expand"],
  setup(t, e) {
    const n = $n("tree"), { broadcastExpanded: r } = Sne(t), i = et("RootTree"), a = ee(!1), o = ee(!1), s = ee(null), l = ee(null), u = ee(null), c = et(xne), f = In();
    Et("NodeInstance", f), i || Vi("Tree", "Can not find node's tree."), t.node.expanded && (a.value = !0, o.value = !0);
    const d = i.props.props.children || "children";
    me(() => {
      const $ = t.node.data[d];
      return $ && [...$];
    }, () => {
      t.node.updateChildren();
    }), me(() => t.node.indeterminate, ($) => {
      v(t.node.checked, $);
    }), me(() => t.node.checked, ($) => {
      v($, t.node.indeterminate);
    }), me(() => t.node.childNodes.length, () => t.node.reInitChecked()), me(() => t.node.expanded, ($) => {
      Bt(() => a.value = $), $ && (o.value = !0);
    });
    const h = ($) => RN(i.props.nodeKey, $.data), p = ($) => {
      const T = t.props.class;
      if (!T)
        return {};
      let E;
      if (Jd(T)) {
        const { data: M } = $;
        E = T(M, $);
      } else
        E = T;
      return ia(E) ? { [E]: !0 } : E;
    }, v = ($, T) => {
      (s.value !== $ || l.value !== T) && i.ctx.emit("check-change", t.node.data, $, T), s.value = $, l.value = T;
    }, g = ($) => {
      sR(i.store, i.ctx.emit, () => i.store.value.setCurrentNode(t.node)), i.currentNode.value = t.node, i.props.expandOnClickNode && y(), i.props.checkOnClickNode && !t.node.disabled && _(null, {
        target: { checked: !t.node.checked }
      }), i.ctx.emit("node-click", t.node.data, t.node, f, $);
    }, m = ($) => {
      i.instance.vnode.props.onNodeContextmenu && ($.stopPropagation(), $.preventDefault()), i.ctx.emit("node-contextmenu", $, t.node.data, t.node, f);
    }, y = () => {
      t.node.isLeaf || (a.value ? (i.ctx.emit("node-collapse", t.node.data, t.node, f), t.node.collapse()) : (t.node.expand(), e.emit("node-expand", t.node.data, t.node, f)));
    }, _ = ($, T) => {
      t.node.setChecked(T.target.checked, !i.props.checkStrictly), Bt(() => {
        const E = i.store.value;
        i.ctx.emit("check", t.node.data, {
          checkedNodes: E.getCheckedNodes(),
          checkedKeys: E.getCheckedKeys(),
          halfCheckedNodes: E.getHalfCheckedNodes(),
          halfCheckedKeys: E.getHalfCheckedKeys()
        });
      });
    };
    return {
      ns: n,
      node$: u,
      tree: i,
      expanded: a,
      childNodeRendered: o,
      oldChecked: s,
      oldIndeterminate: l,
      getNodeKey: h,
      getNodeClass: p,
      handleSelectChange: v,
      handleClick: g,
      handleContextMenu: m,
      handleExpandIconClick: y,
      handleCheckChange: _,
      handleChildNodeExpand: ($, T, E) => {
        r(T), i.ctx.emit("node-expand", $, T, E);
      },
      handleDragStart: ($) => {
        i.props.draggable && c.treeNodeDragStart({ event: $, treeNode: t });
      },
      handleDragOver: ($) => {
        $.preventDefault(), i.props.draggable && c.treeNodeDragOver({
          event: $,
          treeNode: { $el: u.value, node: t.node }
        });
      },
      handleDrop: ($) => {
        $.preventDefault();
      },
      handleDragEnd: ($) => {
        i.props.draggable && c.treeNodeDragEnd($);
      },
      CaretRight: S$e
    };
  }
}), mRe = ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key"], yRe = ["aria-expanded"];
function bRe(t, e, n, r, i, a) {
  const o = $r("el-icon"), s = $r("el-checkbox"), l = $r("loading"), u = $r("node-content"), c = $r("el-tree-node"), f = $r("el-collapse-transition");
  return _r((be(), Ue("div", {
    ref: "node$",
    class: Ge([
      t.ns.b("node"),
      t.ns.is("expanded", t.expanded),
      t.ns.is("current", t.node.isCurrent),
      t.ns.is("hidden", !t.node.visible),
      t.ns.is("focusable", !t.node.disabled),
      t.ns.is("checked", !t.node.disabled && t.node.checked),
      t.getNodeClass(t.node)
    ]),
    role: "treeitem",
    tabindex: "-1",
    "aria-expanded": t.expanded,
    "aria-disabled": t.node.disabled,
    "aria-checked": t.node.checked,
    draggable: t.tree.props.draggable,
    "data-key": t.getNodeKey(t.node),
    onClick: e[1] || (e[1] = ai((...d) => t.handleClick && t.handleClick(...d), ["stop"])),
    onContextmenu: e[2] || (e[2] = (...d) => t.handleContextMenu && t.handleContextMenu(...d)),
    onDragstart: e[3] || (e[3] = ai((...d) => t.handleDragStart && t.handleDragStart(...d), ["stop"])),
    onDragover: e[4] || (e[4] = ai((...d) => t.handleDragOver && t.handleDragOver(...d), ["stop"])),
    onDragend: e[5] || (e[5] = ai((...d) => t.handleDragEnd && t.handleDragEnd(...d), ["stop"])),
    onDrop: e[6] || (e[6] = ai((...d) => t.handleDrop && t.handleDrop(...d), ["stop"]))
  }, [
    tt("div", {
      class: Ge(t.ns.be("node", "content")),
      style: dr({ paddingLeft: (t.node.level - 1) * t.tree.props.indent + "px" })
    }, [
      t.tree.props.icon || t.CaretRight ? (be(), Je(o, {
        key: 0,
        class: Ge([
          t.ns.be("node", "expand-icon"),
          t.ns.is("leaf", t.node.isLeaf),
          {
            expanded: !t.node.isLeaf && t.expanded
          }
        ]),
        onClick: ai(t.handleExpandIconClick, ["stop"])
      }, {
        default: ke(() => [
          (be(), Je(As(t.tree.props.icon || t.CaretRight)))
        ]),
        _: 1
      }, 8, ["class", "onClick"])) : Ot("v-if", !0),
      t.showCheckbox ? (be(), Je(s, {
        key: 1,
        "model-value": t.node.checked,
        indeterminate: t.node.indeterminate,
        disabled: !!t.node.disabled,
        onClick: e[0] || (e[0] = ai(() => {
        }, ["stop"])),
        onChange: t.handleCheckChange
      }, null, 8, ["model-value", "indeterminate", "disabled", "onChange"])) : Ot("v-if", !0),
      t.node.loading ? (be(), Je(o, {
        key: 2,
        class: Ge([t.ns.be("node", "loading-icon"), t.ns.is("loading")])
      }, {
        default: ke(() => [
          D(l)
        ]),
        _: 1
      }, 8, ["class"])) : Ot("v-if", !0),
      D(u, {
        node: t.node,
        "render-content": t.renderContent
      }, null, 8, ["node", "render-content"])
    ], 6),
    D(f, null, {
      default: ke(() => [
        !t.renderAfterExpand || t.childNodeRendered ? _r((be(), Ue("div", {
          key: 0,
          class: Ge(t.ns.be("node", "children")),
          role: "group",
          "aria-expanded": t.expanded
        }, [
          (be(!0), Ue(Wt, null, hh(t.node.childNodes, (d) => (be(), Je(c, {
            key: t.getNodeKey(d),
            "render-content": t.renderContent,
            "render-after-expand": t.renderAfterExpand,
            "show-checkbox": t.showCheckbox,
            node: d,
            accordion: t.accordion,
            props: t.props,
            onNodeExpand: t.handleChildNodeExpand
          }, null, 8, ["render-content", "render-after-expand", "show-checkbox", "node", "accordion", "props", "onNodeExpand"]))), 128))
        ], 10, yRe)), [
          [ho, t.expanded]
        ]) : Ot("v-if", !0)
      ]),
      _: 1
    })
  ], 42, mRe)), [
    [ho, t.node.visible]
  ]);
}
var _Re = /* @__PURE__ */ Nn(gRe, [["render", bRe], ["__file", "tree-node.vue"]]);
function ORe({ el$: t }, e) {
  const n = $n("tree"), r = ve([]), i = ve([]);
  _t(() => {
    o();
  }), rp(() => {
    r.value = Array.from(t.value.querySelectorAll("[role=treeitem]")), i.value = Array.from(t.value.querySelectorAll("input[type=checkbox]"));
  }), me(i, (s) => {
    s.forEach((l) => {
      l.setAttribute("tabindex", "-1");
    });
  }), Iy(t, "keydown", (s) => {
    const l = s.target;
    if (!l.className.includes(n.b("node")))
      return;
    const u = s.code;
    r.value = Array.from(t.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));
    const c = r.value.indexOf(l);
    let f;
    if ([wa.up, wa.down].includes(u)) {
      if (s.preventDefault(), u === wa.up) {
        f = c === -1 ? 0 : c !== 0 ? c - 1 : r.value.length - 1;
        const h = f;
        for (; !e.value.getNode(r.value[f].dataset.key).canFocus; ) {
          if (f--, f === h) {
            f = -1;
            break;
          }
          f < 0 && (f = r.value.length - 1);
        }
      } else {
        f = c === -1 ? 0 : c < r.value.length - 1 ? c + 1 : 0;
        const h = f;
        for (; !e.value.getNode(r.value[f].dataset.key).canFocus; ) {
          if (f++, f === h) {
            f = -1;
            break;
          }
          f >= r.value.length && (f = 0);
        }
      }
      f !== -1 && r.value[f].focus();
    }
    [wa.left, wa.right].includes(u) && (s.preventDefault(), l.click());
    const d = l.querySelector('[type="checkbox"]');
    [wa.enter, wa.space].includes(u) && d && (s.preventDefault(), d.click());
  });
  const o = () => {
    var s;
    r.value = Array.from(t.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)), i.value = Array.from(t.value.querySelectorAll("input[type=checkbox]"));
    const l = t.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);
    if (l.length) {
      l[0].setAttribute("tabindex", "0");
      return;
    }
    (s = r.value[0]) == null || s.setAttribute("tabindex", "0");
  };
}
const SRe = ae({
  name: "ElTree",
  components: { ElTreeNode: _Re },
  props: {
    data: {
      type: Array,
      default: () => []
    },
    emptyText: {
      type: String
    },
    renderAfterExpand: {
      type: Boolean,
      default: !0
    },
    nodeKey: String,
    checkStrictly: Boolean,
    defaultExpandAll: Boolean,
    expandOnClickNode: {
      type: Boolean,
      default: !0
    },
    checkOnClickNode: Boolean,
    checkDescendants: {
      type: Boolean,
      default: !1
    },
    autoExpandParent: {
      type: Boolean,
      default: !0
    },
    defaultCheckedKeys: Array,
    defaultExpandedKeys: Array,
    currentNodeKey: [String, Number],
    renderContent: Function,
    showCheckbox: {
      type: Boolean,
      default: !1
    },
    draggable: {
      type: Boolean,
      default: !1
    },
    allowDrag: Function,
    allowDrop: Function,
    props: {
      type: Object,
      default: () => ({
        children: "children",
        label: "label",
        disabled: "disabled"
      })
    },
    lazy: {
      type: Boolean,
      default: !1
    },
    highlightCurrent: Boolean,
    load: Function,
    filterNodeMethod: Function,
    accordion: Boolean,
    indent: {
      type: Number,
      default: 18
    },
    icon: {
      type: _g
    }
  },
  emits: [
    "check-change",
    "current-change",
    "node-click",
    "node-contextmenu",
    "node-collapse",
    "node-expand",
    "check",
    "node-drag-start",
    "node-drag-end",
    "node-drop",
    "node-drag-leave",
    "node-drag-enter",
    "node-drag-over"
  ],
  setup(t, e) {
    const { t: n } = mN(), r = $n("tree"), i = et(cRe, null), a = ee(new dRe({
      key: t.nodeKey,
      data: t.data,
      lazy: t.lazy,
      props: t.props,
      load: t.load,
      currentNodeKey: t.currentNodeKey,
      checkStrictly: t.checkStrictly,
      checkDescendants: t.checkDescendants,
      defaultCheckedKeys: t.defaultCheckedKeys,
      defaultExpandedKeys: t.defaultExpandedKeys,
      autoExpandParent: t.autoExpandParent,
      defaultExpandAll: t.defaultExpandAll,
      filterNodeMethod: t.filterNodeMethod
    }));
    a.value.initialize();
    const o = ee(a.value.root), s = ee(null), l = ee(null), u = ee(null), { broadcastExpanded: c } = Sne(t), { dragState: f } = vRe({
      props: t,
      ctx: e,
      el$: l,
      dropIndicator$: u,
      store: a
    });
    ORe({ el$: l }, a);
    const d = V(() => {
      const { childNodes: W } = o.value, H = i ? i.hasFilteredOptions !== 0 : !1;
      return (!W || W.length === 0 || W.every(({ visible: U }) => !U)) && !H;
    });
    me(() => t.currentNodeKey, (W) => {
      a.value.setCurrentNodeKey(W);
    }), me(() => t.defaultCheckedKeys, (W) => {
      a.value.setDefaultCheckedKey(W);
    }), me(() => t.defaultExpandedKeys, (W) => {
      a.value.setDefaultExpandedKeys(W);
    }), me(() => t.data, (W) => {
      a.value.setData(W);
    }, { deep: !0 }), me(() => t.checkStrictly, (W) => {
      a.value.checkStrictly = W;
    });
    const h = (W) => {
      if (!t.filterNodeMethod)
        throw new Error("[Tree] filterNodeMethod is required when filter");
      a.value.filter(W);
    }, p = (W) => RN(t.nodeKey, W.data), v = (W) => {
      if (!t.nodeKey)
        throw new Error("[Tree] nodeKey is required in getNodePath");
      const H = a.value.getNode(W);
      if (!H)
        return [];
      const U = [H.data];
      let j = H.parent;
      for (; j && j !== o.value; )
        U.push(j.data), j = j.parent;
      return U.reverse();
    }, g = (W, H) => a.value.getCheckedNodes(W, H), m = (W) => a.value.getCheckedKeys(W), y = () => {
      const W = a.value.getCurrentNode();
      return W ? W.data : null;
    }, _ = () => {
      if (!t.nodeKey)
        throw new Error("[Tree] nodeKey is required in getCurrentKey");
      const W = y();
      return W ? W[t.nodeKey] : null;
    }, O = (W, H) => {
      if (!t.nodeKey)
        throw new Error("[Tree] nodeKey is required in setCheckedNodes");
      a.value.setCheckedNodes(W, H);
    }, S = (W, H) => {
      if (!t.nodeKey)
        throw new Error("[Tree] nodeKey is required in setCheckedKeys");
      a.value.setCheckedKeys(W, H);
    }, x = (W, H, U) => {
      a.value.setChecked(W, H, U);
    }, C = () => a.value.getHalfCheckedNodes(), P = () => a.value.getHalfCheckedKeys(), $ = (W, H = !0) => {
      if (!t.nodeKey)
        throw new Error("[Tree] nodeKey is required in setCurrentNode");
      sR(a, e.emit, () => a.value.setUserCurrentNode(W, H));
    }, T = (W, H = !0) => {
      if (!t.nodeKey)
        throw new Error("[Tree] nodeKey is required in setCurrentKey");
      sR(a, e.emit, () => a.value.setCurrentNodeKey(W, H));
    }, E = (W) => a.value.getNode(W), M = (W) => {
      a.value.remove(W);
    }, R = (W, H) => {
      a.value.append(W, H);
    }, N = (W, H) => {
      a.value.insertBefore(W, H);
    }, I = (W, H) => {
      a.value.insertAfter(W, H);
    }, B = (W, H, U) => {
      c(H), e.emit("node-expand", W, H, U);
    }, Q = (W, H) => {
      if (!t.nodeKey)
        throw new Error("[Tree] nodeKey is required in updateKeyChild");
      a.value.updateChildren(W, H);
    };
    return Et("RootTree", {
      ctx: e,
      props: t,
      store: a,
      root: o,
      currentNode: s,
      instance: In()
    }), Et(Cb, void 0), {
      ns: r,
      store: a,
      root: o,
      currentNode: s,
      dragState: f,
      el$: l,
      dropIndicator$: u,
      isEmpty: d,
      filter: h,
      getNodeKey: p,
      getNodePath: v,
      getCheckedNodes: g,
      getCheckedKeys: m,
      getCurrentNode: y,
      getCurrentKey: _,
      setCheckedNodes: O,
      setCheckedKeys: S,
      setChecked: x,
      getHalfCheckedNodes: C,
      getHalfCheckedKeys: P,
      setCurrentNode: $,
      setCurrentKey: T,
      t: n,
      getNode: E,
      remove: M,
      append: R,
      insertBefore: N,
      insertAfter: I,
      handleNodeExpand: B,
      updateKeyChildren: Q
    };
  }
});
function xRe(t, e, n, r, i, a) {
  const o = $r("el-tree-node");
  return be(), Ue("div", {
    ref: "el$",
    class: Ge([
      t.ns.b(),
      t.ns.is("dragging", !!t.dragState.draggingNode),
      t.ns.is("drop-not-allow", !t.dragState.allowDrop),
      t.ns.is("drop-inner", t.dragState.dropType === "inner"),
      { [t.ns.m("highlight-current")]: t.highlightCurrent }
    ]),
    role: "tree"
  }, [
    (be(!0), Ue(Wt, null, hh(t.root.childNodes, (s) => (be(), Je(o, {
      key: t.getNodeKey(s),
      node: s,
      props: t.props,
      accordion: t.accordion,
      "render-after-expand": t.renderAfterExpand,
      "show-checkbox": t.showCheckbox,
      "render-content": t.renderContent,
      onNodeExpand: t.handleNodeExpand
    }, null, 8, ["node", "props", "accordion", "render-after-expand", "show-checkbox", "render-content", "onNodeExpand"]))), 128)),
    t.isEmpty ? (be(), Ue("div", {
      key: 0,
      class: Ge(t.ns.e("empty-block"))
    }, [
      dn(t.$slots, "empty", {}, () => {
        var s;
        return [
          tt("span", {
            class: Ge(t.ns.e("empty-text"))
          }, xi((s = t.emptyText) != null ? s : t.t("el.tree.emptyText")), 3)
        ];
      })
    ], 2)) : Ot("v-if", !0),
    _r(tt("div", {
      ref: "dropIndicator$",
      class: Ge(t.ns.e("drop-indicator"))
    }, null, 2), [
      [ho, t.dragState.showDropIndicator]
    ])
  ], 2);
}
var Qx = /* @__PURE__ */ Nn(SRe, [["render", xRe], ["__file", "tree.vue"]]);
Qx.install = (t) => {
  t.component(Qx.name, Qx);
};
const wRe = Qx, WW = wRe;
function $b(t) {
  "@babel/helpers - typeof";
  return $b = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
    return typeof e;
  } : function(e) {
    return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
  }, $b(t);
}
function CRe(t, e) {
  if ($b(t) != "object" || !t) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if ($b(r) != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function TRe(t) {
  var e = CRe(t, "string");
  return $b(e) == "symbol" ? e : e + "";
}
function PRe(t, e, n) {
  return (e = TRe(e)) in t ? Object.defineProperty(t, e, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : t[e] = n, t;
}
function QW(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e && (r = r.filter(function(i) {
      return Object.getOwnPropertyDescriptor(t, i).enumerable;
    })), n.push.apply(n, r);
  }
  return n;
}
function te(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2 ? QW(Object(n), !0).forEach(function(r) {
      PRe(t, r, n[r]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : QW(Object(n)).forEach(function(r) {
      Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
    });
  }
  return t;
}
function k() {
  return k = Object.assign ? Object.assign.bind() : function(t) {
    for (var e = 1; e < arguments.length; e++) {
      var n = arguments[e];
      for (var r in n) ({}).hasOwnProperty.call(n, r) && (t[r] = n[r]);
    }
    return t;
  }, k.apply(null, arguments);
}
const $Re = (t) => typeof t == "function", ARe = Array.isArray, ERe = (t) => typeof t == "string", MRe = (t) => t !== null && typeof t == "object", IRe = /^on[^a-z]/, DRe = (t) => IRe.test(t), wne = (t) => {
  const e = /* @__PURE__ */ Object.create(null);
  return (n) => e[n] || (e[n] = t(n));
}, RRe = /-(\w)/g, kN = wne((t) => t.replace(RRe, (e, n) => n ? n.toUpperCase() : "")), kRe = /\B([A-Z])/g, LRe = wne((t) => t.replace(kRe, "-$1").toLowerCase()), NRe = Object.prototype.hasOwnProperty, HW = (t, e) => NRe.call(t, e);
function BRe(t, e, n, r) {
  const i = t[n];
  if (i != null) {
    const a = HW(i, "default");
    if (a && r === void 0) {
      const o = i.default;
      r = i.type !== Function && $Re(o) ? o() : o;
    }
    i.type === Boolean && (!HW(e, n) && !a ? r = !1 : r === "" && (r = !0));
  }
  return r;
}
function zRe(t) {
  return Object.keys(t).reduce((e, n) => ((n.startsWith("data-") || n.startsWith("aria-")) && (e[n] = t[n]), e), {});
}
function m0(t) {
  return typeof t == "number" ? `${t}px` : t;
}
function $v(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0;
  return typeof t == "function" ? t(e) : t ?? n;
}
function VRe(t) {
  let e;
  const n = new Promise((i) => {
    e = t(() => {
      i(!0);
    });
  }), r = () => {
    e == null || e();
  };
  return r.then = (i, a) => n.then(i, a), r.promise = n, r;
}
function Re() {
  const t = [];
  for (let e = 0; e < arguments.length; e++) {
    const n = e < 0 || arguments.length <= e ? void 0 : arguments[e];
    if (n) {
      if (ERe(n))
        t.push(n);
      else if (ARe(n))
        for (let r = 0; r < n.length; r++) {
          const i = Re(n[r]);
          i && t.push(i);
        }
      else if (MRe(n))
        for (const r in n)
          n[r] && t.push(r);
    }
  }
  return t.join(" ");
}
var Cne = function() {
  if (typeof Map < "u")
    return Map;
  function t(e, n) {
    var r = -1;
    return e.some(function(i, a) {
      return i[0] === n ? (r = a, !0) : !1;
    }), r;
  }
  return (
    /** @class */
    function() {
      function e() {
        this.__entries__ = [];
      }
      return Object.defineProperty(e.prototype, "size", {
        /**
         * @returns {boolean}
         */
        get: function() {
          return this.__entries__.length;
        },
        enumerable: !0,
        configurable: !0
      }), e.prototype.get = function(n) {
        var r = t(this.__entries__, n), i = this.__entries__[r];
        return i && i[1];
      }, e.prototype.set = function(n, r) {
        var i = t(this.__entries__, n);
        ~i ? this.__entries__[i][1] = r : this.__entries__.push([n, r]);
      }, e.prototype.delete = function(n) {
        var r = this.__entries__, i = t(r, n);
        ~i && r.splice(i, 1);
      }, e.prototype.has = function(n) {
        return !!~t(this.__entries__, n);
      }, e.prototype.clear = function() {
        this.__entries__.splice(0);
      }, e.prototype.forEach = function(n, r) {
        r === void 0 && (r = null);
        for (var i = 0, a = this.__entries__; i < a.length; i++) {
          var o = a[i];
          n.call(r, o[1], o[0]);
        }
      }, e;
    }()
  );
}(), uR = typeof window < "u" && typeof document < "u" && window.document === document, Gw = function() {
  return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
}(), FRe = function() {
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Gw) : function(t) {
    return setTimeout(function() {
      return t(Date.now());
    }, 1e3 / 60);
  };
}(), WRe = 2;
function QRe(t, e) {
  var n = !1, r = !1, i = 0;
  function a() {
    n && (n = !1, t()), r && s();
  }
  function o() {
    FRe(a);
  }
  function s() {
    var l = Date.now();
    if (n) {
      if (l - i < WRe)
        return;
      r = !0;
    } else
      n = !0, r = !1, setTimeout(o, e);
    i = l;
  }
  return s;
}
var HRe = 20, GRe = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], jRe = typeof MutationObserver < "u", ZRe = (
  /** @class */
  function() {
    function t() {
      this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = QRe(this.refresh.bind(this), HRe);
    }
    return t.prototype.addObserver = function(e) {
      ~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
    }, t.prototype.removeObserver = function(e) {
      var n = this.observers_, r = n.indexOf(e);
      ~r && n.splice(r, 1), !n.length && this.connected_ && this.disconnect_();
    }, t.prototype.refresh = function() {
      var e = this.updateObservers_();
      e && this.refresh();
    }, t.prototype.updateObservers_ = function() {
      var e = this.observers_.filter(function(n) {
        return n.gatherActive(), n.hasActive();
      });
      return e.forEach(function(n) {
        return n.broadcastActive();
      }), e.length > 0;
    }, t.prototype.connect_ = function() {
      !uR || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), jRe ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
        attributes: !0,
        childList: !0,
        characterData: !0,
        subtree: !0
      })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
    }, t.prototype.disconnect_ = function() {
      !uR || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
    }, t.prototype.onTransitionEnd_ = function(e) {
      var n = e.propertyName, r = n === void 0 ? "" : n, i = GRe.some(function(a) {
        return !!~r.indexOf(a);
      });
      i && this.refresh();
    }, t.getInstance = function() {
      return this.instance_ || (this.instance_ = new t()), this.instance_;
    }, t.instance_ = null, t;
  }()
), Tne = function(t, e) {
  for (var n = 0, r = Object.keys(e); n < r.length; n++) {
    var i = r[n];
    Object.defineProperty(t, i, {
      value: e[i],
      enumerable: !1,
      writable: !1,
      configurable: !0
    });
  }
  return t;
}, Pg = function(t) {
  var e = t && t.ownerDocument && t.ownerDocument.defaultView;
  return e || Gw;
}, Pne = m2(0, 0, 0, 0);
function jw(t) {
  return parseFloat(t) || 0;
}
function GW(t) {
  for (var e = [], n = 1; n < arguments.length; n++)
    e[n - 1] = arguments[n];
  return e.reduce(function(r, i) {
    var a = t["border-" + i + "-width"];
    return r + jw(a);
  }, 0);
}
function URe(t) {
  for (var e = ["top", "right", "bottom", "left"], n = {}, r = 0, i = e; r < i.length; r++) {
    var a = i[r], o = t["padding-" + a];
    n[a] = jw(o);
  }
  return n;
}
function XRe(t) {
  var e = t.getBBox();
  return m2(0, 0, e.width, e.height);
}
function YRe(t) {
  var e = t.clientWidth, n = t.clientHeight;
  if (!e && !n)
    return Pne;
  var r = Pg(t).getComputedStyle(t), i = URe(r), a = i.left + i.right, o = i.top + i.bottom, s = jw(r.width), l = jw(r.height);
  if (r.boxSizing === "border-box" && (Math.round(s + a) !== e && (s -= GW(r, "left", "right") + a), Math.round(l + o) !== n && (l -= GW(r, "top", "bottom") + o)), !KRe(t)) {
    var u = Math.round(s + a) - e, c = Math.round(l + o) - n;
    Math.abs(u) !== 1 && (s -= u), Math.abs(c) !== 1 && (l -= c);
  }
  return m2(i.left, i.top, s, l);
}
var qRe = /* @__PURE__ */ function() {
  return typeof SVGGraphicsElement < "u" ? function(t) {
    return t instanceof Pg(t).SVGGraphicsElement;
  } : function(t) {
    return t instanceof Pg(t).SVGElement && typeof t.getBBox == "function";
  };
}();
function KRe(t) {
  return t === Pg(t).document.documentElement;
}
function JRe(t) {
  return uR ? qRe(t) ? XRe(t) : YRe(t) : Pne;
}
function eke(t) {
  var e = t.x, n = t.y, r = t.width, i = t.height, a = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, o = Object.create(a.prototype);
  return Tne(o, {
    x: e,
    y: n,
    width: r,
    height: i,
    top: n,
    right: e + r,
    bottom: i + n,
    left: e
  }), o;
}
function m2(t, e, n, r) {
  return { x: t, y: e, width: n, height: r };
}
var tke = (
  /** @class */
  function() {
    function t(e) {
      this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = m2(0, 0, 0, 0), this.target = e;
    }
    return t.prototype.isActive = function() {
      var e = JRe(this.target);
      return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
    }, t.prototype.broadcastRect = function() {
      var e = this.contentRect_;
      return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
    }, t;
  }()
), nke = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e, n) {
      var r = eke(n);
      Tne(this, { target: e, contentRect: r });
    }
    return t;
  }()
), rke = (
  /** @class */
  function() {
    function t(e, n, r) {
      if (this.activeObservations_ = [], this.observations_ = new Cne(), typeof e != "function")
        throw new TypeError("The callback provided as parameter 1 is not a function.");
      this.callback_ = e, this.controller_ = n, this.callbackCtx_ = r;
    }
    return t.prototype.observe = function(e) {
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      if (!(typeof Element > "u" || !(Element instanceof Object))) {
        if (!(e instanceof Pg(e).Element))
          throw new TypeError('parameter 1 is not of type "Element".');
        var n = this.observations_;
        n.has(e) || (n.set(e, new tke(e)), this.controller_.addObserver(this), this.controller_.refresh());
      }
    }, t.prototype.unobserve = function(e) {
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      if (!(typeof Element > "u" || !(Element instanceof Object))) {
        if (!(e instanceof Pg(e).Element))
          throw new TypeError('parameter 1 is not of type "Element".');
        var n = this.observations_;
        n.has(e) && (n.delete(e), n.size || this.controller_.removeObserver(this));
      }
    }, t.prototype.disconnect = function() {
      this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
    }, t.prototype.gatherActive = function() {
      var e = this;
      this.clearActive(), this.observations_.forEach(function(n) {
        n.isActive() && e.activeObservations_.push(n);
      });
    }, t.prototype.broadcastActive = function() {
      if (this.hasActive()) {
        var e = this.callbackCtx_, n = this.activeObservations_.map(function(r) {
          return new nke(r.target, r.broadcastRect());
        });
        this.callback_.call(e, n, e), this.clearActive();
      }
    }, t.prototype.clearActive = function() {
      this.activeObservations_.splice(0);
    }, t.prototype.hasActive = function() {
      return this.activeObservations_.length > 0;
    }, t;
  }()
), $ne = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Cne(), Ane = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e) {
      if (!(this instanceof t))
        throw new TypeError("Cannot call a class as a function.");
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      var n = ZRe.getInstance(), r = new rke(e, n, this);
      $ne.set(this, r);
    }
    return t;
  }()
);
[
  "observe",
  "unobserve",
  "disconnect"
].forEach(function(t) {
  Ane.prototype[t] = function() {
    var e;
    return (e = $ne.get(this))[t].apply(e, arguments);
  };
});
var Ene = function() {
  return typeof Gw.ResizeObserver < "u" ? Gw.ResizeObserver : Ane;
}();
const cR = (t) => t != null && t !== "", li = (t, e) => {
  const n = k({}, t);
  return Object.keys(e).forEach((r) => {
    const i = n[r];
    if (i)
      i.type || i.default ? i.default = e[r] : i.def ? i.def(e[r]) : n[r] = {
        type: i,
        default: e[r]
      };
    else
      throw new Error(`not have ${r} prop`);
  }), n;
}, ike = (t) => {
  const e = Object.keys(t), n = {}, r = {}, i = {};
  for (let a = 0, o = e.length; a < o; a++) {
    const s = e[a];
    DRe(s) ? (n[s[2].toLowerCase() + s.slice(3)] = t[s], r[s] = t[s]) : i[s] = t[s];
  }
  return {
    onEvents: r,
    events: n,
    extraAttrs: i
  };
}, ake = function() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = {}, r = /;(?![^(]*\))/g, i = /:(.+)/;
  return typeof t == "object" ? t : (t.split(r).forEach(function(a) {
    if (a) {
      const o = a.split(i);
      if (o.length > 1) {
        const s = e ? kN(o[0].trim()) : o[0].trim();
        n[s] = o[1].trim();
      }
    }
  }), n);
}, Zw = (t, e) => t[e] !== void 0, Mne = Symbol("skipFlatten"), qr = function() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  const n = Array.isArray(t) ? t : [t], r = [];
  return n.forEach((i) => {
    Array.isArray(i) ? r.push(...qr(i, e)) : i && i.type === Wt ? i.key === Mne ? r.push(i) : r.push(...qr(i.children, e)) : i && df(i) ? e && !LN(i) ? r.push(i) : e || r.push(i) : cR(i) && r.push(i);
  }), r;
}, Ine = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  if (df(t))
    return t.type === Wt ? e === "default" ? qr(t.children) : [] : t.children && t.children[e] ? qr(t.children[e](n)) : [];
  {
    const r = t.$slots[e] && t.$slots[e](n);
    return qr(r);
  }
}, xu = (t) => {
  var e;
  let n = ((e = t == null ? void 0 : t.vnode) === null || e === void 0 ? void 0 : e.el) || t && (t.$el || t);
  for (; n && !n.tagName; )
    n = n.nextSibling;
  return n;
}, oke = (t) => {
  const e = {};
  if (t.$ && t.$.vnode) {
    const n = t.$.vnode.props || {};
    Object.keys(t.$props).forEach((r) => {
      const i = t.$props[r], a = LRe(r);
      (i !== void 0 || a in n) && (e[r] = i);
    });
  } else if (df(t) && typeof t.type == "object") {
    const n = t.props || {}, r = {};
    Object.keys(n).forEach((a) => {
      r[kN(a)] = n[a];
    });
    const i = t.type.props || {};
    Object.keys(i).forEach((a) => {
      const o = BRe(i, r, a, r[a]);
      (o !== void 0 || a in r) && (e[a] = o);
    });
  }
  return e;
}, ske = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, i;
  if (t.$) {
    const a = t[e];
    if (a !== void 0)
      return typeof a == "function" && r ? a(n) : a;
    i = t.$slots[e], i = r && i ? i(n) : i;
  } else if (df(t)) {
    const a = t.props && t.props[e];
    if (a !== void 0 && t.props !== null)
      return typeof a == "function" && r ? a(n) : a;
    t.type === Wt ? i = t.children : t.children && t.children[e] && (i = t.children[e], i = r && i ? i(n) : i);
  }
  return Array.isArray(i) && (i = qr(i), i = i.length === 1 ? i[0] : i, i = i.length === 0 ? void 0 : i), i;
};
function jW() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = {};
  return t.$ ? n = k(k({}, n), t.$attrs) : n = k(k({}, n), t.props), ike(n)[e ? "onEvents" : "events"];
}
function lke(t, e) {
  let r = ((df(t) ? t.props : t.$attrs) || {}).style || {};
  return typeof r == "string" && (r = ake(r, e)), r;
}
function uke(t) {
  return t.length === 1 && t[0].type === Wt;
}
function LN(t) {
  return t && (t.type === Aee || t.type === Wt && t.children.length === 0 || t.type === KT && t.children.trim() === "");
}
function Zl() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  const e = [];
  return t.forEach((n) => {
    Array.isArray(n) ? e.push(...n) : (n == null ? void 0 : n.type) === Wt ? e.push(...Zl(n.children)) : e.push(n);
  }), e.filter((n) => !LN(n));
}
function po(t) {
  return Array.isArray(t) && t.length === 1 && (t = t[0]), t && t.__v_isVNode && typeof t.type != "symbol";
}
function y2(t, e) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "default";
  var r, i;
  return (r = e[n]) !== null && r !== void 0 ? r : (i = t[n]) === null || i === void 0 ? void 0 : i.call(t);
}
const $g = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ResizeObserver",
  props: {
    disabled: Boolean,
    onResize: Function
  },
  emits: ["resize"],
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = zn({
      width: 0,
      height: 0,
      offsetHeight: 0,
      offsetWidth: 0
    });
    let i = null, a = null;
    const o = () => {
      a && (a.disconnect(), a = null);
    }, s = (c) => {
      const {
        onResize: f
      } = t, d = c[0].target, {
        width: h,
        height: p
      } = d.getBoundingClientRect(), {
        offsetWidth: v,
        offsetHeight: g
      } = d, m = Math.floor(h), y = Math.floor(p);
      if (r.width !== m || r.height !== y || r.offsetWidth !== v || r.offsetHeight !== g) {
        const _ = {
          width: m,
          height: y,
          offsetWidth: v,
          offsetHeight: g
        };
        k(r, _), f && Promise.resolve().then(() => {
          f(k(k({}, _), {
            offsetWidth: v,
            offsetHeight: g
          }), d);
        });
      }
    }, l = In(), u = () => {
      const {
        disabled: c
      } = t;
      if (c) {
        o();
        return;
      }
      const f = xu(l);
      f !== i && (o(), i = f), !a && f && (a = new Ene(s), a.observe(f));
    };
    return _t(() => {
      u();
    }), rp(() => {
      u();
    }), qu(() => {
      o();
    }), me(() => t.disabled, () => {
      u();
    }, {
      flush: "post"
    }), () => {
      var c;
      return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
    };
  }
});
let Dne = (t) => setTimeout(t, 16), Rne = (t) => clearTimeout(t);
typeof window < "u" && "requestAnimationFrame" in window && (Dne = (t) => window.requestAnimationFrame(t), Rne = (t) => window.cancelAnimationFrame(t));
let ZW = 0;
const NN = /* @__PURE__ */ new Map();
function kne(t) {
  NN.delete(t);
}
function en(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  ZW += 1;
  const n = ZW;
  function r(i) {
    if (i === 0)
      kne(n), t();
    else {
      const a = Dne(() => {
        r(i - 1);
      });
      NN.set(n, a);
    }
  }
  return r(e), n;
}
en.cancel = (t) => {
  const e = NN.get(t);
  return kne(e), Rne(e);
};
const pf = function() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
    e[n] = arguments[n];
  return e;
}, fm = (t) => {
  const e = t;
  return e.install = function(n) {
    n.component(e.displayName || e.name, t);
  }, t;
};
function Uw() {
  return {
    type: [Function, Array]
  };
}
function sn(t) {
  return {
    type: Object,
    default: t
  };
}
function Tt(t) {
  return {
    type: Boolean,
    default: t
  };
}
function Ct(t) {
  return {
    type: Function,
    default: t
  };
}
function Fo(t, e) {
  return {
    validator: () => !0,
    default: t
  };
}
function Lh(t) {
  return {
    type: Array,
    default: t
  };
}
function rr(t) {
  return {
    type: String,
    default: t
  };
}
function or(t, e) {
  return t ? {
    type: t,
    default: e
  } : Fo(e);
}
let mi = !1;
try {
  const t = Object.defineProperty({}, "passive", {
    get() {
      mi = !0;
    }
  });
  window.addEventListener("testPassive", null, t), window.removeEventListener("testPassive", null, t);
} catch {
}
function yi(t, e, n, r) {
  if (t && t.addEventListener) {
    let i = r;
    i === void 0 && mi && (e === "touchstart" || e === "touchmove" || e === "wheel") && (i = {
      passive: !1
    }), t.addEventListener(e, n, i);
  }
  return {
    remove: () => {
      t && t.removeEventListener && t.removeEventListener(e, n);
    }
  };
}
const BN = "anticon", Lne = Symbol("GlobalFormContextKey"), cke = (t) => {
  Et(Lne, t);
}, fke = () => et(Lne, {
  validateMessages: V(() => {
  })
}), dke = () => ({
  iconPrefixCls: String,
  getTargetContainer: {
    type: Function
  },
  getPopupContainer: {
    type: Function
  },
  prefixCls: String,
  getPrefixCls: {
    type: Function
  },
  renderEmpty: {
    type: Function
  },
  transformCellText: {
    type: Function
  },
  csp: sn(),
  input: sn(),
  autoInsertSpaceInButton: {
    type: Boolean,
    default: void 0
  },
  locale: sn(),
  pageHeader: sn(),
  componentSize: {
    type: String
  },
  componentDisabled: {
    type: Boolean,
    default: void 0
  },
  direction: {
    type: String,
    default: "ltr"
  },
  space: sn(),
  virtual: {
    type: Boolean,
    default: void 0
  },
  dropdownMatchSelectWidth: {
    type: [Number, Boolean],
    default: !0
  },
  form: sn(),
  pagination: sn(),
  theme: sn(),
  select: sn(),
  wave: sn()
}), zN = Symbol("configProvider"), Nne = {
  getPrefixCls: (t, e) => e || (t ? `ant-${t}` : "ant"),
  iconPrefixCls: V(() => BN),
  getPopupContainer: V(() => () => document.body),
  direction: V(() => "ltr")
}, b2 = () => et(zN, Nne), hke = (t) => Et(zN, t), Bne = Symbol("DisabledContextKey"), Vl = () => et(Bne, ee(void 0)), zne = (t) => {
  const e = Vl();
  return Et(Bne, V(() => {
    var n;
    return (n = t.value) !== null && n !== void 0 ? n : e.value;
  })), t;
}, pke = {
  // Options.jsx
  items_per_page: "/ page",
  jump_to: "Go to",
  jump_to_confirm: "confirm",
  page: "",
  // Pagination.jsx
  prev_page: "Previous Page",
  next_page: "Next Page",
  prev_5: "Previous 5 Pages",
  next_5: "Next 5 Pages",
  prev_3: "Previous 3 Pages",
  next_3: "Next 3 Pages"
}, vke = {
  locale: "en_US",
  today: "Today",
  now: "Now",
  backToToday: "Back to today",
  ok: "Ok",
  clear: "Clear",
  month: "Month",
  year: "Year",
  timeSelect: "select time",
  dateSelect: "select date",
  weekSelect: "Choose a week",
  monthSelect: "Choose a month",
  yearSelect: "Choose a year",
  decadeSelect: "Choose a decade",
  yearFormat: "YYYY",
  dateFormat: "M/D/YYYY",
  dayFormat: "D",
  dateTimeFormat: "M/D/YYYY HH:mm:ss",
  monthBeforeYear: !0,
  previousMonth: "Previous month (PageUp)",
  nextMonth: "Next month (PageDown)",
  previousYear: "Last year (Control + left)",
  nextYear: "Next year (Control + right)",
  previousDecade: "Last decade",
  nextDecade: "Next decade",
  previousCentury: "Last century",
  nextCentury: "Next century"
}, Vne = {
  placeholder: "Select time",
  rangePlaceholder: ["Start time", "End time"]
}, UW = {
  lang: k({
    placeholder: "Select date",
    yearPlaceholder: "Select year",
    quarterPlaceholder: "Select quarter",
    monthPlaceholder: "Select month",
    weekPlaceholder: "Select week",
    rangePlaceholder: ["Start date", "End date"],
    rangeYearPlaceholder: ["Start year", "End year"],
    rangeQuarterPlaceholder: ["Start quarter", "End quarter"],
    rangeMonthPlaceholder: ["Start month", "End month"],
    rangeWeekPlaceholder: ["Start week", "End week"]
  }, vke),
  timePickerLocale: k({}, Vne)
}, Za = "${label} is not a valid ${type}", Nu = {
  locale: "en",
  Pagination: pke,
  DatePicker: UW,
  TimePicker: Vne,
  Calendar: UW,
  global: {
    placeholder: "Please select"
  },
  Table: {
    filterTitle: "Filter menu",
    filterConfirm: "OK",
    filterReset: "Reset",
    filterEmptyText: "No filters",
    filterCheckall: "Select all items",
    filterSearchPlaceholder: "Search in filters",
    emptyText: "No data",
    selectAll: "Select current page",
    selectInvert: "Invert current page",
    selectNone: "Clear all data",
    selectionAll: "Select all data",
    sortTitle: "Sort",
    expand: "Expand row",
    collapse: "Collapse row",
    triggerDesc: "Click to sort descending",
    triggerAsc: "Click to sort ascending",
    cancelSort: "Click to cancel sorting"
  },
  Tour: {
    Next: "Next",
    Previous: "Previous",
    Finish: "Finish"
  },
  Modal: {
    okText: "OK",
    cancelText: "Cancel",
    justOkText: "OK"
  },
  Popconfirm: {
    okText: "OK",
    cancelText: "Cancel"
  },
  Transfer: {
    titles: ["", ""],
    searchPlaceholder: "Search here",
    itemUnit: "item",
    itemsUnit: "items",
    remove: "Remove",
    selectCurrent: "Select current page",
    removeCurrent: "Remove current page",
    selectAll: "Select all data",
    removeAll: "Remove all data",
    selectInvert: "Invert current page"
  },
  Upload: {
    uploading: "Uploading...",
    removeFile: "Remove file",
    uploadError: "Upload error",
    previewFile: "Preview file",
    downloadFile: "Download file"
  },
  Empty: {
    description: "No data"
  },
  Icon: {
    icon: "icon"
  },
  Text: {
    edit: "Edit",
    copy: "Copy",
    copied: "Copied",
    expand: "Expand"
  },
  PageHeader: {
    back: "Back"
  },
  Form: {
    optional: "(optional)",
    defaultValidateMessages: {
      default: "Field validation error for ${label}",
      required: "Please enter ${label}",
      enum: "${label} must be one of [${enum}]",
      whitespace: "${label} cannot be a blank character",
      date: {
        format: "${label} date format is invalid",
        parse: "${label} cannot be converted to a date",
        invalid: "${label} is an invalid date"
      },
      types: {
        string: Za,
        method: Za,
        array: Za,
        object: Za,
        number: Za,
        date: Za,
        boolean: Za,
        integer: Za,
        float: Za,
        regexp: Za,
        email: Za,
        url: Za,
        hex: Za
      },
      string: {
        len: "${label} must be ${len} characters",
        min: "${label} must be at least ${min} characters",
        max: "${label} must be up to ${max} characters",
        range: "${label} must be between ${min}-${max} characters"
      },
      number: {
        len: "${label} must be equal to ${len}",
        min: "${label} must be minimum ${min}",
        max: "${label} must be maximum ${max}",
        range: "${label} must be between ${min}-${max}"
      },
      array: {
        len: "Must be ${len} ${label}",
        min: "At least ${min} ${label}",
        max: "At most ${max} ${label}",
        range: "The amount of ${label} must be between ${min}-${max}"
      },
      pattern: {
        mismatch: "${label} does not match the pattern ${pattern}"
      }
    }
  },
  Image: {
    preview: "Preview"
  },
  QRCode: {
    expired: "QR code expired",
    refresh: "Refresh",
    scanned: "Scanned"
  }
}, Fne = ae({
  compatConfig: {
    MODE: 3
  },
  name: "LocaleReceiver",
  props: {
    componentName: String,
    defaultLocale: {
      type: [Object, Function]
    },
    children: {
      type: Function
    }
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = et("localeData", {}), i = V(() => {
      const {
        componentName: o = "global",
        defaultLocale: s
      } = t, l = s || Nu[o || "global"], {
        antLocale: u
      } = r, c = o && u ? u[o] : {};
      return k(k({}, typeof l == "function" ? l() : l), c || {});
    }), a = V(() => {
      const {
        antLocale: o
      } = r, s = o && o.locale;
      return o && o.exist && !s ? Nu.locale : s;
    });
    return () => {
      const o = t.children || n.default, {
        antLocale: s
      } = r;
      return o == null ? void 0 : o(i.value, a.value, s);
    };
  }
});
function _2(t, e, n) {
  const r = et("localeData", {});
  return [V(() => {
    const {
      antLocale: a
    } = r, o = z(e) || Nu[t || "global"], s = t && a ? a[t] : {};
    return k(k(k({}, typeof o == "function" ? o() : o), s || {}), z(n) || {});
  })];
}
function VN(t) {
  for (var e = 0, n, r = 0, i = t.length; i >= 4; ++r, i -= 4)
    n = t.charCodeAt(r) & 255 | (t.charCodeAt(++r) & 255) << 8 | (t.charCodeAt(++r) & 255) << 16 | (t.charCodeAt(++r) & 255) << 24, n = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
    n >>> 24, e = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
    (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
  switch (i) {
    case 3:
      e ^= (t.charCodeAt(r + 2) & 255) << 16;
    case 2:
      e ^= (t.charCodeAt(r + 1) & 255) << 8;
    case 1:
      e ^= t.charCodeAt(r) & 255, e = /* Math.imul(h, m): */
      (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
  }
  return e ^= e >>> 13, e = /* Math.imul(h, m): */
  (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16), ((e ^ e >>> 15) >>> 0).toString(36);
}
const XW = "%";
class gke {
  constructor(e) {
    this.cache = /* @__PURE__ */ new Map(), this.instanceId = e;
  }
  get(e) {
    return this.cache.get(Array.isArray(e) ? e.join(XW) : e) || null;
  }
  update(e, n) {
    const r = Array.isArray(e) ? e.join(XW) : e, i = this.cache.get(r), a = n(i);
    a === null ? this.cache.delete(r) : this.cache.set(r, a);
  }
}
const Wne = "data-token-hash", mh = "data-css-hash", mke = "data-cache-path", Av = "__cssinjs_instance__";
function Ab() {
  const t = Math.random().toString(12).slice(2);
  if (typeof document < "u" && document.head && document.body) {
    const e = document.body.querySelectorAll(`style[${mh}]`) || [], {
      firstChild: n
    } = document.head;
    Array.from(e).forEach((i) => {
      i[Av] = i[Av] || t, i[Av] === t && document.head.insertBefore(i, n);
    });
    const r = {};
    Array.from(document.querySelectorAll(`style[${mh}]`)).forEach((i) => {
      var a;
      const o = i.getAttribute(mh);
      r[o] ? i[Av] === t && ((a = i.parentNode) === null || a === void 0 || a.removeChild(i)) : r[o] = !0;
    });
  }
  return new gke(t);
}
const Qne = Symbol("StyleContextKey"), yke = () => {
  var t, e, n;
  const r = In();
  let i;
  if (r && r.appContext) {
    const a = (n = (e = (t = r.appContext) === null || t === void 0 ? void 0 : t.config) === null || e === void 0 ? void 0 : e.globalProperties) === null || n === void 0 ? void 0 : n.__ANTDV_CSSINJS_CACHE__;
    a ? i = a : (i = Ab(), r.appContext.config.globalProperties && (r.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = i));
  } else
    i = Ab();
  return i;
}, Hne = {
  cache: Ab(),
  defaultCache: !0,
  hashPriority: "low"
}, O2 = () => {
  const t = yke();
  return et(Qne, ve(k(k({}, Hne), {
    cache: t
  })));
}, bke = (t) => {
  const e = O2(), n = ve(k(k({}, Hne), {
    cache: Ab()
  }));
  return me([() => z(t), e], () => {
    const r = k({}, e.value), i = z(t);
    Object.keys(i).forEach((o) => {
      const s = i[o];
      i[o] !== void 0 && (r[o] = s);
    });
    const {
      cache: a
    } = i;
    r.cache = r.cache || Ab(), r.defaultCache = !a && e.value.defaultCache, n.value = r;
  }, {
    immediate: !0
  }), Et(Qne, n), n;
}, _ke = () => ({
  autoClear: Tt(),
  /** @private Test only. Not work in production. */
  mock: rr(),
  /**
   * Only set when you need ssr to extract style on you own.
   * If not provided, it will auto create <style /> on the end of Provider in server side.
   */
  cache: sn(),
  /** Tell children that this context is default generated context */
  defaultCache: Tt(),
  /** Use `:where` selector to reduce hashId css selector priority */
  hashPriority: rr(),
  /** Tell cssinjs where to inject style in */
  container: or(),
  /** Component wil render inline  `<style />` for fallback in SSR. Not recommend. */
  ssrInline: Tt(),
  /** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
  transformers: Lh(),
  /**
   * Linters to lint css before inject in document.
   * Styles will be linted after transforming.
   * Please note that `linters` do not support dynamic update.
   */
  linters: Lh()
});
fm(ae({
  name: "AStyleProvider",
  inheritAttrs: !1,
  props: _ke(),
  setup(t, e) {
    let {
      slots: n
    } = e;
    return bke(t), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
}));
function Oke() {
  return !1;
}
let fR = !1;
function Ske() {
  return fR;
}
const xke = process.env.NODE_ENV === "production" ? Oke : Ske;
if (process.env.NODE_ENV !== "production" && typeof module < "u" && module && module.hot && typeof window < "u") {
  const t = window;
  if (typeof t.webpackHotUpdate == "function") {
    const e = t.webpackHotUpdate;
    t.webpackHotUpdate = function() {
      return fR = !0, setTimeout(() => {
        fR = !1;
      }, 0), e(...arguments);
    };
  }
}
function Gne(t, e, n, r) {
  const i = O2(), a = ve(""), o = ve();
  Vt(() => {
    a.value = [t, ...e.value].join("%");
  });
  const s = xke(), l = (u) => {
    i.value.cache.update(u, (c) => {
      const [f = 0, d] = c || [];
      return f - 1 === 0 ? (r == null || r(d, !1), null) : [f - 1, d];
    });
  };
  return me(a, (u, c) => {
    c && l(c), i.value.cache.update(u, (f) => {
      const [d = 0, h] = f || [];
      let p = h;
      process.env.NODE_ENV !== "production" && h && s && (r == null || r(p, s), p = null);
      const v = p || n();
      return [d + 1, v];
    }), o.value = i.value.cache.get(a.value)[1];
  }, {
    immediate: !0
  }), Qt(() => {
    l(a.value);
  }), o;
}
function is() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function kc(t, e) {
  return t && t.contains ? t.contains(e) : !1;
}
const YW = "data-vc-order", wke = "vc-util-key", dR = /* @__PURE__ */ new Map();
function jne() {
  let {
    mark: t
  } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  return t ? t.startsWith("data-") ? t : `data-${t}` : wke;
}
function S2(t) {
  return t.attachTo ? t.attachTo : document.querySelector("head") || document.body;
}
function Cke(t) {
  return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
}
function Zne(t) {
  return Array.from((dR.get(t) || t).children).filter((e) => e.tagName === "STYLE");
}
function Une(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  if (!is())
    return null;
  const {
    csp: n,
    prepend: r
  } = e, i = document.createElement("style");
  i.setAttribute(YW, Cke(r)), n != null && n.nonce && (i.nonce = n == null ? void 0 : n.nonce), i.innerHTML = t;
  const a = S2(e), {
    firstChild: o
  } = a;
  if (r) {
    if (r === "queue") {
      const s = Zne(a).filter((l) => ["prepend", "prependQueue"].includes(l.getAttribute(YW)));
      if (s.length)
        return a.insertBefore(i, s[s.length - 1].nextSibling), i;
    }
    a.insertBefore(i, o);
  } else
    a.appendChild(i);
  return i;
}
function Xne(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const n = S2(e);
  return Zne(n).find((r) => r.getAttribute(jne(e)) === t);
}
function Xw(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const n = Xne(t, e);
  n && S2(e).removeChild(n);
}
function Tke(t, e) {
  const n = dR.get(t);
  if (!n || !kc(document, n)) {
    const r = Une("", e), {
      parentNode: i
    } = r;
    dR.set(t, i), t.removeChild(r);
  }
}
function Eb(t, e) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  var r, i, a;
  const o = S2(n);
  Tke(o, n);
  const s = Xne(e, n);
  if (s)
    return !((r = n.csp) === null || r === void 0) && r.nonce && s.nonce !== ((i = n.csp) === null || i === void 0 ? void 0 : i.nonce) && (s.nonce = (a = n.csp) === null || a === void 0 ? void 0 : a.nonce), s.innerHTML !== t && (s.innerHTML = t), s;
  const l = Une(t, n);
  return l.setAttribute(jne(n), e), l;
}
function Pke(t, e) {
  if (t.length !== e.length)
    return !1;
  for (let n = 0; n < t.length; n++)
    if (t[n] !== e[n])
      return !1;
  return !0;
}
class Ag {
  constructor() {
    this.cache = /* @__PURE__ */ new Map(), this.keys = [], this.cacheCallTimes = 0;
  }
  size() {
    return this.keys.length;
  }
  internalGet(e) {
    let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, r = {
      map: this.cache
    };
    return e.forEach((i) => {
      var a;
      r ? r = (a = r == null ? void 0 : r.map) === null || a === void 0 ? void 0 : a.get(i) : r = void 0;
    }), r != null && r.value && n && (r.value[1] = this.cacheCallTimes++), r == null ? void 0 : r.value;
  }
  get(e) {
    var n;
    return (n = this.internalGet(e, !0)) === null || n === void 0 ? void 0 : n[0];
  }
  has(e) {
    return !!this.internalGet(e);
  }
  set(e, n) {
    if (!this.has(e)) {
      if (this.size() + 1 > Ag.MAX_CACHE_SIZE + Ag.MAX_CACHE_OFFSET) {
        const [i] = this.keys.reduce((a, o) => {
          const [, s] = a;
          return this.internalGet(o)[1] < s ? [o, this.internalGet(o)[1]] : a;
        }, [this.keys[0], this.cacheCallTimes]);
        this.delete(i);
      }
      this.keys.push(e);
    }
    let r = this.cache;
    e.forEach((i, a) => {
      if (a === e.length - 1)
        r.set(i, {
          value: [n, this.cacheCallTimes++]
        });
      else {
        const o = r.get(i);
        o ? o.map || (o.map = /* @__PURE__ */ new Map()) : r.set(i, {
          map: /* @__PURE__ */ new Map()
        }), r = r.get(i).map;
      }
    });
  }
  deleteByPath(e, n) {
    var r;
    const i = e.get(n[0]);
    if (n.length === 1)
      return i.map ? e.set(n[0], {
        map: i.map
      }) : e.delete(n[0]), (r = i.value) === null || r === void 0 ? void 0 : r[0];
    const a = this.deleteByPath(i.map, n.slice(1));
    return (!i.map || i.map.size === 0) && !i.value && e.delete(n[0]), a;
  }
  delete(e) {
    if (this.has(e))
      return this.keys = this.keys.filter((n) => !Pke(n, e)), this.deleteByPath(this.cache, e);
  }
}
Ag.MAX_CACHE_SIZE = 20;
Ag.MAX_CACHE_OFFSET = 5;
let hR = {};
function Nh(t, e) {
  process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.error(`Warning: ${e}`);
}
function $ke(t, e) {
  process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.warn(`Note: ${e}`);
}
function Ake() {
  hR = {};
}
function Yne(t, e, n) {
  !e && !hR[n] && (t(!1, n), hR[n] = !0);
}
function Lo(t, e) {
  Yne(Nh, t, e);
}
function qW(t, e) {
  Yne($ke, t, e);
}
function Eke() {
}
let aa = Eke;
process.env.NODE_ENV !== "production" && (aa = (t, e, n) => {
  Lo(t, `[ant-design-vue: ${e}] ${n}`), process.env.NODE_ENV === "test" && Ake();
});
let KW = 0;
class qne {
  constructor(e) {
    this.derivatives = Array.isArray(e) ? e : [e], this.id = KW, e.length === 0 && aa(e.length > 0, "[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."), KW += 1;
  }
  getDerivativeToken(e) {
    return this.derivatives.reduce((n, r) => r(e, n), void 0);
  }
}
const UA = new Ag();
function Kne(t) {
  const e = Array.isArray(t) ? t : [t];
  return UA.has(e) || UA.set(e, new qne(e)), UA.get(e);
}
const JW = /* @__PURE__ */ new WeakMap();
function Yw(t) {
  let e = JW.get(t) || "";
  return e || (Object.keys(t).forEach((n) => {
    const r = t[n];
    e += n, r instanceof qne ? e += r.id : r && typeof r == "object" ? e += Yw(r) : e += r;
  }), JW.set(t, e)), e;
}
function Mke(t, e) {
  return VN(`${e}_${Yw(t)}`);
}
const Vy = `random-${Date.now()}-${Math.random()}`.replace(/\./g, ""), Jne = "_bAmBoO_";
function Ike(t, e, n) {
  var r, i;
  if (is()) {
    Eb(t, Vy);
    const a = document.createElement("div");
    a.style.position = "fixed", a.style.left = "0", a.style.top = "0", e == null || e(a), document.body.appendChild(a), process.env.NODE_ENV !== "production" && (a.innerHTML = "Test", a.style.zIndex = "9999999");
    const o = n ? n(a) : (r = getComputedStyle(a).content) === null || r === void 0 ? void 0 : r.includes(Jne);
    return (i = a.parentNode) === null || i === void 0 || i.removeChild(a), Xw(Vy), o;
  }
  return !1;
}
let XA;
function Dke() {
  return XA === void 0 && (XA = Ike(`@layer ${Vy} { .${Vy} { content: "${Jne}"!important; } }`, (t) => {
    t.className = Vy;
  })), XA;
}
const e7 = {}, Rke = process.env.NODE_ENV === "production", kke = process.env.NODE_ENV === "prerender", Lke = !Rke && !kke ? "css-dev-only-do-not-override" : "css", Wd = /* @__PURE__ */ new Map();
function Nke(t) {
  Wd.set(t, (Wd.get(t) || 0) + 1);
}
function Bke(t, e) {
  typeof document < "u" && document.querySelectorAll(`style[${Wne}="${t}"]`).forEach((r) => {
    var i;
    r[Av] === e && ((i = r.parentNode) === null || i === void 0 || i.removeChild(r));
  });
}
const zke = 0;
function Vke(t, e) {
  Wd.set(t, (Wd.get(t) || 0) - 1);
  const n = Array.from(Wd.keys()), r = n.filter((i) => (Wd.get(i) || 0) <= 0);
  n.length - r.length > zke && r.forEach((i) => {
    Bke(i, e), Wd.delete(i);
  });
}
const Fke = (t, e, n, r) => {
  const i = n.getDerivativeToken(t);
  let a = k(k({}, i), e);
  return r && (a = r(a)), a;
};
function Wke(t, e) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ee({});
  const r = O2(), i = V(() => k({}, ...e.value)), a = V(() => Yw(i.value)), o = V(() => Yw(n.value.override || e7));
  return Gne("token", V(() => [n.value.salt || "", t.value.id, a.value, o.value]), () => {
    const {
      salt: l = "",
      override: u = e7,
      formatToken: c,
      getComputedToken: f
    } = n.value, d = f ? f(i.value, u, t.value) : Fke(i.value, u, t.value, c), h = Mke(d, l);
    d._tokenKey = h, Nke(h);
    const p = `${Lke}-${VN(h)}`;
    return d._hashId = p, [d, p];
  }, (l) => {
    var u;
    Vke(l[0]._tokenKey, (u = r.value) === null || u === void 0 ? void 0 : u.cache.instanceId);
  });
}
var Qke = {
  animationIterationCount: 1,
  aspectRatio: 1,
  borderImageOutset: 1,
  borderImageSlice: 1,
  borderImageWidth: 1,
  boxFlex: 1,
  boxFlexGroup: 1,
  boxOrdinalGroup: 1,
  columnCount: 1,
  columns: 1,
  flex: 1,
  flexGrow: 1,
  flexPositive: 1,
  flexShrink: 1,
  flexNegative: 1,
  flexOrder: 1,
  gridRow: 1,
  gridRowEnd: 1,
  gridRowSpan: 1,
  gridRowStart: 1,
  gridColumn: 1,
  gridColumnEnd: 1,
  gridColumnSpan: 1,
  gridColumnStart: 1,
  msGridRow: 1,
  msGridRowSpan: 1,
  msGridColumn: 1,
  msGridColumnSpan: 1,
  fontWeight: 1,
  lineHeight: 1,
  opacity: 1,
  order: 1,
  orphans: 1,
  tabSize: 1,
  widows: 1,
  zIndex: 1,
  zoom: 1,
  WebkitLineClamp: 1,
  // SVG-related properties
  fillOpacity: 1,
  floodOpacity: 1,
  stopOpacity: 1,
  strokeDasharray: 1,
  strokeDashoffset: 1,
  strokeMiterlimit: 1,
  strokeOpacity: 1,
  strokeWidth: 1
}, ere = "comm", tre = "rule", nre = "decl", Hke = "@import", Gke = "@keyframes", jke = "@layer", rre = Math.abs, FN = String.fromCharCode;
function ire(t) {
  return t.trim();
}
function Hx(t, e, n) {
  return t.replace(e, n);
}
function Zke(t, e, n) {
  return t.indexOf(e, n);
}
function Mb(t, e) {
  return t.charCodeAt(e) | 0;
}
function Ib(t, e, n) {
  return t.slice(e, n);
}
function _u(t) {
  return t.length;
}
function Uke(t) {
  return t.length;
}
function WO(t, e) {
  return e.push(t), t;
}
var x2 = 1, Eg = 1, are = 0, as = 0, Nr = 0, dm = "";
function WN(t, e, n, r, i, a, o, s) {
  return { value: t, root: e, parent: n, type: r, props: i, children: a, line: x2, column: Eg, length: o, return: "", siblings: s };
}
function Xke() {
  return Nr;
}
function Yke() {
  return Nr = as > 0 ? Mb(dm, --as) : 0, Eg--, Nr === 10 && (Eg = 1, x2--), Nr;
}
function ks() {
  return Nr = as < are ? Mb(dm, as++) : 0, Eg++, Nr === 10 && (Eg = 1, x2++), Nr;
}
function yh() {
  return Mb(dm, as);
}
function Gx() {
  return as;
}
function w2(t, e) {
  return Ib(dm, t, e);
}
function pR(t) {
  switch (t) {
    case 0:
    case 9:
    case 10:
    case 13:
    case 32:
      return 5;
    case 33:
    case 43:
    case 44:
    case 47:
    case 62:
    case 64:
    case 126:
    case 59:
    case 123:
    case 125:
      return 4;
    case 58:
      return 3;
    case 34:
    case 39:
    case 40:
    case 91:
      return 2;
    case 41:
    case 93:
      return 1;
  }
  return 0;
}
function qke(t) {
  return x2 = Eg = 1, are = _u(dm = t), as = 0, [];
}
function Kke(t) {
  return dm = "", t;
}
function YA(t) {
  return ire(w2(as - 1, vR(t === 91 ? t + 2 : t === 40 ? t + 1 : t)));
}
function Jke(t) {
  for (; (Nr = yh()) && Nr < 33; )
    ks();
  return pR(t) > 2 || pR(Nr) > 3 ? "" : " ";
}
function eLe(t, e) {
  for (; --e && ks() && !(Nr < 48 || Nr > 102 || Nr > 57 && Nr < 65 || Nr > 70 && Nr < 97); )
    ;
  return w2(t, Gx() + (e < 6 && yh() == 32 && ks() == 32));
}
function vR(t) {
  for (; ks(); )
    switch (Nr) {
      case t:
        return as;
      case 34:
      case 39:
        t !== 34 && t !== 39 && vR(Nr);
        break;
      case 40:
        t === 41 && vR(t);
        break;
      case 92:
        ks();
        break;
    }
  return as;
}
function tLe(t, e) {
  for (; ks() && t + Nr !== 57; )
    if (t + Nr === 84 && yh() === 47)
      break;
  return "/*" + w2(e, as - 1) + "*" + FN(t === 47 ? t : ks());
}
function nLe(t) {
  for (; !pR(yh()); )
    ks();
  return w2(t, as);
}
function rLe(t) {
  return Kke(jx("", null, null, null, [""], t = qke(t), 0, [0], t));
}
function jx(t, e, n, r, i, a, o, s, l) {
  for (var u = 0, c = 0, f = o, d = 0, h = 0, p = 0, v = 1, g = 1, m = 1, y = 0, _ = "", O = i, S = a, x = r, C = _; g; )
    switch (p = y, y = ks()) {
      case 40:
        if (p != 108 && Mb(C, f - 1) == 58) {
          Zke(C += Hx(YA(y), "&", "&\f"), "&\f", rre(u ? s[u - 1] : 0)) != -1 && (m = -1);
          break;
        }
      case 34:
      case 39:
      case 91:
        C += YA(y);
        break;
      case 9:
      case 10:
      case 13:
      case 32:
        C += Jke(p);
        break;
      case 92:
        C += eLe(Gx() - 1, 7);
        continue;
      case 47:
        switch (yh()) {
          case 42:
          case 47:
            WO(iLe(tLe(ks(), Gx()), e, n, l), l);
            break;
          default:
            C += "/";
        }
        break;
      case 123 * v:
        s[u++] = _u(C) * m;
      case 125 * v:
      case 59:
      case 0:
        switch (y) {
          case 0:
          case 125:
            g = 0;
          case 59 + c:
            m == -1 && (C = Hx(C, /\f/g, "")), h > 0 && _u(C) - f && WO(h > 32 ? n7(C + ";", r, n, f - 1, l) : n7(Hx(C, " ", "") + ";", r, n, f - 2, l), l);
            break;
          case 59:
            C += ";";
          default:
            if (WO(x = t7(C, e, n, u, c, i, s, _, O = [], S = [], f, a), a), y === 123)
              if (c === 0)
                jx(C, e, x, x, O, a, f, s, S);
              else
                switch (d === 99 && Mb(C, 3) === 110 ? 100 : d) {
                  case 100:
                  case 108:
                  case 109:
                  case 115:
                    jx(t, x, x, r && WO(t7(t, x, x, 0, 0, i, s, _, i, O = [], f, S), S), i, S, f, s, r ? O : S);
                    break;
                  default:
                    jx(C, x, x, x, [""], S, 0, s, S);
                }
        }
        u = c = h = 0, v = m = 1, _ = C = "", f = o;
        break;
      case 58:
        f = 1 + _u(C), h = p;
      default:
        if (v < 1) {
          if (y == 123)
            --v;
          else if (y == 125 && v++ == 0 && Yke() == 125)
            continue;
        }
        switch (C += FN(y), y * v) {
          case 38:
            m = c > 0 ? 1 : (C += "\f", -1);
            break;
          case 44:
            s[u++] = (_u(C) - 1) * m, m = 1;
            break;
          case 64:
            yh() === 45 && (C += YA(ks())), d = yh(), c = f = _u(_ = C += nLe(Gx())), y++;
            break;
          case 45:
            p === 45 && _u(C) == 2 && (v = 0);
        }
    }
  return a;
}
function t7(t, e, n, r, i, a, o, s, l, u, c, f) {
  for (var d = i - 1, h = i === 0 ? a : [""], p = Uke(h), v = 0, g = 0, m = 0; v < r; ++v)
    for (var y = 0, _ = Ib(t, d + 1, d = rre(g = o[v])), O = t; y < p; ++y)
      (O = ire(g > 0 ? h[y] + " " + _ : Hx(_, /&\f/g, h[y]))) && (l[m++] = O);
  return WN(t, e, n, i === 0 ? tre : s, l, u, c, f);
}
function iLe(t, e, n, r) {
  return WN(t, e, n, ere, FN(Xke()), Ib(t, 2, -2), 0, r);
}
function n7(t, e, n, r, i) {
  return WN(t, e, n, nre, Ib(t, 0, r), Ib(t, r + 1, -1), r, i);
}
function gR(t, e) {
  for (var n = "", r = 0; r < t.length; r++)
    n += e(t[r], r, t, e) || "";
  return n;
}
function aLe(t, e, n, r) {
  switch (t.type) {
    case jke:
      if (t.children.length) break;
    case Hke:
    case nre:
      return t.return = t.return || t.value;
    case ere:
      return "";
    case Gke:
      return t.return = t.value + "{" + gR(t.children, r) + "}";
    case tre:
      if (!_u(t.value = t.props.join(","))) return "";
  }
  return _u(n = gR(t.children, r)) ? t.return = t.value + "{" + n + "}" : "";
}
function ore(t, e) {
  const {
    path: n,
    parentSelectors: r
  } = e;
  Lo(!1, `[Ant Design Vue CSS-in-JS] ${n ? `Error in '${n}': ` : ""}${t}${r.length ? ` Selector info: ${r.join(" -> ")}` : ""}`);
}
const oLe = (t, e, n) => {
  if (t === "content") {
    const r = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
    (typeof e != "string" || ["normal", "none", "initial", "inherit", "unset"].indexOf(e) === -1 && !r.test(e) && (e.charAt(0) !== e.charAt(e.length - 1) || e.charAt(0) !== '"' && e.charAt(0) !== "'")) && ore(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${e}"'\`.`, n);
  }
}, sLe = (t, e, n) => {
  t === "animation" && n.hashId && e !== "none" && ore(`You seem to be using hashed animation '${e}', in which case 'animationName' with Keyframe as value is recommended.`, n);
}, r7 = "data-ant-cssinjs-cache-path", lLe = "_FILE_STYLE__";
let bh, sre = !0;
function uLe() {
  var t;
  if (!bh && (bh = {}, is())) {
    const e = document.createElement("div");
    e.className = r7, e.style.position = "fixed", e.style.visibility = "hidden", e.style.top = "-9999px", document.body.appendChild(e);
    let n = getComputedStyle(e).content || "";
    n = n.replace(/^"/, "").replace(/"$/, ""), n.split(";").forEach((i) => {
      const [a, o] = i.split(":");
      bh[a] = o;
    });
    const r = document.querySelector(`style[${r7}]`);
    r && (sre = !1, (t = r.parentNode) === null || t === void 0 || t.removeChild(r)), document.body.removeChild(e);
  }
}
function cLe(t) {
  return uLe(), !!bh[t];
}
function fLe(t) {
  const e = bh[t];
  let n = null;
  if (e && is())
    if (sre)
      n = lLe;
    else {
      const r = document.querySelector(`style[${mh}="${bh[t]}"]`);
      r ? n = r.innerHTML : delete bh[t];
    }
  return [n, e];
}
const i7 = is(), lre = "_skip_check_", ure = "_multi_value_";
function a7(t) {
  return gR(rLe(t), aLe).replace(/\{%%%\:[^;];}/g, ";");
}
function dLe(t) {
  return typeof t == "object" && t && (lre in t || ure in t);
}
function hLe(t, e, n) {
  if (!e)
    return t;
  const r = `.${e}`, i = n === "low" ? `:where(${r})` : r;
  return t.split(",").map((o) => {
    var s;
    const l = o.trim().split(/\s+/);
    let u = l[0] || "";
    const c = ((s = u.match(/^\w+/)) === null || s === void 0 ? void 0 : s[0]) || "";
    return u = `${c}${i}${u.slice(c.length)}`, [u, ...l.slice(1)].join(" ");
  }).join(",");
}
const mR = /* @__PURE__ */ new Set();
process.env.NODE_ENV;
const yR = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
    root: n,
    injectHash: r,
    parentSelectors: i
  } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
    root: !0,
    parentSelectors: []
  };
  const {
    hashId: a,
    layer: o,
    path: s,
    hashPriority: l,
    transformers: u = [],
    linters: c = []
  } = e;
  let f = "", d = {};
  function h(g) {
    const m = g.getName(a);
    if (!d[m]) {
      const [y] = yR(g.style, e, {
        root: !1,
        parentSelectors: i
      });
      d[m] = `@keyframes ${g.getName(a)}${y}`;
    }
  }
  function p(g) {
    let m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    return g.forEach((y) => {
      Array.isArray(y) ? p(y, m) : y && m.push(y);
    }), m;
  }
  if (p(Array.isArray(t) ? t : [t]).forEach((g) => {
    const m = typeof g == "string" && !n ? {} : g;
    if (typeof m == "string")
      f += `${m}
`;
    else if (m._keyframe)
      h(m);
    else {
      const y = u.reduce((_, O) => {
        var S;
        return ((S = O == null ? void 0 : O.visit) === null || S === void 0 ? void 0 : S.call(O, _)) || _;
      }, m);
      Object.keys(y).forEach((_) => {
        var O;
        const S = y[_];
        if (typeof S == "object" && S && (_ !== "animationName" || !S._keyframe) && !dLe(S)) {
          let x = !1, C = _.trim(), P = !1;
          (n || r) && a ? C.startsWith("@") ? x = !0 : C = hLe(_, a, l) : n && !a && (C === "&" || C === "") && (C = "", P = !0);
          const [$, T] = yR(S, e, {
            root: P,
            injectHash: x,
            parentSelectors: [...i, C]
          });
          d = k(k({}, d), T), f += `${C}${$}`;
        } else {
          let x = function(P, $) {
            process.env.NODE_ENV !== "production" && (typeof S != "object" || !(S != null && S[lre])) && [oLe, sLe, ...c].forEach((M) => M(P, $, {
              path: s,
              hashId: a,
              parentSelectors: i
            }));
            const T = P.replace(/[A-Z]/g, (M) => `-${M.toLowerCase()}`);
            let E = $;
            !Qke[P] && typeof E == "number" && E !== 0 && (E = `${E}px`), P === "animationName" && ($ != null && $._keyframe) && (h($), E = $.getName(a)), f += `${T}:${E};`;
          };
          const C = (O = S == null ? void 0 : S.value) !== null && O !== void 0 ? O : S;
          typeof S == "object" && (S != null && S[ure]) && Array.isArray(C) ? C.forEach((P) => {
            x(_, P);
          }) : x(_, C);
        }
      });
    }
  }), !n)
    f = `{${f}}`;
  else if (o && Dke()) {
    const g = o.split(",");
    f = `@layer ${g[g.length - 1].trim()} {${f}}`, g.length > 1 && (f = `@layer ${o}{%%%:%}${f}`);
  }
  return [f, d];
};
function pLe(t, e) {
  return VN(`${t.join("%")}${e}`);
}
function bR(t, e) {
  const n = O2(), r = V(() => t.value.token._tokenKey), i = V(() => [r.value, ...t.value.path]);
  let a = i7;
  return process.env.NODE_ENV !== "production" && n.value.mock !== void 0 && (a = n.value.mock === "client"), Gne(
    "style",
    i,
    // Create cache if needed
    () => {
      const {
        path: o,
        hashId: s,
        layer: l,
        nonce: u,
        clientOnly: c,
        order: f = 0
      } = t.value, d = i.value.join("|");
      if (cLe(d)) {
        const [C, P] = fLe(d);
        if (C)
          return [C, r.value, P, {}, c, f];
      }
      const h = e(), {
        hashPriority: p,
        container: v,
        transformers: g,
        linters: m,
        cache: y
      } = n.value, [_, O] = yR(h, {
        hashId: s,
        hashPriority: p,
        layer: l,
        path: o.join("-"),
        transformers: g,
        linters: m
      }), S = a7(_), x = pLe(i.value, S);
      if (a) {
        const C = {
          mark: mh,
          prepend: "queue",
          attachTo: v,
          priority: f
        }, P = typeof u == "function" ? u() : u;
        P && (C.csp = {
          nonce: P
        });
        const $ = Eb(S, x, C);
        $[Av] = y.instanceId, $.setAttribute(Wne, r.value), process.env.NODE_ENV !== "production" && $.setAttribute(mke, i.value.join("|")), Object.keys(O).forEach((T) => {
          mR.has(T) || (mR.add(T), Eb(a7(O[T]), `_effect-${T}`, {
            mark: mh,
            prepend: "queue",
            attachTo: v
          }));
        });
      }
      return [S, r.value, x, O, c, f];
    },
    // Remove cache if no need
    (o, s) => {
      let [, , l] = o;
      (s || n.value.autoClear) && i7 && Xw(l, {
        mark: mh
      });
    }
  ), (o) => o;
}
class qt {
  constructor(e, n) {
    this._keyframe = !0, this.name = e, this.style = n;
  }
  getName() {
    let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
    return e ? `${e}-${this.name}` : this.name;
  }
}
const vLe = "4.2.3", qw = ["blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
var QO = 2, o7 = 0.16, gLe = 0.05, mLe = 0.05, yLe = 0.15, cre = 5, fre = 4, bLe = [{
  index: 7,
  opacity: 0.15
}, {
  index: 6,
  opacity: 0.25
}, {
  index: 5,
  opacity: 0.3
}, {
  index: 5,
  opacity: 0.45
}, {
  index: 5,
  opacity: 0.65
}, {
  index: 5,
  opacity: 0.85
}, {
  index: 4,
  opacity: 0.9
}, {
  index: 3,
  opacity: 0.95
}, {
  index: 2,
  opacity: 0.97
}, {
  index: 1,
  opacity: 0.98
}];
function s7(t) {
  var e = t.r, n = t.g, r = t.b, i = rR(e, n, r);
  return {
    h: i.h * 360,
    s: i.s,
    v: i.v
  };
}
function HO(t) {
  var e = t.r, n = t.g, r = t.b;
  return "#".concat(iR(e, n, r, !1));
}
function _Le(t, e, n) {
  var r = n / 100, i = {
    r: (e.r - t.r) * r + t.r,
    g: (e.g - t.g) * r + t.g,
    b: (e.b - t.b) * r + t.b
  };
  return i;
}
function l7(t, e, n) {
  var r;
  return Math.round(t.h) >= 60 && Math.round(t.h) <= 240 ? r = n ? Math.round(t.h) - QO * e : Math.round(t.h) + QO * e : r = n ? Math.round(t.h) + QO * e : Math.round(t.h) - QO * e, r < 0 ? r += 360 : r >= 360 && (r -= 360), r;
}
function u7(t, e, n) {
  if (t.h === 0 && t.s === 0)
    return t.s;
  var r;
  return n ? r = t.s - o7 * e : e === fre ? r = t.s + o7 : r = t.s + gLe * e, r > 1 && (r = 1), n && e === cre && r > 0.1 && (r = 0.1), r < 0.06 && (r = 0.06), Number(r.toFixed(2));
}
function c7(t, e, n) {
  var r;
  return n ? r = t.v + mLe * e : r = t.v - yLe * e, r > 1 && (r = 1), Number(r.toFixed(2));
}
function Bh(t) {
  for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = [], r = yv(t), i = cre; i > 0; i -= 1) {
    var a = s7(r), o = HO(yv({
      h: l7(a, i, !0),
      s: u7(a, i, !0),
      v: c7(a, i, !0)
    }));
    n.push(o);
  }
  n.push(HO(r));
  for (var s = 1; s <= fre; s += 1) {
    var l = s7(r), u = HO(yv({
      h: l7(l, s),
      s: u7(l, s),
      v: c7(l, s)
    }));
    n.push(u);
  }
  return e.theme === "dark" ? bLe.map(function(c) {
    var f = c.index, d = c.opacity, h = HO(_Le(yv(e.backgroundColor || "#141414"), yv(n[f]), d * 100));
    return h;
  }) : n;
}
var qA = {
  red: "#F5222D",
  volcano: "#FA541C",
  orange: "#FA8C16",
  gold: "#FAAD14",
  yellow: "#FADB14",
  lime: "#A0D911",
  green: "#52C41A",
  cyan: "#13C2C2",
  blue: "#1890FF",
  geekblue: "#2F54EB",
  purple: "#722ED1",
  magenta: "#EB2F96",
  grey: "#666666"
}, Zx = {}, KA = {};
Object.keys(qA).forEach(function(t) {
  Zx[t] = Bh(qA[t]), Zx[t].primary = Zx[t][5], KA[t] = Bh(qA[t], {
    theme: "dark",
    backgroundColor: "#141414"
  }), KA[t].primary = KA[t][5];
});
var OLe = Zx.blue;
const SLe = (t) => {
  const {
    controlHeight: e
  } = t;
  return {
    controlHeightSM: e * 0.75,
    controlHeightXS: e * 0.5,
    controlHeightLG: e * 1.25
  };
};
function xLe(t) {
  const {
    sizeUnit: e,
    sizeStep: n
  } = t;
  return {
    sizeXXL: e * (n + 8),
    sizeXL: e * (n + 4),
    sizeLG: e * (n + 2),
    sizeMD: e * (n + 1),
    sizeMS: e * n,
    size: e * n,
    sizeSM: e * (n - 1),
    sizeXS: e * (n - 2),
    sizeXXS: e * (n - 3)
    // 4
  };
}
const dre = {
  blue: "#1677ff",
  purple: "#722ED1",
  cyan: "#13C2C2",
  green: "#52C41A",
  magenta: "#EB2F96",
  pink: "#eb2f96",
  red: "#F5222D",
  orange: "#FA8C16",
  yellow: "#FADB14",
  volcano: "#FA541C",
  geekblue: "#2F54EB",
  gold: "#FAAD14",
  lime: "#A0D911"
}, C2 = k(k({}, dre), {
  // Color
  colorPrimary: "#1677ff",
  colorSuccess: "#52c41a",
  colorWarning: "#faad14",
  colorError: "#ff4d4f",
  colorInfo: "#1677ff",
  colorTextBase: "",
  colorBgBase: "",
  // Font
  fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji'`,
  fontSize: 14,
  // Line
  lineWidth: 1,
  lineType: "solid",
  // Motion
  motionUnit: 0.1,
  motionBase: 0,
  motionEaseOutCirc: "cubic-bezier(0.08, 0.82, 0.17, 1)",
  motionEaseInOutCirc: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
  motionEaseOut: "cubic-bezier(0.215, 0.61, 0.355, 1)",
  motionEaseInOut: "cubic-bezier(0.645, 0.045, 0.355, 1)",
  motionEaseOutBack: "cubic-bezier(0.12, 0.4, 0.29, 1.46)",
  motionEaseInBack: "cubic-bezier(0.71, -0.46, 0.88, 0.6)",
  motionEaseInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
  motionEaseOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
  // Radius
  borderRadius: 6,
  // Size
  sizeUnit: 4,
  sizeStep: 4,
  sizePopupArrow: 16,
  // Control Base
  controlHeight: 32,
  // zIndex
  zIndexBase: 0,
  zIndexPopupBase: 1e3,
  // Image
  opacityImage: 1,
  // Wireframe
  wireframe: !1
});
function wLe(t, e) {
  let {
    generateColorPalettes: n,
    generateNeutralColorPalettes: r
  } = e;
  const {
    colorSuccess: i,
    colorWarning: a,
    colorError: o,
    colorInfo: s,
    colorPrimary: l,
    colorBgBase: u,
    colorTextBase: c
  } = t, f = n(l), d = n(i), h = n(a), p = n(o), v = n(s), g = r(u, c);
  return k(k({}, g), {
    colorPrimaryBg: f[1],
    colorPrimaryBgHover: f[2],
    colorPrimaryBorder: f[3],
    colorPrimaryBorderHover: f[4],
    colorPrimaryHover: f[5],
    colorPrimary: f[6],
    colorPrimaryActive: f[7],
    colorPrimaryTextHover: f[8],
    colorPrimaryText: f[9],
    colorPrimaryTextActive: f[10],
    colorSuccessBg: d[1],
    colorSuccessBgHover: d[2],
    colorSuccessBorder: d[3],
    colorSuccessBorderHover: d[4],
    colorSuccessHover: d[4],
    colorSuccess: d[6],
    colorSuccessActive: d[7],
    colorSuccessTextHover: d[8],
    colorSuccessText: d[9],
    colorSuccessTextActive: d[10],
    colorErrorBg: p[1],
    colorErrorBgHover: p[2],
    colorErrorBorder: p[3],
    colorErrorBorderHover: p[4],
    colorErrorHover: p[5],
    colorError: p[6],
    colorErrorActive: p[7],
    colorErrorTextHover: p[8],
    colorErrorText: p[9],
    colorErrorTextActive: p[10],
    colorWarningBg: h[1],
    colorWarningBgHover: h[2],
    colorWarningBorder: h[3],
    colorWarningBorderHover: h[4],
    colorWarningHover: h[4],
    colorWarning: h[6],
    colorWarningActive: h[7],
    colorWarningTextHover: h[8],
    colorWarningText: h[9],
    colorWarningTextActive: h[10],
    colorInfoBg: v[1],
    colorInfoBgHover: v[2],
    colorInfoBorder: v[3],
    colorInfoBorderHover: v[4],
    colorInfoHover: v[4],
    colorInfo: v[6],
    colorInfoActive: v[7],
    colorInfoTextHover: v[8],
    colorInfoText: v[9],
    colorInfoTextActive: v[10],
    colorBgMask: new Hn("#000").setAlpha(0.45).toRgbString(),
    colorWhite: "#fff"
  });
}
const CLe = (t) => {
  let e = t, n = t, r = t, i = t;
  return t < 6 && t >= 5 ? e = t + 1 : t < 16 && t >= 6 ? e = t + 2 : t >= 16 && (e = 16), t < 7 && t >= 5 ? n = 4 : t < 8 && t >= 7 ? n = 5 : t < 14 && t >= 8 ? n = 6 : t < 16 && t >= 14 ? n = 7 : t >= 16 && (n = 8), t < 6 && t >= 2 ? r = 1 : t >= 6 && (r = 2), t > 4 && t < 8 ? i = 4 : t >= 8 && (i = 6), {
    borderRadius: t > 16 ? 16 : t,
    borderRadiusXS: r,
    borderRadiusSM: n,
    borderRadiusLG: e,
    borderRadiusOuter: i
  };
};
function TLe(t) {
  const {
    motionUnit: e,
    motionBase: n,
    borderRadius: r,
    lineWidth: i
  } = t;
  return k({
    // motion
    motionDurationFast: `${(n + e).toFixed(1)}s`,
    motionDurationMid: `${(n + e * 2).toFixed(1)}s`,
    motionDurationSlow: `${(n + e * 3).toFixed(1)}s`,
    // line
    lineWidthBold: i + 1
  }, CLe(r));
}
const hu = (t, e) => new Hn(t).setAlpha(e).toRgbString(), y0 = (t, e) => new Hn(t).darken(e).toHexString(), PLe = (t) => {
  const e = Bh(t);
  return {
    1: e[0],
    2: e[1],
    3: e[2],
    4: e[3],
    5: e[4],
    6: e[5],
    7: e[6],
    8: e[4],
    9: e[5],
    10: e[6]
    // 8: colors[7],
    // 9: colors[8],
    // 10: colors[9],
  };
}, $Le = (t, e) => {
  const n = t || "#fff", r = e || "#000";
  return {
    colorBgBase: n,
    colorTextBase: r,
    colorText: hu(r, 0.88),
    colorTextSecondary: hu(r, 0.65),
    colorTextTertiary: hu(r, 0.45),
    colorTextQuaternary: hu(r, 0.25),
    colorFill: hu(r, 0.15),
    colorFillSecondary: hu(r, 0.06),
    colorFillTertiary: hu(r, 0.04),
    colorFillQuaternary: hu(r, 0.02),
    colorBgLayout: y0(n, 4),
    colorBgContainer: y0(n, 0),
    colorBgElevated: y0(n, 0),
    colorBgSpotlight: hu(r, 0.85),
    colorBorder: y0(n, 15),
    colorBorderSecondary: y0(n, 6)
  };
};
function ALe(t) {
  const e = new Array(10).fill(null).map((n, r) => {
    const i = r - 1, a = t * Math.pow(2.71828, i / 5), o = r > 1 ? Math.floor(a) : Math.ceil(a);
    return Math.floor(o / 2) * 2;
  });
  return e[1] = t, e.map((n) => {
    const r = n + 8;
    return {
      size: n,
      lineHeight: r / n
    };
  });
}
const ELe = (t) => {
  const e = ALe(t), n = e.map((i) => i.size), r = e.map((i) => i.lineHeight);
  return {
    fontSizeSM: n[0],
    fontSize: n[1],
    fontSizeLG: n[2],
    fontSizeXL: n[3],
    fontSizeHeading1: n[6],
    fontSizeHeading2: n[5],
    fontSizeHeading3: n[4],
    fontSizeHeading4: n[3],
    fontSizeHeading5: n[2],
    lineHeight: r[1],
    lineHeightLG: r[2],
    lineHeightSM: r[0],
    lineHeightHeading1: r[6],
    lineHeightHeading2: r[5],
    lineHeightHeading3: r[4],
    lineHeightHeading4: r[3],
    lineHeightHeading5: r[2]
  };
};
function MLe(t) {
  const e = Object.keys(dre).map((n) => {
    const r = Bh(t[n]);
    return new Array(10).fill(1).reduce((i, a, o) => (i[`${n}-${o + 1}`] = r[o], i), {});
  }).reduce((n, r) => (n = k(k({}, n), r), n), {});
  return k(k(k(k(k(k(k({}, t), e), wLe(t, {
    generateColorPalettes: PLe,
    generateNeutralColorPalettes: $Le
  })), ELe(t.fontSize)), xLe(t)), SLe(t)), TLe(t));
}
function JA(t) {
  return t >= 0 && t <= 255;
}
function GO(t, e) {
  const {
    r: n,
    g: r,
    b: i,
    a
  } = new Hn(t).toRgb();
  if (a < 1)
    return t;
  const {
    r: o,
    g: s,
    b: l
  } = new Hn(e).toRgb();
  for (let u = 0.01; u <= 1; u += 0.01) {
    const c = Math.round((n - o * (1 - u)) / u), f = Math.round((r - s * (1 - u)) / u), d = Math.round((i - l * (1 - u)) / u);
    if (JA(c) && JA(f) && JA(d))
      return new Hn({
        r: c,
        g: f,
        b: d,
        a: Math.round(u * 100) / 100
      }).toRgbString();
  }
  return new Hn({
    r: n,
    g: r,
    b: i,
    a: 1
  }).toRgbString();
}
var ILe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
function DLe(t) {
  const {
    override: e
  } = t, n = ILe(t, ["override"]), r = k({}, e);
  Object.keys(C2).forEach((h) => {
    delete r[h];
  });
  const i = k(k({}, n), r), a = 480, o = 576, s = 768, l = 992, u = 1200, c = 1600, f = 2e3;
  return k(k(k({}, i), {
    colorLink: i.colorInfoText,
    colorLinkHover: i.colorInfoHover,
    colorLinkActive: i.colorInfoActive,
    // ============== Background ============== //
    colorFillContent: i.colorFillSecondary,
    colorFillContentHover: i.colorFill,
    colorFillAlter: i.colorFillQuaternary,
    colorBgContainerDisabled: i.colorFillTertiary,
    // ============== Split ============== //
    colorBorderBg: i.colorBgContainer,
    colorSplit: GO(i.colorBorderSecondary, i.colorBgContainer),
    // ============== Text ============== //
    colorTextPlaceholder: i.colorTextQuaternary,
    colorTextDisabled: i.colorTextQuaternary,
    colorTextHeading: i.colorText,
    colorTextLabel: i.colorTextSecondary,
    colorTextDescription: i.colorTextTertiary,
    colorTextLightSolid: i.colorWhite,
    colorHighlight: i.colorError,
    colorBgTextHover: i.colorFillSecondary,
    colorBgTextActive: i.colorFill,
    colorIcon: i.colorTextTertiary,
    colorIconHover: i.colorText,
    colorErrorOutline: GO(i.colorErrorBg, i.colorBgContainer),
    colorWarningOutline: GO(i.colorWarningBg, i.colorBgContainer),
    // Font
    fontSizeIcon: i.fontSizeSM,
    // Control
    lineWidth: i.lineWidth,
    controlOutlineWidth: i.lineWidth * 2,
    // Checkbox size and expand icon size
    controlInteractiveSize: i.controlHeight / 2,
    controlItemBgHover: i.colorFillTertiary,
    controlItemBgActive: i.colorPrimaryBg,
    controlItemBgActiveHover: i.colorPrimaryBgHover,
    controlItemBgActiveDisabled: i.colorFill,
    controlTmpOutline: i.colorFillQuaternary,
    controlOutline: GO(i.colorPrimaryBg, i.colorBgContainer),
    lineType: i.lineType,
    borderRadius: i.borderRadius,
    borderRadiusXS: i.borderRadiusXS,
    borderRadiusSM: i.borderRadiusSM,
    borderRadiusLG: i.borderRadiusLG,
    fontWeightStrong: 600,
    opacityLoading: 0.65,
    linkDecoration: "none",
    linkHoverDecoration: "none",
    linkFocusDecoration: "none",
    controlPaddingHorizontal: 12,
    controlPaddingHorizontalSM: 8,
    paddingXXS: i.sizeXXS,
    paddingXS: i.sizeXS,
    paddingSM: i.sizeSM,
    padding: i.size,
    paddingMD: i.sizeMD,
    paddingLG: i.sizeLG,
    paddingXL: i.sizeXL,
    paddingContentHorizontalLG: i.sizeLG,
    paddingContentVerticalLG: i.sizeMS,
    paddingContentHorizontal: i.sizeMS,
    paddingContentVertical: i.sizeSM,
    paddingContentHorizontalSM: i.size,
    paddingContentVerticalSM: i.sizeXS,
    marginXXS: i.sizeXXS,
    marginXS: i.sizeXS,
    marginSM: i.sizeSM,
    margin: i.size,
    marginMD: i.sizeMD,
    marginLG: i.sizeLG,
    marginXL: i.sizeXL,
    marginXXL: i.sizeXXL,
    boxShadow: `
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02)
    `,
    boxShadowSecondary: `
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowTertiary: `
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02)
    `,
    screenXS: a,
    screenXSMin: a,
    screenXSMax: o - 1,
    screenSM: o,
    screenSMMin: o,
    screenSMMax: s - 1,
    screenMD: s,
    screenMDMin: s,
    screenMDMax: l - 1,
    screenLG: l,
    screenLGMin: l,
    screenLGMax: u - 1,
    screenXL: u,
    screenXLMin: u,
    screenXLMax: c - 1,
    screenXXL: c,
    screenXXLMin: c,
    screenXXLMax: f - 1,
    screenXXXL: f,
    screenXXXLMin: f,
    // FIXME: component box-shadow, should be removed
    boxShadowPopoverArrow: "3px 3px 7px rgba(0, 0, 0, 0.1)",
    boxShadowCard: `
      0 1px 2px -2px ${new Hn("rgba(0, 0, 0, 0.16)").toRgbString()},
      0 3px 6px 0 ${new Hn("rgba(0, 0, 0, 0.12)").toRgbString()},
      0 5px 12px 4px ${new Hn("rgba(0, 0, 0, 0.09)").toRgbString()}
    `,
    boxShadowDrawerRight: `
      -6px 0 16px 0 rgba(0, 0, 0, 0.08),
      -3px 0 6px -4px rgba(0, 0, 0, 0.12),
      -9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerLeft: `
      6px 0 16px 0 rgba(0, 0, 0, 0.08),
      3px 0 6px -4px rgba(0, 0, 0, 0.12),
      9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerUp: `
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerDown: `
      0 -6px 16px 0 rgba(0, 0, 0, 0.08),
      0 -3px 6px -4px rgba(0, 0, 0, 0.12),
      0 -9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowTabsOverflowLeft: "inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowRight: "inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowTop: "inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowBottom: "inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"
  }), r);
}
const RLe = (t, e, n, r, i) => {
  const a = t / 2, o = 0, s = a, l = n * 1 / Math.sqrt(2), u = a - n * (1 - 1 / Math.sqrt(2)), c = a - e * (1 / Math.sqrt(2)), f = n * (Math.sqrt(2) - 1) + e * (1 / Math.sqrt(2)), d = 2 * a - c, h = f, p = 2 * a - l, v = u, g = 2 * a - o, m = s, y = a * Math.sqrt(2) + n * (Math.sqrt(2) - 2), _ = n * (Math.sqrt(2) - 1);
  return {
    pointerEvents: "none",
    width: t,
    height: t,
    overflow: "hidden",
    "&::after": {
      content: '""',
      position: "absolute",
      width: y,
      height: y,
      bottom: 0,
      insetInline: 0,
      margin: "auto",
      borderRadius: {
        _skip_check_: !0,
        value: `0 0 ${e}px 0`
      },
      transform: "translateY(50%) rotate(-135deg)",
      boxShadow: i,
      zIndex: 0,
      background: "transparent"
    },
    "&::before": {
      position: "absolute",
      bottom: 0,
      insetInlineStart: 0,
      width: t,
      height: t / 2,
      background: r,
      clipPath: {
        _multi_value_: !0,
        value: [`polygon(${_}px 100%, 50% ${_}px, ${2 * a - _}px 100%, ${_}px 100%)`, `path('M ${o} ${s} A ${n} ${n} 0 0 0 ${l} ${u} L ${c} ${f} A ${e} ${e} 0 0 1 ${d} ${h} L ${p} ${v} A ${n} ${n} 0 0 0 ${g} ${m} Z')`]
      },
      content: '""'
    }
  };
};
function kLe(t, e) {
  return qw.reduce((n, r) => {
    const i = t[`${r}-1`], a = t[`${r}-3`], o = t[`${r}-6`], s = t[`${r}-7`];
    return k(k({}, n), e(r, {
      lightColor: i,
      lightBorderColor: a,
      darkColor: o,
      textColor: s
    }));
  }, {});
}
const Mg = {
  overflow: "hidden",
  whiteSpace: "nowrap",
  textOverflow: "ellipsis"
}, Gn = (t) => ({
  boxSizing: "border-box",
  margin: 0,
  padding: 0,
  color: t.colorText,
  fontSize: t.fontSize,
  // font-variant: @font-variant-base;
  lineHeight: t.lineHeight,
  listStyle: "none",
  // font-feature-settings: @font-feature-settings-base;
  fontFamily: t.fontFamily
}), hm = () => ({
  display: "inline-flex",
  alignItems: "center",
  color: "inherit",
  fontStyle: "normal",
  lineHeight: 0,
  textAlign: "center",
  textTransform: "none",
  // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
  verticalAlign: "-0.125em",
  textRendering: "optimizeLegibility",
  "-webkit-font-smoothing": "antialiased",
  "-moz-osx-font-smoothing": "grayscale",
  "> *": {
    lineHeight: 1
  },
  svg: {
    display: "inline-block"
  }
}), Kw = () => ({
  // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
  "&::before": {
    display: "table",
    content: '""'
  },
  "&::after": {
    // https://github.com/ant-design/ant-design/issues/21864
    display: "table",
    clear: "both",
    content: '""'
  }
}), LLe = (t) => ({
  a: {
    color: t.colorLink,
    textDecoration: t.linkDecoration,
    backgroundColor: "transparent",
    outline: "none",
    cursor: "pointer",
    transition: `color ${t.motionDurationSlow}`,
    "-webkit-text-decoration-skip": "objects",
    "&:hover": {
      color: t.colorLinkHover
    },
    "&:active": {
      color: t.colorLinkActive
    },
    "&:active,\n  &:hover": {
      textDecoration: t.linkHoverDecoration,
      outline: 0
    },
    // https://github.com/ant-design/ant-design/issues/22503
    "&:focus": {
      textDecoration: t.linkFocusDecoration,
      outline: 0
    },
    "&[disabled]": {
      color: t.colorTextDisabled,
      cursor: "not-allowed"
    }
  }
}), NLe = (t, e) => {
  const {
    fontFamily: n,
    fontSize: r
  } = t, i = `[class^="${e}"], [class*=" ${e}"]`;
  return {
    [i]: {
      fontFamily: n,
      fontSize: r,
      boxSizing: "border-box",
      "&::before, &::after": {
        boxSizing: "border-box"
      },
      [i]: {
        boxSizing: "border-box",
        "&::before, &::after": {
          boxSizing: "border-box"
        }
      }
    }
  };
}, G_ = (t) => ({
  outline: `${t.lineWidthBold}px solid ${t.colorPrimaryBorder}`,
  outlineOffset: 1,
  transition: "outline-offset 0s, outline 0s"
}), T2 = (t) => ({
  "&:focus-visible": k({}, G_(t))
});
function pr(t, e, n) {
  return (r) => {
    const i = V(() => r == null ? void 0 : r.value), [a, o, s] = pm(), {
      getPrefixCls: l,
      iconPrefixCls: u
    } = b2(), c = V(() => l()), f = V(() => ({
      theme: a.value,
      token: o.value,
      hashId: s.value,
      path: ["Shared", c.value]
    }));
    bR(f, () => [{
      // Link
      "&": LLe(o.value)
    }]);
    const d = V(() => ({
      theme: a.value,
      token: o.value,
      hashId: s.value,
      path: [t, i.value, u.value]
    }));
    return [bR(d, () => {
      const {
        token: h,
        flush: p
      } = zLe(o.value), v = typeof n == "function" ? n(h) : n, g = k(k({}, v), o.value[t]), m = `.${i.value}`, y = bn(h, {
        componentCls: m,
        prefixCls: i.value,
        iconCls: `.${u.value}`,
        antCls: `.${c.value}`
      }, g), _ = e(y, {
        hashId: s.value,
        prefixCls: i.value,
        rootPrefixCls: c.value,
        iconPrefixCls: u.value,
        overrideComponentToken: o.value[t]
      });
      return p(t, g), [NLe(o.value, i.value), _];
    }), s];
  };
}
const hre = process.env.NODE_ENV !== "production" || typeof CSSINJS_STATISTIC < "u";
let _R = !0;
function bn() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
    e[n] = arguments[n];
  if (!hre)
    return k({}, ...e);
  _R = !1;
  const r = {};
  return e.forEach((i) => {
    Object.keys(i).forEach((o) => {
      Object.defineProperty(r, o, {
        configurable: !0,
        enumerable: !0,
        get: () => i[o]
      });
    });
  }), _R = !0, r;
}
function BLe() {
}
function zLe(t) {
  let e, n = t, r = BLe;
  return hre && (e = /* @__PURE__ */ new Set(), n = new Proxy(t, {
    get(i, a) {
      return _R && e.add(a), i[a];
    }
  }), r = (i, a) => {
    Array.from(e);
  }), {
    token: n,
    keys: e,
    flush: r
  };
}
const VLe = Kne(MLe), pre = {
  token: C2,
  hashed: !0
}, vre = Symbol("DesignTokenContext"), OR = ve(), FLe = (t) => {
  Et(vre, t), me(t, () => {
    OR.value = z(t), fxe(OR);
  }, {
    immediate: !0,
    deep: !0
  });
}, WLe = ae({
  props: {
    value: sn()
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    return FLe(V(() => t.value)), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
});
function pm() {
  const t = et(vre, V(() => OR.value || pre)), e = V(() => `${vLe}-${t.value.hashed || ""}`), n = V(() => t.value.theme || VLe), r = Wke(n, V(() => [C2, t.value.token]), V(() => ({
    salt: e.value,
    override: k({
      override: t.value.token
    }, t.value.components),
    formatToken: DLe
  })));
  return [n, V(() => r.value[0]), V(() => t.value.hashed ? r.value[1] : "")];
}
const gre = ae({
  compatConfig: {
    MODE: 3
  },
  setup() {
    const [, t] = pm(), e = V(() => new Hn(t.value.colorBgBase).toHsl().l < 0.5 ? {
      opacity: 0.65
    } : {});
    return () => D("svg", {
      style: e.value,
      width: "184",
      height: "152",
      viewBox: "0 0 184 152",
      xmlns: "http://www.w3.org/2000/svg"
    }, [D("g", {
      fill: "none",
      "fill-rule": "evenodd"
    }, [D("g", {
      transform: "translate(24 31.67)"
    }, [D("ellipse", {
      "fill-opacity": ".8",
      fill: "#F5F5F7",
      cx: "67.797",
      cy: "106.89",
      rx: "67.797",
      ry: "12.668"
    }, null), D("path", {
      d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",
      fill: "#AEB8C2"
    }, null), D("path", {
      d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",
      fill: "url(#linearGradient-1)",
      transform: "translate(13.56)"
    }, null), D("path", {
      d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",
      fill: "#F5F5F7"
    }, null), D("path", {
      d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",
      fill: "#DCE0E6"
    }, null)]), D("path", {
      d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",
      fill: "#DCE0E6"
    }, null), D("g", {
      transform: "translate(149.65 15.383)",
      fill: "#FFF"
    }, [D("ellipse", {
      cx: "20.654",
      cy: "3.167",
      rx: "2.849",
      ry: "2.815"
    }, null), D("path", {
      d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
    }, null)])])]);
  }
});
gre.PRESENTED_IMAGE_DEFAULT = !0;
const mre = ae({
  compatConfig: {
    MODE: 3
  },
  setup() {
    const [, t] = pm(), e = V(() => {
      const {
        colorFill: n,
        colorFillTertiary: r,
        colorFillQuaternary: i,
        colorBgContainer: a
      } = t.value;
      return {
        borderColor: new Hn(n).onBackground(a).toHexString(),
        shadowColor: new Hn(r).onBackground(a).toHexString(),
        contentColor: new Hn(i).onBackground(a).toHexString()
      };
    });
    return () => D("svg", {
      width: "64",
      height: "41",
      viewBox: "0 0 64 41",
      xmlns: "http://www.w3.org/2000/svg"
    }, [D("g", {
      transform: "translate(0 1)",
      fill: "none",
      "fill-rule": "evenodd"
    }, [D("ellipse", {
      fill: e.value.shadowColor,
      cx: "32",
      cy: "33",
      rx: "32",
      ry: "7"
    }, null), D("g", {
      "fill-rule": "nonzero",
      stroke: e.value.borderColor
    }, [D("path", {
      d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
    }, null), D("path", {
      d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
      fill: e.value.contentColor
    }, null)])])]);
  }
});
mre.PRESENTED_IMAGE_SIMPLE = !0;
const QLe = (t) => {
  const {
    componentCls: e,
    margin: n,
    marginXS: r,
    marginXL: i,
    fontSize: a,
    lineHeight: o
  } = t;
  return {
    [e]: {
      marginInline: r,
      fontSize: a,
      lineHeight: o,
      textAlign: "center",
      // 原来 &-image 没有父子结构，现在为了外层承担我们的hashId，改成父子结果
      [`${e}-image`]: {
        height: t.emptyImgHeight,
        marginBottom: r,
        opacity: t.opacityImage,
        img: {
          height: "100%"
        },
        svg: {
          height: "100%",
          margin: "auto"
        }
      },
      // 原来 &-footer 没有父子结构，现在为了外层承担我们的hashId，改成父子结果
      [`${e}-footer`]: {
        marginTop: n
      },
      "&-normal": {
        marginBlock: i,
        color: t.colorTextDisabled,
        [`${e}-image`]: {
          height: t.emptyImgHeightMD
        }
      },
      "&-small": {
        marginBlock: r,
        color: t.colorTextDisabled,
        [`${e}-image`]: {
          height: t.emptyImgHeightSM
        }
      }
    }
  };
}, HLe = pr("Empty", (t) => {
  const {
    componentCls: e,
    controlHeightLG: n
  } = t, r = bn(t, {
    emptyImgCls: `${e}-img`,
    emptyImgHeight: n * 2.5,
    emptyImgHeightMD: n,
    emptyImgHeightSM: n * 0.875
  });
  return [QLe(r)];
});
var GLe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const yre = D(gre, null, null), bre = D(mre, null, null), jLe = () => ({
  prefixCls: String,
  imageStyle: sn(),
  image: Fo(),
  description: Fo()
}), QN = ae({
  name: "AEmpty",
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: jLe(),
  setup(t, e) {
    let {
      slots: n = {},
      attrs: r
    } = e;
    const {
      direction: i,
      prefixCls: a
    } = hn("empty", t), [o, s] = HLe(a);
    return () => {
      var l, u;
      const c = a.value, f = k(k({}, t), r), {
        image: d = ((l = n.image) === null || l === void 0 ? void 0 : l.call(n)) || yre,
        description: h = ((u = n.description) === null || u === void 0 ? void 0 : u.call(n)) || void 0,
        imageStyle: p,
        class: v = ""
      } = f, g = GLe(f, ["image", "description", "imageStyle", "class"]);
      return o(D(Fne, {
        componentName: "Empty",
        children: (m) => {
          const y = typeof h < "u" ? h : m.description, _ = typeof y == "string" ? y : "empty";
          let O = null;
          return typeof d == "string" ? O = D("img", {
            alt: _,
            src: d
          }, null) : O = d, D("div", te({
            class: Re(c, v, s.value, {
              [`${c}-normal`]: d === bre,
              [`${c}-rtl`]: i.value === "rtl"
            })
          }, g), [D("div", {
            class: `${c}-image`,
            style: p
          }, [O]), y && D("p", {
            class: `${c}-description`
          }, [y]), n.default && D("div", {
            class: `${c}-footer`
          }, [Zl(n.default())])]);
        }
      }, null));
    };
  }
});
QN.PRESENTED_IMAGE_DEFAULT = yre;
QN.PRESENTED_IMAGE_SIMPLE = bre;
const b0 = fm(QN), HN = (t) => {
  const {
    prefixCls: e
  } = hn("empty", t);
  return ((r) => {
    switch (r) {
      case "Table":
      case "List":
        return D(b0, {
          image: b0.PRESENTED_IMAGE_SIMPLE
        }, null);
      case "Select":
      case "TreeSelect":
      case "Cascader":
      case "Transfer":
      case "Mentions":
        return D(b0, {
          image: b0.PRESENTED_IMAGE_SIMPLE,
          class: `${e.value}-small`
        }, null);
      default:
        return D(b0, null, null);
    }
  })(t.componentName);
};
function ZLe(t) {
  return D(HN, {
    componentName: t
  }, null);
}
const _re = Symbol("SizeContextKey"), Ore = () => et(_re, ee(void 0)), Sre = (t) => {
  const e = Ore();
  return Et(_re, V(() => t.value || e.value)), t;
}, hn = (t, e) => {
  const n = Ore(), r = Vl(), i = et(zN, k(k({}, Nne), {
    renderEmpty: (C) => ff(HN, {
      componentName: C
    })
  })), a = V(() => i.getPrefixCls(t, e.prefixCls)), o = V(() => {
    var C, P;
    return (C = e.direction) !== null && C !== void 0 ? C : (P = i.direction) === null || P === void 0 ? void 0 : P.value;
  }), s = V(() => {
    var C;
    return (C = e.iconPrefixCls) !== null && C !== void 0 ? C : i.iconPrefixCls.value;
  }), l = V(() => i.getPrefixCls()), u = V(() => {
    var C;
    return (C = i.autoInsertSpaceInButton) === null || C === void 0 ? void 0 : C.value;
  }), c = i.renderEmpty, f = i.space, d = i.pageHeader, h = i.form, p = V(() => {
    var C, P;
    return (C = e.getTargetContainer) !== null && C !== void 0 ? C : (P = i.getTargetContainer) === null || P === void 0 ? void 0 : P.value;
  }), v = V(() => {
    var C, P, $;
    return (P = (C = e.getContainer) !== null && C !== void 0 ? C : e.getPopupContainer) !== null && P !== void 0 ? P : ($ = i.getPopupContainer) === null || $ === void 0 ? void 0 : $.value;
  }), g = V(() => {
    var C, P;
    return (C = e.dropdownMatchSelectWidth) !== null && C !== void 0 ? C : (P = i.dropdownMatchSelectWidth) === null || P === void 0 ? void 0 : P.value;
  }), m = V(() => {
    var C;
    return (e.virtual === void 0 ? ((C = i.virtual) === null || C === void 0 ? void 0 : C.value) !== !1 : e.virtual !== !1) && g.value !== !1;
  }), y = V(() => e.size || n.value), _ = V(() => {
    var C, P, $;
    return (C = e.autocomplete) !== null && C !== void 0 ? C : ($ = (P = i.input) === null || P === void 0 ? void 0 : P.value) === null || $ === void 0 ? void 0 : $.autocomplete;
  }), O = V(() => {
    var C;
    return (C = e.disabled) !== null && C !== void 0 ? C : r.value;
  }), S = V(() => {
    var C;
    return (C = e.csp) !== null && C !== void 0 ? C : i.csp;
  }), x = V(() => {
    var C, P;
    return (C = e.wave) !== null && C !== void 0 ? C : (P = i.wave) === null || P === void 0 ? void 0 : P.value;
  });
  return {
    configProvider: i,
    prefixCls: a,
    direction: o,
    size: y,
    getTargetContainer: p,
    getPopupContainer: v,
    space: f,
    pageHeader: d,
    form: h,
    autoInsertSpaceInButton: u,
    renderEmpty: c,
    virtual: m,
    dropdownMatchSelectWidth: g,
    rootPrefixCls: l,
    getPrefixCls: i.getPrefixCls,
    autocomplete: _,
    csp: S,
    iconPrefixCls: s,
    disabled: O,
    select: i.select,
    wave: x
  };
};
function si(t, e) {
  const n = k({}, t);
  for (let r = 0; r < e.length; r += 1) {
    const i = e[r];
    delete n[i];
  }
  return n;
}
function f7(t) {
  return typeof t == "object" && t != null && t.nodeType === 1;
}
function d7(t, e) {
  return (!e || t !== "hidden") && t !== "visible" && t !== "clip";
}
function eE(t, e) {
  if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
    var n = getComputedStyle(t, null);
    return d7(n.overflowY, e) || d7(n.overflowX, e) || function(r) {
      var i = function(a) {
        if (!a.ownerDocument || !a.ownerDocument.defaultView) return null;
        try {
          return a.ownerDocument.defaultView.frameElement;
        } catch {
          return null;
        }
      }(r);
      return !!i && (i.clientHeight < r.scrollHeight || i.clientWidth < r.scrollWidth);
    }(t);
  }
  return !1;
}
function jO(t, e, n, r, i, a, o, s) {
  return a < t && o > e || a > t && o < e ? 0 : a <= t && s <= n || o >= e && s >= n ? a - t - r : o > e && s < n || a < t && s > n ? o - e + i : 0;
}
var h7 = function(t, e) {
  var n = window, r = e.scrollMode, i = e.block, a = e.inline, o = e.boundary, s = e.skipOverflowHiddenElements, l = typeof o == "function" ? o : function(we) {
    return we !== o;
  };
  if (!f7(t)) throw new TypeError("Invalid target");
  for (var u, c, f = document.scrollingElement || document.documentElement, d = [], h = t; f7(h) && l(h); ) {
    if ((h = (c = (u = h).parentElement) == null ? u.getRootNode().host || null : c) === f) {
      d.push(h);
      break;
    }
    h != null && h === document.body && eE(h) && !eE(document.documentElement) || h != null && eE(h, s) && d.push(h);
  }
  for (var p = n.visualViewport ? n.visualViewport.width : innerWidth, v = n.visualViewport ? n.visualViewport.height : innerHeight, g = window.scrollX || pageXOffset, m = window.scrollY || pageYOffset, y = t.getBoundingClientRect(), _ = y.height, O = y.width, S = y.top, x = y.right, C = y.bottom, P = y.left, $ = i === "start" || i === "nearest" ? S : i === "end" ? C : S + _ / 2, T = a === "center" ? P + O / 2 : a === "end" ? x : P, E = [], M = 0; M < d.length; M++) {
    var R = d[M], N = R.getBoundingClientRect(), I = N.height, B = N.width, Q = N.top, W = N.right, H = N.bottom, U = N.left;
    if (r === "if-needed" && S >= 0 && P >= 0 && C <= v && x <= p && S >= Q && C <= H && P >= U && x <= W) return E;
    var j = getComputedStyle(R), Y = parseInt(j.borderLeftWidth, 10), ne = parseInt(j.borderTopWidth, 10), fe = parseInt(j.borderRightWidth, 10), ue = parseInt(j.borderBottomWidth, 10), ye = 0, se = 0, he = "offsetWidth" in R ? R.offsetWidth - R.clientWidth - Y - fe : 0, re = "offsetHeight" in R ? R.offsetHeight - R.clientHeight - ne - ue : 0, q = "offsetWidth" in R ? R.offsetWidth === 0 ? 0 : B / R.offsetWidth : 0, K = "offsetHeight" in R ? R.offsetHeight === 0 ? 0 : I / R.offsetHeight : 0;
    if (f === R) ye = i === "start" ? $ : i === "end" ? $ - v : i === "nearest" ? jO(m, m + v, v, ne, ue, m + $, m + $ + _, _) : $ - v / 2, se = a === "start" ? T : a === "center" ? T - p / 2 : a === "end" ? T - p : jO(g, g + p, p, Y, fe, g + T, g + T + O, O), ye = Math.max(0, ye + m), se = Math.max(0, se + g);
    else {
      ye = i === "start" ? $ - Q - ne : i === "end" ? $ - H + ue + re : i === "nearest" ? jO(Q, H, I, ne, ue + re, $, $ + _, _) : $ - (Q + I / 2) + re / 2, se = a === "start" ? T - U - Y : a === "center" ? T - (U + B / 2) + he / 2 : a === "end" ? T - W + fe + he : jO(U, W, B, Y, fe + he, T, T + O, O);
      var de = R.scrollLeft, xe = R.scrollTop;
      $ += xe - (ye = Math.max(0, Math.min(xe + ye / K, R.scrollHeight - I / K + re))), T += de - (se = Math.max(0, Math.min(de + se / q, R.scrollWidth - B / q + he)));
    }
    E.push({ el: R, top: ye, left: se });
  }
  return E;
};
function xre(t) {
  return t === Object(t) && Object.keys(t).length !== 0;
}
function ULe(t, e) {
  e === void 0 && (e = "auto");
  var n = "scrollBehavior" in document.body.style;
  t.forEach(function(r) {
    var i = r.el, a = r.top, o = r.left;
    i.scroll && n ? i.scroll({
      top: a,
      left: o,
      behavior: e
    }) : (i.scrollTop = a, i.scrollLeft = o);
  });
}
function XLe(t) {
  return t === !1 ? {
    block: "end",
    inline: "nearest"
  } : xre(t) ? t : {
    block: "start",
    inline: "nearest"
  };
}
function YLe(t, e) {
  var n = t.isConnected || t.ownerDocument.documentElement.contains(t);
  if (xre(e) && typeof e.behavior == "function")
    return e.behavior(n ? h7(t, e) : []);
  if (n) {
    var r = XLe(e);
    return ULe(h7(t, r), r.behavior);
  }
}
function qLe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
  }
}
function wre(t, e, n) {
  return n && qLe(t, n), t;
}
function Ux() {
  return (Ux = Object.assign || function(t) {
    for (var e = 1; e < arguments.length; e++) {
      var n = arguments[e];
      for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
    }
    return t;
  }).apply(this, arguments);
}
function Cre(t, e) {
  t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.__proto__ = e;
}
function Tre(t, e) {
  if (t == null) return {};
  var n, r, i = {}, a = Object.keys(t);
  for (r = 0; r < a.length; r++) e.indexOf(n = a[r]) >= 0 || (i[n] = t[n]);
  return i;
}
function p7(t) {
  return ((e = t) != null && typeof e == "object" && Array.isArray(e) === !1) == 1 && Object.prototype.toString.call(t) === "[object Object]";
  var e;
}
var Pre = Object.prototype, $re = Pre.toString, KLe = Pre.hasOwnProperty, Are = /^\s*function (\w+)/;
function v7(t) {
  var e, n = (e = t == null ? void 0 : t.type) !== null && e !== void 0 ? e : t;
  if (n) {
    var r = n.toString().match(Are);
    return r ? r[1] : "";
  }
  return "";
}
var zh = function(t) {
  var e, n;
  return p7(t) !== !1 && typeof (e = t.constructor) == "function" && p7(n = e.prototype) !== !1 && n.hasOwnProperty("isPrototypeOf") !== !1;
}, Ere = function(t) {
  return t;
}, Bi = Ere;
if (process.env.NODE_ENV !== "production") {
  var JLe = typeof console < "u";
  Bi = JLe ? function(t) {
    console.warn("[VueTypes warn]: " + t);
  } : Ere;
}
var Db = function(t, e) {
  return KLe.call(t, e);
}, e4e = Number.isInteger || function(t) {
  return typeof t == "number" && isFinite(t) && Math.floor(t) === t;
}, Ig = Array.isArray || function(t) {
  return $re.call(t) === "[object Array]";
}, Dg = function(t) {
  return $re.call(t) === "[object Function]";
}, Jw = function(t) {
  return zh(t) && Db(t, "_vueTypes_name");
}, Mre = function(t) {
  return zh(t) && (Db(t, "type") || ["_vueTypes_name", "validator", "default", "required"].some(function(e) {
    return Db(t, e);
  }));
};
function GN(t, e) {
  return Object.defineProperty(t.bind(e), "__original", { value: t });
}
function up(t, e, n) {
  var r;
  n === void 0 && (n = !1);
  var i = !0, a = "";
  r = zh(t) ? t : { type: t };
  var o = Jw(r) ? r._vueTypes_name + " - " : "";
  if (Mre(r) && r.type !== null) {
    if (r.type === void 0 || r.type === !0 || !r.required && e === void 0) return i;
    Ig(r.type) ? (i = r.type.some(function(f) {
      return up(f, e, !0) === !0;
    }), a = r.type.map(function(f) {
      return v7(f);
    }).join(" or ")) : i = (a = v7(r)) === "Array" ? Ig(e) : a === "Object" ? zh(e) : a === "String" || a === "Number" || a === "Boolean" || a === "Function" ? function(f) {
      if (f == null) return "";
      var d = f.constructor.toString().match(Are);
      return d ? d[1] : "";
    }(e) === a : e instanceof r.type;
  }
  if (!i) {
    var s = o + 'value "' + e + '" should be of type "' + a + '"';
    return n === !1 ? (Bi(s), !1) : s;
  }
  if (Db(r, "validator") && Dg(r.validator)) {
    var l = Bi, u = [];
    if (Bi = function(f) {
      u.push(f);
    }, i = r.validator(e), Bi = l, !i) {
      var c = (u.length > 1 ? "* " : "") + u.join(`
* `);
      return u.length = 0, n === !1 ? (Bi(c), i) : c;
    }
  }
  return i;
}
function vo(t, e) {
  var n = Object.defineProperties(e, { _vueTypes_name: { value: t, writable: !0 }, isRequired: { get: function() {
    return this.required = !0, this;
  } }, def: { value: function(i) {
    return i !== void 0 || this.default ? Dg(i) || up(this, i, !0) === !0 ? (this.default = Ig(i) ? function() {
      return [].concat(i);
    } : zh(i) ? function() {
      return Object.assign({}, i);
    } : i, this) : (Bi(this._vueTypes_name + ' - invalid default value: "' + i + '"'), this) : this;
  } } }), r = n.validator;
  return Dg(r) && (n.validator = GN(r, n)), n;
}
function Fl(t, e) {
  var n = vo(t, e);
  return Object.defineProperty(n, "validate", { value: function(r) {
    return Dg(this.validator) && Bi(this._vueTypes_name + ` - calling .validate() will overwrite the current custom validator function. Validator info:
` + JSON.stringify(this)), this.validator = GN(r, this), this;
  } });
}
function g7(t, e, n) {
  var r, i, a = (r = e, i = {}, Object.getOwnPropertyNames(r).forEach(function(f) {
    i[f] = Object.getOwnPropertyDescriptor(r, f);
  }), Object.defineProperties({}, i));
  if (a._vueTypes_name = t, !zh(n)) return a;
  var o, s, l = n.validator, u = Tre(n, ["validator"]);
  if (Dg(l)) {
    var c = a.validator;
    c && (c = (s = (o = c).__original) !== null && s !== void 0 ? s : o), a.validator = GN(c ? function(f) {
      return c.call(this, f) && l.call(this, f);
    } : l, a);
  }
  return Object.assign(a, u);
}
function P2(t) {
  return t.replace(/^(?!\s*$)/gm, "  ");
}
var t4e = function() {
  return Fl("any", {});
}, n4e = function() {
  return Fl("function", { type: Function });
}, r4e = function() {
  return Fl("boolean", { type: Boolean });
}, i4e = function() {
  return Fl("string", { type: String });
}, a4e = function() {
  return Fl("number", { type: Number });
}, o4e = function() {
  return Fl("array", { type: Array });
}, s4e = function() {
  return Fl("object", { type: Object });
}, l4e = function() {
  return vo("integer", { type: Number, validator: function(t) {
    return e4e(t);
  } });
}, u4e = function() {
  return vo("symbol", { validator: function(t) {
    return typeof t == "symbol";
  } });
};
function c4e(t, e) {
  if (e === void 0 && (e = "custom validation failed"), typeof t != "function") throw new TypeError("[VueTypes error]: You must provide a function as argument");
  return vo(t.name || "<<anonymous function>>", { validator: function(n) {
    var r = t(n);
    return r || Bi(this._vueTypes_name + " - " + e), r;
  } });
}
function f4e(t) {
  if (!Ig(t)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
  var e = 'oneOf - value should be one of "' + t.join('", "') + '".', n = t.reduce(function(r, i) {
    if (i != null) {
      var a = i.constructor;
      r.indexOf(a) === -1 && r.push(a);
    }
    return r;
  }, []);
  return vo("oneOf", { type: n.length > 0 ? n : void 0, validator: function(r) {
    var i = t.indexOf(r) !== -1;
    return i || Bi(e), i;
  } });
}
function d4e(t) {
  if (!Ig(t)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
  for (var e = !1, n = [], r = 0; r < t.length; r += 1) {
    var i = t[r];
    if (Mre(i)) {
      if (Jw(i) && i._vueTypes_name === "oneOf") {
        n = n.concat(i.type);
        continue;
      }
      if (Dg(i.validator) && (e = !0), i.type !== !0 && i.type) {
        n = n.concat(i.type);
        continue;
      }
    }
    n.push(i);
  }
  return n = n.filter(function(a, o) {
    return n.indexOf(a) === o;
  }), vo("oneOfType", e ? { type: n, validator: function(a) {
    var o = [], s = t.some(function(l) {
      var u = up(Jw(l) && l._vueTypes_name === "oneOf" ? l.type || null : l, a, !0);
      return typeof u == "string" && o.push(u), u === !0;
    });
    return s || Bi("oneOfType - provided value does not match any of the " + o.length + ` passed-in validators:
` + P2(o.join(`
`))), s;
  } } : { type: n });
}
function h4e(t) {
  return vo("arrayOf", { type: Array, validator: function(e) {
    var n, r = e.every(function(i) {
      return (n = up(t, i, !0)) === !0;
    });
    return r || Bi(`arrayOf - value validation error:
` + P2(n)), r;
  } });
}
function p4e(t) {
  return vo("instanceOf", { type: t });
}
function v4e(t) {
  return vo("objectOf", { type: Object, validator: function(e) {
    var n, r = Object.keys(e).every(function(i) {
      return (n = up(t, e[i], !0)) === !0;
    });
    return r || Bi(`objectOf - value validation error:
` + P2(n)), r;
  } });
}
function g4e(t) {
  var e = Object.keys(t), n = e.filter(function(i) {
    var a;
    return !!(!((a = t[i]) === null || a === void 0) && a.required);
  }), r = vo("shape", { type: Object, validator: function(i) {
    var a = this;
    if (!zh(i)) return !1;
    var o = Object.keys(i);
    if (n.length > 0 && n.some(function(l) {
      return o.indexOf(l) === -1;
    })) {
      var s = n.filter(function(l) {
        return o.indexOf(l) === -1;
      });
      return Bi(s.length === 1 ? 'shape - required property "' + s[0] + '" is not defined.' : 'shape - required properties "' + s.join('", "') + '" are not defined.'), !1;
    }
    return o.every(function(l) {
      if (e.indexOf(l) === -1) return a._vueTypes_isLoose === !0 || (Bi('shape - shape definition does not include a "' + l + '" property. Allowed keys: "' + e.join('", "') + '".'), !1);
      var u = up(t[l], i[l], !0);
      return typeof u == "string" && Bi('shape - "' + l + `" property validation error:
 ` + P2(u)), u === !0;
    });
  } });
  return Object.defineProperty(r, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(r, "loose", { get: function() {
    return this._vueTypes_isLoose = !0, this;
  } }), r;
}
var vl = function() {
  function t() {
  }
  return t.extend = function(e) {
    var n = this;
    if (Ig(e)) return e.forEach(function(f) {
      return n.extend(f);
    }), this;
    var r = e.name, i = e.validate, a = i !== void 0 && i, o = e.getter, s = o !== void 0 && o, l = Tre(e, ["name", "validate", "getter"]);
    if (Db(this, r)) throw new TypeError('[VueTypes error]: Type "' + r + '" already defined');
    var u, c = l.type;
    return Jw(c) ? (delete l.type, Object.defineProperty(this, r, s ? { get: function() {
      return g7(r, c, l);
    } } : { value: function() {
      var f, d = g7(r, c, l);
      return d.validator && (d.validator = (f = d.validator).bind.apply(f, [d].concat([].slice.call(arguments)))), d;
    } })) : (u = s ? { get: function() {
      var f = Object.assign({}, l);
      return a ? Fl(r, f) : vo(r, f);
    }, enumerable: !0 } : { value: function() {
      var f, d, h = Object.assign({}, l);
      return f = a ? Fl(r, h) : vo(r, h), h.validator && (f.validator = (d = h.validator).bind.apply(d, [f].concat([].slice.call(arguments)))), f;
    }, enumerable: !0 }, Object.defineProperty(this, r, u));
  }, wre(t, null, [{ key: "any", get: function() {
    return t4e();
  } }, { key: "func", get: function() {
    return n4e().def(this.defaults.func);
  } }, { key: "bool", get: function() {
    return r4e().def(this.defaults.bool);
  } }, { key: "string", get: function() {
    return i4e().def(this.defaults.string);
  } }, { key: "number", get: function() {
    return a4e().def(this.defaults.number);
  } }, { key: "array", get: function() {
    return o4e().def(this.defaults.array);
  } }, { key: "object", get: function() {
    return s4e().def(this.defaults.object);
  } }, { key: "integer", get: function() {
    return l4e().def(this.defaults.integer);
  } }, { key: "symbol", get: function() {
    return u4e();
  } }]), t;
}();
function Ire(t) {
  var e;
  return t === void 0 && (t = { func: function() {
  }, bool: !0, string: "", number: 0, array: function() {
    return [];
  }, object: function() {
    return {};
  }, integer: 0 }), (e = function(n) {
    function r() {
      return n.apply(this, arguments) || this;
    }
    return Cre(r, n), wre(r, null, [{ key: "sensibleDefaults", get: function() {
      return Ux({}, this.defaults);
    }, set: function(i) {
      this.defaults = i !== !1 ? Ux({}, i !== !0 ? i : t) : {};
    } }]), r;
  }(vl)).defaults = Ux({}, t), e;
}
vl.defaults = {}, vl.custom = c4e, vl.oneOf = f4e, vl.instanceOf = p4e, vl.oneOfType = d4e, vl.arrayOf = h4e, vl.objectOf = v4e, vl.shape = g4e, vl.utils = { validate: function(t, e) {
  return up(e, t, !0) === !0;
}, toType: function(t, e, n) {
  return n === void 0 && (n = !1), n ? Fl(t, e) : vo(t, e);
} };
(function(t) {
  function e() {
    return t.apply(this, arguments) || this;
  }
  return Cre(e, t), e;
})(Ire());
const oe = Ire({
  func: void 0,
  bool: void 0,
  string: void 0,
  number: void 0,
  array: void 0,
  object: void 0,
  integer: void 0
});
oe.extend([{
  name: "looseBool",
  getter: !0,
  type: Boolean,
  default: void 0
}, {
  name: "style",
  getter: !0,
  type: [String, Object],
  default: void 0
}, {
  name: "VueNode",
  getter: !0,
  type: null
}]);
function m4e(t) {
  return t.default = void 0, t;
}
const lo = (t, e, n) => {
  Lo(t, `[ant-design-vue: ${e}] ${n}`);
};
function m7(t, e) {
  const {
    key: n
  } = t;
  let r;
  return "value" in t && ({
    value: r
  } = t), n ?? (r !== void 0 ? r : `rc-index-key-${e}`);
}
function Dre(t, e) {
  const {
    label: n,
    value: r,
    options: i
  } = t || {};
  return {
    label: n || (e ? "children" : "label"),
    value: r || "value",
    options: i || "options"
  };
}
function y4e(t) {
  let {
    fieldNames: e,
    childrenAsData: n
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const r = [], {
    label: i,
    value: a,
    options: o
  } = Dre(e, !1);
  function s(l, u) {
    l.forEach((c) => {
      const f = c[i];
      if (u || !(o in c)) {
        const d = c[a];
        r.push({
          key: m7(c, r.length),
          groupOption: u,
          data: c,
          label: f,
          value: d
        });
      } else {
        let d = f;
        d === void 0 && n && (d = c.label), r.push({
          key: m7(c, r.length),
          group: !0,
          data: c,
          label: d
        }), s(c[o], !0);
      }
    });
  }
  return s(t, !1), r;
}
function SR(t) {
  const e = k({}, t);
  return "props" in e || Object.defineProperty(e, "props", {
    get() {
      return Nh(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), e;
    }
  }), e;
}
function b4e(t, e) {
  if (!e || !e.length)
    return null;
  let n = !1;
  function r(a, o) {
    let [s, ...l] = o;
    if (!s)
      return [a];
    const u = a.split(s);
    return n = n || u.length > 1, u.reduce((c, f) => [...c, ...r(f, l)], []).filter((c) => c);
  }
  const i = r(t, e);
  return n ? i : null;
}
function _4e() {
  return "";
}
function O4e(t) {
  return t ? t.ownerDocument : window.document;
}
function Rre() {
}
const S4e = () => ({
  action: oe.oneOfType([oe.string, oe.arrayOf(oe.string)]).def([]),
  showAction: oe.any.def([]),
  hideAction: oe.any.def([]),
  getPopupClassNameFromAlign: oe.any.def(_4e),
  onPopupVisibleChange: Function,
  afterPopupVisibleChange: oe.func.def(Rre),
  popup: oe.any,
  arrow: oe.bool.def(!0),
  popupStyle: {
    type: Object,
    default: void 0
  },
  prefixCls: oe.string.def("rc-trigger-popup"),
  popupClassName: oe.string.def(""),
  popupPlacement: String,
  builtinPlacements: oe.object,
  popupTransitionName: String,
  popupAnimation: oe.any,
  mouseEnterDelay: oe.number.def(0),
  mouseLeaveDelay: oe.number.def(0.1),
  zIndex: Number,
  focusDelay: oe.number.def(0),
  blurDelay: oe.number.def(0.15),
  getPopupContainer: Function,
  getDocument: oe.func.def(O4e),
  forceRender: {
    type: Boolean,
    default: void 0
  },
  destroyPopupOnHide: {
    type: Boolean,
    default: !1
  },
  mask: {
    type: Boolean,
    default: !1
  },
  maskClosable: {
    type: Boolean,
    default: !0
  },
  // onPopupAlign: PropTypes.func.def(noop),
  popupAlign: oe.object.def(() => ({})),
  popupVisible: {
    type: Boolean,
    default: void 0
  },
  defaultPopupVisible: {
    type: Boolean,
    default: !1
  },
  maskTransitionName: String,
  maskAnimation: String,
  stretch: String,
  alignPoint: {
    type: Boolean,
    default: void 0
  },
  autoDestroy: {
    type: Boolean,
    default: !1
  },
  mobile: Object,
  getTriggerDOMNode: Function
}), jN = {
  visible: Boolean,
  prefixCls: String,
  zIndex: Number,
  destroyPopupOnHide: Boolean,
  forceRender: Boolean,
  arrow: {
    type: Boolean,
    default: !0
  },
  // Legacy Motion
  animation: [String, Object],
  transitionName: String,
  // Measure
  stretch: {
    type: String
  },
  // Align
  align: {
    type: Object
  },
  point: {
    type: Object
  },
  getRootDomNode: {
    type: Function
  },
  getClassNameFromAlign: {
    type: Function
  },
  onAlign: {
    type: Function
  },
  onMouseenter: {
    type: Function
  },
  onMouseleave: {
    type: Function
  },
  onMousedown: {
    type: Function
  },
  onTouchstart: {
    type: Function
  }
}, x4e = k(k({}, jN), {
  mobile: {
    type: Object
  }
}), w4e = k(k({}, jN), {
  mask: Boolean,
  mobile: {
    type: Object
  },
  maskAnimation: String,
  maskTransitionName: String
});
function ZN(t) {
  let {
    prefixCls: e,
    animation: n,
    transitionName: r
  } = t;
  return n ? {
    name: `${e}-${n}`
  } : r ? {
    name: r
  } : {};
}
function kre(t) {
  const {
    prefixCls: e,
    visible: n,
    zIndex: r,
    mask: i,
    maskAnimation: a,
    maskTransitionName: o
  } = t;
  if (!i)
    return null;
  let s = {};
  return (o || a) && (s = ZN({
    prefixCls: e,
    transitionName: o,
    animation: a
  })), D(mo, te({
    appear: !0
  }, s), {
    default: () => [_r(D("div", {
      style: {
        zIndex: r
      },
      class: `${e}-mask`
    }, null), [[dxe("if"), n]])]
  });
}
kre.displayName = "Mask";
const C4e = ae({
  compatConfig: {
    MODE: 3
  },
  name: "MobilePopupInner",
  inheritAttrs: !1,
  props: x4e,
  emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  setup(t, e) {
    let {
      expose: n,
      slots: r
    } = e;
    const i = ee();
    return n({
      forceAlign: () => {
      },
      getElement: () => i.value
    }), () => {
      var a;
      const {
        zIndex: o,
        visible: s,
        prefixCls: l,
        mobile: {
          popupClassName: u,
          popupStyle: c,
          popupMotion: f = {},
          popupRender: d
        } = {}
      } = t, h = k({
        zIndex: o
      }, c);
      let p = qr((a = r.default) === null || a === void 0 ? void 0 : a.call(r));
      p.length > 1 && (p = D("div", {
        class: `${l}-content`
      }, [p])), d && (p = d(p));
      const v = Re(l, u);
      return D(mo, te({
        ref: i
      }, f), {
        default: () => [s ? D("div", {
          class: v,
          style: h
        }, [p]) : null]
      });
    };
  }
});
var T4e = function(t, e, n, r) {
  function i(a) {
    return a instanceof n ? a : new n(function(o) {
      o(a);
    });
  }
  return new (n || (n = Promise))(function(a, o) {
    function s(c) {
      try {
        u(r.next(c));
      } catch (f) {
        o(f);
      }
    }
    function l(c) {
      try {
        u(r.throw(c));
      } catch (f) {
        o(f);
      }
    }
    function u(c) {
      c.done ? a(c.value) : i(c.value).then(s, l);
    }
    u((r = r.apply(t, e || [])).next());
  });
};
const y7 = ["measure", "align", null, "motion"], P4e = (t, e) => {
  const n = ve(null), r = ve(), i = ve(!1);
  function a(l) {
    i.value || (n.value = l);
  }
  function o() {
    en.cancel(r.value);
  }
  function s(l) {
    o(), r.value = en(() => {
      let u = n.value;
      switch (n.value) {
        case "align":
          u = "motion";
          break;
        case "motion":
          u = "stable";
          break;
      }
      a(u), l == null || l();
    });
  }
  return me(t, () => {
    a("measure");
  }, {
    immediate: !0,
    flush: "post"
  }), _t(() => {
    me(n, () => {
      switch (n.value) {
        case "measure":
          e();
          break;
      }
      n.value && (r.value = en(() => T4e(void 0, void 0, void 0, function* () {
        const l = y7.indexOf(n.value), u = y7[l + 1];
        u && l !== -1 && a(u);
      })));
    }, {
      immediate: !0,
      flush: "post"
    });
  }), Qt(() => {
    i.value = !0, o();
  }), [n, s];
}, $4e = (t) => {
  const e = ve({
    width: 0,
    height: 0
  });
  function n(i) {
    e.value = {
      width: i.offsetWidth,
      height: i.offsetHeight
    };
  }
  return [V(() => {
    const i = {};
    if (t.value) {
      const {
        width: a,
        height: o
      } = e.value;
      t.value.indexOf("height") !== -1 && o ? i.height = `${o}px` : t.value.indexOf("minHeight") !== -1 && o && (i.minHeight = `${o}px`), t.value.indexOf("width") !== -1 && a ? i.width = `${a}px` : t.value.indexOf("minWidth") !== -1 && a && (i.minWidth = `${a}px`);
    }
    return i;
  }), n];
};
function b7(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e && (r = r.filter(function(i) {
      return Object.getOwnPropertyDescriptor(t, i).enumerable;
    })), n.push.apply(n, r);
  }
  return n;
}
function _7(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2 ? b7(Object(n), !0).forEach(function(r) {
      A4e(t, r, n[r]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : b7(Object(n)).forEach(function(r) {
      Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
    });
  }
  return t;
}
function xR(t) {
  "@babel/helpers - typeof";
  return xR = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
    return typeof e;
  } : function(e) {
    return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
  }, xR(t);
}
function A4e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : t[e] = n, t;
}
var _0, E4e = {
  Webkit: "-webkit-",
  Moz: "-moz-",
  // IE did it wrong again ...
  ms: "-ms-",
  O: "-o-"
};
function eC() {
  if (_0 !== void 0)
    return _0;
  _0 = "";
  var t = document.createElement("p").style, e = "Transform";
  for (var n in E4e)
    n + e in t && (_0 = n);
  return _0;
}
function Lre() {
  return eC() ? "".concat(eC(), "TransitionProperty") : "transitionProperty";
}
function $2() {
  return eC() ? "".concat(eC(), "Transform") : "transform";
}
function O7(t, e) {
  var n = Lre();
  n && (t.style[n] = e, n !== "transitionProperty" && (t.style.transitionProperty = e));
}
function tE(t, e) {
  var n = $2();
  n && (t.style[n] = e, n !== "transform" && (t.style.transform = e));
}
function M4e(t) {
  return t.style.transitionProperty || t.style[Lre()];
}
function I4e(t) {
  var e = window.getComputedStyle(t, null), n = e.getPropertyValue("transform") || e.getPropertyValue($2());
  if (n && n !== "none") {
    var r = n.replace(/[^0-9\-.,]/g, "").split(",");
    return {
      x: parseFloat(r[12] || r[4], 0),
      y: parseFloat(r[13] || r[5], 0)
    };
  }
  return {
    x: 0,
    y: 0
  };
}
var D4e = /matrix\((.*)\)/, R4e = /matrix3d\((.*)\)/;
function k4e(t, e) {
  var n = window.getComputedStyle(t, null), r = n.getPropertyValue("transform") || n.getPropertyValue($2());
  if (r && r !== "none") {
    var i, a = r.match(D4e);
    if (a)
      a = a[1], i = a.split(",").map(function(s) {
        return parseFloat(s, 10);
      }), i[4] = e.x, i[5] = e.y, tE(t, "matrix(".concat(i.join(","), ")"));
    else {
      var o = r.match(R4e)[1];
      i = o.split(",").map(function(s) {
        return parseFloat(s, 10);
      }), i[12] = e.x, i[13] = e.y, tE(t, "matrix3d(".concat(i.join(","), ")"));
    }
  } else
    tE(t, "translateX(".concat(e.x, "px) translateY(").concat(e.y, "px) translateZ(0)"));
}
var L4e = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, j_;
function S7(t) {
  var e = t.style.display;
  t.style.display = "none", t.offsetHeight, t.style.display = e;
}
function Qv(t, e, n) {
  var r = n;
  if (xR(e) === "object") {
    for (var i in e)
      e.hasOwnProperty(i) && Qv(t, i, e[i]);
    return;
  }
  if (typeof r < "u") {
    typeof r == "number" && (r = "".concat(r, "px")), t.style[e] = r;
    return;
  }
  return j_(t, e);
}
function N4e(t) {
  var e, n, r, i = t.ownerDocument, a = i.body, o = i && i.documentElement;
  return e = t.getBoundingClientRect(), n = Math.floor(e.left), r = Math.floor(e.top), n -= o.clientLeft || a.clientLeft || 0, r -= o.clientTop || a.clientTop || 0, {
    left: n,
    top: r
  };
}
function Nre(t, e) {
  var n = t["page".concat(e ? "Y" : "X", "Offset")], r = "scroll".concat(e ? "Top" : "Left");
  if (typeof n != "number") {
    var i = t.document;
    n = i.documentElement[r], typeof n != "number" && (n = i.body[r]);
  }
  return n;
}
function Bre(t) {
  return Nre(t);
}
function zre(t) {
  return Nre(t, !0);
}
function Rb(t) {
  var e = N4e(t), n = t.ownerDocument, r = n.defaultView || n.parentWindow;
  return e.left += Bre(r), e.top += zre(r), e;
}
function UN(t) {
  return t != null && t == t.window;
}
function Vre(t) {
  return UN(t) ? t.document : t.nodeType === 9 ? t : t.ownerDocument;
}
function B4e(t, e, n) {
  var r = n, i = "", a = Vre(t);
  return r = r || a.defaultView.getComputedStyle(t, null), r && (i = r.getPropertyValue(e) || r[e]), i;
}
var z4e = new RegExp("^(".concat(L4e, ")(?!px)[a-z%]+$"), "i"), V4e = /^(top|right|bottom|left)$/, nE = "currentStyle", rE = "runtimeStyle", id = "left", F4e = "px";
function W4e(t, e) {
  var n = t[nE] && t[nE][e];
  if (z4e.test(n) && !V4e.test(e)) {
    var r = t.style, i = r[id], a = t[rE][id];
    t[rE][id] = t[nE][id], r[id] = e === "fontSize" ? "1em" : n || 0, n = r.pixelLeft + F4e, r[id] = i, t[rE][id] = a;
  }
  return n === "" ? "auto" : n;
}
typeof window < "u" && (j_ = window.getComputedStyle ? B4e : W4e);
function ZO(t, e) {
  return t === "left" ? e.useCssRight ? "right" : t : e.useCssBottom ? "bottom" : t;
}
function x7(t) {
  if (t === "left")
    return "right";
  if (t === "right")
    return "left";
  if (t === "top")
    return "bottom";
  if (t === "bottom")
    return "top";
}
function w7(t, e, n) {
  Qv(t, "position") === "static" && (t.style.position = "relative");
  var r = -999, i = -999, a = ZO("left", n), o = ZO("top", n), s = x7(a), l = x7(o);
  a !== "left" && (r = 999), o !== "top" && (i = 999);
  var u = "", c = Rb(t);
  ("left" in e || "top" in e) && (u = M4e(t) || "", O7(t, "none")), "left" in e && (t.style[s] = "", t.style[a] = "".concat(r, "px")), "top" in e && (t.style[l] = "", t.style[o] = "".concat(i, "px")), S7(t);
  var f = Rb(t), d = {};
  for (var h in e)
    if (e.hasOwnProperty(h)) {
      var p = ZO(h, n), v = h === "left" ? r : i, g = c[h] - f[h];
      p === h ? d[p] = v + g : d[p] = v - g;
    }
  Qv(t, d), S7(t), ("left" in e || "top" in e) && O7(t, u);
  var m = {};
  for (var y in e)
    if (e.hasOwnProperty(y)) {
      var _ = ZO(y, n), O = e[y] - c[y];
      y === _ ? m[_] = d[_] + O : m[_] = d[_] - O;
    }
  Qv(t, m);
}
function Q4e(t, e) {
  var n = Rb(t), r = I4e(t), i = {
    x: r.x,
    y: r.y
  };
  "left" in e && (i.x = r.x + e.left - n.left), "top" in e && (i.y = r.y + e.top - n.top), k4e(t, i);
}
function H4e(t, e, n) {
  if (n.ignoreShake) {
    var r = Rb(t), i = r.left.toFixed(0), a = r.top.toFixed(0), o = e.left.toFixed(0), s = e.top.toFixed(0);
    if (i === o && a === s)
      return;
  }
  n.useCssRight || n.useCssBottom ? w7(t, e, n) : n.useCssTransform && $2() in document.body.style ? Q4e(t, e) : w7(t, e, n);
}
function XN(t, e) {
  for (var n = 0; n < t.length; n++)
    e(t[n]);
}
function Fre(t) {
  return j_(t, "boxSizing") === "border-box";
}
var G4e = ["margin", "border", "padding"], wR = -1, j4e = 2, CR = 1, Z4e = 0;
function U4e(t, e, n) {
  var r = {}, i = t.style, a;
  for (a in e)
    e.hasOwnProperty(a) && (r[a] = i[a], i[a] = e[a]);
  n.call(t);
  for (a in e)
    e.hasOwnProperty(a) && (i[a] = r[a]);
}
function fy(t, e, n) {
  var r = 0, i, a, o;
  for (a = 0; a < e.length; a++)
    if (i = e[a], i)
      for (o = 0; o < n.length; o++) {
        var s = void 0;
        i === "border" ? s = "".concat(i).concat(n[o], "Width") : s = i + n[o], r += parseFloat(j_(t, s)) || 0;
      }
  return r;
}
var Pl = {
  getParent: function(e) {
    var n = e;
    do
      n.nodeType === 11 && n.host ? n = n.host : n = n.parentNode;
    while (n && n.nodeType !== 1 && n.nodeType !== 9);
    return n;
  }
};
XN(["Width", "Height"], function(t) {
  Pl["doc".concat(t)] = function(e) {
    var n = e.document;
    return Math.max(
      // firefox chrome documentElement.scrollHeight< body.scrollHeight
      // ie standard mode : documentElement.scrollHeight> body.scrollHeight
      n.documentElement["scroll".concat(t)],
      // quirks : documentElement.scrollHeight 最大等于可视窗口多一点？
      n.body["scroll".concat(t)],
      Pl["viewport".concat(t)](n)
    );
  }, Pl["viewport".concat(t)] = function(e) {
    var n = "client".concat(t), r = e.document, i = r.body, a = r.documentElement, o = a[n];
    return r.compatMode === "CSS1Compat" && o || i && i[n] || o;
  };
});
function C7(t, e, n) {
  var r = n;
  if (UN(t))
    return e === "width" ? Pl.viewportWidth(t) : Pl.viewportHeight(t);
  if (t.nodeType === 9)
    return e === "width" ? Pl.docWidth(t) : Pl.docHeight(t);
  var i = e === "width" ? ["Left", "Right"] : ["Top", "Bottom"], a = Math.floor(e === "width" ? t.getBoundingClientRect().width : t.getBoundingClientRect().height), o = Fre(t), s = 0;
  (a == null || a <= 0) && (a = void 0, s = j_(t, e), (s == null || Number(s) < 0) && (s = t.style[e] || 0), s = Math.floor(parseFloat(s)) || 0), r === void 0 && (r = o ? CR : wR);
  var l = a !== void 0 || o, u = a || s;
  return r === wR ? l ? u - fy(t, ["border", "padding"], i) : s : l ? r === CR ? u : u + (r === j4e ? -fy(t, ["border"], i) : fy(t, ["margin"], i)) : s + fy(t, G4e.slice(r), i);
}
var X4e = {
  position: "absolute",
  visibility: "hidden",
  display: "block"
};
function T7() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
    e[n] = arguments[n];
  var r, i = e[0];
  return i.offsetWidth !== 0 ? r = C7.apply(void 0, e) : U4e(i, X4e, function() {
    r = C7.apply(void 0, e);
  }), r;
}
XN(["width", "height"], function(t) {
  var e = t.charAt(0).toUpperCase() + t.slice(1);
  Pl["outer".concat(e)] = function(r, i) {
    return r && T7(r, t, i ? Z4e : CR);
  };
  var n = t === "width" ? ["Left", "Right"] : ["Top", "Bottom"];
  Pl[t] = function(r, i) {
    var a = i;
    if (a !== void 0) {
      if (r) {
        var o = Fre(r);
        return o && (a += fy(r, ["padding", "border"], n)), Qv(r, t, a);
      }
      return;
    }
    return r && T7(r, t, wR);
  };
});
function Wre(t, e) {
  for (var n in e)
    e.hasOwnProperty(n) && (t[n] = e[n]);
  return t;
}
var Nt = {
  getWindow: function(e) {
    if (e && e.document && e.setTimeout)
      return e;
    var n = e.ownerDocument || e;
    return n.defaultView || n.parentWindow;
  },
  getDocument: Vre,
  offset: function(e, n, r) {
    if (typeof n < "u")
      H4e(e, n, r || {});
    else
      return Rb(e);
  },
  isWindow: UN,
  each: XN,
  css: Qv,
  clone: function(e) {
    var n, r = {};
    for (n in e)
      e.hasOwnProperty(n) && (r[n] = e[n]);
    var i = e.overflow;
    if (i)
      for (n in e)
        e.hasOwnProperty(n) && (r.overflow[n] = e.overflow[n]);
    return r;
  },
  mix: Wre,
  getWindowScrollLeft: function(e) {
    return Bre(e);
  },
  getWindowScrollTop: function(e) {
    return zre(e);
  },
  merge: function() {
    for (var e = {}, n = 0; n < arguments.length; n++)
      Nt.mix(e, n < 0 || arguments.length <= n ? void 0 : arguments[n]);
    return e;
  },
  viewportWidth: 0,
  viewportHeight: 0
};
Wre(Nt, Pl);
var iE = Nt.getParent;
function TR(t) {
  if (Nt.isWindow(t) || t.nodeType === 9)
    return null;
  var e = Nt.getDocument(t), n = e.body, r, i = Nt.css(t, "position"), a = i === "fixed" || i === "absolute";
  if (!a)
    return t.nodeName.toLowerCase() === "html" ? null : iE(t);
  for (r = iE(t); r && r !== n && r.nodeType !== 9; r = iE(r))
    if (i = Nt.css(r, "position"), i !== "static")
      return r;
  return null;
}
var P7 = Nt.getParent;
function Y4e(t) {
  if (Nt.isWindow(t) || t.nodeType === 9)
    return !1;
  var e = Nt.getDocument(t), n = e.body, r = null;
  for (
    r = P7(t);
    // 修复元素位于 document.documentElement 下导致崩溃问题
    r && r !== n && r !== e;
    r = P7(r)
  ) {
    var i = Nt.css(r, "position");
    if (i === "fixed")
      return !0;
  }
  return !1;
}
function YN(t, e) {
  for (var n = {
    left: 0,
    right: 1 / 0,
    top: 0,
    bottom: 1 / 0
  }, r = TR(t), i = Nt.getDocument(t), a = i.defaultView || i.parentWindow, o = i.body, s = i.documentElement; r; ) {
    if ((navigator.userAgent.indexOf("MSIE") === -1 || r.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire
    // viewport. In some browsers, el.offsetParent may be
    // document.documentElement, so check for that too.
    r !== o && r !== s && Nt.css(r, "overflow") !== "visible") {
      var l = Nt.offset(r);
      l.left += r.clientLeft, l.top += r.clientTop, n.top = Math.max(n.top, l.top), n.right = Math.min(
        n.right,
        // consider area without scrollBar
        l.left + r.clientWidth
      ), n.bottom = Math.min(n.bottom, l.top + r.clientHeight), n.left = Math.max(n.left, l.left);
    } else if (r === o || r === s)
      break;
    r = TR(r);
  }
  var u = null;
  if (!Nt.isWindow(t) && t.nodeType !== 9) {
    u = t.style.position;
    var c = Nt.css(t, "position");
    c === "absolute" && (t.style.position = "fixed");
  }
  var f = Nt.getWindowScrollLeft(a), d = Nt.getWindowScrollTop(a), h = Nt.viewportWidth(a), p = Nt.viewportHeight(a), v = s.scrollWidth, g = s.scrollHeight, m = window.getComputedStyle(o);
  if (m.overflowX === "hidden" && (v = a.innerWidth), m.overflowY === "hidden" && (g = a.innerHeight), t.style && (t.style.position = u), e || Y4e(t))
    n.left = Math.max(n.left, f), n.top = Math.max(n.top, d), n.right = Math.min(n.right, f + h), n.bottom = Math.min(n.bottom, d + p);
  else {
    var y = Math.max(v, f + h);
    n.right = Math.min(n.right, y);
    var _ = Math.max(g, d + p);
    n.bottom = Math.min(n.bottom, _);
  }
  return n.top >= 0 && n.left >= 0 && n.bottom > n.top && n.right > n.left ? n : null;
}
function q4e(t, e, n, r) {
  var i = Nt.clone(t), a = {
    width: e.width,
    height: e.height
  };
  return r.adjustX && i.left < n.left && (i.left = n.left), r.resizeWidth && i.left >= n.left && i.left + a.width > n.right && (a.width -= i.left + a.width - n.right), r.adjustX && i.left + a.width > n.right && (i.left = Math.max(n.right - a.width, n.left)), r.adjustY && i.top < n.top && (i.top = n.top), r.resizeHeight && i.top >= n.top && i.top + a.height > n.bottom && (a.height -= i.top + a.height - n.bottom), r.adjustY && i.top + a.height > n.bottom && (i.top = Math.max(n.bottom - a.height, n.top)), Nt.mix(i, a);
}
function qN(t) {
  var e, n, r;
  if (!Nt.isWindow(t) && t.nodeType !== 9)
    e = Nt.offset(t), n = Nt.outerWidth(t), r = Nt.outerHeight(t);
  else {
    var i = Nt.getWindow(t);
    e = {
      left: Nt.getWindowScrollLeft(i),
      top: Nt.getWindowScrollTop(i)
    }, n = Nt.viewportWidth(i), r = Nt.viewportHeight(i);
  }
  return e.width = n, e.height = r, e;
}
function $7(t, e) {
  var n = e.charAt(0), r = e.charAt(1), i = t.width, a = t.height, o = t.left, s = t.top;
  return n === "c" ? s += a / 2 : n === "b" && (s += a), r === "c" ? o += i / 2 : r === "r" && (o += i), {
    left: o,
    top: s
  };
}
function UO(t, e, n, r, i) {
  var a = $7(e, n[1]), o = $7(t, n[0]), s = [o.left - a.left, o.top - a.top];
  return {
    left: Math.round(t.left - s[0] + r[0] - i[0]),
    top: Math.round(t.top - s[1] + r[1] - i[1])
  };
}
function A7(t, e, n) {
  return t.left < n.left || t.left + e.width > n.right;
}
function E7(t, e, n) {
  return t.top < n.top || t.top + e.height > n.bottom;
}
function K4e(t, e, n) {
  return t.left > n.right || t.left + e.width < n.left;
}
function J4e(t, e, n) {
  return t.top > n.bottom || t.top + e.height < n.top;
}
function XO(t, e, n) {
  var r = [];
  return Nt.each(t, function(i) {
    r.push(i.replace(e, function(a) {
      return n[a];
    }));
  }), r;
}
function YO(t, e) {
  return t[e] = -t[e], t;
}
function M7(t, e) {
  var n;
  return /%$/.test(t) ? n = parseInt(t.substring(0, t.length - 1), 10) / 100 * e : n = parseInt(t, 10), n || 0;
}
function I7(t, e) {
  t[0] = M7(t[0], e.width), t[1] = M7(t[1], e.height);
}
function Qre(t, e, n, r) {
  var i = n.points, a = n.offset || [0, 0], o = n.targetOffset || [0, 0], s = n.overflow, l = n.source || t;
  a = [].concat(a), o = [].concat(o), s = s || {};
  var u = {}, c = 0, f = !!(s && s.alwaysByViewport), d = YN(l, f), h = qN(l);
  I7(a, h), I7(o, e);
  var p = UO(h, e, i, a, o), v = Nt.merge(h, p);
  if (d && (s.adjustX || s.adjustY) && r) {
    if (s.adjustX && A7(p, h, d)) {
      var g = XO(i, /[lr]/gi, {
        l: "r",
        r: "l"
      }), m = YO(a, 0), y = YO(o, 0), _ = UO(h, e, g, m, y);
      K4e(_, h, d) || (c = 1, i = g, a = m, o = y);
    }
    if (s.adjustY && E7(p, h, d)) {
      var O = XO(i, /[tb]/gi, {
        t: "b",
        b: "t"
      }), S = YO(a, 1), x = YO(o, 1), C = UO(h, e, O, S, x);
      J4e(C, h, d) || (c = 1, i = O, a = S, o = x);
    }
    c && (p = UO(h, e, i, a, o), Nt.mix(v, p));
    var P = A7(p, h, d), $ = E7(p, h, d);
    if (P || $) {
      var T = i;
      P && (T = XO(i, /[lr]/gi, {
        l: "r",
        r: "l"
      })), $ && (T = XO(i, /[tb]/gi, {
        t: "b",
        b: "t"
      })), i = T, a = n.offset || [0, 0], o = n.targetOffset || [0, 0];
    }
    u.adjustX = s.adjustX && P, u.adjustY = s.adjustY && $, (u.adjustX || u.adjustY) && (v = q4e(p, h, d, u));
  }
  return v.width !== h.width && Nt.css(l, "width", Nt.width(l) + v.width - h.width), v.height !== h.height && Nt.css(l, "height", Nt.height(l) + v.height - h.height), Nt.offset(l, {
    left: v.left,
    top: v.top
  }, {
    useCssRight: n.useCssRight,
    useCssBottom: n.useCssBottom,
    useCssTransform: n.useCssTransform,
    ignoreShake: n.ignoreShake
  }), {
    points: i,
    offset: a,
    targetOffset: o,
    overflow: u
  };
}
function eNe(t, e) {
  var n = YN(t, e), r = qN(t);
  return !n || r.left + r.width <= n.left || r.top + r.height <= n.top || r.left >= n.right || r.top >= n.bottom;
}
function KN(t, e, n) {
  var r = n.target || e, i = qN(r), a = !eNe(r, n.overflow && n.overflow.alwaysByViewport);
  return Qre(t, i, n, a);
}
KN.__getOffsetParent = TR;
KN.__getVisibleRectForElement = YN;
function tNe(t, e, n) {
  var r, i, a = Nt.getDocument(t), o = a.defaultView || a.parentWindow, s = Nt.getWindowScrollLeft(o), l = Nt.getWindowScrollTop(o), u = Nt.viewportWidth(o), c = Nt.viewportHeight(o);
  "pageX" in e ? r = e.pageX : r = s + e.clientX, "pageY" in e ? i = e.pageY : i = l + e.clientY;
  var f = {
    left: r,
    top: i,
    width: 0,
    height: 0
  }, d = r >= 0 && r <= s + u && i >= 0 && i <= l + c, h = [n.points[0], "cc"];
  return Qre(t, f, _7(_7({}, n), {}, {
    points: h
  }), d);
}
function Or(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, i = t;
  if (Array.isArray(t) && (i = Zl(t)[0]), !i)
    return null;
  const a = ku(i, e, r);
  return a.props = n ? k(k({}, a.props), e) : a.props, aa(typeof a.props.class != "object", "class must be string"), a;
}
function nNe(t, e, n) {
  Ih(ku(t, k({}, e)), n);
}
const Hre = (t) => {
  if (!t)
    return !1;
  if (t.offsetParent)
    return !0;
  if (t.getBBox) {
    const e = t.getBBox();
    if (e.width || e.height)
      return !0;
  }
  if (t.getBoundingClientRect) {
    const e = t.getBoundingClientRect();
    if (e.width || e.height)
      return !0;
  }
  return !1;
};
function rNe(t, e) {
  return t === e ? !0 : !t || !e ? !1 : "pageX" in e && "pageY" in e ? t.pageX === e.pageX && t.pageY === e.pageY : "clientX" in e && "clientY" in e ? t.clientX === e.clientX && t.clientY === e.clientY : !1;
}
function iNe(t, e) {
  t !== document.activeElement && kc(e, t) && typeof t.focus == "function" && t.focus();
}
function D7(t, e) {
  let n = null, r = null;
  function i(o) {
    let [{
      target: s
    }] = o;
    if (!document.documentElement.contains(s)) return;
    const {
      width: l,
      height: u
    } = s.getBoundingClientRect(), c = Math.floor(l), f = Math.floor(u);
    (n !== c || r !== f) && Promise.resolve().then(() => {
      e({
        width: c,
        height: f
      });
    }), n = c, r = f;
  }
  const a = new Ene(i);
  return t && a.observe(t), () => {
    a.disconnect();
  };
}
const aNe = (t, e) => {
  let n = !1, r = null;
  function i() {
    clearTimeout(r);
  }
  function a(o) {
    if (!n || o === !0) {
      if (t() === !1)
        return;
      n = !0, i(), r = setTimeout(() => {
        n = !1;
      }, e.value);
    } else
      i(), r = setTimeout(() => {
        n = !1, a();
      }, e.value);
  }
  return [a, () => {
    n = !1, i();
  }];
}, oNe = {
  align: Object,
  target: [Object, Function],
  onAlign: Function,
  monitorBufferTime: Number,
  monitorWindowResize: Boolean,
  disabled: Boolean
};
function R7(t) {
  return typeof t != "function" ? null : t();
}
function k7(t) {
  return typeof t != "object" || !t ? null : t;
}
const sNe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "Align",
  props: oNe,
  emits: ["align"],
  setup(t, e) {
    let {
      expose: n,
      slots: r
    } = e;
    const i = ee({}), a = ee(), [o, s] = aNe(() => {
      const {
        disabled: d,
        target: h,
        align: p,
        onAlign: v
      } = t;
      if (!d && h && a.value) {
        const g = a.value;
        let m;
        const y = R7(h), _ = k7(h);
        i.value.element = y, i.value.point = _, i.value.align = p;
        const {
          activeElement: O
        } = document;
        return y && Hre(y) ? m = KN(g, y, p) : _ && (m = tNe(g, _, p)), iNe(O, g), v && m && v(g, m), !0;
      }
      return !1;
    }, V(() => t.monitorBufferTime)), l = ee({
      cancel: () => {
      }
    }), u = ee({
      cancel: () => {
      }
    }), c = () => {
      const d = t.target, h = R7(d), p = k7(d);
      a.value !== u.value.element && (u.value.cancel(), u.value.element = a.value, u.value.cancel = D7(a.value, o)), (i.value.element !== h || !rNe(i.value.point, p) || !z_(i.value.align, t.align)) && (o(), l.value.element !== h && (l.value.cancel(), l.value.element = h, l.value.cancel = D7(h, o)));
    };
    _t(() => {
      Bt(() => {
        c();
      });
    }), rp(() => {
      Bt(() => {
        c();
      });
    }), me(() => t.disabled, (d) => {
      d ? s() : o();
    }, {
      immediate: !0,
      flush: "post"
    });
    const f = ee(null);
    return me(() => t.monitorWindowResize, (d) => {
      d ? f.value || (f.value = yi(window, "resize", o)) : f.value && (f.value.remove(), f.value = null);
    }, {
      flush: "post"
    }), qu(() => {
      l.value.cancel(), u.value.cancel(), f.value && f.value.remove(), s();
    }), n({
      forceAlign: () => o(!0)
    }), () => {
      const d = r == null ? void 0 : r.default();
      return d ? Or(d[0], {
        ref: a
      }, !0, !0) : null;
    };
  }
});
pf("bottomLeft", "bottomRight", "topLeft", "topRight");
const lNe = (t) => t !== void 0 && (t === "topLeft" || t === "topRight") ? "slide-down" : "slide-up", Z_ = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return k(t ? {
    name: t,
    appear: !0,
    // type: 'animation',
    // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
    // appearActiveClass: `antdv-base-transtion`,
    // appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
    enterFromClass: `${t}-enter ${t}-enter-prepare ${t}-enter-start`,
    enterActiveClass: `${t}-enter ${t}-enter-prepare`,
    enterToClass: `${t}-enter ${t}-enter-active`,
    leaveFromClass: ` ${t}-leave`,
    leaveActiveClass: `${t}-leave ${t}-leave-active`,
    leaveToClass: `${t}-leave ${t}-leave-active`
  } : {
    css: !1
  }, e);
}, JN = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return k(t ? {
    name: t,
    appear: !0,
    // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
    appearActiveClass: `${t}`,
    appearToClass: `${t}-appear ${t}-appear-active`,
    enterFromClass: `${t}-appear ${t}-enter ${t}-appear-prepare ${t}-enter-prepare`,
    enterActiveClass: `${t}`,
    enterToClass: `${t}-enter ${t}-appear ${t}-appear-active ${t}-enter-active`,
    leaveActiveClass: `${t} ${t}-leave`,
    leaveToClass: `${t}-leave-active`
  } : {
    css: !1
  }, e);
}, Wl = (t, e, n) => n !== void 0 ? n : `${t}-${e}`, uNe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "PopupInner",
  inheritAttrs: !1,
  props: jN,
  emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  setup(t, e) {
    let {
      expose: n,
      attrs: r,
      slots: i
    } = e;
    const a = ve(), o = ve(), s = ve(), [l, u] = $4e(Lr(t, "stretch")), c = () => {
      t.stretch && u(t.getRootDomNode());
    }, f = ve(!1);
    let d;
    me(() => t.visible, (x) => {
      clearTimeout(d), x ? d = setTimeout(() => {
        f.value = t.visible;
      }) : f.value = !1;
    }, {
      immediate: !0
    });
    const [h, p] = P4e(f, c), v = ve(), g = () => t.point ? t.point : t.getRootDomNode, m = () => {
      var x;
      (x = a.value) === null || x === void 0 || x.forceAlign();
    }, y = (x, C) => {
      var P;
      const $ = t.getClassNameFromAlign(C), T = s.value;
      s.value !== $ && (s.value = $), h.value === "align" && (T !== $ ? Promise.resolve().then(() => {
        m();
      }) : p(() => {
        var E;
        (E = v.value) === null || E === void 0 || E.call(v);
      }), (P = t.onAlign) === null || P === void 0 || P.call(t, x, C));
    }, _ = V(() => {
      const x = typeof t.animation == "object" ? t.animation : ZN(t);
      return ["onAfterEnter", "onAfterLeave"].forEach((C) => {
        const P = x[C];
        x[C] = ($) => {
          p(), h.value = "stable", P == null || P($);
        };
      }), x;
    }), O = () => new Promise((x) => {
      v.value = x;
    });
    me([_, h], () => {
      !_.value && h.value === "motion" && p();
    }, {
      immediate: !0
    }), n({
      forceAlign: m,
      getElement: () => o.value.$el || o.value
    });
    const S = V(() => {
      var x;
      return !(!((x = t.align) === null || x === void 0) && x.points && (h.value === "align" || h.value === "stable"));
    });
    return () => {
      var x;
      const {
        zIndex: C,
        align: P,
        prefixCls: $,
        destroyPopupOnHide: T,
        onMouseenter: E,
        onMouseleave: M,
        onTouchstart: R = () => {
        },
        onMousedown: N
      } = t, I = h.value, B = [k(k({}, l.value), {
        zIndex: C,
        opacity: I === "motion" || I === "stable" || !f.value ? null : 0,
        // pointerEvents: statusValue === 'stable' ? null : 'none',
        pointerEvents: !f.value && I !== "stable" ? "none" : null
      }), r.style];
      let Q = qr((x = i.default) === null || x === void 0 ? void 0 : x.call(i, {
        visible: t.visible
      }));
      Q.length > 1 && (Q = D("div", {
        class: `${$}-content`
      }, [Q]));
      const W = Re($, r.class, s.value, !t.arrow && `${$}-arrow-hidden`), U = f.value || !t.visible ? Z_(_.value.name, _.value) : {};
      return D(mo, te(te({
        ref: o
      }, U), {}, {
        onBeforeEnter: O
      }), {
        default: () => !T || t.visible ? _r(D(sNe, {
          target: g(),
          key: "popup",
          ref: a,
          monitorWindowResize: !0,
          disabled: S.value,
          align: P,
          onAlign: y
        }, {
          default: () => D("div", {
            class: W,
            onMouseenter: E,
            onMouseleave: M,
            onMousedown: ai(N, ["capture"]),
            [mi ? "onTouchstartPassive" : "onTouchstart"]: ai(R, ["capture"]),
            style: B
          }, [Q])
        }), [[ho, f.value]]) : null
      });
    };
  }
}), cNe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "Popup",
  inheritAttrs: !1,
  props: w4e,
  setup(t, e) {
    let {
      attrs: n,
      slots: r,
      expose: i
    } = e;
    const a = ve(!1), o = ve(!1), s = ve(), l = ve();
    return me([() => t.visible, () => t.mobile], () => {
      a.value = t.visible, t.visible && t.mobile && (o.value = !0);
    }, {
      immediate: !0,
      flush: "post"
    }), i({
      forceAlign: () => {
        var u;
        (u = s.value) === null || u === void 0 || u.forceAlign();
      },
      getElement: () => {
        var u;
        return (u = s.value) === null || u === void 0 ? void 0 : u.getElement();
      }
    }), () => {
      const u = k(k(k({}, t), n), {
        visible: a.value
      }), c = o.value ? D(C4e, te(te({}, u), {}, {
        mobile: t.mobile,
        ref: s
      }), {
        default: r.default
      }) : D(uNe, te(te({}, u), {}, {
        ref: s
      }), {
        default: r.default
      });
      return D("div", {
        ref: l
      }, [D(kre, u, null), c]);
    };
  }
});
function fNe(t, e, n) {
  return n ? t[0] === e[0] : t[0] === e[0] && t[1] === e[1];
}
function L7(t, e, n) {
  const r = t[e] || {};
  return k(k({}, r), n);
}
function dNe(t, e, n, r) {
  const {
    points: i
  } = n, a = Object.keys(t);
  for (let o = 0; o < a.length; o += 1) {
    const s = a[o];
    if (fNe(t[s].points, i, r))
      return `${e}-placement-${s}`;
  }
  return "";
}
const A2 = {
  methods: {
    setState() {
      let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = arguments.length > 1 ? arguments[1] : void 0, n = typeof t == "function" ? t(this.$data, this.$props) : t;
      if (this.getDerivedStateFromProps) {
        const r = this.getDerivedStateFromProps(oke(this), k(k({}, this.$data), n));
        if (r === null)
          return;
        n = k(k({}, n), r || {});
      }
      k(this.$data, n), this._.isMounted && this.$forceUpdate(), Bt(() => {
        e && e();
      });
    },
    __emit() {
      const t = [].slice.call(arguments, 0);
      let e = t[0];
      e = `on${e[0].toUpperCase()}${e.substring(1)}`;
      const n = this.$props[e] || this.$attrs[e];
      if (t.length && n)
        if (Array.isArray(n))
          for (let r = 0, i = n.length; r < i; r++)
            n[r](...t.slice(1));
        else
          n(...t.slice(1));
    }
  }
}, Gre = Symbol("PortalContextKey"), e8 = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    inTriggerContext: !0
  };
  Et(Gre, {
    inTriggerContext: e.inTriggerContext,
    shouldRender: V(() => {
      const {
        sPopupVisible: n,
        popupRef: r,
        forceRender: i,
        autoDestroy: a
      } = t || {};
      let o = !1;
      return (n || r || i) && (o = !0), !n && a && (o = !1), o;
    })
  });
}, hNe = () => {
  e8({}, {
    inTriggerContext: !1
  });
  const t = et(Gre, {
    shouldRender: V(() => !1),
    inTriggerContext: !1
  });
  return {
    shouldRender: V(() => t.shouldRender.value || t.inTriggerContext === !1)
  };
}, jre = ae({
  compatConfig: {
    MODE: 3
  },
  name: "Portal",
  inheritAttrs: !1,
  props: {
    getContainer: oe.func.isRequired,
    didUpdate: Function
  },
  setup(t, e) {
    let {
      slots: n
    } = e, r = !0, i;
    const {
      shouldRender: a
    } = hNe();
    function o() {
      a.value && (i = t.getContainer());
    }
    $ee(() => {
      r = !1, o();
    }), _t(() => {
      i || o();
    });
    const s = me(a, () => {
      a.value && !i && (i = t.getContainer()), i && s();
    });
    return rp(() => {
      Bt(() => {
        var l;
        a.value && ((l = t.didUpdate) === null || l === void 0 || l.call(t, t));
      });
    }), () => {
      var l;
      return a.value ? r ? (l = n.default) === null || l === void 0 ? void 0 : l.call(n) : i ? D(R_, {
        to: i
      }, n) : null : null;
    };
  }
});
let aE;
function pNe(t) {
  if (typeof document > "u")
    return 0;
  if (aE === void 0) {
    const e = document.createElement("div");
    e.style.width = "100%", e.style.height = "200px";
    const n = document.createElement("div"), r = n.style;
    r.position = "absolute", r.top = "0", r.left = "0", r.pointerEvents = "none", r.visibility = "hidden", r.width = "200px", r.height = "150px", r.overflow = "hidden", n.appendChild(e), document.body.appendChild(n);
    const i = e.offsetWidth;
    n.style.overflow = "scroll";
    let a = e.offsetWidth;
    i === a && (a = n.clientWidth), document.body.removeChild(n), aE = i - a;
  }
  return aE;
}
const vNe = `vc-util-locker-${Date.now()}`;
let N7 = 0;
function gNe() {
  return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
}
function mNe(t) {
  const e = V(() => !!t && !!t.value);
  N7 += 1;
  const n = `${vNe}_${N7}`;
  Vt((r) => {
    if (is()) {
      if (e.value) {
        const i = pNe(), a = gNe();
        Eb(`
html body {
  overflow-y: hidden;
  ${a ? `width: calc(100% - ${i}px);` : ""}
}`, n);
      } else
        Xw(n);
      r(() => {
        Xw(n);
      });
    }
  }, {
    flush: "post"
  });
}
let ad = 0;
const Xx = is(), B7 = (t) => {
  if (!Xx)
    return null;
  if (t) {
    if (typeof t == "string")
      return document.querySelectorAll(t)[0];
    if (typeof t == "function")
      return t();
    if (typeof t == "object" && t instanceof window.HTMLElement)
      return t;
  }
  return document.body;
}, Zre = ae({
  compatConfig: {
    MODE: 3
  },
  name: "PortalWrapper",
  inheritAttrs: !1,
  props: {
    wrapperClassName: String,
    forceRender: {
      type: Boolean,
      default: void 0
    },
    getContainer: oe.any,
    visible: {
      type: Boolean,
      default: void 0
    },
    autoLock: Tt(),
    didUpdate: Function
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = ve(), i = ve(), a = ve(), o = ve(1), s = is() && document.createElement("div"), l = () => {
      var h, p;
      r.value === s && ((p = (h = r.value) === null || h === void 0 ? void 0 : h.parentNode) === null || p === void 0 || p.removeChild(r.value)), r.value = null;
    };
    let u = null;
    const c = function() {
      return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1) || r.value && !r.value.parentNode ? (u = B7(t.getContainer), u ? (u.appendChild(r.value), !0) : !1) : !0;
    }, f = () => Xx ? (r.value || (r.value = s, c(!0)), d(), r.value) : null, d = () => {
      const {
        wrapperClassName: h
      } = t;
      r.value && h && h !== r.value.className && (r.value.className = h);
    };
    return rp(() => {
      d(), c();
    }), mNe(V(() => t.autoLock && t.visible && is() && (r.value === document.body || r.value === s))), _t(() => {
      let h = !1;
      me([() => t.visible, () => t.getContainer], (p, v) => {
        let [g, m] = p, [y, _] = v;
        Xx && (u = B7(t.getContainer), u === document.body && (g && !y ? ad += 1 : h && (ad -= 1))), h && (typeof m == "function" && typeof _ == "function" ? m.toString() !== _.toString() : m !== _) && l(), h = !0;
      }, {
        immediate: !0,
        flush: "post"
      }), Bt(() => {
        c() || (a.value = en(() => {
          o.value += 1;
        }));
      });
    }), Qt(() => {
      const {
        visible: h
      } = t;
      Xx && u === document.body && (ad = h && ad ? ad - 1 : ad), l(), en.cancel(a.value);
    }), () => {
      const {
        forceRender: h,
        visible: p
      } = t;
      let v = null;
      const g = {
        getOpenCount: () => ad,
        getContainer: f
      };
      return o.value && (h || p || i.value) && (v = D(jre, {
        getContainer: f,
        ref: i,
        didUpdate: t.didUpdate
      }, {
        default: () => {
          var m;
          return (m = n.default) === null || m === void 0 ? void 0 : m.call(n, g);
        }
      })), v;
    };
  }
}), yNe = ["onClick", "onMousedown", "onTouchstart", "onMouseenter", "onMouseleave", "onFocus", "onBlur", "onContextmenu"], E2 = ae({
  compatConfig: {
    MODE: 3
  },
  name: "Trigger",
  mixins: [A2],
  inheritAttrs: !1,
  props: S4e(),
  setup(t) {
    const e = V(() => {
      const {
        popupPlacement: i,
        popupAlign: a,
        builtinPlacements: o
      } = t;
      return i && o ? L7(o, i, a) : a;
    }), n = ve(null), r = (i) => {
      n.value = i;
    };
    return {
      vcTriggerContext: et("vcTriggerContext", {}),
      popupRef: n,
      setPopupRef: r,
      triggerRef: ve(null),
      align: e,
      focusTime: null,
      clickOutsideHandler: null,
      contextmenuOutsideHandler1: null,
      contextmenuOutsideHandler2: null,
      touchOutsideHandler: null,
      attachId: null,
      delayTimer: null,
      hasPopupMouseDown: !1,
      preClickTime: null,
      preTouchTime: null,
      mouseDownTimeout: null,
      childOriginEvents: {}
    };
  },
  data() {
    const t = this.$props;
    let e;
    return this.popupVisible !== void 0 ? e = !!t.popupVisible : e = !!t.defaultPopupVisible, yNe.forEach((n) => {
      this[`fire${n}`] = (r) => {
        this.fireEvents(n, r);
      };
    }), {
      prevPopupVisible: e,
      sPopupVisible: e,
      point: null
    };
  },
  watch: {
    popupVisible(t) {
      t !== void 0 && (this.prevPopupVisible = this.sPopupVisible, this.sPopupVisible = t);
    }
  },
  created() {
    Et("vcTriggerContext", {
      onPopupMouseDown: this.onPopupMouseDown,
      onPopupMouseenter: this.onPopupMouseenter,
      onPopupMouseleave: this.onPopupMouseleave
    }), e8(this);
  },
  deactivated() {
    this.setPopupVisible(!1);
  },
  mounted() {
    this.$nextTick(() => {
      this.updatedCal();
    });
  },
  updated() {
    this.$nextTick(() => {
      this.updatedCal();
    });
  },
  beforeUnmount() {
    this.clearDelayTimer(), this.clearOutsideHandler(), clearTimeout(this.mouseDownTimeout), en.cancel(this.attachId);
  },
  methods: {
    updatedCal() {
      const t = this.$props;
      if (this.$data.sPopupVisible) {
        let n;
        !this.clickOutsideHandler && (this.isClickToHide() || this.isContextmenuToShow()) && (n = t.getDocument(this.getRootDomNode()), this.clickOutsideHandler = yi(n, "mousedown", this.onDocumentClick)), this.touchOutsideHandler || (n = n || t.getDocument(this.getRootDomNode()), this.touchOutsideHandler = yi(n, "touchstart", this.onDocumentClick, mi ? {
          passive: !1
        } : !1)), !this.contextmenuOutsideHandler1 && this.isContextmenuToShow() && (n = n || t.getDocument(this.getRootDomNode()), this.contextmenuOutsideHandler1 = yi(n, "scroll", this.onContextmenuClose)), !this.contextmenuOutsideHandler2 && this.isContextmenuToShow() && (this.contextmenuOutsideHandler2 = yi(window, "blur", this.onContextmenuClose));
      } else
        this.clearOutsideHandler();
    },
    onMouseenter(t) {
      const {
        mouseEnterDelay: e
      } = this.$props;
      this.fireEvents("onMouseenter", t), this.delaySetPopupVisible(!0, e, e ? null : t);
    },
    onMouseMove(t) {
      this.fireEvents("onMousemove", t), this.setPoint(t);
    },
    onMouseleave(t) {
      this.fireEvents("onMouseleave", t), this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
    },
    onPopupMouseenter() {
      const {
        vcTriggerContext: t = {}
      } = this;
      t.onPopupMouseenter && t.onPopupMouseenter(), this.clearDelayTimer();
    },
    onPopupMouseleave(t) {
      var e;
      if (t && t.relatedTarget && !t.relatedTarget.setTimeout && kc((e = this.popupRef) === null || e === void 0 ? void 0 : e.getElement(), t.relatedTarget))
        return;
      this.isMouseLeaveToHide() && this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
      const {
        vcTriggerContext: n = {}
      } = this;
      n.onPopupMouseleave && n.onPopupMouseleave(t);
    },
    onFocus(t) {
      this.fireEvents("onFocus", t), this.clearDelayTimer(), this.isFocusToShow() && (this.focusTime = Date.now(), this.delaySetPopupVisible(!0, this.$props.focusDelay));
    },
    onMousedown(t) {
      this.fireEvents("onMousedown", t), this.preClickTime = Date.now();
    },
    onTouchstart(t) {
      this.fireEvents("onTouchstart", t), this.preTouchTime = Date.now();
    },
    onBlur(t) {
      kc(t.target, t.relatedTarget || document.activeElement) || (this.fireEvents("onBlur", t), this.clearDelayTimer(), this.isBlurToHide() && this.delaySetPopupVisible(!1, this.$props.blurDelay));
    },
    onContextmenu(t) {
      t.preventDefault(), this.fireEvents("onContextmenu", t), this.setPopupVisible(!0, t);
    },
    onContextmenuClose() {
      this.isContextmenuToShow() && this.close();
    },
    onClick(t) {
      if (this.fireEvents("onClick", t), this.focusTime) {
        let n;
        if (this.preClickTime && this.preTouchTime ? n = Math.min(this.preClickTime, this.preTouchTime) : this.preClickTime ? n = this.preClickTime : this.preTouchTime && (n = this.preTouchTime), Math.abs(n - this.focusTime) < 20)
          return;
        this.focusTime = 0;
      }
      this.preClickTime = 0, this.preTouchTime = 0, this.isClickToShow() && (this.isClickToHide() || this.isBlurToHide()) && t && t.preventDefault && t.preventDefault(), t && t.domEvent && t.domEvent.preventDefault();
      const e = !this.$data.sPopupVisible;
      (this.isClickToHide() && !e || e && this.isClickToShow()) && this.setPopupVisible(!this.$data.sPopupVisible, t);
    },
    onPopupMouseDown() {
      const {
        vcTriggerContext: t = {}
      } = this;
      this.hasPopupMouseDown = !0, clearTimeout(this.mouseDownTimeout), this.mouseDownTimeout = setTimeout(() => {
        this.hasPopupMouseDown = !1;
      }, 0), t.onPopupMouseDown && t.onPopupMouseDown(...arguments);
    },
    onDocumentClick(t) {
      if (this.$props.mask && !this.$props.maskClosable)
        return;
      const e = t.target, n = this.getRootDomNode(), r = this.getPopupDomNode();
      // mousedown on the target should also close popup when action is contextMenu.
      // https://github.com/ant-design/ant-design/issues/29853
      (!kc(n, e) || this.isContextMenuOnly()) && !kc(r, e) && !this.hasPopupMouseDown && this.delaySetPopupVisible(!1, 0.1);
    },
    getPopupDomNode() {
      var t;
      return ((t = this.popupRef) === null || t === void 0 ? void 0 : t.getElement()) || null;
    },
    getRootDomNode() {
      var t, e, n, r;
      const {
        getTriggerDOMNode: i
      } = this.$props;
      if (i) {
        const a = ((e = (t = this.triggerRef) === null || t === void 0 ? void 0 : t.$el) === null || e === void 0 ? void 0 : e.nodeName) === "#comment" ? null : xu(this.triggerRef);
        return xu(i(a));
      }
      try {
        const a = ((r = (n = this.triggerRef) === null || n === void 0 ? void 0 : n.$el) === null || r === void 0 ? void 0 : r.nodeName) === "#comment" ? null : xu(this.triggerRef);
        if (a)
          return a;
      } catch {
      }
      return xu(this);
    },
    handleGetPopupClassFromAlign(t) {
      const e = [], n = this.$props, {
        popupPlacement: r,
        builtinPlacements: i,
        prefixCls: a,
        alignPoint: o,
        getPopupClassNameFromAlign: s
      } = n;
      return r && i && e.push(dNe(i, a, t, o)), s && e.push(s(t)), e.join(" ");
    },
    getPopupAlign() {
      const t = this.$props, {
        popupPlacement: e,
        popupAlign: n,
        builtinPlacements: r
      } = t;
      return e && r ? L7(r, e, n) : n;
    },
    getComponent() {
      const t = {};
      this.isMouseEnterToShow() && (t.onMouseenter = this.onPopupMouseenter), this.isMouseLeaveToHide() && (t.onMouseleave = this.onPopupMouseleave), t.onMousedown = this.onPopupMouseDown, t[mi ? "onTouchstartPassive" : "onTouchstart"] = this.onPopupMouseDown;
      const {
        handleGetPopupClassFromAlign: e,
        getRootDomNode: n,
        $attrs: r
      } = this, {
        prefixCls: i,
        destroyPopupOnHide: a,
        popupClassName: o,
        popupAnimation: s,
        popupTransitionName: l,
        popupStyle: u,
        mask: c,
        maskAnimation: f,
        maskTransitionName: d,
        zIndex: h,
        stretch: p,
        alignPoint: v,
        mobile: g,
        arrow: m,
        forceRender: y
      } = this.$props, {
        sPopupVisible: _,
        point: O
      } = this.$data, S = k(k({
        prefixCls: i,
        arrow: m,
        destroyPopupOnHide: a,
        visible: _,
        point: v ? O : null,
        align: this.align,
        animation: s,
        getClassNameFromAlign: e,
        stretch: p,
        getRootDomNode: n,
        mask: c,
        zIndex: h,
        transitionName: l,
        maskAnimation: f,
        maskTransitionName: d,
        class: o,
        style: u,
        onAlign: r.onPopupAlign || Rre
      }, t), {
        ref: this.setPopupRef,
        mobile: g,
        forceRender: y
      });
      return D(cNe, S, {
        default: this.$slots.popup || (() => ske(this, "popup"))
      });
    },
    attachParent(t) {
      en.cancel(this.attachId);
      const {
        getPopupContainer: e,
        getDocument: n
      } = this.$props, r = this.getRootDomNode();
      let i;
      e ? (r || e.length === 0) && (i = e(r)) : i = n(this.getRootDomNode()).body, i ? i.appendChild(t) : this.attachId = en(() => {
        this.attachParent(t);
      });
    },
    getContainer() {
      const {
        $props: t
      } = this, {
        getDocument: e
      } = t, n = e(this.getRootDomNode()).createElement("div");
      return n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.width = "100%", this.attachParent(n), n;
    },
    setPopupVisible(t, e) {
      const {
        alignPoint: n,
        sPopupVisible: r,
        onPopupVisibleChange: i
      } = this;
      this.clearDelayTimer(), r !== t && (Zw(this, "popupVisible") || this.setState({
        sPopupVisible: t,
        prevPopupVisible: r
      }), i && i(t)), n && e && t && this.setPoint(e);
    },
    setPoint(t) {
      const {
        alignPoint: e
      } = this.$props;
      !e || !t || this.setState({
        point: {
          pageX: t.pageX,
          pageY: t.pageY
        }
      });
    },
    handlePortalUpdate() {
      this.prevPopupVisible !== this.sPopupVisible && this.afterPopupVisibleChange(this.sPopupVisible);
    },
    delaySetPopupVisible(t, e, n) {
      const r = e * 1e3;
      if (this.clearDelayTimer(), r) {
        const i = n ? {
          pageX: n.pageX,
          pageY: n.pageY
        } : null;
        this.delayTimer = setTimeout(() => {
          this.setPopupVisible(t, i), this.clearDelayTimer();
        }, r);
      } else
        this.setPopupVisible(t, n);
    },
    clearDelayTimer() {
      this.delayTimer && (clearTimeout(this.delayTimer), this.delayTimer = null);
    },
    clearOutsideHandler() {
      this.clickOutsideHandler && (this.clickOutsideHandler.remove(), this.clickOutsideHandler = null), this.contextmenuOutsideHandler1 && (this.contextmenuOutsideHandler1.remove(), this.contextmenuOutsideHandler1 = null), this.contextmenuOutsideHandler2 && (this.contextmenuOutsideHandler2.remove(), this.contextmenuOutsideHandler2 = null), this.touchOutsideHandler && (this.touchOutsideHandler.remove(), this.touchOutsideHandler = null);
    },
    createTwoChains(t) {
      let e = () => {
      };
      const n = jW(this);
      return this.childOriginEvents[t] && n[t] ? this[`fire${t}`] : (e = this.childOriginEvents[t] || n[t] || e, e);
    },
    isClickToShow() {
      const {
        action: t,
        showAction: e
      } = this.$props;
      return t.indexOf("click") !== -1 || e.indexOf("click") !== -1;
    },
    isContextMenuOnly() {
      const {
        action: t
      } = this.$props;
      return t === "contextmenu" || t.length === 1 && t[0] === "contextmenu";
    },
    isContextmenuToShow() {
      const {
        action: t,
        showAction: e
      } = this.$props;
      return t.indexOf("contextmenu") !== -1 || e.indexOf("contextmenu") !== -1;
    },
    isClickToHide() {
      const {
        action: t,
        hideAction: e
      } = this.$props;
      return t.indexOf("click") !== -1 || e.indexOf("click") !== -1;
    },
    isMouseEnterToShow() {
      const {
        action: t,
        showAction: e
      } = this.$props;
      return t.indexOf("hover") !== -1 || e.indexOf("mouseenter") !== -1;
    },
    isMouseLeaveToHide() {
      const {
        action: t,
        hideAction: e
      } = this.$props;
      return t.indexOf("hover") !== -1 || e.indexOf("mouseleave") !== -1;
    },
    isFocusToShow() {
      const {
        action: t,
        showAction: e
      } = this.$props;
      return t.indexOf("focus") !== -1 || e.indexOf("focus") !== -1;
    },
    isBlurToHide() {
      const {
        action: t,
        hideAction: e
      } = this.$props;
      return t.indexOf("focus") !== -1 || e.indexOf("blur") !== -1;
    },
    forcePopupAlign() {
      var t;
      this.$data.sPopupVisible && ((t = this.popupRef) === null || t === void 0 || t.forceAlign());
    },
    fireEvents(t, e) {
      this.childOriginEvents[t] && this.childOriginEvents[t](e);
      const n = this.$props[t] || this.$attrs[t];
      n && n(e);
    },
    close() {
      this.setPopupVisible(!1);
    }
  },
  render() {
    const {
      $attrs: t
    } = this, e = Zl(Ine(this)), {
      alignPoint: n,
      getPopupContainer: r
    } = this.$props, i = e[0];
    this.childOriginEvents = jW(i);
    const a = {
      key: "trigger"
    };
    this.isContextmenuToShow() ? a.onContextmenu = this.onContextmenu : a.onContextmenu = this.createTwoChains("onContextmenu"), this.isClickToHide() || this.isClickToShow() ? (a.onClick = this.onClick, a.onMousedown = this.onMousedown, a[mi ? "onTouchstartPassive" : "onTouchstart"] = this.onTouchstart) : (a.onClick = this.createTwoChains("onClick"), a.onMousedown = this.createTwoChains("onMousedown"), a[mi ? "onTouchstartPassive" : "onTouchstart"] = this.createTwoChains("onTouchstart")), this.isMouseEnterToShow() ? (a.onMouseenter = this.onMouseenter, n && (a.onMousemove = this.onMouseMove)) : a.onMouseenter = this.createTwoChains("onMouseenter"), this.isMouseLeaveToHide() ? a.onMouseleave = this.onMouseleave : a.onMouseleave = this.createTwoChains("onMouseleave"), this.isFocusToShow() || this.isBlurToHide() ? (a.onFocus = this.onFocus, a.onBlur = this.onBlur) : (a.onFocus = this.createTwoChains("onFocus"), a.onBlur = (u) => {
      u && (!u.relatedTarget || !kc(u.target, u.relatedTarget)) && this.createTwoChains("onBlur")(u);
    });
    const o = Re(i && i.props && i.props.class, t.class);
    o && (a.class = o);
    const s = Or(i, k(k({}, a), {
      ref: "triggerRef"
    }), !0, !0), l = D(Zre, {
      key: "portal",
      getContainer: r && (() => r(this.getRootDomNode())),
      didUpdate: this.handlePortalUpdate,
      visible: this.$data.sPopupVisible
    }, {
      default: this.getComponent
    });
    return D(Wt, null, [s, l]);
  }
});
var bNe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const _Ne = (t) => {
  const e = t === !0 ? 0 : 1;
  return {
    bottomLeft: {
      points: ["tl", "bl"],
      offset: [0, 4],
      overflow: {
        adjustX: e,
        adjustY: 1
      }
    },
    bottomRight: {
      points: ["tr", "br"],
      offset: [0, 4],
      overflow: {
        adjustX: e,
        adjustY: 1
      }
    },
    topLeft: {
      points: ["bl", "tl"],
      offset: [0, -4],
      overflow: {
        adjustX: e,
        adjustY: 1
      }
    },
    topRight: {
      points: ["br", "tr"],
      offset: [0, -4],
      overflow: {
        adjustX: e,
        adjustY: 1
      }
    }
  };
}, ONe = ae({
  name: "SelectTrigger",
  inheritAttrs: !1,
  props: {
    dropdownAlign: Object,
    visible: {
      type: Boolean,
      default: void 0
    },
    disabled: {
      type: Boolean,
      default: void 0
    },
    dropdownClassName: String,
    dropdownStyle: oe.object,
    placement: String,
    empty: {
      type: Boolean,
      default: void 0
    },
    prefixCls: String,
    popupClassName: String,
    animation: String,
    transitionName: String,
    getPopupContainer: Function,
    dropdownRender: Function,
    containerWidth: Number,
    dropdownMatchSelectWidth: oe.oneOfType([Number, Boolean]).def(!0),
    popupElement: oe.any,
    direction: String,
    getTriggerDOMNode: Function,
    onPopupVisibleChange: Function,
    onPopupMouseEnter: Function,
    onPopupFocusin: Function,
    onPopupFocusout: Function
  },
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      expose: i
    } = e;
    const a = V(() => {
      const {
        dropdownMatchSelectWidth: s
      } = t;
      return _Ne(s);
    }), o = ee();
    return i({
      getPopupElement: () => o.value
    }), () => {
      const s = k(k({}, t), r), {
        empty: l = !1
      } = s, u = bNe(s, ["empty"]), {
        visible: c,
        dropdownAlign: f,
        prefixCls: d,
        popupElement: h,
        dropdownClassName: p,
        dropdownStyle: v,
        direction: g = "ltr",
        placement: m,
        dropdownMatchSelectWidth: y,
        containerWidth: _,
        dropdownRender: O,
        animation: S,
        transitionName: x,
        getPopupContainer: C,
        getTriggerDOMNode: P,
        onPopupVisibleChange: $,
        onPopupMouseEnter: T,
        onPopupFocusin: E,
        onPopupFocusout: M
      } = u, R = `${d}-dropdown`;
      let N = h;
      O && (N = O({
        menuNode: h,
        props: t
      }));
      const I = S ? `${R}-${S}` : x, B = k({
        minWidth: `${_}px`
      }, v);
      return typeof y == "number" ? B.width = `${y}px` : y && (B.width = `${_}px`), D(E2, te(te({}, t), {}, {
        showAction: $ ? ["click"] : [],
        hideAction: $ ? ["click"] : [],
        popupPlacement: m || (g === "rtl" ? "bottomRight" : "bottomLeft"),
        builtinPlacements: a.value,
        prefixCls: R,
        popupTransitionName: I,
        popupAlign: f,
        popupVisible: c,
        getPopupContainer: C,
        popupClassName: Re(p, {
          [`${R}-empty`]: l
        }),
        popupStyle: B,
        getTriggerDOMNode: P,
        onPopupVisibleChange: $
      }), {
        default: n.default,
        popup: () => D("div", {
          ref: o,
          onMouseenter: T,
          onFocusin: E,
          onFocusout: M
        }, [N])
      });
    };
  }
}), Me = {
  /**
   * MAC_ENTER
   */
  MAC_ENTER: 3,
  /**
   * BACKSPACE
   */
  BACKSPACE: 8,
  /**
   * TAB
   */
  TAB: 9,
  /**
   * NUMLOCK on FF/Safari Mac
   */
  NUM_CENTER: 12,
  /**
   * ENTER
   */
  ENTER: 13,
  /**
   * SHIFT
   */
  SHIFT: 16,
  /**
   * CTRL
   */
  CTRL: 17,
  /**
   * ALT
   */
  ALT: 18,
  /**
   * PAUSE
   */
  PAUSE: 19,
  /**
   * CAPS_LOCK
   */
  CAPS_LOCK: 20,
  /**
   * ESC
   */
  ESC: 27,
  /**
   * SPACE
   */
  SPACE: 32,
  /**
   * PAGE_UP
   */
  PAGE_UP: 33,
  /**
   * PAGE_DOWN
   */
  PAGE_DOWN: 34,
  /**
   * END
   */
  END: 35,
  /**
   * HOME
   */
  HOME: 36,
  /**
   * LEFT
   */
  LEFT: 37,
  /**
   * UP
   */
  UP: 38,
  /**
   * RIGHT
   */
  RIGHT: 39,
  /**
   * DOWN
   */
  DOWN: 40,
  /**
   * PRINT_SCREEN
   */
  PRINT_SCREEN: 44,
  /**
   * INSERT
   */
  INSERT: 45,
  /**
   * DELETE
   */
  DELETE: 46,
  /**
   * ZERO
   */
  ZERO: 48,
  /**
   * ONE
   */
  ONE: 49,
  /**
   * TWO
   */
  TWO: 50,
  /**
   * THREE
   */
  THREE: 51,
  /**
   * FOUR
   */
  FOUR: 52,
  /**
   * FIVE
   */
  FIVE: 53,
  /**
   * SIX
   */
  SIX: 54,
  /**
   * SEVEN
   */
  SEVEN: 55,
  /**
   * EIGHT
   */
  EIGHT: 56,
  /**
   * NINE
   */
  NINE: 57,
  /**
   * QUESTION_MARK
   */
  QUESTION_MARK: 63,
  /**
   * A
   */
  A: 65,
  /**
   * B
   */
  B: 66,
  /**
   * C
   */
  C: 67,
  /**
   * D
   */
  D: 68,
  /**
   * E
   */
  E: 69,
  /**
   * F
   */
  F: 70,
  /**
   * G
   */
  G: 71,
  /**
   * H
   */
  H: 72,
  /**
   * I
   */
  I: 73,
  /**
   * J
   */
  J: 74,
  /**
   * K
   */
  K: 75,
  /**
   * L
   */
  L: 76,
  /**
   * M
   */
  M: 77,
  /**
   * N
   */
  N: 78,
  /**
   * O
   */
  O: 79,
  /**
   * P
   */
  P: 80,
  /**
   * Q
   */
  Q: 81,
  /**
   * R
   */
  R: 82,
  /**
   * S
   */
  S: 83,
  /**
   * T
   */
  T: 84,
  /**
   * U
   */
  U: 85,
  /**
   * V
   */
  V: 86,
  /**
   * W
   */
  W: 87,
  /**
   * X
   */
  X: 88,
  /**
   * Y
   */
  Y: 89,
  /**
   * Z
   */
  Z: 90,
  /**
   * META
   */
  META: 91,
  /**
   * WIN_KEY_RIGHT
   */
  WIN_KEY_RIGHT: 92,
  /**
   * CONTEXT_MENU
   */
  CONTEXT_MENU: 93,
  /**
   * NUM_ZERO
   */
  NUM_ZERO: 96,
  /**
   * NUM_ONE
   */
  NUM_ONE: 97,
  /**
   * NUM_TWO
   */
  NUM_TWO: 98,
  /**
   * NUM_THREE
   */
  NUM_THREE: 99,
  /**
   * NUM_FOUR
   */
  NUM_FOUR: 100,
  /**
   * NUM_FIVE
   */
  NUM_FIVE: 101,
  /**
   * NUM_SIX
   */
  NUM_SIX: 102,
  /**
   * NUM_SEVEN
   */
  NUM_SEVEN: 103,
  /**
   * NUM_EIGHT
   */
  NUM_EIGHT: 104,
  /**
   * NUM_NINE
   */
  NUM_NINE: 105,
  /**
   * NUM_MULTIPLY
   */
  NUM_MULTIPLY: 106,
  /**
   * NUM_PLUS
   */
  NUM_PLUS: 107,
  /**
   * NUM_MINUS
   */
  NUM_MINUS: 109,
  /**
   * NUM_PERIOD
   */
  NUM_PERIOD: 110,
  /**
   * NUM_DIVISION
   */
  NUM_DIVISION: 111,
  /**
   * F1
   */
  F1: 112,
  /**
   * F2
   */
  F2: 113,
  /**
   * F3
   */
  F3: 114,
  /**
   * F4
   */
  F4: 115,
  /**
   * F5
   */
  F5: 116,
  /**
   * F6
   */
  F6: 117,
  /**
   * F7
   */
  F7: 118,
  /**
   * F8
   */
  F8: 119,
  /**
   * F9
   */
  F9: 120,
  /**
   * F10
   */
  F10: 121,
  /**
   * F11
   */
  F11: 122,
  /**
   * F12
   */
  F12: 123,
  /**
   * NUMLOCK
   */
  NUMLOCK: 144,
  /**
   * SEMICOLON
   */
  SEMICOLON: 186,
  /**
   * DASH
   */
  DASH: 189,
  /**
   * EQUALS
   */
  EQUALS: 187,
  /**
   * COMMA
   */
  COMMA: 188,
  /**
   * PERIOD
   */
  PERIOD: 190,
  /**
   * SLASH
   */
  SLASH: 191,
  /**
   * APOSTROPHE
   */
  APOSTROPHE: 192,
  /**
   * SINGLE_QUOTE
   */
  SINGLE_QUOTE: 222,
  /**
   * OPEN_SQUARE_BRACKET
   */
  OPEN_SQUARE_BRACKET: 219,
  /**
   * BACKSLASH
   */
  BACKSLASH: 220,
  /**
   * CLOSE_SQUARE_BRACKET
   */
  CLOSE_SQUARE_BRACKET: 221,
  /**
   * WIN_KEY
   */
  WIN_KEY: 224,
  /**
   * MAC_FF_META
   */
  MAC_FF_META: 224,
  /**
   * WIN_IME
   */
  WIN_IME: 229,
  // ======================== Function ========================
  /**
   * whether text and modified key is entered at the same time.
   */
  isTextModifyingKeyEvent: function(e) {
    const {
      keyCode: n
    } = e;
    if (e.altKey && !e.ctrlKey || e.metaKey || // Function keys don't generate text
    n >= Me.F1 && n <= Me.F12)
      return !1;
    switch (n) {
      case Me.ALT:
      case Me.CAPS_LOCK:
      case Me.CONTEXT_MENU:
      case Me.CTRL:
      case Me.DOWN:
      case Me.END:
      case Me.ESC:
      case Me.HOME:
      case Me.INSERT:
      case Me.LEFT:
      case Me.MAC_FF_META:
      case Me.META:
      case Me.NUMLOCK:
      case Me.NUM_CENTER:
      case Me.PAGE_DOWN:
      case Me.PAGE_UP:
      case Me.PAUSE:
      case Me.PRINT_SCREEN:
      case Me.RIGHT:
      case Me.SHIFT:
      case Me.UP:
      case Me.WIN_KEY:
      case Me.WIN_KEY_RIGHT:
        return !1;
      default:
        return !0;
    }
  },
  /**
   * whether character is entered.
   */
  isCharacterKey: function(e) {
    if (e >= Me.ZERO && e <= Me.NINE || e >= Me.NUM_ZERO && e <= Me.NUM_MULTIPLY || e >= Me.A && e <= Me.Z || window.navigator.userAgent.indexOf("WebKit") !== -1 && e === 0)
      return !0;
    switch (e) {
      case Me.SPACE:
      case Me.QUESTION_MARK:
      case Me.NUM_PLUS:
      case Me.NUM_MINUS:
      case Me.NUM_PERIOD:
      case Me.NUM_DIVISION:
      case Me.SEMICOLON:
      case Me.DASH:
      case Me.EQUALS:
      case Me.COMMA:
      case Me.PERIOD:
      case Me.SLASH:
      case Me.APOSTROPHE:
      case Me.SINGLE_QUOTE:
      case Me.OPEN_SQUARE_BRACKET:
      case Me.BACKSLASH:
      case Me.CLOSE_SQUARE_BRACKET:
        return !0;
      default:
        return !1;
    }
  }
}, Vh = (t, e) => {
  let {
    slots: n
  } = e;
  var r;
  const {
    class: i,
    customizeIcon: a,
    customizeIconProps: o,
    onMousedown: s,
    onClick: l
  } = t;
  let u;
  return typeof a == "function" ? u = a(o) : u = df(a) ? ku(a) : a, D("span", {
    class: i,
    onMousedown: (c) => {
      c.preventDefault(), s && s(c);
    },
    style: {
      userSelect: "none",
      WebkitUserSelect: "none"
    },
    unselectable: "on",
    onClick: l,
    "aria-hidden": !0
  }, [u !== void 0 ? u : D("span", {
    class: i.split(/\s+/).map((c) => `${c}-icon`)
  }, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)])]);
};
Vh.inheritAttrs = !1;
Vh.displayName = "TransBtn";
Vh.props = {
  class: String,
  customizeIcon: oe.any,
  customizeIconProps: oe.any,
  onMousedown: Function,
  onClick: Function
};
var SNe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const xNe = ae({
  compatConfig: {
    MODE: 3
  },
  // inheritAttrs: false,
  props: {
    disabled: oe.looseBool,
    type: oe.string,
    value: oe.any,
    tag: {
      type: String,
      default: "input"
    },
    size: oe.string,
    onChange: Function,
    onInput: Function,
    onBlur: Function,
    onFocus: Function,
    onKeydown: Function,
    onCompositionstart: Function,
    onCompositionend: Function,
    onKeyup: Function,
    onPaste: Function,
    onMousedown: Function
  },
  emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  setup(t, e) {
    let {
      expose: n
    } = e;
    const r = ve(null);
    return n({
      focus: () => {
        r.value && r.value.focus();
      },
      blur: () => {
        r.value && r.value.blur();
      },
      input: r,
      setSelectionRange: (l, u, c) => {
        var f;
        (f = r.value) === null || f === void 0 || f.setSelectionRange(l, u, c);
      },
      select: () => {
        var l;
        (l = r.value) === null || l === void 0 || l.select();
      },
      getSelectionStart: () => {
        var l;
        return (l = r.value) === null || l === void 0 ? void 0 : l.selectionStart;
      },
      getSelectionEnd: () => {
        var l;
        return (l = r.value) === null || l === void 0 ? void 0 : l.selectionEnd;
      },
      getScrollTop: () => {
        var l;
        return (l = r.value) === null || l === void 0 ? void 0 : l.scrollTop;
      }
    }), () => {
      const {
        tag: l,
        value: u
      } = t, c = SNe(t, ["tag", "value"]);
      return D(l, te(te({}, c), {}, {
        ref: r,
        value: u
      }), null);
    };
  }
});
function wNe() {
  const t = document.documentElement.clientWidth, e = window.innerHeight || document.documentElement.clientHeight;
  return {
    width: t,
    height: e
  };
}
function Ure(t) {
  const e = t.getBoundingClientRect(), n = document.documentElement;
  return {
    left: e.left + (window.scrollX || n.scrollLeft) - (n.clientLeft || document.body.clientLeft || 0),
    top: e.top + (window.scrollY || n.scrollTop) - (n.clientTop || document.body.clientTop || 0)
  };
}
function CNe(t) {
  return Object.keys(t).reduce((e, n) => {
    const r = t[n];
    return typeof r > "u" || r === null || (e += `${n}: ${t[n]};`), e;
  }, "");
}
var TNe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const t8 = ae({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: {
    disabled: oe.looseBool,
    type: oe.string,
    value: oe.any,
    lazy: oe.bool.def(!0),
    tag: {
      type: String,
      default: "input"
    },
    size: oe.string,
    style: oe.oneOfType([String, Object]),
    class: oe.string
  },
  emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  setup(t, e) {
    let {
      emit: n,
      attrs: r,
      expose: i
    } = e;
    const a = ve(null), o = ee(), s = ee(!1);
    me([() => t.value, s], () => {
      s.value || (o.value = t.value);
    }, {
      immediate: !0
    });
    const l = (C) => {
      n("change", C);
    }, u = (C) => {
      s.value = !0, C.target.composing = !0, n("compositionstart", C);
    }, c = (C) => {
      s.value = !1, C.target.composing = !1, n("compositionend", C);
      const P = document.createEvent("HTMLEvents");
      P.initEvent("input", !0, !0), C.target.dispatchEvent(P), l(C);
    }, f = (C) => {
      if (s.value && t.lazy) {
        o.value = C.target.value;
        return;
      }
      n("input", C);
    }, d = (C) => {
      n("blur", C);
    }, h = (C) => {
      n("focus", C);
    }, p = () => {
      a.value && a.value.focus();
    }, v = () => {
      a.value && a.value.blur();
    }, g = (C) => {
      n("keydown", C);
    }, m = (C) => {
      n("keyup", C);
    }, y = (C, P, $) => {
      var T;
      (T = a.value) === null || T === void 0 || T.setSelectionRange(C, P, $);
    }, _ = () => {
      var C;
      (C = a.value) === null || C === void 0 || C.select();
    };
    i({
      focus: p,
      blur: v,
      input: V(() => {
        var C;
        return (C = a.value) === null || C === void 0 ? void 0 : C.input;
      }),
      setSelectionRange: y,
      select: _,
      getSelectionStart: () => {
        var C;
        return (C = a.value) === null || C === void 0 ? void 0 : C.getSelectionStart();
      },
      getSelectionEnd: () => {
        var C;
        return (C = a.value) === null || C === void 0 ? void 0 : C.getSelectionEnd();
      },
      getScrollTop: () => {
        var C;
        return (C = a.value) === null || C === void 0 ? void 0 : C.getScrollTop();
      }
    });
    const O = (C) => {
      n("mousedown", C);
    }, S = (C) => {
      n("paste", C);
    }, x = V(() => t.style && typeof t.style != "string" ? CNe(t.style) : t.style);
    return () => {
      const C = TNe(t, ["style", "lazy"]);
      return D(xNe, te(te(te({}, C), r), {}, {
        style: x.value,
        onInput: f,
        onChange: l,
        onBlur: d,
        onFocus: h,
        ref: a,
        value: o.value,
        onCompositionstart: u,
        onCompositionend: c,
        onKeyup: m,
        onKeydown: g,
        onPaste: S,
        onMousedown: O
      }), null);
    };
  }
}), PNe = {
  inputRef: oe.any,
  prefixCls: String,
  id: String,
  inputElement: oe.VueNode,
  disabled: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  editable: {
    type: Boolean,
    default: void 0
  },
  activeDescendantId: String,
  value: String,
  open: {
    type: Boolean,
    default: void 0
  },
  tabindex: oe.oneOfType([oe.number, oe.string]),
  /** Pass accessibility props to input */
  attrs: oe.object,
  onKeydown: {
    type: Function
  },
  onMousedown: {
    type: Function
  },
  onChange: {
    type: Function
  },
  onPaste: {
    type: Function
  },
  onCompositionstart: {
    type: Function
  },
  onCompositionend: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  onBlur: {
    type: Function
  }
}, Xre = ae({
  compatConfig: {
    MODE: 3
  },
  name: "SelectInput",
  inheritAttrs: !1,
  props: PNe,
  setup(t) {
    let e = null;
    const n = et("VCSelectContainerEvent");
    return () => {
      var r;
      const {
        prefixCls: i,
        id: a,
        inputElement: o,
        disabled: s,
        tabindex: l,
        autofocus: u,
        autocomplete: c,
        editable: f,
        activeDescendantId: d,
        value: h,
        onKeydown: p,
        onMousedown: v,
        onChange: g,
        onPaste: m,
        onCompositionstart: y,
        onCompositionend: _,
        onFocus: O,
        onBlur: S,
        open: x,
        inputRef: C,
        attrs: P
      } = t;
      let $ = o || D(t8, null, null);
      const T = $.props || {}, {
        onKeydown: E,
        onInput: M,
        onFocus: R,
        onBlur: N,
        onMousedown: I,
        onCompositionstart: B,
        onCompositionend: Q,
        style: W
      } = T;
      return $ = Or($, k(k(k(k(k({
        type: "search"
      }, T), {
        id: a,
        ref: C,
        disabled: s,
        tabindex: l,
        lazy: !1,
        autocomplete: c || "off",
        autofocus: u,
        class: Re(`${i}-selection-search-input`, (r = $ == null ? void 0 : $.props) === null || r === void 0 ? void 0 : r.class),
        role: "combobox",
        "aria-expanded": x,
        "aria-haspopup": "listbox",
        "aria-owns": `${a}_list`,
        "aria-autocomplete": "list",
        "aria-controls": `${a}_list`,
        "aria-activedescendant": d
      }), P), {
        value: f ? h : "",
        readonly: !f,
        unselectable: f ? null : "on",
        style: k(k({}, W), {
          opacity: f ? null : 0
        }),
        onKeydown: (H) => {
          p(H), E && E(H);
        },
        onMousedown: (H) => {
          v(H), I && I(H);
        },
        onInput: (H) => {
          g(H), M && M(H);
        },
        onCompositionstart(H) {
          y(H), B && B(H);
        },
        onCompositionend(H) {
          _(H), Q && Q(H);
        },
        onPaste: m,
        onFocus: function() {
          clearTimeout(e), R && R(arguments.length <= 0 ? void 0 : arguments[0]), O && O(arguments.length <= 0 ? void 0 : arguments[0]), n == null || n.focus(arguments.length <= 0 ? void 0 : arguments[0]);
        },
        onBlur: function() {
          for (var H = arguments.length, U = new Array(H), j = 0; j < H; j++)
            U[j] = arguments[j];
          e = setTimeout(() => {
            N && N(U[0]), S && S(U[0]), n == null || n.blur(U[0]);
          }, 100);
        }
      }), $.type === "textarea" ? {} : {
        type: "search"
      }), !0, !0), $;
    };
  }
}), $Ne = `accept acceptcharset accesskey action allowfullscreen allowtransparency
alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge
charset checked classid classname colspan cols content contenteditable contextmenu
controls coords crossorigin data datetime default defer dir disabled download draggable
enctype form formaction formenctype formmethod formnovalidate formtarget frameborder
headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity
is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media
mediagroup method min minlength multiple muted name novalidate nonce open
optimum pattern placeholder poster preload radiogroup readonly rel required
reversed role rowspan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellcheck src srcdoc srclang srcset start step style
summary tabindex target title type usemap value width wmode wrap`, ANe = `onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown
    onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick
    onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown
    onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
    onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
    onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
    onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`, z7 = `${$Ne} ${ANe}`.split(/[\s\n]+/), ENe = "aria-", MNe = "data-";
function V7(t, e) {
  return t.indexOf(e) === 0;
}
function M2(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n;
  e === !1 ? n = {
    aria: !0,
    data: !0,
    attr: !0
  } : e === !0 ? n = {
    aria: !0
  } : n = k({}, e);
  const r = {};
  return Object.keys(t).forEach((i) => {
    // Aria
    (n.aria && (i === "role" || V7(i, ENe)) || // Data
    n.data && V7(i, MNe) || // Attr
    n.attr && (z7.includes(i) || z7.includes(i.toLowerCase()))) && (r[i] = t[i]);
  }), r;
}
const Yre = Symbol("OverflowContextProviderKey"), PR = ae({
  compatConfig: {
    MODE: 3
  },
  name: "OverflowContextProvider",
  inheritAttrs: !1,
  props: {
    value: {
      type: Object
    }
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    return Et(Yre, V(() => t.value)), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
}), INe = () => et(Yre, V(() => null));
var DNe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const Fp = void 0, Yx = ae({
  compatConfig: {
    MODE: 3
  },
  name: "Item",
  props: {
    prefixCls: String,
    item: oe.any,
    renderItem: Function,
    responsive: Boolean,
    itemKey: {
      type: [String, Number]
    },
    registerSize: Function,
    display: Boolean,
    order: Number,
    component: oe.any,
    invalidate: Boolean
  },
  setup(t, e) {
    let {
      slots: n,
      expose: r
    } = e;
    const i = V(() => t.responsive && !t.display), a = ee();
    r({
      itemNodeRef: a
    });
    function o(s) {
      t.registerSize(t.itemKey, s);
    }
    return qu(() => {
      o(null);
    }), () => {
      var s;
      const {
        prefixCls: l,
        invalidate: u,
        item: c,
        renderItem: f,
        responsive: d,
        registerSize: h,
        itemKey: p,
        display: v,
        order: g,
        component: m = "div"
      } = t, y = DNe(t, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), _ = (s = n.default) === null || s === void 0 ? void 0 : s.call(n), O = f && c !== Fp ? f(c) : _;
      let S;
      u || (S = {
        opacity: i.value ? 0 : 1,
        height: i.value ? 0 : Fp,
        overflowY: i.value ? "hidden" : Fp,
        order: d ? g : Fp,
        pointerEvents: i.value ? "none" : Fp,
        position: i.value ? "absolute" : Fp
      });
      const x = {};
      return i.value && (x["aria-hidden"] = !0), D($g, {
        disabled: !d,
        onResize: (C) => {
          let {
            offsetWidth: P
          } = C;
          o(P);
        }
      }, {
        default: () => D(m, te(te(te({
          class: Re(!u && l),
          style: S
        }, x), y), {}, {
          ref: a
        }), {
          default: () => [O]
        })
      });
    };
  }
});
var oE = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const RNe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "RawItem",
  inheritAttrs: !1,
  props: {
    component: oe.any,
    title: oe.any,
    id: String,
    onMouseenter: {
      type: Function
    },
    onMouseleave: {
      type: Function
    },
    onClick: {
      type: Function
    },
    onKeydown: {
      type: Function
    },
    onFocus: {
      type: Function
    },
    role: String,
    tabindex: Number
  },
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const i = INe();
    return () => {
      var a;
      if (!i.value) {
        const {
          component: f = "div"
        } = t, d = oE(t, ["component"]);
        return D(f, te(te({}, d), r), {
          default: () => [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]
        });
      }
      const o = i.value, {
        className: s
      } = o, l = oE(o, ["className"]), {
        class: u
      } = r, c = oE(r, ["class"]);
      return D(PR, {
        value: null
      }, {
        default: () => [D(Yx, te(te(te({
          class: Re(s, u)
        }, l), c), t), n)]
      });
    };
  }
});
var kNe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const qre = "responsive", Kre = "invalidate";
function LNe(t) {
  return `+ ${t.length} ...`;
}
const NNe = () => ({
  id: String,
  prefixCls: String,
  data: Array,
  itemKey: [String, Number, Function],
  /** Used for `responsive`. It will limit render node to avoid perf issue */
  itemWidth: {
    type: Number,
    default: 10
  },
  renderItem: Function,
  /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  renderRawItem: Function,
  maxCount: [Number, String],
  renderRest: Function,
  /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  renderRawRest: Function,
  suffix: oe.any,
  component: String,
  itemComponent: oe.any,
  /** @private This API may be refactor since not well design */
  onVisibleChange: Function,
  /** When set to `full`, ssr will render full items by default and remove at client side */
  ssr: String,
  onMousedown: Function
}), Au = ae({
  name: "Overflow",
  inheritAttrs: !1,
  props: NNe(),
  emits: ["visibleChange"],
  setup(t, e) {
    let {
      attrs: n,
      emit: r,
      slots: i
    } = e;
    const a = V(() => t.ssr === "full"), o = ve(null), s = V(() => o.value || 0), l = ve(/* @__PURE__ */ new Map()), u = ve(0), c = ve(0), f = ve(0), d = ve(null), h = ve(null), p = V(() => h.value === null && a.value ? Number.MAX_SAFE_INTEGER : h.value || 0), v = ve(!1), g = V(() => `${t.prefixCls}-item`), m = V(() => Math.max(u.value, c.value)), y = V(() => !!(t.data.length && t.maxCount === qre)), _ = V(() => t.maxCount === Kre), O = V(() => y.value || typeof t.maxCount == "number" && t.data.length > t.maxCount), S = V(() => {
      let I = t.data;
      return y.value ? o.value === null && a.value ? I = t.data : I = t.data.slice(0, Math.min(t.data.length, s.value / t.itemWidth)) : typeof t.maxCount == "number" && (I = t.data.slice(0, t.maxCount)), I;
    }), x = V(() => y.value ? t.data.slice(p.value + 1) : t.data.slice(S.value.length)), C = (I, B) => {
      var Q;
      return typeof t.itemKey == "function" ? t.itemKey(I) : (Q = t.itemKey && (I == null ? void 0 : I[t.itemKey])) !== null && Q !== void 0 ? Q : B;
    }, P = V(() => t.renderItem || ((I) => I)), $ = (I, B) => {
      h.value = I, B || (v.value = I < t.data.length - 1, r("visibleChange", I));
    }, T = (I, B) => {
      o.value = B.clientWidth;
    }, E = (I, B) => {
      const Q = new Map(l.value);
      B === null ? Q.delete(I) : Q.set(I, B), l.value = Q;
    }, M = (I, B) => {
      u.value = c.value, c.value = B;
    }, R = (I, B) => {
      f.value = B;
    }, N = (I) => l.value.get(C(S.value[I], I));
    return me([s, l, c, f, () => t.itemKey, S], () => {
      if (s.value && m.value && S.value) {
        let I = f.value;
        const B = S.value.length, Q = B - 1;
        if (!B) {
          $(0), d.value = null;
          return;
        }
        for (let W = 0; W < B; W += 1) {
          const H = N(W);
          if (H === void 0) {
            $(W - 1, !0);
            break;
          }
          if (I += H, // Only one means `totalWidth` is the final width
          Q === 0 && I <= s.value || // Last two width will be the final width
          W === Q - 1 && I + N(Q) <= s.value) {
            $(Q), d.value = null;
            break;
          } else if (I + m.value > s.value) {
            $(W - 1), d.value = I - H - f.value + c.value;
            break;
          }
        }
        t.suffix && N(0) + f.value > s.value && (d.value = null);
      }
    }), () => {
      const I = v.value && !!x.value.length, {
        itemComponent: B,
        renderRawItem: Q,
        renderRawRest: W,
        renderRest: H,
        prefixCls: U = "rc-overflow",
        suffix: j,
        component: Y = "div",
        id: ne,
        onMousedown: fe
      } = t, {
        class: ue,
        style: ye
      } = n, se = kNe(n, ["class", "style"]);
      let he = {};
      d.value !== null && y.value && (he = {
        position: "absolute",
        left: `${d.value}px`,
        top: 0
      });
      const re = {
        prefixCls: g.value,
        responsive: y.value,
        component: B,
        invalidate: _.value
      }, q = Q ? (we, He) => {
        const je = C(we, He);
        return D(PR, {
          key: je,
          value: k(k({}, re), {
            order: He,
            item: we,
            itemKey: je,
            registerSize: E,
            display: He <= p.value
          })
        }, {
          default: () => [Q(we, He)]
        });
      } : (we, He) => {
        const je = C(we, He);
        return D(Yx, te(te({}, re), {}, {
          order: He,
          key: je,
          item: we,
          renderItem: P.value,
          itemKey: je,
          registerSize: E,
          display: He <= p.value
        }), null);
      };
      let K = () => null;
      const de = {
        order: I ? p.value : Number.MAX_SAFE_INTEGER,
        className: `${g.value} ${g.value}-rest`,
        registerSize: M,
        display: I
      };
      if (W)
        W && (K = () => D(PR, {
          value: k(k({}, re), de)
        }, {
          default: () => [W(x.value)]
        }));
      else {
        const we = H || LNe;
        K = () => D(Yx, te(te({}, re), de), {
          default: () => typeof we == "function" ? we(x.value) : we
        });
      }
      const xe = () => {
        var we;
        return D(Y, te({
          id: ne,
          class: Re(!_.value && U, ue),
          style: ye,
          onMousedown: fe
        }, se), {
          default: () => [S.value.map(q), O.value ? K() : null, j && D(Yx, te(te({}, re), {}, {
            order: p.value,
            class: `${g.value}-suffix`,
            registerSize: R,
            display: !0,
            style: he
          }), {
            default: () => j
          }), (we = i.default) === null || we === void 0 ? void 0 : we.call(i)]
        });
      };
      return D($g, {
        disabled: !y.value,
        onResize: T
      }, {
        default: xe
      });
    };
  }
});
Au.Item = RNe;
Au.RESPONSIVE = qre;
Au.INVALIDATE = Kre;
const BNe = Symbol("TreeSelectLegacyContextPropsKey");
function n8() {
  return et(BNe, {});
}
const zNe = {
  id: String,
  prefixCls: String,
  values: oe.array,
  open: {
    type: Boolean,
    default: void 0
  },
  searchValue: String,
  inputRef: oe.any,
  placeholder: oe.any,
  disabled: {
    type: Boolean,
    default: void 0
  },
  mode: String,
  showSearch: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  activeDescendantId: String,
  tabindex: oe.oneOfType([oe.number, oe.string]),
  compositionStatus: Boolean,
  removeIcon: oe.any,
  choiceTransitionName: String,
  maxTagCount: oe.oneOfType([oe.number, oe.string]),
  maxTagTextLength: Number,
  maxTagPlaceholder: oe.any.def(() => (t) => `+ ${t.length} ...`),
  tagRender: Function,
  onToggleOpen: {
    type: Function
  },
  onRemove: Function,
  onInputChange: Function,
  onInputPaste: Function,
  onInputKeyDown: Function,
  onInputMouseDown: Function,
  onInputCompositionStart: Function,
  onInputCompositionEnd: Function
}, F7 = (t) => {
  t.preventDefault(), t.stopPropagation();
}, VNe = ae({
  name: "MultipleSelectSelector",
  inheritAttrs: !1,
  props: zNe,
  setup(t) {
    const e = ve(), n = ve(0), r = ve(!1), i = n8(), a = V(() => `${t.prefixCls}-selection`), o = V(() => t.open || t.mode === "tags" ? t.searchValue : ""), s = V(() => t.mode === "tags" || t.showSearch && (t.open || r.value)), l = ee("");
    Vt(() => {
      l.value = o.value;
    }), _t(() => {
      me(l, () => {
        n.value = e.value.scrollWidth;
      }, {
        flush: "post",
        immediate: !0
      });
    });
    function u(p, v, g, m, y) {
      return D("span", {
        class: Re(`${a.value}-item`, {
          [`${a.value}-item-disabled`]: g
        }),
        title: typeof p == "string" || typeof p == "number" ? p.toString() : void 0
      }, [D("span", {
        class: `${a.value}-item-content`
      }, [v]), m && D(Vh, {
        class: `${a.value}-item-remove`,
        onMousedown: F7,
        onClick: y,
        customizeIcon: t.removeIcon
      }, {
        default: () => [Pn("×")]
      })]);
    }
    function c(p, v, g, m, y, _) {
      var O;
      const S = (C) => {
        F7(C), t.onToggleOpen(!open);
      };
      let x = _;
      return i.keyEntities && (x = ((O = i.keyEntities[p]) === null || O === void 0 ? void 0 : O.node) || {}), D("span", {
        key: p,
        onMousedown: S
      }, [t.tagRender({
        label: v,
        value: p,
        disabled: g,
        closable: m,
        onClose: y,
        option: x
      })]);
    }
    function f(p) {
      const {
        disabled: v,
        label: g,
        value: m,
        option: y
      } = p, _ = !t.disabled && !v;
      let O = g;
      if (typeof t.maxTagTextLength == "number" && (typeof g == "string" || typeof g == "number")) {
        const x = String(O);
        x.length > t.maxTagTextLength && (O = `${x.slice(0, t.maxTagTextLength)}...`);
      }
      const S = (x) => {
        var C;
        x && x.stopPropagation(), (C = t.onRemove) === null || C === void 0 || C.call(t, p);
      };
      return typeof t.tagRender == "function" ? c(m, O, v, _, S, y) : u(g, O, v, _, S);
    }
    function d(p) {
      const {
        maxTagPlaceholder: v = (m) => `+ ${m.length} ...`
      } = t, g = typeof v == "function" ? v(p) : v;
      return u(g, g, !1);
    }
    const h = (p) => {
      const v = p.target.composing;
      l.value = p.target.value, v || t.onInputChange(p);
    };
    return () => {
      const {
        id: p,
        prefixCls: v,
        values: g,
        open: m,
        inputRef: y,
        placeholder: _,
        disabled: O,
        autofocus: S,
        autocomplete: x,
        activeDescendantId: C,
        tabindex: P,
        compositionStatus: $,
        onInputPaste: T,
        onInputKeyDown: E,
        onInputMouseDown: M,
        onInputCompositionStart: R,
        onInputCompositionEnd: N
      } = t, I = D("div", {
        class: `${a.value}-search`,
        style: {
          width: n.value + "px"
        },
        key: "input"
      }, [D(Xre, {
        inputRef: y,
        open: m,
        prefixCls: v,
        id: p,
        inputElement: null,
        disabled: O,
        autofocus: S,
        autocomplete: x,
        editable: s.value,
        activeDescendantId: C,
        value: l.value,
        onKeydown: E,
        onMousedown: M,
        onChange: h,
        onPaste: T,
        onCompositionstart: R,
        onCompositionend: N,
        tabindex: P,
        attrs: M2(t, !0),
        onFocus: () => r.value = !0,
        onBlur: () => r.value = !1
      }, null), D("span", {
        ref: e,
        class: `${a.value}-search-mirror`,
        "aria-hidden": !0
      }, [l.value, Pn(" ")])]), B = D(Au, {
        prefixCls: `${a.value}-overflow`,
        data: g,
        renderItem: f,
        renderRest: d,
        suffix: I,
        itemKey: "key",
        maxCount: t.maxTagCount,
        key: "overflow"
      }, null);
      return D(Wt, null, [B, !g.length && !o.value && !$ && D("span", {
        class: `${a.value}-placeholder`
      }, [_])]);
    };
  }
}), FNe = {
  inputElement: oe.any,
  id: String,
  prefixCls: String,
  values: oe.array,
  open: {
    type: Boolean,
    default: void 0
  },
  searchValue: String,
  inputRef: oe.any,
  placeholder: oe.any,
  compositionStatus: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  mode: String,
  showSearch: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  activeDescendantId: String,
  tabindex: oe.oneOfType([oe.number, oe.string]),
  activeValue: String,
  backfill: {
    type: Boolean,
    default: void 0
  },
  optionLabelRender: Function,
  onInputChange: Function,
  onInputPaste: Function,
  onInputKeyDown: Function,
  onInputMouseDown: Function,
  onInputCompositionStart: Function,
  onInputCompositionEnd: Function
}, r8 = ae({
  name: "SingleSelector",
  setup(t) {
    const e = ve(!1), n = V(() => t.mode === "combobox"), r = V(() => n.value || t.showSearch), i = V(() => {
      let c = t.searchValue || "";
      return n.value && t.activeValue && !e.value && (c = t.activeValue), c;
    }), a = n8();
    me([n, () => t.activeValue], () => {
      n.value && (e.value = !1);
    }, {
      immediate: !0
    });
    const o = V(() => t.mode !== "combobox" && !t.open && !t.showSearch ? !1 : !!i.value || t.compositionStatus), s = V(() => {
      const c = t.values[0];
      return c && (typeof c.label == "string" || typeof c.label == "number") ? c.label.toString() : void 0;
    }), l = () => {
      if (t.values[0])
        return null;
      const c = o.value ? {
        visibility: "hidden"
      } : void 0;
      return D("span", {
        class: `${t.prefixCls}-selection-placeholder`,
        style: c
      }, [t.placeholder]);
    }, u = (c) => {
      c.target.composing || (e.value = !0, t.onInputChange(c));
    };
    return () => {
      var c, f, d, h;
      const {
        inputElement: p,
        prefixCls: v,
        id: g,
        values: m,
        inputRef: y,
        disabled: _,
        autofocus: O,
        autocomplete: S,
        activeDescendantId: x,
        open: C,
        tabindex: P,
        optionLabelRender: $,
        onInputKeyDown: T,
        onInputMouseDown: E,
        onInputPaste: M,
        onInputCompositionStart: R,
        onInputCompositionEnd: N
      } = t, I = m[0];
      let B = null;
      if (I && a.customSlots) {
        const Q = (c = I.key) !== null && c !== void 0 ? c : I.value, W = ((f = a.keyEntities[Q]) === null || f === void 0 ? void 0 : f.node) || {};
        B = a.customSlots[(d = W.slots) === null || d === void 0 ? void 0 : d.title] || a.customSlots.title || I.label, typeof B == "function" && (B = B(W));
      } else
        B = $ && I ? $(I.option) : I == null ? void 0 : I.label;
      return D(Wt, null, [D("span", {
        class: `${v}-selection-search`
      }, [D(Xre, {
        inputRef: y,
        prefixCls: v,
        id: g,
        open: C,
        inputElement: p,
        disabled: _,
        autofocus: O,
        autocomplete: S,
        editable: r.value,
        activeDescendantId: x,
        value: i.value,
        onKeydown: T,
        onMousedown: E,
        onChange: u,
        onPaste: M,
        onCompositionstart: R,
        onCompositionend: N,
        tabindex: P,
        attrs: M2(t, !0)
      }, null)]), !n.value && I && !o.value && D("span", {
        class: `${v}-selection-item`,
        title: s.value
      }, [D(Wt, {
        key: (h = I.key) !== null && h !== void 0 ? h : I.value
      }, [B])]), l()]);
    };
  }
});
r8.props = FNe;
r8.inheritAttrs = !1;
function WNe(t) {
  return ![
    // System function button
    Me.ESC,
    Me.SHIFT,
    Me.BACKSPACE,
    Me.TAB,
    Me.WIN_KEY,
    Me.ALT,
    Me.META,
    Me.WIN_KEY_RIGHT,
    Me.CTRL,
    Me.SEMICOLON,
    Me.EQUALS,
    Me.CAPS_LOCK,
    Me.CONTEXT_MENU,
    // F1-F12
    Me.F1,
    Me.F2,
    Me.F3,
    Me.F4,
    Me.F5,
    Me.F6,
    Me.F7,
    Me.F8,
    Me.F9,
    Me.F10,
    Me.F11,
    Me.F12
  ].includes(t);
}
function Jre() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, e = null, n;
  Qt(() => {
    clearTimeout(n);
  });
  function r(i) {
    (i || e === null) && (e = i), clearTimeout(n), n = setTimeout(() => {
      e = null;
    }, t);
  }
  return [() => e, r];
}
function kb() {
  const t = (e) => {
    t.current = e;
  };
  return t;
}
const QNe = ae({
  name: "Selector",
  inheritAttrs: !1,
  props: {
    id: String,
    prefixCls: String,
    showSearch: {
      type: Boolean,
      default: void 0
    },
    open: {
      type: Boolean,
      default: void 0
    },
    /** Display in the Selector value, it's not same as `value` prop */
    values: oe.array,
    multiple: {
      type: Boolean,
      default: void 0
    },
    mode: String,
    searchValue: String,
    activeValue: String,
    inputElement: oe.any,
    autofocus: {
      type: Boolean,
      default: void 0
    },
    activeDescendantId: String,
    tabindex: oe.oneOfType([oe.number, oe.string]),
    disabled: {
      type: Boolean,
      default: void 0
    },
    placeholder: oe.any,
    removeIcon: oe.any,
    // Tags
    maxTagCount: oe.oneOfType([oe.number, oe.string]),
    maxTagTextLength: Number,
    maxTagPlaceholder: oe.any,
    tagRender: Function,
    optionLabelRender: Function,
    /** Check if `tokenSeparators` contains `\n` or `\r\n` */
    tokenWithEnter: {
      type: Boolean,
      default: void 0
    },
    // Motion
    choiceTransitionName: String,
    onToggleOpen: {
      type: Function
    },
    /** `onSearch` returns go next step boolean to check if need do toggle open */
    onSearch: Function,
    onSearchSubmit: Function,
    onRemove: Function,
    onInputKeyDown: {
      type: Function
    },
    /**
     * @private get real dom for trigger align.
     * This may be removed after React provides replacement of `findDOMNode`
     */
    domRef: Function
  },
  setup(t, e) {
    let {
      expose: n
    } = e;
    const r = kb(), i = ee(!1), [a, o] = Jre(0), s = (m) => {
      const {
        which: y
      } = m;
      (y === Me.UP || y === Me.DOWN) && m.preventDefault(), t.onInputKeyDown && t.onInputKeyDown(m), y === Me.ENTER && t.mode === "tags" && !i.value && !t.open && t.onSearchSubmit(m.target.value), WNe(y) && t.onToggleOpen(!0);
    }, l = () => {
      o(!0);
    };
    let u = null;
    const c = (m) => {
      t.onSearch(m, !0, i.value) !== !1 && t.onToggleOpen(!0);
    }, f = () => {
      i.value = !0;
    }, d = (m) => {
      i.value = !1, t.mode !== "combobox" && c(m.target.value);
    }, h = (m) => {
      let {
        target: {
          value: y
        }
      } = m;
      if (t.tokenWithEnter && u && /[\r\n]/.test(u)) {
        const _ = u.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
        y = y.replace(_, u);
      }
      u = null, c(y);
    }, p = (m) => {
      const {
        clipboardData: y
      } = m;
      u = y.getData("text");
    }, v = (m) => {
      let {
        target: y
      } = m;
      y !== r.current && (document.body.style.msTouchAction !== void 0 ? setTimeout(() => {
        r.current.focus();
      }) : r.current.focus());
    }, g = (m) => {
      const y = a();
      m.target !== r.current && !y && m.preventDefault(), (t.mode !== "combobox" && (!t.showSearch || !y) || !t.open) && (t.open && t.onSearch("", !0, !1), t.onToggleOpen());
    };
    return n({
      focus: () => {
        r.current.focus();
      },
      blur: () => {
        r.current.blur();
      }
    }), () => {
      const {
        prefixCls: m,
        domRef: y,
        mode: _
      } = t, O = {
        inputRef: r,
        onInputKeyDown: s,
        onInputMouseDown: l,
        onInputChange: h,
        onInputPaste: p,
        compositionStatus: i.value,
        onInputCompositionStart: f,
        onInputCompositionEnd: d
      }, S = _ === "multiple" || _ === "tags" ? D(VNe, te(te({}, t), O), null) : D(r8, te(te({}, t), O), null);
      return D("div", {
        ref: y,
        class: `${m}-selector`,
        onClick: v,
        onMousedown: g
      }, [S]);
    };
  }
});
function HNe(t, e, n) {
  function r(i) {
    var a, o, s;
    let l = i.target;
    l.shadowRoot && i.composed && (l = i.composedPath()[0] || l);
    const u = [(a = t[0]) === null || a === void 0 ? void 0 : a.value, (s = (o = t[1]) === null || o === void 0 ? void 0 : o.value) === null || s === void 0 ? void 0 : s.getPopupElement()];
    e.value && u.every((c) => c && !c.contains(l) && c !== l) && n(!1);
  }
  _t(() => {
    window.addEventListener("mousedown", r);
  }), Qt(() => {
    window.removeEventListener("mousedown", r);
  });
}
function GNe() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
  const e = ve(!1);
  let n;
  const r = () => {
    clearTimeout(n);
  };
  return _t(() => {
    r();
  }), [e, (a, o) => {
    r(), n = setTimeout(() => {
      e.value = a, o && o();
    }, t);
  }, r];
}
const eie = Symbol("BaseSelectContextKey");
function jNe(t) {
  return Et(eie, t);
}
function ZNe() {
  return et(eie, {});
}
const i8 = () => {
  if (typeof navigator > "u" || typeof window > "u")
    return !1;
  const t = navigator.userAgent || navigator.vendor || window.opera;
  return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t == null ? void 0 : t.substring(0, 4));
};
function tie(t) {
  if (!Vs(t)) return zn(t);
  const e = new Proxy({}, {
    get(n, r, i) {
      return Reflect.get(t.value, r, i);
    },
    set(n, r, i) {
      return t.value[r] = i, !0;
    },
    deleteProperty(n, r) {
      return Reflect.deleteProperty(t.value, r);
    },
    has(n, r) {
      return Reflect.has(t.value, r);
    },
    ownKeys() {
      return Object.keys(t.value);
    },
    getOwnPropertyDescriptor() {
      return {
        enumerable: !0,
        configurable: !0
      };
    }
  });
  return zn(e);
}
var UNe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const XNe = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"], YNe = () => ({
  prefixCls: String,
  id: String,
  omitDomProps: Array,
  // >>> Value
  displayValues: Array,
  onDisplayValuesChange: Function,
  // >>> Active
  /** Current dropdown list active item string value */
  activeValue: String,
  /** Link search input with target element */
  activeDescendantId: String,
  onActiveValueChange: Function,
  // >>> Search
  searchValue: String,
  /** Trigger onSearch, return false to prevent trigger open event */
  onSearch: Function,
  /** Trigger when search text match the `tokenSeparators`. Will provide split content */
  onSearchSplit: Function,
  maxLength: Number,
  OptionList: oe.any,
  /** Tell if provided `options` is empty */
  emptyOptions: Boolean
}), nie = () => ({
  showSearch: {
    type: Boolean,
    default: void 0
  },
  tagRender: {
    type: Function
  },
  optionLabelRender: {
    type: Function
  },
  direction: {
    type: String
  },
  // MISC
  tabindex: Number,
  autofocus: Boolean,
  notFoundContent: oe.any,
  placeholder: oe.any,
  onClear: Function,
  choiceTransitionName: String,
  // >>> Mode
  mode: String,
  // >>> Status
  disabled: {
    type: Boolean,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: void 0
  },
  // >>> Open
  open: {
    type: Boolean,
    default: void 0
  },
  defaultOpen: {
    type: Boolean,
    default: void 0
  },
  onDropdownVisibleChange: {
    type: Function
  },
  // >>> Customize Input
  /** @private Internal usage. Do not use in your production. */
  getInputElement: {
    type: Function
  },
  /** @private Internal usage. Do not use in your production. */
  getRawInputElement: {
    type: Function
  },
  // >>> Selector
  maxTagTextLength: Number,
  maxTagCount: {
    type: [String, Number]
  },
  maxTagPlaceholder: oe.any,
  // >>> Search
  tokenSeparators: {
    type: Array
  },
  // >>> Icons
  allowClear: {
    type: Boolean,
    default: void 0
  },
  showArrow: {
    type: Boolean,
    default: void 0
  },
  inputIcon: oe.any,
  /** Clear all icon */
  clearIcon: oe.any,
  /** Selector remove icon */
  removeIcon: oe.any,
  // >>> Dropdown
  animation: String,
  transitionName: String,
  dropdownStyle: {
    type: Object
  },
  dropdownClassName: String,
  dropdownMatchSelectWidth: {
    type: [Boolean, Number],
    default: void 0
  },
  dropdownRender: {
    type: Function
  },
  dropdownAlign: Object,
  placement: {
    type: String
  },
  getPopupContainer: {
    type: Function
  },
  // >>> Focus
  showAction: {
    type: Array
  },
  onBlur: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  // >>> Rest Events
  onKeyup: Function,
  onKeydown: Function,
  onMousedown: Function,
  onPopupScroll: Function,
  onInputKeyDown: Function,
  onMouseenter: Function,
  onMouseleave: Function,
  onClick: Function
}), qNe = () => k(k({}, YNe()), nie());
function a8(t) {
  return t === "tags" || t === "multiple";
}
const KNe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "BaseSelect",
  inheritAttrs: !1,
  props: li(qNe(), {
    showAction: [],
    notFoundContent: "Not Found"
  }),
  setup(t, e) {
    let {
      attrs: n,
      expose: r,
      slots: i
    } = e;
    const a = V(() => a8(t.mode)), o = V(() => t.showSearch !== void 0 ? t.showSearch : a.value || t.mode === "combobox"), s = ve(!1);
    _t(() => {
      s.value = i8();
    });
    const l = n8(), u = ve(null), c = kb(), f = ve(null), d = ve(null), h = ve(null), p = ee(!1), [v, g, m] = GNe();
    r({
      focus: () => {
        var q;
        (q = d.value) === null || q === void 0 || q.focus();
      },
      blur: () => {
        var q;
        (q = d.value) === null || q === void 0 || q.blur();
      },
      scrollTo: (q) => {
        var K;
        return (K = h.value) === null || K === void 0 ? void 0 : K.scrollTo(q);
      }
    });
    const O = V(() => {
      var q;
      if (t.mode !== "combobox")
        return t.searchValue;
      const K = (q = t.displayValues[0]) === null || q === void 0 ? void 0 : q.value;
      return typeof K == "string" || typeof K == "number" ? String(K) : "";
    }), S = t.open !== void 0 ? t.open : t.defaultOpen, x = ve(S), C = ve(S), P = (q) => {
      x.value = t.open !== void 0 ? t.open : q, C.value = x.value;
    };
    me(() => t.open, () => {
      P(t.open);
    });
    const $ = V(() => !t.notFoundContent && t.emptyOptions);
    Vt(() => {
      C.value = x.value, (t.disabled || $.value && C.value && t.mode === "combobox") && (C.value = !1);
    });
    const T = V(() => $.value ? !1 : C.value), E = (q) => {
      const K = q !== void 0 ? q : !C.value;
      C.value !== K && !t.disabled && (P(K), t.onDropdownVisibleChange && t.onDropdownVisibleChange(K));
    }, M = V(() => (t.tokenSeparators || []).some((q) => [`
`, `\r
`].includes(q))), R = (q, K, de) => {
      var xe, we;
      let He = !0, je = q;
      (xe = t.onActiveValueChange) === null || xe === void 0 || xe.call(t, null);
      const Be = de ? null : b4e(q, t.tokenSeparators);
      return t.mode !== "combobox" && Be && (je = "", (we = t.onSearchSplit) === null || we === void 0 || we.call(t, Be), E(!1), He = !1), t.onSearch && O.value !== je && t.onSearch(je, {
        source: K ? "typing" : "effect"
      }), He;
    }, N = (q) => {
      var K;
      !q || !q.trim() || (K = t.onSearch) === null || K === void 0 || K.call(t, q, {
        source: "submit"
      });
    };
    me(C, () => {
      !C.value && !a.value && t.mode !== "combobox" && R("", !1, !1);
    }, {
      immediate: !0,
      flush: "post"
    }), me(() => t.disabled, () => {
      x.value && t.disabled && P(!1), t.disabled && !p.value && g(!1);
    }, {
      immediate: !0
    });
    const [I, B] = Jre(), Q = function(q) {
      var K;
      const de = I(), {
        which: xe
      } = q;
      if (xe === Me.ENTER && (t.mode !== "combobox" && q.preventDefault(), C.value || E(!0)), B(!!O.value), xe === Me.BACKSPACE && !de && a.value && !O.value && t.displayValues.length) {
        const Be = [...t.displayValues];
        let Le = null;
        for (let Pe = Be.length - 1; Pe >= 0; Pe -= 1) {
          const Fe = Be[Pe];
          if (!Fe.disabled) {
            Be.splice(Pe, 1), Le = Fe;
            break;
          }
        }
        Le && t.onDisplayValuesChange(Be, {
          type: "remove",
          values: [Le]
        });
      }
      for (var we = arguments.length, He = new Array(we > 1 ? we - 1 : 0), je = 1; je < we; je++)
        He[je - 1] = arguments[je];
      C.value && h.value && h.value.onKeydown(q, ...He), (K = t.onKeydown) === null || K === void 0 || K.call(t, q, ...He);
    }, W = function(q) {
      for (var K = arguments.length, de = new Array(K > 1 ? K - 1 : 0), xe = 1; xe < K; xe++)
        de[xe - 1] = arguments[xe];
      C.value && h.value && h.value.onKeyup(q, ...de), t.onKeyup && t.onKeyup(q, ...de);
    }, H = (q) => {
      const K = t.displayValues.filter((de) => de !== q);
      t.onDisplayValuesChange(K, {
        type: "remove",
        values: [q]
      });
    }, U = ve(!1), j = function() {
      g(!0), t.disabled || (t.onFocus && !U.value && t.onFocus(...arguments), t.showAction && t.showAction.includes("focus") && E(!0)), U.value = !0;
    }, Y = ee(!1), ne = function() {
      if (Y.value || (p.value = !0, g(!1, () => {
        U.value = !1, p.value = !1, E(!1);
      }), t.disabled))
        return;
      const q = O.value;
      q && (t.mode === "tags" ? t.onSearch(q, {
        source: "submit"
      }) : t.mode === "multiple" && t.onSearch("", {
        source: "blur"
      })), t.onBlur && t.onBlur(...arguments);
    }, fe = () => {
      Y.value = !0;
    }, ue = () => {
      Y.value = !1;
    };
    Et("VCSelectContainerEvent", {
      focus: j,
      blur: ne
    });
    const ye = [];
    _t(() => {
      ye.forEach((q) => clearTimeout(q)), ye.splice(0, ye.length);
    }), Qt(() => {
      ye.forEach((q) => clearTimeout(q)), ye.splice(0, ye.length);
    });
    const se = function(q) {
      var K, de;
      const {
        target: xe
      } = q, we = (K = f.value) === null || K === void 0 ? void 0 : K.getPopupElement();
      if (we && we.contains(xe)) {
        const Le = setTimeout(() => {
          var Pe;
          const Fe = ye.indexOf(Le);
          Fe !== -1 && ye.splice(Fe, 1), m(), !s.value && !we.contains(document.activeElement) && ((Pe = d.value) === null || Pe === void 0 || Pe.focus());
        });
        ye.push(Le);
      }
      for (var He = arguments.length, je = new Array(He > 1 ? He - 1 : 0), Be = 1; Be < He; Be++)
        je[Be - 1] = arguments[Be];
      (de = t.onMousedown) === null || de === void 0 || de.call(t, q, ...je);
    }, he = ve(null), re = () => {
    };
    return _t(() => {
      me(T, () => {
        var q;
        if (T.value) {
          const K = Math.ceil((q = u.value) === null || q === void 0 ? void 0 : q.offsetWidth);
          he.value !== K && !Number.isNaN(K) && (he.value = K);
        }
      }, {
        immediate: !0,
        flush: "post"
      });
    }), HNe([u, f], T, E), jNe(tie(k(k({}, k_(t)), {
      open: C,
      triggerOpen: T,
      showSearch: o,
      multiple: a,
      toggleOpen: E
    }))), () => {
      const q = k(k({}, t), n), {
        prefixCls: K,
        id: de,
        open: xe,
        defaultOpen: we,
        mode: He,
        // Search related
        showSearch: je,
        searchValue: Be,
        onSearch: Le,
        // Icons
        allowClear: Pe,
        clearIcon: Fe,
        showArrow: Ye,
        inputIcon: xt,
        // Others
        disabled: It,
        loading: an,
        getInputElement: Ae,
        getPopupContainer: gt,
        placement: Xt,
        // Dropdown
        animation: Bn,
        transitionName: Dn,
        dropdownStyle: Dr,
        dropdownClassName: Gi,
        dropdownMatchSelectWidth: tu,
        dropdownRender: nu,
        dropdownAlign: oc,
        showAction: Qf,
        direction: rl,
        // Tags
        tokenSeparators: Hf,
        tagRender: Gf,
        optionLabelRender: Gm,
        // Events
        onPopupScroll: sc,
        onDropdownVisibleChange: jm,
        onFocus: g$,
        onBlur: FB,
        onKeyup: WB,
        onKeydown: QB,
        onMousedown: HB,
        onClear: Sp,
        omitDomProps: Zm,
        getRawInputElement: z1,
        displayValues: xp,
        onDisplayValuesChange: Um,
        emptyOptions: m$,
        activeDescendantId: Xm,
        activeValue: y$,
        OptionList: b$
      } = q, _$ = UNe(q, ["prefixCls", "id", "open", "defaultOpen", "mode", "showSearch", "searchValue", "onSearch", "allowClear", "clearIcon", "showArrow", "inputIcon", "disabled", "loading", "getInputElement", "getPopupContainer", "placement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "optionLabelRender", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyup", "onKeydown", "onMousedown", "onClear", "omitDomProps", "getRawInputElement", "displayValues", "onDisplayValuesChange", "emptyOptions", "activeDescendantId", "activeValue", "OptionList"]), V1 = He === "combobox" && Ae && Ae() || null, jf = typeof z1 == "function" && z1(), Ym = k({}, _$);
      let F1;
      jf && (F1 = (yo) => {
        E(yo);
      }), XNe.forEach((yo) => {
        delete Ym[yo];
      }), Zm == null || Zm.forEach((yo) => {
        delete Ym[yo];
      });
      const W1 = Ye !== void 0 ? Ye : an || !a.value && He !== "combobox";
      let qm;
      W1 && (qm = D(Vh, {
        class: Re(`${K}-arrow`, {
          [`${K}-arrow-loading`]: an
        }),
        customizeIcon: xt,
        customizeIconProps: {
          loading: an,
          searchValue: O.value,
          open: C.value,
          focused: v.value,
          showSearch: o.value
        }
      }, null));
      let Q1;
      const O$ = () => {
        Sp == null || Sp(), Um([], {
          type: "clear",
          values: xp
        }), R("", !1, !1);
      };
      !It && Pe && (xp.length || O.value) && (Q1 = D(Vh, {
        class: `${K}-clear`,
        onMousedown: O$,
        customizeIcon: Fe
      }, {
        default: () => [Pn("×")]
      }));
      const S$ = D(b$, {
        ref: h
      }, k(k({}, l.customSlots), {
        option: i.option
      })), x$ = Re(K, n.class, {
        [`${K}-focused`]: v.value,
        [`${K}-multiple`]: a.value,
        [`${K}-single`]: !a.value,
        [`${K}-allow-clear`]: Pe,
        [`${K}-show-arrow`]: W1,
        [`${K}-disabled`]: It,
        [`${K}-loading`]: an,
        [`${K}-open`]: C.value,
        [`${K}-customize-input`]: V1,
        [`${K}-show-search`]: o.value
      }), H1 = D(ONe, {
        ref: f,
        disabled: It,
        prefixCls: K,
        visible: T.value,
        popupElement: S$,
        containerWidth: he.value,
        animation: Bn,
        transitionName: Dn,
        dropdownStyle: Dr,
        dropdownClassName: Gi,
        direction: rl,
        dropdownMatchSelectWidth: tu,
        dropdownRender: nu,
        dropdownAlign: oc,
        placement: Xt,
        getPopupContainer: gt,
        empty: m$,
        getTriggerDOMNode: () => c.current,
        onPopupVisibleChange: F1,
        onPopupMouseEnter: re,
        onPopupFocusin: fe,
        onPopupFocusout: ue
      }, {
        default: () => jf ? po(jf) && Or(jf, {
          ref: c
        }, !1, !0) : D(QNe, te(te({}, t), {}, {
          domRef: c,
          prefixCls: K,
          inputElement: V1,
          ref: d,
          id: de,
          showSearch: o.value,
          mode: He,
          activeDescendantId: Xm,
          tagRender: Gf,
          optionLabelRender: Gm,
          values: xp,
          open: C.value,
          onToggleOpen: E,
          activeValue: y$,
          searchValue: O.value,
          onSearch: R,
          onSearchSubmit: N,
          onRemove: H,
          tokenWithEnter: M.value
        }), null)
      });
      let Km;
      return jf ? Km = H1 : Km = D("div", te(te({}, Ym), {}, {
        class: x$,
        ref: u,
        onMousedown: se,
        onKeydown: Q,
        onKeyup: W
      }), [v.value && !C.value && D("span", {
        style: {
          width: 0,
          height: 0,
          position: "absolute",
          overflow: "hidden",
          opacity: 0
        },
        "aria-live": "polite"
      }, [`${xp.map((yo) => {
        let {
          label: G1,
          value: wp
        } = yo;
        return ["number", "string"].includes(typeof G1) ? G1 : wp;
      }).join(", ")}`]), H1, qm, Q1]), Km;
    };
  }
}), I2 = (t, e) => {
  let {
    height: n,
    offset: r,
    prefixCls: i,
    onInnerResize: a
  } = t, {
    slots: o
  } = e;
  var s;
  let l = {}, u = {
    display: "flex",
    flexDirection: "column"
  };
  return r !== void 0 && (l = {
    height: `${n}px`,
    position: "relative",
    overflow: "hidden"
  }, u = k(k({}, u), {
    transform: `translateY(${r}px)`,
    position: "absolute",
    left: 0,
    right: 0,
    top: 0
  })), D("div", {
    style: l
  }, [D($g, {
    onResize: (c) => {
      let {
        offsetHeight: f
      } = c;
      f && a && a();
    }
  }, {
    default: () => [D("div", {
      style: u,
      class: Re({
        [`${i}-holder-inner`]: i
      })
    }, [(s = o.default) === null || s === void 0 ? void 0 : s.call(o)])]
  })]);
};
I2.displayName = "Filter";
I2.inheritAttrs = !1;
I2.props = {
  prefixCls: String,
  /** Virtual filler height. Should be `count * itemMinHeight` */
  height: Number,
  /** Set offset of visible items. Should be the top of start item position */
  offset: Number,
  onInnerResize: Function
};
const rie = (t, e) => {
  let {
    setRef: n
  } = t, {
    slots: r
  } = e;
  var i;
  const a = qr((i = r.default) === null || i === void 0 ? void 0 : i.call(r));
  return a && a.length ? ku(a[0], {
    ref: n
  }) : a;
};
rie.props = {
  setRef: {
    type: Function,
    default: () => {
    }
  }
};
const JNe = 20;
function W7(t) {
  return "touches" in t ? t.touches[0].pageY : t.pageY;
}
const e8e = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ScrollBar",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    scrollTop: Number,
    scrollHeight: Number,
    height: Number,
    count: Number,
    onScroll: {
      type: Function
    },
    onStartMove: {
      type: Function
    },
    onStopMove: {
      type: Function
    }
  },
  setup() {
    return {
      moveRaf: null,
      scrollbarRef: kb(),
      thumbRef: kb(),
      visibleTimeout: null,
      state: zn({
        dragging: !1,
        pageY: null,
        startTop: null,
        visible: !1
      })
    };
  },
  watch: {
    scrollTop: {
      handler() {
        this.delayHidden();
      },
      flush: "post"
    }
  },
  mounted() {
    var t, e;
    (t = this.scrollbarRef.current) === null || t === void 0 || t.addEventListener("touchstart", this.onScrollbarTouchStart, mi ? {
      passive: !1
    } : !1), (e = this.thumbRef.current) === null || e === void 0 || e.addEventListener("touchstart", this.onMouseDown, mi ? {
      passive: !1
    } : !1);
  },
  beforeUnmount() {
    this.removeEvents(), clearTimeout(this.visibleTimeout);
  },
  methods: {
    delayHidden() {
      clearTimeout(this.visibleTimeout), this.state.visible = !0, this.visibleTimeout = setTimeout(() => {
        this.state.visible = !1;
      }, 2e3);
    },
    onScrollbarTouchStart(t) {
      t.preventDefault();
    },
    onContainerMouseDown(t) {
      t.stopPropagation(), t.preventDefault();
    },
    // ======================= Clean =======================
    patchEvents() {
      window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), this.thumbRef.current.addEventListener("touchmove", this.onMouseMove, mi ? {
        passive: !1
      } : !1), this.thumbRef.current.addEventListener("touchend", this.onMouseUp);
    },
    removeEvents() {
      window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart, mi ? {
        passive: !1
      } : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, mi ? {
        passive: !1
      } : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, mi ? {
        passive: !1
      } : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)), en.cancel(this.moveRaf);
    },
    // ======================= Thumb =======================
    onMouseDown(t) {
      const {
        onStartMove: e
      } = this.$props;
      k(this.state, {
        dragging: !0,
        pageY: W7(t),
        startTop: this.getTop()
      }), e(), this.patchEvents(), t.stopPropagation(), t.preventDefault();
    },
    onMouseMove(t) {
      const {
        dragging: e,
        pageY: n,
        startTop: r
      } = this.state, {
        onScroll: i
      } = this.$props;
      if (en.cancel(this.moveRaf), e) {
        const a = W7(t) - n, o = r + a, s = this.getEnableScrollRange(), l = this.getEnableHeightRange(), u = l ? o / l : 0, c = Math.ceil(u * s);
        this.moveRaf = en(() => {
          i(c);
        });
      }
    },
    onMouseUp() {
      const {
        onStopMove: t
      } = this.$props;
      this.state.dragging = !1, t(), this.removeEvents();
    },
    // ===================== Calculate =====================
    getSpinHeight() {
      const {
        height: t,
        scrollHeight: e
      } = this.$props;
      let n = t / e * 100;
      return n = Math.max(n, JNe), n = Math.min(n, t / 2), Math.floor(n);
    },
    getEnableScrollRange() {
      const {
        scrollHeight: t,
        height: e
      } = this.$props;
      return t - e || 0;
    },
    getEnableHeightRange() {
      const {
        height: t
      } = this.$props, e = this.getSpinHeight();
      return t - e || 0;
    },
    getTop() {
      const {
        scrollTop: t
      } = this.$props, e = this.getEnableScrollRange(), n = this.getEnableHeightRange();
      return t === 0 || e === 0 ? 0 : t / e * n;
    },
    // Not show scrollbar when height is large than scrollHeight
    showScroll() {
      const {
        height: t,
        scrollHeight: e
      } = this.$props;
      return e > t;
    }
  },
  render() {
    const {
      dragging: t,
      visible: e
    } = this.state, {
      prefixCls: n
    } = this.$props, r = this.getSpinHeight() + "px", i = this.getTop() + "px", a = this.showScroll(), o = a && e;
    return D("div", {
      ref: this.scrollbarRef,
      class: Re(`${n}-scrollbar`, {
        [`${n}-scrollbar-show`]: a
      }),
      style: {
        width: "8px",
        top: 0,
        bottom: 0,
        right: 0,
        position: "absolute",
        display: o ? void 0 : "none"
      },
      onMousedown: this.onContainerMouseDown,
      onMousemove: this.delayHidden
    }, [D("div", {
      ref: this.thumbRef,
      class: Re(`${n}-scrollbar-thumb`, {
        [`${n}-scrollbar-thumb-moving`]: t
      }),
      style: {
        width: "100%",
        height: r,
        top: i,
        left: 0,
        position: "absolute",
        background: "rgba(0, 0, 0, 0.5)",
        borderRadius: "99px",
        cursor: "pointer",
        userSelect: "none"
      },
      onMousedown: this.onMouseDown
    }, null)]);
  }
});
function t8e(t, e, n, r) {
  const i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = ee(Symbol("update"));
  me(t, () => {
    o.value = Symbol("update");
  });
  let s;
  function l() {
    en.cancel(s);
  }
  function u() {
    l(), s = en(() => {
      i.forEach((f, d) => {
        if (f && f.offsetParent) {
          const {
            offsetHeight: h
          } = f;
          a.get(d) !== h && (o.value = Symbol("update"), a.set(d, f.offsetHeight));
        }
      });
    });
  }
  function c(f, d) {
    const h = e(f);
    i.get(h), d ? (i.set(h, d.$el || d), u()) : i.delete(h);
  }
  return qu(() => {
    l();
  }), [c, u, a, o];
}
function n8e(t, e, n, r, i, a, o, s) {
  let l;
  return (u) => {
    if (u == null) {
      s();
      return;
    }
    en.cancel(l);
    const c = e.value, f = r.itemHeight;
    if (typeof u == "number")
      o(u);
    else if (u && typeof u == "object") {
      let d;
      const {
        align: h
      } = u;
      "index" in u ? {
        index: d
      } = u : d = c.findIndex((g) => i(g) === u.key);
      const {
        offset: p = 0
      } = u, v = (g, m) => {
        if (g < 0 || !t.value) return;
        const y = t.value.clientHeight;
        let _ = !1, O = m;
        if (y) {
          const S = m || h;
          let x = 0, C = 0, P = 0;
          const $ = Math.min(c.length, d);
          for (let M = 0; M <= $; M += 1) {
            const R = i(c[M]);
            C = x;
            const N = n.get(R);
            P = C + (N === void 0 ? f : N), x = P, M === d && N === void 0 && (_ = !0);
          }
          const T = t.value.scrollTop;
          let E = null;
          switch (S) {
            case "top":
              E = C - p;
              break;
            case "bottom":
              E = P - y + p;
              break;
            default: {
              const M = T + y;
              C < T ? O = "top" : P > M && (O = "bottom");
            }
          }
          E !== null && E !== T && o(E);
        }
        l = en(() => {
          _ && a(), v(g - 1, O);
        }, 2);
      };
      v(5);
    }
  };
}
const r8e = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent), iie = (t, e) => {
  let n = !1, r = null;
  function i() {
    clearTimeout(r), n = !0, r = setTimeout(() => {
      n = !1;
    }, 50);
  }
  return function(a) {
    let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
    const s = (
      // Pass origin wheel when on the top
      a < 0 && t.value || // Pass origin wheel when on the bottom
      a > 0 && e.value
    );
    return o && s ? (clearTimeout(r), n = !1) : (!s || n) && i(), !n && s;
  };
};
function i8e(t, e, n, r) {
  let i = 0, a = null, o = null, s = !1;
  const l = iie(e, n);
  function u(f) {
    if (!t.value) return;
    en.cancel(a);
    const {
      deltaY: d
    } = f;
    i += d, o = d, !l(d) && (r8e || f.preventDefault(), a = en(() => {
      r(i * (s ? 10 : 1)), i = 0;
    }));
  }
  function c(f) {
    t.value && (s = f.detail === o);
  }
  return [u, c];
}
const a8e = 14 / 15;
function o8e(t, e, n) {
  let r = !1, i = 0, a = null, o = null;
  const s = () => {
    a && (a.removeEventListener("touchmove", l), a.removeEventListener("touchend", u));
  }, l = (d) => {
    if (r) {
      const h = Math.ceil(d.touches[0].pageY);
      let p = i - h;
      i = h, n(p) && d.preventDefault(), clearInterval(o), o = setInterval(() => {
        p *= a8e, (!n(p, !0) || Math.abs(p) <= 0.1) && clearInterval(o);
      }, 16);
    }
  }, u = () => {
    r = !1, s();
  }, c = (d) => {
    s(), d.touches.length === 1 && !r && (r = !0, i = Math.ceil(d.touches[0].pageY), a = d.target, a.addEventListener("touchmove", l, {
      passive: !1
    }), a.addEventListener("touchend", u));
  }, f = () => {
  };
  _t(() => {
    document.addEventListener("touchmove", f, {
      passive: !1
    }), me(t, (d) => {
      e.value.removeEventListener("touchstart", c), s(), clearInterval(o), d && e.value.addEventListener("touchstart", c, {
        passive: !1
      });
    }, {
      immediate: !0
    });
  }), Qt(() => {
    document.removeEventListener("touchmove", f);
  });
}
var s8e = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const l8e = [], u8e = {
  overflowY: "auto",
  overflowAnchor: "none"
};
function c8e(t, e, n, r, i, a) {
  let {
    getKey: o
  } = a;
  return t.slice(e, n + 1).map((s, l) => {
    const u = e + l, c = i(s, u, {
      // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
    }), f = o(s);
    return D(rie, {
      key: f,
      setRef: (d) => r(s, d)
    }, {
      default: () => [c]
    });
  });
}
const f8e = ae({
  compatConfig: {
    MODE: 3
  },
  name: "List",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    data: oe.array,
    height: Number,
    itemHeight: Number,
    /** If not match virtual scroll condition, Set List still use height of container. */
    fullHeight: {
      type: Boolean,
      default: void 0
    },
    itemKey: {
      type: [String, Number, Function],
      required: !0
    },
    component: {
      type: [String, Object]
    },
    /** Set `false` will always use real scroll instead of virtual one */
    virtual: {
      type: Boolean,
      default: void 0
    },
    children: Function,
    onScroll: Function,
    onMousedown: Function,
    onMouseenter: Function,
    onVisibleChange: Function
  },
  setup(t, e) {
    let {
      expose: n
    } = e;
    const r = V(() => {
      const {
        height: H,
        itemHeight: U,
        virtual: j
      } = t;
      return !!(j !== !1 && H && U);
    }), i = V(() => {
      const {
        height: H,
        itemHeight: U,
        data: j
      } = t;
      return r.value && j && U * j.length > H;
    }), a = zn({
      scrollTop: 0,
      scrollMoving: !1
    }), o = V(() => t.data || l8e), s = ve([]);
    me(o, () => {
      s.value = es(o.value).slice();
    }, {
      immediate: !0
    });
    const l = ve((H) => {
    });
    me(() => t.itemKey, (H) => {
      typeof H == "function" ? l.value = H : l.value = (U) => U == null ? void 0 : U[H];
    }, {
      immediate: !0
    });
    const u = ve(), c = ve(), f = ve(), d = (H) => l.value(H), h = {
      getKey: d
    };
    function p(H) {
      let U;
      typeof H == "function" ? U = H(a.scrollTop) : U = H;
      const j = x(U);
      u.value && (u.value.scrollTop = j), a.scrollTop = j;
    }
    const [v, g, m, y] = t8e(s, d), _ = zn({
      scrollHeight: void 0,
      start: 0,
      end: 0,
      offset: void 0
    }), O = ve(0);
    _t(() => {
      Bt(() => {
        var H;
        O.value = ((H = c.value) === null || H === void 0 ? void 0 : H.offsetHeight) || 0;
      });
    }), rp(() => {
      Bt(() => {
        var H;
        O.value = ((H = c.value) === null || H === void 0 ? void 0 : H.offsetHeight) || 0;
      });
    }), me([r, s], () => {
      r.value || k(_, {
        scrollHeight: void 0,
        start: 0,
        end: s.value.length - 1,
        offset: void 0
      });
    }, {
      immediate: !0
    }), me([r, s, O, i], () => {
      r.value && !i.value && k(_, {
        scrollHeight: O.value,
        start: 0,
        end: s.value.length - 1,
        offset: void 0
      }), u.value && (a.scrollTop = u.value.scrollTop);
    }, {
      immediate: !0
    }), me([i, r, () => a.scrollTop, s, y, () => t.height, O], () => {
      if (!r.value || !i.value)
        return;
      let H = 0, U, j, Y;
      const ne = s.value.length, fe = s.value, ue = a.scrollTop, {
        itemHeight: ye,
        height: se
      } = t, he = ue + se;
      for (let re = 0; re < ne; re += 1) {
        const q = fe[re], K = d(q);
        let de = m.get(K);
        de === void 0 && (de = ye);
        const xe = H + de;
        U === void 0 && xe >= ue && (U = re, j = H), Y === void 0 && xe > he && (Y = re), H = xe;
      }
      U === void 0 && (U = 0, j = 0, Y = Math.ceil(se / ye)), Y === void 0 && (Y = ne - 1), Y = Math.min(Y + 1, ne), k(_, {
        scrollHeight: H,
        start: U,
        end: Y,
        offset: j
      });
    }, {
      immediate: !0
    });
    const S = V(() => _.scrollHeight - t.height);
    function x(H) {
      let U = H;
      return Number.isNaN(S.value) || (U = Math.min(U, S.value)), U = Math.max(U, 0), U;
    }
    const C = V(() => a.scrollTop <= 0), P = V(() => a.scrollTop >= S.value), $ = iie(C, P);
    function T(H) {
      p(H);
    }
    function E(H) {
      var U;
      const {
        scrollTop: j
      } = H.currentTarget;
      j !== a.scrollTop && p(j), (U = t.onScroll) === null || U === void 0 || U.call(t, H);
    }
    const [M, R] = i8e(r, C, P, (H) => {
      p((U) => U + H);
    });
    o8e(r, u, (H, U) => $(H, U) ? !1 : (M({
      preventDefault() {
      },
      deltaY: H
    }), !0));
    function N(H) {
      r.value && H.preventDefault();
    }
    const I = () => {
      u.value && (u.value.removeEventListener("wheel", M, mi ? {
        passive: !1
      } : !1), u.value.removeEventListener("DOMMouseScroll", R), u.value.removeEventListener("MozMousePixelScroll", N));
    };
    Vt(() => {
      Bt(() => {
        u.value && (I(), u.value.addEventListener("wheel", M, mi ? {
          passive: !1
        } : !1), u.value.addEventListener("DOMMouseScroll", R), u.value.addEventListener("MozMousePixelScroll", N));
      });
    }), Qt(() => {
      I();
    });
    const B = n8e(u, s, m, t, d, g, p, () => {
      var H;
      (H = f.value) === null || H === void 0 || H.delayHidden();
    });
    n({
      scrollTo: B
    });
    const Q = V(() => {
      let H = null;
      return t.height && (H = k({
        [t.fullHeight ? "height" : "maxHeight"]: t.height + "px"
      }, u8e), r.value && (H.overflowY = "hidden", a.scrollMoving && (H.pointerEvents = "none"))), H;
    });
    return me([() => _.start, () => _.end, s], () => {
      if (t.onVisibleChange) {
        const H = s.value.slice(_.start, _.end + 1);
        t.onVisibleChange(H, s.value);
      }
    }, {
      flush: "post"
    }), {
      state: a,
      mergedData: s,
      componentStyle: Q,
      onFallbackScroll: E,
      onScrollBar: T,
      componentRef: u,
      useVirtual: r,
      calRes: _,
      collectHeight: g,
      setInstance: v,
      sharedConfig: h,
      scrollBarRef: f,
      fillerInnerRef: c,
      delayHideScrollBar: () => {
        var H;
        (H = f.value) === null || H === void 0 || H.delayHidden();
      }
    };
  },
  render() {
    const t = k(k({}, this.$props), this.$attrs), {
      prefixCls: e = "rc-virtual-list",
      height: n,
      itemHeight: r,
      // eslint-disable-next-line no-unused-vars
      fullHeight: i,
      data: a,
      itemKey: o,
      virtual: s,
      component: l = "div",
      onScroll: u,
      children: c = this.$slots.default,
      style: f,
      class: d
    } = t, h = s8e(t, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), p = Re(e, d), {
      scrollTop: v
    } = this.state, {
      scrollHeight: g,
      offset: m,
      start: y,
      end: _
    } = this.calRes, {
      componentStyle: O,
      onFallbackScroll: S,
      onScrollBar: x,
      useVirtual: C,
      collectHeight: P,
      sharedConfig: $,
      setInstance: T,
      mergedData: E,
      delayHideScrollBar: M
    } = this;
    return D("div", te({
      style: k(k({}, f), {
        position: "relative"
      }),
      class: p
    }, h), [D(l, {
      class: `${e}-holder`,
      style: O,
      ref: "componentRef",
      onScroll: S,
      onMouseenter: M
    }, {
      default: () => [D(I2, {
        prefixCls: e,
        height: g,
        offset: m,
        onInnerResize: P,
        ref: "fillerInnerRef"
      }, {
        default: () => c8e(E, y, _, T, c, $)
      })]
    }), C && D(e8e, {
      ref: "scrollBarRef",
      prefixCls: e,
      scrollTop: v,
      height: n,
      scrollHeight: g,
      count: E.length,
      onScroll: x,
      onStartMove: () => {
        this.state.scrollMoving = !0;
      },
      onStopMove: () => {
        this.state.scrollMoving = !1;
      }
    }, null)]);
  }
});
function d8e(t, e, n) {
  const r = ee(t());
  return me(e, (i, a) => {
    n ? n(i, a) && (r.value = t()) : r.value = t();
  }), r;
}
function h8e() {
  return /(mac\sos|macintosh)/i.test(navigator.appVersion);
}
const aie = Symbol("SelectContextKey");
function p8e(t) {
  return Et(aie, t);
}
function v8e() {
  return et(aie, {});
}
var g8e = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
function Q7(t) {
  return typeof t == "string" || typeof t == "number";
}
const m8e = ae({
  compatConfig: {
    MODE: 3
  },
  name: "OptionList",
  inheritAttrs: !1,
  setup(t, e) {
    let {
      expose: n,
      slots: r
    } = e;
    const i = ZNe(), a = v8e(), o = V(() => `${i.prefixCls}-item`), s = d8e(() => a.flattenOptions, [() => i.open, () => a.flattenOptions], (S) => S[0]), l = kb(), u = (S) => {
      S.preventDefault();
    }, c = (S) => {
      l.current && l.current.scrollTo(typeof S == "number" ? {
        index: S
      } : S);
    }, f = function(S) {
      let x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
      const C = s.value.length;
      for (let P = 0; P < C; P += 1) {
        const $ = (S + P * x + C) % C, {
          group: T,
          data: E
        } = s.value[$];
        if (!T && !E.disabled)
          return $;
      }
      return -1;
    }, d = zn({
      activeIndex: f(0)
    }), h = function(S) {
      let x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      d.activeIndex = S;
      const C = {
        source: x ? "keyboard" : "mouse"
      }, P = s.value[S];
      if (!P) {
        a.onActiveValue(null, -1, C);
        return;
      }
      a.onActiveValue(P.value, S, C);
    };
    me([() => s.value.length, () => i.searchValue], () => {
      h(a.defaultActiveFirstOption !== !1 ? f(0) : -1);
    }, {
      immediate: !0
    });
    const p = (S) => a.rawValues.has(S) && i.mode !== "combobox";
    me([() => i.open, () => i.searchValue], () => {
      if (!i.multiple && i.open && a.rawValues.size === 1) {
        const S = Array.from(a.rawValues)[0], x = es(s.value).findIndex((C) => {
          let {
            data: P
          } = C;
          return P[a.fieldNames.value] === S;
        });
        x !== -1 && (h(x), Bt(() => {
          c(x);
        }));
      }
      i.open && Bt(() => {
        var S;
        (S = l.current) === null || S === void 0 || S.scrollTo(void 0);
      });
    }, {
      immediate: !0,
      flush: "post"
    });
    const v = (S) => {
      S !== void 0 && a.onSelect(S, {
        selected: !a.rawValues.has(S)
      }), i.multiple || i.toggleOpen(!1);
    }, g = (S) => typeof S.label == "function" ? S.label() : S.label;
    function m(S) {
      const x = s.value[S];
      if (!x) return null;
      const C = x.data || {}, {
        value: P
      } = C, {
        group: $
      } = x, T = M2(C, !0), E = g(x);
      return x ? D("div", te(te({
        "aria-label": typeof E == "string" && !$ ? E : null
      }, T), {}, {
        key: S,
        role: $ ? "presentation" : "option",
        id: `${i.id}_list_${S}`,
        "aria-selected": p(P)
      }), [P]) : null;
    }
    return n({
      onKeydown: (S) => {
        const {
          which: x,
          ctrlKey: C
        } = S;
        switch (x) {
          case Me.N:
          case Me.P:
          case Me.UP:
          case Me.DOWN: {
            let P = 0;
            if (x === Me.UP ? P = -1 : x === Me.DOWN ? P = 1 : h8e() && C && (x === Me.N ? P = 1 : x === Me.P && (P = -1)), P !== 0) {
              const $ = f(d.activeIndex + P, P);
              c($), h($, !0);
            }
            break;
          }
          case Me.ENTER: {
            const P = s.value[d.activeIndex];
            P && !P.data.disabled ? v(P.value) : v(void 0), i.open && S.preventDefault();
            break;
          }
          case Me.ESC:
            i.toggleOpen(!1), i.open && S.stopPropagation();
        }
      },
      onKeyup: () => {
      },
      scrollTo: (S) => {
        c(S);
      }
    }), () => {
      const {
        id: S,
        notFoundContent: x,
        onPopupScroll: C
      } = i, {
        menuItemSelectedIcon: P,
        fieldNames: $,
        virtual: T,
        listHeight: E,
        listItemHeight: M
      } = a, R = r.option, {
        activeIndex: N
      } = d, I = Object.keys($).map((B) => $[B]);
      return s.value.length === 0 ? D("div", {
        role: "listbox",
        id: `${S}_list`,
        class: `${o.value}-empty`,
        onMousedown: u
      }, [x]) : D(Wt, null, [D("div", {
        role: "listbox",
        id: `${S}_list`,
        style: {
          height: 0,
          width: 0,
          overflow: "hidden"
        }
      }, [m(N - 1), m(N), m(N + 1)]), D(f8e, {
        itemKey: "key",
        ref: l,
        data: s.value,
        height: E,
        itemHeight: M,
        fullHeight: !1,
        onMousedown: u,
        onScroll: C,
        virtual: T
      }, {
        default: (B, Q) => {
          var W;
          const {
            group: H,
            groupOption: U,
            data: j,
            value: Y
          } = B, {
            key: ne
          } = j, fe = typeof B.label == "function" ? B.label() : B.label;
          if (H) {
            const Fe = (W = j.title) !== null && W !== void 0 ? W : Q7(fe) && fe;
            return D("div", {
              class: Re(o.value, `${o.value}-group`),
              title: Fe
            }, [R ? R(j) : fe !== void 0 ? fe : ne]);
          }
          const {
            disabled: ue,
            title: ye,
            children: se,
            style: he,
            class: re,
            className: q
          } = j, K = g8e(j, ["disabled", "title", "children", "style", "class", "className"]), de = si(K, I), xe = p(Y), we = `${o.value}-option`, He = Re(o.value, we, re, q, {
            [`${we}-grouped`]: U,
            [`${we}-active`]: N === Q && !ue,
            [`${we}-disabled`]: ue,
            [`${we}-selected`]: xe
          }), je = g(B), Be = !P || typeof P == "function" || xe, Le = typeof je == "number" ? je : je || Y;
          let Pe = Q7(Le) ? Le.toString() : void 0;
          return ye !== void 0 && (Pe = ye), D("div", te(te({}, de), {}, {
            "aria-selected": xe,
            class: He,
            title: Pe,
            onMousemove: (Fe) => {
              K.onMousemove && K.onMousemove(Fe), !(N === Q || ue) && h(Q);
            },
            onClick: (Fe) => {
              ue || v(Y), K.onClick && K.onClick(Fe);
            },
            style: he
          }), [D("div", {
            class: `${we}-content`
          }, [R ? R(j) : Le]), po(P) || xe, Be && D(Vh, {
            class: `${o.value}-option-state`,
            customizeIcon: P,
            customizeIconProps: {
              isSelected: xe
            }
          }, {
            default: () => [xe ? "✓" : null]
          })]);
        }
      })]);
    };
  }
});
var y8e = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
function b8e(t) {
  const e = t, {
    key: n,
    children: r
  } = e, i = e.props, {
    value: a,
    disabled: o
  } = i, s = y8e(i, ["value", "disabled"]), l = r == null ? void 0 : r.default;
  return k({
    key: n,
    value: a !== void 0 ? a : n,
    children: l,
    disabled: o || o === ""
  }, s);
}
function o8(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  return qr(t).map((r, i) => {
    var a;
    if (!po(r) || !r.type)
      return null;
    const {
      type: {
        isSelectOptGroup: o
      },
      key: s,
      children: l,
      props: u
    } = r;
    if (e || !o)
      return b8e(r);
    const c = l && l.default ? l.default() : void 0, f = (u == null ? void 0 : u.label) || ((a = l.label) === null || a === void 0 ? void 0 : a.call(l)) || s;
    return k(k({
      key: `__RC_SELECT_GRP__${s === null ? i : String(s)}__`
    }, u), {
      label: f,
      options: o8(c || [])
    });
  }).filter((r) => r);
}
function _8e(t, e, n) {
  const r = ve(), i = ve(), a = ve(), o = ve([]);
  return me([t, e], () => {
    t.value ? o.value = es(t.value).slice() : o.value = o8(e.value);
  }, {
    immediate: !0,
    deep: !0
  }), Vt(() => {
    const s = o.value, l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), c = n.value;
    function f(d) {
      let h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      for (let p = 0; p < d.length; p += 1) {
        const v = d[p];
        !v[c.options] || h ? (l.set(v[c.value], v), u.set(v[c.label], v)) : f(v[c.options], !0);
      }
    }
    f(s), r.value = s, i.value = l, a.value = u;
  }), {
    options: r,
    valueOptions: i,
    labelOptions: a
  };
}
let H7 = 0;
const O8e = process.env.NODE_ENV !== "test" && is();
function S8e() {
  let t;
  return O8e ? (t = H7, H7 += 1) : t = "TEST_OR_SSR", t;
}
function x8e() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ee("");
  const e = `rc_select_${S8e()}`;
  return t.value || e;
}
function s8(t) {
  return Array.isArray(t) ? t : t !== void 0 ? [t] : [];
}
const w8e = typeof window < "u" && window.document && window.document.documentElement;
process.env.NODE_ENV;
function C8e(t) {
  const {
    mode: e,
    options: n,
    children: r,
    backfill: i,
    allowClear: a,
    placeholder: o,
    getInputElement: s,
    showSearch: l,
    onSearch: u,
    defaultOpen: c,
    autofocus: f,
    labelInValue: d,
    value: h,
    inputValue: p,
    optionLabelProp: v
  } = t, g = a8(e), m = l !== void 0 ? l : g || e === "combobox", y = n || o8(r);
  if (Lo(e !== "tags" || y.every((_) => !_.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), Lo(e !== "combobox" || !v, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), Lo(e === "combobox" || !i, "`backfill` only works with `combobox` mode."), Lo(e === "combobox" || !s, "`getInputElement` only work with `combobox` mode."), qW(e !== "combobox" || !s || !a || !o, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), u && !m && e !== "combobox" && e !== "tags" && Lo(!1, "`onSearch` should work with `showSearch` instead of use alone."), qW(!c || f, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autofocus` if needed."), h != null) {
    const _ = s8(h);
    Lo(!d || _.every((O) => typeof O == "object" && ("key" in O || "value" in O)), "`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"), Lo(!g || Array.isArray(h), "`value` should be array when `mode` is `multiple` or `tags`");
  }
  if (r) {
    let _ = null;
    r.some((O) => {
      var S;
      if (!po(O) || !O.type)
        return !1;
      const {
        type: x
      } = O;
      return x.isSelectOption ? !1 : x.isSelectOptGroup ? !(((S = O.children) === null || S === void 0 ? void 0 : S.default()) || []).every(($) => !po($) || !O.type || $.type.isSelectOption ? !0 : (_ = $.type, !1)) : (_ = x, !0);
    }), _ && Lo(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${_.displayName || _.name || _}\`.`), Lo(p === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
  }
}
function sE(t, e) {
  return s8(t).join("").toUpperCase().includes(e);
}
const T8e = (t, e, n, r, i) => V(() => {
  const a = n.value, o = i == null ? void 0 : i.value, s = r == null ? void 0 : r.value;
  if (!a || s === !1)
    return t.value;
  const {
    options: l,
    label: u,
    value: c
  } = e.value, f = [], d = typeof s == "function", h = a.toUpperCase(), p = d ? s : (g, m) => o ? sE(m[o], h) : m[l] ? sE(m[u !== "children" ? u : "label"], h) : sE(m[c], h), v = d ? (g) => SR(g) : (g) => g;
  return t.value.forEach((g) => {
    if (g[l]) {
      if (p(a, v(g)))
        f.push(g);
      else {
        const y = g[l].filter((_) => p(a, v(_)));
        y.length && f.push(k(k({}, g), {
          [l]: y
        }));
      }
      return;
    }
    p(a, v(g)) && f.push(g);
  }), f;
}), P8e = (t, e) => {
  const n = ve({
    values: /* @__PURE__ */ new Map(),
    options: /* @__PURE__ */ new Map()
  });
  return [V(() => {
    const {
      values: a,
      options: o
    } = n.value, s = t.value.map((c) => {
      var f;
      return c.label === void 0 ? k(k({}, c), {
        label: (f = a.get(c.value)) === null || f === void 0 ? void 0 : f.label
      }) : c;
    }), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
    return s.forEach((c) => {
      l.set(c.value, c), u.set(c.value, e.value.get(c.value) || o.get(c.value));
    }), n.value.values = l, n.value.options = u, s;
  }), (a) => e.value.get(a) || n.value.options.get(a)];
};
function Rg(t, e) {
  const {
    defaultValue: n,
    value: r = ee()
  } = e || {};
  let i = typeof t == "function" ? t() : t;
  r.value !== void 0 && (i = z(r)), n !== void 0 && (i = typeof n == "function" ? n() : n);
  const a = ee(i), o = ee(i);
  Vt(() => {
    let l = r.value !== void 0 ? r.value : a.value;
    e.postState && (l = e.postState(l)), o.value = l;
  });
  function s(l) {
    const u = o.value;
    a.value = l, es(o.value) !== l && e.onChange && e.onChange(l, u);
  }
  return me(r, () => {
    a.value = r.value;
  }), [o, s];
}
function tr(t) {
  const e = typeof t == "function" ? t() : t, n = ee(e);
  function r(i) {
    n.value = i;
  }
  return [n, r];
}
const $8e = ["inputValue"];
function oie() {
  return k(k({}, nie()), {
    prefixCls: String,
    id: String,
    backfill: {
      type: Boolean,
      default: void 0
    },
    // >>> Field Names
    fieldNames: Object,
    // >>> Search
    /** @deprecated Use `searchValue` instead */
    inputValue: String,
    searchValue: String,
    onSearch: Function,
    autoClearSearchValue: {
      type: Boolean,
      default: void 0
    },
    // >>> Select
    onSelect: Function,
    onDeselect: Function,
    // >>> Options
    /**
     * In Select, `false` means do nothing.
     * In TreeSelect, `false` will highlight match item.
     * It's by design.
     */
    filterOption: {
      type: [Boolean, Function],
      default: void 0
    },
    filterSort: Function,
    optionFilterProp: String,
    optionLabelProp: String,
    options: Array,
    defaultActiveFirstOption: {
      type: Boolean,
      default: void 0
    },
    virtual: {
      type: Boolean,
      default: void 0
    },
    listHeight: Number,
    listItemHeight: Number,
    // >>> Icon
    menuItemSelectedIcon: oe.any,
    mode: String,
    labelInValue: {
      type: Boolean,
      default: void 0
    },
    value: oe.any,
    defaultValue: oe.any,
    onChange: Function,
    children: Array
  });
}
function A8e(t) {
  return !t || typeof t != "object";
}
const E8e = ae({
  compatConfig: {
    MODE: 3
  },
  name: "VcSelect",
  inheritAttrs: !1,
  props: li(oie(), {
    prefixCls: "vc-select",
    autoClearSearchValue: !0,
    listHeight: 200,
    listItemHeight: 20,
    dropdownMatchSelectWidth: !0
  }),
  setup(t, e) {
    let {
      expose: n,
      attrs: r,
      slots: i
    } = e;
    const a = x8e(Lr(t, "id")), o = V(() => a8(t.mode)), s = V(() => !!(!t.options && t.children)), l = V(() => t.filterOption === void 0 && t.mode === "combobox" ? !1 : t.filterOption), u = V(() => Dre(t.fieldNames, s.value)), [c, f] = Rg("", {
      value: V(() => t.searchValue !== void 0 ? t.searchValue : t.inputValue),
      postState: (re) => re || ""
    }), d = _8e(Lr(t, "options"), Lr(t, "children"), u), {
      valueOptions: h,
      labelOptions: p,
      options: v
    } = d, g = (re) => s8(re).map((K) => {
      var de, xe;
      let we, He, je, Be;
      A8e(K) ? we = K : (je = K.key, He = K.label, we = (de = K.value) !== null && de !== void 0 ? de : je);
      const Le = h.value.get(we);
      return Le && (He === void 0 && (He = Le == null ? void 0 : Le[t.optionLabelProp || u.value.label]), je === void 0 && (je = (xe = Le == null ? void 0 : Le.key) !== null && xe !== void 0 ? xe : we), Be = Le == null ? void 0 : Le.disabled), {
        label: He,
        value: we,
        key: je,
        disabled: Be,
        option: Le
      };
    }), [m, y] = Rg(t.defaultValue, {
      value: Lr(t, "value")
    }), _ = V(() => {
      var re;
      const q = g(m.value);
      return t.mode === "combobox" && !(!((re = q[0]) === null || re === void 0) && re.value) ? [] : q;
    }), [O, S] = P8e(_, h), x = V(() => {
      if (!t.mode && O.value.length === 1) {
        const re = O.value[0];
        if (re.value === null && (re.label === null || re.label === void 0))
          return [];
      }
      return O.value.map((re) => {
        var q;
        return k(k({}, re), {
          label: (q = typeof re.label == "function" ? re.label() : re.label) !== null && q !== void 0 ? q : re.value
        });
      });
    }), C = V(() => new Set(O.value.map((re) => re.value)));
    Vt(() => {
      var re;
      if (t.mode === "combobox") {
        const q = (re = O.value[0]) === null || re === void 0 ? void 0 : re.value;
        q != null && f(String(q));
      }
    }, {
      flush: "post"
    });
    const P = (re, q) => {
      const K = q ?? re;
      return {
        [u.value.value]: re,
        [u.value.label]: K
      };
    }, $ = ve();
    Vt(() => {
      if (t.mode !== "tags") {
        $.value = v.value;
        return;
      }
      const re = v.value.slice(), q = (K) => h.value.has(K);
      [...O.value].sort((K, de) => K.value < de.value ? -1 : 1).forEach((K) => {
        const de = K.value;
        q(de) || re.push(P(de, K.label));
      }), $.value = re;
    });
    const T = T8e($, u, c, l, Lr(t, "optionFilterProp")), E = V(() => t.mode !== "tags" || !c.value || T.value.some((re) => re[t.optionFilterProp || "value"] === c.value) ? T.value : [P(c.value), ...T.value]), M = V(() => t.filterSort ? [...E.value].sort((re, q) => t.filterSort(re, q)) : E.value), R = V(() => y4e(M.value, {
      fieldNames: u.value,
      childrenAsData: s.value
    })), N = (re) => {
      const q = g(re);
      if (y(q), t.onChange && // Trigger event only when value changed
      (q.length !== O.value.length || q.some((K, de) => {
        var xe;
        return ((xe = O.value[de]) === null || xe === void 0 ? void 0 : xe.value) !== (K == null ? void 0 : K.value);
      }))) {
        const K = t.labelInValue ? q.map((xe) => k(k({}, xe), {
          originLabel: xe.label,
          label: typeof xe.label == "function" ? xe.label() : xe.label
        })) : q.map((xe) => xe.value), de = q.map((xe) => SR(S(xe.value)));
        t.onChange(
          // Value
          o.value ? K : K[0],
          // Option
          o.value ? de : de[0]
        );
      }
    }, [I, B] = tr(null), [Q, W] = tr(0), H = V(() => t.defaultActiveFirstOption !== void 0 ? t.defaultActiveFirstOption : t.mode !== "combobox"), U = function(re, q) {
      let {
        source: K = "keyboard"
      } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      W(q), t.backfill && t.mode === "combobox" && re !== null && K === "keyboard" && B(String(re));
    }, j = (re, q) => {
      const K = () => {
        var de;
        const xe = S(re), we = xe == null ? void 0 : xe[u.value.label];
        return [t.labelInValue ? {
          label: typeof we == "function" ? we() : we,
          originLabel: we,
          value: re,
          key: (de = xe == null ? void 0 : xe.key) !== null && de !== void 0 ? de : re
        } : re, SR(xe)];
      };
      if (q && t.onSelect) {
        const [de, xe] = K();
        t.onSelect(de, xe);
      } else if (!q && t.onDeselect) {
        const [de, xe] = K();
        t.onDeselect(de, xe);
      }
    }, Y = (re, q) => {
      let K;
      const de = o.value ? q.selected : !0;
      de ? K = o.value ? [...O.value, re] : [re] : K = O.value.filter((xe) => xe.value !== re), N(K), j(re, de), t.mode === "combobox" ? B("") : (!o.value || t.autoClearSearchValue) && (f(""), B(""));
    }, ne = (re, q) => {
      N(re), (q.type === "remove" || q.type === "clear") && q.values.forEach((K) => {
        j(K.value, !1);
      });
    }, fe = (re, q) => {
      var K;
      if (f(re), B(null), q.source === "submit") {
        const de = (re || "").trim();
        if (de) {
          const xe = Array.from(/* @__PURE__ */ new Set([...C.value, de]));
          N(xe), j(de, !0), f("");
        }
        return;
      }
      q.source !== "blur" && (t.mode === "combobox" && N(re), (K = t.onSearch) === null || K === void 0 || K.call(t, re));
    }, ue = (re) => {
      let q = re;
      t.mode !== "tags" && (q = re.map((de) => {
        const xe = p.value.get(de);
        return xe == null ? void 0 : xe.value;
      }).filter((de) => de !== void 0));
      const K = Array.from(/* @__PURE__ */ new Set([...C.value, ...q]));
      N(K), K.forEach((de) => {
        j(de, !0);
      });
    }, ye = V(() => t.virtual !== !1 && t.dropdownMatchSelectWidth !== !1);
    p8e(tie(k(k({}, d), {
      flattenOptions: R,
      onActiveValue: U,
      defaultActiveFirstOption: H,
      onSelect: Y,
      menuItemSelectedIcon: Lr(t, "menuItemSelectedIcon"),
      rawValues: C,
      fieldNames: u,
      virtual: ye,
      listHeight: Lr(t, "listHeight"),
      listItemHeight: Lr(t, "listItemHeight"),
      childrenAsData: s
    }))), process.env.NODE_ENV !== "production" && Vt(() => {
      C8e(t);
    }, {
      flush: "post"
    });
    const se = ee();
    n({
      focus() {
        var re;
        (re = se.value) === null || re === void 0 || re.focus();
      },
      blur() {
        var re;
        (re = se.value) === null || re === void 0 || re.blur();
      },
      scrollTo(re) {
        var q;
        (q = se.value) === null || q === void 0 || q.scrollTo(re);
      }
    });
    const he = V(() => si(t, [
      "id",
      "mode",
      "prefixCls",
      "backfill",
      "fieldNames",
      // Search
      "inputValue",
      "searchValue",
      "onSearch",
      "autoClearSearchValue",
      // Select
      "onSelect",
      "onDeselect",
      "dropdownMatchSelectWidth",
      // Options
      "filterOption",
      "filterSort",
      "optionFilterProp",
      "optionLabelProp",
      "options",
      "children",
      "defaultActiveFirstOption",
      "menuItemSelectedIcon",
      "virtual",
      "listHeight",
      "listItemHeight",
      // Value
      "value",
      "defaultValue",
      "labelInValue",
      "onChange"
    ]));
    return () => D(KNe, te(te(te({}, he.value), r), {}, {
      id: a,
      prefixCls: t.prefixCls,
      ref: se,
      omitDomProps: $8e,
      mode: t.mode,
      displayValues: x.value,
      onDisplayValuesChange: ne,
      searchValue: c.value,
      onSearch: fe,
      onSearchSplit: ue,
      dropdownMatchSelectWidth: t.dropdownMatchSelectWidth,
      OptionList: m8e,
      emptyOptions: !R.value.length,
      activeValue: I.value,
      activeDescendantId: `${a}_list_${Q.value}`
    }), i);
  }
}), l8 = () => null;
l8.isSelectOption = !0;
l8.displayName = "ASelectOption";
const u8 = () => null;
u8.isSelectOptGroup = !0;
u8.displayName = "ASelectOptGroup";
var M8e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, name: "down", theme: "outlined" }, I8e = Symbol("iconContext"), sie = function() {
  return et(I8e, {
    prefixCls: ee("anticon"),
    rootClassName: ee(""),
    csp: ee()
  });
};
function c8() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function D8e(t, e) {
  return t && t.contains ? t.contains(e) : !1;
}
var G7 = "data-vc-order", R8e = "vc-icon-key", $R = /* @__PURE__ */ new Map();
function lie() {
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.mark;
  return e ? e.startsWith("data-") ? e : "data-".concat(e) : R8e;
}
function f8(t) {
  if (t.attachTo)
    return t.attachTo;
  var e = document.querySelector("head");
  return e || document.body;
}
function k8e(t) {
  return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
}
function uie(t) {
  return Array.from(($R.get(t) || t).children).filter(function(e) {
    return e.tagName === "STYLE";
  });
}
function cie(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  if (!c8())
    return null;
  var n = e.csp, r = e.prepend, i = document.createElement("style");
  i.setAttribute(G7, k8e(r)), n && n.nonce && (i.nonce = n.nonce), i.innerHTML = t;
  var a = f8(e), o = a.firstChild;
  if (r) {
    if (r === "queue") {
      var s = uie(a).filter(function(l) {
        return ["prepend", "prependQueue"].includes(l.getAttribute(G7));
      });
      if (s.length)
        return a.insertBefore(i, s[s.length - 1].nextSibling), i;
    }
    a.insertBefore(i, o);
  } else
    a.appendChild(i);
  return i;
}
function L8e(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = f8(e);
  return uie(n).find(function(r) {
    return r.getAttribute(lie(e)) === t;
  });
}
function N8e(t, e) {
  var n = $R.get(t);
  if (!n || !D8e(document, n)) {
    var r = cie("", e), i = r.parentNode;
    $R.set(t, i), t.removeChild(r);
  }
}
function B8e(t, e) {
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = f8(n);
  N8e(r, n);
  var i = L8e(e, n);
  if (i)
    return n.csp && n.csp.nonce && i.nonce !== n.csp.nonce && (i.nonce = n.csp.nonce), i.innerHTML !== t && (i.innerHTML = t), i;
  var a = cie(t, n);
  return a.setAttribute(lie(n), e), a;
}
function j7(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      z8e(t, i, n[i]);
    });
  }
  return t;
}
function z8e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
function V8e(t, e) {
  process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.error("Warning: ".concat(e));
}
function F8e(t, e) {
  V8e(t, "[@ant-design/icons-vue] ".concat(e));
}
function Z7(t) {
  return typeof t == "object" && typeof t.name == "string" && typeof t.theme == "string" && (typeof t.icon == "object" || typeof t.icon == "function");
}
function AR(t, e, n) {
  return n ? ff(t.tag, j7({
    key: e
  }, n, t.attrs), (t.children || []).map(function(r, i) {
    return AR(r, "".concat(e, "-").concat(t.tag, "-").concat(i));
  })) : ff(t.tag, j7({
    key: e
  }, t.attrs), (t.children || []).map(function(r, i) {
    return AR(r, "".concat(e, "-").concat(t.tag, "-").concat(i));
  }));
}
function fie(t) {
  return Bh(t)[0];
}
function die(t) {
  return t ? Array.isArray(t) ? t : [t] : [];
}
var W8e = `
.anticon {
  display: inline-block;
  color: inherit;
  font-style: normal;
  line-height: 0;
  text-align: center;
  text-transform: none;
  vertical-align: -0.125em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.anticon > * {
  line-height: 1;
}

.anticon svg {
  display: inline-block;
}

.anticon::before {
  display: none;
}

.anticon .anticon-icon {
  display: block;
}

.anticon[tabindex] {
  cursor: pointer;
}

.anticon-spin::before,
.anticon-spin {
  display: inline-block;
  -webkit-animation: loadingCircle 1s infinite linear;
  animation: loadingCircle 1s infinite linear;
}

@-webkit-keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
`;
function hie(t) {
  return t && t.getRootNode && t.getRootNode();
}
function Q8e(t) {
  return c8() ? hie(t) instanceof ShadowRoot : !1;
}
function H8e(t) {
  return Q8e(t) ? hie(t) : null;
}
var G8e = function() {
  var e = sie(), n = e.prefixCls, r = e.csp, i = In(), a = W8e;
  n && (a = a.replace(/anticon/g, n.value)), Bt(function() {
    if (c8()) {
      var o = i.vnode.el, s = H8e(o);
      B8e(a, "@ant-design-vue-icons", {
        prepend: !0,
        csp: r.value,
        attachTo: s
      });
    }
  });
}, j8e = ["icon", "primaryColor", "secondaryColor"];
function Z8e(t, e) {
  if (t == null) return {};
  var n = U8e(t, e), r, i;
  if (Object.getOwnPropertySymbols) {
    var a = Object.getOwnPropertySymbols(t);
    for (i = 0; i < a.length; i++)
      r = a[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (n[r] = t[r]);
  }
  return n;
}
function U8e(t, e) {
  if (t == null) return {};
  var n = {}, r = Object.keys(t), i, a;
  for (a = 0; a < r.length; a++)
    i = r[a], !(e.indexOf(i) >= 0) && (n[i] = t[i]);
  return n;
}
function qx(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      X8e(t, i, n[i]);
    });
  }
  return t;
}
function X8e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var Fy = zn({
  primaryColor: "#333",
  secondaryColor: "#E6E6E6",
  calculated: !1
});
function Y8e(t) {
  var e = t.primaryColor, n = t.secondaryColor;
  Fy.primaryColor = e, Fy.secondaryColor = n || fie(e), Fy.calculated = !!n;
}
function q8e() {
  return qx({}, Fy);
}
var If = function(e, n) {
  var r = qx({}, e, n.attrs), i = r.icon, a = r.primaryColor, o = r.secondaryColor, s = Z8e(r, j8e), l = Fy;
  if (a && (l = {
    primaryColor: a,
    secondaryColor: o || fie(a)
  }), F8e(Z7(i), "icon should be icon definiton, but got ".concat(i)), !Z7(i))
    return null;
  var u = i;
  return u && typeof u.icon == "function" && (u = qx({}, u, {
    icon: u.icon(l.primaryColor, l.secondaryColor)
  })), AR(u.icon, "svg-".concat(u.name), qx({}, s, {
    "data-icon": u.name,
    width: "1em",
    height: "1em",
    fill: "currentColor",
    "aria-hidden": "true"
  }));
};
If.props = {
  icon: Object,
  primaryColor: String,
  secondaryColor: String,
  focusable: String
};
If.inheritAttrs = !1;
If.displayName = "IconBase";
If.getTwoToneColors = q8e;
If.setTwoToneColors = Y8e;
function K8e(t, e) {
  return n5e(t) || t5e(t, e) || e5e(t, e) || J8e();
}
function J8e() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function e5e(t, e) {
  if (t) {
    if (typeof t == "string") return U7(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    if (n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set") return Array.from(t);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return U7(t, e);
  }
}
function U7(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++)
    r[n] = t[n];
  return r;
}
function t5e(t, e) {
  var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
  if (n != null) {
    var r = [], i = !0, a = !1, o, s;
    try {
      for (n = n.call(t); !(i = (o = n.next()).done) && (r.push(o.value), !(e && r.length === e)); i = !0)
        ;
    } catch (l) {
      a = !0, s = l;
    } finally {
      try {
        !i && n.return != null && n.return();
      } finally {
        if (a) throw s;
      }
    }
    return r;
  }
}
function n5e(t) {
  if (Array.isArray(t)) return t;
}
function pie(t) {
  var e = die(t), n = K8e(e, 2), r = n[0], i = n[1];
  return If.setTwoToneColors({
    primaryColor: r,
    secondaryColor: i
  });
}
function r5e() {
  var t = If.getTwoToneColors();
  return t.calculated ? [t.primaryColor, t.secondaryColor] : t.primaryColor;
}
var i5e = ae({
  name: "InsertStyles",
  setup: function() {
    return G8e(), function() {
      return null;
    };
  }
}), a5e = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
function o5e(t, e) {
  return c5e(t) || u5e(t, e) || l5e(t, e) || s5e();
}
function s5e() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function l5e(t, e) {
  if (t) {
    if (typeof t == "string") return X7(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    if (n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set") return Array.from(t);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return X7(t, e);
  }
}
function X7(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++)
    r[n] = t[n];
  return r;
}
function u5e(t, e) {
  var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
  if (n != null) {
    var r = [], i = !0, a = !1, o, s;
    try {
      for (n = n.call(t); !(i = (o = n.next()).done) && (r.push(o.value), !(e && r.length === e)); i = !0)
        ;
    } catch (l) {
      a = !0, s = l;
    } finally {
      try {
        !i && n.return != null && n.return();
      } finally {
        if (a) throw s;
      }
    }
    return r;
  }
}
function c5e(t) {
  if (Array.isArray(t)) return t;
}
function Y7(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      dy(t, i, n[i]);
    });
  }
  return t;
}
function dy(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
function f5e(t, e) {
  if (t == null) return {};
  var n = d5e(t, e), r, i;
  if (Object.getOwnPropertySymbols) {
    var a = Object.getOwnPropertySymbols(t);
    for (i = 0; i < a.length; i++)
      r = a[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (n[r] = t[r]);
  }
  return n;
}
function d5e(t, e) {
  if (t == null) return {};
  var n = {}, r = Object.keys(t), i, a;
  for (a = 0; a < r.length; a++)
    i = r[a], !(e.indexOf(i) >= 0) && (n[i] = t[i]);
  return n;
}
pie(OLe.primary);
var Rt = function(e, n) {
  var r, i = Y7({}, e, n.attrs), a = i.class, o = i.icon, s = i.spin, l = i.rotate, u = i.tabindex, c = i.twoToneColor, f = i.onClick, d = f5e(i, a5e), h = sie(), p = h.prefixCls, v = h.rootClassName, g = (r = {}, dy(r, v.value, !!v.value), dy(r, p.value, !0), dy(r, "".concat(p.value, "-").concat(o.name), !!o.name), dy(r, "".concat(p.value, "-spin"), !!s || o.name === "loading"), r), m = u;
  m === void 0 && f && (m = -1);
  var y = l ? {
    msTransform: "rotate(".concat(l, "deg)"),
    transform: "rotate(".concat(l, "deg)")
  } : void 0, _ = die(c), O = o5e(_, 2), S = O[0], x = O[1];
  return D("span", Y7({
    role: "img",
    "aria-label": o.name
  }, d, {
    onClick: f,
    class: [g, a],
    tabindex: m
  }), [D(If, {
    icon: o,
    primaryColor: S,
    secondaryColor: x,
    style: y
  }, null), D(i5e, null, null)]);
};
Rt.props = {
  spin: Boolean,
  rotate: Number,
  icon: Object,
  twoToneColor: [String, Array]
};
Rt.displayName = "AntdIcon";
Rt.inheritAttrs = !1;
Rt.getTwoToneColor = r5e;
Rt.setTwoToneColor = pie;
function q7(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      h5e(t, i, n[i]);
    });
  }
  return t;
}
function h5e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var D2 = function(e, n) {
  var r = q7({}, e, n.attrs);
  return D(Rt, q7({}, r, {
    icon: M8e
  }), null);
};
D2.displayName = "DownOutlined";
D2.inheritAttrs = !1;
var p5e = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, name: "loading", theme: "outlined" };
function K7(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      v5e(t, i, n[i]);
    });
  }
  return t;
}
function v5e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var Ql = function(e, n) {
  var r = K7({}, e, n.attrs);
  return D(Rt, K7({}, r, {
    icon: p5e
  }), null);
};
Ql.displayName = "LoadingOutlined";
Ql.inheritAttrs = !1;
var g5e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, name: "check", theme: "outlined" };
function J7(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      m5e(t, i, n[i]);
    });
  }
  return t;
}
function m5e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var d8 = function(e, n) {
  var r = J7({}, e, n.attrs);
  return D(Rt, J7({}, r, {
    icon: g5e
  }), null);
};
d8.displayName = "CheckOutlined";
d8.inheritAttrs = !1;
var y5e = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, name: "close", theme: "outlined" };
function eQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      b5e(t, i, n[i]);
    });
  }
  return t;
}
function b5e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var tc = function(e, n) {
  var r = eQ({}, e, n.attrs);
  return D(Rt, eQ({}, r, {
    icon: y5e
  }), null);
};
tc.displayName = "CloseOutlined";
tc.inheritAttrs = !1;
var _5e = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, name: "close-circle", theme: "filled" };
function tQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      O5e(t, i, n[i]);
    });
  }
  return t;
}
function O5e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var cs = function(e, n) {
  var r = tQ({}, e, n.attrs);
  return D(Rt, tQ({}, r, {
    icon: _5e
  }), null);
};
cs.displayName = "CloseCircleFilled";
cs.inheritAttrs = !1;
var S5e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, name: "search", theme: "outlined" };
function nQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      x5e(t, i, n[i]);
    });
  }
  return t;
}
function x5e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var R2 = function(e, n) {
  var r = nQ({}, e, n.attrs);
  return D(Rt, nQ({}, r, {
    icon: S5e
  }), null);
};
R2.displayName = "SearchOutlined";
R2.inheritAttrs = !1;
function w5e(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const {
    loading: n,
    multiple: r,
    prefixCls: i,
    hasFeedback: a,
    feedbackIcon: o,
    showArrow: s
  } = t, l = t.suffixIcon || e.suffixIcon && e.suffixIcon(), u = t.clearIcon || e.clearIcon && e.clearIcon(), c = t.menuItemSelectedIcon || e.menuItemSelectedIcon && e.menuItemSelectedIcon(), f = t.removeIcon || e.removeIcon && e.removeIcon(), d = u ?? D(cs, null, null), h = (m) => D(Wt, null, [s !== !1 && m, a && o]);
  let p = null;
  if (l !== void 0)
    p = h(l);
  else if (n)
    p = h(D(Ql, {
      spin: !0
    }, null));
  else {
    const m = `${i}-suffix`;
    p = (y) => {
      let {
        open: _,
        showSearch: O
      } = y;
      return h(_ && O ? D(R2, {
        class: m
      }, null) : D(D2, {
        class: m
      }, null));
    };
  }
  let v = null;
  c !== void 0 ? v = c : r ? v = D(d8, null, null) : v = null;
  let g = null;
  return f !== void 0 ? g = f : g = D(tc, null, null), {
    clearIcon: d,
    suffixIcon: p,
    itemIcon: v,
    removeIcon: g
  };
}
function h8(t) {
  const e = Symbol("contextKey");
  return {
    useProvide: (i, a) => {
      const o = zn({});
      return Et(e, o), Vt(() => {
        k(o, i, a || {});
      }), o;
    },
    useInject: () => et(e, t) || {}
  };
}
const tC = Symbol("ContextProps"), nC = Symbol("InternalContextProps"), C5e = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : V(() => !0);
  const n = ee(/* @__PURE__ */ new Map()), r = (o, s) => {
    n.value.set(o, s), n.value = new Map(n.value);
  }, i = (o) => {
    n.value.delete(o), n.value = new Map(n.value);
  }, a = In();
  me([e, n], () => {
    if (process.env.NODE_ENV !== "production" && e.value && n.value.size > 1) {
      lo(!1, "Form.Item", `FormItem can only collect one field item, you haved set ${[...n.value.values()].map((s) => `\`${s.name}\``).join(", ")} ${n.value.size} field items.
        You can set not need to be collected fields into \`a-form-item-rest\``);
      let o = a;
      for (; o.parent; )
        console.warn("at", o.type), o = o.parent;
    }
  }), Et(tC, t), Et(nC, {
    addFormItemField: r,
    removeFormItemField: i
  });
}, ER = {
  id: V(() => {
  }),
  onFieldBlur: () => {
  },
  onFieldChange: () => {
  },
  clearValidate: () => {
  }
}, MR = {
  addFormItemField: () => {
  },
  removeFormItemField: () => {
  }
}, Ul = () => {
  const t = et(nC, MR), e = Symbol("FormItemFieldKey"), n = In();
  return t.addFormItemField(e, n.type), Qt(() => {
    t.removeFormItemField(e);
  }), Et(nC, MR), Et(tC, ER), et(tC, ER);
}, Lb = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AFormItemRest",
  setup(t, e) {
    let {
      slots: n
    } = e;
    return Et(nC, MR), Et(tC, ER), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
}), Qs = h8({}), rC = ae({
  name: "NoFormStatus",
  setup(t, e) {
    let {
      slots: n
    } = e;
    return Qs.useProvide({}), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
});
function Eu(t, e, n) {
  return Re({
    [`${t}-status-success`]: e === "success",
    [`${t}-status-warning`]: e === "warning",
    [`${t}-status-error`]: e === "error",
    [`${t}-status-validating`]: e === "validating",
    [`${t}-has-feedback`]: n
  });
}
const U_ = (t, e) => e || t, T5e = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [e]: {
      display: "inline-flex",
      "&-block": {
        display: "flex",
        width: "100%"
      },
      "&-vertical": {
        flexDirection: "column"
      }
    }
  };
}, P5e = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [e]: {
      display: "inline-flex",
      "&-rtl": {
        direction: "rtl"
      },
      "&-vertical": {
        flexDirection: "column"
      },
      "&-align": {
        flexDirection: "column",
        "&-center": {
          alignItems: "center"
        },
        "&-start": {
          alignItems: "flex-start"
        },
        "&-end": {
          alignItems: "flex-end"
        },
        "&-baseline": {
          alignItems: "baseline"
        }
      },
      [`${e}-item`]: {
        "&:empty": {
          display: "none"
        }
      }
    }
  };
}, $5e = pr("Space", (t) => [P5e(t), T5e(t)]), A5e = () => ({
  compactSize: String,
  compactDirection: oe.oneOf(pf("horizontal", "vertical")).def("horizontal"),
  isFirstItem: Tt(),
  isLastItem: Tt()
}), k2 = h8(null), L2 = (t, e) => {
  const n = k2.useInject(), r = V(() => {
    if (!n || vte(n)) return "";
    const {
      compactDirection: i,
      isFirstItem: a,
      isLastItem: o
    } = n, s = i === "vertical" ? "-vertical-" : "-";
    return Re({
      [`${t.value}-compact${s}item`]: !0,
      [`${t.value}-compact${s}first-item`]: a,
      [`${t.value}-compact${s}last-item`]: o,
      [`${t.value}-compact${s}item-rtl`]: e.value === "rtl"
    });
  });
  return {
    compactSize: V(() => n == null ? void 0 : n.compactSize),
    compactDirection: V(() => n == null ? void 0 : n.compactDirection),
    compactItemClassnames: r
  };
}, iC = ae({
  name: "NoCompactStyle",
  setup(t, e) {
    let {
      slots: n
    } = e;
    return k2.useProvide(null), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
}), E5e = () => ({
  prefixCls: String,
  size: {
    type: String
  },
  direction: oe.oneOf(pf("horizontal", "vertical")).def("horizontal"),
  align: oe.oneOf(pf("start", "end", "center", "baseline")),
  block: {
    type: Boolean,
    default: void 0
  }
}), M5e = ae({
  name: "CompactItem",
  props: A5e(),
  setup(t, e) {
    let {
      slots: n
    } = e;
    return k2.useProvide(t), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
});
ae({
  name: "ASpaceCompact",
  inheritAttrs: !1,
  props: E5e(),
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const {
      prefixCls: i,
      direction: a
    } = hn("space-compact", t), o = k2.useInject(), [s, l] = $5e(i), u = V(() => Re(i.value, l.value, {
      [`${i.value}-rtl`]: a.value === "rtl",
      [`${i.value}-block`]: t.block,
      [`${i.value}-vertical`]: t.direction === "vertical"
    }));
    return () => {
      var c;
      const f = qr(((c = r.default) === null || c === void 0 ? void 0 : c.call(r)) || []);
      return f.length === 0 ? null : s(D("div", te(te({}, n), {}, {
        class: [u.value, n.class]
      }), [f.map((d, h) => {
        var p;
        const v = d && d.key || `${i.value}-item-${h}`, g = !o || vte(o);
        return D(M5e, {
          key: v,
          compactSize: (p = t.size) !== null && p !== void 0 ? p : "middle",
          compactDirection: t.direction,
          isFirstItem: h === 0 && (g || (o == null ? void 0 : o.isFirstItem)),
          isLastItem: h === f.length - 1 && (g || (o == null ? void 0 : o.isLastItem))
        }, {
          default: () => [d]
        });
      })]));
    };
  }
});
const I5e = (t) => ({
  animationDuration: t,
  animationFillMode: "both"
}), D5e = (t) => ({
  animationDuration: t,
  animationFillMode: "both"
}), N2 = function(t, e, n, r) {
  const a = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
  return {
    [`
      ${a}${t}-enter,
      ${a}${t}-appear
    `]: k(k({}, I5e(r)), {
      animationPlayState: "paused"
    }),
    [`${a}${t}-leave`]: k(k({}, D5e(r)), {
      animationPlayState: "paused"
    }),
    [`
      ${a}${t}-enter${t}-enter-active,
      ${a}${t}-appear${t}-appear-active
    `]: {
      animationName: e,
      animationPlayState: "running"
    },
    [`${a}${t}-leave${t}-leave-active`]: {
      animationName: n,
      animationPlayState: "running",
      pointerEvents: "none"
    }
  };
}, R5e = new qt("antFadeIn", {
  "0%": {
    opacity: 0
  },
  "100%": {
    opacity: 1
  }
}), k5e = new qt("antFadeOut", {
  "0%": {
    opacity: 1
  },
  "100%": {
    opacity: 0
  }
}), vie = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const {
    antCls: n
  } = t, r = `${n}-fade`, i = e ? "&" : "";
  return [N2(r, R5e, k5e, t.motionDurationMid, e), {
    [`
        ${i}${r}-enter,
        ${i}${r}-appear
      `]: {
      opacity: 0,
      animationTimingFunction: "linear"
    },
    [`${i}${r}-leave`]: {
      animationTimingFunction: "linear"
    }
  }];
}, L5e = new qt("antMoveDownIn", {
  "0%": {
    transform: "translate3d(0, 100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), N5e = new qt("antMoveDownOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(0, 100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), B5e = new qt("antMoveLeftIn", {
  "0%": {
    transform: "translate3d(-100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), z5e = new qt("antMoveLeftOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(-100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), V5e = new qt("antMoveRightIn", {
  "0%": {
    transform: "translate3d(100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), F5e = new qt("antMoveRightOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), W5e = new qt("antMoveUpIn", {
  "0%": {
    transform: "translate3d(0, -100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), Q5e = new qt("antMoveUpOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(0, -100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), H5e = {
  "move-up": {
    inKeyframes: W5e,
    outKeyframes: Q5e
  },
  "move-down": {
    inKeyframes: L5e,
    outKeyframes: N5e
  },
  "move-left": {
    inKeyframes: B5e,
    outKeyframes: z5e
  },
  "move-right": {
    inKeyframes: V5e,
    outKeyframes: F5e
  }
}, rQ = (t, e) => {
  const {
    antCls: n
  } = t, r = `${n}-${e}`, {
    inKeyframes: i,
    outKeyframes: a
  } = H5e[e];
  return [N2(r, i, a, t.motionDurationMid), {
    [`
        ${r}-enter,
        ${r}-appear
      `]: {
      opacity: 0,
      animationTimingFunction: t.motionEaseOutCirc
    },
    [`${r}-leave`]: {
      animationTimingFunction: t.motionEaseInOutCirc
    }
  }];
}, gie = new qt("antSlideUpIn", {
  "0%": {
    transform: "scaleY(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleY(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  }
}), mie = new qt("antSlideUpOut", {
  "0%": {
    transform: "scaleY(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleY(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  }
}), yie = new qt("antSlideDownIn", {
  "0%": {
    transform: "scaleY(0.8)",
    transformOrigin: "100% 100%",
    opacity: 0
  },
  "100%": {
    transform: "scaleY(1)",
    transformOrigin: "100% 100%",
    opacity: 1
  }
}), bie = new qt("antSlideDownOut", {
  "0%": {
    transform: "scaleY(1)",
    transformOrigin: "100% 100%",
    opacity: 1
  },
  "100%": {
    transform: "scaleY(0.8)",
    transformOrigin: "100% 100%",
    opacity: 0
  }
}), G5e = new qt("antSlideLeftIn", {
  "0%": {
    transform: "scaleX(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleX(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  }
}), j5e = new qt("antSlideLeftOut", {
  "0%": {
    transform: "scaleX(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleX(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  }
}), Z5e = new qt("antSlideRightIn", {
  "0%": {
    transform: "scaleX(0.8)",
    transformOrigin: "100% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleX(1)",
    transformOrigin: "100% 0%",
    opacity: 1
  }
}), U5e = new qt("antSlideRightOut", {
  "0%": {
    transform: "scaleX(1)",
    transformOrigin: "100% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleX(0.8)",
    transformOrigin: "100% 0%",
    opacity: 0
  }
}), X5e = {
  "slide-up": {
    inKeyframes: gie,
    outKeyframes: mie
  },
  "slide-down": {
    inKeyframes: yie,
    outKeyframes: bie
  },
  "slide-left": {
    inKeyframes: G5e,
    outKeyframes: j5e
  },
  "slide-right": {
    inKeyframes: Z5e,
    outKeyframes: U5e
  }
}, kg = (t, e) => {
  const {
    antCls: n
  } = t, r = `${n}-${e}`, {
    inKeyframes: i,
    outKeyframes: a
  } = X5e[e];
  return [N2(r, i, a, t.motionDurationMid), {
    [`
      ${r}-enter,
      ${r}-appear
    `]: {
      transform: "scale(0)",
      transformOrigin: "0% 0%",
      opacity: 0,
      animationTimingFunction: t.motionEaseOutQuint
    },
    [`${r}-leave`]: {
      animationTimingFunction: t.motionEaseInQuint
    }
  }];
}, p8 = new qt("antZoomIn", {
  "0%": {
    transform: "scale(0.2)",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    opacity: 1
  }
}), Y5e = new qt("antZoomOut", {
  "0%": {
    transform: "scale(1)"
  },
  "100%": {
    transform: "scale(0.2)",
    opacity: 0
  }
}), iQ = new qt("antZoomBigIn", {
  "0%": {
    transform: "scale(0.8)",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    opacity: 1
  }
}), aQ = new qt("antZoomBigOut", {
  "0%": {
    transform: "scale(1)"
  },
  "100%": {
    transform: "scale(0.8)",
    opacity: 0
  }
}), q5e = new qt("antZoomUpIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "50% 0%"
  }
}), K5e = new qt("antZoomUpOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "50% 0%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 0%",
    opacity: 0
  }
}), J5e = new qt("antZoomLeftIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "0% 50%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "0% 50%"
  }
}), e3e = new qt("antZoomLeftOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "0% 50%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "0% 50%",
    opacity: 0
  }
}), t3e = new qt("antZoomRightIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "100% 50%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "100% 50%"
  }
}), n3e = new qt("antZoomRightOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "100% 50%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "100% 50%",
    opacity: 0
  }
}), r3e = new qt("antZoomDownIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 100%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "50% 100%"
  }
}), i3e = new qt("antZoomDownOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "50% 100%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 100%",
    opacity: 0
  }
}), a3e = {
  zoom: {
    inKeyframes: p8,
    outKeyframes: Y5e
  },
  "zoom-big": {
    inKeyframes: iQ,
    outKeyframes: aQ
  },
  "zoom-big-fast": {
    inKeyframes: iQ,
    outKeyframes: aQ
  },
  "zoom-left": {
    inKeyframes: J5e,
    outKeyframes: e3e
  },
  "zoom-right": {
    inKeyframes: t3e,
    outKeyframes: n3e
  },
  "zoom-up": {
    inKeyframes: q5e,
    outKeyframes: K5e
  },
  "zoom-down": {
    inKeyframes: r3e,
    outKeyframes: i3e
  }
}, B2 = (t, e) => {
  const {
    antCls: n
  } = t, r = `${n}-${e}`, {
    inKeyframes: i,
    outKeyframes: a
  } = a3e[e];
  return [N2(r, i, a, e === "zoom-big-fast" ? t.motionDurationFast : t.motionDurationMid), {
    [`
        ${r}-enter,
        ${r}-appear
      `]: {
      transform: "scale(0)",
      opacity: 0,
      animationTimingFunction: t.motionEaseOutCirc,
      "&-prepare": {
        transform: "none"
      }
    },
    [`${r}-leave`]: {
      animationTimingFunction: t.motionEaseInOutCirc
    }
  }];
}, v8 = (t) => ({
  [t.componentCls]: {
    // For common/openAnimation
    [`${t.antCls}-motion-collapse-legacy`]: {
      overflow: "hidden",
      "&-active": {
        transition: `height ${t.motionDurationMid} ${t.motionEaseInOut},
        opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`
      }
    },
    [`${t.antCls}-motion-collapse`]: {
      overflow: "hidden",
      transition: `height ${t.motionDurationMid} ${t.motionEaseInOut},
        opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`
    }
  }
}), oQ = (t) => {
  const {
    controlPaddingHorizontal: e
  } = t;
  return {
    position: "relative",
    display: "block",
    minHeight: t.controlHeight,
    padding: `${(t.controlHeight - t.fontSize * t.lineHeight) / 2}px ${e}px`,
    color: t.colorText,
    fontWeight: "normal",
    fontSize: t.fontSize,
    lineHeight: t.lineHeight,
    boxSizing: "border-box"
  };
}, o3e = (t) => {
  const {
    antCls: e,
    componentCls: n
  } = t, r = `${n}-item`;
  return [
    {
      [`${n}-dropdown`]: k(k({}, Gn(t)), {
        position: "absolute",
        top: -9999,
        zIndex: t.zIndexPopup,
        boxSizing: "border-box",
        padding: t.paddingXXS,
        overflow: "hidden",
        fontSize: t.fontSize,
        // Fix select render lag of long text in chrome
        // https://github.com/ant-design/ant-design/issues/11456
        // https://github.com/ant-design/ant-design/issues/11843
        fontVariant: "initial",
        backgroundColor: t.colorBgElevated,
        borderRadius: t.borderRadiusLG,
        outline: "none",
        boxShadow: t.boxShadowSecondary,
        [`
            &${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-bottomLeft,
            &${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-bottomLeft
          `]: {
          animationName: gie
        },
        [`
            &${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-topLeft,
            &${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-topLeft
          `]: {
          animationName: yie
        },
        [`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]: {
          animationName: mie
        },
        [`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-topLeft`]: {
          animationName: bie
        },
        "&-hidden": {
          display: "none"
        },
        "&-empty": {
          color: t.colorTextDisabled
        },
        // ========================= Options =========================
        [`${r}-empty`]: k(k({}, oQ(t)), {
          color: t.colorTextDisabled
        }),
        [`${r}`]: k(k({}, oQ(t)), {
          cursor: "pointer",
          transition: `background ${t.motionDurationSlow} ease`,
          borderRadius: t.borderRadiusSM,
          // =========== Group ============
          "&-group": {
            color: t.colorTextDescription,
            fontSize: t.fontSizeSM,
            cursor: "default"
          },
          // =========== Option ===========
          "&-option": {
            display: "flex",
            "&-content": k({
              flex: "auto"
            }, Mg),
            "&-state": {
              flex: "none"
            },
            [`&-active:not(${r}-option-disabled)`]: {
              backgroundColor: t.controlItemBgHover
            },
            [`&-selected:not(${r}-option-disabled)`]: {
              color: t.colorText,
              fontWeight: t.fontWeightStrong,
              backgroundColor: t.controlItemBgActive,
              [`${r}-option-state`]: {
                color: t.colorPrimary
              }
            },
            "&-disabled": {
              [`&${r}-option-selected`]: {
                backgroundColor: t.colorBgContainerDisabled
              },
              color: t.colorTextDisabled,
              cursor: "not-allowed"
            },
            "&-grouped": {
              paddingInlineStart: t.controlPaddingHorizontal * 2
            }
          }
        }),
        // =========================== RTL ===========================
        "&-rtl": {
          direction: "rtl"
        }
      })
    },
    // Follow code may reuse in other components
    kg(t, "slide-up"),
    kg(t, "slide-down"),
    rQ(t, "move-up"),
    rQ(t, "move-down")
  ];
}, Wp = 2;
function _ie(t) {
  let {
    controlHeightSM: e,
    controlHeight: n,
    lineWidth: r
  } = t;
  const i = (n - e) / 2 - r, a = Math.ceil(i / 2);
  return [i, a];
}
function lE(t, e) {
  const {
    componentCls: n,
    iconCls: r
  } = t, i = `${n}-selection-overflow`, a = t.controlHeightSM, [o] = _ie(t), s = e ? `${n}-${e}` : "";
  return {
    [`${n}-multiple${s}`]: {
      fontSize: t.fontSize,
      /**
       * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
       * may update to redesign with its align logic.
       */
      // =========================== Overflow ===========================
      [i]: {
        position: "relative",
        display: "flex",
        flex: "auto",
        flexWrap: "wrap",
        maxWidth: "100%",
        "&-item": {
          flex: "none",
          alignSelf: "center",
          maxWidth: "100%",
          display: "inline-flex"
        }
      },
      // ========================= Selector =========================
      [`${n}-selector`]: {
        display: "flex",
        flexWrap: "wrap",
        alignItems: "center",
        // Multiple is little different that horizontal is follow the vertical
        padding: `${o - Wp}px ${Wp * 2}px`,
        borderRadius: t.borderRadius,
        [`${n}-show-search&`]: {
          cursor: "text"
        },
        [`${n}-disabled&`]: {
          background: t.colorBgContainerDisabled,
          cursor: "not-allowed"
        },
        "&:after": {
          display: "inline-block",
          width: 0,
          margin: `${Wp}px 0`,
          lineHeight: `${a}px`,
          content: '"\\a0"'
        }
      },
      [`
        &${n}-show-arrow ${n}-selector,
        &${n}-allow-clear ${n}-selector
      `]: {
        paddingInlineEnd: t.fontSizeIcon + t.controlPaddingHorizontal
      },
      // ======================== Selections ========================
      [`${n}-selection-item`]: {
        position: "relative",
        display: "flex",
        flex: "none",
        boxSizing: "border-box",
        maxWidth: "100%",
        height: a,
        marginTop: Wp,
        marginBottom: Wp,
        lineHeight: `${a - t.lineWidth * 2}px`,
        background: t.colorFillSecondary,
        border: `${t.lineWidth}px solid ${t.colorSplit}`,
        borderRadius: t.borderRadiusSM,
        cursor: "default",
        transition: `font-size ${t.motionDurationSlow}, line-height ${t.motionDurationSlow}, height ${t.motionDurationSlow}`,
        userSelect: "none",
        marginInlineEnd: Wp * 2,
        paddingInlineStart: t.paddingXS,
        paddingInlineEnd: t.paddingXS / 2,
        [`${n}-disabled&`]: {
          color: t.colorTextDisabled,
          borderColor: t.colorBorder,
          cursor: "not-allowed"
        },
        // It's ok not to do this, but 24px makes bottom narrow in view should adjust
        "&-content": {
          display: "inline-block",
          marginInlineEnd: t.paddingXS / 2,
          overflow: "hidden",
          whiteSpace: "pre",
          textOverflow: "ellipsis"
        },
        "&-remove": k(k({}, hm()), {
          display: "inline-block",
          color: t.colorIcon,
          fontWeight: "bold",
          fontSize: 10,
          lineHeight: "inherit",
          cursor: "pointer",
          [`> ${r}`]: {
            verticalAlign: "-0.2em"
          },
          "&:hover": {
            color: t.colorIconHover
          }
        })
      },
      // ========================== Input ==========================
      [`${i}-item + ${i}-item`]: {
        [`${n}-selection-search`]: {
          marginInlineStart: 0
        }
      },
      [`${n}-selection-search`]: {
        display: "inline-flex",
        position: "relative",
        maxWidth: "100%",
        marginInlineStart: t.inputPaddingHorizontalBase - o,
        "\n          &-input,\n          &-mirror\n        ": {
          height: a,
          fontFamily: t.fontFamily,
          lineHeight: `${a}px`,
          transition: `all ${t.motionDurationSlow}`
        },
        "&-input": {
          width: "100%",
          minWidth: 4.1
          // fix search cursor missing
        },
        "&-mirror": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          insetInlineEnd: "auto",
          zIndex: 999,
          whiteSpace: "pre",
          visibility: "hidden"
        }
      },
      // ======================= Placeholder =======================
      [`${n}-selection-placeholder `]: {
        position: "absolute",
        top: "50%",
        insetInlineStart: t.inputPaddingHorizontalBase,
        insetInlineEnd: t.inputPaddingHorizontalBase,
        transform: "translateY(-50%)",
        transition: `all ${t.motionDurationSlow}`
      }
    }
  };
}
function s3e(t) {
  const {
    componentCls: e
  } = t, n = bn(t, {
    controlHeight: t.controlHeightSM,
    controlHeightSM: t.controlHeightXS,
    borderRadius: t.borderRadiusSM,
    borderRadiusSM: t.borderRadiusXS
  }), [, r] = _ie(t);
  return [
    lE(t),
    // ======================== Small ========================
    // Shared
    lE(n, "sm"),
    // Padding
    {
      [`${e}-multiple${e}-sm`]: {
        [`${e}-selection-placeholder`]: {
          insetInlineStart: t.controlPaddingHorizontalSM - t.lineWidth,
          insetInlineEnd: "auto"
        },
        // https://github.com/ant-design/ant-design/issues/29559
        [`${e}-selection-search`]: {
          marginInlineStart: r
        }
      }
    },
    // ======================== Large ========================
    // Shared
    lE(bn(t, {
      fontSize: t.fontSizeLG,
      controlHeight: t.controlHeightLG,
      controlHeightSM: t.controlHeight,
      borderRadius: t.borderRadiusLG,
      borderRadiusSM: t.borderRadius
    }), "lg")
  ];
}
function uE(t, e) {
  const {
    componentCls: n,
    inputPaddingHorizontalBase: r,
    borderRadius: i
  } = t, a = t.controlHeight - t.lineWidth * 2, o = Math.ceil(t.fontSize * 1.25), s = e ? `${n}-${e}` : "";
  return {
    [`${n}-single${s}`]: {
      fontSize: t.fontSize,
      // ========================= Selector =========================
      [`${n}-selector`]: k(k({}, Gn(t)), {
        display: "flex",
        borderRadius: i,
        [`${n}-selection-search`]: {
          position: "absolute",
          top: 0,
          insetInlineStart: r,
          insetInlineEnd: r,
          bottom: 0,
          "&-input": {
            width: "100%"
          }
        },
        [`
          ${n}-selection-item,
          ${n}-selection-placeholder
        `]: {
          padding: 0,
          lineHeight: `${a}px`,
          transition: `all ${t.motionDurationSlow}`,
          // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
          "@supports (-moz-appearance: meterbar)": {
            lineHeight: `${a}px`
          }
        },
        [`${n}-selection-item`]: {
          position: "relative",
          userSelect: "none"
        },
        [`${n}-selection-placeholder`]: {
          transition: "none",
          pointerEvents: "none"
        },
        // For common baseline align
        [[
          "&:after",
          /* For '' value baseline align */
          `${n}-selection-item:after`,
          /* For undefined value baseline align */
          `${n}-selection-placeholder:after`
        ].join(",")]: {
          display: "inline-block",
          width: 0,
          visibility: "hidden",
          content: '"\\a0"'
        }
      }),
      [`
        &${n}-show-arrow ${n}-selection-item,
        &${n}-show-arrow ${n}-selection-placeholder
      `]: {
        paddingInlineEnd: o
      },
      // Opacity selection if open
      [`&${n}-open ${n}-selection-item`]: {
        color: t.colorTextPlaceholder
      },
      // ========================== Input ==========================
      // We only change the style of non-customize input which is only support by `combobox` mode.
      // Not customize
      [`&:not(${n}-customize-input)`]: {
        [`${n}-selector`]: {
          width: "100%",
          height: t.controlHeight,
          padding: `0 ${r}px`,
          [`${n}-selection-search-input`]: {
            height: a
          },
          "&:after": {
            lineHeight: `${a}px`
          }
        }
      },
      [`&${n}-customize-input`]: {
        [`${n}-selector`]: {
          "&:after": {
            display: "none"
          },
          [`${n}-selection-search`]: {
            position: "static",
            width: "100%"
          },
          [`${n}-selection-placeholder`]: {
            position: "absolute",
            insetInlineStart: 0,
            insetInlineEnd: 0,
            padding: `0 ${r}px`,
            "&:after": {
              display: "none"
            }
          }
        }
      }
    }
  };
}
function l3e(t) {
  const {
    componentCls: e
  } = t, n = t.controlPaddingHorizontalSM - t.lineWidth;
  return [
    uE(t),
    // ======================== Small ========================
    // Shared
    uE(bn(t, {
      controlHeight: t.controlHeightSM,
      borderRadius: t.borderRadiusSM
    }), "sm"),
    // padding
    {
      [`${e}-single${e}-sm`]: {
        [`&:not(${e}-customize-input)`]: {
          [`${e}-selection-search`]: {
            insetInlineStart: n,
            insetInlineEnd: n
          },
          [`${e}-selector`]: {
            padding: `0 ${n}px`
          },
          // With arrow should provides `padding-right` to show the arrow
          [`&${e}-show-arrow ${e}-selection-search`]: {
            insetInlineEnd: n + t.fontSize * 1.5
          },
          [`
            &${e}-show-arrow ${e}-selection-item,
            &${e}-show-arrow ${e}-selection-placeholder
          `]: {
            paddingInlineEnd: t.fontSize * 1.5
          }
        }
      }
    },
    // ======================== Large ========================
    // Shared
    uE(bn(t, {
      controlHeight: t.controlHeightLG,
      fontSize: t.fontSizeLG,
      borderRadius: t.borderRadiusLG
    }), "lg")
  ];
}
function u3e(t, e, n) {
  const {
    focusElCls: r,
    focus: i,
    borderElCls: a
  } = n, o = a ? "> *" : "", s = ["hover", i ? "focus" : null, "active"].filter(Boolean).map((l) => `&:${l} ${o}`).join(",");
  return {
    [`&-item:not(${e}-last-item)`]: {
      marginInlineEnd: -t.lineWidth
    },
    "&-item": k(k({
      [s]: {
        zIndex: 2
      }
    }, r ? {
      [`&${r}`]: {
        zIndex: 2
      }
    } : {}), {
      [`&[disabled] ${o}`]: {
        zIndex: 0
      }
    })
  };
}
function c3e(t, e, n) {
  const {
    borderElCls: r
  } = n, i = r ? `> ${r}` : "";
  return {
    [`&-item:not(${e}-first-item):not(${e}-last-item) ${i}`]: {
      borderRadius: 0
    },
    [`&-item:not(${e}-last-item)${e}-first-item`]: {
      [`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`&-item:not(${e}-first-item)${e}-last-item`]: {
      [`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    }
  };
}
function z2(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    focus: !0
  };
  const {
    componentCls: n
  } = t, r = `${n}-compact`;
  return {
    [r]: k(k({}, u3e(t, r, e)), c3e(n, r, e))
  };
}
const f3e = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    position: "relative",
    backgroundColor: t.colorBgContainer,
    border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
    transition: `all ${t.motionDurationMid} ${t.motionEaseInOut}`,
    input: {
      cursor: "pointer"
    },
    [`${e}-show-search&`]: {
      cursor: "text",
      input: {
        cursor: "auto",
        color: "inherit"
      }
    },
    [`${e}-disabled&`]: {
      color: t.colorTextDisabled,
      background: t.colorBgContainerDisabled,
      cursor: "not-allowed",
      [`${e}-multiple&`]: {
        background: t.colorBgContainerDisabled
      },
      input: {
        cursor: "not-allowed"
      }
    }
  };
}, cE = function(t, e) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  const {
    componentCls: r,
    borderHoverColor: i,
    outlineColor: a,
    antCls: o
  } = e, s = n ? {
    [`${r}-selector`]: {
      borderColor: i
    }
  } : {};
  return {
    [t]: {
      [`&:not(${r}-disabled):not(${r}-customize-input):not(${o}-pagination-size-changer)`]: k(k({}, s), {
        [`${r}-focused& ${r}-selector`]: {
          borderColor: i,
          boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${a}`,
          borderInlineEndWidth: `${e.controlLineWidth}px !important`,
          outline: 0
        },
        [`&:hover ${r}-selector`]: {
          borderColor: i,
          borderInlineEndWidth: `${e.controlLineWidth}px !important`
        }
      })
    }
  };
}, d3e = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [`${e}-selection-search-input`]: {
      margin: 0,
      padding: 0,
      background: "transparent",
      border: "none",
      outline: "none",
      appearance: "none",
      "&::-webkit-search-cancel-button": {
        display: "none",
        "-webkit-appearance": "none"
      }
    }
  };
}, h3e = (t) => {
  const {
    componentCls: e,
    inputPaddingHorizontalBase: n,
    iconCls: r
  } = t;
  return {
    [e]: k(k({}, Gn(t)), {
      position: "relative",
      display: "inline-block",
      cursor: "pointer",
      [`&:not(${e}-customize-input) ${e}-selector`]: k(k({}, f3e(t)), d3e(t)),
      // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
      //   ...genHoverStyle(token),
      // },
      // ======================== Selection ========================
      [`${e}-selection-item`]: k({
        flex: 1,
        fontWeight: "normal"
      }, Mg),
      // ======================= Placeholder =======================
      [`${e}-selection-placeholder`]: k(k({}, Mg), {
        flex: 1,
        color: t.colorTextPlaceholder,
        pointerEvents: "none"
      }),
      // ========================== Arrow ==========================
      [`${e}-arrow`]: k(k({}, hm()), {
        position: "absolute",
        top: "50%",
        insetInlineStart: "auto",
        insetInlineEnd: n,
        height: t.fontSizeIcon,
        marginTop: -t.fontSizeIcon / 2,
        color: t.colorTextQuaternary,
        fontSize: t.fontSizeIcon,
        lineHeight: 1,
        textAlign: "center",
        pointerEvents: "none",
        display: "flex",
        alignItems: "center",
        [r]: {
          verticalAlign: "top",
          transition: `transform ${t.motionDurationSlow}`,
          "> svg": {
            verticalAlign: "top"
          },
          [`&:not(${e}-suffix)`]: {
            pointerEvents: "auto"
          }
        },
        [`${e}-disabled &`]: {
          cursor: "not-allowed"
        },
        "> *:not(:last-child)": {
          marginInlineEnd: 8
          // FIXME: magic
        }
      }),
      // ========================== Clear ==========================
      [`${e}-clear`]: {
        position: "absolute",
        top: "50%",
        insetInlineStart: "auto",
        insetInlineEnd: n,
        zIndex: 1,
        display: "inline-block",
        width: t.fontSizeIcon,
        height: t.fontSizeIcon,
        marginTop: -t.fontSizeIcon / 2,
        color: t.colorTextQuaternary,
        fontSize: t.fontSizeIcon,
        fontStyle: "normal",
        lineHeight: 1,
        textAlign: "center",
        textTransform: "none",
        background: t.colorBgContainer,
        cursor: "pointer",
        opacity: 0,
        transition: `color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,
        textRendering: "auto",
        "&:before": {
          display: "block"
        },
        "&:hover": {
          color: t.colorTextTertiary
        }
      },
      "&:hover": {
        [`${e}-clear`]: {
          opacity: 1
        }
      }
    }),
    // ========================= Feedback ==========================
    [`${e}-has-feedback`]: {
      [`${e}-clear`]: {
        insetInlineEnd: n + t.fontSize + t.paddingXXS
      }
    }
  };
}, p3e = (t) => {
  const {
    componentCls: e
  } = t;
  return [
    {
      [e]: {
        // ==================== BorderLess ====================
        [`&-borderless ${e}-selector`]: {
          backgroundColor: "transparent !important",
          borderColor: "transparent !important",
          boxShadow: "none !important"
        },
        // ==================== In Form ====================
        [`&${e}-in-form-item`]: {
          width: "100%"
        }
      }
    },
    // =====================================================
    // ==                       LTR                       ==
    // =====================================================
    // Base
    h3e(t),
    // Single
    l3e(t),
    // Multiple
    s3e(t),
    // Dropdown
    o3e(t),
    // =====================================================
    // ==                       RTL                       ==
    // =====================================================
    {
      [`${e}-rtl`]: {
        direction: "rtl"
      }
    },
    // =====================================================
    // ==                     Status                      ==
    // =====================================================
    cE(e, bn(t, {
      borderHoverColor: t.colorPrimaryHover,
      outlineColor: t.controlOutline
    })),
    cE(`${e}-status-error`, bn(t, {
      borderHoverColor: t.colorErrorHover,
      outlineColor: t.colorErrorOutline
    }), !0),
    cE(`${e}-status-warning`, bn(t, {
      borderHoverColor: t.colorWarningHover,
      outlineColor: t.colorWarningOutline
    }), !0),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    z2(t, {
      borderElCls: `${e}-selector`,
      focusElCls: `${e}-focused`
    })
  ];
}, v3e = pr("Select", (t, e) => {
  let {
    rootPrefixCls: n
  } = e;
  const r = bn(t, {
    rootPrefixCls: n,
    inputPaddingHorizontalBase: t.paddingSM - 1
  });
  return [p3e(r)];
}, (t) => ({
  zIndexPopup: t.zIndexPopupBase + 50
})), g3e = () => k(k({}, si(oie(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
  value: or([Array, Object, String, Number]),
  defaultValue: or([Array, Object, String, Number]),
  notFoundContent: oe.any,
  suffixIcon: oe.any,
  itemIcon: oe.any,
  size: rr(),
  mode: rr(),
  bordered: Tt(!0),
  transitionName: String,
  choiceTransitionName: rr(""),
  popupClassName: String,
  /** @deprecated Please use `popupClassName` instead */
  dropdownClassName: String,
  placement: rr(),
  status: rr(),
  "onUpdate:value": Ct()
}), sQ = "SECRET_COMBOBOX_MODE_DO_NOT_USE", Ca = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ASelect",
  Option: l8,
  OptGroup: u8,
  inheritAttrs: !1,
  props: li(g3e(), {
    listHeight: 256,
    listItemHeight: 24
  }),
  SECRET_COMBOBOX_MODE_DO_NOT_USE: sQ,
  slots: Object,
  setup(t, e) {
    let {
      attrs: n,
      emit: r,
      slots: i,
      expose: a
    } = e;
    const o = ee(), s = Ul(), l = Qs.useInject(), u = V(() => U_(l.status, t.status)), c = () => {
      var Y;
      (Y = o.value) === null || Y === void 0 || Y.focus();
    }, f = () => {
      var Y;
      (Y = o.value) === null || Y === void 0 || Y.blur();
    }, d = (Y) => {
      var ne;
      (ne = o.value) === null || ne === void 0 || ne.scrollTo(Y);
    }, h = V(() => {
      const {
        mode: Y
      } = t;
      if (Y !== "combobox")
        return Y === sQ ? "combobox" : Y;
    });
    process.env.NODE_ENV !== "production" && lo(!t.dropdownClassName, "Select", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
    const {
      prefixCls: p,
      direction: v,
      configProvider: g,
      renderEmpty: m,
      size: y,
      getPrefixCls: _,
      getPopupContainer: O,
      disabled: S,
      select: x
    } = hn("select", t), {
      compactSize: C,
      compactItemClassnames: P
    } = L2(p, v), $ = V(() => C.value || y.value), T = Vl(), E = V(() => {
      var Y;
      return (Y = S.value) !== null && Y !== void 0 ? Y : T.value;
    }), [M, R] = v3e(p), N = V(() => _()), I = V(() => t.placement !== void 0 ? t.placement : v.value === "rtl" ? "bottomRight" : "bottomLeft"), B = V(() => Wl(N.value, lNe(I.value), t.transitionName)), Q = V(() => Re({
      [`${p.value}-lg`]: $.value === "large",
      [`${p.value}-sm`]: $.value === "small",
      [`${p.value}-rtl`]: v.value === "rtl",
      [`${p.value}-borderless`]: !t.bordered,
      [`${p.value}-in-form-item`]: l.isFormItemInput
    }, Eu(p.value, u.value, l.hasFeedback), P.value, R.value)), W = function() {
      for (var Y = arguments.length, ne = new Array(Y), fe = 0; fe < Y; fe++)
        ne[fe] = arguments[fe];
      r("update:value", ne[0]), r("change", ...ne), s.onFieldChange();
    }, H = (Y) => {
      r("blur", Y), s.onFieldBlur();
    };
    a({
      blur: f,
      focus: c,
      scrollTo: d
    });
    const U = V(() => h.value === "multiple" || h.value === "tags"), j = V(() => t.showArrow !== void 0 ? t.showArrow : t.loading || !(U.value || h.value === "combobox"));
    return () => {
      var Y, ne, fe, ue;
      const {
        notFoundContent: ye,
        listHeight: se = 256,
        listItemHeight: he = 24,
        popupClassName: re,
        dropdownClassName: q,
        virtual: K,
        dropdownMatchSelectWidth: de,
        id: xe = s.id.value,
        placeholder: we = (Y = i.placeholder) === null || Y === void 0 ? void 0 : Y.call(i),
        showArrow: He
      } = t, {
        hasFeedback: je,
        feedbackIcon: Be
      } = l;
      let Le;
      ye !== void 0 ? Le = ye : i.notFoundContent ? Le = i.notFoundContent() : h.value === "combobox" ? Le = null : Le = (m == null ? void 0 : m("Select")) || D(HN, {
        componentName: "Select"
      }, null);
      const {
        suffixIcon: Pe,
        itemIcon: Fe,
        removeIcon: Ye,
        clearIcon: xt
      } = w5e(k(k({}, t), {
        multiple: U.value,
        prefixCls: p.value,
        hasFeedback: je,
        feedbackIcon: Be,
        showArrow: j.value
      }), i), It = si(t, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), an = Re(re || q, {
        [`${p.value}-dropdown-${v.value}`]: v.value === "rtl"
      }, R.value);
      return M(D(E8e, te(te(te({
        ref: o,
        virtual: K,
        dropdownMatchSelectWidth: de
      }, It), n), {}, {
        showSearch: (ne = t.showSearch) !== null && ne !== void 0 ? ne : (fe = x == null ? void 0 : x.value) === null || fe === void 0 ? void 0 : fe.showSearch,
        placeholder: we,
        listHeight: se,
        listItemHeight: he,
        mode: h.value,
        prefixCls: p.value,
        direction: v.value,
        inputIcon: Pe,
        menuItemSelectedIcon: Fe,
        removeIcon: Ye,
        clearIcon: xt,
        notFoundContent: Le,
        class: [Q.value, n.class],
        getPopupContainer: O == null ? void 0 : O.value,
        dropdownClassName: an,
        onChange: W,
        onBlur: H,
        id: xe,
        dropdownRender: It.dropdownRender || i.dropdownRender,
        transitionName: B.value,
        children: (ue = i.default) === null || ue === void 0 ? void 0 : ue.call(i),
        tagRender: t.tagRender || i.tagRender,
        optionLabelRender: i.optionLabel,
        maxTagPlaceholder: t.maxTagPlaceholder || i.maxTagPlaceholder,
        showArrow: je || He,
        disabled: E.value
      }), {
        option: i.option
      }));
    };
  }
});
Ca.install = function(t) {
  return t.component(Ca.name, Ca), t.component(Ca.Option.displayName, Ca.Option), t.component(Ca.OptGroup.displayName, Ca.OptGroup), t;
};
const Ev = Ca.Option;
Ca.OptGroup;
var m3e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, name: "check-circle", theme: "outlined" };
function lQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      y3e(t, i, n[i]);
    });
  }
  return t;
}
function y3e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var g8 = function(e, n) {
  var r = lQ({}, e, n.attrs);
  return D(Rt, lQ({}, r, {
    icon: m3e
  }), null);
};
g8.displayName = "CheckCircleOutlined";
g8.inheritAttrs = !1;
var b3e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, name: "exclamation-circle", theme: "outlined" };
function uQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      _3e(t, i, n[i]);
    });
  }
  return t;
}
function _3e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var m8 = function(e, n) {
  var r = uQ({}, e, n.attrs);
  return D(Rt, uQ({}, r, {
    icon: b3e
  }), null);
};
m8.displayName = "ExclamationCircleOutlined";
m8.inheritAttrs = !1;
var O3e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, name: "info-circle", theme: "outlined" };
function cQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      S3e(t, i, n[i]);
    });
  }
  return t;
}
function S3e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var V2 = function(e, n) {
  var r = cQ({}, e, n.attrs);
  return D(Rt, cQ({}, r, {
    icon: O3e
  }), null);
};
V2.displayName = "InfoCircleOutlined";
V2.inheritAttrs = !1;
var x3e = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z" } }] }, name: "close-circle", theme: "outlined" };
function fQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      w3e(t, i, n[i]);
    });
  }
  return t;
}
function w3e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var y8 = function(e, n) {
  var r = fQ({}, e, n.attrs);
  return D(Rt, fQ({}, r, {
    icon: x3e
  }), null);
};
y8.displayName = "CloseCircleOutlined";
y8.inheritAttrs = !1;
var C3e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, name: "check-circle", theme: "filled" };
function dQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      T3e(t, i, n[i]);
    });
  }
  return t;
}
function T3e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var Df = function(e, n) {
  var r = dQ({}, e, n.attrs);
  return D(Rt, dQ({}, r, {
    icon: C3e
  }), null);
};
Df.displayName = "CheckCircleFilled";
Df.inheritAttrs = !1;
var P3e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "exclamation-circle", theme: "filled" };
function hQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      $3e(t, i, n[i]);
    });
  }
  return t;
}
function $3e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var Rf = function(e, n) {
  var r = hQ({}, e, n.attrs);
  return D(Rt, hQ({}, r, {
    icon: P3e
  }), null);
};
Rf.displayName = "ExclamationCircleFilled";
Rf.inheritAttrs = !1;
var A3e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "info-circle", theme: "filled" };
function pQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      E3e(t, i, n[i]);
    });
  }
  return t;
}
function E3e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var cp = function(e, n) {
  var r = pQ({}, e, n.attrs);
  return D(Rt, pQ({}, r, {
    icon: A3e
  }), null);
};
cp.displayName = "InfoCircleFilled";
cp.inheritAttrs = !1;
const qO = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], M3e = (t) => ({
  xs: `(max-width: ${t.screenXSMax}px)`,
  sm: `(min-width: ${t.screenSM}px)`,
  md: `(min-width: ${t.screenMD}px)`,
  lg: `(min-width: ${t.screenLG}px)`,
  xl: `(min-width: ${t.screenXL}px)`,
  xxl: `(min-width: ${t.screenXXL}px)`,
  xxxl: `{min-width: ${t.screenXXXL}px}`
});
function I3e() {
  const [, t] = pm();
  return V(() => {
    const e = M3e(t.value), n = /* @__PURE__ */ new Map();
    let r = -1, i = {};
    return {
      matchHandlers: {},
      dispatch(a) {
        return i = a, n.forEach((o) => o(i)), n.size >= 1;
      },
      subscribe(a) {
        return n.size || this.register(), r += 1, n.set(r, a), a(i), r;
      },
      unsubscribe(a) {
        n.delete(a), n.size || this.unregister();
      },
      unregister() {
        Object.keys(e).forEach((a) => {
          const o = e[a], s = this.matchHandlers[o];
          s == null || s.mql.removeListener(s == null ? void 0 : s.listener);
        }), n.clear();
      },
      register() {
        Object.keys(e).forEach((a) => {
          const o = e[a], s = (u) => {
            let {
              matches: c
            } = u;
            this.dispatch(k(k({}, i), {
              [a]: c
            }));
          }, l = window.matchMedia(o);
          l.addListener(s), this.matchHandlers[o] = {
            mql: l,
            listener: s
          }, s(l);
        });
      },
      responsiveMap: e
    };
  });
}
const Po = {
  adjustX: 1,
  adjustY: 1
}, $o = [0, 0], Oie = {
  left: {
    points: ["cr", "cl"],
    overflow: Po,
    offset: [-4, 0],
    targetOffset: $o
  },
  right: {
    points: ["cl", "cr"],
    overflow: Po,
    offset: [4, 0],
    targetOffset: $o
  },
  top: {
    points: ["bc", "tc"],
    overflow: Po,
    offset: [0, -4],
    targetOffset: $o
  },
  bottom: {
    points: ["tc", "bc"],
    overflow: Po,
    offset: [0, 4],
    targetOffset: $o
  },
  topLeft: {
    points: ["bl", "tl"],
    overflow: Po,
    offset: [0, -4],
    targetOffset: $o
  },
  leftTop: {
    points: ["tr", "tl"],
    overflow: Po,
    offset: [-4, 0],
    targetOffset: $o
  },
  topRight: {
    points: ["br", "tr"],
    overflow: Po,
    offset: [0, -4],
    targetOffset: $o
  },
  rightTop: {
    points: ["tl", "tr"],
    overflow: Po,
    offset: [4, 0],
    targetOffset: $o
  },
  bottomRight: {
    points: ["tr", "br"],
    overflow: Po,
    offset: [0, 4],
    targetOffset: $o
  },
  rightBottom: {
    points: ["bl", "br"],
    overflow: Po,
    offset: [4, 0],
    targetOffset: $o
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Po,
    offset: [0, 4],
    targetOffset: $o
  },
  leftBottom: {
    points: ["br", "bl"],
    overflow: Po,
    offset: [-4, 0],
    targetOffset: $o
  }
}, D3e = {
  prefixCls: String,
  id: String,
  overlayInnerStyle: oe.any
}, R3e = ae({
  compatConfig: {
    MODE: 3
  },
  name: "TooltipContent",
  props: D3e,
  setup(t, e) {
    let {
      slots: n
    } = e;
    return () => {
      var r;
      return D("div", {
        class: `${t.prefixCls}-inner`,
        id: t.id,
        role: "tooltip",
        style: t.overlayInnerStyle
      }, [(r = n.overlay) === null || r === void 0 ? void 0 : r.call(n)]);
    };
  }
});
var k3e = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
function vQ() {
}
const L3e = ae({
  compatConfig: {
    MODE: 3
  },
  name: "Tooltip",
  inheritAttrs: !1,
  props: {
    trigger: oe.any.def(["hover"]),
    defaultVisible: {
      type: Boolean,
      default: void 0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    placement: oe.string.def("right"),
    transitionName: String,
    animation: oe.any,
    afterVisibleChange: oe.func.def(() => {
    }),
    overlayStyle: {
      type: Object,
      default: void 0
    },
    overlayClassName: String,
    prefixCls: oe.string.def("rc-tooltip"),
    mouseEnterDelay: oe.number.def(0.1),
    mouseLeaveDelay: oe.number.def(0.1),
    getPopupContainer: Function,
    destroyTooltipOnHide: {
      type: Boolean,
      default: !1
    },
    align: oe.object.def(() => ({})),
    arrowContent: oe.any.def(null),
    tipId: String,
    builtinPlacements: oe.object,
    overlayInnerStyle: {
      type: Object,
      default: void 0
    },
    popupVisible: {
      type: Boolean,
      default: void 0
    },
    onVisibleChange: Function,
    onPopupAlign: Function,
    arrow: {
      type: Boolean,
      default: !0
    }
  },
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      expose: i
    } = e;
    const a = ve(), o = () => {
      const {
        prefixCls: c,
        tipId: f,
        overlayInnerStyle: d
      } = t;
      return [t.arrow ? D("div", {
        class: `${c}-arrow`,
        key: "arrow"
      }, [y2(n, t, "arrowContent")]) : null, D(R3e, {
        key: "content",
        prefixCls: c,
        id: f,
        overlayInnerStyle: d
      }, {
        overlay: n.overlay
      })];
    };
    i({
      getPopupDomNode: () => a.value.getPopupDomNode(),
      triggerDOM: a,
      forcePopupAlign: () => {
        var c;
        return (c = a.value) === null || c === void 0 ? void 0 : c.forcePopupAlign();
      }
    });
    const l = ve(!1), u = ve(!1);
    return Vt(() => {
      const {
        destroyTooltipOnHide: c
      } = t;
      if (typeof c == "boolean")
        l.value = c;
      else if (c && typeof c == "object") {
        const {
          keepParent: f
        } = c;
        l.value = f === !0, u.value = f === !1;
      }
    }), () => {
      const {
        overlayClassName: c,
        trigger: f,
        mouseEnterDelay: d,
        mouseLeaveDelay: h,
        overlayStyle: p,
        prefixCls: v,
        afterVisibleChange: g,
        transitionName: m,
        animation: y,
        placement: _,
        align: O,
        destroyTooltipOnHide: S,
        defaultVisible: x
      } = t, C = k3e(t, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible"]), P = k({}, C);
      t.visible !== void 0 && (P.popupVisible = t.visible);
      const $ = k(k(k({
        popupClassName: c,
        prefixCls: v,
        action: f,
        builtinPlacements: Oie,
        popupPlacement: _,
        popupAlign: O,
        afterPopupVisibleChange: g,
        popupTransitionName: m,
        popupAnimation: y,
        defaultPopupVisible: x,
        destroyPopupOnHide: l.value,
        autoDestroy: u.value,
        mouseLeaveDelay: h,
        popupStyle: p,
        mouseEnterDelay: d
      }, P), r), {
        onPopupVisibleChange: t.onVisibleChange || vQ,
        onPopupAlign: t.onPopupAlign || vQ,
        ref: a,
        arrow: !!t.arrow,
        popup: o()
      });
      return D(E2, $, {
        default: n.default
      });
    };
  }
}), N3e = () => ({
  trigger: [String, Array],
  open: {
    type: Boolean,
    default: void 0
  },
  /** @deprecated Please use `open` instead. */
  visible: {
    type: Boolean,
    default: void 0
  },
  placement: String,
  color: String,
  transitionName: String,
  overlayStyle: sn(),
  overlayInnerStyle: sn(),
  overlayClassName: String,
  openClassName: String,
  prefixCls: String,
  mouseEnterDelay: Number,
  mouseLeaveDelay: Number,
  getPopupContainer: Function,
  /**@deprecated Please use `arrow={{ pointAtCenter: true }}` instead. */
  arrowPointAtCenter: {
    type: Boolean,
    default: void 0
  },
  arrow: {
    type: [Boolean, Object],
    default: !0
  },
  autoAdjustOverflow: {
    type: [Boolean, Object],
    default: void 0
  },
  destroyTooltipOnHide: {
    type: Boolean,
    default: void 0
  },
  align: sn(),
  builtinPlacements: sn(),
  children: Array,
  /** @deprecated Please use `onOpenChange` instead. */
  onVisibleChange: Function,
  /** @deprecated Please use `onUpdate:open` instead. */
  "onUpdate:visible": Function,
  onOpenChange: Function,
  "onUpdate:open": Function
}), B3e = {
  adjustX: 1,
  adjustY: 1
}, gQ = {
  adjustX: 0,
  adjustY: 0
}, z3e = [0, 0];
function mQ(t) {
  return typeof t == "boolean" ? t ? B3e : gQ : k(k({}, gQ), t);
}
function V3e(t) {
  const {
    arrowWidth: e = 4,
    horizontalArrowShift: n = 16,
    verticalArrowShift: r = 8,
    autoAdjustOverflow: i,
    arrowPointAtCenter: a
  } = t, o = {
    left: {
      points: ["cr", "cl"],
      offset: [-4, 0]
    },
    right: {
      points: ["cl", "cr"],
      offset: [4, 0]
    },
    top: {
      points: ["bc", "tc"],
      offset: [0, -4]
    },
    bottom: {
      points: ["tc", "bc"],
      offset: [0, 4]
    },
    topLeft: {
      points: ["bl", "tc"],
      offset: [-(n + e), -4]
    },
    leftTop: {
      points: ["tr", "cl"],
      offset: [-4, -(r + e)]
    },
    topRight: {
      points: ["br", "tc"],
      offset: [n + e, -4]
    },
    rightTop: {
      points: ["tl", "cr"],
      offset: [4, -(r + e)]
    },
    bottomRight: {
      points: ["tr", "bc"],
      offset: [n + e, 4]
    },
    rightBottom: {
      points: ["bl", "cr"],
      offset: [4, r + e]
    },
    bottomLeft: {
      points: ["tl", "bc"],
      offset: [-(n + e), 4]
    },
    leftBottom: {
      points: ["br", "cl"],
      offset: [-4, r + e]
    }
  };
  return Object.keys(o).forEach((s) => {
    o[s] = a ? k(k({}, o[s]), {
      overflow: mQ(i),
      targetOffset: z3e
    }) : k(k({}, Oie[s]), {
      overflow: mQ(i)
    }), o[s].ignoreShake = !0;
  }), o;
}
function Sie() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  for (let e = 0, n = t.length; e < n; e++)
    if (t[e] !== void 0)
      return t[e];
}
const F3e = qw.map((t) => `${t}-inverse`);
function W3e(t) {
  return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [...F3e, ...qw].includes(t) : qw.includes(t);
}
function Q3e(t, e) {
  const n = W3e(e), r = Re({
    [`${t}-${e}`]: e && n
  }), i = {}, a = {};
  return e && !n && (i.background = e, a["--antd-arrow-background-color"] = e), {
    className: r,
    overlayStyle: i,
    arrowStyle: a
  };
}
function KO(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  return t.map((n) => `${e}${n}`).join(",");
}
const xie = 8;
function H3e(t) {
  const e = xie, {
    sizePopupArrow: n,
    contentRadius: r,
    borderRadiusOuter: i,
    limitVerticalRadius: a
  } = t, o = n / 2 - Math.ceil(i * (Math.sqrt(2) - 1)), s = (r > 12 ? r + 2 : 12) - o, l = a ? e - o : s;
  return {
    dropdownArrowOffset: s,
    dropdownArrowOffsetVertical: l
  };
}
function G3e(t, e) {
  const {
    componentCls: n,
    sizePopupArrow: r,
    marginXXS: i,
    borderRadiusXS: a,
    borderRadiusOuter: o,
    boxShadowPopoverArrow: s
  } = t, {
    colorBg: l,
    showArrowCls: u,
    contentRadius: c = t.borderRadiusLG,
    limitVerticalRadius: f
  } = e, {
    dropdownArrowOffsetVertical: d,
    dropdownArrowOffset: h
  } = H3e({
    sizePopupArrow: r,
    contentRadius: c,
    borderRadiusOuter: o,
    limitVerticalRadius: f
  }), p = r / 2 + i;
  return {
    [n]: {
      // ============================ Basic ============================
      [`${n}-arrow`]: [k(k({
        position: "absolute",
        zIndex: 1,
        display: "block"
      }, RLe(r, a, o, l, s)), {
        "&:before": {
          background: l
        }
      })],
      // ========================== Placement ==========================
      // Here handle the arrow position and rotate stuff
      // >>>>> Top
      [[`&-placement-top ${n}-arrow`, `&-placement-topLeft ${n}-arrow`, `&-placement-topRight ${n}-arrow`].join(",")]: {
        bottom: 0,
        transform: "translateY(100%) rotate(180deg)"
      },
      [`&-placement-top ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateX(-50%) translateY(100%) rotate(180deg)"
      },
      [`&-placement-topLeft ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: h
        }
      },
      [`&-placement-topRight ${n}-arrow`]: {
        right: {
          _skip_check_: !0,
          value: h
        }
      },
      // >>>>> Bottom
      [[`&-placement-bottom ${n}-arrow`, `&-placement-bottomLeft ${n}-arrow`, `&-placement-bottomRight ${n}-arrow`].join(",")]: {
        top: 0,
        transform: "translateY(-100%)"
      },
      [`&-placement-bottom ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateX(-50%) translateY(-100%)"
      },
      [`&-placement-bottomLeft ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: h
        }
      },
      [`&-placement-bottomRight ${n}-arrow`]: {
        right: {
          _skip_check_: !0,
          value: h
        }
      },
      // >>>>> Left
      [[`&-placement-left ${n}-arrow`, `&-placement-leftTop ${n}-arrow`, `&-placement-leftBottom ${n}-arrow`].join(",")]: {
        right: {
          _skip_check_: !0,
          value: 0
        },
        transform: "translateX(100%) rotate(90deg)"
      },
      [`&-placement-left ${n}-arrow`]: {
        top: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateY(-50%) translateX(100%) rotate(90deg)"
      },
      [`&-placement-leftTop ${n}-arrow`]: {
        top: d
      },
      [`&-placement-leftBottom ${n}-arrow`]: {
        bottom: d
      },
      // >>>>> Right
      [[`&-placement-right ${n}-arrow`, `&-placement-rightTop ${n}-arrow`, `&-placement-rightBottom ${n}-arrow`].join(",")]: {
        left: {
          _skip_check_: !0,
          value: 0
        },
        transform: "translateX(-100%) rotate(-90deg)"
      },
      [`&-placement-right ${n}-arrow`]: {
        top: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
      },
      [`&-placement-rightTop ${n}-arrow`]: {
        top: d
      },
      [`&-placement-rightBottom ${n}-arrow`]: {
        bottom: d
      },
      // =========================== Offset ============================
      // Offset the popover to account for the dropdown arrow
      // >>>>> Top
      [KO(["&-placement-topLeft", "&-placement-top", "&-placement-topRight"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
        paddingBottom: p
      },
      // >>>>> Bottom
      [KO(["&-placement-bottomLeft", "&-placement-bottom", "&-placement-bottomRight"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
        paddingTop: p
      },
      // >>>>> Left
      [KO(["&-placement-leftTop", "&-placement-left", "&-placement-leftBottom"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
        paddingRight: {
          _skip_check_: !0,
          value: p
        }
      },
      // >>>>> Right
      [KO(["&-placement-rightTop", "&-placement-right", "&-placement-rightBottom"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
        paddingLeft: {
          _skip_check_: !0,
          value: p
        }
      }
    }
  };
}
const j3e = (t) => {
  const {
    componentCls: e,
    // ant-tooltip
    tooltipMaxWidth: n,
    tooltipColor: r,
    tooltipBg: i,
    tooltipBorderRadius: a,
    zIndexPopup: o,
    controlHeight: s,
    boxShadowSecondary: l,
    paddingSM: u,
    paddingXS: c,
    tooltipRadiusOuter: f
  } = t;
  return [
    {
      [e]: k(k(k(k({}, Gn(t)), {
        position: "absolute",
        zIndex: o,
        display: "block",
        "&": [{
          width: "max-content"
        }, {
          width: "intrinsic"
        }],
        maxWidth: n,
        visibility: "visible",
        "&-hidden": {
          display: "none"
        },
        "--antd-arrow-background-color": i,
        // Wrapper for the tooltip content
        [`${e}-inner`]: {
          minWidth: s,
          minHeight: s,
          padding: `${u / 2}px ${c}px`,
          color: r,
          textAlign: "start",
          textDecoration: "none",
          wordWrap: "break-word",
          backgroundColor: i,
          borderRadius: a,
          boxShadow: l
        },
        // Limit left and right placement radius
        [["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
          [`${e}-inner`]: {
            borderRadius: Math.min(a, xie)
          }
        },
        [`${e}-content`]: {
          position: "relative"
        }
      }), kLe(t, (d, h) => {
        let {
          darkColor: p
        } = h;
        return {
          [`&${e}-${d}`]: {
            [`${e}-inner`]: {
              backgroundColor: p
            },
            [`${e}-arrow`]: {
              "--antd-arrow-background-color": p
            }
          }
        };
      })), {
        // RTL
        "&-rtl": {
          direction: "rtl"
        }
      })
    },
    // Arrow Style
    G3e(bn(t, {
      borderRadiusOuter: f
    }), {
      colorBg: "var(--antd-arrow-background-color)",
      showArrowCls: "",
      contentRadius: a,
      limitVerticalRadius: !0
    }),
    // Pure Render
    {
      [`${e}-pure`]: {
        position: "relative",
        maxWidth: "none"
      }
    }
  ];
}, Z3e = (t, e) => pr("Tooltip", (r) => {
  if ((e == null ? void 0 : e.value) === !1)
    return [];
  const {
    borderRadius: i,
    colorTextLightSolid: a,
    colorBgDefault: o,
    borderRadiusOuter: s
  } = r, l = bn(r, {
    // default variables
    tooltipMaxWidth: 250,
    tooltipColor: a,
    tooltipBorderRadius: i,
    tooltipBg: o,
    tooltipRadiusOuter: s > 4 ? 4 : s
  });
  return [j3e(l), B2(r, "zoom-big-fast")];
}, (r) => {
  let {
    zIndexPopupBase: i,
    colorBgSpotlight: a
  } = r;
  return {
    zIndexPopup: i + 70,
    colorBgDefault: a
  };
})(t), U3e = (t, e) => {
  const n = {}, r = k({}, t);
  return e.forEach((i) => {
    t && i in t && (n[i] = t[i], delete r[i]);
  }), {
    picked: n,
    omitted: r
  };
}, wie = () => k(k({}, N3e()), {
  title: oe.any
}), X3e = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ATooltip",
  inheritAttrs: !1,
  props: li(wie(), {
    trigger: "hover",
    align: {},
    placement: "top",
    mouseEnterDelay: 0.1,
    mouseLeaveDelay: 0.1,
    arrowPointAtCenter: !1,
    autoAdjustOverflow: !0
  }),
  slots: Object,
  // emits: ['update:visible', 'visibleChange'],
  setup(t, e) {
    let {
      slots: n,
      emit: r,
      attrs: i,
      expose: a
    } = e;
    process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach((T) => {
      let [E, M] = T;
      aa(t[E] === void 0, "Tooltip", `\`${E}\` is deprecated, please use \`${M}\` instead.`);
    });
    const {
      prefixCls: o,
      getPopupContainer: s,
      direction: l,
      rootPrefixCls: u
    } = hn("tooltip", t), c = V(() => {
      var T;
      return (T = t.open) !== null && T !== void 0 ? T : t.visible;
    }), f = ee(Sie([t.open, t.visible])), d = ee();
    let h;
    me(c, (T) => {
      en.cancel(h), h = en(() => {
        f.value = !!T;
      });
    });
    const p = () => {
      var T;
      const E = (T = t.title) !== null && T !== void 0 ? T : n.title;
      return !E && E !== 0;
    }, v = (T) => {
      const E = p();
      c.value === void 0 && (f.value = E ? !1 : T), E || (r("update:visible", T), r("visibleChange", T), r("update:open", T), r("openChange", T));
    };
    a({
      getPopupDomNode: () => d.value.getPopupDomNode(),
      open: f,
      forcePopupAlign: () => {
        var T;
        return (T = d.value) === null || T === void 0 ? void 0 : T.forcePopupAlign();
      }
    });
    const m = V(() => {
      var T;
      const {
        builtinPlacements: E,
        autoAdjustOverflow: M,
        arrow: R,
        arrowPointAtCenter: N
      } = t;
      let I = N;
      return typeof R == "object" && (I = (T = R.pointAtCenter) !== null && T !== void 0 ? T : N), E || V3e({
        arrowPointAtCenter: I,
        autoAdjustOverflow: M
      });
    }), y = (T) => T || T === "", _ = (T) => {
      const E = T.type;
      if (typeof E == "object" && T.props && ((E.__ANT_BUTTON === !0 || E === "button") && y(T.props.disabled) || E.__ANT_SWITCH === !0 && (y(T.props.disabled) || y(T.props.loading)) || E.__ANT_RADIO === !0 && y(T.props.disabled))) {
        const {
          picked: M,
          omitted: R
        } = U3e(lke(T), ["position", "left", "right", "top", "bottom", "float", "display", "zIndex"]), N = k(k({
          display: "inline-block"
        }, M), {
          cursor: "not-allowed",
          lineHeight: 1,
          width: T.props && T.props.block ? "100%" : void 0
        }), I = k(k({}, R), {
          pointerEvents: "none"
        }), B = Or(T, {
          style: I
        }, !0);
        return D("span", {
          style: N,
          class: `${o.value}-disabled-compatible-wrapper`
        }, [B]);
      }
      return T;
    }, O = () => {
      var T, E;
      return (T = t.title) !== null && T !== void 0 ? T : (E = n.title) === null || E === void 0 ? void 0 : E.call(n);
    }, S = (T, E) => {
      const M = m.value, R = Object.keys(M).find((N) => {
        var I, B;
        return M[N].points[0] === ((I = E.points) === null || I === void 0 ? void 0 : I[0]) && M[N].points[1] === ((B = E.points) === null || B === void 0 ? void 0 : B[1]);
      });
      if (R) {
        const N = T.getBoundingClientRect(), I = {
          top: "50%",
          left: "50%"
        };
        R.indexOf("top") >= 0 || R.indexOf("Bottom") >= 0 ? I.top = `${N.height - E.offset[1]}px` : (R.indexOf("Top") >= 0 || R.indexOf("bottom") >= 0) && (I.top = `${-E.offset[1]}px`), R.indexOf("left") >= 0 || R.indexOf("Right") >= 0 ? I.left = `${N.width - E.offset[0]}px` : (R.indexOf("right") >= 0 || R.indexOf("Left") >= 0) && (I.left = `${-E.offset[0]}px`), T.style.transformOrigin = `${I.left} ${I.top}`;
      }
    }, x = V(() => Q3e(o.value, t.color)), C = V(() => i["data-popover-inject"]), [P, $] = Z3e(o, V(() => !C.value));
    return () => {
      var T, E;
      const {
        openClassName: M,
        overlayClassName: R,
        overlayStyle: N,
        overlayInnerStyle: I
      } = t;
      let B = (E = Zl((T = n.default) === null || T === void 0 ? void 0 : T.call(n))) !== null && E !== void 0 ? E : null;
      B = B.length === 1 ? B[0] : B;
      let Q = f.value;
      if (c.value === void 0 && p() && (Q = !1), !B)
        return null;
      const W = _(po(B) && !uke(B) ? B : D("span", null, [B])), H = Re({
        [M || `${o.value}-open`]: !0,
        [W.props && W.props.class]: W.props && W.props.class
      }), U = Re(R, {
        [`${o.value}-rtl`]: l.value === "rtl"
      }, x.value.className, $.value), j = k(k({}, x.value.overlayStyle), I), Y = x.value.arrowStyle, ne = k(k(k({}, i), t), {
        prefixCls: o.value,
        arrow: !!t.arrow,
        getPopupContainer: s == null ? void 0 : s.value,
        builtinPlacements: m.value,
        visible: Q,
        ref: d,
        overlayClassName: U,
        overlayStyle: k(k({}, Y), N),
        overlayInnerStyle: j,
        onVisibleChange: v,
        onPopupAlign: S,
        transitionName: Wl(u.value, "zoom-big-fast", t.transitionName)
      });
      return P(D(L3e, ne, {
        default: () => [f.value ? Or(W, {
          class: H
        }) : W],
        arrowContent: () => D("span", {
          class: `${o.value}-arrow-content`
        }, null),
        overlay: O
      }));
    };
  }
}), F2 = fm(X3e), Qp = {
  adjustX: 1,
  adjustY: 1
}, Hp = [0, 0], Y3e = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Qp,
    offset: [0, -4],
    targetOffset: Hp
  },
  topCenter: {
    points: ["bc", "tc"],
    overflow: Qp,
    offset: [0, -4],
    targetOffset: Hp
  },
  topRight: {
    points: ["br", "tr"],
    overflow: Qp,
    offset: [0, -4],
    targetOffset: Hp
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Qp,
    offset: [0, 4],
    targetOffset: Hp
  },
  bottomCenter: {
    points: ["tc", "bc"],
    overflow: Qp,
    offset: [0, 4],
    targetOffset: Hp
  },
  bottomRight: {
    points: ["tr", "br"],
    overflow: Qp,
    offset: [0, 4],
    targetOffset: Hp
  }
};
var q3e = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const K3e = ae({
  compatConfig: {
    MODE: 3
  },
  props: {
    minOverlayWidthMatchTrigger: {
      type: Boolean,
      default: void 0
    },
    arrow: {
      type: Boolean,
      default: !1
    },
    prefixCls: oe.string.def("rc-dropdown"),
    transitionName: String,
    overlayClassName: oe.string.def(""),
    openClassName: String,
    animation: oe.any,
    align: oe.object,
    overlayStyle: {
      type: Object,
      default: void 0
    },
    placement: oe.string.def("bottomLeft"),
    overlay: oe.any,
    trigger: oe.oneOfType([oe.string, oe.arrayOf(oe.string)]).def("hover"),
    alignPoint: {
      type: Boolean,
      default: void 0
    },
    showAction: oe.array,
    hideAction: oe.array,
    getPopupContainer: Function,
    visible: {
      type: Boolean,
      default: void 0
    },
    defaultVisible: {
      type: Boolean,
      default: !1
    },
    mouseEnterDelay: oe.number.def(0.15),
    mouseLeaveDelay: oe.number.def(0.1)
  },
  emits: ["visibleChange", "overlayClick"],
  setup(t, e) {
    let {
      slots: n,
      emit: r,
      expose: i
    } = e;
    const a = ee(!!t.visible);
    me(() => t.visible, (h) => {
      h !== void 0 && (a.value = h);
    });
    const o = ee();
    i({
      triggerRef: o
    });
    const s = (h) => {
      t.visible === void 0 && (a.value = !1), r("overlayClick", h);
    }, l = (h) => {
      t.visible === void 0 && (a.value = h), r("visibleChange", h);
    }, u = () => {
      var h;
      const p = (h = n.overlay) === null || h === void 0 ? void 0 : h.call(n), v = {
        prefixCls: `${t.prefixCls}-menu`,
        onClick: s
      };
      return D(Wt, {
        key: Mne
      }, [t.arrow && D("div", {
        class: `${t.prefixCls}-arrow`
      }, null), Or(p, v, !1)]);
    }, c = V(() => {
      const {
        minOverlayWidthMatchTrigger: h = !t.alignPoint
      } = t;
      return h;
    }), f = () => {
      var h;
      const p = (h = n.default) === null || h === void 0 ? void 0 : h.call(n);
      return a.value && p ? Or(p[0], {
        class: t.openClassName || `${t.prefixCls}-open`
      }, !1) : p;
    }, d = V(() => !t.hideAction && t.trigger.indexOf("contextmenu") !== -1 ? ["click"] : t.hideAction);
    return () => {
      const {
        prefixCls: h,
        arrow: p,
        showAction: v,
        overlayStyle: g,
        trigger: m,
        placement: y,
        align: _,
        getPopupContainer: O,
        transitionName: S,
        animation: x,
        overlayClassName: C
      } = t, P = q3e(t, ["prefixCls", "arrow", "showAction", "overlayStyle", "trigger", "placement", "align", "getPopupContainer", "transitionName", "animation", "overlayClassName"]);
      return D(E2, te(te({}, P), {}, {
        prefixCls: h,
        ref: o,
        popupClassName: Re(C, {
          [`${h}-show-arrow`]: p
        }),
        popupStyle: g,
        builtinPlacements: Y3e,
        action: m,
        showAction: v,
        hideAction: d.value || [],
        popupPlacement: y,
        popupAlign: _,
        popupTransitionName: S,
        popupAnimation: x,
        popupVisible: a.value,
        stretch: c.value ? "minWidth" : "",
        onPopupVisibleChange: l,
        getPopupContainer: O
      }), {
        popup: u,
        default: f
      });
    };
  }
}), J3e = (t) => {
  const {
    componentCls: e,
    colorPrimary: n
  } = t;
  return {
    [e]: {
      position: "absolute",
      background: "transparent",
      pointerEvents: "none",
      boxSizing: "border-box",
      color: `var(--wave-color, ${n})`,
      boxShadow: "0 0 0 0 currentcolor",
      opacity: 0.2,
      // =================== Motion ===================
      "&.wave-motion-appear": {
        transition: [`box-shadow 0.4s ${t.motionEaseOutCirc}`, `opacity 2s ${t.motionEaseOutCirc}`].join(","),
        "&-active": {
          boxShadow: "0 0 0 6px currentcolor",
          opacity: 0
        }
      }
    }
  };
}, e6e = pr("Wave", (t) => [J3e(t)]);
function t6e(t) {
  const e = (t || "").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
  return e && e[1] && e[2] && e[3] ? !(e[1] === e[2] && e[2] === e[3]) : !0;
}
function fE(t) {
  return t && t !== "#fff" && t !== "#ffffff" && t !== "rgb(255, 255, 255)" && t !== "rgba(255, 255, 255, 1)" && t6e(t) && !/rgba\((?:\d*, ){3}0\)/.test(t) && // any transparent rgba color
  t !== "transparent";
}
function n6e(t) {
  const {
    borderTopColor: e,
    borderColor: n,
    backgroundColor: r
  } = getComputedStyle(t);
  return fE(e) ? e : fE(n) ? n : fE(r) ? r : null;
}
function dE(t) {
  return Number.isNaN(t) ? 0 : t;
}
const r6e = ae({
  props: {
    target: sn(),
    className: String
  },
  setup(t) {
    const e = ve(null), [n, r] = tr(null), [i, a] = tr([]), [o, s] = tr(0), [l, u] = tr(0), [c, f] = tr(0), [d, h] = tr(0), [p, v] = tr(!1);
    function g() {
      const {
        target: C
      } = t, P = getComputedStyle(C);
      r(n6e(C));
      const $ = P.position === "static", {
        borderLeftWidth: T,
        borderTopWidth: E
      } = P;
      s($ ? C.offsetLeft : dE(-parseFloat(T))), u($ ? C.offsetTop : dE(-parseFloat(E))), f(C.offsetWidth), h(C.offsetHeight);
      const {
        borderTopLeftRadius: M,
        borderTopRightRadius: R,
        borderBottomLeftRadius: N,
        borderBottomRightRadius: I
      } = P;
      a([M, R, I, N].map((B) => dE(parseFloat(B))));
    }
    let m, y, _;
    const O = () => {
      clearTimeout(_), en.cancel(y), m == null || m.disconnect();
    }, S = () => {
      var C;
      const P = (C = e.value) === null || C === void 0 ? void 0 : C.parentElement;
      P && (Ih(null, P), P.parentElement && P.parentElement.removeChild(P));
    };
    _t(() => {
      O(), _ = setTimeout(() => {
        S();
      }, 5e3);
      const {
        target: C
      } = t;
      C && (y = en(() => {
        g(), v(!0);
      }), typeof ResizeObserver < "u" && (m = new ResizeObserver(g), m.observe(C)));
    }), Qt(() => {
      O();
    });
    const x = (C) => {
      C.propertyName === "opacity" && S();
    };
    return () => {
      if (!p.value)
        return null;
      const C = {
        left: `${o.value}px`,
        top: `${l.value}px`,
        width: `${c.value}px`,
        height: `${d.value}px`,
        borderRadius: i.value.map((P) => `${P}px`).join(" ")
      };
      return n && (C["--wave-color"] = n.value), D(mo, {
        appear: !0,
        name: "wave-motion",
        appearFromClass: "wave-motion-appear",
        appearActiveClass: "wave-motion-appear",
        appearToClass: "wave-motion-appear wave-motion-appear-active"
      }, {
        default: () => [D("div", {
          ref: e,
          class: t.className,
          style: C,
          onTransitionend: x
        }, null)]
      });
    };
  }
});
function i6e(t, e) {
  const n = document.createElement("div");
  n.style.position = "absolute", n.style.left = "0px", n.style.top = "0px", t == null || t.insertBefore(n, t == null ? void 0 : t.firstChild), Ih(D(r6e, {
    target: t,
    className: e
  }, null), n);
}
function a6e(t, e, n) {
  function r() {
    var i;
    const a = xu(t);
    !((i = n == null ? void 0 : n.value) === null || i === void 0) && i.disabled || !a || i6e(a, e.value);
  }
  return r;
}
const o6e = ae({
  compatConfig: {
    MODE: 3
  },
  name: "Wave",
  props: {
    disabled: Boolean
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = In(), {
      prefixCls: i,
      wave: a
    } = hn("wave", t), [, o] = e6e(i), s = a6e(r, V(() => Re(i.value, o.value)), a);
    let l;
    const u = () => {
      xu(r).removeEventListener("click", l, !0);
    };
    return _t(() => {
      me(() => t.disabled, () => {
        u(), Bt(() => {
          const c = xu(r);
          c == null || c.removeEventListener("click", l, !0), !(!c || c.nodeType !== 1 || t.disabled) && (l = (f) => {
            f.target.tagName === "INPUT" || !Hre(f.target) || // No need wave
            !c.getAttribute || c.getAttribute("disabled") || c.disabled || c.className.includes("disabled") || c.className.includes("-leave") || s();
          }, c.addEventListener("click", l, !0));
        });
      }, {
        immediate: !0,
        flush: "post"
      });
    }), Qt(() => {
      u();
    }), () => {
      var c;
      return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
    };
  }
});
function Cie(t) {
  return t === "danger" ? {
    danger: !0
  } : {
    type: t
  };
}
const s6e = () => ({
  prefixCls: String,
  type: String,
  htmlType: {
    type: String,
    default: "button"
  },
  shape: {
    type: String
  },
  size: {
    type: String
  },
  loading: {
    type: [Boolean, Object],
    default: () => !1
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  ghost: {
    type: Boolean,
    default: void 0
  },
  block: {
    type: Boolean,
    default: void 0
  },
  danger: {
    type: Boolean,
    default: void 0
  },
  icon: oe.any,
  href: String,
  target: String,
  title: String,
  onClick: Uw(),
  onMousedown: Uw()
}), yQ = (t) => {
  t && (t.style.width = "0px", t.style.opacity = "0", t.style.transform = "scale(0)");
}, bQ = (t) => {
  Bt(() => {
    t && (t.style.width = `${t.scrollWidth}px`, t.style.opacity = "1", t.style.transform = "scale(1)");
  });
}, _Q = (t) => {
  t && t.style && (t.style.width = null, t.style.opacity = null, t.style.transform = null);
}, l6e = ae({
  compatConfig: {
    MODE: 3
  },
  name: "LoadingIcon",
  props: {
    prefixCls: String,
    loading: [Boolean, Object],
    existIcon: Boolean
  },
  setup(t) {
    return () => {
      const {
        existIcon: e,
        prefixCls: n,
        loading: r
      } = t;
      if (e)
        return D("span", {
          class: `${n}-loading-icon`
        }, [D(Ql, null, null)]);
      const i = !!r;
      return D(mo, {
        name: `${n}-loading-icon-motion`,
        onBeforeEnter: yQ,
        onEnter: bQ,
        onAfterEnter: _Q,
        onBeforeLeave: bQ,
        onLeave: (a) => {
          setTimeout(() => {
            yQ(a);
          });
        },
        onAfterLeave: _Q
      }, {
        default: () => [i ? D("span", {
          class: `${n}-loading-icon`
        }, [D(Ql, null, null)]) : null]
      });
    };
  }
}), OQ = (t, e) => ({
  // Border
  [`> span, > ${t}`]: {
    "&:not(:last-child)": {
      [`&, & > ${t}`]: {
        "&:not(:disabled)": {
          borderInlineEndColor: e
        }
      }
    },
    "&:not(:first-child)": {
      [`&, & > ${t}`]: {
        "&:not(:disabled)": {
          borderInlineStartColor: e
        }
      }
    }
  }
}), u6e = (t) => {
  const {
    componentCls: e,
    fontSize: n,
    lineWidth: r,
    colorPrimaryHover: i,
    colorErrorHover: a
  } = t;
  return {
    [`${e}-group`]: [
      {
        position: "relative",
        display: "inline-flex",
        // Border
        [`> span, > ${e}`]: {
          "&:not(:last-child)": {
            [`&, & > ${e}`]: {
              borderStartEndRadius: 0,
              borderEndEndRadius: 0
            }
          },
          "&:not(:first-child)": {
            marginInlineStart: -r,
            [`&, & > ${e}`]: {
              borderStartStartRadius: 0,
              borderEndStartRadius: 0
            }
          }
        },
        [e]: {
          position: "relative",
          zIndex: 1,
          "&:hover,\n          &:focus,\n          &:active": {
            zIndex: 2
          },
          "&[disabled]": {
            zIndex: 0
          }
        },
        [`${e}-icon-only`]: {
          fontSize: n
        }
      },
      // Border Color
      OQ(`${e}-primary`, i),
      OQ(`${e}-danger`, a)
    ]
  };
};
function c6e(t, e) {
  return {
    // border collapse
    [`&-item:not(${e}-last-item)`]: {
      marginBottom: -t.lineWidth
    },
    "&-item": {
      "&:hover,&:focus,&:active": {
        zIndex: 2
      },
      "&[disabled]": {
        zIndex: 0
      }
    }
  };
}
function f6e(t, e) {
  return {
    [`&-item:not(${e}-first-item):not(${e}-last-item)`]: {
      borderRadius: 0
    },
    [`&-item${e}-first-item:not(${e}-last-item)`]: {
      [`&, &${t}-sm, &${t}-lg`]: {
        borderEndEndRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`&-item${e}-last-item:not(${e}-first-item)`]: {
      [`&, &${t}-sm, &${t}-lg`]: {
        borderStartStartRadius: 0,
        borderStartEndRadius: 0
      }
    }
  };
}
function d6e(t) {
  const e = `${t.componentCls}-compact-vertical`;
  return {
    [e]: k(k({}, c6e(t, e)), f6e(t.componentCls, e))
  };
}
const h6e = (t) => {
  const {
    componentCls: e,
    iconCls: n
  } = t;
  return {
    [e]: {
      outline: "none",
      position: "relative",
      display: "inline-block",
      fontWeight: 400,
      whiteSpace: "nowrap",
      textAlign: "center",
      backgroundImage: "none",
      backgroundColor: "transparent",
      border: `${t.lineWidth}px ${t.lineType} transparent`,
      cursor: "pointer",
      transition: `all ${t.motionDurationMid} ${t.motionEaseInOut}`,
      userSelect: "none",
      touchAction: "manipulation",
      lineHeight: t.lineHeight,
      color: t.colorText,
      "> span": {
        display: "inline-block"
      },
      // Leave a space between icon and text.
      [`> ${n} + span, > span + ${n}`]: {
        marginInlineStart: t.marginXS
      },
      "> a": {
        color: "currentColor"
      },
      "&:not(:disabled)": k({}, T2(t)),
      // make `btn-icon-only` not too narrow
      [`&-icon-only${e}-compact-item`]: {
        flex: "none"
      },
      // Special styles for Primary Button
      [`&-compact-item${e}-primary`]: {
        [`&:not([disabled]) + ${e}-compact-item${e}-primary:not([disabled])`]: {
          position: "relative",
          "&:before": {
            position: "absolute",
            top: -t.lineWidth,
            insetInlineStart: -t.lineWidth,
            display: "inline-block",
            width: t.lineWidth,
            height: `calc(100% + ${t.lineWidth * 2}px)`,
            backgroundColor: t.colorPrimaryHover,
            content: '""'
          }
        }
      },
      // Special styles for Primary Button
      "&-compact-vertical-item": {
        [`&${e}-primary`]: {
          [`&:not([disabled]) + ${e}-compact-vertical-item${e}-primary:not([disabled])`]: {
            position: "relative",
            "&:before": {
              position: "absolute",
              top: -t.lineWidth,
              insetInlineStart: -t.lineWidth,
              display: "inline-block",
              width: `calc(100% + ${t.lineWidth * 2}px)`,
              height: t.lineWidth,
              backgroundColor: t.colorPrimaryHover,
              content: '""'
            }
          }
        }
      }
    }
  };
}, Bu = (t, e) => ({
  "&:not(:disabled)": {
    "&:hover": t,
    "&:active": e
  }
}), p6e = (t) => ({
  minWidth: t.controlHeight,
  paddingInlineStart: 0,
  paddingInlineEnd: 0,
  borderRadius: "50%"
}), v6e = (t) => ({
  borderRadius: t.controlHeight,
  paddingInlineStart: t.controlHeight / 2,
  paddingInlineEnd: t.controlHeight / 2
}), IR = (t) => ({
  cursor: "not-allowed",
  borderColor: t.colorBorder,
  color: t.colorTextDisabled,
  backgroundColor: t.colorBgContainerDisabled,
  boxShadow: "none"
}), aC = (t, e, n, r, i, a, o) => ({
  [`&${t}-background-ghost`]: k(k({
    color: e || void 0,
    backgroundColor: "transparent",
    borderColor: n || void 0,
    boxShadow: "none"
  }, Bu(k({
    backgroundColor: "transparent"
  }, a), k({
    backgroundColor: "transparent"
  }, o))), {
    "&:disabled": {
      cursor: "not-allowed",
      color: r || void 0,
      borderColor: i || void 0
    }
  })
}), b8 = (t) => ({
  "&:disabled": k({}, IR(t))
}), Tie = (t) => k({}, b8(t)), oC = (t) => ({
  "&:disabled": {
    cursor: "not-allowed",
    color: t.colorTextDisabled
  }
}), Pie = (t) => k(k(k(k(k({}, Tie(t)), {
  backgroundColor: t.colorBgContainer,
  borderColor: t.colorBorder,
  boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`
}), Bu({
  color: t.colorPrimaryHover,
  borderColor: t.colorPrimaryHover
}, {
  color: t.colorPrimaryActive,
  borderColor: t.colorPrimaryActive
})), aC(t.componentCls, t.colorBgContainer, t.colorBgContainer, t.colorTextDisabled, t.colorBorder)), {
  [`&${t.componentCls}-dangerous`]: k(k(k({
    color: t.colorError,
    borderColor: t.colorError
  }, Bu({
    color: t.colorErrorHover,
    borderColor: t.colorErrorBorderHover
  }, {
    color: t.colorErrorActive,
    borderColor: t.colorErrorActive
  })), aC(t.componentCls, t.colorError, t.colorError, t.colorTextDisabled, t.colorBorder)), b8(t))
}), g6e = (t) => k(k(k(k(k({}, Tie(t)), {
  color: t.colorTextLightSolid,
  backgroundColor: t.colorPrimary,
  boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`
}), Bu({
  color: t.colorTextLightSolid,
  backgroundColor: t.colorPrimaryHover
}, {
  color: t.colorTextLightSolid,
  backgroundColor: t.colorPrimaryActive
})), aC(t.componentCls, t.colorPrimary, t.colorPrimary, t.colorTextDisabled, t.colorBorder, {
  color: t.colorPrimaryHover,
  borderColor: t.colorPrimaryHover
}, {
  color: t.colorPrimaryActive,
  borderColor: t.colorPrimaryActive
})), {
  [`&${t.componentCls}-dangerous`]: k(k(k({
    backgroundColor: t.colorError,
    boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`
  }, Bu({
    backgroundColor: t.colorErrorHover
  }, {
    backgroundColor: t.colorErrorActive
  })), aC(t.componentCls, t.colorError, t.colorError, t.colorTextDisabled, t.colorBorder, {
    color: t.colorErrorHover,
    borderColor: t.colorErrorHover
  }, {
    color: t.colorErrorActive,
    borderColor: t.colorErrorActive
  })), b8(t))
}), m6e = (t) => k(k({}, Pie(t)), {
  borderStyle: "dashed"
}), y6e = (t) => k(k(k({
  color: t.colorLink
}, Bu({
  color: t.colorLinkHover
}, {
  color: t.colorLinkActive
})), oC(t)), {
  [`&${t.componentCls}-dangerous`]: k(k({
    color: t.colorError
  }, Bu({
    color: t.colorErrorHover
  }, {
    color: t.colorErrorActive
  })), oC(t))
}), b6e = (t) => k(k(k({}, Bu({
  color: t.colorText,
  backgroundColor: t.colorBgTextHover
}, {
  color: t.colorText,
  backgroundColor: t.colorBgTextActive
})), oC(t)), {
  [`&${t.componentCls}-dangerous`]: k(k({
    color: t.colorError
  }, oC(t)), Bu({
    color: t.colorErrorHover,
    backgroundColor: t.colorErrorBg
  }, {
    color: t.colorErrorHover,
    backgroundColor: t.colorErrorBg
  }))
}), _6e = (t) => k(k({}, IR(t)), {
  [`&${t.componentCls}:hover`]: k({}, IR(t))
}), O6e = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [`${e}-default`]: Pie(t),
    [`${e}-primary`]: g6e(t),
    [`${e}-dashed`]: m6e(t),
    [`${e}-link`]: y6e(t),
    [`${e}-text`]: b6e(t),
    [`${e}-disabled`]: _6e(t)
  };
}, _8 = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  const {
    componentCls: n,
    iconCls: r,
    controlHeight: i,
    fontSize: a,
    lineHeight: o,
    lineWidth: s,
    borderRadius: l,
    buttonPaddingHorizontal: u
  } = t, c = Math.max(0, (i - a * o) / 2 - s), f = u - s, d = `${n}-icon-only`;
  return [
    // Size
    {
      [`${n}${e}`]: {
        fontSize: a,
        height: i,
        padding: `${c}px ${f}px`,
        borderRadius: l,
        [`&${d}`]: {
          width: i,
          paddingInlineStart: 0,
          paddingInlineEnd: 0,
          [`&${n}-round`]: {
            width: "auto"
          },
          "> span": {
            transform: "scale(1.143)"
            // 14px -> 16px
          }
        },
        // Loading
        [`&${n}-loading`]: {
          opacity: t.opacityLoading,
          cursor: "default"
        },
        [`${n}-loading-icon`]: {
          transition: `width ${t.motionDurationSlow} ${t.motionEaseInOut}, opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`
        },
        [`&:not(${d}) ${n}-loading-icon > ${r}`]: {
          marginInlineEnd: t.marginXS
        }
      }
    },
    // Shape - patch prefixCls again to override solid border radius style
    {
      [`${n}${n}-circle${e}`]: p6e(t)
    },
    {
      [`${n}${n}-round${e}`]: v6e(t)
    }
  ];
}, S6e = (t) => _8(t), x6e = (t) => {
  const e = bn(t, {
    controlHeight: t.controlHeightSM,
    padding: t.paddingXS,
    buttonPaddingHorizontal: 8,
    borderRadius: t.borderRadiusSM
  });
  return _8(e, `${t.componentCls}-sm`);
}, w6e = (t) => {
  const e = bn(t, {
    controlHeight: t.controlHeightLG,
    fontSize: t.fontSizeLG,
    borderRadius: t.borderRadiusLG
  });
  return _8(e, `${t.componentCls}-lg`);
}, C6e = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [e]: {
      [`&${e}-block`]: {
        width: "100%"
      }
    }
  };
}, T6e = pr("Button", (t) => {
  const {
    controlTmpOutline: e,
    paddingContentHorizontal: n
  } = t, r = bn(t, {
    colorOutlineDefault: e,
    buttonPaddingHorizontal: n
  });
  return [
    // Shared
    h6e(r),
    // Size
    x6e(r),
    S6e(r),
    w6e(r),
    // Block
    C6e(r),
    // Group (type, ghost, danger, disabled, loading)
    O6e(r),
    // Button Group
    u6e(r),
    // Space Compact
    z2(t, {
      focus: !1
    }),
    d6e(t)
  ];
}), P6e = () => ({
  prefixCls: String,
  size: {
    type: String
  }
}), $ie = h8(), DR = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AButtonGroup",
  props: P6e(),
  setup(t, e) {
    let {
      slots: n
    } = e;
    const {
      prefixCls: r,
      direction: i
    } = hn("btn-group", t), [, , a] = pm();
    $ie.useProvide(zn({
      size: V(() => t.size)
    }));
    const o = V(() => {
      const {
        size: s
      } = t;
      let l = "";
      switch (s) {
        case "large":
          l = "lg";
          break;
        case "small":
          l = "sm";
          break;
        case "middle":
        case void 0:
          break;
        default:
          lo(!s, "Button.Group", "Invalid prop `size`.");
      }
      return {
        [`${r.value}`]: !0,
        [`${r.value}-${l}`]: l,
        [`${r.value}-rtl`]: i.value === "rtl",
        [a.value]: !0
      };
    });
    return () => {
      var s;
      return D("div", {
        class: o.value
      }, [qr((s = n.default) === null || s === void 0 ? void 0 : s.call(n))]);
    };
  }
}), SQ = /^[\u4e00-\u9fa5]{2}$/, xQ = SQ.test.bind(SQ);
function JO(t) {
  return t === "text" || t === "link";
}
const ra = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AButton",
  inheritAttrs: !1,
  __ANT_BUTTON: !0,
  props: li(s6e(), {
    type: "default"
  }),
  slots: Object,
  // emits: ['click', 'mousedown'],
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      emit: i,
      expose: a
    } = e;
    const {
      prefixCls: o,
      autoInsertSpaceInButton: s,
      direction: l,
      size: u
    } = hn("btn", t), [c, f] = T6e(o), d = $ie.useInject(), h = Vl(), p = V(() => {
      var I;
      return (I = t.disabled) !== null && I !== void 0 ? I : h.value;
    }), v = ve(null), g = ve(void 0);
    let m = !1;
    const y = ve(!1), _ = ve(!1), O = V(() => s.value !== !1), {
      compactSize: S,
      compactItemClassnames: x
    } = L2(o, l), C = V(() => typeof t.loading == "object" && t.loading.delay ? t.loading.delay || !0 : !!t.loading);
    me(C, (I) => {
      clearTimeout(g.value), typeof C.value == "number" ? g.value = setTimeout(() => {
        y.value = I;
      }, C.value) : y.value = I;
    }, {
      immediate: !0
    });
    const P = V(() => {
      const {
        type: I,
        shape: B = "default",
        ghost: Q,
        block: W,
        danger: H
      } = t, U = o.value, j = {
        large: "lg",
        small: "sm",
        middle: void 0
      }, Y = S.value || (d == null ? void 0 : d.size) || u.value, ne = Y && j[Y] || "";
      return [x.value, {
        [f.value]: !0,
        [`${U}`]: !0,
        [`${U}-${B}`]: B !== "default" && B,
        [`${U}-${I}`]: I,
        [`${U}-${ne}`]: ne,
        [`${U}-loading`]: y.value,
        [`${U}-background-ghost`]: Q && !JO(I),
        [`${U}-two-chinese-chars`]: _.value && O.value,
        [`${U}-block`]: W,
        [`${U}-dangerous`]: !!H,
        [`${U}-rtl`]: l.value === "rtl"
      }];
    }), $ = () => {
      const I = v.value;
      if (!I || s.value === !1)
        return;
      const B = I.textContent;
      m && xQ(B) ? _.value || (_.value = !0) : _.value && (_.value = !1);
    }, T = (I) => {
      if (y.value || p.value) {
        I.preventDefault();
        return;
      }
      i("click", I);
    }, E = (I) => {
      i("mousedown", I);
    }, M = (I, B) => {
      const Q = B ? " " : "";
      if (I.type === KT) {
        let W = I.children.trim();
        return xQ(W) && (W = W.split("").join(Q)), D("span", null, [W]);
      }
      return I;
    };
    return Vt(() => {
      lo(!(t.ghost && JO(t.type)), "Button", "`link` or `text` button can't be a `ghost` button.");
    }), _t($), rp($), Qt(() => {
      g.value && clearTimeout(g.value);
    }), a({
      focus: () => {
        var I;
        (I = v.value) === null || I === void 0 || I.focus();
      },
      blur: () => {
        var I;
        (I = v.value) === null || I === void 0 || I.blur();
      }
    }), () => {
      var I, B;
      const {
        icon: Q = (I = n.icon) === null || I === void 0 ? void 0 : I.call(n)
      } = t, W = qr((B = n.default) === null || B === void 0 ? void 0 : B.call(n));
      m = W.length === 1 && !Q && !JO(t.type);
      const {
        type: H,
        htmlType: U,
        href: j,
        title: Y,
        target: ne
      } = t, fe = y.value ? "loading" : Q, ue = k(k({}, r), {
        title: Y,
        disabled: p.value,
        class: [P.value, r.class, {
          [`${o.value}-icon-only`]: W.length === 0 && !!fe
        }],
        onClick: T,
        onMousedown: E
      });
      p.value || delete ue.disabled;
      const ye = Q && !y.value ? Q : D(l6e, {
        existIcon: !!Q,
        prefixCls: o.value,
        loading: !!y.value
      }, null), se = W.map((re) => M(re, m && O.value));
      if (j !== void 0)
        return c(D("a", te(te({}, ue), {}, {
          href: j,
          target: ne,
          ref: v
        }), [ye, se]));
      let he = D("button", te(te({}, ue), {}, {
        ref: v,
        type: U
      }), [ye, se]);
      if (!JO(H)) {
        const re = /* @__PURE__ */ function() {
          return he;
        }();
        he = D(o6e, {
          ref: "wave",
          disabled: !!y.value
        }, {
          default: () => [re]
        });
      }
      return c(he);
    };
  }
});
ra.Group = DR;
ra.install = function(t) {
  return t.component(ra.name, ra), t.component(DR.name, DR), t;
};
var $6e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "ellipsis", theme: "outlined" };
function wQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      A6e(t, i, n[i]);
    });
  }
  return t;
}
function A6e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var W2 = function(e, n) {
  var r = wQ({}, e, n.attrs);
  return D(Rt, wQ({}, r, {
    icon: $6e
  }), null);
};
W2.displayName = "EllipsisOutlined";
W2.inheritAttrs = !1;
var E6e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, name: "right", theme: "outlined" };
function CQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      M6e(t, i, n[i]);
    });
  }
  return t;
}
function M6e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var Q2 = function(e, n) {
  var r = CQ({}, e, n.attrs);
  return D(Rt, CQ({}, r, {
    icon: E6e
  }), null);
};
Q2.displayName = "RightOutlined";
Q2.inheritAttrs = !1;
const Aie = Symbol("OverrideContextKey"), Eie = () => et(Aie, void 0), I6e = (t) => {
  var e, n, r;
  const {
    prefixCls: i,
    mode: a,
    selectable: o,
    validator: s,
    onClick: l,
    expandIcon: u
  } = Eie() || {};
  Et(Aie, {
    prefixCls: V(() => {
      var c, f;
      return (f = (c = t.prefixCls) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : i == null ? void 0 : i.value;
    }),
    mode: V(() => {
      var c, f;
      return (f = (c = t.mode) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : a == null ? void 0 : a.value;
    }),
    selectable: V(() => {
      var c, f;
      return (f = (c = t.selectable) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : o == null ? void 0 : o.value;
    }),
    validator: (e = t.validator) !== null && e !== void 0 ? e : s,
    onClick: (n = t.onClick) !== null && n !== void 0 ? n : l,
    expandIcon: (r = t.expandIcon) !== null && r !== void 0 ? r : u == null ? void 0 : u.value
  });
};
function D6e(t, e, n, r) {
  let i;
  if (i !== void 0)
    return !!i;
  if (t === e)
    return !0;
  if (typeof t != "object" || !t || typeof e != "object" || !e)
    return !1;
  const a = Object.keys(t), o = Object.keys(e);
  if (a.length !== o.length)
    return !1;
  const s = Object.prototype.hasOwnProperty.bind(e);
  for (let l = 0; l < a.length; l++) {
    const u = a[l];
    if (!s(u))
      return !1;
    const c = t[u], f = e[u];
    if (i = void 0, i === !1 || i === void 0 && c !== f)
      return !1;
  }
  return !0;
}
function O0(t, e) {
  return D6e(es(t), es(e));
}
const Mie = Symbol("menuContextKey"), Iie = (t) => {
  Et(Mie, t);
}, nc = () => et(Mie), Die = Symbol("ForceRenderKey"), R6e = (t) => {
  Et(Die, t);
}, Rie = () => et(Die, !1), kie = Symbol("menuFirstLevelContextKey"), Lie = (t) => {
  Et(kie, t);
}, k6e = () => et(kie, !0), sC = ae({
  compatConfig: {
    MODE: 3
  },
  name: "MenuContextProvider",
  inheritAttrs: !1,
  props: {
    mode: {
      type: String,
      default: void 0
    },
    overflowDisabled: {
      type: Boolean,
      default: void 0
    }
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = nc(), i = k({}, r);
    return t.mode !== void 0 && (i.mode = Lr(t, "mode")), t.overflowDisabled !== void 0 && (i.overflowDisabled = Lr(t, "overflowDisabled")), Iie(i), () => {
      var a;
      return (a = n.default) === null || a === void 0 ? void 0 : a.call(n);
    };
  }
}), L6e = Iie, N6e = Symbol("siderCollapsed"), eS = "$$__vc-menu-more__key", Nie = Symbol("KeyPathContext"), O8 = () => et(Nie, {
  parentEventKeys: V(() => []),
  parentKeys: V(() => []),
  parentInfo: {}
}), B6e = (t, e, n) => {
  const {
    parentEventKeys: r,
    parentKeys: i
  } = O8(), a = V(() => [...r.value, t]), o = V(() => [...i.value, e]);
  return Et(Nie, {
    parentEventKeys: a,
    parentKeys: o,
    parentInfo: n
  }), o;
}, Bie = Symbol("measure"), TQ = ae({
  compatConfig: {
    MODE: 3
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    return Et(Bie, !0), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
}), S8 = () => et(Bie, !1), z6e = B6e;
function zie(t) {
  const {
    mode: e,
    rtl: n,
    inlineIndent: r
  } = nc();
  return V(() => e.value !== "inline" ? null : n.value ? {
    paddingRight: `${t.value * r.value}px`
  } : {
    paddingLeft: `${t.value * r.value}px`
  });
}
let V6e = 0;
const F6e = () => ({
  id: String,
  role: String,
  disabled: Boolean,
  danger: Boolean,
  title: {
    type: [String, Boolean],
    default: void 0
  },
  icon: oe.any,
  onMouseenter: Function,
  onMouseleave: Function,
  onClick: Function,
  onKeydown: Function,
  onFocus: Function,
  // Internal user prop
  originItemValue: sn()
}), Lg = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItem",
  inheritAttrs: !1,
  props: F6e(),
  slots: Object,
  setup(t, e) {
    let {
      slots: n,
      emit: r,
      attrs: i
    } = e;
    const a = In(), o = S8(), s = typeof a.vnode.key == "symbol" ? String(a.vnode.key) : a.vnode.key;
    lo(typeof a.vnode.key != "symbol", "MenuItem", `MenuItem \`:key="${String(s)}"\` not support Symbol type`);
    const l = `menu_item_${++V6e}_$$_${s}`, {
      parentEventKeys: u,
      parentKeys: c
    } = O8(), {
      prefixCls: f,
      activeKeys: d,
      disabled: h,
      changeActiveKeys: p,
      rtl: v,
      inlineCollapsed: g,
      siderCollapsed: m,
      onItemClick: y,
      selectedKeys: _,
      registerMenuInfo: O,
      unRegisterMenuInfo: S
    } = nc(), x = k6e(), C = ve(!1), P = V(() => [...c.value, s]);
    O(l, {
      eventKey: l,
      key: s,
      parentEventKeys: u,
      parentKeys: c,
      isLeaf: !0
    }), Qt(() => {
      S(l);
    }), me(d, () => {
      C.value = !!d.value.find((j) => j === s);
    }, {
      immediate: !0
    });
    const T = V(() => h.value || t.disabled), E = V(() => _.value.includes(s)), M = V(() => {
      const j = `${f.value}-item`;
      return {
        [`${j}`]: !0,
        [`${j}-danger`]: t.danger,
        [`${j}-active`]: C.value,
        [`${j}-selected`]: E.value,
        [`${j}-disabled`]: T.value
      };
    }), R = (j) => ({
      key: s,
      eventKey: l,
      keyPath: P.value,
      eventKeyPath: [...u.value, l],
      domEvent: j,
      item: k(k({}, t), i)
    }), N = (j) => {
      if (T.value)
        return;
      const Y = R(j);
      r("click", j), y(Y);
    }, I = (j) => {
      T.value || (p(P.value), r("mouseenter", j));
    }, B = (j) => {
      T.value || (p([]), r("mouseleave", j));
    }, Q = (j) => {
      if (r("keydown", j), j.which === Me.ENTER) {
        const Y = R(j);
        r("click", j), y(Y);
      }
    }, W = (j) => {
      p(P.value), r("focus", j);
    }, H = (j, Y) => {
      const ne = D("span", {
        class: `${f.value}-title-content`
      }, [Y]);
      return (!j || po(Y) && Y.type === "span") && Y && g.value && x && typeof Y == "string" ? D("div", {
        class: `${f.value}-inline-collapsed-noicon`
      }, [Y.charAt(0)]) : ne;
    }, U = zie(V(() => P.value.length));
    return () => {
      var j, Y, ne, fe, ue;
      if (o) return null;
      const ye = (j = t.title) !== null && j !== void 0 ? j : (Y = n.title) === null || Y === void 0 ? void 0 : Y.call(n), se = qr((ne = n.default) === null || ne === void 0 ? void 0 : ne.call(n)), he = se.length;
      let re = ye;
      typeof ye > "u" ? re = x && he ? se : "" : ye === !1 && (re = "");
      const q = {
        title: re
      };
      !m.value && !g.value && (q.title = null, q.open = !1);
      const K = {};
      t.role === "option" && (K["aria-selected"] = E.value);
      const de = (fe = t.icon) !== null && fe !== void 0 ? fe : (ue = n.icon) === null || ue === void 0 ? void 0 : ue.call(n, t);
      return D(F2, te(te({}, q), {}, {
        placement: v.value ? "left" : "right",
        overlayClassName: `${f.value}-inline-collapsed-tooltip`
      }), {
        default: () => [D(Au.Item, te(te(te({
          component: "li"
        }, i), {}, {
          id: t.id,
          style: k(k({}, i.style || {}), U.value),
          class: [M.value, {
            [`${i.class}`]: !!i.class,
            [`${f.value}-item-only-child`]: (de ? he + 1 : he) === 1
          }],
          role: t.role || "menuitem",
          tabindex: t.disabled ? null : -1,
          "data-menu-id": s,
          "aria-disabled": t.disabled
        }, K), {}, {
          onMouseenter: I,
          onMouseleave: B,
          onClick: N,
          onKeydown: Q,
          onFocus: W,
          title: typeof ye == "string" ? ye : void 0
        }), {
          default: () => [Or(typeof de == "function" ? de(t.originItemValue) : de, {
            class: `${f.value}-item-icon`
          }, !1), H(de, se)]
        })]
      });
    };
  }
}), Fc = {
  adjustX: 1,
  adjustY: 1
}, W6e = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Fc,
    offset: [0, -7]
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Fc,
    offset: [0, 7]
  },
  leftTop: {
    points: ["tr", "tl"],
    overflow: Fc,
    offset: [-4, 0]
  },
  rightTop: {
    points: ["tl", "tr"],
    overflow: Fc,
    offset: [4, 0]
  }
}, Q6e = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Fc,
    offset: [0, -7]
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Fc,
    offset: [0, 7]
  },
  rightTop: {
    points: ["tr", "tl"],
    overflow: Fc,
    offset: [-4, 0]
  },
  leftTop: {
    points: ["tl", "tr"],
    overflow: Fc,
    offset: [4, 0]
  }
}, H6e = {
  horizontal: "bottomLeft",
  vertical: "rightTop",
  "vertical-left": "rightTop",
  "vertical-right": "leftTop"
}, PQ = ae({
  compatConfig: {
    MODE: 3
  },
  name: "PopupTrigger",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    mode: String,
    visible: Boolean,
    // popup: React.ReactNode;
    popupClassName: String,
    popupOffset: Array,
    disabled: Boolean,
    onVisibleChange: Function
  },
  slots: Object,
  emits: ["visibleChange"],
  setup(t, e) {
    let {
      slots: n,
      emit: r
    } = e;
    const i = ve(!1), {
      getPopupContainer: a,
      rtl: o,
      subMenuOpenDelay: s,
      subMenuCloseDelay: l,
      builtinPlacements: u,
      triggerSubMenuAction: c,
      forceSubMenuRender: f,
      motion: d,
      defaultMotions: h,
      rootClassName: p
    } = nc(), v = Rie(), g = V(() => o.value ? k(k({}, Q6e), u.value) : k(k({}, W6e), u.value)), m = V(() => H6e[t.mode]), y = ve();
    me(() => t.visible, (S) => {
      en.cancel(y.value), y.value = en(() => {
        i.value = S;
      });
    }, {
      immediate: !0
    }), Qt(() => {
      en.cancel(y.value);
    });
    const _ = (S) => {
      r("visibleChange", S);
    }, O = V(() => {
      var S, x;
      const C = d.value || ((S = h.value) === null || S === void 0 ? void 0 : S[t.mode]) || ((x = h.value) === null || x === void 0 ? void 0 : x.other), P = typeof C == "function" ? C() : C;
      return P ? Z_(P.name, {
        css: !0
      }) : void 0;
    });
    return () => {
      const {
        prefixCls: S,
        popupClassName: x,
        mode: C,
        popupOffset: P,
        disabled: $
      } = t;
      return D(E2, {
        prefixCls: S,
        popupClassName: Re(`${S}-popup`, {
          [`${S}-rtl`]: o.value
        }, x, p.value),
        stretch: C === "horizontal" ? "minWidth" : null,
        getPopupContainer: a.value,
        builtinPlacements: g.value,
        popupPlacement: m.value,
        popupVisible: i.value,
        popupAlign: P && {
          offset: P
        },
        action: $ ? [] : [c.value],
        mouseEnterDelay: s.value,
        mouseLeaveDelay: l.value,
        onPopupVisibleChange: _,
        forceRender: v || f.value,
        popupAnimation: O.value
      }, {
        popup: n.popup,
        default: n.default
      });
    };
  }
}), x8 = (t, e) => {
  let {
    slots: n,
    attrs: r
  } = e;
  var i;
  const {
    prefixCls: a,
    mode: o
  } = nc();
  return D("ul", te(te({}, r), {}, {
    class: Re(a.value, `${a.value}-sub`, `${a.value}-${o.value === "inline" ? "inline" : "vertical"}`),
    "data-menu-list": !0
  }), [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]);
};
x8.displayName = "SubMenuList";
const G6e = ae({
  compatConfig: {
    MODE: 3
  },
  name: "InlineSubMenuList",
  inheritAttrs: !1,
  props: {
    id: String,
    open: Boolean,
    keyPath: Array
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = V(() => "inline"), {
      motion: i,
      mode: a,
      defaultMotions: o
    } = nc(), s = V(() => a.value === r.value), l = ee(!s.value), u = V(() => s.value ? t.open : !1);
    me(a, () => {
      s.value && (l.value = !1);
    }, {
      flush: "post"
    });
    const c = V(() => {
      var f, d;
      const h = i.value || ((f = o.value) === null || f === void 0 ? void 0 : f[r.value]) || ((d = o.value) === null || d === void 0 ? void 0 : d.other), p = typeof h == "function" ? h() : h;
      return k(k({}, p), {
        appear: t.keyPath.length <= 1
      });
    });
    return () => {
      var f;
      return l.value ? null : D(sC, {
        mode: r.value
      }, {
        default: () => [D(mo, c.value, {
          default: () => [_r(D(x8, {
            id: t.id
          }, {
            default: () => [(f = n.default) === null || f === void 0 ? void 0 : f.call(n)]
          }), [[ho, u.value]])]
        })]
      });
    };
  }
});
let $Q = 0;
const j6e = () => ({
  icon: oe.any,
  title: oe.any,
  disabled: Boolean,
  level: Number,
  popupClassName: String,
  popupOffset: Array,
  internalPopupClose: Boolean,
  eventKey: String,
  expandIcon: Function,
  theme: String,
  onMouseenter: Function,
  onMouseleave: Function,
  onTitleClick: Function,
  // Internal user prop
  originItemValue: sn()
}), Ng = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ASubMenu",
  inheritAttrs: !1,
  props: j6e(),
  slots: Object,
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      emit: i
    } = e;
    var a, o;
    Lie(!1);
    const s = S8(), l = In(), u = typeof l.vnode.key == "symbol" ? String(l.vnode.key) : l.vnode.key;
    lo(typeof l.vnode.key != "symbol", "SubMenu", `SubMenu \`:key="${String(u)}"\` not support Symbol type`);
    const c = cR(u) ? u : `sub_menu_${++$Q}_$$_not_set_key`, f = (a = t.eventKey) !== null && a !== void 0 ? a : cR(u) ? `sub_menu_${++$Q}_$$_${u}` : c, {
      parentEventKeys: d,
      parentInfo: h,
      parentKeys: p
    } = O8(), v = V(() => [...p.value, c]), g = ve([]), m = {
      eventKey: f,
      key: c,
      parentEventKeys: d,
      childrenEventKeys: g,
      parentKeys: p
    };
    (o = h.childrenEventKeys) === null || o === void 0 || o.value.push(f), Qt(() => {
      var Pe;
      h.childrenEventKeys && (h.childrenEventKeys.value = (Pe = h.childrenEventKeys) === null || Pe === void 0 ? void 0 : Pe.value.filter((Fe) => Fe != f));
    }), z6e(f, c, m);
    const {
      prefixCls: y,
      activeKeys: _,
      disabled: O,
      changeActiveKeys: S,
      mode: x,
      inlineCollapsed: C,
      openKeys: P,
      overflowDisabled: $,
      onOpenChange: T,
      registerMenuInfo: E,
      unRegisterMenuInfo: M,
      selectedSubMenuKeys: R,
      expandIcon: N,
      theme: I
    } = nc(), B = u != null, Q = !s && (Rie() || !B);
    R6e(Q), (s && B || !s && !B || Q) && (E(f, m), Qt(() => {
      M(f);
    }));
    const W = V(() => `${y.value}-submenu`), H = V(() => O.value || t.disabled), U = ve(), j = ve(), Y = V(() => P.value.includes(c)), ne = V(() => !$.value && Y.value), fe = V(() => R.value.includes(c)), ue = ve(!1);
    me(_, () => {
      ue.value = !!_.value.find((Pe) => Pe === c);
    }, {
      immediate: !0
    });
    const ye = (Pe) => {
      H.value || (i("titleClick", Pe, c), x.value === "inline" && T(c, !Y.value));
    }, se = (Pe) => {
      H.value || (S(v.value), i("mouseenter", Pe));
    }, he = (Pe) => {
      H.value || (S([]), i("mouseleave", Pe));
    }, re = zie(V(() => v.value.length)), q = (Pe) => {
      x.value !== "inline" && T(c, Pe);
    }, K = () => {
      S(v.value);
    }, de = f && `${f}-popup`, xe = V(() => Re(y.value, `${y.value}-${t.theme || I.value}`, t.popupClassName)), we = (Pe, Fe) => {
      if (!Fe)
        return C.value && !p.value.length && Pe && typeof Pe == "string" ? D("div", {
          class: `${y.value}-inline-collapsed-noicon`
        }, [Pe.charAt(0)]) : D("span", {
          class: `${y.value}-title-content`
        }, [Pe]);
      const Ye = po(Pe) && Pe.type === "span";
      return D(Wt, null, [Or(typeof Fe == "function" ? Fe(t.originItemValue) : Fe, {
        class: `${y.value}-item-icon`
      }, !1), Ye ? Pe : D("span", {
        class: `${y.value}-title-content`
      }, [Pe])]);
    }, He = V(() => x.value !== "inline" && v.value.length > 1 ? "vertical" : x.value), je = V(() => x.value === "horizontal" ? "vertical" : x.value), Be = V(() => He.value === "horizontal" ? "vertical" : He.value), Le = () => {
      var Pe, Fe;
      const Ye = W.value, xt = (Pe = t.icon) !== null && Pe !== void 0 ? Pe : (Fe = n.icon) === null || Fe === void 0 ? void 0 : Fe.call(n, t), It = t.expandIcon || n.expandIcon || N.value, an = we(y2(n, t, "title"), xt);
      return D("div", {
        style: re.value,
        class: `${Ye}-title`,
        tabindex: H.value ? null : -1,
        ref: U,
        title: typeof an == "string" ? an : null,
        "data-menu-id": c,
        "aria-expanded": ne.value,
        "aria-haspopup": !0,
        "aria-controls": de,
        "aria-disabled": H.value,
        onClick: ye,
        onFocus: K
      }, [an, x.value !== "horizontal" && It ? It(k(k({}, t), {
        isOpen: ne.value
      })) : D("i", {
        class: `${Ye}-arrow`
      }, null)]);
    };
    return () => {
      var Pe;
      if (s)
        return B ? (Pe = n.default) === null || Pe === void 0 ? void 0 : Pe.call(n) : null;
      const Fe = W.value;
      let Ye = () => null;
      if (!$.value && x.value !== "inline") {
        const xt = x.value === "horizontal" ? [0, 8] : [10, 0];
        Ye = () => D(PQ, {
          mode: He.value,
          prefixCls: Fe,
          visible: !t.internalPopupClose && ne.value,
          popupClassName: xe.value,
          popupOffset: t.popupOffset || xt,
          disabled: H.value,
          onVisibleChange: q
        }, {
          default: () => [Le()],
          popup: () => D(sC, {
            mode: Be.value
          }, {
            default: () => [D(x8, {
              id: de,
              ref: j
            }, {
              default: n.default
            })]
          })
        });
      } else
        Ye = () => D(PQ, null, {
          default: Le
        });
      return D(sC, {
        mode: je.value
      }, {
        default: () => [D(Au.Item, te(te({
          component: "li"
        }, r), {}, {
          role: "none",
          class: Re(Fe, `${Fe}-${x.value}`, r.class, {
            [`${Fe}-open`]: ne.value,
            [`${Fe}-active`]: ue.value,
            [`${Fe}-selected`]: fe.value,
            [`${Fe}-disabled`]: H.value
          }),
          onMouseenter: se,
          onMouseleave: he,
          "data-submenu-id": c
        }), {
          default: () => D(Wt, null, [Ye(), !$.value && D(G6e, {
            id: de,
            open: ne.value,
            keyPath: v.value
          }, {
            default: n.default
          })])
        })]
      });
    };
  }
});
function Vie(t, e) {
  return t.classList ? t.classList.contains(e) : ` ${t.className} `.indexOf(` ${e} `) > -1;
}
function AQ(t, e) {
  t.classList ? t.classList.add(e) : Vie(t, e) || (t.className = `${t.className} ${e}`);
}
function EQ(t, e) {
  if (t.classList)
    t.classList.remove(e);
  else if (Vie(t, e)) {
    const n = t.className;
    t.className = ` ${n} `.replace(` ${e} `, " ");
  }
}
const w8 = function() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "ant-motion-collapse", e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  return {
    name: t,
    appear: e,
    css: !0,
    onBeforeEnter: (n) => {
      n.style.height = "0px", n.style.opacity = "0", AQ(n, t);
    },
    onEnter: (n) => {
      Bt(() => {
        n.style.height = `${n.scrollHeight}px`, n.style.opacity = "1";
      });
    },
    onAfterEnter: (n) => {
      n && (EQ(n, t), n.style.height = null, n.style.opacity = null);
    },
    onBeforeLeave: (n) => {
      AQ(n, t), n.style.height = `${n.offsetHeight}px`, n.style.opacity = null;
    },
    onLeave: (n) => {
      setTimeout(() => {
        n.style.height = "0px", n.style.opacity = "0";
      });
    },
    onAfterLeave: (n) => {
      n && (EQ(n, t), n.style && (n.style.height = null, n.style.opacity = null));
    }
  };
}, Z6e = () => ({
  title: oe.any,
  // Internal user prop
  originItemValue: sn()
}), lC = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItemGroup",
  inheritAttrs: !1,
  props: Z6e(),
  slots: Object,
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const {
      prefixCls: i
    } = nc(), a = V(() => `${i.value}-item-group`), o = S8();
    return () => {
      var s, l;
      return o ? (s = n.default) === null || s === void 0 ? void 0 : s.call(n) : D("li", te(te({}, r), {}, {
        onClick: (u) => u.stopPropagation(),
        class: a.value
      }), [D("div", {
        title: typeof t.title == "string" ? t.title : void 0,
        class: `${a.value}-title`
      }, [y2(n, t, "title")]), D("ul", {
        class: `${a.value}-list`
      }, [(l = n.default) === null || l === void 0 ? void 0 : l.call(n)])]);
    };
  }
}), U6e = () => ({
  prefixCls: String,
  dashed: Boolean
}), uC = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuDivider",
  props: U6e(),
  setup(t) {
    const {
      prefixCls: e
    } = nc(), n = V(() => ({
      [`${e.value}-item-divider`]: !0,
      [`${e.value}-item-divider-dashed`]: !!t.dashed
    }));
    return () => D("li", {
      class: n.value
    }, null);
  }
});
var X6e = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
function RR(t, e, n) {
  return (t || []).map((r, i) => {
    if (r && typeof r == "object") {
      const a = r, {
        label: o,
        children: s,
        key: l,
        type: u
      } = a, c = X6e(a, ["label", "children", "key", "type"]), f = l ?? `tmp-${i}`, d = n ? n.parentKeys.slice() : [], h = [], p = {
        eventKey: f,
        key: f,
        parentEventKeys: ee(d),
        parentKeys: ee(d),
        childrenEventKeys: ee(h),
        isLeaf: !1
      };
      if (s || u === "group") {
        if (u === "group") {
          const g = RR(s, e, n);
          return D(lC, te(te({
            key: f
          }, c), {}, {
            title: o,
            originItemValue: r
          }), {
            default: () => [g]
          });
        }
        e.set(f, p), n && n.childrenEventKeys.push(f);
        const v = RR(s, e, {
          childrenEventKeys: h,
          parentKeys: [].concat(d, f)
        });
        return D(Ng, te(te({
          key: f
        }, c), {}, {
          title: o,
          originItemValue: r
        }), {
          default: () => [v]
        });
      }
      return u === "divider" ? D(uC, te({
        key: f
      }, c), null) : (p.isLeaf = !0, e.set(f, p), D(Lg, te(te({
        key: f
      }, c), {}, {
        originItemValue: r
      }), {
        default: () => [o]
      }));
    }
    return null;
  }).filter((r) => r);
}
function Y6e(t) {
  const e = ve([]), n = ve(!1), r = ve(/* @__PURE__ */ new Map());
  return me(() => t.items, () => {
    const i = /* @__PURE__ */ new Map();
    n.value = !1, t.items ? (n.value = !0, e.value = RR(t.items, i)) : e.value = void 0, r.value = i;
  }, {
    immediate: !0,
    deep: !0
  }), {
    itemsNodes: e,
    store: r,
    hasItmes: n
  };
}
const q6e = (t) => {
  const {
    componentCls: e,
    motionDurationSlow: n,
    menuHorizontalHeight: r,
    colorSplit: i,
    lineWidth: a,
    lineType: o,
    menuItemPaddingInline: s
  } = t;
  return {
    [`${e}-horizontal`]: {
      lineHeight: `${r}px`,
      border: 0,
      borderBottom: `${a}px ${o} ${i}`,
      boxShadow: "none",
      "&::after": {
        display: "block",
        clear: "both",
        height: 0,
        content: '"\\20"'
      },
      // ======================= Item =======================
      [`${e}-item, ${e}-submenu`]: {
        position: "relative",
        display: "inline-block",
        verticalAlign: "bottom",
        paddingInline: s
      },
      [`> ${e}-item:hover,
        > ${e}-item-active,
        > ${e}-submenu ${e}-submenu-title:hover`]: {
        backgroundColor: "transparent"
      },
      [`${e}-item, ${e}-submenu-title`]: {
        transition: [`border-color ${n}`, `background ${n}`].join(",")
      },
      // ===================== Sub Menu =====================
      [`${e}-submenu-arrow`]: {
        display: "none"
      }
    }
  };
}, K6e = (t) => {
  let {
    componentCls: e,
    menuArrowOffset: n
  } = t;
  return {
    [`${e}-rtl`]: {
      direction: "rtl"
    },
    [`${e}-submenu-rtl`]: {
      transformOrigin: "100% 0"
    },
    // Vertical Arrow
    [`${e}-rtl${e}-vertical,
    ${e}-submenu-rtl ${e}-vertical`]: {
      [`${e}-submenu-arrow`]: {
        "&::before": {
          transform: `rotate(-45deg) translateY(-${n})`
        },
        "&::after": {
          transform: `rotate(45deg) translateY(${n})`
        }
      }
    }
  };
}, MQ = (t) => k({}, G_(t)), IQ = (t, e) => {
  const {
    componentCls: n,
    colorItemText: r,
    colorItemTextSelected: i,
    colorGroupTitle: a,
    colorItemBg: o,
    colorSubItemBg: s,
    colorItemBgSelected: l,
    colorActiveBarHeight: u,
    colorActiveBarWidth: c,
    colorActiveBarBorderSize: f,
    motionDurationSlow: d,
    motionEaseInOut: h,
    motionEaseOut: p,
    menuItemPaddingInline: v,
    motionDurationMid: g,
    colorItemTextHover: m,
    lineType: y,
    colorSplit: _,
    // Disabled
    colorItemTextDisabled: O,
    // Danger
    colorDangerItemText: S,
    colorDangerItemTextHover: x,
    colorDangerItemTextSelected: C,
    colorDangerItemBgActive: P,
    colorDangerItemBgSelected: $,
    colorItemBgHover: T,
    menuSubMenuBg: E,
    // Horizontal
    colorItemTextSelectedHorizontal: M,
    colorItemBgSelectedHorizontal: R
  } = t;
  return {
    [`${n}-${e}`]: {
      color: r,
      background: o,
      [`&${n}-root:focus-visible`]: k({}, MQ(t)),
      // ======================== Item ========================
      [`${n}-item-group-title`]: {
        color: a
      },
      [`${n}-submenu-selected`]: {
        [`> ${n}-submenu-title`]: {
          color: i
        }
      },
      // Disabled
      [`${n}-item-disabled, ${n}-submenu-disabled`]: {
        color: `${O} !important`
      },
      // Hover
      [`${n}-item:hover, ${n}-submenu-title:hover`]: {
        [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
          color: m
        }
      },
      [`&:not(${n}-horizontal)`]: {
        [`${n}-item:not(${n}-item-selected)`]: {
          "&:hover": {
            backgroundColor: T
          },
          "&:active": {
            backgroundColor: l
          }
        },
        [`${n}-submenu-title`]: {
          "&:hover": {
            backgroundColor: T
          },
          "&:active": {
            backgroundColor: l
          }
        }
      },
      // Danger - only Item has
      [`${n}-item-danger`]: {
        color: S,
        [`&${n}-item:hover`]: {
          [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
            color: x
          }
        },
        [`&${n}-item:active`]: {
          background: P
        }
      },
      [`${n}-item a`]: {
        "&, &:hover": {
          color: "inherit"
        }
      },
      [`${n}-item-selected`]: {
        color: i,
        // Danger
        [`&${n}-item-danger`]: {
          color: C
        },
        "a, a:hover": {
          color: "inherit"
        }
      },
      [`& ${n}-item-selected`]: {
        backgroundColor: l,
        // Danger
        [`&${n}-item-danger`]: {
          backgroundColor: $
        }
      },
      [`${n}-item, ${n}-submenu-title`]: {
        [`&:not(${n}-item-disabled):focus-visible`]: k({}, MQ(t))
      },
      [`&${n}-submenu > ${n}`]: {
        backgroundColor: E
      },
      [`&${n}-popup > ${n}`]: {
        backgroundColor: o
      },
      // ====================== Horizontal ======================
      [`&${n}-horizontal`]: k(k({}, e === "dark" ? {
        borderBottom: 0
      } : {}), {
        [`> ${n}-item, > ${n}-submenu`]: {
          top: f,
          marginTop: -f,
          marginBottom: 0,
          borderRadius: 0,
          "&::after": {
            position: "absolute",
            insetInline: v,
            bottom: 0,
            borderBottom: `${u}px solid transparent`,
            transition: `border-color ${d} ${h}`,
            content: '""'
          },
          "&:hover, &-active, &-open": {
            "&::after": {
              borderBottomWidth: u,
              borderBottomColor: M
            }
          },
          "&-selected": {
            color: M,
            backgroundColor: R,
            "&::after": {
              borderBottomWidth: u,
              borderBottomColor: M
            }
          }
        }
      }),
      // ================== Inline & Vertical ===================
      //
      [`&${n}-root`]: {
        [`&${n}-inline, &${n}-vertical`]: {
          borderInlineEnd: `${f}px ${y} ${_}`
        }
      },
      // ======================== Inline ========================
      [`&${n}-inline`]: {
        // Sub
        [`${n}-sub${n}-inline`]: {
          background: s
        },
        // Item
        [`${n}-item, ${n}-submenu-title`]: f && c ? {
          width: `calc(100% + ${f}px)`
        } : {},
        [`${n}-item`]: {
          position: "relative",
          "&::after": {
            position: "absolute",
            insetBlock: 0,
            insetInlineEnd: 0,
            borderInlineEnd: `${c}px solid ${i}`,
            transform: "scaleY(0.0001)",
            opacity: 0,
            transition: [`transform ${g} ${p}`, `opacity ${g} ${p}`].join(","),
            content: '""'
          },
          // Danger
          [`&${n}-item-danger`]: {
            "&::after": {
              borderInlineEndColor: C
            }
          }
        },
        [`${n}-selected, ${n}-item-selected`]: {
          "&::after": {
            transform: "scaleY(1)",
            opacity: 1,
            transition: [`transform ${g} ${h}`, `opacity ${g} ${h}`].join(",")
          }
        }
      }
    }
  };
}, DQ = (t) => {
  const {
    componentCls: e,
    menuItemHeight: n,
    itemMarginInline: r,
    padding: i,
    menuArrowSize: a,
    marginXS: o,
    marginXXS: s
  } = t, l = i + a + o;
  return {
    [`${e}-item`]: {
      position: "relative"
    },
    [`${e}-item, ${e}-submenu-title`]: {
      height: n,
      lineHeight: `${n}px`,
      paddingInline: i,
      overflow: "hidden",
      textOverflow: "ellipsis",
      marginInline: r,
      marginBlock: s,
      width: `calc(100% - ${r * 2}px)`
    },
    // disable margin collapsed
    [`${e}-submenu`]: {
      paddingBottom: 0.02
    },
    [`> ${e}-item,
            > ${e}-submenu > ${e}-submenu-title`]: {
      height: n,
      lineHeight: `${n}px`
    },
    [`${e}-item-group-list ${e}-submenu-title,
            ${e}-submenu-title`]: {
      paddingInlineEnd: l
    }
  };
}, J6e = (t) => {
  const {
    componentCls: e,
    iconCls: n,
    menuItemHeight: r,
    colorTextLightSolid: i,
    dropdownWidth: a,
    controlHeightLG: o,
    motionDurationMid: s,
    motionEaseOut: l,
    paddingXL: u,
    fontSizeSM: c,
    fontSizeLG: f,
    motionDurationSlow: d,
    paddingXS: h,
    boxShadowSecondary: p
  } = t, v = {
    height: r,
    lineHeight: `${r}px`,
    listStylePosition: "inside",
    listStyleType: "disc"
  };
  return [
    {
      [e]: {
        "&-inline, &-vertical": k({
          [`&${e}-root`]: {
            boxShadow: "none"
          }
        }, DQ(t))
      },
      [`${e}-submenu-popup`]: {
        [`${e}-vertical`]: k(k({}, DQ(t)), {
          boxShadow: p
        })
      }
    },
    // Vertical only
    {
      [`${e}-submenu-popup ${e}-vertical${e}-sub`]: {
        minWidth: a,
        maxHeight: `calc(100vh - ${o * 2.5}px)`,
        padding: "0",
        overflow: "hidden",
        borderInlineEnd: 0,
        // https://github.com/ant-design/ant-design/issues/22244
        // https://github.com/ant-design/ant-design/issues/26812
        "&:not([class*='-active'])": {
          overflowX: "hidden",
          overflowY: "auto"
        }
      }
    },
    // Inline Only
    {
      [`${e}-inline`]: {
        width: "100%",
        // Motion enhance for first level
        [`&${e}-root`]: {
          [`${e}-item, ${e}-submenu-title`]: {
            display: "flex",
            alignItems: "center",
            transition: [`border-color ${d}`, `background ${d}`, `padding ${s} ${l}`].join(","),
            [`> ${e}-title-content`]: {
              flex: "auto",
              minWidth: 0,
              overflow: "hidden",
              textOverflow: "ellipsis"
            },
            "> *": {
              flex: "none"
            }
          }
        },
        // >>>>> Sub
        [`${e}-sub${e}-inline`]: {
          padding: 0,
          border: 0,
          borderRadius: 0,
          boxShadow: "none",
          [`& > ${e}-submenu > ${e}-submenu-title`]: v,
          [`& ${e}-item-group-title`]: {
            paddingInlineStart: u
          }
        },
        // >>>>> Item
        [`${e}-item`]: v
      }
    },
    // Inline Collapse Only
    {
      [`${e}-inline-collapsed`]: {
        width: r * 2,
        [`&${e}-root`]: {
          [`${e}-item, ${e}-submenu ${e}-submenu-title`]: {
            [`> ${e}-inline-collapsed-noicon`]: {
              fontSize: f,
              textAlign: "center"
            }
          }
        },
        [`> ${e}-item,
          > ${e}-item-group > ${e}-item-group-list > ${e}-item,
          > ${e}-item-group > ${e}-item-group-list > ${e}-submenu > ${e}-submenu-title,
          > ${e}-submenu > ${e}-submenu-title`]: {
          insetInlineStart: 0,
          paddingInline: `calc(50% - ${c}px)`,
          textOverflow: "clip",
          [`
            ${e}-submenu-arrow,
            ${e}-submenu-expand-icon
          `]: {
            opacity: 0
          },
          [`${e}-item-icon, ${n}`]: {
            margin: 0,
            fontSize: f,
            lineHeight: `${r}px`,
            "+ span": {
              display: "inline-block",
              opacity: 0
            }
          }
        },
        [`${e}-item-icon, ${n}`]: {
          display: "inline-block"
        },
        "&-tooltip": {
          pointerEvents: "none",
          [`${e}-item-icon, ${n}`]: {
            display: "none"
          },
          "a, a:hover": {
            color: i
          }
        },
        [`${e}-item-group-title`]: k(k({}, Mg), {
          paddingInline: h
        })
      }
    }
  ];
}, RQ = (t) => {
  const {
    componentCls: e,
    fontSize: n,
    motionDurationSlow: r,
    motionDurationMid: i,
    motionEaseInOut: a,
    motionEaseOut: o,
    iconCls: s,
    controlHeightSM: l
  } = t;
  return {
    // >>>>> Item
    [`${e}-item, ${e}-submenu-title`]: {
      position: "relative",
      display: "block",
      margin: 0,
      whiteSpace: "nowrap",
      cursor: "pointer",
      transition: [`border-color ${r}`, `background ${r}`, `padding ${r} ${a}`].join(","),
      [`${e}-item-icon, ${s}`]: {
        minWidth: n,
        fontSize: n,
        transition: [`font-size ${i} ${o}`, `margin ${r} ${a}`, `color ${r}`].join(","),
        "+ span": {
          marginInlineStart: l - n,
          opacity: 1,
          transition: [`opacity ${r} ${a}`, `margin ${r}`, `color ${r}`].join(",")
        }
      },
      [`${e}-item-icon`]: k({}, hm()),
      [`&${e}-item-only-child`]: {
        [`> ${s}, > ${e}-item-icon`]: {
          marginInlineEnd: 0
        }
      }
    },
    // Disabled state sets text to gray and nukes hover/tab effects
    [`${e}-item-disabled, ${e}-submenu-disabled`]: {
      background: "none !important",
      cursor: "not-allowed",
      "&::after": {
        borderColor: "transparent !important"
      },
      a: {
        color: "inherit !important"
      },
      [`> ${e}-submenu-title`]: {
        color: "inherit !important",
        cursor: "not-allowed"
      }
    }
  };
}, kQ = (t) => {
  const {
    componentCls: e,
    motionDurationSlow: n,
    motionEaseInOut: r,
    borderRadius: i,
    menuArrowSize: a,
    menuArrowOffset: o
  } = t;
  return {
    [`${e}-submenu`]: {
      "&-expand-icon, &-arrow": {
        position: "absolute",
        top: "50%",
        insetInlineEnd: t.margin,
        width: a,
        color: "currentcolor",
        transform: "translateY(-50%)",
        transition: `transform ${n} ${r}, opacity ${n}`
      },
      "&-arrow": {
        // →
        "&::before, &::after": {
          position: "absolute",
          width: a * 0.6,
          height: a * 0.15,
          backgroundColor: "currentcolor",
          borderRadius: i,
          transition: [`background ${n} ${r}`, `transform ${n} ${r}`, `top ${n} ${r}`, `color ${n} ${r}`].join(","),
          content: '""'
        },
        "&::before": {
          transform: `rotate(45deg) translateY(-${o})`
        },
        "&::after": {
          transform: `rotate(-45deg) translateY(${o})`
        }
      }
    }
  };
}, eBe = (t) => {
  const {
    antCls: e,
    componentCls: n,
    fontSize: r,
    motionDurationSlow: i,
    motionDurationMid: a,
    motionEaseInOut: o,
    lineHeight: s,
    paddingXS: l,
    padding: u,
    colorSplit: c,
    lineWidth: f,
    zIndexPopup: d,
    borderRadiusLG: h,
    radiusSubMenuItem: p,
    menuArrowSize: v,
    menuArrowOffset: g,
    lineType: m,
    menuPanelMaskInset: y
  } = t;
  return [
    // Misc
    {
      "": {
        [`${n}`]: k(k({}, Kw()), {
          // Hidden
          "&-hidden": {
            display: "none"
          }
        })
      },
      [`${n}-submenu-hidden`]: {
        display: "none"
      }
    },
    {
      [n]: k(k(k(k(k(k(k({}, Gn(t)), Kw()), {
        marginBottom: 0,
        paddingInlineStart: 0,
        // Override default ul/ol
        fontSize: r,
        lineHeight: 0,
        listStyle: "none",
        outline: "none",
        transition: `width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,
        "ul, ol": {
          margin: 0,
          padding: 0,
          listStyle: "none"
        },
        // Overflow ellipsis
        "&-overflow": {
          display: "flex",
          [`${n}-item`]: {
            flex: "none"
          }
        },
        [`${n}-item, ${n}-submenu, ${n}-submenu-title`]: {
          borderRadius: t.radiusItem
        },
        [`${n}-item-group-title`]: {
          padding: `${l}px ${u}px`,
          fontSize: r,
          lineHeight: s,
          transition: `all ${i}`
        },
        [`&-horizontal ${n}-submenu`]: {
          transition: [`border-color ${i} ${o}`, `background ${i} ${o}`].join(",")
        },
        [`${n}-submenu, ${n}-submenu-inline`]: {
          transition: [`border-color ${i} ${o}`, `background ${i} ${o}`, `padding ${a} ${o}`].join(",")
        },
        [`${n}-submenu ${n}-sub`]: {
          cursor: "initial",
          transition: [`background ${i} ${o}`, `padding ${i} ${o}`].join(",")
        },
        [`${n}-title-content`]: {
          transition: `color ${i}`
        },
        [`${n}-item a`]: {
          "&::before": {
            position: "absolute",
            inset: 0,
            backgroundColor: "transparent",
            content: '""'
          }
        },
        // Removed a Badge related style seems it's safe
        // https://github.com/ant-design/ant-design/issues/19809
        // >>>>> Divider
        [`${n}-item-divider`]: {
          overflow: "hidden",
          lineHeight: 0,
          borderColor: c,
          borderStyle: m,
          borderWidth: 0,
          borderTopWidth: f,
          marginBlock: f,
          padding: 0,
          "&-dashed": {
            borderStyle: "dashed"
          }
        }
      }), RQ(t)), {
        [`${n}-item-group`]: {
          [`${n}-item-group-list`]: {
            margin: 0,
            padding: 0,
            [`${n}-item, ${n}-submenu-title`]: {
              paddingInline: `${r * 2}px ${u}px`
            }
          }
        },
        // ======================= Sub Menu =======================
        "&-submenu": {
          "&-popup": {
            position: "absolute",
            zIndex: d,
            background: "transparent",
            borderRadius: h,
            boxShadow: "none",
            transformOrigin: "0 0",
            // https://github.com/ant-design/ant-design/issues/13955
            "&::before": {
              position: "absolute",
              inset: `${y}px 0 0`,
              zIndex: -1,
              width: "100%",
              height: "100%",
              opacity: 0,
              content: '""'
            }
          },
          // https://github.com/ant-design/ant-design/issues/13955
          "&-placement-rightTop::before": {
            top: 0,
            insetInlineStart: y
          },
          [`> ${n}`]: k(k(k({
            borderRadius: h
          }, RQ(t)), kQ(t)), {
            [`${n}-item, ${n}-submenu > ${n}-submenu-title`]: {
              borderRadius: p
            },
            [`${n}-submenu-title::after`]: {
              transition: `transform ${i} ${o}`
            }
          })
        }
      }), kQ(t)), {
        [`&-inline-collapsed ${n}-submenu-arrow,
        &-inline ${n}-submenu-arrow`]: {
          // ↓
          "&::before": {
            transform: `rotate(-45deg) translateX(${g})`
          },
          "&::after": {
            transform: `rotate(45deg) translateX(-${g})`
          }
        },
        [`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]: {
          // ↑
          transform: `translateY(-${v * 0.2}px)`,
          "&::after": {
            transform: `rotate(-45deg) translateX(-${g})`
          },
          "&::before": {
            transform: `rotate(45deg) translateX(${g})`
          }
        }
      })
    },
    // Integration with header element so menu items have the same height
    {
      [`${e}-layout-header`]: {
        [n]: {
          lineHeight: "inherit"
        }
      }
    }
  ];
}, tBe = (t, e) => pr("Menu", (r, i) => {
  let {
    overrideComponentToken: a
  } = i;
  if ((e == null ? void 0 : e.value) === !1)
    return [];
  const {
    colorBgElevated: o,
    colorPrimary: s,
    colorError: l,
    colorErrorHover: u,
    colorTextLightSolid: c
  } = r, {
    controlHeightLG: f,
    fontSize: d
  } = r, h = d / 7 * 5, p = bn(r, {
    menuItemHeight: f,
    menuItemPaddingInline: r.margin,
    menuArrowSize: h,
    menuHorizontalHeight: f * 1.15,
    menuArrowOffset: `${h * 0.25}px`,
    menuPanelMaskInset: -7,
    menuSubMenuBg: o
  }), v = new Hn(c).setAlpha(0.65).toRgbString(), g = bn(p, {
    colorItemText: v,
    colorItemTextHover: c,
    colorGroupTitle: v,
    colorItemTextSelected: c,
    colorItemBg: "#001529",
    colorSubItemBg: "#000c17",
    colorItemBgActive: "transparent",
    colorItemBgSelected: s,
    colorActiveBarWidth: 0,
    colorActiveBarHeight: 0,
    colorActiveBarBorderSize: 0,
    // Disabled
    colorItemTextDisabled: new Hn(c).setAlpha(0.25).toRgbString(),
    // Danger
    colorDangerItemText: l,
    colorDangerItemTextHover: u,
    colorDangerItemTextSelected: c,
    colorDangerItemBgActive: l,
    colorDangerItemBgSelected: l,
    menuSubMenuBg: "#001529",
    // Horizontal
    colorItemTextSelectedHorizontal: c,
    colorItemBgSelectedHorizontal: s
  }, k({}, a));
  return [
    // Basic
    eBe(p),
    // Horizontal
    q6e(p),
    // Vertical
    J6e(p),
    // Theme
    IQ(p, "light"),
    IQ(g, "dark"),
    // RTL
    K6e(p),
    // Motion
    v8(p),
    kg(p, "slide-up"),
    kg(p, "slide-down"),
    B2(p, "zoom-big")
  ];
}, (r) => {
  const {
    colorPrimary: i,
    colorError: a,
    colorTextDisabled: o,
    colorErrorBg: s,
    colorText: l,
    colorTextDescription: u,
    colorBgContainer: c,
    colorFillAlter: f,
    colorFillContent: d,
    lineWidth: h,
    lineWidthBold: p,
    controlItemBgActive: v,
    colorBgTextHover: g
  } = r;
  return {
    dropdownWidth: 160,
    zIndexPopup: r.zIndexPopupBase + 50,
    radiusItem: r.borderRadiusLG,
    radiusSubMenuItem: r.borderRadiusSM,
    colorItemText: l,
    colorItemTextHover: l,
    colorItemTextHoverHorizontal: i,
    colorGroupTitle: u,
    colorItemTextSelected: i,
    colorItemTextSelectedHorizontal: i,
    colorItemBg: c,
    colorItemBgHover: g,
    colorItemBgActive: d,
    colorSubItemBg: f,
    colorItemBgSelected: v,
    colorItemBgSelectedHorizontal: "transparent",
    colorActiveBarWidth: 0,
    colorActiveBarHeight: p,
    colorActiveBarBorderSize: h,
    // Disabled
    colorItemTextDisabled: o,
    // Danger
    colorDangerItemText: a,
    colorDangerItemTextHover: a,
    colorDangerItemTextSelected: a,
    colorDangerItemBgActive: s,
    colorDangerItemBgSelected: s,
    itemMarginInline: r.marginXXS
  };
})(t), nBe = () => ({
  id: String,
  prefixCls: String,
  // donot use items, now only support inner use
  items: Array,
  disabled: Boolean,
  inlineCollapsed: Boolean,
  disabledOverflow: Boolean,
  forceSubMenuRender: Boolean,
  openKeys: Array,
  selectedKeys: Array,
  activeKey: String,
  selectable: {
    type: Boolean,
    default: !0
  },
  multiple: {
    type: Boolean,
    default: !1
  },
  tabindex: {
    type: [Number, String]
  },
  motion: Object,
  role: String,
  theme: {
    type: String,
    default: "light"
  },
  mode: {
    type: String,
    default: "vertical"
  },
  inlineIndent: {
    type: Number,
    default: 24
  },
  subMenuOpenDelay: {
    type: Number,
    default: 0
  },
  subMenuCloseDelay: {
    type: Number,
    default: 0.1
  },
  builtinPlacements: {
    type: Object
  },
  triggerSubMenuAction: {
    type: String,
    default: "hover"
  },
  getPopupContainer: Function,
  expandIcon: Function,
  onOpenChange: Function,
  onSelect: Function,
  onDeselect: Function,
  onClick: [Function, Array],
  onFocus: Function,
  onBlur: Function,
  onMousedown: Function,
  "onUpdate:openKeys": Function,
  "onUpdate:selectedKeys": Function,
  "onUpdate:activeKey": Function
}), LQ = [], ef = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AMenu",
  inheritAttrs: !1,
  props: nBe(),
  slots: Object,
  setup(t, e) {
    let {
      slots: n,
      emit: r,
      attrs: i
    } = e;
    const {
      direction: a,
      getPrefixCls: o
    } = hn("menu", t), s = Eie(), l = V(() => {
      var se;
      return o("menu", t.prefixCls || ((se = s == null ? void 0 : s.prefixCls) === null || se === void 0 ? void 0 : se.value));
    }), [u, c] = tBe(l, V(() => !s)), f = ve(/* @__PURE__ */ new Map()), d = et(N6e, ee(void 0)), h = V(() => d.value !== void 0 ? d.value : t.inlineCollapsed), {
      itemsNodes: p
    } = Y6e(t), v = ve(!1);
    _t(() => {
      v.value = !0;
    }), Vt(() => {
      lo(!(t.inlineCollapsed === !0 && t.mode !== "inline"), "Menu", "`inlineCollapsed` should only be used when `mode` is inline."), lo(!(d.value !== void 0 && t.inlineCollapsed === !0), "Menu", "`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.");
    });
    const g = ee([]), m = ee([]), y = ee({});
    me(f, () => {
      const se = {};
      for (const he of f.value.values())
        se[he.key] = he;
      y.value = se;
    }, {
      flush: "post"
    }), Vt(() => {
      if (t.activeKey !== void 0) {
        let se = [];
        const he = t.activeKey ? y.value[t.activeKey] : void 0;
        he && t.activeKey !== void 0 ? se = BA([].concat(z(he.parentKeys), t.activeKey)) : se = [], O0(g.value, se) || (g.value = se);
      }
    }), me(() => t.selectedKeys, (se) => {
      se && (m.value = se.slice());
    }, {
      immediate: !0,
      deep: !0
    });
    const _ = ee([]);
    me([y, m], () => {
      let se = [];
      m.value.forEach((he) => {
        const re = y.value[he];
        re && (se = se.concat(z(re.parentKeys)));
      }), se = BA(se), O0(_.value, se) || (_.value = se);
    }, {
      immediate: !0
    });
    const O = (se) => {
      if (t.selectable) {
        const {
          key: he
        } = se, re = m.value.includes(he);
        let q;
        t.multiple ? re ? q = m.value.filter((de) => de !== he) : q = [...m.value, he] : q = [he];
        const K = k(k({}, se), {
          selectedKeys: q
        });
        O0(q, m.value) || (t.selectedKeys === void 0 && (m.value = q), r("update:selectedKeys", q), re && t.multiple ? r("deselect", K) : r("select", K));
      }
      T.value !== "inline" && !t.multiple && S.value.length && R(LQ);
    }, S = ee([]);
    me(() => t.openKeys, function() {
      let se = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : S.value;
      O0(S.value, se) || (S.value = se.slice());
    }, {
      immediate: !0,
      deep: !0
    });
    let x;
    const C = (se) => {
      clearTimeout(x), x = setTimeout(() => {
        t.activeKey === void 0 && (g.value = se), r("update:activeKey", se[se.length - 1]);
      });
    }, P = V(() => !!t.disabled), $ = V(() => a.value === "rtl"), T = ee("vertical"), E = ve(!1);
    Vt(() => {
      var se;
      (t.mode === "inline" || t.mode === "vertical") && h.value ? (T.value = "vertical", E.value = h.value) : (T.value = t.mode, E.value = !1), !((se = s == null ? void 0 : s.mode) === null || se === void 0) && se.value && (T.value = s.mode.value);
    });
    const M = V(() => T.value === "inline"), R = (se) => {
      S.value = se, r("update:openKeys", se), r("openChange", se);
    }, N = ee(S.value), I = ve(!1);
    me(S, () => {
      M.value && (N.value = S.value);
    }, {
      immediate: !0
    }), me(M, () => {
      if (!I.value) {
        I.value = !0;
        return;
      }
      M.value ? S.value = N.value : R(LQ);
    }, {
      immediate: !0
    });
    const B = V(() => ({
      [`${l.value}`]: !0,
      [`${l.value}-root`]: !0,
      [`${l.value}-${T.value}`]: !0,
      [`${l.value}-inline-collapsed`]: E.value,
      [`${l.value}-rtl`]: $.value,
      [`${l.value}-${t.theme}`]: !0
    })), Q = V(() => o()), W = V(() => ({
      horizontal: {
        name: `${Q.value}-slide-up`
      },
      inline: w8(`${Q.value}-motion-collapse`),
      other: {
        name: `${Q.value}-zoom-big`
      }
    }));
    Lie(!0);
    const H = function() {
      let se = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      const he = [], re = f.value;
      return se.forEach((q) => {
        const {
          key: K,
          childrenEventKeys: de
        } = re.get(q);
        he.push(K, ...H(z(de)));
      }), he;
    }, U = (se) => {
      var he;
      r("click", se), O(se), (he = s == null ? void 0 : s.onClick) === null || he === void 0 || he.call(s);
    }, j = (se, he) => {
      var re;
      const q = ((re = y.value[se]) === null || re === void 0 ? void 0 : re.childrenEventKeys) || [];
      let K = S.value.filter((de) => de !== se);
      if (he)
        K.push(se);
      else if (T.value !== "inline") {
        const de = H(z(q));
        K = BA(K.filter((xe) => !de.includes(xe)));
      }
      O0(S, K) || R(K);
    }, Y = (se, he) => {
      f.value.set(se, he), f.value = new Map(f.value);
    }, ne = (se) => {
      f.value.delete(se), f.value = new Map(f.value);
    }, fe = ee(0), ue = V(() => {
      var se;
      return t.expandIcon || n.expandIcon || !((se = s == null ? void 0 : s.expandIcon) === null || se === void 0) && se.value ? (he) => {
        let re = t.expandIcon || n.expandIcon;
        return re = typeof re == "function" ? re(he) : re, Or(re, {
          class: `${l.value}-submenu-expand-icon`
        }, !1);
      } : null;
    });
    L6e({
      prefixCls: l,
      activeKeys: g,
      openKeys: S,
      selectedKeys: m,
      changeActiveKeys: C,
      disabled: P,
      rtl: $,
      mode: T,
      inlineIndent: V(() => t.inlineIndent),
      subMenuCloseDelay: V(() => t.subMenuCloseDelay),
      subMenuOpenDelay: V(() => t.subMenuOpenDelay),
      builtinPlacements: V(() => t.builtinPlacements),
      triggerSubMenuAction: V(() => t.triggerSubMenuAction),
      getPopupContainer: V(() => t.getPopupContainer),
      inlineCollapsed: E,
      theme: V(() => t.theme),
      siderCollapsed: d,
      defaultMotions: V(() => v.value ? W.value : null),
      motion: V(() => v.value ? t.motion : null),
      overflowDisabled: ve(void 0),
      onOpenChange: j,
      onItemClick: U,
      registerMenuInfo: Y,
      unRegisterMenuInfo: ne,
      selectedSubMenuKeys: _,
      expandIcon: ue,
      forceSubMenuRender: V(() => t.forceSubMenuRender),
      rootClassName: c
    });
    const ye = () => {
      var se;
      return p.value || qr((se = n.default) === null || se === void 0 ? void 0 : se.call(n));
    };
    return () => {
      var se;
      const he = ye(), re = fe.value >= he.length - 1 || T.value !== "horizontal" || t.disabledOverflow, q = (de) => T.value !== "horizontal" || t.disabledOverflow ? de : (
        // Need wrap for overflow dropdown that do not response for open
        de.map((xe, we) => (
          // Always wrap provider to avoid sub node re-mount
          D(sC, {
            key: xe.key,
            overflowDisabled: we > fe.value
          }, {
            default: () => xe
          })
        ))
      ), K = ((se = n.overflowedIndicator) === null || se === void 0 ? void 0 : se.call(n)) || D(W2, null, null);
      return u(D(Au, te(te({}, i), {}, {
        onMousedown: t.onMousedown,
        prefixCls: `${l.value}-overflow`,
        component: "ul",
        itemComponent: Lg,
        class: [B.value, i.class, c.value],
        role: "menu",
        id: t.id,
        data: q(he),
        renderRawItem: (de) => de,
        renderRawRest: (de) => {
          const xe = de.length, we = xe ? he.slice(-xe) : null;
          return D(Wt, null, [D(Ng, {
            eventKey: eS,
            key: eS,
            title: K,
            disabled: re,
            internalPopupClose: xe === 0
          }, {
            default: () => we
          }), D(TQ, null, {
            default: () => [D(Ng, {
              eventKey: eS,
              key: eS,
              title: K,
              disabled: re,
              internalPopupClose: xe === 0
            }, {
              default: () => we
            })]
          })]);
        },
        maxCount: T.value !== "horizontal" || t.disabledOverflow ? Au.INVALIDATE : Au.RESPONSIVE,
        ssr: "full",
        "data-menu-list": !0,
        onVisibleChange: (de) => {
          fe.value = de;
        }
      }), {
        default: () => [D(R_, {
          to: "body"
        }, {
          default: () => [D("div", {
            style: {
              display: "none"
            },
            "aria-hidden": !0
          }, [D(TQ, null, {
            default: () => [q(ye())]
          })])]
        })]
      }));
    };
  }
});
ef.install = function(t) {
  return t.component(ef.name, ef), t.component(Lg.name, Lg), t.component(Ng.name, Ng), t.component(uC.name, uC), t.component(lC.name, lC), t;
};
ef.Item = Lg;
ef.Divider = uC;
ef.SubMenu = Ng;
ef.ItemGroup = lC;
var rBe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const iBe = {
  prefixCls: String,
  name: String,
  id: String,
  type: String,
  defaultChecked: {
    type: [Boolean, Number],
    default: void 0
  },
  checked: {
    type: [Boolean, Number],
    default: void 0
  },
  disabled: Boolean,
  tabindex: {
    type: [Number, String]
  },
  readonly: Boolean,
  autofocus: Boolean,
  value: oe.any,
  required: Boolean
}, Fie = ae({
  compatConfig: {
    MODE: 3
  },
  name: "Checkbox",
  inheritAttrs: !1,
  props: li(iBe, {
    prefixCls: "rc-checkbox",
    type: "checkbox",
    defaultChecked: !1
  }),
  emits: ["click", "change"],
  setup(t, e) {
    let {
      attrs: n,
      emit: r,
      expose: i
    } = e;
    const a = ee(t.checked === void 0 ? t.defaultChecked : t.checked), o = ee();
    me(() => t.checked, () => {
      a.value = t.checked;
    }), i({
      focus() {
        var c;
        (c = o.value) === null || c === void 0 || c.focus();
      },
      blur() {
        var c;
        (c = o.value) === null || c === void 0 || c.blur();
      }
    });
    const s = ee(), l = (c) => {
      if (t.disabled)
        return;
      t.checked === void 0 && (a.value = c.target.checked), c.shiftKey = s.value;
      const f = {
        target: k(k({}, t), {
          checked: c.target.checked
        }),
        stopPropagation() {
          c.stopPropagation();
        },
        preventDefault() {
          c.preventDefault();
        },
        nativeEvent: c
      };
      t.checked !== void 0 && (o.value.checked = !!t.checked), r("change", f), s.value = !1;
    }, u = (c) => {
      r("click", c), s.value = c.shiftKey;
    };
    return () => {
      const {
        prefixCls: c,
        name: f,
        id: d,
        type: h,
        disabled: p,
        readonly: v,
        tabindex: g,
        autofocus: m,
        value: y,
        required: _
      } = t, O = rBe(t, ["prefixCls", "name", "id", "type", "disabled", "readonly", "tabindex", "autofocus", "value", "required"]), {
        class: S,
        onFocus: x,
        onBlur: C,
        onKeydown: P,
        onKeypress: $,
        onKeyup: T
      } = n, E = k(k({}, O), n), M = Object.keys(E).reduce((I, B) => ((B.startsWith("data-") || B.startsWith("aria-") || B === "role") && (I[B] = E[B]), I), {}), R = Re(c, S, {
        [`${c}-checked`]: a.value,
        [`${c}-disabled`]: p
      }), N = k(k({
        name: f,
        id: d,
        type: h,
        readonly: v,
        disabled: p,
        tabindex: g,
        class: `${c}-input`,
        checked: !!a.value,
        autofocus: m,
        value: y
      }, M), {
        onChange: l,
        onClick: u,
        onFocus: x,
        onBlur: C,
        onKeydown: P,
        onKeypress: $,
        onKeyup: T,
        required: _
      });
      return D("span", {
        class: R
      }, [D("input", te({
        ref: o
      }, N), null), D("span", {
        class: `${c}-inner`
      }, null)]);
    };
  }
}), Wie = Symbol("radioGroupContextKey"), aBe = (t) => {
  Et(Wie, t);
}, oBe = () => et(Wie, void 0), Qie = Symbol("radioOptionTypeContextKey"), sBe = (t) => {
  Et(Qie, t);
}, lBe = () => et(Qie, void 0), uBe = new qt("antRadioEffect", {
  "0%": {
    transform: "scale(1)",
    opacity: 0.5
  },
  "100%": {
    transform: "scale(1.6)",
    opacity: 0
  }
}), cBe = (t) => {
  const {
    componentCls: e,
    antCls: n
  } = t, r = `${e}-group`;
  return {
    [r]: k(k({}, Gn(t)), {
      display: "inline-block",
      fontSize: 0,
      // RTL
      [`&${r}-rtl`]: {
        direction: "rtl"
      },
      [`${n}-badge ${n}-badge-count`]: {
        zIndex: 1
      },
      [`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]: {
        borderInlineStart: "none"
      }
    })
  };
}, fBe = (t) => {
  const {
    componentCls: e,
    radioWrapperMarginRight: n,
    radioCheckedColor: r,
    radioSize: i,
    motionDurationSlow: a,
    motionDurationMid: o,
    motionEaseInOut: s,
    motionEaseInOutCirc: l,
    radioButtonBg: u,
    colorBorder: c,
    lineWidth: f,
    radioDotSize: d,
    colorBgContainerDisabled: h,
    colorTextDisabled: p,
    paddingXS: v,
    radioDotDisabledColor: g,
    lineType: m,
    radioDotDisabledSize: y,
    wireframe: _,
    colorWhite: O
  } = t, S = `${e}-inner`;
  return {
    [`${e}-wrapper`]: k(k({}, Gn(t)), {
      position: "relative",
      display: "inline-flex",
      alignItems: "baseline",
      marginInlineStart: 0,
      marginInlineEnd: n,
      cursor: "pointer",
      // RTL
      [`&${e}-wrapper-rtl`]: {
        direction: "rtl"
      },
      "&-disabled": {
        cursor: "not-allowed",
        color: t.colorTextDisabled
      },
      "&::after": {
        display: "inline-block",
        width: 0,
        overflow: "hidden",
        content: '"\\a0"'
      },
      // hashId 在 wrapper 上，只能铺平
      [`${e}-checked::after`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineStart: 0,
        width: "100%",
        height: "100%",
        border: `${f}px ${m} ${r}`,
        borderRadius: "50%",
        visibility: "hidden",
        animationName: uBe,
        animationDuration: a,
        animationTimingFunction: s,
        animationFillMode: "both",
        content: '""'
      },
      [e]: k(k({}, Gn(t)), {
        position: "relative",
        display: "inline-block",
        outline: "none",
        cursor: "pointer",
        alignSelf: "center"
      }),
      [`${e}-wrapper:hover &,
        &:hover ${S}`]: {
        borderColor: r
      },
      [`${e}-input:focus-visible + ${S}`]: k({}, G_(t)),
      [`${e}:hover::after, ${e}-wrapper:hover &::after`]: {
        visibility: "visible"
      },
      [`${e}-inner`]: {
        "&::after": {
          boxSizing: "border-box",
          position: "absolute",
          insetBlockStart: "50%",
          insetInlineStart: "50%",
          display: "block",
          width: i,
          height: i,
          marginBlockStart: i / -2,
          marginInlineStart: i / -2,
          backgroundColor: _ ? r : O,
          borderBlockStart: 0,
          borderInlineStart: 0,
          borderRadius: i,
          transform: "scale(0)",
          opacity: 0,
          transition: `all ${a} ${l}`,
          content: '""'
        },
        boxSizing: "border-box",
        position: "relative",
        insetBlockStart: 0,
        insetInlineStart: 0,
        display: "block",
        width: i,
        height: i,
        backgroundColor: u,
        borderColor: c,
        borderStyle: "solid",
        borderWidth: f,
        borderRadius: "50%",
        transition: `all ${o}`
      },
      [`${e}-input`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineEnd: 0,
        insetBlockEnd: 0,
        insetInlineStart: 0,
        zIndex: 1,
        cursor: "pointer",
        opacity: 0
      },
      // 选中状态
      [`${e}-checked`]: {
        [S]: {
          borderColor: r,
          backgroundColor: _ ? u : r,
          "&::after": {
            transform: `scale(${d / i})`,
            opacity: 1,
            transition: `all ${a} ${l}`
          }
        }
      },
      [`${e}-disabled`]: {
        cursor: "not-allowed",
        [S]: {
          backgroundColor: h,
          borderColor: c,
          cursor: "not-allowed",
          "&::after": {
            backgroundColor: g
          }
        },
        [`${e}-input`]: {
          cursor: "not-allowed"
        },
        [`${e}-disabled + span`]: {
          color: p,
          cursor: "not-allowed"
        },
        [`&${e}-checked`]: {
          [S]: {
            "&::after": {
              transform: `scale(${y / i})`
            }
          }
        }
      },
      [`span${e} + *`]: {
        paddingInlineStart: v,
        paddingInlineEnd: v
      }
    })
  };
}, dBe = (t) => {
  const {
    radioButtonColor: e,
    controlHeight: n,
    componentCls: r,
    lineWidth: i,
    lineType: a,
    colorBorder: o,
    motionDurationSlow: s,
    motionDurationMid: l,
    radioButtonPaddingHorizontal: u,
    fontSize: c,
    radioButtonBg: f,
    fontSizeLG: d,
    controlHeightLG: h,
    controlHeightSM: p,
    paddingXS: v,
    borderRadius: g,
    borderRadiusSM: m,
    borderRadiusLG: y,
    radioCheckedColor: _,
    radioButtonCheckedBg: O,
    radioButtonHoverColor: S,
    radioButtonActiveColor: x,
    radioSolidCheckedColor: C,
    colorTextDisabled: P,
    colorBgContainerDisabled: $,
    radioDisabledButtonCheckedColor: T,
    radioDisabledButtonCheckedBg: E
  } = t;
  return {
    [`${r}-button-wrapper`]: {
      position: "relative",
      display: "inline-block",
      height: n,
      margin: 0,
      paddingInline: u,
      paddingBlock: 0,
      color: e,
      fontSize: c,
      lineHeight: `${n - i * 2}px`,
      background: f,
      border: `${i}px ${a} ${o}`,
      // strange align fix for chrome but works
      // https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
      borderBlockStartWidth: i + 0.02,
      borderInlineStartWidth: 0,
      borderInlineEndWidth: i,
      cursor: "pointer",
      transition: [`color ${l}`, `background ${l}`, `border-color ${l}`, `box-shadow ${l}`].join(","),
      a: {
        color: e
      },
      [`> ${r}-button`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineStart: 0,
        zIndex: -1,
        width: "100%",
        height: "100%"
      },
      "&:not(:first-child)": {
        "&::before": {
          position: "absolute",
          insetBlockStart: -i,
          insetInlineStart: -i,
          display: "block",
          boxSizing: "content-box",
          width: 1,
          height: "100%",
          paddingBlock: i,
          paddingInline: 0,
          backgroundColor: o,
          transition: `background-color ${s}`,
          content: '""'
        }
      },
      "&:first-child": {
        borderInlineStart: `${i}px ${a} ${o}`,
        borderStartStartRadius: g,
        borderEndStartRadius: g
      },
      "&:last-child": {
        borderStartEndRadius: g,
        borderEndEndRadius: g
      },
      "&:first-child:last-child": {
        borderRadius: g
      },
      [`${r}-group-large &`]: {
        height: h,
        fontSize: d,
        lineHeight: `${h - i * 2}px`,
        "&:first-child": {
          borderStartStartRadius: y,
          borderEndStartRadius: y
        },
        "&:last-child": {
          borderStartEndRadius: y,
          borderEndEndRadius: y
        }
      },
      [`${r}-group-small &`]: {
        height: p,
        paddingInline: v - i,
        paddingBlock: 0,
        lineHeight: `${p - i * 2}px`,
        "&:first-child": {
          borderStartStartRadius: m,
          borderEndStartRadius: m
        },
        "&:last-child": {
          borderStartEndRadius: m,
          borderEndEndRadius: m
        }
      },
      "&:hover": {
        position: "relative",
        color: _
      },
      "&:has(:focus-visible)": k({}, G_(t)),
      [`${r}-inner, input[type='checkbox'], input[type='radio']`]: {
        width: 0,
        height: 0,
        opacity: 0,
        pointerEvents: "none"
      },
      [`&-checked:not(${r}-button-wrapper-disabled)`]: {
        zIndex: 1,
        color: _,
        background: O,
        borderColor: _,
        "&::before": {
          backgroundColor: _
        },
        "&:first-child": {
          borderColor: _
        },
        "&:hover": {
          color: S,
          borderColor: S,
          "&::before": {
            backgroundColor: S
          }
        },
        "&:active": {
          color: x,
          borderColor: x,
          "&::before": {
            backgroundColor: x
          }
        }
      },
      [`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]: {
        color: C,
        background: _,
        borderColor: _,
        "&:hover": {
          color: C,
          background: S,
          borderColor: S
        },
        "&:active": {
          color: C,
          background: x,
          borderColor: x
        }
      },
      "&-disabled": {
        color: P,
        backgroundColor: $,
        borderColor: o,
        cursor: "not-allowed",
        "&:first-child, &:hover": {
          color: P,
          backgroundColor: $,
          borderColor: o
        }
      },
      [`&-disabled${r}-button-wrapper-checked`]: {
        color: T,
        backgroundColor: E,
        borderColor: o,
        boxShadow: "none"
      }
    }
  };
}, Hie = pr("Radio", (t) => {
  const {
    padding: e,
    lineWidth: n,
    controlItemBgActiveDisabled: r,
    colorTextDisabled: i,
    colorBgContainer: a,
    fontSizeLG: o,
    controlOutline: s,
    colorPrimaryHover: l,
    colorPrimaryActive: u,
    colorText: c,
    colorPrimary: f,
    marginXS: d,
    controlOutlineWidth: h,
    colorTextLightSolid: p,
    wireframe: v
  } = t, g = `0 0 0 ${h}px ${s}`, m = g, y = o, _ = 4, O = y - _ * 2, S = v ? O : y - (_ + n) * 2, x = f, C = c, P = l, $ = u, T = e - n, R = bn(t, {
    radioFocusShadow: g,
    radioButtonFocusShadow: m,
    radioSize: y,
    radioDotSize: S,
    radioDotDisabledSize: O,
    radioCheckedColor: x,
    radioDotDisabledColor: i,
    radioSolidCheckedColor: p,
    radioButtonBg: a,
    radioButtonCheckedBg: a,
    radioButtonColor: C,
    radioButtonHoverColor: P,
    radioButtonActiveColor: $,
    radioButtonPaddingHorizontal: T,
    radioDisabledButtonCheckedBg: r,
    radioDisabledButtonCheckedColor: i,
    radioWrapperMarginRight: d
  });
  return [cBe(R), fBe(R), dBe(R)];
});
var hBe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const Gie = () => ({
  prefixCls: String,
  checked: Tt(),
  disabled: Tt(),
  isGroup: Tt(),
  value: oe.any,
  name: String,
  id: String,
  autofocus: Tt(),
  onChange: Ct(),
  onFocus: Ct(),
  onBlur: Ct(),
  onClick: Ct(),
  "onUpdate:checked": Ct(),
  "onUpdate:value": Ct()
}), Ta = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ARadio",
  inheritAttrs: !1,
  props: Gie(),
  setup(t, e) {
    let {
      emit: n,
      expose: r,
      slots: i,
      attrs: a
    } = e;
    const o = Ul(), s = Qs.useInject(), l = lBe(), u = oBe(), c = Vl(), f = V(() => {
      var P;
      return (P = v.value) !== null && P !== void 0 ? P : c.value;
    }), d = ee(), {
      prefixCls: h,
      direction: p,
      disabled: v
    } = hn("radio", t), g = V(() => (u == null ? void 0 : u.optionType.value) === "button" || l === "button" ? `${h.value}-button` : h.value), m = Vl(), [y, _] = Hie(h);
    r({
      focus: () => {
        d.value.focus();
      },
      blur: () => {
        d.value.blur();
      }
    });
    const x = (P) => {
      const $ = P.target.checked;
      n("update:checked", $), n("update:value", $), n("change", P), o.onFieldChange();
    }, C = (P) => {
      n("change", P), u && u.onChange && u.onChange(P);
    };
    return () => {
      var P;
      const $ = u, {
        prefixCls: T,
        id: E = o.id.value
      } = t, M = hBe(t, ["prefixCls", "id"]), R = k(k({
        prefixCls: g.value,
        id: E
      }, si(M, ["onUpdate:checked", "onUpdate:value"])), {
        disabled: (P = v.value) !== null && P !== void 0 ? P : m.value
      });
      $ ? (R.name = $.name.value, R.onChange = C, R.checked = t.value === $.value.value, R.disabled = f.value || $.disabled.value) : R.onChange = x;
      const N = Re({
        [`${g.value}-wrapper`]: !0,
        [`${g.value}-wrapper-checked`]: R.checked,
        [`${g.value}-wrapper-disabled`]: R.disabled,
        [`${g.value}-wrapper-rtl`]: p.value === "rtl",
        [`${g.value}-wrapper-in-form-item`]: s.isFormItemInput
      }, a.class, _.value);
      return y(D("label", te(te({}, a), {}, {
        class: N
      }), [D(Fie, te(te({}, R), {}, {
        type: "radio",
        ref: d
      }), null), i.default && D("span", null, [i.default()])]));
    };
  }
}), pBe = () => ({
  prefixCls: String,
  value: oe.any,
  size: rr(),
  options: Lh(),
  disabled: Tt(),
  name: String,
  buttonStyle: rr("outline"),
  id: String,
  optionType: rr("default"),
  onChange: Ct(),
  "onUpdate:value": Ct()
}), Fh = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ARadioGroup",
  inheritAttrs: !1,
  props: pBe(),
  // emits: ['update:value', 'change'],
  setup(t, e) {
    let {
      slots: n,
      emit: r,
      attrs: i
    } = e;
    const a = Ul(), {
      prefixCls: o,
      direction: s,
      size: l
    } = hn("radio", t), [u, c] = Hie(o), f = ee(t.value), d = ee(!1);
    return me(() => t.value, (p) => {
      f.value = p, d.value = !1;
    }), aBe({
      onChange: (p) => {
        const v = f.value, {
          value: g
        } = p.target;
        "value" in t || (f.value = g), !d.value && g !== v && (d.value = !0, r("update:value", g), r("change", p), a.onFieldChange()), Bt(() => {
          d.value = !1;
        });
      },
      value: f,
      disabled: V(() => t.disabled),
      name: V(() => t.name),
      optionType: V(() => t.optionType)
    }), () => {
      var p;
      const {
        options: v,
        buttonStyle: g,
        id: m = a.id.value
      } = t, y = `${o.value}-group`, _ = Re(y, `${y}-${g}`, {
        [`${y}-${l.value}`]: l.value,
        [`${y}-rtl`]: s.value === "rtl"
      }, i.class, c.value);
      let O = null;
      return v && v.length > 0 ? O = v.map((S) => {
        if (typeof S == "string" || typeof S == "number")
          return D(Ta, {
            key: S,
            prefixCls: o.value,
            disabled: t.disabled,
            value: S,
            checked: f.value === S
          }, {
            default: () => [S]
          });
        const {
          value: x,
          disabled: C,
          label: P
        } = S;
        return D(Ta, {
          key: `radio-group-value-options-${x}`,
          prefixCls: o.value,
          disabled: C || t.disabled,
          value: x,
          checked: f.value === x
        }, {
          default: () => [P]
        });
      }) : O = (p = n.default) === null || p === void 0 ? void 0 : p.call(n), u(D("div", te(te({}, i), {}, {
        class: _,
        id: m
      }), [O]));
    };
  }
}), _l = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ARadioButton",
  inheritAttrs: !1,
  props: Gie(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const {
      prefixCls: i
    } = hn("radio", t);
    return sBe("button"), () => {
      var a;
      return D(Ta, te(te(te({}, r), t), {}, {
        prefixCls: i.value
      }), {
        default: () => [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]
      });
    };
  }
});
Ta.Group = Fh;
Ta.Button = _l;
Ta.install = function(t) {
  return t.component(Ta.name, Ta), t.component(Ta.Group.name, Ta.Group), t.component(Ta.Button.name, Ta.Button), t;
};
const jie = (t) => ({
  // Firefox
  "&::-moz-placeholder": {
    opacity: 1
  },
  "&::placeholder": {
    color: t,
    userSelect: "none"
    // https://github.com/ant-design/ant-design/pull/32639
  },
  "&:placeholder-shown": {
    textOverflow: "ellipsis"
  }
}), X_ = (t) => ({
  borderColor: t.inputBorderHoverColor,
  borderInlineEndWidth: t.lineWidth
}), cC = (t) => ({
  borderColor: t.inputBorderHoverColor,
  boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`,
  borderInlineEndWidth: t.lineWidth,
  outline: 0
}), Zie = (t) => ({
  color: t.colorTextDisabled,
  backgroundColor: t.colorBgContainerDisabled,
  borderColor: t.colorBorder,
  boxShadow: "none",
  cursor: "not-allowed",
  opacity: 1,
  "&:hover": k({}, X_(bn(t, {
    inputBorderHoverColor: t.colorBorder
  })))
}), Uie = (t) => {
  const {
    inputPaddingVerticalLG: e,
    fontSizeLG: n,
    lineHeightLG: r,
    borderRadiusLG: i,
    inputPaddingHorizontalLG: a
  } = t;
  return {
    padding: `${e}px ${a}px`,
    fontSize: n,
    lineHeight: r,
    borderRadius: i
  };
}, Xie = (t) => ({
  padding: `${t.inputPaddingVerticalSM}px ${t.controlPaddingHorizontalSM - 1}px`,
  borderRadius: t.borderRadiusSM
}), H2 = (t, e) => {
  const {
    componentCls: n,
    colorError: r,
    colorWarning: i,
    colorErrorOutline: a,
    colorWarningOutline: o,
    colorErrorBorderHover: s,
    colorWarningBorderHover: l
  } = t;
  return {
    [`&-status-error:not(${e}-disabled):not(${e}-borderless)${e}`]: {
      borderColor: r,
      "&:hover": {
        borderColor: s
      },
      "&:focus, &-focused": k({}, cC(bn(t, {
        inputBorderActiveColor: r,
        inputBorderHoverColor: r,
        controlOutline: a
      }))),
      [`${n}-prefix`]: {
        color: r
      }
    },
    [`&-status-warning:not(${e}-disabled):not(${e}-borderless)${e}`]: {
      borderColor: i,
      "&:hover": {
        borderColor: l
      },
      "&:focus, &-focused": k({}, cC(bn(t, {
        inputBorderActiveColor: i,
        inputBorderHoverColor: i,
        controlOutline: o
      }))),
      [`${n}-prefix`]: {
        color: i
      }
    }
  };
}, G2 = (t) => k(k({
  position: "relative",
  display: "inline-block",
  width: "100%",
  minWidth: 0,
  padding: `${t.inputPaddingVertical}px ${t.inputPaddingHorizontal}px`,
  color: t.colorText,
  fontSize: t.fontSize,
  lineHeight: t.lineHeight,
  backgroundColor: t.colorBgContainer,
  backgroundImage: "none",
  borderWidth: t.lineWidth,
  borderStyle: t.lineType,
  borderColor: t.colorBorder,
  borderRadius: t.borderRadius,
  transition: `all ${t.motionDurationMid}`
}, jie(t.colorTextPlaceholder)), {
  "&:hover": k({}, X_(t)),
  "&:focus, &-focused": k({}, cC(t)),
  "&-disabled, &[disabled]": k({}, Zie(t)),
  "&-borderless": {
    "&, &:hover, &:focus, &-focused, &-disabled, &[disabled]": {
      backgroundColor: "transparent",
      border: "none",
      boxShadow: "none"
    }
  },
  // Reset height for `textarea`s
  "textarea&": {
    maxWidth: "100%",
    height: "auto",
    minHeight: t.controlHeight,
    lineHeight: t.lineHeight,
    verticalAlign: "bottom",
    transition: `all ${t.motionDurationSlow}, height 0s`,
    resize: "vertical"
  },
  // Size
  "&-lg": k({}, Uie(t)),
  "&-sm": k({}, Xie(t)),
  // RTL
  "&-rtl": {
    direction: "rtl"
  },
  "&-textarea-rtl": {
    direction: "rtl"
  }
}), Yie = (t) => {
  const {
    componentCls: e,
    antCls: n
  } = t;
  return {
    position: "relative",
    display: "table",
    width: "100%",
    borderCollapse: "separate",
    borderSpacing: 0,
    // Undo padding and float of grid classes
    "&[class*='col-']": {
      paddingInlineEnd: t.paddingXS,
      "&:last-child": {
        paddingInlineEnd: 0
      }
    },
    // Sizing options
    [`&-lg ${e}, &-lg > ${e}-group-addon`]: k({}, Uie(t)),
    [`&-sm ${e}, &-sm > ${e}-group-addon`]: k({}, Xie(t)),
    [`> ${e}`]: {
      display: "table-cell",
      "&:not(:first-child):not(:last-child)": {
        borderRadius: 0
      }
    },
    [`${e}-group`]: {
      "&-addon, &-wrap": {
        display: "table-cell",
        width: 1,
        whiteSpace: "nowrap",
        verticalAlign: "middle",
        "&:not(:first-child):not(:last-child)": {
          borderRadius: 0
        }
      },
      "&-wrap > *": {
        display: "block !important"
      },
      "&-addon": {
        position: "relative",
        padding: `0 ${t.inputPaddingHorizontal}px`,
        color: t.colorText,
        fontWeight: "normal",
        fontSize: t.fontSize,
        textAlign: "center",
        backgroundColor: t.colorFillAlter,
        border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
        borderRadius: t.borderRadius,
        transition: `all ${t.motionDurationSlow}`,
        lineHeight: 1,
        // Reset Select's style in addon
        [`${n}-select`]: {
          margin: `-${t.inputPaddingVertical + 1}px -${t.inputPaddingHorizontal}px`,
          [`&${n}-select-single:not(${n}-select-customize-input)`]: {
            [`${n}-select-selector`]: {
              backgroundColor: "inherit",
              border: `${t.lineWidth}px ${t.lineType} transparent`,
              boxShadow: "none"
            }
          },
          "&-open, &-focused": {
            [`${n}-select-selector`]: {
              color: t.colorPrimary
            }
          }
        },
        // https://github.com/ant-design/ant-design/issues/31333
        [`${n}-cascader-picker`]: {
          margin: `-9px -${t.inputPaddingHorizontal}px`,
          backgroundColor: "transparent",
          [`${n}-cascader-input`]: {
            textAlign: "start",
            border: 0,
            boxShadow: "none"
          }
        }
      },
      "&-addon:first-child": {
        borderInlineEnd: 0
      },
      "&-addon:last-child": {
        borderInlineStart: 0
      }
    },
    [`${e}`]: {
      float: "inline-start",
      width: "100%",
      marginBottom: 0,
      textAlign: "inherit",
      "&:focus": {
        zIndex: 1,
        borderInlineEndWidth: 1
      },
      "&:hover": {
        zIndex: 1,
        borderInlineEndWidth: 1,
        [`${e}-search-with-button &`]: {
          zIndex: 0
        }
      }
    },
    // Reset rounded corners
    [`> ${e}:first-child, ${e}-group-addon:first-child`]: {
      borderStartEndRadius: 0,
      borderEndEndRadius: 0,
      // Reset Select's style in addon
      [`${n}-select ${n}-select-selector`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`> ${e}-affix-wrapper`]: {
      [`&:not(:first-child) ${e}`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      },
      [`&:not(:last-child) ${e}`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`> ${e}:last-child, ${e}-group-addon:last-child`]: {
      borderStartStartRadius: 0,
      borderEndStartRadius: 0,
      // Reset Select's style in addon
      [`${n}-select ${n}-select-selector`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`${e}-affix-wrapper`]: {
      "&:not(:last-child)": {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0,
        [`${e}-search &`]: {
          borderStartStartRadius: t.borderRadius,
          borderEndStartRadius: t.borderRadius
        }
      },
      [`&:not(:first-child), ${e}-search &:not(:first-child)`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`&${e}-group-compact`]: k(k({
      display: "block"
    }, Kw()), {
      [`${e}-group-addon, ${e}-group-wrap, > ${e}`]: {
        "&:not(:first-child):not(:last-child)": {
          borderInlineEndWidth: t.lineWidth,
          "&:hover": {
            zIndex: 1
          },
          "&:focus": {
            zIndex: 1
          }
        }
      },
      "& > *": {
        display: "inline-block",
        float: "none",
        verticalAlign: "top",
        borderRadius: 0
      },
      [`& > ${e}-affix-wrapper`]: {
        display: "inline-flex"
      },
      [`& > ${n}-picker-range`]: {
        display: "inline-flex"
      },
      "& > *:not(:last-child)": {
        marginInlineEnd: -t.lineWidth,
        borderInlineEndWidth: t.lineWidth
      },
      // Undo float for .ant-input-group .ant-input
      [`${e}`]: {
        float: "none"
      },
      // reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
      [`& > ${n}-select > ${n}-select-selector,
      & > ${n}-select-auto-complete ${e},
      & > ${n}-cascader-picker ${e},
      & > ${e}-group-wrapper ${e}`]: {
        borderInlineEndWidth: t.lineWidth,
        borderRadius: 0,
        "&:hover": {
          zIndex: 1
        },
        "&:focus": {
          zIndex: 1
        }
      },
      [`& > ${n}-select-focused`]: {
        zIndex: 1
      },
      // update z-index for arrow icon
      [`& > ${n}-select > ${n}-select-arrow`]: {
        zIndex: 1
        // https://github.com/ant-design/ant-design/issues/20371
      },
      [`& > *:first-child,
      & > ${n}-select:first-child > ${n}-select-selector,
      & > ${n}-select-auto-complete:first-child ${e},
      & > ${n}-cascader-picker:first-child ${e}`]: {
        borderStartStartRadius: t.borderRadius,
        borderEndStartRadius: t.borderRadius
      },
      [`& > *:last-child,
      & > ${n}-select:last-child > ${n}-select-selector,
      & > ${n}-cascader-picker:last-child ${e},
      & > ${n}-cascader-picker-focused:last-child ${e}`]: {
        borderInlineEndWidth: t.lineWidth,
        borderStartEndRadius: t.borderRadius,
        borderEndEndRadius: t.borderRadius
      },
      // https://github.com/ant-design/ant-design/issues/12493
      [`& > ${n}-select-auto-complete ${e}`]: {
        verticalAlign: "top"
      },
      [`${e}-group-wrapper + ${e}-group-wrapper`]: {
        marginInlineStart: -t.lineWidth,
        [`${e}-affix-wrapper`]: {
          borderRadius: 0
        }
      },
      [`${e}-group-wrapper:not(:last-child)`]: {
        [`&${e}-search > ${e}-group`]: {
          [`& > ${e}-group-addon > ${e}-search-button`]: {
            borderRadius: 0
          },
          [`& > ${e}`]: {
            borderStartStartRadius: t.borderRadius,
            borderStartEndRadius: 0,
            borderEndEndRadius: 0,
            borderEndStartRadius: t.borderRadius
          }
        }
      }
    }),
    [`&&-sm ${n}-btn`]: {
      fontSize: t.fontSizeSM,
      height: t.controlHeightSM,
      lineHeight: "normal"
    },
    [`&&-lg ${n}-btn`]: {
      fontSize: t.fontSizeLG,
      height: t.controlHeightLG,
      lineHeight: "normal"
    },
    // Fix https://github.com/ant-design/ant-design/issues/5754
    [`&&-lg ${n}-select-single ${n}-select-selector`]: {
      height: `${t.controlHeightLG}px`,
      [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
        // -2 is for the border size & override default
        lineHeight: `${t.controlHeightLG - 2}px`
      },
      [`${n}-select-selection-search-input`]: {
        height: `${t.controlHeightLG}px`
      }
    },
    [`&&-sm ${n}-select-single ${n}-select-selector`]: {
      height: `${t.controlHeightSM}px`,
      [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
        // -2 is for the border size & override default
        lineHeight: `${t.controlHeightSM - 2}px`
      },
      [`${n}-select-selection-search-input`]: {
        height: `${t.controlHeightSM}px`
      }
    }
  };
}, vBe = (t) => {
  const {
    componentCls: e,
    controlHeightSM: n,
    lineWidth: r
  } = t, a = (n - r * 2 - 16) / 2;
  return {
    [e]: k(k(k(k({}, Gn(t)), G2(t)), H2(t, e)), {
      '&[type="color"]': {
        height: t.controlHeight,
        [`&${e}-lg`]: {
          height: t.controlHeightLG
        },
        [`&${e}-sm`]: {
          height: n,
          paddingTop: a,
          paddingBottom: a
        }
      }
    })
  };
}, gBe = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    // ========================= Input =========================
    [`${e}-clear-icon`]: {
      margin: 0,
      color: t.colorTextQuaternary,
      fontSize: t.fontSizeIcon,
      verticalAlign: -1,
      // https://github.com/ant-design/ant-design/pull/18151
      // https://codesandbox.io/s/wizardly-sun-u10br
      cursor: "pointer",
      transition: `color ${t.motionDurationSlow}`,
      "&:hover": {
        color: t.colorTextTertiary
      },
      "&:active": {
        color: t.colorText
      },
      "&-hidden": {
        visibility: "hidden"
      },
      "&-has-suffix": {
        margin: `0 ${t.inputAffixPadding}px`
      }
    },
    // ======================= TextArea ========================
    "&-textarea-with-clear-btn": {
      padding: "0 !important",
      border: "0 !important",
      [`${e}-clear-icon`]: {
        position: "absolute",
        insetBlockStart: t.paddingXS,
        insetInlineEnd: t.paddingXS,
        zIndex: 1
      }
    }
  };
}, mBe = (t) => {
  const {
    componentCls: e,
    inputAffixPadding: n,
    colorTextDescription: r,
    motionDurationSlow: i,
    colorIcon: a,
    colorIconHover: o,
    iconCls: s
  } = t;
  return {
    [`${e}-affix-wrapper`]: k(k(k(k(k({}, G2(t)), {
      display: "inline-flex",
      [`&:not(${e}-affix-wrapper-disabled):hover`]: k(k({}, X_(t)), {
        zIndex: 1,
        [`${e}-search-with-button &`]: {
          zIndex: 0
        }
      }),
      "&-focused, &:focus": {
        zIndex: 1
      },
      "&-disabled": {
        [`${e}[disabled]`]: {
          background: "transparent"
        }
      },
      [`> input${e}`]: {
        padding: 0,
        fontSize: "inherit",
        border: "none",
        borderRadius: 0,
        outline: "none",
        "&:focus": {
          boxShadow: "none !important"
        }
      },
      "&::before": {
        width: 0,
        visibility: "hidden",
        content: '"\\a0"'
      },
      [`${e}`]: {
        "&-prefix, &-suffix": {
          display: "flex",
          flex: "none",
          alignItems: "center",
          "> *:not(:last-child)": {
            marginInlineEnd: t.paddingXS
          }
        },
        "&-show-count-suffix": {
          color: r
        },
        "&-show-count-has-suffix": {
          marginInlineEnd: t.paddingXXS
        },
        "&-prefix": {
          marginInlineEnd: n
        },
        "&-suffix": {
          marginInlineStart: n
        }
      }
    }), gBe(t)), {
      // password
      [`${s}${e}-password-icon`]: {
        color: a,
        cursor: "pointer",
        transition: `all ${i}`,
        "&:hover": {
          color: o
        }
      }
    }), H2(t, `${e}-affix-wrapper`))
  };
}, yBe = (t) => {
  const {
    componentCls: e,
    colorError: n,
    colorSuccess: r,
    borderRadiusLG: i,
    borderRadiusSM: a
  } = t;
  return {
    [`${e}-group`]: k(k(k({}, Gn(t)), Yie(t)), {
      "&-rtl": {
        direction: "rtl"
      },
      "&-wrapper": {
        display: "inline-block",
        width: "100%",
        textAlign: "start",
        verticalAlign: "top",
        "&-rtl": {
          direction: "rtl"
        },
        // Size
        "&-lg": {
          [`${e}-group-addon`]: {
            borderRadius: i
          }
        },
        "&-sm": {
          [`${e}-group-addon`]: {
            borderRadius: a
          }
        },
        // Status
        "&-status-error": {
          [`${e}-group-addon`]: {
            color: n,
            borderColor: n
          }
        },
        "&-status-warning": {
          [`${e}-group-addon:last-child`]: {
            color: r,
            borderColor: r
          }
        }
      }
    })
  };
}, bBe = (t) => {
  const {
    componentCls: e,
    antCls: n
  } = t, r = `${e}-search`;
  return {
    [r]: {
      [`${e}`]: {
        "&:hover, &:focus": {
          borderColor: t.colorPrimaryHover,
          [`+ ${e}-group-addon ${r}-button:not(${n}-btn-primary)`]: {
            borderInlineStartColor: t.colorPrimaryHover
          }
        }
      },
      [`${e}-affix-wrapper`]: {
        borderRadius: 0
      },
      // fix slight height diff in Firefox:
      // https://ant.design/components/auto-complete-cn/#components-auto-complete-demo-certain-category
      [`${e}-lg`]: {
        lineHeight: t.lineHeightLG - 2e-4
      },
      [`> ${e}-group`]: {
        [`> ${e}-group-addon:last-child`]: {
          insetInlineStart: -1,
          padding: 0,
          border: 0,
          [`${r}-button`]: {
            paddingTop: 0,
            paddingBottom: 0,
            borderStartStartRadius: 0,
            borderStartEndRadius: t.borderRadius,
            borderEndEndRadius: t.borderRadius,
            borderEndStartRadius: 0
          },
          [`${r}-button:not(${n}-btn-primary)`]: {
            color: t.colorTextDescription,
            "&:hover": {
              color: t.colorPrimaryHover
            },
            "&:active": {
              color: t.colorPrimaryActive
            },
            [`&${n}-btn-loading::before`]: {
              insetInlineStart: 0,
              insetInlineEnd: 0,
              insetBlockStart: 0,
              insetBlockEnd: 0
            }
          }
        }
      },
      [`${r}-button`]: {
        height: t.controlHeight,
        "&:hover, &:focus": {
          zIndex: 1
        }
      },
      [`&-large ${r}-button`]: {
        height: t.controlHeightLG
      },
      [`&-small ${r}-button`]: {
        height: t.controlHeightSM
      },
      "&-rtl": {
        direction: "rtl"
      },
      // ===================== Compact Item Customized Styles =====================
      [`&${e}-compact-item`]: {
        [`&:not(${e}-compact-last-item)`]: {
          [`${e}-group-addon`]: {
            [`${e}-search-button`]: {
              marginInlineEnd: -t.lineWidth,
              borderRadius: 0
            }
          }
        },
        [`&:not(${e}-compact-first-item)`]: {
          [`${e},${e}-affix-wrapper`]: {
            borderRadius: 0
          }
        },
        [`> ${e}-group-addon ${e}-search-button,
        > ${e},
        ${e}-affix-wrapper`]: {
          "&:hover,&:focus,&:active": {
            zIndex: 2
          }
        },
        [`> ${e}-affix-wrapper-focused`]: {
          zIndex: 2
        }
      }
    }
  };
};
function qie(t) {
  return bn(t, {
    inputAffixPadding: t.paddingXXS,
    inputPaddingVertical: Math.max(Math.round((t.controlHeight - t.fontSize * t.lineHeight) / 2 * 10) / 10 - t.lineWidth, 3),
    inputPaddingVerticalLG: Math.ceil((t.controlHeightLG - t.fontSizeLG * t.lineHeightLG) / 2 * 10) / 10 - t.lineWidth,
    inputPaddingVerticalSM: Math.max(Math.round((t.controlHeightSM - t.fontSize * t.lineHeight) / 2 * 10) / 10 - t.lineWidth, 0),
    inputPaddingHorizontal: t.paddingSM - t.lineWidth,
    inputPaddingHorizontalSM: t.paddingXS - t.lineWidth,
    inputPaddingHorizontalLG: t.controlPaddingHorizontal - t.lineWidth,
    inputBorderHoverColor: t.colorPrimaryHover,
    inputBorderActiveColor: t.colorPrimaryHover
  });
}
const _Be = (t) => {
  const {
    componentCls: e,
    inputPaddingHorizontal: n,
    paddingLG: r
  } = t, i = `${e}-textarea`;
  return {
    [i]: {
      position: "relative",
      [`${i}-suffix`]: {
        position: "absolute",
        top: 0,
        insetInlineEnd: n,
        bottom: 0,
        zIndex: 1,
        display: "inline-flex",
        alignItems: "center",
        margin: "auto"
      },
      "&-status-error,\n        &-status-warning,\n        &-status-success,\n        &-status-validating": {
        [`&${i}-has-feedback`]: {
          [`${e}`]: {
            paddingInlineEnd: r
          }
        }
      },
      "&-show-count": {
        // https://github.com/ant-design/ant-design/issues/33049
        [`> ${e}`]: {
          height: "100%"
        },
        "&::after": {
          color: t.colorTextDescription,
          whiteSpace: "nowrap",
          content: "attr(data-count)",
          pointerEvents: "none",
          float: "right"
        }
      },
      "&-rtl": {
        "&::after": {
          float: "left"
        }
      }
    }
  };
}, C8 = pr("Input", (t) => {
  const e = qie(t);
  return [
    vBe(e),
    _Be(e),
    mBe(e),
    yBe(e),
    bBe(e),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    z2(e)
  ];
});
function OBe(t) {
  const e = ve(), n = ve(!1);
  function r() {
    for (var i = arguments.length, a = new Array(i), o = 0; o < i; o++)
      a[o] = arguments[o];
    n.value || (en.cancel(e.value), e.value = en(() => {
      t(...a);
    }));
  }
  return Qt(() => {
    n.value = !0, en.cancel(e.value);
  }), r;
}
function SBe(t) {
  const e = ve([]), n = ve(typeof t == "function" ? t() : t), r = OBe(() => {
    let a = n.value;
    e.value.forEach((o) => {
      a = o(a);
    }), e.value = [], n.value = a;
  });
  function i(a) {
    e.value.push(a), r();
  }
  return [n, i];
}
const xBe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "TabNode",
  props: {
    id: {
      type: String
    },
    prefixCls: {
      type: String
    },
    tab: {
      type: Object
    },
    active: {
      type: Boolean
    },
    closable: {
      type: Boolean
    },
    editable: {
      type: Object
    },
    onClick: {
      type: Function
    },
    onResize: {
      type: Function
    },
    renderWrapper: {
      type: Function
    },
    removeAriaLabel: {
      type: String
    },
    // onRemove: { type: Function as PropType<() => void> },
    onFocus: {
      type: Function
    }
  },
  emits: ["click", "resize", "remove", "focus"],
  setup(t, e) {
    let {
      expose: n,
      attrs: r
    } = e;
    const i = ee();
    function a(l) {
      var u;
      !((u = t.tab) === null || u === void 0) && u.disabled || t.onClick(l);
    }
    n({
      domRef: i
    });
    function o(l) {
      var u;
      l.preventDefault(), l.stopPropagation(), t.editable.onEdit("remove", {
        key: (u = t.tab) === null || u === void 0 ? void 0 : u.key,
        event: l
      });
    }
    const s = V(() => {
      var l;
      return t.editable && t.closable !== !1 && !(!((l = t.tab) === null || l === void 0) && l.disabled);
    });
    return () => {
      var l;
      const {
        prefixCls: u,
        id: c,
        active: f,
        tab: {
          key: d,
          tab: h,
          disabled: p,
          closeIcon: v
        },
        renderWrapper: g,
        removeAriaLabel: m,
        editable: y,
        onFocus: _
      } = t, O = `${u}-tab`, S = D("div", {
        key: d,
        ref: i,
        class: Re(O, {
          [`${O}-with-remove`]: s.value,
          [`${O}-active`]: f,
          [`${O}-disabled`]: p
        }),
        style: r.style,
        onClick: a
      }, [D("div", {
        role: "tab",
        "aria-selected": f,
        id: c && `${c}-tab-${d}`,
        class: `${O}-btn`,
        "aria-controls": c && `${c}-panel-${d}`,
        "aria-disabled": p,
        tabindex: p ? null : 0,
        onClick: (x) => {
          x.stopPropagation(), a(x);
        },
        onKeydown: (x) => {
          [Me.SPACE, Me.ENTER].includes(x.which) && (x.preventDefault(), a(x));
        },
        onFocus: _
      }, [typeof h == "function" ? h() : h]), s.value && D("button", {
        type: "button",
        "aria-label": m || "remove",
        tabindex: 0,
        class: `${O}-remove`,
        onClick: (x) => {
          x.stopPropagation(), o(x);
        }
      }, [(v == null ? void 0 : v()) || ((l = y.removeIcon) === null || l === void 0 ? void 0 : l.call(y)) || "×"])]);
      return g ? g(S) : S;
    };
  }
}), NQ = {
  width: 0,
  height: 0,
  left: 0,
  top: 0
};
function wBe(t, e) {
  const n = ee(/* @__PURE__ */ new Map());
  return Vt(() => {
    var r, i;
    const a = /* @__PURE__ */ new Map(), o = t.value, s = e.value.get((r = o[0]) === null || r === void 0 ? void 0 : r.key) || NQ, l = s.left + s.width;
    for (let u = 0; u < o.length; u += 1) {
      const {
        key: c
      } = o[u];
      let f = e.value.get(c);
      f || (f = e.value.get((i = o[u - 1]) === null || i === void 0 ? void 0 : i.key) || NQ);
      const d = a.get(c) || k({}, f);
      d.right = l - d.left - d.width, a.set(c, d);
    }
    n.value = new Map(a);
  }), n;
}
const Kie = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AddButton",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    editable: {
      type: Object
    },
    locale: {
      type: Object,
      default: void 0
    }
  },
  setup(t, e) {
    let {
      expose: n,
      attrs: r
    } = e;
    const i = ee();
    return n({
      domRef: i
    }), () => {
      const {
        prefixCls: a,
        editable: o,
        locale: s
      } = t;
      return !o || o.showAdd === !1 ? null : D("button", {
        ref: i,
        type: "button",
        class: `${a}-nav-add`,
        style: r.style,
        "aria-label": (s == null ? void 0 : s.addAriaLabel) || "Add tab",
        onClick: (l) => {
          o.onEdit("add", {
            event: l
          });
        }
      }, [o.addIcon ? o.addIcon() : "+"]);
    };
  }
}), CBe = {
  prefixCls: {
    type: String
  },
  id: {
    type: String
  },
  tabs: {
    type: Object
  },
  rtl: {
    type: Boolean
  },
  tabBarGutter: {
    type: Number
  },
  activeKey: {
    type: [String, Number]
  },
  mobile: {
    type: Boolean
  },
  moreIcon: oe.any,
  moreTransitionName: {
    type: String
  },
  editable: {
    type: Object
  },
  locale: {
    type: Object,
    default: void 0
  },
  removeAriaLabel: String,
  onTabClick: {
    type: Function
  },
  popupClassName: String,
  getPopupContainer: Ct()
}, TBe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "OperationNode",
  inheritAttrs: !1,
  props: CBe,
  emits: ["tabClick"],
  slots: Object,
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const [i, a] = tr(!1), [o, s] = tr(null), l = (h) => {
      const p = t.tabs.filter((m) => !m.disabled);
      let v = p.findIndex((m) => m.key === o.value) || 0;
      const g = p.length;
      for (let m = 0; m < g; m += 1) {
        v = (v + h + g) % g;
        const y = p[v];
        if (!y.disabled) {
          s(y.key);
          return;
        }
      }
    }, u = (h) => {
      const {
        which: p
      } = h;
      if (!i.value) {
        [Me.DOWN, Me.SPACE, Me.ENTER].includes(p) && (a(!0), h.preventDefault());
        return;
      }
      switch (p) {
        case Me.UP:
          l(-1), h.preventDefault();
          break;
        case Me.DOWN:
          l(1), h.preventDefault();
          break;
        case Me.ESC:
          a(!1);
          break;
        case Me.SPACE:
        case Me.ENTER:
          o.value !== null && t.onTabClick(o.value, h);
          break;
      }
    }, c = V(() => `${t.id}-more-popup`), f = V(() => o.value !== null ? `${c.value}-${o.value}` : null), d = (h, p) => {
      h.preventDefault(), h.stopPropagation(), t.editable.onEdit("remove", {
        key: p,
        event: h
      });
    };
    return _t(() => {
      me(o, () => {
        const h = document.getElementById(f.value);
        h && h.scrollIntoView && h.scrollIntoView(!1);
      }, {
        flush: "post",
        immediate: !0
      });
    }), me(i, () => {
      i.value || s(null);
    }), I6e({}), () => {
      var h;
      const {
        prefixCls: p,
        id: v,
        tabs: g,
        locale: m,
        mobile: y,
        moreIcon: _ = ((h = r.moreIcon) === null || h === void 0 ? void 0 : h.call(r)) || D(W2, null, null),
        moreTransitionName: O,
        editable: S,
        tabBarGutter: x,
        rtl: C,
        onTabClick: P,
        popupClassName: $
      } = t;
      if (!g.length) return null;
      const T = `${p}-dropdown`, E = m == null ? void 0 : m.dropdownAriaLabel, M = {
        [C ? "marginRight" : "marginLeft"]: x
      };
      g.length || (M.visibility = "hidden", M.order = 1);
      const R = Re({
        [`${T}-rtl`]: C,
        [`${$}`]: !0
      }), N = y ? null : D(K3e, {
        prefixCls: T,
        trigger: ["hover"],
        visible: i.value,
        transitionName: O,
        onVisibleChange: a,
        overlayClassName: R,
        mouseEnterDelay: 0.1,
        mouseLeaveDelay: 0.1,
        getPopupContainer: t.getPopupContainer
      }, {
        overlay: () => D(ef, {
          onClick: (I) => {
            let {
              key: B,
              domEvent: Q
            } = I;
            P(B, Q), a(!1);
          },
          id: c.value,
          tabindex: -1,
          role: "listbox",
          "aria-activedescendant": f.value,
          selectedKeys: [o.value],
          "aria-label": E !== void 0 ? E : "expanded dropdown"
        }, {
          default: () => [g.map((I) => {
            var B, Q;
            const W = S && I.closable !== !1 && !I.disabled;
            return D(Lg, {
              key: I.key,
              id: `${c.value}-${I.key}`,
              role: "option",
              "aria-controls": v && `${v}-panel-${I.key}`,
              disabled: I.disabled
            }, {
              default: () => [D("span", null, [typeof I.tab == "function" ? I.tab() : I.tab]), W && D("button", {
                type: "button",
                "aria-label": t.removeAriaLabel || "remove",
                tabindex: 0,
                class: `${T}-menu-item-remove`,
                onClick: (H) => {
                  H.stopPropagation(), d(H, I.key);
                }
              }, [((B = I.closeIcon) === null || B === void 0 ? void 0 : B.call(I)) || ((Q = S.removeIcon) === null || Q === void 0 ? void 0 : Q.call(S)) || "×"])]
            });
          })]
        }),
        default: () => D("button", {
          type: "button",
          class: `${p}-nav-more`,
          style: M,
          tabindex: -1,
          "aria-hidden": "true",
          "aria-haspopup": "listbox",
          "aria-controls": c.value,
          id: `${v}-more`,
          "aria-expanded": i.value,
          onKeydown: u
        }, [_])
      });
      return D("div", {
        class: Re(`${p}-nav-operations`, n.class),
        style: n.style
      }, [N, D(Kie, {
        prefixCls: p,
        locale: m,
        editable: S
      }, null)]);
    };
  }
}), Jie = Symbol("tabsContextKey"), eae = (t) => {
  Et(Jie, t);
}, tae = () => et(Jie, {
  tabs: ee([]),
  prefixCls: ee()
});
ae({
  compatConfig: {
    MODE: 3
  },
  name: "TabsContextProvider",
  inheritAttrs: !1,
  props: {
    tabs: {
      type: Object,
      default: void 0
    },
    prefixCls: {
      type: String,
      default: void 0
    }
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    return eae(k_(t)), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
});
const PBe = 0.1, BQ = 0.01, Kx = 20, zQ = Math.pow(0.995, Kx);
function $Be(t, e) {
  const [n, r] = tr(), [i, a] = tr(0), [o, s] = tr(0), [l, u] = tr(), c = ee();
  function f(S) {
    const {
      screenX: x,
      screenY: C
    } = S.touches[0];
    r({
      x,
      y: C
    }), clearInterval(c.value);
  }
  function d(S) {
    if (!n.value) return;
    S.preventDefault();
    const {
      screenX: x,
      screenY: C
    } = S.touches[0], P = x - n.value.x, $ = C - n.value.y;
    e(P, $), r({
      x,
      y: C
    });
    const T = Date.now();
    s(T - i.value), a(T), u({
      x: P,
      y: $
    });
  }
  function h() {
    if (!n.value) return;
    const S = l.value;
    if (r(null), u(null), S) {
      const x = S.x / o.value, C = S.y / o.value, P = Math.abs(x), $ = Math.abs(C);
      if (Math.max(P, $) < PBe) return;
      let T = x, E = C;
      c.value = setInterval(() => {
        if (Math.abs(T) < BQ && Math.abs(E) < BQ) {
          clearInterval(c.value);
          return;
        }
        T *= zQ, E *= zQ, e(T * Kx, E * Kx);
      }, Kx);
    }
  }
  const p = ee();
  function v(S) {
    const {
      deltaX: x,
      deltaY: C
    } = S;
    let P = 0;
    const $ = Math.abs(x), T = Math.abs(C);
    $ === T ? P = p.value === "x" ? x : C : $ > T ? (P = x, p.value = "x") : (P = C, p.value = "y"), e(-P, -P) && S.preventDefault();
  }
  const g = ee({
    onTouchStart: f,
    onTouchMove: d,
    onTouchEnd: h,
    onWheel: v
  });
  function m(S) {
    g.value.onTouchStart(S);
  }
  function y(S) {
    g.value.onTouchMove(S);
  }
  function _(S) {
    g.value.onTouchEnd(S);
  }
  function O(S) {
    g.value.onWheel(S);
  }
  _t(() => {
    var S, x;
    document.addEventListener("touchmove", y, {
      passive: !1
    }), document.addEventListener("touchend", _, {
      passive: !1
    }), (S = t.value) === null || S === void 0 || S.addEventListener("touchstart", m, {
      passive: !1
    }), (x = t.value) === null || x === void 0 || x.addEventListener("wheel", O, {
      passive: !1
    });
  }), Qt(() => {
    document.removeEventListener("touchmove", y), document.removeEventListener("touchend", _);
  });
}
function VQ(t, e) {
  const n = ee(t);
  function r(i) {
    const a = typeof i == "function" ? i(n.value) : i;
    a !== n.value && e(a, n.value), n.value = a;
  }
  return [n, r];
}
const ABe = () => {
  const t = ee(/* @__PURE__ */ new Map()), e = (n) => (r) => {
    t.value.set(n, r);
  };
  return Mee(() => {
    t.value = /* @__PURE__ */ new Map();
  }), [e, t];
}, FQ = {
  width: 0,
  height: 0,
  left: 0,
  top: 0,
  right: 0
}, EBe = () => ({
  id: {
    type: String
  },
  tabPosition: {
    type: String
  },
  activeKey: {
    type: [String, Number]
  },
  rtl: {
    type: Boolean
  },
  animated: sn(),
  editable: sn(),
  moreIcon: oe.any,
  moreTransitionName: {
    type: String
  },
  mobile: {
    type: Boolean
  },
  tabBarGutter: {
    type: Number
  },
  renderTabBar: {
    type: Function
  },
  locale: sn(),
  popupClassName: String,
  getPopupContainer: Ct(),
  onTabClick: {
    type: Function
  },
  onTabScroll: {
    type: Function
  }
}), MBe = (t, e) => {
  const {
    offsetWidth: n,
    offsetHeight: r,
    offsetTop: i,
    offsetLeft: a
  } = t, {
    width: o,
    height: s,
    x: l,
    y: u
  } = t.getBoundingClientRect();
  return Math.abs(o - n) < 1 ? [o, s, l - e.x, u - e.y] : [n, r, a, i];
}, WQ = ae({
  compatConfig: {
    MODE: 3
  },
  name: "TabNavList",
  inheritAttrs: !1,
  props: EBe(),
  slots: Object,
  emits: ["tabClick", "tabScroll"],
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const {
      tabs: i,
      prefixCls: a
    } = tae(), o = ve(), s = ve(), l = ve(), u = ve(), [c, f] = ABe(), d = V(() => t.tabPosition === "top" || t.tabPosition === "bottom"), [h, p] = VQ(0, (Le, Pe) => {
      d.value && t.onTabScroll && t.onTabScroll({
        direction: Le > Pe ? "left" : "right"
      });
    }), [v, g] = VQ(0, (Le, Pe) => {
      !d.value && t.onTabScroll && t.onTabScroll({
        direction: Le > Pe ? "top" : "bottom"
      });
    }), [m, y] = tr(0), [_, O] = tr(0), [S, x] = tr(null), [C, P] = tr(null), [$, T] = tr(0), [E, M] = tr(0), [R, N] = SBe(/* @__PURE__ */ new Map()), I = wBe(i, R), B = V(() => `${a.value}-nav-operations-hidden`), Q = ve(0), W = ve(0);
    Vt(() => {
      d.value ? t.rtl ? (Q.value = 0, W.value = Math.max(0, m.value - S.value)) : (Q.value = Math.min(0, S.value - m.value), W.value = 0) : (Q.value = Math.min(0, C.value - _.value), W.value = 0);
    });
    const H = (Le) => Le < Q.value ? Q.value : Le > W.value ? W.value : Le, U = ve(), [j, Y] = tr(), ne = () => {
      Y(Date.now());
    }, fe = () => {
      clearTimeout(U.value);
    }, ue = (Le, Pe) => {
      Le((Fe) => H(Fe + Pe));
    };
    $Be(o, (Le, Pe) => {
      if (d.value) {
        if (S.value >= m.value)
          return !1;
        ue(p, Le);
      } else {
        if (C.value >= _.value)
          return !1;
        ue(g, Pe);
      }
      return fe(), ne(), !0;
    }), me(j, () => {
      fe(), j.value && (U.value = setTimeout(() => {
        Y(0);
      }, 100));
    });
    const ye = function() {
      let Le = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : t.activeKey;
      const Pe = I.value.get(Le) || {
        width: 0,
        height: 0,
        left: 0,
        right: 0,
        top: 0
      };
      if (d.value) {
        let Fe = h.value;
        t.rtl ? Pe.right < h.value ? Fe = Pe.right : Pe.right + Pe.width > h.value + S.value && (Fe = Pe.right + Pe.width - S.value) : Pe.left < -h.value ? Fe = -Pe.left : Pe.left + Pe.width > -h.value + S.value && (Fe = -(Pe.left + Pe.width - S.value)), g(0), p(H(Fe));
      } else {
        let Fe = v.value;
        Pe.top < -v.value ? Fe = -Pe.top : Pe.top + Pe.height > -v.value + C.value && (Fe = -(Pe.top + Pe.height - C.value)), p(0), g(H(Fe));
      }
    }, se = ve(0), he = ve(0);
    Vt(() => {
      let Le, Pe, Fe, Ye, xt, It;
      const an = I.value;
      ["top", "bottom"].includes(t.tabPosition) ? (Le = "width", Ye = S.value, xt = m.value, It = $.value, Pe = t.rtl ? "right" : "left", Fe = Math.abs(h.value)) : (Le = "height", Ye = C.value, xt = m.value, It = E.value, Pe = "top", Fe = -v.value);
      let Ae = Ye;
      xt + It > Ye && xt < Ye && (Ae = Ye - It);
      const gt = i.value;
      if (!gt.length)
        return [se.value, he.value] = [0, 0];
      const Xt = gt.length;
      let Bn = Xt;
      for (let Dr = 0; Dr < Xt; Dr += 1) {
        const Gi = an.get(gt[Dr].key) || FQ;
        if (Gi[Pe] + Gi[Le] > Fe + Ae) {
          Bn = Dr - 1;
          break;
        }
      }
      let Dn = 0;
      for (let Dr = Xt - 1; Dr >= 0; Dr -= 1)
        if ((an.get(gt[Dr].key) || FQ)[Pe] < Fe) {
          Dn = Dr + 1;
          break;
        }
      return [se.value, he.value] = [Dn, Bn];
    });
    const re = () => {
      N(() => {
        var Le;
        const Pe = /* @__PURE__ */ new Map(), Fe = (Le = s.value) === null || Le === void 0 ? void 0 : Le.getBoundingClientRect();
        return i.value.forEach((Ye) => {
          let {
            key: xt
          } = Ye;
          const It = f.value.get(xt), an = (It == null ? void 0 : It.$el) || It;
          if (an) {
            const [Ae, gt, Xt, Bn] = MBe(an, Fe);
            Pe.set(xt, {
              width: Ae,
              height: gt,
              left: Xt,
              top: Bn
            });
          }
        }), Pe;
      });
    };
    me(() => i.value.map((Le) => Le.key).join("%%"), () => {
      re();
    }, {
      flush: "post"
    });
    const q = () => {
      var Le, Pe, Fe, Ye, xt;
      const It = ((Le = o.value) === null || Le === void 0 ? void 0 : Le.offsetWidth) || 0, an = ((Pe = o.value) === null || Pe === void 0 ? void 0 : Pe.offsetHeight) || 0, Ae = ((Fe = u.value) === null || Fe === void 0 ? void 0 : Fe.$el) || {}, gt = Ae.offsetWidth || 0, Xt = Ae.offsetHeight || 0;
      x(It), P(an), T(gt), M(Xt);
      const Bn = (((Ye = s.value) === null || Ye === void 0 ? void 0 : Ye.offsetWidth) || 0) - gt, Dn = (((xt = s.value) === null || xt === void 0 ? void 0 : xt.offsetHeight) || 0) - Xt;
      y(Bn), O(Dn), re();
    }, K = V(() => [...i.value.slice(0, se.value), ...i.value.slice(he.value + 1)]), [de, xe] = tr(), we = V(() => I.value.get(t.activeKey)), He = ve(), je = () => {
      en.cancel(He.value);
    };
    me([we, d, () => t.rtl], () => {
      const Le = {};
      we.value && (d.value ? (t.rtl ? Le.right = m0(we.value.right) : Le.left = m0(we.value.left), Le.width = m0(we.value.width)) : (Le.top = m0(we.value.top), Le.height = m0(we.value.height))), je(), He.value = en(() => {
        xe(Le);
      });
    }), me([() => t.activeKey, we, I, d], () => {
      ye();
    }, {
      flush: "post"
    }), me([() => t.rtl, () => t.tabBarGutter, () => t.activeKey, () => i.value], () => {
      q();
    }, {
      flush: "post"
    });
    const Be = (Le) => {
      let {
        position: Pe,
        prefixCls: Fe,
        extra: Ye
      } = Le;
      if (!Ye) return null;
      const xt = Ye == null ? void 0 : Ye({
        position: Pe
      });
      return xt ? D("div", {
        class: `${Fe}-extra-content`
      }, [xt]) : null;
    };
    return Qt(() => {
      fe(), je();
    }), () => {
      const {
        id: Le,
        animated: Pe,
        activeKey: Fe,
        rtl: Ye,
        editable: xt,
        locale: It,
        tabPosition: an,
        tabBarGutter: Ae,
        onTabClick: gt
      } = t, {
        class: Xt,
        style: Bn
      } = n, Dn = a.value, Dr = !!K.value.length, Gi = `${Dn}-nav-wrap`;
      let tu, nu, oc, Qf;
      d.value ? Ye ? (nu = h.value > 0, tu = h.value + S.value < m.value) : (tu = h.value < 0, nu = -h.value + S.value < m.value) : (oc = v.value < 0, Qf = -v.value + C.value < _.value);
      const rl = {};
      an === "top" || an === "bottom" ? rl[Ye ? "marginRight" : "marginLeft"] = typeof Ae == "number" ? `${Ae}px` : Ae : rl.marginTop = typeof Ae == "number" ? `${Ae}px` : Ae;
      const Hf = i.value.map((Gf, Gm) => {
        const {
          key: sc
        } = Gf;
        return D(xBe, {
          id: Le,
          prefixCls: Dn,
          key: sc,
          tab: Gf,
          style: Gm === 0 ? void 0 : rl,
          closable: Gf.closable,
          editable: xt,
          active: sc === Fe,
          removeAriaLabel: It == null ? void 0 : It.removeAriaLabel,
          ref: c(sc),
          onClick: (jm) => {
            gt(sc, jm);
          },
          onFocus: () => {
            ye(sc), ne(), o.value && (Ye || (o.value.scrollLeft = 0), o.value.scrollTop = 0);
          }
        }, r);
      });
      return D("div", {
        role: "tablist",
        class: Re(`${Dn}-nav`, Xt),
        style: Bn,
        onKeydown: () => {
          ne();
        }
      }, [D(Be, {
        position: "left",
        prefixCls: Dn,
        extra: r.leftExtra
      }, null), D($g, {
        onResize: q
      }, {
        default: () => [D("div", {
          class: Re(Gi, {
            [`${Gi}-ping-left`]: tu,
            [`${Gi}-ping-right`]: nu,
            [`${Gi}-ping-top`]: oc,
            [`${Gi}-ping-bottom`]: Qf
          }),
          ref: o
        }, [D($g, {
          onResize: q
        }, {
          default: () => [D("div", {
            ref: s,
            class: `${Dn}-nav-list`,
            style: {
              transform: `translate(${h.value}px, ${v.value}px)`,
              transition: j.value ? "none" : void 0
            }
          }, [Hf, D(Kie, {
            ref: u,
            prefixCls: Dn,
            locale: It,
            editable: xt,
            style: k(k({}, Hf.length === 0 ? void 0 : rl), {
              visibility: Dr ? "hidden" : null
            })
          }, null), D("div", {
            class: Re(`${Dn}-ink-bar`, {
              [`${Dn}-ink-bar-animated`]: Pe.inkBar
            }),
            style: de.value
          }, null)])]
        })])]
      }), D(TBe, te(te({}, t), {}, {
        removeAriaLabel: It == null ? void 0 : It.removeAriaLabel,
        ref: l,
        prefixCls: Dn,
        tabs: K.value,
        class: !Dr && B.value
      }), mg(r, ["moreIcon"])), D(Be, {
        position: "right",
        prefixCls: Dn,
        extra: r.rightExtra
      }, null), D(Be, {
        position: "right",
        prefixCls: Dn,
        extra: r.tabBarExtraContent
      }, null)]);
    };
  }
}), IBe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "TabPanelList",
  inheritAttrs: !1,
  props: {
    activeKey: {
      type: [String, Number]
    },
    id: {
      type: String
    },
    rtl: {
      type: Boolean
    },
    animated: {
      type: Object,
      default: void 0
    },
    tabPosition: {
      type: String
    },
    destroyInactiveTabPane: {
      type: Boolean
    }
  },
  setup(t) {
    const {
      tabs: e,
      prefixCls: n
    } = tae();
    return () => {
      const {
        id: r,
        activeKey: i,
        animated: a,
        tabPosition: o,
        rtl: s,
        destroyInactiveTabPane: l
      } = t, u = a.tabPane, c = n.value, f = e.value.findIndex((d) => d.key === i);
      return D("div", {
        class: `${c}-content-holder`
      }, [D("div", {
        class: [`${c}-content`, `${c}-content-${o}`, {
          [`${c}-content-animated`]: u
        }],
        style: f && u ? {
          [s ? "marginRight" : "marginLeft"]: `-${f}00%`
        } : null
      }, [e.value.map((d) => Or(d.node, {
        key: d.key,
        prefixCls: c,
        tabKey: d.key,
        id: r,
        animated: u,
        active: d.key === i,
        destroyInactiveTabPane: l
      }))])]);
    };
  }
});
var DBe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { tag: "path", attrs: { d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, name: "plus", theme: "outlined" };
function QQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      RBe(t, i, n[i]);
    });
  }
  return t;
}
function RBe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var j2 = function(e, n) {
  var r = QQ({}, e, n.attrs);
  return D(Rt, QQ({}, r, {
    icon: DBe
  }), null);
};
j2.displayName = "PlusOutlined";
j2.inheritAttrs = !1;
const kBe = (t) => {
  const {
    componentCls: e,
    motionDurationSlow: n
  } = t;
  return [
    {
      [e]: {
        [`${e}-switch`]: {
          "&-appear, &-enter": {
            transition: "none",
            "&-start": {
              opacity: 0
            },
            "&-active": {
              opacity: 1,
              transition: `opacity ${n}`
            }
          },
          "&-leave": {
            position: "absolute",
            transition: "none",
            inset: 0,
            "&-start": {
              opacity: 1
            },
            "&-active": {
              opacity: 0,
              transition: `opacity ${n}`
            }
          }
        }
      }
    },
    // Follow code may reuse in other components
    [kg(t, "slide-up"), kg(t, "slide-down")]
  ];
}, LBe = (t) => {
  const {
    componentCls: e,
    tabsCardHorizontalPadding: n,
    tabsCardHeadBackground: r,
    tabsCardGutter: i,
    colorSplit: a
  } = t;
  return {
    [`${e}-card`]: {
      [`> ${e}-nav, > div > ${e}-nav`]: {
        [`${e}-tab`]: {
          margin: 0,
          padding: n,
          background: r,
          border: `${t.lineWidth}px ${t.lineType} ${a}`,
          transition: `all ${t.motionDurationSlow} ${t.motionEaseInOut}`
        },
        [`${e}-tab-active`]: {
          color: t.colorPrimary,
          background: t.colorBgContainer
        },
        [`${e}-ink-bar`]: {
          visibility: "hidden"
        }
      },
      // ========================== Top & Bottom ==========================
      [`&${e}-top, &${e}-bottom`]: {
        [`> ${e}-nav, > div > ${e}-nav`]: {
          [`${e}-tab + ${e}-tab`]: {
            marginLeft: {
              _skip_check_: !0,
              value: `${i}px`
            }
          }
        }
      },
      [`&${e}-top`]: {
        [`> ${e}-nav, > div > ${e}-nav`]: {
          [`${e}-tab`]: {
            borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`
          },
          [`${e}-tab-active`]: {
            borderBottomColor: t.colorBgContainer
          }
        }
      },
      [`&${e}-bottom`]: {
        [`> ${e}-nav, > div > ${e}-nav`]: {
          [`${e}-tab`]: {
            borderRadius: `0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`
          },
          [`${e}-tab-active`]: {
            borderTopColor: t.colorBgContainer
          }
        }
      },
      // ========================== Left & Right ==========================
      [`&${e}-left, &${e}-right`]: {
        [`> ${e}-nav, > div > ${e}-nav`]: {
          [`${e}-tab + ${e}-tab`]: {
            marginTop: `${i}px`
          }
        }
      },
      [`&${e}-left`]: {
        [`> ${e}-nav, > div > ${e}-nav`]: {
          [`${e}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `${t.borderRadiusLG}px 0 0 ${t.borderRadiusLG}px`
            }
          },
          [`${e}-tab-active`]: {
            borderRightColor: {
              _skip_check_: !0,
              value: t.colorBgContainer
            }
          }
        }
      },
      [`&${e}-right`]: {
        [`> ${e}-nav, > div > ${e}-nav`]: {
          [`${e}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px 0`
            }
          },
          [`${e}-tab-active`]: {
            borderLeftColor: {
              _skip_check_: !0,
              value: t.colorBgContainer
            }
          }
        }
      }
    }
  };
}, NBe = (t) => {
  const {
    componentCls: e,
    tabsHoverColor: n,
    dropdownEdgeChildVerticalPadding: r
  } = t;
  return {
    [`${e}-dropdown`]: k(k({}, Gn(t)), {
      position: "absolute",
      top: -9999,
      left: {
        _skip_check_: !0,
        value: -9999
      },
      zIndex: t.zIndexPopup,
      display: "block",
      "&-hidden": {
        display: "none"
      },
      [`${e}-dropdown-menu`]: {
        maxHeight: t.tabsDropdownHeight,
        margin: 0,
        padding: `${r}px 0`,
        overflowX: "hidden",
        overflowY: "auto",
        textAlign: {
          _skip_check_: !0,
          value: "left"
        },
        listStyleType: "none",
        backgroundColor: t.colorBgContainer,
        backgroundClip: "padding-box",
        borderRadius: t.borderRadiusLG,
        outline: "none",
        boxShadow: t.boxShadowSecondary,
        "&-item": k(k({}, Mg), {
          display: "flex",
          alignItems: "center",
          minWidth: t.tabsDropdownWidth,
          margin: 0,
          padding: `${t.paddingXXS}px ${t.paddingSM}px`,
          color: t.colorText,
          fontWeight: "normal",
          fontSize: t.fontSize,
          lineHeight: t.lineHeight,
          cursor: "pointer",
          transition: `all ${t.motionDurationSlow}`,
          "> span": {
            flex: 1,
            whiteSpace: "nowrap"
          },
          "&-remove": {
            flex: "none",
            marginLeft: {
              _skip_check_: !0,
              value: t.marginSM
            },
            color: t.colorTextDescription,
            fontSize: t.fontSizeSM,
            background: "transparent",
            border: 0,
            cursor: "pointer",
            "&:hover": {
              color: n
            }
          },
          "&:hover": {
            background: t.controlItemBgHover
          },
          "&-disabled": {
            "&, &:hover": {
              color: t.colorTextDisabled,
              background: "transparent",
              cursor: "not-allowed"
            }
          }
        })
      }
    })
  };
}, BBe = (t) => {
  const {
    componentCls: e,
    margin: n,
    colorSplit: r
  } = t;
  return {
    // ========================== Top & Bottom ==========================
    [`${e}-top, ${e}-bottom`]: {
      flexDirection: "column",
      [`> ${e}-nav, > div > ${e}-nav`]: {
        margin: `0 0 ${n}px 0`,
        "&::before": {
          position: "absolute",
          right: {
            _skip_check_: !0,
            value: 0
          },
          left: {
            _skip_check_: !0,
            value: 0
          },
          borderBottom: `${t.lineWidth}px ${t.lineType} ${r}`,
          content: "''"
        },
        [`${e}-ink-bar`]: {
          height: t.lineWidthBold,
          "&-animated": {
            transition: `width ${t.motionDurationSlow}, left ${t.motionDurationSlow},
            right ${t.motionDurationSlow}`
          }
        },
        [`${e}-nav-wrap`]: {
          "&::before, &::after": {
            top: 0,
            bottom: 0,
            width: t.controlHeight
          },
          "&::before": {
            left: {
              _skip_check_: !0,
              value: 0
            },
            boxShadow: t.boxShadowTabsOverflowLeft
          },
          "&::after": {
            right: {
              _skip_check_: !0,
              value: 0
            },
            boxShadow: t.boxShadowTabsOverflowRight
          },
          [`&${e}-nav-wrap-ping-left::before`]: {
            opacity: 1
          },
          [`&${e}-nav-wrap-ping-right::after`]: {
            opacity: 1
          }
        }
      }
    },
    [`${e}-top`]: {
      [`> ${e}-nav,
        > div > ${e}-nav`]: {
        "&::before": {
          bottom: 0
        },
        [`${e}-ink-bar`]: {
          bottom: 0
        }
      }
    },
    [`${e}-bottom`]: {
      [`> ${e}-nav, > div > ${e}-nav`]: {
        order: 1,
        marginTop: `${n}px`,
        marginBottom: 0,
        "&::before": {
          top: 0
        },
        [`${e}-ink-bar`]: {
          top: 0
        }
      },
      [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
        order: 0
      }
    },
    // ========================== Left & Right ==========================
    [`${e}-left, ${e}-right`]: {
      [`> ${e}-nav, > div > ${e}-nav`]: {
        flexDirection: "column",
        minWidth: t.controlHeight * 1.25,
        // >>>>>>>>>>> Tab
        [`${e}-tab`]: {
          padding: `${t.paddingXS}px ${t.paddingLG}px`,
          textAlign: "center"
        },
        [`${e}-tab + ${e}-tab`]: {
          margin: `${t.margin}px 0 0 0`
        },
        // >>>>>>>>>>> Nav
        [`${e}-nav-wrap`]: {
          flexDirection: "column",
          "&::before, &::after": {
            right: {
              _skip_check_: !0,
              value: 0
            },
            left: {
              _skip_check_: !0,
              value: 0
            },
            height: t.controlHeight
          },
          "&::before": {
            top: 0,
            boxShadow: t.boxShadowTabsOverflowTop
          },
          "&::after": {
            bottom: 0,
            boxShadow: t.boxShadowTabsOverflowBottom
          },
          [`&${e}-nav-wrap-ping-top::before`]: {
            opacity: 1
          },
          [`&${e}-nav-wrap-ping-bottom::after`]: {
            opacity: 1
          }
        },
        // >>>>>>>>>>> Ink Bar
        [`${e}-ink-bar`]: {
          width: t.lineWidthBold,
          "&-animated": {
            transition: `height ${t.motionDurationSlow}, top ${t.motionDurationSlow}`
          }
        },
        [`${e}-nav-list, ${e}-nav-operations`]: {
          flex: "1 0 auto",
          flexDirection: "column"
        }
      }
    },
    [`${e}-left`]: {
      [`> ${e}-nav, > div > ${e}-nav`]: {
        [`${e}-ink-bar`]: {
          right: {
            _skip_check_: !0,
            value: 0
          }
        }
      },
      [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
        marginLeft: {
          _skip_check_: !0,
          value: `-${t.lineWidth}px`
        },
        borderLeft: {
          _skip_check_: !0,
          value: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
        },
        [`> ${e}-content > ${e}-tabpane`]: {
          paddingLeft: {
            _skip_check_: !0,
            value: t.paddingLG
          }
        }
      }
    },
    [`${e}-right`]: {
      [`> ${e}-nav, > div > ${e}-nav`]: {
        order: 1,
        [`${e}-ink-bar`]: {
          left: {
            _skip_check_: !0,
            value: 0
          }
        }
      },
      [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
        order: 0,
        marginRight: {
          _skip_check_: !0,
          value: -t.lineWidth
        },
        borderRight: {
          _skip_check_: !0,
          value: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
        },
        [`> ${e}-content > ${e}-tabpane`]: {
          paddingRight: {
            _skip_check_: !0,
            value: t.paddingLG
          }
        }
      }
    }
  };
}, zBe = (t) => {
  const {
    componentCls: e,
    padding: n
  } = t;
  return {
    [e]: {
      "&-small": {
        [`> ${e}-nav`]: {
          [`${e}-tab`]: {
            padding: `${t.paddingXS}px 0`,
            fontSize: t.fontSize
          }
        }
      },
      "&-large": {
        [`> ${e}-nav`]: {
          [`${e}-tab`]: {
            padding: `${n}px 0`,
            fontSize: t.fontSizeLG
          }
        }
      }
    },
    [`${e}-card`]: {
      [`&${e}-small`]: {
        [`> ${e}-nav`]: {
          [`${e}-tab`]: {
            padding: `${t.paddingXXS * 1.5}px ${n}px`
          }
        },
        [`&${e}-bottom`]: {
          [`> ${e}-nav ${e}-tab`]: {
            borderRadius: `0 0 ${t.borderRadius}px ${t.borderRadius}px`
          }
        },
        [`&${e}-top`]: {
          [`> ${e}-nav ${e}-tab`]: {
            borderRadius: `${t.borderRadius}px ${t.borderRadius}px 0 0`
          }
        },
        [`&${e}-right`]: {
          [`> ${e}-nav ${e}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `0 ${t.borderRadius}px ${t.borderRadius}px 0`
            }
          }
        },
        [`&${e}-left`]: {
          [`> ${e}-nav ${e}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `${t.borderRadius}px 0 0 ${t.borderRadius}px`
            }
          }
        }
      },
      [`&${e}-large`]: {
        [`> ${e}-nav`]: {
          [`${e}-tab`]: {
            padding: `${t.paddingXS}px ${n}px ${t.paddingXXS * 1.5}px`
          }
        }
      }
    }
  };
}, VBe = (t) => {
  const {
    componentCls: e,
    tabsActiveColor: n,
    tabsHoverColor: r,
    iconCls: i,
    tabsHorizontalGutter: a
  } = t, o = `${e}-tab`;
  return {
    [o]: {
      position: "relative",
      display: "inline-flex",
      alignItems: "center",
      padding: `${t.paddingSM}px 0`,
      fontSize: `${t.fontSize}px`,
      background: "transparent",
      border: 0,
      outline: "none",
      cursor: "pointer",
      "&-btn, &-remove": k({
        "&:focus:not(:focus-visible), &:active": {
          color: n
        }
      }, T2(t)),
      "&-btn": {
        outline: "none",
        transition: "all 0.3s"
      },
      "&-remove": {
        flex: "none",
        marginRight: {
          _skip_check_: !0,
          value: -t.marginXXS
        },
        marginLeft: {
          _skip_check_: !0,
          value: t.marginXS
        },
        color: t.colorTextDescription,
        fontSize: t.fontSizeSM,
        background: "transparent",
        border: "none",
        outline: "none",
        cursor: "pointer",
        transition: `all ${t.motionDurationSlow}`,
        "&:hover": {
          color: t.colorTextHeading
        }
      },
      "&:hover": {
        color: r
      },
      [`&${o}-active ${o}-btn`]: {
        color: t.colorPrimary,
        textShadow: t.tabsActiveTextShadow
      },
      [`&${o}-disabled`]: {
        color: t.colorTextDisabled,
        cursor: "not-allowed"
      },
      [`&${o}-disabled ${o}-btn, &${o}-disabled ${e}-remove`]: {
        "&:focus, &:active": {
          color: t.colorTextDisabled
        }
      },
      [`& ${o}-remove ${i}`]: {
        margin: 0
      },
      [i]: {
        marginRight: {
          _skip_check_: !0,
          value: t.marginSM
        }
      }
    },
    [`${o} + ${o}`]: {
      margin: {
        _skip_check_: !0,
        value: `0 0 0 ${a}px`
      }
    }
  };
}, FBe = (t) => {
  const {
    componentCls: e,
    tabsHorizontalGutter: n,
    iconCls: r,
    tabsCardGutter: i
  } = t;
  return {
    [`${e}-rtl`]: {
      direction: "rtl",
      [`${e}-nav`]: {
        [`${e}-tab`]: {
          margin: {
            _skip_check_: !0,
            value: `0 0 0 ${n}px`
          },
          [`${e}-tab:last-of-type`]: {
            marginLeft: {
              _skip_check_: !0,
              value: 0
            }
          },
          [r]: {
            marginRight: {
              _skip_check_: !0,
              value: 0
            },
            marginLeft: {
              _skip_check_: !0,
              value: `${t.marginSM}px`
            }
          },
          [`${e}-tab-remove`]: {
            marginRight: {
              _skip_check_: !0,
              value: `${t.marginXS}px`
            },
            marginLeft: {
              _skip_check_: !0,
              value: `-${t.marginXXS}px`
            },
            [r]: {
              margin: 0
            }
          }
        }
      },
      [`&${e}-left`]: {
        [`> ${e}-nav`]: {
          order: 1
        },
        [`> ${e}-content-holder`]: {
          order: 0
        }
      },
      [`&${e}-right`]: {
        [`> ${e}-nav`]: {
          order: 0
        },
        [`> ${e}-content-holder`]: {
          order: 1
        }
      },
      // ====================== Card ======================
      [`&${e}-card${e}-top, &${e}-card${e}-bottom`]: {
        [`> ${e}-nav, > div > ${e}-nav`]: {
          [`${e}-tab + ${e}-tab`]: {
            marginRight: {
              _skip_check_: !0,
              value: `${i}px`
            },
            marginLeft: {
              _skip_check_: !0,
              value: 0
            }
          }
        }
      }
    },
    [`${e}-dropdown-rtl`]: {
      direction: "rtl"
    },
    [`${e}-menu-item`]: {
      [`${e}-dropdown-rtl`]: {
        textAlign: {
          _skip_check_: !0,
          value: "right"
        }
      }
    }
  };
}, WBe = (t) => {
  const {
    componentCls: e,
    tabsCardHorizontalPadding: n,
    tabsCardHeight: r,
    tabsCardGutter: i,
    tabsHoverColor: a,
    tabsActiveColor: o,
    colorSplit: s
  } = t;
  return {
    [e]: k(k(k(k({}, Gn(t)), {
      display: "flex",
      // ========================== Navigation ==========================
      [`> ${e}-nav, > div > ${e}-nav`]: {
        position: "relative",
        display: "flex",
        flex: "none",
        alignItems: "center",
        [`${e}-nav-wrap`]: {
          position: "relative",
          display: "flex",
          flex: "auto",
          alignSelf: "stretch",
          overflow: "hidden",
          whiteSpace: "nowrap",
          transform: "translate(0)",
          // >>>>> Ping shadow
          "&::before, &::after": {
            position: "absolute",
            zIndex: 1,
            opacity: 0,
            transition: `opacity ${t.motionDurationSlow}`,
            content: "''",
            pointerEvents: "none"
          }
        },
        [`${e}-nav-list`]: {
          position: "relative",
          display: "flex",
          transition: `opacity ${t.motionDurationSlow}`
        },
        // >>>>>>>> Operations
        [`${e}-nav-operations`]: {
          display: "flex",
          alignSelf: "stretch"
        },
        [`${e}-nav-operations-hidden`]: {
          position: "absolute",
          visibility: "hidden",
          pointerEvents: "none"
        },
        [`${e}-nav-more`]: {
          position: "relative",
          padding: n,
          background: "transparent",
          border: 0,
          "&::after": {
            position: "absolute",
            right: {
              _skip_check_: !0,
              value: 0
            },
            bottom: 0,
            left: {
              _skip_check_: !0,
              value: 0
            },
            height: t.controlHeightLG / 8,
            transform: "translateY(100%)",
            content: "''"
          }
        },
        [`${e}-nav-add`]: k({
          minWidth: `${r}px`,
          marginLeft: {
            _skip_check_: !0,
            value: `${i}px`
          },
          padding: `0 ${t.paddingXS}px`,
          background: "transparent",
          border: `${t.lineWidth}px ${t.lineType} ${s}`,
          borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,
          outline: "none",
          cursor: "pointer",
          color: t.colorText,
          transition: `all ${t.motionDurationSlow} ${t.motionEaseInOut}`,
          "&:hover": {
            color: a
          },
          "&:active, &:focus:not(:focus-visible)": {
            color: o
          }
        }, T2(t))
      },
      [`${e}-extra-content`]: {
        flex: "none"
      },
      // ============================ InkBar ============================
      [`${e}-ink-bar`]: {
        position: "absolute",
        background: t.colorPrimary,
        pointerEvents: "none"
      }
    }), VBe(t)), {
      // =========================== TabPanes ===========================
      [`${e}-content`]: {
        position: "relative",
        display: "flex",
        width: "100%",
        "&-animated": {
          transition: "margin 0.3s"
        }
      },
      [`${e}-content-holder`]: {
        flex: "auto",
        minWidth: 0,
        minHeight: 0
      },
      [`${e}-tabpane`]: {
        outline: "none",
        flex: "none",
        width: "100%"
      }
    }),
    [`${e}-centered`]: {
      [`> ${e}-nav, > div > ${e}-nav`]: {
        [`${e}-nav-wrap`]: {
          [`&:not([class*='${e}-nav-wrap-ping'])`]: {
            justifyContent: "center"
          }
        }
      }
    }
  };
}, QBe = pr("Tabs", (t) => {
  const e = t.controlHeightLG, n = bn(t, {
    tabsHoverColor: t.colorPrimaryHover,
    tabsActiveColor: t.colorPrimaryActive,
    tabsCardHorizontalPadding: `${(e - Math.round(t.fontSize * t.lineHeight)) / 2 - t.lineWidth}px ${t.padding}px`,
    tabsCardHeight: e,
    tabsCardGutter: t.marginXXS / 2,
    tabsHorizontalGutter: 32,
    tabsCardHeadBackground: t.colorFillAlter,
    dropdownEdgeChildVerticalPadding: t.paddingXXS,
    tabsActiveTextShadow: "0 0 0.25px currentcolor",
    tabsDropdownHeight: 200,
    tabsDropdownWidth: 120
  });
  return [zBe(n), FBe(n), BBe(n), NBe(n), LBe(n), WBe(n), kBe(n)];
}, (t) => ({
  zIndexPopup: t.zIndexPopupBase + 50
}));
let HQ = 0;
const nae = () => ({
  prefixCls: {
    type: String
  },
  id: {
    type: String
  },
  popupClassName: String,
  getPopupContainer: Ct(),
  activeKey: {
    type: [String, Number]
  },
  defaultActiveKey: {
    type: [String, Number]
  },
  direction: rr(),
  animated: or([Boolean, Object]),
  renderTabBar: Ct(),
  tabBarGutter: {
    type: Number
  },
  tabBarStyle: sn(),
  tabPosition: rr(),
  destroyInactiveTabPane: Tt(),
  hideAdd: Boolean,
  type: rr(),
  size: rr(),
  centered: Boolean,
  onEdit: Ct(),
  onChange: Ct(),
  onTabClick: Ct(),
  onTabScroll: Ct(),
  "onUpdate:activeKey": Ct(),
  // Accessibility
  locale: sn(),
  onPrevClick: Ct(),
  onNextClick: Ct(),
  tabBarExtraContent: oe.any
});
function HBe(t) {
  return t.map((e) => {
    if (po(e)) {
      const n = k({}, e.props || {});
      for (const [d, h] of Object.entries(n))
        delete n[d], n[kN(d)] = h;
      const r = e.children || {}, i = e.key !== void 0 ? e.key : void 0, {
        tab: a = r.tab,
        disabled: o,
        forceRender: s,
        closable: l,
        animated: u,
        active: c,
        destroyInactiveTabPane: f
      } = n;
      return k(k({
        key: i
      }, n), {
        node: e,
        closeIcon: r.closeIcon,
        tab: a,
        disabled: o === "" || o,
        forceRender: s === "" || s,
        closable: l === "" || l,
        animated: u === "" || u,
        active: c === "" || c,
        destroyInactiveTabPane: f === "" || f
      });
    }
    return null;
  }).filter((e) => e);
}
const GBe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "InternalTabs",
  inheritAttrs: !1,
  props: k(k({}, li(nae(), {
    tabPosition: "top",
    animated: {
      inkBar: !0,
      tabPane: !1
    }
  })), {
    tabs: Lh()
  }),
  slots: Object,
  // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    lo(t.onPrevClick === void 0 && t.onNextClick === void 0, "Tabs", "`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."), lo(t.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."), lo(r.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");
    const {
      prefixCls: i,
      direction: a,
      size: o,
      rootPrefixCls: s,
      getPopupContainer: l
    } = hn("tabs", t), [u, c] = QBe(i), f = V(() => a.value === "rtl"), d = V(() => {
      const {
        animated: C,
        tabPosition: P
      } = t;
      return C === !1 || ["left", "right"].includes(P) ? {
        inkBar: !1,
        tabPane: !1
      } : C === !0 ? {
        inkBar: !0,
        tabPane: !0
      } : k({
        inkBar: !0,
        tabPane: !1
      }, typeof C == "object" ? C : {});
    }), [h, p] = tr(!1);
    _t(() => {
      p(i8());
    });
    const [v, g] = Rg(() => {
      var C;
      return (C = t.tabs[0]) === null || C === void 0 ? void 0 : C.key;
    }, {
      value: V(() => t.activeKey),
      defaultValue: t.defaultActiveKey
    }), [m, y] = tr(() => t.tabs.findIndex((C) => C.key === v.value));
    Vt(() => {
      var C;
      let P = t.tabs.findIndex(($) => $.key === v.value);
      P === -1 && (P = Math.max(0, Math.min(m.value, t.tabs.length - 1)), g((C = t.tabs[P]) === null || C === void 0 ? void 0 : C.key)), y(P);
    });
    const [_, O] = Rg(null, {
      value: V(() => t.id)
    }), S = V(() => h.value && !["left", "right"].includes(t.tabPosition) ? "top" : t.tabPosition);
    _t(() => {
      t.id || (O(`rc-tabs-${process.env.NODE_ENV === "test" ? "test" : HQ}`), HQ += 1);
    });
    const x = (C, P) => {
      var $, T;
      ($ = t.onTabClick) === null || $ === void 0 || $.call(t, C, P);
      const E = C !== v.value;
      g(C), E && ((T = t.onChange) === null || T === void 0 || T.call(t, C));
    };
    return eae({
      tabs: V(() => t.tabs),
      prefixCls: i
    }), () => {
      const {
        id: C,
        type: P,
        tabBarGutter: $,
        tabBarStyle: T,
        locale: E,
        destroyInactiveTabPane: M,
        renderTabBar: R = r.renderTabBar,
        onTabScroll: N,
        hideAdd: I,
        centered: B
      } = t, Q = {
        id: _.value,
        activeKey: v.value,
        animated: d.value,
        tabPosition: S.value,
        rtl: f.value,
        mobile: h.value
      };
      let W;
      P === "editable-card" && (W = {
        onEdit: (Y, ne) => {
          let {
            key: fe,
            event: ue
          } = ne;
          var ye;
          (ye = t.onEdit) === null || ye === void 0 || ye.call(t, Y === "add" ? ue : fe, Y);
        },
        removeIcon: () => D(tc, null, null),
        addIcon: r.addIcon ? r.addIcon : () => D(j2, null, null),
        showAdd: I !== !0
      });
      let H;
      const U = k(k({}, Q), {
        moreTransitionName: `${s.value}-slide-up`,
        editable: W,
        locale: E,
        tabBarGutter: $,
        onTabClick: x,
        onTabScroll: N,
        style: T,
        getPopupContainer: l.value,
        popupClassName: Re(t.popupClassName, c.value)
      });
      R ? H = R(k(k({}, U), {
        DefaultTabBar: WQ
      })) : H = D(WQ, U, mg(r, ["moreIcon", "leftExtra", "rightExtra", "tabBarExtraContent"]));
      const j = i.value;
      return u(D("div", te(te({}, n), {}, {
        id: C,
        class: Re(j, `${j}-${S.value}`, {
          [c.value]: !0,
          [`${j}-${o.value}`]: o.value,
          [`${j}-card`]: ["card", "editable-card"].includes(P),
          [`${j}-editable-card`]: P === "editable-card",
          [`${j}-centered`]: B,
          [`${j}-mobile`]: h.value,
          [`${j}-editable`]: P === "editable-card",
          [`${j}-rtl`]: f.value
        }, n.class)
      }), [H, D(IBe, te(te({
        destroyInactiveTabPane: M
      }, Q), {}, {
        animated: d.value
      }), null)]));
    };
  }
}), _h = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ATabs",
  inheritAttrs: !1,
  props: li(nae(), {
    tabPosition: "top",
    animated: {
      inkBar: !0,
      tabPane: !1
    }
  }),
  slots: Object,
  // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  setup(t, e) {
    let {
      attrs: n,
      slots: r,
      emit: i
    } = e;
    const a = (o) => {
      i("update:activeKey", o), i("change", o);
    };
    return () => {
      var o;
      const s = HBe(qr((o = r.default) === null || o === void 0 ? void 0 : o.call(r)));
      return D(GBe, te(te(te({}, si(t, ["onUpdate:activeKey"])), n), {}, {
        onChange: a,
        tabs: s
      }), r);
    };
  }
}), jBe = () => ({
  tab: oe.any,
  disabled: {
    type: Boolean
  },
  forceRender: {
    type: Boolean
  },
  closable: {
    type: Boolean
  },
  animated: {
    type: Boolean
  },
  active: {
    type: Boolean
  },
  destroyInactiveTabPane: {
    type: Boolean
  },
  // Pass by TabPaneList
  prefixCls: {
    type: String
  },
  tabKey: {
    type: [String, Number]
  },
  id: {
    type: String
  }
  // closeIcon: PropTypes.any,
}), zu = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ATabPane",
  inheritAttrs: !1,
  __ANT_TAB_PANE: !0,
  props: jBe(),
  slots: Object,
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const i = ee(t.forceRender);
    me([() => t.active, () => t.destroyInactiveTabPane], () => {
      t.active ? i.value = !0 : t.destroyInactiveTabPane && (i.value = !1);
    }, {
      immediate: !0
    });
    const a = V(() => t.active ? {} : t.animated ? {
      visibility: "hidden",
      height: 0,
      overflowY: "hidden"
    } : {
      display: "none"
    });
    return () => {
      var o;
      const {
        prefixCls: s,
        forceRender: l,
        id: u,
        active: c,
        tabKey: f
      } = t;
      return D("div", {
        id: u && `${u}-panel-${f}`,
        role: "tabpanel",
        tabindex: c ? 0 : -1,
        "aria-labelledby": u && `${u}-tab-${f}`,
        "aria-hidden": !c,
        style: [a.value, n.style],
        class: [`${s}-tabpane`, c && `${s}-tabpane-active`, n.class]
      }, [(c || i.value || l) && ((o = r.default) === null || o === void 0 ? void 0 : o.call(r))]);
    };
  }
});
_h.TabPane = zu;
_h.install = function(t) {
  return t.component(_h.name, _h), t.component(zu.name, zu), t;
};
const ZBe = () => ({
  prefixCls: String,
  activeKey: or([Array, Number, String]),
  defaultActiveKey: or([Array, Number, String]),
  accordion: Tt(),
  destroyInactivePanel: Tt(),
  bordered: Tt(),
  expandIcon: Ct(),
  openAnimation: oe.object,
  expandIconPosition: rr(),
  collapsible: rr(),
  ghost: Tt(),
  onChange: Ct(),
  "onUpdate:activeKey": Ct()
}), rae = () => ({
  openAnimation: oe.object,
  prefixCls: String,
  header: oe.any,
  headerClass: String,
  showArrow: Tt(),
  isActive: Tt(),
  destroyInactivePanel: Tt(),
  /** @deprecated Use `collapsible="disabled"` instead */
  disabled: Tt(),
  accordion: Tt(),
  forceRender: Tt(),
  expandIcon: Ct(),
  extra: oe.any,
  panelKey: or(),
  collapsible: rr(),
  role: String,
  onItemClick: Ct()
}), UBe = (t) => {
  const {
    componentCls: e,
    collapseContentBg: n,
    padding: r,
    collapseContentPaddingHorizontal: i,
    collapseHeaderBg: a,
    collapseHeaderPadding: o,
    collapsePanelBorderRadius: s,
    lineWidth: l,
    lineType: u,
    colorBorder: c,
    colorText: f,
    colorTextHeading: d,
    colorTextDisabled: h,
    fontSize: p,
    lineHeight: v,
    marginSM: g,
    paddingSM: m,
    motionDurationSlow: y,
    fontSizeIcon: _
  } = t, O = `${l}px ${u} ${c}`;
  return {
    [e]: k(k({}, Gn(t)), {
      backgroundColor: a,
      border: O,
      borderBottom: 0,
      borderRadius: `${s}px`,
      "&-rtl": {
        direction: "rtl"
      },
      [`& > ${e}-item`]: {
        borderBottom: O,
        "&:last-child": {
          [`
            &,
            & > ${e}-header`]: {
            borderRadius: `0 0 ${s}px ${s}px`
          }
        },
        [`> ${e}-header`]: {
          position: "relative",
          display: "flex",
          flexWrap: "nowrap",
          alignItems: "flex-start",
          padding: o,
          color: d,
          lineHeight: v,
          cursor: "pointer",
          transition: `all ${y}, visibility 0s`,
          [`> ${e}-header-text`]: {
            flex: "auto"
          },
          "&:focus": {
            outline: "none"
          },
          // >>>>> Arrow
          [`${e}-expand-icon`]: {
            height: p * v,
            display: "flex",
            alignItems: "center",
            paddingInlineEnd: g
          },
          [`${e}-arrow`]: k(k({}, hm()), {
            fontSize: _,
            svg: {
              transition: `transform ${y}`
            }
          }),
          // >>>>> Text
          [`${e}-header-text`]: {
            marginInlineEnd: "auto"
          }
        },
        [`${e}-header-collapsible-only`]: {
          cursor: "default",
          [`${e}-header-text`]: {
            flex: "none",
            cursor: "pointer"
          },
          [`${e}-expand-icon`]: {
            cursor: "pointer"
          }
        },
        [`${e}-icon-collapsible-only`]: {
          cursor: "default",
          [`${e}-expand-icon`]: {
            cursor: "pointer"
          }
        },
        [`&${e}-no-arrow`]: {
          [`> ${e}-header`]: {
            paddingInlineStart: m
          }
        }
      },
      [`${e}-content`]: {
        color: f,
        backgroundColor: n,
        borderTop: O,
        [`& > ${e}-content-box`]: {
          padding: `${r}px ${i}px`
        },
        "&-hidden": {
          display: "none"
        }
      },
      [`${e}-item:last-child`]: {
        [`> ${e}-content`]: {
          borderRadius: `0 0 ${s}px ${s}px`
        }
      },
      [`& ${e}-item-disabled > ${e}-header`]: {
        "\n          &,\n          & > .arrow\n        ": {
          color: h,
          cursor: "not-allowed"
        }
      },
      // ========================== Icon Position ==========================
      [`&${e}-icon-position-end`]: {
        [`& > ${e}-item`]: {
          [`> ${e}-header`]: {
            [`${e}-expand-icon`]: {
              order: 1,
              paddingInlineEnd: 0,
              paddingInlineStart: g
            }
          }
        }
      }
    })
  };
}, XBe = (t) => {
  const {
    componentCls: e
  } = t, n = `> ${e}-item > ${e}-header ${e}-arrow svg`;
  return {
    [`${e}-rtl`]: {
      [n]: {
        transform: "rotate(180deg)"
      }
    }
  };
}, YBe = (t) => {
  const {
    componentCls: e,
    collapseHeaderBg: n,
    paddingXXS: r,
    colorBorder: i
  } = t;
  return {
    [`${e}-borderless`]: {
      backgroundColor: n,
      border: 0,
      [`> ${e}-item`]: {
        borderBottom: `1px solid ${i}`
      },
      [`
        > ${e}-item:last-child,
        > ${e}-item:last-child ${e}-header
      `]: {
        borderRadius: 0
      },
      [`> ${e}-item:last-child`]: {
        borderBottom: 0
      },
      [`> ${e}-item > ${e}-content`]: {
        backgroundColor: "transparent",
        borderTop: 0
      },
      [`> ${e}-item > ${e}-content > ${e}-content-box`]: {
        paddingTop: r
      }
    }
  };
}, qBe = (t) => {
  const {
    componentCls: e,
    paddingSM: n
  } = t;
  return {
    [`${e}-ghost`]: {
      backgroundColor: "transparent",
      border: 0,
      [`> ${e}-item`]: {
        borderBottom: 0,
        [`> ${e}-content`]: {
          backgroundColor: "transparent",
          border: 0,
          [`> ${e}-content-box`]: {
            paddingBlock: n
          }
        }
      }
    }
  };
}, KBe = pr("Collapse", (t) => {
  const e = bn(t, {
    collapseContentBg: t.colorBgContainer,
    collapseHeaderBg: t.colorFillAlter,
    collapseHeaderPadding: `${t.paddingSM}px ${t.padding}px`,
    collapsePanelBorderRadius: t.borderRadiusLG,
    collapseContentPaddingHorizontal: 16
    // Fixed value
  });
  return [UBe(e), YBe(e), qBe(e), XBe(e), v8(e)];
});
function GQ(t) {
  let e = t;
  if (!Array.isArray(e)) {
    const n = typeof e;
    e = n === "number" || n === "string" ? [e] : [];
  }
  return e.map((n) => String(n));
}
const Wy = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ACollapse",
  inheritAttrs: !1,
  props: li(ZBe(), {
    accordion: !1,
    destroyInactivePanel: !1,
    bordered: !0,
    expandIconPosition: "start"
  }),
  slots: Object,
  setup(t, e) {
    let {
      attrs: n,
      slots: r,
      emit: i
    } = e;
    const a = ee(GQ(Sie([t.activeKey, t.defaultActiveKey])));
    me(() => t.activeKey, () => {
      a.value = GQ(t.activeKey);
    }, {
      deep: !0
    });
    const {
      prefixCls: o,
      direction: s,
      rootPrefixCls: l
    } = hn("collapse", t), [u, c] = KBe(o), f = V(() => {
      const {
        expandIconPosition: m
      } = t;
      return m !== void 0 ? m : s.value === "rtl" ? "end" : "start";
    }), d = (m) => {
      const {
        expandIcon: y = r.expandIcon
      } = t, _ = y ? y(m) : D(Q2, {
        rotate: m.isActive ? 90 : void 0
      }, null);
      return D("div", {
        class: [`${o.value}-expand-icon`, c.value],
        onClick: () => ["header", "icon"].includes(t.collapsible) && p(m.panelKey)
      }, [po(Array.isArray(y) ? _[0] : _) ? Or(_, {
        class: `${o.value}-arrow`
      }, !1) : _]);
    }, h = (m) => {
      t.activeKey === void 0 && (a.value = m);
      const y = t.accordion ? m[0] : m;
      i("update:activeKey", y), i("change", y);
    }, p = (m) => {
      let y = a.value;
      if (t.accordion)
        y = y[0] === m ? [] : [m];
      else {
        y = [...y];
        const _ = y.indexOf(m);
        _ > -1 ? y.splice(_, 1) : y.push(m);
      }
      h(y);
    }, v = (m, y) => {
      var _, O, S;
      if (LN(m)) return;
      const x = a.value, {
        accordion: C,
        destroyInactivePanel: P,
        collapsible: $,
        openAnimation: T
      } = t, E = T || w8(`${l.value}-motion-collapse`), M = String((_ = m.key) !== null && _ !== void 0 ? _ : y), {
        header: R = (S = (O = m.children) === null || O === void 0 ? void 0 : O.header) === null || S === void 0 ? void 0 : S.call(O),
        headerClass: N,
        collapsible: I,
        disabled: B
      } = m.props || {};
      let Q = !1;
      C ? Q = x[0] === M : Q = x.indexOf(M) > -1;
      let W = I ?? $;
      (B || B === "") && (W = "disabled");
      const H = {
        key: M,
        panelKey: M,
        header: R,
        headerClass: N,
        isActive: Q,
        prefixCls: o.value,
        destroyInactivePanel: P,
        openAnimation: E,
        accordion: C,
        onItemClick: W === "disabled" ? null : p,
        expandIcon: d,
        collapsible: W
      };
      return Or(m, H);
    }, g = () => {
      var m;
      return qr((m = r.default) === null || m === void 0 ? void 0 : m.call(r)).map(v);
    };
    return () => {
      const {
        accordion: m,
        bordered: y,
        ghost: _
      } = t, O = Re(o.value, {
        [`${o.value}-borderless`]: !y,
        [`${o.value}-icon-position-${f.value}`]: !0,
        [`${o.value}-rtl`]: s.value === "rtl",
        [`${o.value}-ghost`]: !!_,
        [n.class]: !!n.class
      }, c.value);
      return u(D("div", te(te({
        class: O
      }, zRe(n)), {}, {
        style: n.style,
        role: m ? "tablist" : null
      }), [g()]));
    };
  }
}), JBe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "PanelContent",
  props: rae(),
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = ve(!1);
    return Vt(() => {
      (t.isActive || t.forceRender) && (r.value = !0);
    }), () => {
      var i;
      if (!r.value) return null;
      const {
        prefixCls: a,
        isActive: o,
        role: s
      } = t;
      return D("div", {
        class: Re(`${a}-content`, {
          [`${a}-content-active`]: o,
          [`${a}-content-inactive`]: !o
        }),
        role: s
      }, [D("div", {
        class: `${a}-content-box`
      }, [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)])]);
    };
  }
}), fC = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ACollapsePanel",
  inheritAttrs: !1,
  props: li(rae(), {
    showArrow: !0,
    isActive: !1,
    onItemClick() {
    },
    headerClass: "",
    forceRender: !1
  }),
  slots: Object,
  // emits: ['itemClick'],
  setup(t, e) {
    let {
      slots: n,
      emit: r,
      attrs: i
    } = e;
    lo(t.disabled === void 0, "Collapse.Panel", '`disabled` is deprecated. Please use `collapsible="disabled"` instead.');
    const {
      prefixCls: a
    } = hn("collapse", t), o = () => {
      r("itemClick", t.panelKey);
    }, s = (l) => {
      (l.key === "Enter" || l.keyCode === 13 || l.which === 13) && o();
    };
    return () => {
      var l, u;
      const {
        header: c = (l = n.header) === null || l === void 0 ? void 0 : l.call(n),
        headerClass: f,
        isActive: d,
        showArrow: h,
        destroyInactivePanel: p,
        accordion: v,
        forceRender: g,
        openAnimation: m,
        expandIcon: y = n.expandIcon,
        extra: _ = (u = n.extra) === null || u === void 0 ? void 0 : u.call(n),
        collapsible: O
      } = t, S = O === "disabled", x = a.value, C = Re(`${x}-header`, {
        [f]: f,
        [`${x}-header-collapsible-only`]: O === "header",
        [`${x}-icon-collapsible-only`]: O === "icon"
      }), P = Re({
        [`${x}-item`]: !0,
        [`${x}-item-active`]: d,
        [`${x}-item-disabled`]: S,
        [`${x}-no-arrow`]: !h,
        [`${i.class}`]: !!i.class
      });
      let $ = D("i", {
        class: "arrow"
      }, null);
      h && typeof y == "function" && ($ = y(t));
      const T = _r(D(JBe, {
        prefixCls: x,
        isActive: d,
        forceRender: g,
        role: v ? "tabpanel" : null
      }, {
        default: n.default
      }), [[ho, d]]), E = k({
        appear: !1,
        css: !1
      }, m);
      return D("div", te(te({}, i), {}, {
        class: P
      }), [D("div", {
        class: C,
        onClick: () => !["header", "icon"].includes(O) && o(),
        role: v ? "tab" : "button",
        tabindex: S ? -1 : 0,
        "aria-expanded": d,
        onKeypress: s
      }, [h && $, D("span", {
        onClick: () => O === "header" && o(),
        class: `${x}-header-text`
      }, [c]), _ && D("div", {
        class: `${x}-extra`
      }, [_])]), D(mo, E, {
        default: () => [!p || d ? T : null]
      })]);
    };
  }
});
Wy.Panel = fC;
Wy.install = function(t) {
  return t.component(Wy.name, Wy), t.component(fC.name, fC), t;
};
var eze = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, name: "left", theme: "outlined" };
function jQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      tze(t, i, n[i]);
    });
  }
  return t;
}
function tze(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var T8 = function(e, n) {
  var r = jQ({}, e, n.attrs);
  return D(Rt, jQ({}, r, {
    icon: eze
  }), null);
};
T8.displayName = "LeftOutlined";
T8.inheritAttrs = !1;
const iae = () => is() && window.document.documentElement;
let tS;
const nze = () => {
  if (!iae())
    return !1;
  if (tS !== void 0)
    return tS;
  const t = document.createElement("div");
  return t.style.display = "flex", t.style.flexDirection = "column", t.style.rowGap = "1px", t.appendChild(document.createElement("div")), t.appendChild(document.createElement("div")), document.body.appendChild(t), tS = t.scrollHeight === 1, document.body.removeChild(t), tS;
}, rze = () => {
  const t = ve(!1);
  return _t(() => {
    t.value = nze();
  }), t;
}, aae = Symbol("rowContextKey"), ize = (t) => {
  Et(aae, t);
}, aze = () => et(aae, {
  gutter: V(() => {
  }),
  wrap: V(() => {
  }),
  supportFlexGap: V(() => {
  })
}), oze = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    // Grid system
    [e]: {
      display: "flex",
      flexFlow: "row wrap",
      minWidth: 0,
      "&::before, &::after": {
        display: "flex"
      },
      "&-no-wrap": {
        flexWrap: "nowrap"
      },
      // The origin of the X-axis
      "&-start": {
        justifyContent: "flex-start"
      },
      // The center of the X-axis
      "&-center": {
        justifyContent: "center"
      },
      // The opposite of the X-axis
      "&-end": {
        justifyContent: "flex-end"
      },
      "&-space-between": {
        justifyContent: "space-between"
      },
      "&-space-around ": {
        justifyContent: "space-around"
      },
      "&-space-evenly ": {
        justifyContent: "space-evenly"
      },
      // Align at the top
      "&-top": {
        alignItems: "flex-start"
      },
      // Align at the center
      "&-middle": {
        alignItems: "center"
      },
      "&-bottom": {
        alignItems: "flex-end"
      }
    }
  };
}, sze = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    // Grid system
    [e]: {
      position: "relative",
      maxWidth: "100%",
      // Prevent columns from collapsing when empty
      minHeight: 1
    }
  };
}, lze = (t, e) => {
  const {
    componentCls: n,
    gridColumns: r
  } = t, i = {};
  for (let a = r; a >= 0; a--)
    a === 0 ? (i[`${n}${e}-${a}`] = {
      display: "none"
    }, i[`${n}-push-${a}`] = {
      insetInlineStart: "auto"
    }, i[`${n}-pull-${a}`] = {
      insetInlineEnd: "auto"
    }, i[`${n}${e}-push-${a}`] = {
      insetInlineStart: "auto"
    }, i[`${n}${e}-pull-${a}`] = {
      insetInlineEnd: "auto"
    }, i[`${n}${e}-offset-${a}`] = {
      marginInlineEnd: 0
    }, i[`${n}${e}-order-${a}`] = {
      order: 0
    }) : (i[`${n}${e}-${a}`] = {
      display: "block",
      flex: `0 0 ${a / r * 100}%`,
      maxWidth: `${a / r * 100}%`
    }, i[`${n}${e}-push-${a}`] = {
      insetInlineStart: `${a / r * 100}%`
    }, i[`${n}${e}-pull-${a}`] = {
      insetInlineEnd: `${a / r * 100}%`
    }, i[`${n}${e}-offset-${a}`] = {
      marginInlineStart: `${a / r * 100}%`
    }, i[`${n}${e}-order-${a}`] = {
      order: a
    });
  return i;
}, kR = (t, e) => lze(t, e), uze = (t, e, n) => ({
  [`@media (min-width: ${e}px)`]: k({}, kR(t, n))
}), cze = pr("Grid", (t) => [oze(t)]), fze = pr("Grid", (t) => {
  const e = bn(t, {
    gridColumns: 24
    // Row is divided into 24 parts in Grid
  }), n = {
    "-sm": e.screenSMMin,
    "-md": e.screenMDMin,
    "-lg": e.screenLGMin,
    "-xl": e.screenXLMin,
    "-xxl": e.screenXXLMin
  };
  return [sze(e), kR(e, ""), kR(e, "-xs"), Object.keys(n).map((r) => uze(e, n[r], r)).reduce((r, i) => k(k({}, r), i), {})];
}), dze = () => ({
  align: or([String, Object]),
  justify: or([String, Object]),
  prefixCls: String,
  gutter: or([Number, Array, Object], 0),
  wrap: {
    type: Boolean,
    default: void 0
  }
}), hze = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ARow",
  inheritAttrs: !1,
  props: dze(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const {
      prefixCls: i,
      direction: a
    } = hn("row", t), [o, s] = cze(i);
    let l;
    const u = I3e(), c = ee({
      xs: !0,
      sm: !0,
      md: !0,
      lg: !0,
      xl: !0,
      xxl: !0
    }), f = ee({
      xs: !1,
      sm: !1,
      md: !1,
      lg: !1,
      xl: !1,
      xxl: !1
    }), d = (_) => V(() => {
      if (typeof t[_] == "string")
        return t[_];
      if (typeof t[_] != "object")
        return "";
      for (let O = 0; O < qO.length; O++) {
        const S = qO[O];
        if (!f.value[S]) continue;
        const x = t[_][S];
        if (x !== void 0)
          return x;
      }
      return "";
    }), h = d("align"), p = d("justify"), v = rze();
    _t(() => {
      l = u.value.subscribe((_) => {
        f.value = _;
        const O = t.gutter || 0;
        (!Array.isArray(O) && typeof O == "object" || Array.isArray(O) && (typeof O[0] == "object" || typeof O[1] == "object")) && (c.value = _);
      });
    }), Qt(() => {
      u.value.unsubscribe(l);
    });
    const g = V(() => {
      const _ = [void 0, void 0], {
        gutter: O = 0
      } = t;
      return (Array.isArray(O) ? O : [O, void 0]).forEach((x, C) => {
        if (typeof x == "object")
          for (let P = 0; P < qO.length; P++) {
            const $ = qO[P];
            if (c.value[$] && x[$] !== void 0) {
              _[C] = x[$];
              break;
            }
          }
        else
          _[C] = x;
      }), _;
    });
    ize({
      gutter: g,
      supportFlexGap: v,
      wrap: V(() => t.wrap)
    });
    const m = V(() => Re(i.value, {
      [`${i.value}-no-wrap`]: t.wrap === !1,
      [`${i.value}-${p.value}`]: p.value,
      [`${i.value}-${h.value}`]: h.value,
      [`${i.value}-rtl`]: a.value === "rtl"
    }, r.class, s.value)), y = V(() => {
      const _ = g.value, O = {}, S = _[0] != null && _[0] > 0 ? `${_[0] / -2}px` : void 0, x = _[1] != null && _[1] > 0 ? `${_[1] / -2}px` : void 0;
      return S && (O.marginLeft = S, O.marginRight = S), v.value ? O.rowGap = `${_[1]}px` : x && (O.marginTop = x, O.marginBottom = x), O;
    });
    return () => {
      var _;
      return o(D("div", te(te({}, r), {}, {
        class: m.value,
        style: k(k({}, y.value), r.style)
      }), [(_ = n.default) === null || _ === void 0 ? void 0 : _.call(n)]));
    };
  }
});
function tf(t) {
  return t == null ? [] : Array.isArray(t) ? t : [t];
}
function oae(t, e) {
  let n = t;
  for (let r = 0; r < e.length; r += 1) {
    if (n == null)
      return;
    n = n[e[r]];
  }
  return n;
}
function sae(t, e, n, r) {
  if (!e.length)
    return n;
  const [i, ...a] = e;
  let o;
  return !t && typeof i == "number" ? o = [] : Array.isArray(t) ? o = [...t] : o = k({}, t), r && n === void 0 && a.length === 1 ? delete o[i][a[0]] : o[i] = sae(o[i], a, n, r), o;
}
function pze(t, e, n) {
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  return e.length && r && n === void 0 && !oae(t, e.slice(0, -1)) ? t : sae(t, e, n, r);
}
function LR(t) {
  return tf(t);
}
function vze(t, e) {
  return oae(t, e);
}
function gze(t, e, n) {
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  return pze(t, e, n, r);
}
function mze(t, e) {
  return t && t.some((n) => bze(n, e));
}
function ZQ(t) {
  return typeof t == "object" && t !== null && Object.getPrototypeOf(t) === Object.prototype;
}
function lae(t, e) {
  const n = Array.isArray(t) ? [...t] : k({}, t);
  return e && Object.keys(e).forEach((r) => {
    const i = n[r], a = e[r], o = ZQ(i) && ZQ(a);
    n[r] = o ? lae(i, a || {}) : a;
  }), n;
}
function yze(t) {
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
    n[r - 1] = arguments[r];
  return n.reduce((i, a) => lae(i, a), t);
}
function UQ(t, e) {
  let n = {};
  return e.forEach((r) => {
    const i = vze(t, r);
    n = gze(n, r, i);
  }), n;
}
function bze(t, e) {
  return !t || !e || t.length !== e.length ? !1 : t.every((n, r) => e[r] === n);
}
const Ua = "'${name}' is not a valid ${type}", Z2 = {
  default: "Validation error on field '${name}'",
  required: "'${name}' is required",
  enum: "'${name}' must be one of [${enum}]",
  whitespace: "'${name}' cannot be empty",
  date: {
    format: "'${name}' is invalid for format date",
    parse: "'${name}' could not be parsed as date",
    invalid: "'${name}' is invalid date"
  },
  types: {
    string: Ua,
    method: Ua,
    array: Ua,
    object: Ua,
    number: Ua,
    date: Ua,
    boolean: Ua,
    integer: Ua,
    float: Ua,
    regexp: Ua,
    email: Ua,
    url: Ua,
    hex: Ua
  },
  string: {
    len: "'${name}' must be exactly ${len} characters",
    min: "'${name}' must be at least ${min} characters",
    max: "'${name}' cannot be longer than ${max} characters",
    range: "'${name}' must be between ${min} and ${max} characters"
  },
  number: {
    len: "'${name}' must equal ${len}",
    min: "'${name}' cannot be less than ${min}",
    max: "'${name}' cannot be greater than ${max}",
    range: "'${name}' must be between ${min} and ${max}"
  },
  array: {
    len: "'${name}' must be exactly ${len} in length",
    min: "'${name}' cannot be less than ${min} in length",
    max: "'${name}' cannot be greater than ${max} in length",
    range: "'${name}' must be between ${min} and ${max} in length"
  },
  pattern: {
    mismatch: "'${name}' does not match pattern ${pattern}"
  }
};
var U2 = function(t, e, n, r) {
  function i(a) {
    return a instanceof n ? a : new n(function(o) {
      o(a);
    });
  }
  return new (n || (n = Promise))(function(a, o) {
    function s(c) {
      try {
        u(r.next(c));
      } catch (f) {
        o(f);
      }
    }
    function l(c) {
      try {
        u(r.throw(c));
      } catch (f) {
        o(f);
      }
    }
    function u(c) {
      c.done ? a(c.value) : i(c.value).then(s, l);
    }
    u((r = r.apply(t, e || [])).next());
  });
};
const _ze = H_;
function Oze(t, e) {
  return t.replace(/\$\{\w+\}/g, (n) => {
    const r = n.slice(2, -1);
    return e[r];
  });
}
function NR(t, e, n, r, i) {
  return U2(this, void 0, void 0, function* () {
    const a = k({}, n);
    delete a.ruleIndex, delete a.trigger;
    let o = null;
    a && a.type === "array" && a.defaultField && (o = a.defaultField, delete a.defaultField);
    const s = new _ze({
      [t]: [a]
    }), l = yze({}, Z2, r.validateMessages);
    s.messages(l);
    let u = [];
    try {
      yield Promise.resolve(s.validate({
        [t]: e
      }, k({}, r)));
    } catch (d) {
      d.errors ? u = d.errors.map((h, p) => {
        let {
          message: v
        } = h;
        return (
          // Wrap VueNode with `key`
          po(v) ? ku(v, {
            key: `error_${p}`
          }) : v
        );
      }) : (console.error(d), u = [l.default()]);
    }
    if (!u.length && o)
      return (yield Promise.all(e.map((h, p) => NR(`${t}.${p}`, h, o, r, i)))).reduce((h, p) => [...h, ...p], []);
    const c = k(k(k({}, n), {
      name: t,
      enum: (n.enum || []).join(", ")
    }), i);
    return u.map((d) => typeof d == "string" ? Oze(d, c) : d);
  });
}
function uae(t, e, n, r, i, a) {
  const o = t.join("."), s = n.map((u, c) => {
    const f = u.validator, d = k(k({}, u), {
      ruleIndex: c
    });
    return f && (d.validator = (h, p, v) => {
      let g = !1;
      const y = f(h, p, function() {
        for (var _ = arguments.length, O = new Array(_), S = 0; S < _; S++)
          O[S] = arguments[S];
        Promise.resolve().then(() => {
          Nh(!g, "Your validator function has already return a promise. `callback` will be ignored."), g || v(...O);
        });
      });
      g = y && typeof y.then == "function" && typeof y.catch == "function", Nh(g, "`callback` is deprecated. Please return a promise instead."), g && y.then(() => {
        v();
      }).catch((_) => {
        v(_ || " ");
      });
    }), d;
  }).sort((u, c) => {
    let {
      warningOnly: f,
      ruleIndex: d
    } = u, {
      warningOnly: h,
      ruleIndex: p
    } = c;
    return !!f == !!h ? d - p : f ? 1 : -1;
  });
  let l;
  if (i === !0)
    l = new Promise((u, c) => U2(this, void 0, void 0, function* () {
      for (let f = 0; f < s.length; f += 1) {
        const d = s[f], h = yield NR(o, e, d, r, a);
        if (h.length) {
          c([{
            errors: h,
            rule: d
          }]);
          return;
        }
      }
      u([]);
    }));
  else {
    const u = s.map((c) => NR(o, e, c, r, a).then((f) => ({
      errors: f,
      rule: c
    })));
    l = (i ? xze(u) : Sze(u)).then((c) => Promise.reject(c));
  }
  return l.catch((u) => u), l;
}
function Sze(t) {
  return U2(this, void 0, void 0, function* () {
    return Promise.all(t).then((e) => [].concat(...e));
  });
}
function xze(t) {
  return U2(this, void 0, void 0, function* () {
    let e = 0;
    return new Promise((n) => {
      t.forEach((r) => {
        r.then((i) => {
          i.errors.length && n([i]), e += 1, e === t.length && n([]);
        });
      });
    });
  });
}
const cae = Symbol("formContextKey"), fae = (t) => {
  Et(cae, t);
}, P8 = () => et(cae, {
  name: V(() => {
  }),
  labelAlign: V(() => "right"),
  vertical: V(() => !1),
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  addField: (t, e) => {
  },
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  removeField: (t) => {
  },
  model: V(() => {
  }),
  rules: V(() => {
  }),
  colon: V(() => {
  }),
  labelWrap: V(() => {
  }),
  labelCol: V(() => {
  }),
  requiredMark: V(() => !1),
  validateTrigger: V(() => {
  }),
  onValidate: () => {
  },
  validateMessages: V(() => Z2)
}), dae = Symbol("formItemPrefixContextKey"), wze = (t) => {
  Et(dae, t);
}, Cze = () => et(dae, {
  prefixCls: V(() => "")
});
function Tze(t) {
  return typeof t == "number" ? `${t} ${t} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(t) ? `0 0 ${t}` : t;
}
const Pze = () => ({
  span: [String, Number],
  order: [String, Number],
  offset: [String, Number],
  push: [String, Number],
  pull: [String, Number],
  xs: {
    type: [String, Number, Object],
    default: void 0
  },
  sm: {
    type: [String, Number, Object],
    default: void 0
  },
  md: {
    type: [String, Number, Object],
    default: void 0
  },
  lg: {
    type: [String, Number, Object],
    default: void 0
  },
  xl: {
    type: [String, Number, Object],
    default: void 0
  },
  xxl: {
    type: [String, Number, Object],
    default: void 0
  },
  prefixCls: String,
  flex: [String, Number]
}), $ze = ["xs", "sm", "md", "lg", "xl", "xxl"], hae = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ACol",
  inheritAttrs: !1,
  props: Pze(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const {
      gutter: i,
      supportFlexGap: a,
      wrap: o
    } = aze(), {
      prefixCls: s,
      direction: l
    } = hn("col", t), [u, c] = fze(s), f = V(() => {
      const {
        span: h,
        order: p,
        offset: v,
        push: g,
        pull: m
      } = t, y = s.value;
      let _ = {};
      return $ze.forEach((O) => {
        let S = {};
        const x = t[O];
        typeof x == "number" ? S.span = x : typeof x == "object" && (S = x || {}), _ = k(k({}, _), {
          [`${y}-${O}-${S.span}`]: S.span !== void 0,
          [`${y}-${O}-order-${S.order}`]: S.order || S.order === 0,
          [`${y}-${O}-offset-${S.offset}`]: S.offset || S.offset === 0,
          [`${y}-${O}-push-${S.push}`]: S.push || S.push === 0,
          [`${y}-${O}-pull-${S.pull}`]: S.pull || S.pull === 0,
          [`${y}-rtl`]: l.value === "rtl"
        });
      }), Re(y, {
        [`${y}-${h}`]: h !== void 0,
        [`${y}-order-${p}`]: p,
        [`${y}-offset-${v}`]: v,
        [`${y}-push-${g}`]: g,
        [`${y}-pull-${m}`]: m
      }, _, r.class, c.value);
    }), d = V(() => {
      const {
        flex: h
      } = t, p = i.value, v = {};
      if (p && p[0] > 0) {
        const g = `${p[0] / 2}px`;
        v.paddingLeft = g, v.paddingRight = g;
      }
      if (p && p[1] > 0 && !a.value) {
        const g = `${p[1] / 2}px`;
        v.paddingTop = g, v.paddingBottom = g;
      }
      return h && (v.flex = Tze(h), o.value === !1 && !v.minWidth && (v.minWidth = 0)), v;
    });
    return () => {
      var h;
      return u(D("div", te(te({}, r), {}, {
        class: f.value,
        style: [d.value, r.style]
      }), [(h = n.default) === null || h === void 0 ? void 0 : h.call(n)]));
    };
  }
});
var Aze = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "question-circle", theme: "outlined" };
function XQ(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      Eze(t, i, n[i]);
    });
  }
  return t;
}
function Eze(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var $8 = function(e, n) {
  var r = XQ({}, e, n.attrs);
  return D(Rt, XQ({}, r, {
    icon: Aze
  }), null);
};
$8.displayName = "QuestionCircleOutlined";
$8.inheritAttrs = !1;
const A8 = (t, e) => {
  let {
    slots: n,
    emit: r,
    attrs: i
  } = e;
  var a, o, s, l, u;
  const {
    prefixCls: c,
    htmlFor: f,
    labelCol: d,
    labelAlign: h,
    colon: p,
    required: v,
    requiredMark: g
  } = k(k({}, t), i), [m] = _2("Form"), y = (a = t.label) !== null && a !== void 0 ? a : (o = n.label) === null || o === void 0 ? void 0 : o.call(n);
  if (!y) return null;
  const {
    vertical: _,
    labelAlign: O,
    labelCol: S,
    labelWrap: x,
    colon: C
  } = P8(), P = d || (S == null ? void 0 : S.value) || {}, $ = h || (O == null ? void 0 : O.value), T = `${c}-item-label`, E = Re(T, $ === "left" && `${T}-left`, P.class, {
    [`${T}-wrap`]: !!x.value
  });
  let M = y;
  const R = p === !0 || (C == null ? void 0 : C.value) !== !1 && p !== !1;
  if (R && !_.value && typeof y == "string" && y.trim() !== "" && (M = y.replace(/[:|：]\s*$/, "")), t.tooltip || n.tooltip) {
    const B = D("span", {
      class: `${c}-item-tooltip`
    }, [D(F2, {
      title: t.tooltip
    }, {
      default: () => [D($8, null, null)]
    })]);
    M = D(Wt, null, [M, n.tooltip ? (s = n.tooltip) === null || s === void 0 ? void 0 : s.call(n, {
      class: `${c}-item-tooltip`
    }) : B]);
  }
  g === "optional" && !v && (M = D(Wt, null, [M, D("span", {
    class: `${c}-item-optional`
  }, [((l = m.value) === null || l === void 0 ? void 0 : l.optional) || ((u = Nu.Form) === null || u === void 0 ? void 0 : u.optional)])]));
  const I = Re({
    [`${c}-item-required`]: v,
    [`${c}-item-required-mark-optional`]: g === "optional",
    [`${c}-item-no-colon`]: !R
  });
  return D(hae, te(te({}, P), {}, {
    class: E
  }), {
    default: () => [D("label", {
      for: f,
      class: I,
      title: typeof y == "string" ? y : "",
      onClick: (B) => r("click", B)
    }, [M])]
  });
};
A8.displayName = "FormItemLabel";
A8.inheritAttrs = !1;
const Mze = (t) => {
  const {
    componentCls: e
  } = t, n = `${e}-show-help`, r = `${e}-show-help-item`;
  return {
    [n]: {
      // Explain holder
      transition: `opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`,
      "&-appear, &-enter": {
        opacity: 0,
        "&-active": {
          opacity: 1
        }
      },
      "&-leave": {
        opacity: 1,
        "&-active": {
          opacity: 0
        }
      },
      // Explain
      [r]: {
        overflow: "hidden",
        transition: `height ${t.motionDurationSlow} ${t.motionEaseInOut},
                     opacity ${t.motionDurationSlow} ${t.motionEaseInOut},
                     transform ${t.motionDurationSlow} ${t.motionEaseInOut} !important`,
        [`&${r}-appear, &${r}-enter`]: {
          transform: "translateY(-5px)",
          opacity: 0,
          "&-active": {
            transform: "translateY(0)",
            opacity: 1
          }
        },
        [`&${r}-leave-active`]: {
          transform: "translateY(-5px)"
        }
      }
    }
  };
}, Ize = (t) => ({
  legend: {
    display: "block",
    width: "100%",
    marginBottom: t.marginLG,
    padding: 0,
    color: t.colorTextDescription,
    fontSize: t.fontSizeLG,
    lineHeight: "inherit",
    border: 0,
    borderBottom: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
  },
  label: {
    fontSize: t.fontSize
  },
  'input[type="search"]': {
    boxSizing: "border-box"
  },
  // Position radios and checkboxes better
  'input[type="radio"], input[type="checkbox"]': {
    lineHeight: "normal"
  },
  'input[type="file"]': {
    display: "block"
  },
  // Make range inputs behave like textual form controls
  'input[type="range"]': {
    display: "block",
    width: "100%"
  },
  // Make multiple select elements height not fixed
  "select[multiple], select[size]": {
    height: "auto"
  },
  // Focus for file, radio, and checkbox
  "input[type='file']:focus,\n  input[type='radio']:focus,\n  input[type='checkbox']:focus": {
    outline: 0,
    boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`
  },
  // Adjust output element
  output: {
    display: "block",
    paddingTop: 15,
    color: t.colorText,
    fontSize: t.fontSize,
    lineHeight: t.lineHeight
  }
}), YQ = (t, e) => {
  const {
    formItemCls: n
  } = t;
  return {
    [n]: {
      [`${n}-label > label`]: {
        height: e
      },
      [`${n}-control-input`]: {
        minHeight: e
      }
    }
  };
}, Dze = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [t.componentCls]: k(k(k({}, Gn(t)), Ize(t)), {
      [`${e}-text`]: {
        display: "inline-block",
        paddingInlineEnd: t.paddingSM
      },
      // ================================================================
      // =                             Size                             =
      // ================================================================
      "&-small": k({}, YQ(t, t.controlHeightSM)),
      "&-large": k({}, YQ(t, t.controlHeightLG))
    })
  };
}, Rze = (t) => {
  const {
    formItemCls: e,
    iconCls: n,
    componentCls: r,
    rootPrefixCls: i
  } = t;
  return {
    [e]: k(k({}, Gn(t)), {
      marginBottom: t.marginLG,
      verticalAlign: "top",
      "&-with-help": {
        transition: "none"
      },
      [`&-hidden,
        &-hidden.${i}-row`]: {
        // https://github.com/ant-design/ant-design/issues/26141
        display: "none"
      },
      "&-has-warning": {
        [`${e}-split`]: {
          color: t.colorError
        }
      },
      "&-has-error": {
        [`${e}-split`]: {
          color: t.colorWarning
        }
      },
      // ==============================================================
      // =                            Label                           =
      // ==============================================================
      [`${e}-label`]: {
        display: "inline-block",
        flexGrow: 0,
        overflow: "hidden",
        whiteSpace: "nowrap",
        textAlign: "end",
        verticalAlign: "middle",
        "&-left": {
          textAlign: "start"
        },
        "&-wrap": {
          overflow: "unset",
          lineHeight: `${t.lineHeight} - 0.25em`,
          whiteSpace: "unset"
        },
        "> label": {
          position: "relative",
          display: "inline-flex",
          alignItems: "center",
          maxWidth: "100%",
          height: t.controlHeight,
          color: t.colorTextHeading,
          fontSize: t.fontSize,
          [`> ${n}`]: {
            fontSize: t.fontSize,
            verticalAlign: "top"
          },
          // Required mark
          [`&${e}-required:not(${e}-required-mark-optional)::before`]: {
            display: "inline-block",
            marginInlineEnd: t.marginXXS,
            color: t.colorError,
            fontSize: t.fontSize,
            fontFamily: "SimSun, sans-serif",
            lineHeight: 1,
            content: '"*"',
            [`${r}-hide-required-mark &`]: {
              display: "none"
            }
          },
          // Optional mark
          [`${e}-optional`]: {
            display: "inline-block",
            marginInlineStart: t.marginXXS,
            color: t.colorTextDescription,
            [`${r}-hide-required-mark &`]: {
              display: "none"
            }
          },
          // Optional mark
          [`${e}-tooltip`]: {
            color: t.colorTextDescription,
            cursor: "help",
            writingMode: "horizontal-tb",
            marginInlineStart: t.marginXXS
          },
          "&::after": {
            content: '":"',
            position: "relative",
            marginBlock: 0,
            marginInlineStart: t.marginXXS / 2,
            marginInlineEnd: t.marginXS
          },
          [`&${e}-no-colon::after`]: {
            content: '" "'
          }
        }
      },
      // ==============================================================
      // =                            Input                           =
      // ==============================================================
      [`${e}-control`]: {
        display: "flex",
        flexDirection: "column",
        flexGrow: 1,
        [`&:first-child:not([class^="'${i}-col-'"]):not([class*="' ${i}-col-'"])`]: {
          width: "100%"
        },
        "&-input": {
          position: "relative",
          display: "flex",
          alignItems: "center",
          minHeight: t.controlHeight,
          "&-content": {
            flex: "auto",
            maxWidth: "100%"
          }
        }
      },
      // ==============================================================
      // =                           Explain                          =
      // ==============================================================
      [e]: {
        "&-explain, &-extra": {
          clear: "both",
          color: t.colorTextDescription,
          fontSize: t.fontSize,
          lineHeight: t.lineHeight
        },
        "&-explain-connected": {
          width: "100%"
        },
        "&-extra": {
          minHeight: t.controlHeightSM,
          transition: `color ${t.motionDurationMid} ${t.motionEaseOut}`
          // sync input color transition
        },
        "&-explain": {
          "&-error": {
            color: t.colorError
          },
          "&-warning": {
            color: t.colorWarning
          }
        }
      },
      [`&-with-help ${e}-explain`]: {
        height: "auto",
        opacity: 1
      },
      // ==============================================================
      // =                        Feedback Icon                       =
      // ==============================================================
      [`${e}-feedback-icon`]: {
        fontSize: t.fontSize,
        textAlign: "center",
        visibility: "visible",
        animationName: p8,
        animationDuration: t.motionDurationMid,
        animationTimingFunction: t.motionEaseOutBack,
        pointerEvents: "none",
        "&-success": {
          color: t.colorSuccess
        },
        "&-error": {
          color: t.colorError
        },
        "&-warning": {
          color: t.colorWarning
        },
        "&-validating": {
          color: t.colorPrimary
        }
      }
    })
  };
}, kze = (t) => {
  const {
    componentCls: e,
    formItemCls: n,
    rootPrefixCls: r
  } = t;
  return {
    [`${e}-horizontal`]: {
      [`${n}-label`]: {
        flexGrow: 0
      },
      [`${n}-control`]: {
        flex: "1 1 0",
        // https://github.com/ant-design/ant-design/issues/32777
        // https://github.com/ant-design/ant-design/issues/33773
        minWidth: 0
      },
      // https://github.com/ant-design/ant-design/issues/32980
      [`${n}-label.${r}-col-24 + ${n}-control`]: {
        minWidth: "unset"
      }
    }
  };
}, Lze = (t) => {
  const {
    componentCls: e,
    formItemCls: n
  } = t;
  return {
    [`${e}-inline`]: {
      display: "flex",
      flexWrap: "wrap",
      [n]: {
        flex: "none",
        flexWrap: "nowrap",
        marginInlineEnd: t.margin,
        marginBottom: 0,
        "&-with-help": {
          marginBottom: t.marginLG
        },
        [`> ${n}-label,
        > ${n}-control`]: {
          display: "inline-block",
          verticalAlign: "top"
        },
        [`> ${n}-label`]: {
          flex: "none"
        },
        [`${e}-text`]: {
          display: "inline-block"
        },
        [`${n}-has-feedback`]: {
          display: "inline-block"
        }
      }
    }
  };
}, bv = (t) => ({
  margin: 0,
  padding: `0 0 ${t.paddingXS}px`,
  whiteSpace: "initial",
  textAlign: "start",
  "> label": {
    margin: 0,
    "&::after": {
      display: "none"
    }
  }
}), Nze = (t) => {
  const {
    componentCls: e,
    formItemCls: n
  } = t;
  return {
    [`${n} ${n}-label`]: bv(t),
    [e]: {
      [n]: {
        flexWrap: "wrap",
        [`${n}-label,
          ${n}-control`]: {
          flex: "0 0 100%",
          maxWidth: "100%"
        }
      }
    }
  };
}, Bze = (t) => {
  const {
    componentCls: e,
    formItemCls: n,
    rootPrefixCls: r
  } = t;
  return {
    [`${e}-vertical`]: {
      [n]: {
        "&-row": {
          flexDirection: "column"
        },
        "&-label > label": {
          height: "auto"
        },
        [`${e}-item-control`]: {
          width: "100%"
        }
      }
    },
    [`${e}-vertical ${n}-label,
      .${r}-col-24${n}-label,
      .${r}-col-xl-24${n}-label`]: bv(t),
    [`@media (max-width: ${t.screenXSMax}px)`]: [Nze(t), {
      [e]: {
        [`.${r}-col-xs-24${n}-label`]: bv(t)
      }
    }],
    [`@media (max-width: ${t.screenSMMax}px)`]: {
      [e]: {
        [`.${r}-col-sm-24${n}-label`]: bv(t)
      }
    },
    [`@media (max-width: ${t.screenMDMax}px)`]: {
      [e]: {
        [`.${r}-col-md-24${n}-label`]: bv(t)
      }
    },
    [`@media (max-width: ${t.screenLGMax}px)`]: {
      [e]: {
        [`.${r}-col-lg-24${n}-label`]: bv(t)
      }
    }
  };
}, E8 = pr("Form", (t, e) => {
  let {
    rootPrefixCls: n
  } = e;
  const r = bn(t, {
    formItemCls: `${t.componentCls}-item`,
    rootPrefixCls: n
  });
  return [Dze(r), Rze(r), Mze(r), kze(r), Lze(r), Bze(r), v8(r), p8];
}), zze = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ErrorList",
  inheritAttrs: !1,
  props: ["errors", "help", "onErrorVisibleChanged", "helpStatus", "warnings"],
  setup(t, e) {
    let {
      attrs: n
    } = e;
    const {
      prefixCls: r,
      status: i
    } = Cze(), a = V(() => `${r.value}-item-explain`), o = V(() => !!(t.errors && t.errors.length)), s = ee(i.value), [, l] = E8(r);
    return me([o, i], () => {
      o.value && (s.value = i.value);
    }), () => {
      var u, c;
      const f = w8(`${r.value}-show-help-item`), d = JN(`${r.value}-show-help-item`, f);
      return d.role = "alert", d.class = [l.value, a.value, n.class, `${r.value}-show-help`], D(mo, te(te({}, Z_(`${r.value}-show-help`)), {}, {
        onAfterEnter: () => t.onErrorVisibleChanged(!0),
        onAfterLeave: () => t.onErrorVisibleChanged(!1)
      }), {
        default: () => [_r(D(X4, te(te({}, d), {}, {
          tag: "div"
        }), {
          default: () => [(c = t.errors) === null || c === void 0 ? void 0 : c.map((h, p) => D("div", {
            key: p,
            class: s.value ? `${a.value}-${s.value}` : ""
          }, [h]))]
        }), [[ho, !!(!((u = t.errors) === null || u === void 0) && u.length)]])]
      });
    };
  }
}), Vze = ae({
  compatConfig: {
    MODE: 3
  },
  slots: Object,
  inheritAttrs: !1,
  props: ["prefixCls", "errors", "hasFeedback", "onDomErrorVisibleChange", "wrapperCol", "help", "extra", "status", "marginBottom", "onErrorVisibleChanged"],
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = P8(), {
      wrapperCol: i
    } = r, a = k({}, r);
    return delete a.labelCol, delete a.wrapperCol, fae(a), wze({
      prefixCls: V(() => t.prefixCls),
      status: V(() => t.status)
    }), () => {
      var o, s, l;
      const {
        prefixCls: u,
        wrapperCol: c,
        marginBottom: f,
        onErrorVisibleChanged: d,
        help: h = (o = n.help) === null || o === void 0 ? void 0 : o.call(n),
        errors: p = Zl((s = n.errors) === null || s === void 0 ? void 0 : s.call(n)),
        // hasFeedback,
        // status,
        extra: v = (l = n.extra) === null || l === void 0 ? void 0 : l.call(n)
      } = t, g = `${u}-item`, m = c || (i == null ? void 0 : i.value) || {}, y = Re(`${g}-control`, m.class);
      return D(hae, te(te({}, m), {}, {
        class: y
      }), {
        default: () => {
          var _;
          return D(Wt, null, [D("div", {
            class: `${g}-control-input`
          }, [D("div", {
            class: `${g}-control-input-content`
          }, [(_ = n.default) === null || _ === void 0 ? void 0 : _.call(n)])]), f !== null || p.length ? D("div", {
            style: {
              display: "flex",
              flexWrap: "nowrap"
            }
          }, [D(zze, {
            errors: p,
            help: h,
            class: `${g}-explain-connected`,
            onErrorVisibleChanged: d
          }, null), !!f && D("div", {
            style: {
              width: 0,
              height: `${f}px`
            }
          }, null)]) : null, v ? D("div", {
            class: `${g}-extra`
          }, [v]) : null]);
        }
      });
    };
  }
});
function Fze(t) {
  const e = ve(t.value.slice());
  let n = null;
  return Vt(() => {
    clearTimeout(n), n = setTimeout(() => {
      e.value = t.value;
    }, t.value.length ? 0 : 10);
  }), e;
}
pf("success", "warning", "error", "validating", "");
const Wze = {
  success: Df,
  warning: Rf,
  error: cs,
  validating: Ql
};
function hE(t, e, n) {
  let r = t;
  const i = e;
  let a = 0;
  try {
    for (let o = i.length; a < o - 1 && !(!r && !n); ++a) {
      const s = i[a];
      if (s in r)
        r = r[s];
      else {
        if (n)
          throw Error("please transfer a valid name path to form item!");
        break;
      }
    }
    if (n && !r)
      throw Error("please transfer a valid name path to form item!");
  } catch {
    console.error("please transfer a valid name path to form item!");
  }
  return {
    o: r,
    k: i[a],
    v: r ? r[i[a]] : void 0
  };
}
const Qze = () => ({
  htmlFor: String,
  prefixCls: String,
  label: oe.any,
  help: oe.any,
  extra: oe.any,
  labelCol: {
    type: Object
  },
  wrapperCol: {
    type: Object
  },
  hasFeedback: {
    type: Boolean,
    default: !1
  },
  colon: {
    type: Boolean,
    default: void 0
  },
  labelAlign: String,
  prop: {
    type: [String, Number, Array]
  },
  name: {
    type: [String, Number, Array]
  },
  rules: [Array, Object],
  autoLink: {
    type: Boolean,
    default: !0
  },
  required: {
    type: Boolean,
    default: void 0
  },
  validateFirst: {
    type: Boolean,
    default: void 0
  },
  validateStatus: oe.oneOf(pf("", "success", "warning", "error", "validating")),
  validateTrigger: {
    type: [String, Array]
  },
  messageVariables: {
    type: Object
  },
  hidden: Boolean,
  noStyle: Boolean,
  tooltip: String
});
let Hze = 0;
const Gze = "form_item", pae = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AFormItem",
  inheritAttrs: !1,
  __ANT_NEW_FORM_ITEM: !0,
  props: Qze(),
  slots: Object,
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      expose: i
    } = e;
    Nh(t.prop === void 0, "`prop` is deprecated. Please use `name` instead.");
    const a = `form-item-${++Hze}`, {
      prefixCls: o
    } = hn("form", t), [s, l] = E8(o), u = ve(), c = P8(), f = V(() => t.name || t.prop), d = ve([]), h = ve(!1), p = ve(), v = V(() => {
      const ue = f.value;
      return LR(ue);
    }), g = V(() => {
      if (v.value.length) {
        const ue = c.name.value, ye = v.value.join("_");
        return ue ? `${ue}_${ye}` : `${Gze}_${ye}`;
      } else
        return;
    }), m = () => {
      const ue = c.model.value;
      if (!(!ue || !f.value))
        return hE(ue, v.value, !0).v;
    }, y = V(() => m()), _ = ve(ph(y.value)), O = V(() => {
      let ue = t.validateTrigger !== void 0 ? t.validateTrigger : c.validateTrigger.value;
      return ue = ue === void 0 ? "change" : ue, tf(ue);
    }), S = V(() => {
      let ue = c.rules.value;
      const ye = t.rules, se = t.required !== void 0 ? {
        required: !!t.required,
        trigger: O.value
      } : [], he = hE(ue, v.value);
      ue = ue ? he.o[he.k] || he.v : [];
      const re = [].concat(ye || ue || []);
      return QPe(re, (q) => q.required) ? re : re.concat(se);
    }), x = V(() => {
      const ue = S.value;
      let ye = !1;
      return ue && ue.length && ue.every((se) => se.required ? (ye = !0, !1) : !0), ye || t.required;
    }), C = ve();
    Vt(() => {
      C.value = t.validateStatus;
    });
    const P = V(() => {
      let ue = {};
      return typeof t.label == "string" ? ue.label = t.label : t.name && (ue.label = String(t.name)), t.messageVariables && (ue = k(k({}, ue), t.messageVariables)), ue;
    }), $ = (ue) => {
      if (v.value.length === 0)
        return;
      const {
        validateFirst: ye = !1
      } = t, {
        triggerName: se
      } = ue || {};
      let he = S.value;
      if (se && (he = he.filter((q) => {
        const {
          trigger: K
        } = q;
        return !K && !O.value.length ? !0 : tf(K || O.value).includes(se);
      })), !he.length)
        return Promise.resolve();
      const re = uae(v.value, y.value, he, k({
        validateMessages: c.validateMessages.value
      }, ue), ye, P.value);
      return C.value = "validating", d.value = [], re.catch((q) => q).then(function() {
        let q = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
        if (C.value === "validating") {
          const K = q.filter((de) => de && de.errors.length);
          C.value = K.length ? "error" : "success", d.value = K.map((de) => de.errors), c.onValidate(f.value, !d.value.length, d.value.length ? es(d.value[0]) : null);
        }
      }), re;
    }, T = () => {
      $({
        triggerName: "blur"
      });
    }, E = () => {
      if (h.value) {
        h.value = !1;
        return;
      }
      $({
        triggerName: "change"
      });
    }, M = () => {
      C.value = t.validateStatus, h.value = !1, d.value = [];
    }, R = () => {
      var ue;
      C.value = t.validateStatus, h.value = !0, d.value = [];
      const ye = c.model.value || {}, se = y.value, he = hE(ye, v.value, !0);
      Array.isArray(se) ? he.o[he.k] = [].concat((ue = _.value) !== null && ue !== void 0 ? ue : []) : he.o[he.k] = _.value, Bt(() => {
        h.value = !1;
      });
    }, N = V(() => t.htmlFor === void 0 ? g.value : t.htmlFor), I = () => {
      const ue = N.value;
      if (!ue || !p.value)
        return;
      const ye = p.value.$el.querySelector(`[id="${ue}"]`);
      ye && ye.focus && ye.focus();
    };
    i({
      onFieldBlur: T,
      onFieldChange: E,
      clearValidate: M,
      resetField: R
    }), C5e({
      id: g,
      onFieldBlur: () => {
        t.autoLink && T();
      },
      onFieldChange: () => {
        t.autoLink && E();
      },
      clearValidate: M
    }, V(() => !!(t.autoLink && c.model.value && f.value)));
    let B = !1;
    me(f, (ue) => {
      ue ? B || (B = !0, c.addField(a, {
        fieldValue: y,
        fieldId: g,
        fieldName: f,
        resetField: R,
        clearValidate: M,
        namePath: v,
        validateRules: $,
        rules: S
      })) : (B = !1, c.removeField(a));
    }, {
      immediate: !0
    }), Qt(() => {
      c.removeField(a);
    });
    const Q = Fze(d), W = V(() => t.validateStatus !== void 0 ? t.validateStatus : Q.value.length ? "error" : C.value), H = V(() => ({
      [`${o.value}-item`]: !0,
      [l.value]: !0,
      // Status
      [`${o.value}-item-has-feedback`]: W.value && t.hasFeedback,
      [`${o.value}-item-has-success`]: W.value === "success",
      [`${o.value}-item-has-warning`]: W.value === "warning",
      [`${o.value}-item-has-error`]: W.value === "error",
      [`${o.value}-item-is-validating`]: W.value === "validating",
      [`${o.value}-item-hidden`]: t.hidden
    })), U = zn({});
    Qs.useProvide(U), Vt(() => {
      let ue;
      if (t.hasFeedback) {
        const ye = W.value && Wze[W.value];
        ue = ye ? D("span", {
          class: Re(`${o.value}-item-feedback-icon`, `${o.value}-item-feedback-icon-${W.value}`)
        }, [D(ye, null, null)]) : null;
      }
      k(U, {
        status: W.value,
        hasFeedback: t.hasFeedback,
        feedbackIcon: ue,
        isFormItemInput: !0
      });
    });
    const j = ve(null), Y = ve(!1), ne = () => {
      if (u.value) {
        const ue = getComputedStyle(u.value);
        j.value = parseInt(ue.marginBottom, 10);
      }
    };
    _t(() => {
      me(Y, () => {
        Y.value && ne();
      }, {
        flush: "post",
        immediate: !0
      });
    });
    const fe = (ue) => {
      ue || (j.value = null);
    };
    return () => {
      var ue, ye;
      if (t.noStyle) return (ue = n.default) === null || ue === void 0 ? void 0 : ue.call(n);
      const se = (ye = t.help) !== null && ye !== void 0 ? ye : n.help ? Zl(n.help()) : null, he = !!(se != null && Array.isArray(se) && se.length || Q.value.length);
      return Y.value = he, s(D("div", {
        class: [H.value, he ? `${o.value}-item-with-help` : "", r.class],
        ref: u
      }, [D(hze, te(te({}, r), {}, {
        class: `${o.value}-item-row`,
        key: "row"
      }), {
        default: () => {
          var re, q;
          return D(Wt, null, [D(A8, te(te({}, t), {}, {
            htmlFor: N.value,
            required: x.value,
            requiredMark: c.requiredMark.value,
            prefixCls: o.value,
            onClick: I,
            label: t.label
          }), {
            label: n.label,
            tooltip: n.tooltip
          }), D(Vze, te(te({}, t), {}, {
            errors: se != null ? tf(se) : Q.value,
            marginBottom: j.value,
            prefixCls: o.value,
            status: W.value,
            ref: p,
            help: se,
            extra: (re = t.extra) !== null && re !== void 0 ? re : (q = n.extra) === null || q === void 0 ? void 0 : q.call(n),
            onErrorVisibleChanged: fe
          }), {
            default: n.default
          })]);
        }
      }), !!j.value && D("div", {
        class: `${o.value}-margin-offset`,
        style: {
          marginBottom: `-${j.value}px`
        }
      }, null)]));
    };
  }
});
function vae(t) {
  let e = !1, n = t.length;
  const r = [];
  return t.length ? new Promise((i, a) => {
    t.forEach((o, s) => {
      o.catch((l) => (e = !0, l)).then((l) => {
        n -= 1, r[s] = l, !(n > 0) && (e && a(r), i(r));
      });
    });
  }) : Promise.resolve([]);
}
function qQ(t) {
  let e = !1;
  return t && t.length && t.every((n) => n.required ? (e = !0, !1) : !0), e;
}
function KQ(t) {
  return t == null ? [] : Array.isArray(t) ? t : [t];
}
function pE(t, e, n) {
  let r = t;
  e = e.replace(/\[(\w+)\]/g, ".$1"), e = e.replace(/^\./, "");
  const i = e.split(".");
  let a = 0;
  for (let o = i.length; a < o - 1 && !(!r && !n); ++a) {
    const s = i[a];
    if (s in r)
      r = r[s];
    else {
      if (n)
        throw new Error("please transfer a valid name path to validate!");
      break;
    }
  }
  return {
    o: r,
    k: i[a],
    v: r ? r[i[a]] : null,
    isValid: r && i[a] in r
  };
}
function jze(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ee({}), n = arguments.length > 2 ? arguments[2] : void 0;
  const r = ph(z(t)), i = zn({}), a = ve([]), o = (_) => {
    k(z(t), k(k({}, ph(r)), _)), Bt(() => {
      Object.keys(i).forEach((O) => {
        i[O] = {
          autoLink: !1,
          required: qQ(z(e)[O])
        };
      });
    });
  }, s = function() {
    let _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], O = arguments.length > 1 ? arguments[1] : void 0;
    return O.length ? _.filter((S) => {
      const x = KQ(S.trigger || "change");
      return ZPe(x, O).length;
    }) : _;
  };
  let l = null;
  const u = function(_) {
    let O = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, S = arguments.length > 2 ? arguments[2] : void 0;
    const x = [], C = {};
    for (let T = 0; T < _.length; T++) {
      const E = _[T], M = pE(z(t), E, S);
      if (!M.isValid) continue;
      C[E] = M.v;
      const R = s(z(e)[E], KQ(O && O.trigger));
      R.length && x.push(c(E, M.v, R, O || {}).then(() => ({
        name: E,
        errors: [],
        warnings: []
      })).catch((N) => {
        const I = [], B = [];
        return N.forEach((Q) => {
          let {
            rule: {
              warningOnly: W
            },
            errors: H
          } = Q;
          W ? B.push(...H) : I.push(...H);
        }), I.length ? Promise.reject({
          name: E,
          errors: I,
          warnings: B
        }) : {
          name: E,
          errors: I,
          warnings: B
        };
      }));
    }
    const P = vae(x);
    l = P;
    const $ = P.then(() => l === P ? Promise.resolve(C) : Promise.reject([])).catch((T) => {
      const E = T.filter((M) => M && M.errors.length);
      return E.length ? Promise.reject({
        values: C,
        errorFields: E,
        outOfDate: l !== P
      }) : Promise.resolve(C);
    });
    return $.catch((T) => T), $;
  }, c = function(_, O, S) {
    let x = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
    const C = uae([_], O, S, k({
      validateMessages: Z2
    }, x), !!x.validateFirst);
    return i[_] ? (i[_].validateStatus = "validating", C.catch((P) => P).then(function() {
      let P = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      var $;
      if (i[_].validateStatus === "validating") {
        const T = P.filter((E) => E && E.errors.length);
        i[_].validateStatus = T.length ? "error" : "success", i[_].help = T.length ? T.map((E) => E.errors) : null, ($ = n == null ? void 0 : n.onValidate) === null || $ === void 0 || $.call(n, _, !T.length, T.length ? es(i[_].help[0]) : null);
      }
    }), C) : C.catch((P) => P);
  }, f = (_, O) => {
    let S = [], x = !0;
    _ ? Array.isArray(_) ? S = _ : S = [_] : (x = !1, S = a.value);
    const C = u(S, O || {}, x);
    return C.catch((P) => P), C;
  }, d = (_) => {
    let O = [];
    _ ? Array.isArray(_) ? O = _ : O = [_] : O = a.value, O.forEach((S) => {
      i[S] && k(i[S], {
        validateStatus: "",
        help: null
      });
    });
  }, h = (_) => {
    const O = {
      autoLink: !1
    }, S = [], x = Array.isArray(_) ? _ : [_];
    for (let C = 0; C < x.length; C++) {
      const P = x[C];
      (P == null ? void 0 : P.validateStatus) === "error" && (O.validateStatus = "error", P.help && S.push(P.help)), O.required = O.required || (P == null ? void 0 : P.required);
    }
    return O.help = S, O;
  };
  let p = r, v = !0;
  const g = (_) => {
    const O = [];
    a.value.forEach((S) => {
      const x = pE(_, S, !1), C = pE(p, S, !1);
      (v && (n == null ? void 0 : n.immediate) && x.isValid || !z_(x.v, C.v)) && O.push(S);
    }), f(O, {
      trigger: "change"
    }), v = !1, p = ph(es(_));
  }, m = n == null ? void 0 : n.debounce;
  let y = !0;
  return me(e, () => {
    a.value = e ? Object.keys(z(e)) : [], !y && n && n.validateOnRuleChange && f(), y = !1;
  }, {
    deep: !0,
    immediate: !0
  }), me(a, () => {
    const _ = {};
    a.value.forEach((O) => {
      _[O] = k({}, i[O], {
        autoLink: !1,
        required: qQ(z(e)[O])
      }), delete i[O];
    });
    for (const O in i)
      Object.prototype.hasOwnProperty.call(i, O) && delete i[O];
    k(i, _);
  }, {
    immediate: !0
  }), me(t, m && m.wait ? hN(g, m.wait, mte(m, ["wait"])) : g, {
    immediate: n && !!n.immediate,
    deep: !0
  }), {
    modelRef: t,
    rulesRef: e,
    initialModel: r,
    validateInfos: i,
    resetFields: o,
    validate: f,
    validateField: c,
    mergeValidateInfo: h,
    clearValidate: d
  };
}
const Zze = () => ({
  layout: oe.oneOf(pf("horizontal", "inline", "vertical")),
  labelCol: sn(),
  wrapperCol: sn(),
  colon: Tt(),
  labelAlign: rr(),
  labelWrap: Tt(),
  prefixCls: String,
  requiredMark: or([String, Boolean]),
  /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */
  hideRequiredMark: Tt(),
  model: oe.object,
  rules: sn(),
  validateMessages: sn(),
  validateOnRuleChange: Tt(),
  // 提交失败自动滚动到第一个错误字段
  scrollToFirstError: Fo(),
  onSubmit: Ct(),
  name: String,
  validateTrigger: or([String, Array]),
  size: rr(),
  disabled: Tt(),
  onValuesChange: Ct(),
  onFieldsChange: Ct(),
  onFinish: Ct(),
  onFinishFailed: Ct(),
  onValidate: Ct()
});
function Uze(t, e) {
  return z_(tf(t), tf(e));
}
const Gr = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AForm",
  inheritAttrs: !1,
  props: li(Zze(), {
    layout: "horizontal",
    hideRequiredMark: !1,
    colon: !0
  }),
  Item: pae,
  useForm: jze,
  // emits: ['finishFailed', 'submit', 'finish', 'validate'],
  setup(t, e) {
    let {
      emit: n,
      slots: r,
      expose: i,
      attrs: a
    } = e;
    const {
      prefixCls: o,
      direction: s,
      form: l,
      size: u,
      disabled: c
    } = hn("form", t), f = V(() => t.requiredMark === "" || t.requiredMark), d = V(() => {
      var Q;
      return f.value !== void 0 ? f.value : l && ((Q = l.value) === null || Q === void 0 ? void 0 : Q.requiredMark) !== void 0 ? l.value.requiredMark : !t.hideRequiredMark;
    });
    Sre(u), zne(c);
    const h = V(() => {
      var Q, W;
      return (Q = t.colon) !== null && Q !== void 0 ? Q : (W = l.value) === null || W === void 0 ? void 0 : W.colon;
    }), {
      validateMessages: p
    } = fke(), v = V(() => k(k(k({}, Z2), p.value), t.validateMessages)), [g, m] = E8(o), y = V(() => Re(o.value, {
      [`${o.value}-${t.layout}`]: !0,
      [`${o.value}-hide-required-mark`]: d.value === !1,
      [`${o.value}-rtl`]: s.value === "rtl",
      [`${o.value}-${u.value}`]: u.value
    }, m.value)), _ = ee(), O = {}, S = (Q, W) => {
      O[Q] = W;
    }, x = (Q) => {
      delete O[Q];
    }, C = (Q) => {
      const W = !!Q, H = W ? tf(Q).map(LR) : [];
      return W ? Object.values(O).filter((U) => H.findIndex((j) => Uze(j, U.fieldName.value)) > -1) : Object.values(O);
    }, P = (Q) => {
      if (!t.model) {
        aa(!1, "Form", "model is required for resetFields to work.");
        return;
      }
      C(Q).forEach((W) => {
        W.resetField();
      });
    }, $ = (Q) => {
      C(Q).forEach((W) => {
        W.clearValidate();
      });
    }, T = (Q) => {
      const {
        scrollToFirstError: W
      } = t;
      if (n("finishFailed", Q), W && Q.errorFields.length) {
        let H = {};
        typeof W == "object" && (H = W), M(Q.errorFields[0].name, H);
      }
    }, E = function() {
      return I(...arguments);
    }, M = function(Q) {
      let W = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const H = C(Q ? [Q] : void 0);
      if (H.length) {
        const U = H[0].fieldId.value, j = U ? document.getElementById(U) : null;
        j && YLe(j, k({
          scrollMode: "if-needed",
          block: "nearest"
        }, W));
      }
    }, R = function() {
      let Q = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
      if (Q === !0) {
        const W = [];
        return Object.values(O).forEach((H) => {
          let {
            namePath: U
          } = H;
          W.push(U.value);
        }), UQ(t.model, W);
      } else
        return UQ(t.model, Q);
    }, N = (Q, W) => {
      if (aa(!(Q instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !t.model)
        return aa(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
      const H = !!Q, U = H ? tf(Q).map(LR) : [], j = [];
      Object.values(O).forEach((fe) => {
        var ue;
        if (H || U.push(fe.namePath.value), !(!((ue = fe.rules) === null || ue === void 0) && ue.value.length))
          return;
        const ye = fe.namePath.value;
        if (!H || mze(U, ye)) {
          const se = fe.validateRules(k({
            validateMessages: v.value
          }, W));
          j.push(se.then(() => ({
            name: ye,
            errors: [],
            warnings: []
          })).catch((he) => {
            const re = [], q = [];
            return he.forEach((K) => {
              let {
                rule: {
                  warningOnly: de
                },
                errors: xe
              } = K;
              de ? q.push(...xe) : re.push(...xe);
            }), re.length ? Promise.reject({
              name: ye,
              errors: re,
              warnings: q
            }) : {
              name: ye,
              errors: re,
              warnings: q
            };
          }));
        }
      });
      const Y = vae(j);
      _.value = Y;
      const ne = Y.then(() => _.value === Y ? Promise.resolve(R(U)) : Promise.reject([])).catch((fe) => {
        const ue = fe.filter((ye) => ye && ye.errors.length);
        return Promise.reject({
          values: R(U),
          errorFields: ue,
          outOfDate: _.value !== Y
        });
      });
      return ne.catch((fe) => fe), ne;
    }, I = function() {
      return N(...arguments);
    }, B = (Q) => {
      Q.preventDefault(), Q.stopPropagation(), n("submit", Q), t.model && N().then((H) => {
        n("finish", H);
      }).catch((H) => {
        T(H);
      });
    };
    return i({
      resetFields: P,
      clearValidate: $,
      validateFields: N,
      getFieldsValue: R,
      validate: E,
      scrollToField: M
    }), fae({
      model: V(() => t.model),
      name: V(() => t.name),
      labelAlign: V(() => t.labelAlign),
      labelCol: V(() => t.labelCol),
      labelWrap: V(() => t.labelWrap),
      wrapperCol: V(() => t.wrapperCol),
      vertical: V(() => t.layout === "vertical"),
      colon: h,
      requiredMark: d,
      validateTrigger: V(() => t.validateTrigger),
      rules: V(() => t.rules),
      addField: S,
      removeField: x,
      onValidate: (Q, W, H) => {
        n("validate", Q, W, H);
      },
      validateMessages: v
    }), me(() => t.rules, () => {
      t.validateOnRuleChange && N();
    }), () => {
      var Q;
      return g(D("form", te(te({}, a), {}, {
        onSubmit: B,
        class: [y.value, a.class]
      }), [(Q = r.default) === null || Q === void 0 ? void 0 : Q.call(r)]));
    };
  }
});
Gr.useInjectFormItemContext = Ul;
Gr.ItemRest = Lb;
Gr.install = function(t) {
  return t.component(Gr.name, Gr), t.component(Gr.Item.name, Gr.Item), t.component(Lb.name, Lb), t;
};
const Xze = new qt("antCheckboxEffect", {
  "0%": {
    transform: "scale(1)",
    opacity: 0.5
  },
  "100%": {
    transform: "scale(1.6)",
    opacity: 0
  }
}), Yze = (t) => {
  const {
    checkboxCls: e
  } = t, n = `${e}-wrapper`;
  return [
    // ===================== Basic =====================
    {
      // Group
      [`${e}-group`]: k(k({}, Gn(t)), {
        display: "inline-flex",
        flexWrap: "wrap",
        columnGap: t.marginXS,
        // Group > Grid
        [`> ${t.antCls}-row`]: {
          flex: 1
        }
      }),
      // Wrapper
      [n]: k(k({}, Gn(t)), {
        display: "inline-flex",
        alignItems: "baseline",
        cursor: "pointer",
        // Fix checkbox & radio in flex align #30260
        "&:after": {
          display: "inline-block",
          width: 0,
          overflow: "hidden",
          content: "'\\a0'"
        },
        // Checkbox near checkbox
        [`& + ${n}`]: {
          marginInlineStart: 0
        },
        [`&${n}-in-form-item`]: {
          'input[type="checkbox"]': {
            width: 14,
            height: 14
            // FIXME: magic
          }
        }
      }),
      // Wrapper > Checkbox
      [e]: k(k({}, Gn(t)), {
        position: "relative",
        whiteSpace: "nowrap",
        lineHeight: 1,
        cursor: "pointer",
        // To make alignment right when `controlHeight` is changed
        // Ref: https://github.com/ant-design/ant-design/issues/41564
        alignSelf: "center",
        // Wrapper > Checkbox > input
        [`${e}-input`]: {
          position: "absolute",
          // Since baseline align will get additional space offset,
          // we need to move input to top to make it align with text.
          // Ref: https://github.com/ant-design/ant-design/issues/38926#issuecomment-1486137799
          inset: 0,
          zIndex: 1,
          cursor: "pointer",
          opacity: 0,
          margin: 0,
          [`&:focus-visible + ${e}-inner`]: k({}, G_(t))
        },
        // Wrapper > Checkbox > inner
        [`${e}-inner`]: {
          boxSizing: "border-box",
          position: "relative",
          top: 0,
          insetInlineStart: 0,
          display: "block",
          width: t.checkboxSize,
          height: t.checkboxSize,
          direction: "ltr",
          backgroundColor: t.colorBgContainer,
          border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
          borderRadius: t.borderRadiusSM,
          borderCollapse: "separate",
          transition: `all ${t.motionDurationSlow}`,
          "&:after": {
            boxSizing: "border-box",
            position: "absolute",
            top: "50%",
            insetInlineStart: "21.5%",
            display: "table",
            width: t.checkboxSize / 14 * 5,
            height: t.checkboxSize / 14 * 8,
            border: `${t.lineWidthBold}px solid ${t.colorWhite}`,
            borderTop: 0,
            borderInlineStart: 0,
            transform: "rotate(45deg) scale(0) translate(-50%,-50%)",
            opacity: 0,
            content: '""',
            transition: `all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`
          }
        },
        // Wrapper > Checkbox + Text
        "& + span": {
          paddingInlineStart: t.paddingXS,
          paddingInlineEnd: t.paddingXS
        }
      })
    },
    // ================= Indeterminate =================
    {
      [e]: {
        "&-indeterminate": {
          // Wrapper > Checkbox > inner
          [`${e}-inner`]: {
            "&:after": {
              top: "50%",
              insetInlineStart: "50%",
              width: t.fontSizeLG / 2,
              height: t.fontSizeLG / 2,
              backgroundColor: t.colorPrimary,
              border: 0,
              transform: "translate(-50%, -50%) scale(1)",
              opacity: 1,
              content: '""'
            }
          }
        }
      }
    },
    // ===================== Hover =====================
    {
      // Wrapper
      [`${n}:hover ${e}:after`]: {
        visibility: "visible"
      },
      // Wrapper & Wrapper > Checkbox
      [`
        ${n}:not(${n}-disabled),
        ${e}:not(${e}-disabled)
      `]: {
        [`&:hover ${e}-inner`]: {
          borderColor: t.colorPrimary
        }
      },
      [`${n}:not(${n}-disabled)`]: {
        [`&:hover ${e}-checked:not(${e}-disabled) ${e}-inner`]: {
          backgroundColor: t.colorPrimaryHover,
          borderColor: "transparent"
        },
        [`&:hover ${e}-checked:not(${e}-disabled):after`]: {
          borderColor: t.colorPrimaryHover
        }
      }
    },
    // ==================== Checked ====================
    {
      // Wrapper > Checkbox
      [`${e}-checked`]: {
        [`${e}-inner`]: {
          backgroundColor: t.colorPrimary,
          borderColor: t.colorPrimary,
          "&:after": {
            opacity: 1,
            transform: "rotate(45deg) scale(1) translate(-50%,-50%)",
            transition: `all ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`
          }
        },
        // Checked Effect
        "&:after": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          width: "100%",
          height: "100%",
          borderRadius: t.borderRadiusSM,
          visibility: "hidden",
          border: `${t.lineWidthBold}px solid ${t.colorPrimary}`,
          animationName: Xze,
          animationDuration: t.motionDurationSlow,
          animationTimingFunction: "ease-in-out",
          animationFillMode: "backwards",
          content: '""',
          transition: `all ${t.motionDurationSlow}`
        }
      },
      [`
        ${n}-checked:not(${n}-disabled),
        ${e}-checked:not(${e}-disabled)
      `]: {
        [`&:hover ${e}-inner`]: {
          backgroundColor: t.colorPrimaryHover,
          borderColor: "transparent"
        },
        [`&:hover ${e}:after`]: {
          borderColor: t.colorPrimaryHover
        }
      }
    },
    // ==================== Disable ====================
    {
      // Wrapper
      [`${n}-disabled`]: {
        cursor: "not-allowed"
      },
      // Wrapper > Checkbox
      [`${e}-disabled`]: {
        // Wrapper > Checkbox > input
        [`&, ${e}-input`]: {
          cursor: "not-allowed",
          // Disabled for native input to enable Tooltip event handler
          // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901
          pointerEvents: "none"
        },
        // Wrapper > Checkbox > inner
        [`${e}-inner`]: {
          background: t.colorBgContainerDisabled,
          borderColor: t.colorBorder,
          "&:after": {
            borderColor: t.colorTextDisabled
          }
        },
        "&:after": {
          display: "none"
        },
        "& + span": {
          color: t.colorTextDisabled
        },
        [`&${e}-indeterminate ${e}-inner::after`]: {
          background: t.colorTextDisabled
        }
      }
    }
  ];
};
function qze(t, e) {
  const n = bn(e, {
    checkboxCls: `.${t}`,
    checkboxSize: e.controlInteractiveSize
  });
  return [Yze(n)];
}
const gae = pr("Checkbox", (t, e) => {
  let {
    prefixCls: n
  } = e;
  return [qze(n, t)];
}), Kze = () => ({
  name: String,
  prefixCls: String,
  options: Lh([]),
  disabled: Boolean,
  id: String
}), Jze = () => k(k({}, Kze()), {
  defaultValue: Lh(),
  value: Lh(),
  onChange: Ct(),
  "onUpdate:value": Ct()
}), eVe = () => ({
  prefixCls: String,
  defaultChecked: Tt(),
  checked: Tt(),
  disabled: Tt(),
  isGroup: Tt(),
  value: oe.any,
  name: String,
  id: String,
  indeterminate: Tt(),
  type: rr("checkbox"),
  autofocus: Tt(),
  onChange: Ct(),
  "onUpdate:checked": Ct(),
  onClick: Ct(),
  skipGroup: Tt(!1)
}), tVe = () => k(k({}, eVe()), {
  indeterminate: Tt(!1)
}), mae = Symbol("CheckboxGroupContext");
var JQ = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const Qy = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckbox",
  inheritAttrs: !1,
  __ANT_CHECKBOX: !0,
  props: tVe(),
  // emits: ['change', 'update:checked'],
  setup(t, e) {
    let {
      emit: n,
      attrs: r,
      slots: i,
      expose: a
    } = e;
    const o = Ul(), s = Qs.useInject(), {
      prefixCls: l,
      direction: u,
      disabled: c
    } = hn("checkbox", t), f = Vl(), [d, h] = gae(l), p = et(mae, void 0), v = Symbol("checkboxUniId"), g = V(() => (p == null ? void 0 : p.disabled.value) || c.value);
    Vt(() => {
      !t.skipGroup && p && p.registerValue(v, t.value);
    }), Qt(() => {
      p && p.cancelValue(v);
    }), _t(() => {
      aa(!!(t.checked !== void 0 || p || t.value === void 0), "Checkbox", "`value` is not validate prop, do you mean `checked`?");
    });
    const m = (S) => {
      const x = S.target.checked;
      n("update:checked", x), n("change", S), o.onFieldChange();
    }, y = ee();
    return a({
      focus: () => {
        var S;
        (S = y.value) === null || S === void 0 || S.focus();
      },
      blur: () => {
        var S;
        (S = y.value) === null || S === void 0 || S.blur();
      }
    }), () => {
      var S;
      const x = qr((S = i.default) === null || S === void 0 ? void 0 : S.call(i)), {
        indeterminate: C,
        skipGroup: P,
        id: $ = o.id.value
      } = t, T = JQ(t, ["indeterminate", "skipGroup", "id"]), {
        onMouseenter: E,
        onMouseleave: M,
        onInput: R,
        class: N,
        style: I
      } = r, B = JQ(r, ["onMouseenter", "onMouseleave", "onInput", "class", "style"]), Q = k(k(k(k({}, T), {
        id: $,
        prefixCls: l.value
      }), B), {
        disabled: g.value
      });
      p && !P ? (Q.onChange = function() {
        for (var j = arguments.length, Y = new Array(j), ne = 0; ne < j; ne++)
          Y[ne] = arguments[ne];
        n("change", ...Y), p.toggleOption({
          label: x,
          value: t.value
        });
      }, Q.name = p.name.value, Q.checked = p.mergedValue.value.includes(t.value), Q.disabled = g.value || f.value, Q.indeterminate = C) : Q.onChange = m;
      const W = Re({
        [`${l.value}-wrapper`]: !0,
        [`${l.value}-rtl`]: u.value === "rtl",
        [`${l.value}-wrapper-checked`]: Q.checked,
        [`${l.value}-wrapper-disabled`]: Q.disabled,
        [`${l.value}-wrapper-in-form-item`]: s.isFormItemInput
      }, N, h.value), H = Re({
        [`${l.value}-indeterminate`]: C
      }, h.value);
      return d(D("label", {
        class: W,
        style: I,
        onMouseenter: E,
        onMouseleave: M
      }, [D(Fie, te(te({
        "aria-checked": C ? "mixed" : void 0
      }, Q), {}, {
        class: H,
        ref: y
      }), null), x.length ? D("span", null, [x]) : null]));
    };
  }
}), dC = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckboxGroup",
  inheritAttrs: !1,
  props: Jze(),
  // emits: ['change', 'update:value'],
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      emit: i,
      expose: a
    } = e;
    const o = Ul(), {
      prefixCls: s,
      direction: l
    } = hn("checkbox", t), u = V(() => `${s.value}-group`), [c, f] = gae(u), d = ee((t.value === void 0 ? t.defaultValue : t.value) || []);
    me(() => t.value, () => {
      d.value = t.value || [];
    });
    const h = V(() => t.options.map((O) => typeof O == "string" || typeof O == "number" ? {
      label: O,
      value: O
    } : O)), p = ee(Symbol()), v = ee(/* @__PURE__ */ new Map()), g = (O) => {
      v.value.delete(O), p.value = Symbol();
    }, m = (O, S) => {
      v.value.set(O, S), p.value = Symbol();
    }, y = ee(/* @__PURE__ */ new Map());
    return me(p, () => {
      const O = /* @__PURE__ */ new Map();
      for (const S of v.value.values())
        O.set(S, !0);
      y.value = O;
    }), Et(mae, {
      cancelValue: g,
      registerValue: m,
      toggleOption: (O) => {
        const S = d.value.indexOf(O.value), x = [...d.value];
        S === -1 ? x.push(O.value) : x.splice(S, 1), t.value === void 0 && (d.value = x);
        const C = x.filter((P) => y.value.has(P)).sort((P, $) => {
          const T = h.value.findIndex((M) => M.value === P), E = h.value.findIndex((M) => M.value === $);
          return T - E;
        });
        i("update:value", C), i("change", C), o.onFieldChange();
      },
      mergedValue: d,
      name: V(() => t.name),
      disabled: V(() => t.disabled)
    }), a({
      mergedValue: d
    }), () => {
      var O;
      const {
        id: S = o.id.value
      } = t;
      let x = null;
      return h.value && h.value.length > 0 && (x = h.value.map((C) => {
        var P;
        return D(Qy, {
          prefixCls: s.value,
          key: C.value.toString(),
          disabled: "disabled" in C ? C.disabled : t.disabled,
          indeterminate: C.indeterminate,
          value: C.value,
          checked: d.value.indexOf(C.value) !== -1,
          onChange: C.onChange,
          class: `${u.value}-item`
        }, {
          default: () => [n.label !== void 0 ? (P = n.label) === null || P === void 0 ? void 0 : P.call(n, C) : C.label]
        });
      })), c(D("div", te(te({}, r), {}, {
        class: [u.value, {
          [`${u.value}-rtl`]: l.value === "rtl"
        }, r.class, f.value],
        id: S
      }), [x || ((O = n.default) === null || O === void 0 ? void 0 : O.call(n))]));
    };
  }
});
Qy.Group = dC;
Qy.install = function(t) {
  return t.component(Qy.name, Qy), t.component(dC.name, dC), t;
};
let Jx = k({}, Nu.Modal);
function nVe(t) {
  t ? Jx = k(k({}, Jx), t) : Jx = k({}, Nu.Modal);
}
function rVe() {
  return Jx;
}
const BR = "internalMark", ew = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ALocaleProvider",
  props: {
    locale: {
      type: Object
    },
    ANT_MARK__: String
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    aa(t.ANT_MARK__ === BR, "LocaleProvider", "`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");
    const r = zn({
      antLocale: k(k({}, t.locale), {
        exist: !0
      }),
      ANT_MARK__: BR
    });
    return Et("localeData", r), me(() => t.locale, (i) => {
      nVe(i && i.Modal), r.antLocale = k(k({}, i), {
        exist: !0
      });
    }, {
      immediate: !0
    }), () => {
      var i;
      return (i = n.default) === null || i === void 0 ? void 0 : i.call(n);
    };
  }
});
ew.install = function(t) {
  return t.component(ew.name, ew), t;
};
const iVe = fm(ew), X2 = ae({
  name: "Notice",
  inheritAttrs: !1,
  props: ["prefixCls", "duration", "updateMark", "noticeKey", "closeIcon", "closable", "props", "onClick", "onClose", "holder", "visible"],
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e, i, a = !1;
    const o = V(() => t.duration === void 0 ? 4.5 : t.duration), s = () => {
      o.value && !a && (i = setTimeout(() => {
        u();
      }, o.value * 1e3));
    }, l = () => {
      i && (clearTimeout(i), i = null);
    }, u = (f) => {
      f && f.stopPropagation(), l();
      const {
        onClose: d,
        noticeKey: h
      } = t;
      d && d(h);
    }, c = () => {
      l(), s();
    };
    return _t(() => {
      s();
    }), qu(() => {
      a = !0, l();
    }), me([o, () => t.updateMark, () => t.visible], (f, d) => {
      let [h, p, v] = f, [g, m, y] = d;
      (h !== g || p !== m || v !== y && y) && c();
    }, {
      flush: "post"
    }), () => {
      var f, d;
      const {
        prefixCls: h,
        closable: p,
        closeIcon: v = (f = r.closeIcon) === null || f === void 0 ? void 0 : f.call(r),
        onClick: g,
        holder: m
      } = t, {
        class: y,
        style: _
      } = n, O = `${h}-notice`, S = Object.keys(n).reduce((C, P) => ((P.startsWith("data-") || P.startsWith("aria-") || P === "role") && (C[P] = n[P]), C), {}), x = D("div", te({
        class: Re(O, y, {
          [`${O}-closable`]: p
        }),
        style: _,
        onMouseenter: l,
        onMouseleave: s,
        onClick: g
      }, S), [D("div", {
        class: `${O}-content`
      }, [(d = r.default) === null || d === void 0 ? void 0 : d.call(r)]), p ? D("a", {
        tabindex: 0,
        onClick: u,
        class: `${O}-close`
      }, [v || D("span", {
        class: `${O}-close-x`
      }, null)]) : null]);
      return m ? D(R_, {
        to: m
      }, {
        default: () => x
      }) : x;
    };
  }
});
var aVe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
let eH = 0;
const oVe = Date.now();
function tH() {
  const t = eH;
  return eH += 1, `rcNotification_${oVe}_${t}`;
}
const hC = ae({
  name: "Notification",
  inheritAttrs: !1,
  props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId"],
  setup(t, e) {
    let {
      attrs: n,
      expose: r,
      slots: i
    } = e;
    const a = /* @__PURE__ */ new Map(), o = ee([]), s = V(() => {
      const {
        prefixCls: c,
        animation: f = "fade"
      } = t;
      let d = t.transitionName;
      return !d && f && (d = `${c}-${f}`), JN(d);
    }), l = (c, f) => {
      const d = c.key || tH(), h = k(k({}, c), {
        key: d
      }), {
        maxCount: p
      } = t, v = o.value.map((m) => m.notice.key).indexOf(d), g = o.value.concat();
      v !== -1 ? g.splice(v, 1, {
        notice: h,
        holderCallback: f
      }) : (p && o.value.length >= p && (h.key = g[0].notice.key, h.updateMark = tH(), h.userPassKey = d, g.shift()), g.push({
        notice: h,
        holderCallback: f
      })), o.value = g;
    }, u = (c) => {
      o.value = o.value.filter((f) => {
        let {
          notice: {
            key: d,
            userPassKey: h
          }
        } = f;
        return (h || d) !== c;
      });
    };
    return r({
      add: l,
      remove: u,
      notices: o
    }), () => {
      var c;
      const {
        prefixCls: f,
        closeIcon: d = (c = i.closeIcon) === null || c === void 0 ? void 0 : c.call(i, {
          prefixCls: f
        })
      } = t, h = o.value.map((v, g) => {
        let {
          notice: m,
          holderCallback: y
        } = v;
        const _ = g === o.value.length - 1 ? m.updateMark : void 0, {
          key: O,
          userPassKey: S
        } = m, {
          content: x
        } = m, C = k(k(k({
          prefixCls: f,
          closeIcon: typeof d == "function" ? d({
            prefixCls: f
          }) : d
        }, m), m.props), {
          key: O,
          noticeKey: S || O,
          updateMark: _,
          onClose: (P) => {
            var $;
            u(P), ($ = m.onClose) === null || $ === void 0 || $.call(m);
          },
          onClick: m.onClick
        });
        return y ? D("div", {
          key: O,
          class: `${f}-hook-holder`,
          ref: (P) => {
            typeof O > "u" || (P ? (a.set(O, P), y(P, C)) : a.delete(O));
          }
        }, null) : D(X2, te(te({}, C), {}, {
          class: Re(C.class, t.hashId)
        }), {
          default: () => [typeof x == "function" ? x({
            prefixCls: f
          }) : x]
        });
      }), p = {
        [f]: 1,
        [n.class]: !!n.class,
        [t.hashId]: !0
      };
      return D("div", {
        class: p,
        style: n.style || {
          top: "65px",
          left: "50%"
        }
      }, [D(X4, te({
        tag: "div"
      }, s.value), {
        default: () => [h]
      })]);
    };
  }
});
hC.newInstance = function(e, n) {
  const r = e || {}, {
    name: i = "notification",
    getContainer: a,
    appContext: o,
    prefixCls: s,
    rootPrefixCls: l,
    transitionName: u,
    hasTransitionName: c,
    useStyle: f
  } = r, d = aVe(r, ["name", "getContainer", "appContext", "prefixCls", "rootPrefixCls", "transitionName", "hasTransitionName", "useStyle"]), h = document.createElement("div");
  a ? a().appendChild(h) : document.body.appendChild(h);
  const p = ae({
    compatConfig: {
      MODE: 3
    },
    name: "NotificationWrapper",
    setup(g, m) {
      let {
        attrs: y
      } = m;
      const _ = ve(), O = V(() => gi.getPrefixCls(i, s)), [, S] = f(O);
      return _t(() => {
        n({
          notice(x) {
            var C;
            (C = _.value) === null || C === void 0 || C.add(x);
          },
          removeNotice(x) {
            var C;
            (C = _.value) === null || C === void 0 || C.remove(x);
          },
          destroy() {
            Ih(null, h), h.parentNode && h.parentNode.removeChild(h);
          },
          component: _
        });
      }), () => {
        const x = gi, C = x.getRootPrefixCls(l, O.value), P = c ? u : `${O.value}-${u}`;
        return D(Gv, te(te({}, x), {}, {
          prefixCls: C
        }), {
          default: () => [D(hC, te(te({
            ref: _
          }, y), {}, {
            prefixCls: O.value,
            transitionName: P,
            hashId: S.value
          }), null)]
        });
      };
    }
  }), v = D(p, d);
  v.appContext = o || v.appContext, Ih(v, h);
};
let nH = 0;
const sVe = Date.now();
function rH() {
  const t = nH;
  return nH += 1, `rcNotification_${sVe}_${t}`;
}
const lVe = ae({
  name: "HookNotification",
  inheritAttrs: !1,
  props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId", "remove", "notices", "getStyles", "getClassName", "onAllRemoved", "getContainer"],
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const i = /* @__PURE__ */ new Map(), a = V(() => t.notices), o = V(() => {
      let c = t.transitionName;
      if (!c && t.animation)
        switch (typeof t.animation) {
          case "string":
            c = t.animation;
            break;
          case "function":
            c = t.animation().name;
            break;
          case "object":
            c = t.animation.name;
            break;
          default:
            c = `${t.prefixCls}-fade`;
            break;
        }
      return JN(c);
    }), s = (c) => t.remove(c), l = ee({});
    me(a, () => {
      const c = {};
      Object.keys(l.value).forEach((f) => {
        c[f] = [];
      }), t.notices.forEach((f) => {
        const {
          placement: d = "topRight"
        } = f.notice;
        d && (c[d] = c[d] || [], c[d].push(f));
      }), l.value = c;
    });
    const u = V(() => Object.keys(l.value));
    return () => {
      var c;
      const {
        prefixCls: f,
        closeIcon: d = (c = r.closeIcon) === null || c === void 0 ? void 0 : c.call(r, {
          prefixCls: f
        })
      } = t, h = u.value.map((p) => {
        var v, g;
        const m = l.value[p], y = (v = t.getClassName) === null || v === void 0 ? void 0 : v.call(t, p), _ = (g = t.getStyles) === null || g === void 0 ? void 0 : g.call(t, p), O = m.map((C, P) => {
          let {
            notice: $,
            holderCallback: T
          } = C;
          const E = P === a.value.length - 1 ? $.updateMark : void 0, {
            key: M,
            userPassKey: R
          } = $, {
            content: N
          } = $, I = k(k(k({
            prefixCls: f,
            closeIcon: typeof d == "function" ? d({
              prefixCls: f
            }) : d
          }, $), $.props), {
            key: M,
            noticeKey: R || M,
            updateMark: E,
            onClose: (B) => {
              var Q;
              s(B), (Q = $.onClose) === null || Q === void 0 || Q.call($);
            },
            onClick: $.onClick
          });
          return T ? D("div", {
            key: M,
            class: `${f}-hook-holder`,
            ref: (B) => {
              typeof M > "u" || (B ? (i.set(M, B), T(B, I)) : i.delete(M));
            }
          }, null) : D(X2, te(te({}, I), {}, {
            class: Re(I.class, t.hashId)
          }), {
            default: () => [typeof N == "function" ? N({
              prefixCls: f
            }) : N]
          });
        }), S = {
          [f]: 1,
          [`${f}-${p}`]: 1,
          [n.class]: !!n.class,
          [t.hashId]: !0,
          [y]: !!y
        };
        function x() {
          var C;
          m.length > 0 || (Reflect.deleteProperty(l.value, p), (C = t.onAllRemoved) === null || C === void 0 || C.call(t));
        }
        return D("div", {
          key: p,
          class: S,
          style: n.style || _ || {
            top: "65px",
            left: "50%"
          }
        }, [D(X4, te(te({
          tag: "div"
        }, o.value), {}, {
          onAfterLeave: x
        }), {
          default: () => [O]
        })]);
      });
      return D(jre, {
        getContainer: t.getContainer
      }, {
        default: () => [h]
      });
    };
  }
}), uVe = lVe;
var cVe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const fVe = () => document.body;
let iH = 0;
function dVe() {
  const t = {};
  for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
    n[r] = arguments[r];
  return n.forEach((i) => {
    i && Object.keys(i).forEach((a) => {
      const o = i[a];
      o !== void 0 && (t[a] = o);
    });
  }), t;
}
function yae() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  const {
    getContainer: e = fVe,
    motion: n,
    prefixCls: r,
    maxCount: i,
    getClassName: a,
    getStyles: o,
    onAllRemoved: s
  } = t, l = cVe(t, ["getContainer", "motion", "prefixCls", "maxCount", "getClassName", "getStyles", "onAllRemoved"]), u = ve([]), c = ve(), f = (m, y) => {
    const _ = m.key || rH(), O = k(k({}, m), {
      key: _
    }), S = u.value.map((C) => C.notice.key).indexOf(_), x = u.value.concat();
    S !== -1 ? x.splice(S, 1, {
      notice: O,
      holderCallback: y
    }) : (i && u.value.length >= i && (O.key = x[0].notice.key, O.updateMark = rH(), O.userPassKey = _, x.shift()), x.push({
      notice: O,
      holderCallback: y
    })), u.value = x;
  }, d = (m) => {
    u.value = u.value.filter((y) => {
      let {
        notice: {
          key: _,
          userPassKey: O
        }
      } = y;
      return (O || _) !== m;
    });
  }, h = () => {
    u.value = [];
  }, p = () => D(uVe, {
    ref: c,
    prefixCls: r,
    maxCount: i,
    notices: u.value,
    remove: d,
    getClassName: a,
    getStyles: o,
    animation: n,
    hashId: t.hashId,
    onAllRemoved: s,
    getContainer: e
  }, null), v = ve([]), g = {
    open: (m) => {
      const y = dVe(l, m);
      (y.key === null || y.key === void 0) && (y.key = `vc-notification-${iH}`, iH += 1), v.value = [...v.value, {
        type: "open",
        config: y
      }];
    },
    close: (m) => {
      v.value = [...v.value, {
        type: "close",
        key: m
      }];
    },
    destroy: () => {
      v.value = [...v.value, {
        type: "destroy"
      }];
    }
  };
  return me(v, () => {
    v.value.length && (v.value.forEach((m) => {
      switch (m.type) {
        case "open":
          f(m.config);
          break;
        case "close":
          d(m.key);
          break;
        case "destroy":
          h();
          break;
      }
    }), v.value = []);
  }), [g, p];
}
const hVe = (t) => {
  const {
    componentCls: e,
    iconCls: n,
    boxShadowSecondary: r,
    colorBgElevated: i,
    colorSuccess: a,
    colorError: o,
    colorWarning: s,
    colorInfo: l,
    fontSizeLG: u,
    motionEaseInOutCirc: c,
    motionDurationSlow: f,
    marginXS: d,
    paddingXS: h,
    borderRadiusLG: p,
    zIndexPopup: v,
    // Custom token
    messageNoticeContentPadding: g
  } = t, m = new qt("MessageMoveIn", {
    "0%": {
      padding: 0,
      transform: "translateY(-100%)",
      opacity: 0
    },
    "100%": {
      padding: h,
      transform: "translateY(0)",
      opacity: 1
    }
  }), y = new qt("MessageMoveOut", {
    "0%": {
      maxHeight: t.height,
      padding: h,
      opacity: 1
    },
    "100%": {
      maxHeight: 0,
      padding: 0,
      opacity: 0
    }
  });
  return [
    // ============================ Holder ============================
    {
      [e]: k(k({}, Gn(t)), {
        position: "fixed",
        top: d,
        left: "50%",
        transform: "translateX(-50%)",
        width: "100%",
        pointerEvents: "none",
        zIndex: v,
        [`${e}-move-up`]: {
          animationFillMode: "forwards"
        },
        [`
        ${e}-move-up-appear,
        ${e}-move-up-enter
      `]: {
          animationName: m,
          animationDuration: f,
          animationPlayState: "paused",
          animationTimingFunction: c
        },
        [`
        ${e}-move-up-appear${e}-move-up-appear-active,
        ${e}-move-up-enter${e}-move-up-enter-active
      `]: {
          animationPlayState: "running"
        },
        [`${e}-move-up-leave`]: {
          animationName: y,
          animationDuration: f,
          animationPlayState: "paused",
          animationTimingFunction: c
        },
        [`${e}-move-up-leave${e}-move-up-leave-active`]: {
          animationPlayState: "running"
        },
        "&-rtl": {
          direction: "rtl",
          span: {
            direction: "rtl"
          }
        }
      })
    },
    // ============================ Notice ============================
    {
      [`${e}-notice`]: {
        padding: h,
        textAlign: "center",
        [n]: {
          verticalAlign: "text-bottom",
          marginInlineEnd: d,
          fontSize: u
        },
        [`${e}-notice-content`]: {
          display: "inline-block",
          padding: g,
          background: i,
          borderRadius: p,
          boxShadow: r,
          pointerEvents: "all"
        },
        [`${e}-success ${n}`]: {
          color: a
        },
        [`${e}-error ${n}`]: {
          color: o
        },
        [`${e}-warning ${n}`]: {
          color: s
        },
        [`
        ${e}-info ${n},
        ${e}-loading ${n}`]: {
          color: l
        }
      }
    },
    // ============================= Pure =============================
    {
      [`${e}-notice-pure-panel`]: {
        padding: 0,
        textAlign: "start"
      }
    }
  ];
}, M8 = pr("Message", (t) => {
  const e = bn(t, {
    messageNoticeContentPadding: `${(t.controlHeightLG - t.fontSize * t.lineHeight) / 2}px ${t.paddingSM}px`
  });
  return [hVe(e)];
}, (t) => ({
  height: 150,
  zIndexPopup: t.zIndexPopupBase + 10
})), pVe = {
  info: D(cp, null, null),
  success: D(Df, null, null),
  error: D(cs, null, null),
  warning: D(Rf, null, null),
  loading: D(Ql, null, null)
}, bae = ae({
  name: "PureContent",
  inheritAttrs: !1,
  props: ["prefixCls", "type", "icon"],
  setup(t, e) {
    let {
      slots: n
    } = e;
    return () => {
      var r;
      return D("div", {
        class: Re(`${t.prefixCls}-custom-content`, `${t.prefixCls}-${t.type}`)
      }, [t.icon || pVe[t.type], D("span", null, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)])]);
    };
  }
});
ae({
  name: "PurePanel",
  inheritAttrs: !1,
  props: ["prefixCls", "class", "type", "icon", "content"],
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    var i;
    const {
      getPrefixCls: a
    } = b2(), o = V(() => t.prefixCls || a("message")), [, s] = M8(o);
    return D(X2, te(te({}, r), {}, {
      prefixCls: o.value,
      class: Re(s.value, `${o.value}-notice-pure-panel`),
      noticeKey: "pure",
      duration: null
    }), {
      default: () => [D(bae, {
        prefixCls: o.value,
        type: t.type,
        icon: t.icon
      }, {
        default: () => [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]
      })]
    });
  }
});
var vVe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const gVe = 8, mVe = 3, yVe = ae({
  name: "Holder",
  inheritAttrs: !1,
  props: ["top", "prefixCls", "getContainer", "maxCount", "duration", "rtl", "transitionName", "onAllRemoved"],
  setup(t, e) {
    let {
      expose: n
    } = e;
    var r, i;
    const {
      getPrefixCls: a,
      getPopupContainer: o
    } = hn("message", t), s = V(() => a("message", t.prefixCls)), [, l] = M8(s), u = () => {
      var v;
      const g = (v = t.top) !== null && v !== void 0 ? v : gVe;
      return {
        left: "50%",
        transform: "translateX(-50%)",
        top: typeof g == "number" ? `${g}px` : g
      };
    }, c = () => Re(l.value, t.rtl ? `${s.value}-rtl` : ""), f = () => {
      var v;
      return ZN({
        prefixCls: s.value,
        animation: (v = t.animation) !== null && v !== void 0 ? v : "move-up",
        transitionName: t.transitionName
      });
    }, d = D("span", {
      class: `${s.value}-close-x`
    }, [D(tc, {
      class: `${s.value}-close-icon`
    }, null)]), [h, p] = yae({
      //@ts-ignore
      getStyles: u,
      prefixCls: s.value,
      getClassName: c,
      motion: f,
      closable: !1,
      closeIcon: d,
      duration: (r = t.duration) !== null && r !== void 0 ? r : mVe,
      getContainer: (i = t.staticGetContainer) !== null && i !== void 0 ? i : o.value,
      maxCount: t.maxCount,
      onAllRemoved: t.onAllRemoved
    });
    return n(k(k({}, h), {
      prefixCls: s,
      hashId: l
    })), p;
  }
});
let aH = 0;
function bVe(t) {
  const e = ve(null), n = Symbol("messageHolderKey"), r = (l) => {
    var u;
    (u = e.value) === null || u === void 0 || u.close(l);
  }, i = (l) => {
    if (!e.value) {
      const S = () => {
      };
      return S.then = () => {
      }, S;
    }
    const {
      open: u,
      prefixCls: c,
      hashId: f
    } = e.value, d = `${c}-notice`, {
      content: h,
      icon: p,
      type: v,
      key: g,
      class: m,
      onClose: y
    } = l, _ = vVe(l, ["content", "icon", "type", "key", "class", "onClose"]);
    let O = g;
    return O == null && (aH += 1, O = `antd-message-${aH}`), VRe((S) => (u(k(k({}, _), {
      key: O,
      content: () => D(bae, {
        prefixCls: c,
        type: v,
        icon: typeof p == "function" ? p() : p
      }, {
        default: () => [typeof h == "function" ? h() : h]
      }),
      placement: "top",
      // @ts-ignore
      class: Re(v && `${d}-${v}`, f, m),
      onClose: () => {
        y == null || y(), S();
      }
    })), () => {
      r(O);
    }));
  }, o = {
    open: i,
    destroy: (l) => {
      var u;
      l !== void 0 ? r(l) : (u = e.value) === null || u === void 0 || u.destroy();
    }
  };
  return ["info", "success", "warning", "error", "loading"].forEach((l) => {
    const u = (c, f, d) => {
      let h;
      c && typeof c == "object" && "content" in c ? h = c : h = {
        content: c
      };
      let p, v;
      typeof f == "function" ? v = f : (p = f, v = d);
      const g = k(k({
        onClose: v,
        duration: p
      }, h), {
        type: l
      });
      return i(g);
    };
    o[l] = u;
  }), [o, () => D(yVe, te(te({
    key: n
  }, t), {}, {
    ref: e
  }), null)];
}
function _Ve(t) {
  return bVe(t);
}
let _ae = 3, Oae, na, OVe = 1, Sae = "", xae = "move-up", wae = !1, Cae = () => document.body, Tae, Pae = !1;
function SVe() {
  return OVe++;
}
function xVe(t) {
  t.top !== void 0 && (Oae = t.top, na = null), t.duration !== void 0 && (_ae = t.duration), t.prefixCls !== void 0 && (Sae = t.prefixCls), t.getContainer !== void 0 && (Cae = t.getContainer, na = null), t.transitionName !== void 0 && (xae = t.transitionName, na = null, wae = !0), t.maxCount !== void 0 && (Tae = t.maxCount, na = null), t.rtl !== void 0 && (Pae = t.rtl);
}
function wVe(t, e) {
  if (na) {
    e(na);
    return;
  }
  hC.newInstance({
    appContext: t.appContext,
    prefixCls: t.prefixCls || Sae,
    rootPrefixCls: t.rootPrefixCls,
    transitionName: xae,
    hasTransitionName: wae,
    style: {
      top: Oae
    },
    getContainer: Cae || t.getPopupContainer,
    maxCount: Tae,
    name: "message",
    useStyle: M8
  }, (n) => {
    if (na) {
      e(na);
      return;
    }
    na = n, e(n);
  });
}
const $ae = {
  info: cp,
  success: Df,
  error: cs,
  warning: Rf,
  loading: Ql
}, CVe = Object.keys($ae);
function TVe(t) {
  const e = t.duration !== void 0 ? t.duration : _ae, n = t.key || SVe(), r = new Promise((a) => {
    const o = () => (typeof t.onClose == "function" && t.onClose(), a(!0));
    wVe(t, (s) => {
      s.notice({
        key: n,
        duration: e,
        style: t.style || {},
        class: t.class,
        content: (l) => {
          let {
            prefixCls: u
          } = l;
          const c = $ae[t.type], f = c ? D(c, null, null) : "", d = Re(`${u}-custom-content`, {
            [`${u}-${t.type}`]: t.type,
            [`${u}-rtl`]: Pae === !0
          });
          return D("div", {
            class: d
          }, [typeof t.icon == "function" ? t.icon() : t.icon || f, D("span", null, [typeof t.content == "function" ? t.content() : t.content])]);
        },
        onClose: o,
        onClick: t.onClick
      });
    });
  }), i = () => {
    na && na.removeNotice(n);
  };
  return i.then = (a, o) => r.then(a, o), i.promise = r, i;
}
function PVe(t) {
  return Object.prototype.toString.call(t) === "[object Object]" && !!t.content;
}
const Wh = {
  open: TVe,
  config: xVe,
  destroy(t) {
    if (na)
      if (t) {
        const {
          removeNotice: e
        } = na;
        e(t);
      } else {
        const {
          destroy: e
        } = na;
        e(), na = null;
      }
  }
};
function $Ve(t, e) {
  t[e] = (n, r, i) => PVe(n) ? t.open(k(k({}, n), {
    type: e
  })) : (typeof r == "function" && (i = r, r = void 0), t.open({
    content: n,
    duration: r,
    type: e,
    onClose: i
  }));
}
CVe.forEach((t) => $Ve(Wh, t));
Wh.warn = Wh.warning;
Wh.useMessage = _Ve;
const AVe = (t) => {
  const {
    componentCls: e,
    width: n,
    notificationMarginEdge: r
  } = t, i = new qt("antNotificationTopFadeIn", {
    "0%": {
      marginTop: "-100%",
      opacity: 0
    },
    "100%": {
      marginTop: 0,
      opacity: 1
    }
  }), a = new qt("antNotificationBottomFadeIn", {
    "0%": {
      marginBottom: "-100%",
      opacity: 0
    },
    "100%": {
      marginBottom: 0,
      opacity: 1
    }
  }), o = new qt("antNotificationLeftFadeIn", {
    "0%": {
      right: {
        _skip_check_: !0,
        value: n
      },
      opacity: 0
    },
    "100%": {
      right: {
        _skip_check_: !0,
        value: 0
      },
      opacity: 1
    }
  });
  return {
    [`&${e}-top, &${e}-bottom`]: {
      marginInline: 0
    },
    [`&${e}-top`]: {
      [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
        animationName: i
      }
    },
    [`&${e}-bottom`]: {
      [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
        animationName: a
      }
    },
    [`&${e}-topLeft, &${e}-bottomLeft`]: {
      marginInlineEnd: 0,
      marginInlineStart: r,
      [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
        animationName: o
      }
    }
  };
}, EVe = (t) => {
  const {
    iconCls: e,
    componentCls: n,
    // .ant-notification
    boxShadowSecondary: r,
    fontSizeLG: i,
    notificationMarginBottom: a,
    borderRadiusLG: o,
    colorSuccess: s,
    colorInfo: l,
    colorWarning: u,
    colorError: c,
    colorTextHeading: f,
    notificationBg: d,
    notificationPadding: h,
    notificationMarginEdge: p,
    motionDurationMid: v,
    motionEaseInOut: g,
    fontSize: m,
    lineHeight: y,
    width: _,
    notificationIconSize: O
  } = t, S = `${n}-notice`, x = new qt("antNotificationFadeIn", {
    "0%": {
      left: {
        _skip_check_: !0,
        value: _
      },
      opacity: 0
    },
    "100%": {
      left: {
        _skip_check_: !0,
        value: 0
      },
      opacity: 1
    }
  }), C = new qt("antNotificationFadeOut", {
    "0%": {
      maxHeight: t.animationMaxHeight,
      marginBottom: a,
      opacity: 1
    },
    "100%": {
      maxHeight: 0,
      marginBottom: 0,
      paddingTop: 0,
      paddingBottom: 0,
      opacity: 0
    }
  });
  return [
    // ============================ Holder ============================
    {
      [n]: k(k(k(k({}, Gn(t)), {
        position: "fixed",
        zIndex: t.zIndexPopup,
        marginInlineEnd: p,
        [`${n}-hook-holder`]: {
          position: "relative"
        },
        [`&${n}-top, &${n}-bottom`]: {
          [`${n}-notice`]: {
            marginInline: "auto auto"
          }
        },
        [`&${n}-topLeft, &${n}-bottomLeft`]: {
          [`${n}-notice`]: {
            marginInlineEnd: "auto",
            marginInlineStart: 0
          }
        },
        //  animation
        [`${n}-fade-enter, ${n}-fade-appear`]: {
          animationDuration: t.motionDurationMid,
          animationTimingFunction: g,
          animationFillMode: "both",
          opacity: 0,
          animationPlayState: "paused"
        },
        [`${n}-fade-leave`]: {
          animationTimingFunction: g,
          animationFillMode: "both",
          animationDuration: v,
          animationPlayState: "paused"
        },
        [`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]: {
          animationName: x,
          animationPlayState: "running"
        },
        [`${n}-fade-leave${n}-fade-leave-active`]: {
          animationName: C,
          animationPlayState: "running"
        }
      }), AVe(t)), {
        // RTL
        "&-rtl": {
          direction: "rtl",
          [`${n}-notice-btn`]: {
            float: "left"
          }
        }
      })
    },
    // ============================ Notice ============================
    {
      [S]: {
        position: "relative",
        width: _,
        maxWidth: `calc(100vw - ${p * 2}px)`,
        marginBottom: a,
        marginInlineStart: "auto",
        padding: h,
        overflow: "hidden",
        lineHeight: y,
        wordWrap: "break-word",
        background: d,
        borderRadius: o,
        boxShadow: r,
        [`${n}-close-icon`]: {
          fontSize: m,
          cursor: "pointer"
        },
        [`${S}-message`]: {
          marginBottom: t.marginXS,
          color: f,
          fontSize: i,
          lineHeight: t.lineHeightLG
        },
        [`${S}-description`]: {
          fontSize: m
        },
        [`&${S}-closable ${S}-message`]: {
          paddingInlineEnd: t.paddingLG
        },
        [`${S}-with-icon ${S}-message`]: {
          marginBottom: t.marginXS,
          marginInlineStart: t.marginSM + O,
          fontSize: i
        },
        [`${S}-with-icon ${S}-description`]: {
          marginInlineStart: t.marginSM + O,
          fontSize: m
        },
        // Icon & color style in different selector level
        // https://github.com/ant-design/ant-design/issues/16503
        // https://github.com/ant-design/ant-design/issues/15512
        [`${S}-icon`]: {
          position: "absolute",
          fontSize: O,
          lineHeight: 0,
          // icon-font
          [`&-success${e}`]: {
            color: s
          },
          [`&-info${e}`]: {
            color: l
          },
          [`&-warning${e}`]: {
            color: u
          },
          [`&-error${e}`]: {
            color: c
          }
        },
        [`${S}-close`]: {
          position: "absolute",
          top: t.notificationPaddingVertical,
          insetInlineEnd: t.notificationPaddingHorizontal,
          color: t.colorIcon,
          outline: "none",
          width: t.notificationCloseButtonSize,
          height: t.notificationCloseButtonSize,
          borderRadius: t.borderRadiusSM,
          transition: `background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,
          display: "flex",
          alignItems: "center",
          justifyContent: "center",
          "&:hover": {
            color: t.colorIconHover,
            backgroundColor: t.wireframe ? "transparent" : t.colorFillContent
          }
        },
        [`${S}-btn`]: {
          float: "right",
          marginTop: t.marginSM
        }
      }
    },
    // ============================= Pure =============================
    {
      [`${S}-pure-panel`]: {
        margin: 0
      }
    }
  ];
}, I8 = pr("Notification", (t) => {
  const e = t.paddingMD, n = t.paddingLG, r = bn(t, {
    // default.less variables
    notificationBg: t.colorBgElevated,
    notificationPaddingVertical: e,
    notificationPaddingHorizontal: n,
    // index.less variables
    notificationPadding: `${t.paddingMD}px ${t.paddingContentHorizontalLG}px`,
    notificationMarginBottom: t.margin,
    notificationMarginEdge: t.marginLG,
    animationMaxHeight: 150,
    notificationIconSize: t.fontSizeLG * t.lineHeightLG,
    notificationCloseButtonSize: t.controlHeightLG * 0.55
  });
  return [EVe(r)];
}, (t) => ({
  zIndexPopup: t.zIndexPopupBase + 50,
  width: 384
}));
function Aae(t, e) {
  return e || D("span", {
    class: `${t}-close-x`
  }, [D(tc, {
    class: `${t}-close-icon`
  }, null)]);
}
D(cp, null, null), D(Df, null, null), D(cs, null, null), D(Rf, null, null), D(Ql, null, null);
const MVe = {
  success: Df,
  info: cp,
  error: cs,
  warning: Rf
};
function Eae(t) {
  let {
    prefixCls: e,
    icon: n,
    type: r,
    message: i,
    description: a,
    btn: o
  } = t, s = null;
  if (n)
    s = D("span", {
      class: `${e}-icon`
    }, [$v(n)]);
  else if (r) {
    const l = MVe[r];
    s = D(l, {
      class: `${e}-icon ${e}-icon-${r}`
    }, null);
  }
  return D("div", {
    class: Re({
      [`${e}-with-icon`]: s
    }),
    role: "alert"
  }, [s, D("div", {
    class: `${e}-message`
  }, [i]), D("div", {
    class: `${e}-description`
  }, [a]), o && D("div", {
    class: `${e}-btn`
  }, [o])]);
}
ae({
  name: "PurePanel",
  inheritAttrs: !1,
  props: ["prefixCls", "icon", "type", "message", "description", "btn", "closeIcon"],
  setup(t) {
    const {
      getPrefixCls: e
    } = hn("notification", t), n = V(() => t.prefixCls || e("notification")), r = V(() => `${n.value}-notice`), [, i] = I8(n);
    return () => D(X2, te(te({}, t), {}, {
      prefixCls: n.value,
      class: Re(i.value, `${r.value}-pure-panel`),
      noticeKey: "pure",
      duration: null,
      closable: t.closable,
      closeIcon: Aae(n.value, t.closeIcon)
    }), {
      default: () => [D(Eae, {
        prefixCls: r.value,
        icon: t.icon,
        type: t.type,
        message: t.message,
        description: t.description,
        btn: t.btn
      }, null)]
    });
  }
});
function Mae(t, e, n) {
  let r;
  switch (e = typeof e == "number" ? `${e}px` : e, n = typeof n == "number" ? `${n}px` : n, t) {
    case "top":
      r = {
        left: "50%",
        transform: "translateX(-50%)",
        right: "auto",
        top: e,
        bottom: "auto"
      };
      break;
    case "topLeft":
      r = {
        left: 0,
        top: e,
        bottom: "auto"
      };
      break;
    case "topRight":
      r = {
        right: 0,
        top: e,
        bottom: "auto"
      };
      break;
    case "bottom":
      r = {
        left: "50%",
        transform: "translateX(-50%)",
        right: "auto",
        top: "auto",
        bottom: n
      };
      break;
    case "bottomLeft":
      r = {
        left: 0,
        top: "auto",
        bottom: n
      };
      break;
    default:
      r = {
        right: 0,
        top: "auto",
        bottom: n
      };
      break;
  }
  return r;
}
function IVe(t) {
  return {
    name: `${t}-fade`
  };
}
var DVe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const oH = 24, RVe = 4.5, kVe = ae({
  name: "Holder",
  inheritAttrs: !1,
  props: ["prefixCls", "class", "type", "icon", "content", "onAllRemoved"],
  setup(t, e) {
    let {
      expose: n
    } = e;
    const {
      getPrefixCls: r,
      getPopupContainer: i
    } = hn("notification", t), a = V(() => t.prefixCls || r("notification")), o = (d) => {
      var h, p;
      return Mae(d, (h = t.top) !== null && h !== void 0 ? h : oH, (p = t.bottom) !== null && p !== void 0 ? p : oH);
    }, [, s] = I8(a), l = () => Re(s.value, {
      [`${a.value}-rtl`]: t.rtl
    }), u = () => IVe(a.value), [c, f] = yae({
      prefixCls: a.value,
      getStyles: o,
      getClassName: l,
      motion: u,
      closable: !0,
      closeIcon: Aae(a.value),
      duration: RVe,
      getContainer: () => {
        var d, h;
        return ((d = t.getPopupContainer) === null || d === void 0 ? void 0 : d.call(t)) || ((h = i.value) === null || h === void 0 ? void 0 : h.call(i)) || document.body;
      },
      maxCount: t.maxCount,
      hashId: s.value,
      onAllRemoved: t.onAllRemoved
    });
    return n(k(k({}, c), {
      prefixCls: a.value,
      hashId: s
    })), f;
  }
});
function LVe(t) {
  const e = ve(null), n = Symbol("notificationHolderKey"), r = (s) => {
    if (!e.value)
      return;
    const {
      open: l,
      prefixCls: u,
      hashId: c
    } = e.value, f = `${u}-notice`, {
      message: d,
      description: h,
      icon: p,
      type: v,
      btn: g,
      class: m
    } = s, y = DVe(s, ["message", "description", "icon", "type", "btn", "class"]);
    return l(k(k({
      placement: "topRight"
    }, y), {
      content: () => D(Eae, {
        prefixCls: f,
        icon: typeof p == "function" ? p() : p,
        type: v,
        message: typeof d == "function" ? d() : d,
        description: typeof h == "function" ? h() : h,
        btn: typeof g == "function" ? g() : g
      }, null),
      // @ts-ignore
      class: Re(v && `${f}-${v}`, c, m)
    }));
  }, a = {
    open: r,
    destroy: (s) => {
      var l, u;
      s !== void 0 ? (l = e.value) === null || l === void 0 || l.close(s) : (u = e.value) === null || u === void 0 || u.destroy();
    }
  };
  return ["success", "info", "warning", "error"].forEach((s) => {
    a[s] = (l) => r(k(k({}, l), {
      type: s
    }));
  }), [a, () => D(kVe, te(te({
    key: n
  }, t), {}, {
    ref: e
  }), null)];
}
function NVe(t) {
  return LVe(t);
}
const Qd = {};
let Iae = 4.5, Dae = "24px", Rae = "24px", zR = "", kae = "topRight", Lae = () => document.body, Nae = null, VR = !1, Bae;
function BVe(t) {
  const {
    duration: e,
    placement: n,
    bottom: r,
    top: i,
    getContainer: a,
    closeIcon: o,
    prefixCls: s
  } = t;
  s !== void 0 && (zR = s), e !== void 0 && (Iae = e), n !== void 0 && (kae = n), r !== void 0 && (Rae = typeof r == "number" ? `${r}px` : r), i !== void 0 && (Dae = typeof i == "number" ? `${i}px` : i), a !== void 0 && (Lae = a), o !== void 0 && (Nae = o), t.rtl !== void 0 && (VR = t.rtl), t.maxCount !== void 0 && (Bae = t.maxCount);
}
function zVe(t, e) {
  let {
    prefixCls: n,
    placement: r = kae,
    getContainer: i = Lae,
    top: a,
    bottom: o,
    closeIcon: s = Nae,
    appContext: l
  } = t;
  const {
    getPrefixCls: u
  } = qVe(), c = u("notification", n || zR), f = `${c}-${r}-${VR}`, d = Qd[f];
  if (d) {
    Promise.resolve(d).then((p) => {
      e(p);
    });
    return;
  }
  const h = Re(`${c}-${r}`, {
    [`${c}-rtl`]: VR === !0
  });
  hC.newInstance({
    name: "notification",
    prefixCls: n || zR,
    useStyle: I8,
    class: h,
    style: Mae(r, a ?? Dae, o ?? Rae),
    appContext: l,
    getContainer: i,
    closeIcon: (p) => {
      let {
        prefixCls: v
      } = p;
      return D("span", {
        class: `${v}-close-x`
      }, [$v(s, {}, D(tc, {
        class: `${v}-close-icon`
      }, null))]);
    },
    maxCount: Bae,
    hasTransitionName: !0
  }, (p) => {
    Qd[f] = p, e(p);
  });
}
const VVe = {
  success: g8,
  info: V2,
  error: y8,
  warning: m8
};
function FVe(t) {
  const {
    icon: e,
    type: n,
    description: r,
    message: i,
    btn: a
  } = t, o = t.duration === void 0 ? Iae : t.duration;
  zVe(t, (s) => {
    s.notice({
      content: (l) => {
        let {
          prefixCls: u
        } = l;
        const c = `${u}-notice`;
        let f = null;
        if (e)
          f = () => D("span", {
            class: `${c}-icon`
          }, [$v(e)]);
        else if (n) {
          const d = VVe[n];
          f = () => D(d, {
            class: `${c}-icon ${c}-icon-${n}`
          }, null);
        }
        return D("div", {
          class: f ? `${c}-with-icon` : ""
        }, [f && f(), D("div", {
          class: `${c}-message`
        }, [!r && f ? D("span", {
          class: `${c}-message-single-line-auto-margin`
        }, null) : null, $v(i)]), D("div", {
          class: `${c}-description`
        }, [$v(r)]), a ? D("span", {
          class: `${c}-btn`
        }, [$v(a)]) : null]);
      },
      duration: o,
      closable: !0,
      onClose: t.onClose,
      onClick: t.onClick,
      key: t.key,
      style: t.style || {},
      class: t.class
    });
  });
}
const Bg = {
  open: FVe,
  close(t) {
    Object.keys(Qd).forEach((e) => Promise.resolve(Qd[e]).then((n) => {
      n.removeNotice(t);
    }));
  },
  config: BVe,
  destroy() {
    Object.keys(Qd).forEach((t) => {
      Promise.resolve(Qd[t]).then((e) => {
        e.destroy();
      }), delete Qd[t];
    });
  }
}, WVe = ["success", "info", "warning", "error"];
WVe.forEach((t) => {
  Bg[t] = (e) => Bg.open(k(k({}, e), {
    type: t
  }));
});
Bg.warn = Bg.warning;
Bg.useNotification = NVe;
const QVe = `-ant-${Date.now()}-${Math.random()}`;
function HVe(t, e) {
  const n = {}, r = (o, s) => {
    let l = o.clone();
    return l = (s == null ? void 0 : s(l)) || l, l.toRgbString();
  }, i = (o, s) => {
    const l = new Hn(o), u = Bh(l.toRgbString());
    n[`${s}-color`] = r(l), n[`${s}-color-disabled`] = u[1], n[`${s}-color-hover`] = u[4], n[`${s}-color-active`] = u[6], n[`${s}-color-outline`] = l.clone().setAlpha(0.2).toRgbString(), n[`${s}-color-deprecated-bg`] = u[0], n[`${s}-color-deprecated-border`] = u[2];
  };
  if (e.primaryColor) {
    i(e.primaryColor, "primary");
    const o = new Hn(e.primaryColor), s = Bh(o.toRgbString());
    s.forEach((u, c) => {
      n[`primary-${c + 1}`] = u;
    }), n["primary-color-deprecated-l-35"] = r(o, (u) => u.lighten(35)), n["primary-color-deprecated-l-20"] = r(o, (u) => u.lighten(20)), n["primary-color-deprecated-t-20"] = r(o, (u) => u.tint(20)), n["primary-color-deprecated-t-50"] = r(o, (u) => u.tint(50)), n["primary-color-deprecated-f-12"] = r(o, (u) => u.setAlpha(u.getAlpha() * 0.12));
    const l = new Hn(s[0]);
    n["primary-color-active-deprecated-f-30"] = r(l, (u) => u.setAlpha(u.getAlpha() * 0.3)), n["primary-color-active-deprecated-d-02"] = r(l, (u) => u.darken(2));
  }
  return e.successColor && i(e.successColor, "success"), e.warningColor && i(e.warningColor, "warning"), e.errorColor && i(e.errorColor, "error"), e.infoColor && i(e.infoColor, "info"), `
  :root {
    ${Object.keys(n).map((o) => `--${t}-${o}: ${n[o]};`).join(`
`)}
  }
  `.trim();
}
function GVe(t, e) {
  const n = HVe(t, e);
  is() ? Eb(n, `${QVe}-dynamic-theme`) : aa(!1, "ConfigProvider", "SSR do not support dynamic theme with css variables.");
}
const jVe = (t) => {
  const [e, n] = pm();
  return bR(V(() => ({
    theme: e.value,
    token: n.value,
    hashId: "",
    path: ["ant-design-icons", t.value]
  })), () => [{
    [`.${t.value}`]: k(k({}, hm()), {
      [`.${t.value} .${t.value}-icon`]: {
        display: "block"
      }
    })
  }]);
};
function ZVe(t, e) {
  const n = V(() => (t == null ? void 0 : t.value) || {}), r = V(() => n.value.inherit === !1 || !(e != null && e.value) ? pre : e.value);
  return V(() => {
    if (!(t != null && t.value))
      return e == null ? void 0 : e.value;
    const a = k({}, r.value.components);
    return Object.keys(t.value.components || {}).forEach((o) => {
      a[o] = k(k({}, a[o]), t.value.components[o]);
    }), k(k(k({}, r.value), n.value), {
      token: k(k({}, r.value.token), n.value.token),
      components: a
    });
  });
}
var UVe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const XVe = "ant";
function Hv() {
  return gi.prefixCls || XVe;
}
function zae() {
  return gi.iconPrefixCls || BN;
}
const D8 = zn({}), gi = zn({});
Vt(() => {
  k(gi, D8), gi.prefixCls = Hv(), gi.iconPrefixCls = zae(), gi.getPrefixCls = (t, e) => e || (t ? `${gi.prefixCls}-${t}` : gi.prefixCls), gi.getRootPrefixCls = () => gi.prefixCls ? gi.prefixCls : Hv();
});
let vE;
const YVe = (t) => {
  vE && vE(), vE = Vt(() => {
    k(D8, zn(t)), k(gi, zn(t));
  }), t.theme && GVe(Hv(), t.theme);
}, qVe = () => ({
  getPrefixCls: (t, e) => e || (t ? `${Hv()}-${t}` : Hv()),
  getIconPrefixCls: zae,
  getRootPrefixCls: () => gi.prefixCls ? gi.prefixCls : Hv()
}), Gv = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AConfigProvider",
  inheritAttrs: !1,
  props: dke(),
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = b2(), i = (I, B) => {
      const {
        prefixCls: Q = "ant"
      } = t;
      if (B) return B;
      const W = Q || r.getPrefixCls("");
      return I ? `${W}-${I}` : W;
    }, a = V(() => t.iconPrefixCls || r.iconPrefixCls.value || BN), o = V(() => a.value !== r.iconPrefixCls.value), s = V(() => {
      var I;
      return t.csp || ((I = r.csp) === null || I === void 0 ? void 0 : I.value);
    }), l = jVe(a), u = ZVe(V(() => t.theme), V(() => {
      var I;
      return (I = r.theme) === null || I === void 0 ? void 0 : I.value;
    })), c = (I) => (t.renderEmpty || n.renderEmpty || r.renderEmpty || ZLe)(I), f = V(() => {
      var I, B;
      return (I = t.autoInsertSpaceInButton) !== null && I !== void 0 ? I : (B = r.autoInsertSpaceInButton) === null || B === void 0 ? void 0 : B.value;
    }), d = V(() => {
      var I;
      return t.locale || ((I = r.locale) === null || I === void 0 ? void 0 : I.value);
    });
    me(d, () => {
      D8.locale = d.value;
    }, {
      immediate: !0
    });
    const h = V(() => {
      var I;
      return t.direction || ((I = r.direction) === null || I === void 0 ? void 0 : I.value);
    }), p = V(() => {
      var I, B;
      return (I = t.space) !== null && I !== void 0 ? I : (B = r.space) === null || B === void 0 ? void 0 : B.value;
    }), v = V(() => {
      var I, B;
      return (I = t.virtual) !== null && I !== void 0 ? I : (B = r.virtual) === null || B === void 0 ? void 0 : B.value;
    }), g = V(() => {
      var I, B;
      return (I = t.dropdownMatchSelectWidth) !== null && I !== void 0 ? I : (B = r.dropdownMatchSelectWidth) === null || B === void 0 ? void 0 : B.value;
    }), m = V(() => {
      var I;
      return t.getTargetContainer !== void 0 ? t.getTargetContainer : (I = r.getTargetContainer) === null || I === void 0 ? void 0 : I.value;
    }), y = V(() => {
      var I;
      return t.getPopupContainer !== void 0 ? t.getPopupContainer : (I = r.getPopupContainer) === null || I === void 0 ? void 0 : I.value;
    }), _ = V(() => {
      var I;
      return t.pageHeader !== void 0 ? t.pageHeader : (I = r.pageHeader) === null || I === void 0 ? void 0 : I.value;
    }), O = V(() => {
      var I;
      return t.input !== void 0 ? t.input : (I = r.input) === null || I === void 0 ? void 0 : I.value;
    }), S = V(() => {
      var I;
      return t.pagination !== void 0 ? t.pagination : (I = r.pagination) === null || I === void 0 ? void 0 : I.value;
    }), x = V(() => {
      var I;
      return t.form !== void 0 ? t.form : (I = r.form) === null || I === void 0 ? void 0 : I.value;
    }), C = V(() => {
      var I;
      return t.select !== void 0 ? t.select : (I = r.select) === null || I === void 0 ? void 0 : I.value;
    }), P = V(() => t.componentSize), $ = V(() => t.componentDisabled), T = V(() => {
      var I, B;
      return (I = t.wave) !== null && I !== void 0 ? I : (B = r.wave) === null || B === void 0 ? void 0 : B.value;
    }), E = {
      csp: s,
      autoInsertSpaceInButton: f,
      locale: d,
      direction: h,
      space: p,
      virtual: v,
      dropdownMatchSelectWidth: g,
      getPrefixCls: i,
      iconPrefixCls: a,
      theme: V(() => {
        var I, B;
        return (I = u.value) !== null && I !== void 0 ? I : (B = r.theme) === null || B === void 0 ? void 0 : B.value;
      }),
      renderEmpty: c,
      getTargetContainer: m,
      getPopupContainer: y,
      pageHeader: _,
      input: O,
      pagination: S,
      form: x,
      select: C,
      componentSize: P,
      componentDisabled: $,
      transformCellText: V(() => t.transformCellText),
      wave: T
    }, M = V(() => {
      const I = u.value || {}, {
        algorithm: B,
        token: Q
      } = I, W = UVe(I, ["algorithm", "token"]), H = B && (!Array.isArray(B) || B.length > 0) ? Kne(B) : void 0;
      return k(k({}, W), {
        theme: H,
        token: k(k({}, C2), Q)
      });
    }), R = V(() => {
      var I, B;
      let Q = {};
      return d.value && (Q = ((I = d.value.Form) === null || I === void 0 ? void 0 : I.defaultValidateMessages) || ((B = Nu.Form) === null || B === void 0 ? void 0 : B.defaultValidateMessages) || {}), t.form && t.form.validateMessages && (Q = k(k({}, Q), t.form.validateMessages)), Q;
    });
    hke(E), cke({
      validateMessages: R
    }), Sre(P), zne($);
    const N = (I) => {
      var B, Q;
      let W = o.value ? l((B = n.default) === null || B === void 0 ? void 0 : B.call(n)) : (Q = n.default) === null || Q === void 0 ? void 0 : Q.call(n);
      if (t.theme) {
        const H = /* @__PURE__ */ function() {
          return W;
        }();
        W = D(WLe, {
          value: M.value
        }, {
          default: () => [H]
        });
      }
      return D(iVe, {
        locale: d.value || I,
        ANT_MARK__: BR
      }, {
        default: () => [W]
      });
    };
    return Vt(() => {
      h.value && (Wh.config({
        rtl: h.value === "rtl"
      }), Bg.config({
        rtl: h.value === "rtl"
      }));
    }), () => D(Fne, {
      children: (I, B, Q) => N(Q)
    }, null);
  }
});
Gv.config = YVe;
Gv.install = function(t) {
  t.component(Gv.name, Gv);
};
const KVe = (t) => {
  const {
    componentCls: e,
    sizePaddingEdgeHorizontal: n,
    colorSplit: r,
    lineWidth: i
  } = t;
  return {
    [e]: k(k({}, Gn(t)), {
      borderBlockStart: `${i}px solid ${r}`,
      // vertical
      "&-vertical": {
        position: "relative",
        top: "-0.06em",
        display: "inline-block",
        height: "0.9em",
        margin: `0 ${t.dividerVerticalGutterMargin}px`,
        verticalAlign: "middle",
        borderTop: 0,
        borderInlineStart: `${i}px solid ${r}`
      },
      "&-horizontal": {
        display: "flex",
        clear: "both",
        width: "100%",
        minWidth: "100%",
        margin: `${t.dividerHorizontalGutterMargin}px 0`
      },
      [`&-horizontal${e}-with-text`]: {
        display: "flex",
        alignItems: "center",
        margin: `${t.dividerHorizontalWithTextGutterMargin}px 0`,
        color: t.colorTextHeading,
        fontWeight: 500,
        fontSize: t.fontSizeLG,
        whiteSpace: "nowrap",
        textAlign: "center",
        borderBlockStart: `0 ${r}`,
        "&::before, &::after": {
          position: "relative",
          width: "50%",
          borderBlockStart: `${i}px solid transparent`,
          // Chrome not accept `inherit` in `border-top`
          borderBlockStartColor: "inherit",
          borderBlockEnd: 0,
          transform: "translateY(50%)",
          content: "''"
        }
      },
      [`&-horizontal${e}-with-text-left`]: {
        "&::before": {
          width: "5%"
        },
        "&::after": {
          width: "95%"
        }
      },
      [`&-horizontal${e}-with-text-right`]: {
        "&::before": {
          width: "95%"
        },
        "&::after": {
          width: "5%"
        }
      },
      [`${e}-inner-text`]: {
        display: "inline-block",
        padding: "0 1em"
      },
      "&-dashed": {
        background: "none",
        borderColor: r,
        borderStyle: "dashed",
        borderWidth: `${i}px 0 0`
      },
      [`&-horizontal${e}-with-text${e}-dashed`]: {
        "&::before, &::after": {
          borderStyle: "dashed none none"
        }
      },
      [`&-vertical${e}-dashed`]: {
        borderInlineStartWidth: i,
        borderInlineEnd: 0,
        borderBlockStart: 0,
        borderBlockEnd: 0
      },
      [`&-plain${e}-with-text`]: {
        color: t.colorText,
        fontWeight: "normal",
        fontSize: t.fontSize
      },
      [`&-horizontal${e}-with-text-left${e}-no-default-orientation-margin-left`]: {
        "&::before": {
          width: 0
        },
        "&::after": {
          width: "100%"
        },
        [`${e}-inner-text`]: {
          paddingInlineStart: n
        }
      },
      [`&-horizontal${e}-with-text-right${e}-no-default-orientation-margin-right`]: {
        "&::before": {
          width: "100%"
        },
        "&::after": {
          width: 0
        },
        [`${e}-inner-text`]: {
          paddingInlineEnd: n
        }
      }
    })
  };
}, JVe = pr("Divider", (t) => {
  const e = bn(t, {
    dividerVerticalGutterMargin: t.marginXS,
    dividerHorizontalWithTextGutterMargin: t.margin,
    dividerHorizontalGutterMargin: t.marginLG
  });
  return [KVe(e)];
}, {
  sizePaddingEdgeHorizontal: 0
}), eFe = () => ({
  prefixCls: String,
  type: {
    type: String,
    default: "horizontal"
  },
  dashed: {
    type: Boolean,
    default: !1
  },
  orientation: {
    type: String,
    default: "center"
  },
  plain: {
    type: Boolean,
    default: !1
  },
  orientationMargin: [String, Number]
}), tFe = ae({
  name: "ADivider",
  inheritAttrs: !1,
  compatConfig: {
    MODE: 3
  },
  props: eFe(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const {
      prefixCls: i,
      direction: a
    } = hn("divider", t), [o, s] = JVe(i), l = V(() => t.orientation === "left" && t.orientationMargin != null), u = V(() => t.orientation === "right" && t.orientationMargin != null), c = V(() => {
      const {
        type: h,
        dashed: p,
        plain: v
      } = t, g = i.value;
      return {
        [g]: !0,
        [s.value]: !!s.value,
        [`${g}-${h}`]: !0,
        [`${g}-dashed`]: !!p,
        [`${g}-plain`]: !!v,
        [`${g}-rtl`]: a.value === "rtl",
        [`${g}-no-default-orientation-margin-left`]: l.value,
        [`${g}-no-default-orientation-margin-right`]: u.value
      };
    }), f = V(() => {
      const h = typeof t.orientationMargin == "number" ? `${t.orientationMargin}px` : t.orientationMargin;
      return k(k({}, l.value && {
        marginLeft: h
      }), u.value && {
        marginRight: h
      });
    }), d = V(() => t.orientation.length > 0 ? "-" + t.orientation : t.orientation);
    return () => {
      var h;
      const p = qr((h = n.default) === null || h === void 0 ? void 0 : h.call(n));
      return o(D("div", te(te({}, r), {}, {
        class: [c.value, p.length ? `${i.value}-with-text ${i.value}-with-text${d.value}` : "", r.class],
        role: "separator"
      }), [p.length ? D("span", {
        class: `${i.value}-inner-text`,
        style: f.value
      }, [p]) : null]));
    };
  }
}), nFe = fm(tFe), Hy = (t) => t != null && (Array.isArray(t) ? Zl(t).length : !0);
function R8(t) {
  return Hy(t.prefix) || Hy(t.suffix) || Hy(t.allowClear);
}
function tw(t) {
  return Hy(t.addonBefore) || Hy(t.addonAfter);
}
function FR(t) {
  return typeof t > "u" || t === null ? "" : String(t);
}
function Gy(t, e, n, r) {
  if (!n)
    return;
  const i = e;
  if (e.type === "click") {
    Object.defineProperty(i, "target", {
      writable: !0
    }), Object.defineProperty(i, "currentTarget", {
      writable: !0
    });
    const a = t.cloneNode(!0);
    i.target = a, i.currentTarget = a, a.value = "", n(i);
    return;
  }
  if (r !== void 0) {
    Object.defineProperty(i, "target", {
      writable: !0
    }), Object.defineProperty(i, "currentTarget", {
      writable: !0
    }), i.target = t, i.currentTarget = t, t.value = r, n(i);
    return;
  }
  n(i);
}
function Vae(t, e) {
  if (!t) return;
  t.focus(e);
  const {
    cursor: n
  } = e || {};
  if (n) {
    const r = t.value.length;
    switch (n) {
      case "start":
        t.setSelectionRange(0, 0);
        break;
      case "end":
        t.setSelectionRange(r, r);
        break;
      default:
        t.setSelectionRange(0, r);
    }
  }
}
const rFe = () => ({
  addonBefore: oe.any,
  addonAfter: oe.any,
  prefix: oe.any,
  suffix: oe.any,
  clearIcon: oe.any,
  affixWrapperClassName: String,
  groupClassName: String,
  wrapperClassName: String,
  inputClassName: String,
  allowClear: {
    type: Boolean,
    default: void 0
  }
}), Fae = () => k(k({}, rFe()), {
  value: {
    type: [String, Number, Symbol],
    default: void 0
  },
  defaultValue: {
    type: [String, Number, Symbol],
    default: void 0
  },
  inputElement: oe.any,
  prefixCls: String,
  disabled: {
    type: Boolean,
    default: void 0
  },
  focused: {
    type: Boolean,
    default: void 0
  },
  triggerFocus: Function,
  readonly: {
    type: Boolean,
    default: void 0
  },
  handleReset: Function,
  hidden: {
    type: Boolean,
    default: void 0
  }
}), Wae = () => k(k({}, Fae()), {
  id: String,
  placeholder: {
    type: [String, Number]
  },
  autocomplete: String,
  type: rr("text"),
  name: String,
  size: {
    type: String
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  lazy: {
    type: Boolean,
    default: !0
  },
  maxlength: Number,
  loading: {
    type: Boolean,
    default: void 0
  },
  bordered: {
    type: Boolean,
    default: void 0
  },
  showCount: {
    type: [Boolean, Object]
  },
  htmlSize: Number,
  onPressEnter: Function,
  onKeydown: Function,
  onKeyup: Function,
  onFocus: Function,
  onBlur: Function,
  onChange: Function,
  onInput: Function,
  "onUpdate:value": Function,
  onCompositionstart: Function,
  onCompositionend: Function,
  valueModifiers: Object,
  hidden: {
    type: Boolean,
    default: void 0
  },
  status: String
}), iFe = ae({
  name: "BaseInput",
  inheritAttrs: !1,
  props: Fae(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const i = ee(), a = (s) => {
      var l;
      if (!((l = i.value) === null || l === void 0) && l.contains(s.target)) {
        const {
          triggerFocus: u
        } = t;
        u == null || u();
      }
    }, o = () => {
      var s;
      const {
        allowClear: l,
        value: u,
        disabled: c,
        readonly: f,
        handleReset: d,
        suffix: h = n.suffix,
        prefixCls: p
      } = t;
      if (!l)
        return null;
      const v = !c && !f && u, g = `${p}-clear-icon`, m = ((s = n.clearIcon) === null || s === void 0 ? void 0 : s.call(n)) || "*";
      return D("span", {
        onClick: d,
        onMousedown: (y) => y.preventDefault(),
        class: Re({
          [`${g}-hidden`]: !v,
          [`${g}-has-suffix`]: !!h
        }, g),
        role: "button",
        tabindex: -1
      }, [m]);
    };
    return () => {
      var s, l;
      const {
        focused: u,
        value: c,
        disabled: f,
        allowClear: d,
        readonly: h,
        hidden: p,
        prefixCls: v,
        prefix: g = (s = n.prefix) === null || s === void 0 ? void 0 : s.call(n),
        suffix: m = (l = n.suffix) === null || l === void 0 ? void 0 : l.call(n),
        addonAfter: y = n.addonAfter,
        addonBefore: _ = n.addonBefore,
        inputElement: O,
        affixWrapperClassName: S,
        wrapperClassName: x,
        groupClassName: C
      } = t;
      let P = Or(O, {
        value: c,
        hidden: p
      });
      if (R8({
        prefix: g,
        suffix: m,
        allowClear: d
      })) {
        const $ = `${v}-affix-wrapper`, T = Re($, {
          [`${$}-disabled`]: f,
          [`${$}-focused`]: u,
          [`${$}-readonly`]: h,
          [`${$}-input-with-clear-btn`]: m && d && c
        }, !tw({
          addonAfter: y,
          addonBefore: _
        }) && r.class, S), E = (m || d) && D("span", {
          class: `${v}-suffix`
        }, [o(), m]);
        P = D("span", {
          class: T,
          style: r.style,
          hidden: !tw({
            addonAfter: y,
            addonBefore: _
          }) && p,
          onMousedown: a,
          ref: i
        }, [g && D("span", {
          class: `${v}-prefix`
        }, [g]), Or(O, {
          style: null,
          value: c,
          hidden: null
        }), E]);
      }
      if (tw({
        addonAfter: y,
        addonBefore: _
      })) {
        const $ = `${v}-group`, T = `${$}-addon`, E = Re(`${v}-wrapper`, $, x), M = Re(`${v}-group-wrapper`, r.class, C);
        return D("span", {
          class: M,
          style: r.style,
          hidden: p
        }, [D("span", {
          class: E
        }, [_ && D("span", {
          class: T
        }, [_]), Or(P, {
          style: null,
          hidden: null
        }), y && D("span", {
          class: T
        }, [y])])]);
      }
      return P;
    };
  }
});
var aFe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const oFe = ae({
  name: "VCInput",
  inheritAttrs: !1,
  props: Wae(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      expose: i,
      emit: a
    } = e;
    const o = ve(t.value === void 0 ? t.defaultValue : t.value), s = ve(!1), l = ve(), u = ve();
    me(() => t.value, () => {
      o.value = t.value;
    }), me(() => t.disabled, () => {
      t.disabled && (s.value = !1);
    });
    const c = (C) => {
      l.value && Vae(l.value.input, C);
    }, f = () => {
      var C;
      (C = l.value.input) === null || C === void 0 || C.blur();
    }, d = (C, P, $) => {
      var T;
      (T = l.value.input) === null || T === void 0 || T.setSelectionRange(C, P, $);
    }, h = () => {
      var C;
      (C = l.value.input) === null || C === void 0 || C.select();
    };
    i({
      focus: c,
      blur: f,
      input: V(() => {
        var C;
        return (C = l.value.input) === null || C === void 0 ? void 0 : C.input;
      }),
      stateValue: o,
      setSelectionRange: d,
      select: h
    });
    const p = (C) => {
      a("change", C);
    }, v = (C, P) => {
      o.value !== C && (t.value === void 0 ? o.value = C : Bt(() => {
        var $;
        l.value.input.value !== o.value && (($ = u.value) === null || $ === void 0 || $.$forceUpdate());
      }), Bt(() => {
        P && P();
      }));
    }, g = (C) => {
      const {
        value: P
      } = C.target;
      if (o.value === P) return;
      const $ = C.target.value;
      Gy(l.value.input, C, p), v($);
    }, m = (C) => {
      C.keyCode === 13 && a("pressEnter", C), a("keydown", C);
    }, y = (C) => {
      s.value = !0, a("focus", C);
    }, _ = (C) => {
      s.value = !1, a("blur", C);
    }, O = (C) => {
      Gy(l.value.input, C, p), v("", () => {
        c();
      });
    }, S = () => {
      var C, P;
      const {
        addonBefore: $ = n.addonBefore,
        addonAfter: T = n.addonAfter,
        disabled: E,
        valueModifiers: M = {},
        htmlSize: R,
        autocomplete: N,
        prefixCls: I,
        inputClassName: B,
        prefix: Q = (C = n.prefix) === null || C === void 0 ? void 0 : C.call(n),
        suffix: W = (P = n.suffix) === null || P === void 0 ? void 0 : P.call(n),
        allowClear: H,
        type: U = "text"
      } = t, j = si(t, [
        "prefixCls",
        "onPressEnter",
        "addonBefore",
        "addonAfter",
        "prefix",
        "suffix",
        "allowClear",
        // Input elements must be either controlled or uncontrolled,
        // specify either the value prop, or the defaultValue prop, but not both.
        "defaultValue",
        "size",
        "bordered",
        "htmlSize",
        "lazy",
        "showCount",
        "valueModifiers",
        "showCount",
        "affixWrapperClassName",
        "groupClassName",
        "inputClassName",
        "wrapperClassName"
      ]), Y = k(k(k({}, j), r), {
        autocomplete: N,
        onChange: g,
        onInput: g,
        onFocus: y,
        onBlur: _,
        onKeydown: m,
        class: Re(I, {
          [`${I}-disabled`]: E
        }, B, !tw({
          addonAfter: T,
          addonBefore: $
        }) && !R8({
          prefix: Q,
          suffix: W,
          allowClear: H
        }) && r.class),
        ref: l,
        key: "ant-input",
        size: R,
        type: U,
        lazy: t.lazy
      });
      return M.lazy && delete Y.onInput, Y.autofocus || delete Y.autofocus, D(t8, si(Y, ["size"]), null);
    }, x = () => {
      var C;
      const {
        maxlength: P,
        suffix: $ = (C = n.suffix) === null || C === void 0 ? void 0 : C.call(n),
        showCount: T,
        prefixCls: E
      } = t, M = Number(P) > 0;
      if ($ || T) {
        const R = [...FR(o.value)].length, N = typeof T == "object" ? T.formatter({
          count: R,
          maxlength: P
        }) : `${R}${M ? ` / ${P}` : ""}`;
        return D(Wt, null, [!!T && D("span", {
          class: Re(`${E}-show-count-suffix`, {
            [`${E}-show-count-has-suffix`]: !!$
          })
        }, [N]), $]);
      }
      return null;
    };
    return _t(() => {
      process.env.NODE_ENV === "test" && t.autofocus && c();
    }), () => {
      const {
        prefixCls: C,
        disabled: P
      } = t, $ = aFe(t, ["prefixCls", "disabled"]);
      return D(iFe, te(te(te({}, $), r), {}, {
        ref: u,
        prefixCls: C,
        inputElement: S(),
        handleReset: O,
        value: FR(o.value),
        focused: s.value,
        triggerFocus: c,
        suffix: x(),
        disabled: P
      }), n);
    };
  }
}), Y2 = () => si(Wae(), ["wrapperClassName", "groupClassName", "inputClassName", "affixWrapperClassName"]), Qae = () => k(k({}, si(Y2(), ["prefix", "addonBefore", "addonAfter", "suffix"])), {
  rows: Number,
  autosize: {
    type: [Boolean, Object],
    default: void 0
  },
  autoSize: {
    type: [Boolean, Object],
    default: void 0
  },
  onResize: {
    type: Function
  },
  onCompositionstart: Uw(),
  onCompositionend: Uw(),
  valueModifiers: Object
});
var sFe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const Cr = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AInput",
  inheritAttrs: !1,
  props: Y2(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      expose: i,
      emit: a
    } = e;
    const o = ee(), s = Ul(), l = Qs.useInject(), u = V(() => U_(l.status, t.status)), {
      direction: c,
      prefixCls: f,
      size: d,
      autocomplete: h
    } = hn("input", t), {
      compactSize: p,
      compactItemClassnames: v
    } = L2(f, c), g = V(() => p.value || d.value), [m, y] = C8(f), _ = Vl();
    i({
      focus: (R) => {
        var N;
        (N = o.value) === null || N === void 0 || N.focus(R);
      },
      blur: () => {
        var R;
        (R = o.value) === null || R === void 0 || R.blur();
      },
      input: o,
      setSelectionRange: (R, N, I) => {
        var B;
        (B = o.value) === null || B === void 0 || B.setSelectionRange(R, N, I);
      },
      select: () => {
        var R;
        (R = o.value) === null || R === void 0 || R.select();
      }
    });
    const P = ee([]), $ = () => {
      P.value.push(setTimeout(() => {
        var R, N, I, B;
        !((R = o.value) === null || R === void 0) && R.input && ((N = o.value) === null || N === void 0 ? void 0 : N.input.getAttribute("type")) === "password" && (!((I = o.value) === null || I === void 0) && I.input.hasAttribute("value")) && ((B = o.value) === null || B === void 0 || B.input.removeAttribute("value"));
      }));
    };
    _t(() => {
      $();
    }), Mee(() => {
      P.value.forEach((R) => clearTimeout(R));
    }), Qt(() => {
      P.value.forEach((R) => clearTimeout(R));
    });
    const T = (R) => {
      $(), a("blur", R), s.onFieldBlur();
    }, E = (R) => {
      $(), a("focus", R);
    }, M = (R) => {
      a("update:value", R.target.value), a("change", R), a("input", R), s.onFieldChange();
    };
    return () => {
      var R, N, I, B, Q, W;
      const {
        hasFeedback: H,
        feedbackIcon: U
      } = l, {
        allowClear: j,
        bordered: Y = !0,
        prefix: ne = (R = n.prefix) === null || R === void 0 ? void 0 : R.call(n),
        suffix: fe = (N = n.suffix) === null || N === void 0 ? void 0 : N.call(n),
        addonAfter: ue = (I = n.addonAfter) === null || I === void 0 ? void 0 : I.call(n),
        addonBefore: ye = (B = n.addonBefore) === null || B === void 0 ? void 0 : B.call(n),
        id: se = (Q = s.id) === null || Q === void 0 ? void 0 : Q.value
      } = t, he = sFe(t, ["allowClear", "bordered", "prefix", "suffix", "addonAfter", "addonBefore", "id"]), re = (H || fe) && D(Wt, null, [fe, H && U]), q = f.value, K = R8({
        prefix: ne,
        suffix: fe
      }) || !!H, de = n.clearIcon || (() => D(cs, null, null));
      return m(D(oFe, te(te(te({}, r), si(he, ["onUpdate:value", "onChange", "onInput"])), {}, {
        onChange: M,
        id: se,
        disabled: (W = t.disabled) !== null && W !== void 0 ? W : _.value,
        ref: o,
        prefixCls: q,
        autocomplete: h.value,
        onBlur: T,
        onFocus: E,
        prefix: ne,
        suffix: re,
        allowClear: j,
        addonAfter: ue && D(iC, null, {
          default: () => [D(rC, null, {
            default: () => [ue]
          })]
        }),
        addonBefore: ye && D(iC, null, {
          default: () => [D(rC, null, {
            default: () => [ye]
          })]
        }),
        class: [r.class, v.value],
        inputClassName: Re({
          [`${q}-sm`]: g.value === "small",
          [`${q}-lg`]: g.value === "large",
          [`${q}-rtl`]: c.value === "rtl",
          [`${q}-borderless`]: !Y
        }, !K && Eu(q, u.value), y.value),
        affixWrapperClassName: Re({
          [`${q}-affix-wrapper-sm`]: g.value === "small",
          [`${q}-affix-wrapper-lg`]: g.value === "large",
          [`${q}-affix-wrapper-rtl`]: c.value === "rtl",
          [`${q}-affix-wrapper-borderless`]: !Y
        }, Eu(`${q}-affix-wrapper`, u.value, H), y.value),
        wrapperClassName: Re({
          [`${q}-group-rtl`]: c.value === "rtl"
        }, y.value),
        groupClassName: Re({
          [`${q}-group-wrapper-sm`]: g.value === "small",
          [`${q}-group-wrapper-lg`]: g.value === "large",
          [`${q}-group-wrapper-rtl`]: c.value === "rtl"
        }, Eu(`${q}-group-wrapper`, u.value, H), y.value)
      }), k(k({}, n), {
        clearIcon: de
      })));
    };
  }
}), lFe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AInputGroup",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    size: {
      type: String
    },
    compact: {
      type: Boolean,
      default: void 0
    }
  },
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const {
      prefixCls: i,
      direction: a,
      getPrefixCls: o
    } = hn("input-group", t), s = Qs.useInject();
    Qs.useProvide(s, {
      isFormItemInput: !1
    });
    const l = V(() => o("input")), [u, c] = C8(l), f = V(() => {
      const d = i.value;
      return {
        [`${d}`]: !0,
        [c.value]: !0,
        [`${d}-lg`]: t.size === "large",
        [`${d}-sm`]: t.size === "small",
        [`${d}-compact`]: t.compact,
        [`${d}-rtl`]: a.value === "rtl"
      };
    });
    return () => {
      var d;
      return u(D("span", te(te({}, r), {}, {
        class: Re(f.value, r.class)
      }), [(d = n.default) === null || d === void 0 ? void 0 : d.call(n)]));
    };
  }
});
var uFe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const cFe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AInputSearch",
  inheritAttrs: !1,
  props: k(k({}, Y2()), {
    inputPrefixCls: String,
    // 不能设置默认值 https://github.com/vueComponent/ant-design-vue/issues/1916
    enterButton: oe.any,
    onSearch: {
      type: Function
    }
  }),
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      expose: i,
      emit: a
    } = e;
    const o = ve(), s = ve(!1);
    i({
      focus: () => {
        var S;
        (S = o.value) === null || S === void 0 || S.focus();
      },
      blur: () => {
        var S;
        (S = o.value) === null || S === void 0 || S.blur();
      }
    });
    const c = (S) => {
      a("update:value", S.target.value), S && S.target && S.type === "click" && a("search", S.target.value, S), a("change", S);
    }, f = (S) => {
      var x;
      document.activeElement === ((x = o.value) === null || x === void 0 ? void 0 : x.input) && S.preventDefault();
    }, d = (S) => {
      var x, C;
      a("search", (C = (x = o.value) === null || x === void 0 ? void 0 : x.input) === null || C === void 0 ? void 0 : C.stateValue, S);
    }, h = (S) => {
      s.value || t.loading || d(S);
    }, p = (S) => {
      s.value = !0, a("compositionstart", S);
    }, v = (S) => {
      s.value = !1, a("compositionend", S);
    }, {
      prefixCls: g,
      getPrefixCls: m,
      direction: y,
      size: _
    } = hn("input-search", t), O = V(() => m("input", t.inputPrefixCls));
    return () => {
      var S, x, C, P;
      const {
        disabled: $,
        loading: T,
        addonAfter: E = (S = n.addonAfter) === null || S === void 0 ? void 0 : S.call(n),
        suffix: M = (x = n.suffix) === null || x === void 0 ? void 0 : x.call(n)
      } = t, R = uFe(t, ["disabled", "loading", "addonAfter", "suffix"]);
      let {
        enterButton: N = (P = (C = n.enterButton) === null || C === void 0 ? void 0 : C.call(n)) !== null && P !== void 0 ? P : !1
      } = t;
      N = N || N === "";
      const I = typeof N == "boolean" ? D(R2, null, null) : null, B = `${g.value}-button`, Q = Array.isArray(N) ? N[0] : N;
      let W;
      const H = Q.type && uN(Q.type) && Q.type.__ANT_BUTTON;
      if (H || Q.tagName === "button")
        W = Or(Q, k({
          onMousedown: f,
          onClick: d,
          key: "enterButton"
        }, H ? {
          class: B,
          size: _.value
        } : {}), !1);
      else {
        const j = I && !N;
        W = D(ra, {
          class: B,
          type: N ? "primary" : void 0,
          size: _.value,
          disabled: $,
          key: "enterButton",
          onMousedown: f,
          onClick: d,
          loading: T,
          icon: j ? I : null
        }, {
          default: () => [j ? null : I || N]
        });
      }
      E && (W = [W, E]);
      const U = Re(g.value, {
        [`${g.value}-rtl`]: y.value === "rtl",
        [`${g.value}-${_.value}`]: !!_.value,
        [`${g.value}-with-button`]: !!N
      }, r.class);
      return D(Cr, te(te(te({
        ref: o
      }, si(R, ["onUpdate:value", "onSearch", "enterButton"])), r), {}, {
        onPressEnter: h,
        onCompositionstart: p,
        onCompositionend: v,
        size: _.value,
        prefixCls: O.value,
        addonAfter: W,
        suffix: M,
        onChange: c,
        class: U,
        disabled: $
      }), n);
    };
  }
}), sH = (t) => t != null && (Array.isArray(t) ? Zl(t).length : !0);
function fFe(t) {
  return sH(t.addonBefore) || sH(t.addonAfter);
}
const dFe = ["text", "input"], hFe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ClearableLabeledInput",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    inputType: oe.oneOf(pf("text", "input")),
    value: Fo(),
    defaultValue: Fo(),
    allowClear: {
      type: Boolean,
      default: void 0
    },
    element: Fo(),
    handleReset: Function,
    disabled: {
      type: Boolean,
      default: void 0
    },
    direction: {
      type: String
    },
    size: {
      type: String
    },
    suffix: Fo(),
    prefix: Fo(),
    addonBefore: Fo(),
    addonAfter: Fo(),
    readonly: {
      type: Boolean,
      default: void 0
    },
    focused: {
      type: Boolean,
      default: void 0
    },
    bordered: {
      type: Boolean,
      default: !0
    },
    triggerFocus: {
      type: Function
    },
    hidden: Boolean,
    status: String,
    hashId: String
  },
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const i = Qs.useInject(), a = (s) => {
      const {
        value: l,
        disabled: u,
        readonly: c,
        handleReset: f,
        suffix: d = n.suffix
      } = t, h = !u && !c && l, p = `${s}-clear-icon`;
      return D(cs, {
        onClick: f,
        onMousedown: (v) => v.preventDefault(),
        class: Re({
          [`${p}-hidden`]: !h,
          [`${p}-has-suffix`]: !!d
        }, p),
        role: "button"
      }, null);
    }, o = (s, l) => {
      const {
        value: u,
        allowClear: c,
        direction: f,
        bordered: d,
        hidden: h,
        status: p,
        addonAfter: v = n.addonAfter,
        addonBefore: g = n.addonBefore,
        hashId: m
      } = t, {
        status: y,
        hasFeedback: _
      } = i;
      if (!c)
        return Or(l, {
          value: u,
          disabled: t.disabled
        });
      const O = Re(`${s}-affix-wrapper`, `${s}-affix-wrapper-textarea-with-clear-btn`, Eu(`${s}-affix-wrapper`, U_(y, p), _), {
        [`${s}-affix-wrapper-rtl`]: f === "rtl",
        [`${s}-affix-wrapper-borderless`]: !d,
        // className will go to addon wrapper
        [`${r.class}`]: !fFe({
          addonAfter: v,
          addonBefore: g
        }) && r.class
      }, m);
      return D("span", {
        class: O,
        style: r.style,
        hidden: h
      }, [Or(l, {
        style: null,
        value: u,
        disabled: t.disabled
      }), a(s)]);
    };
    return () => {
      var s;
      const {
        prefixCls: l,
        inputType: u,
        element: c = (s = n.element) === null || s === void 0 ? void 0 : s.call(n)
      } = t;
      return u === dFe[0] ? o(l, c) : null;
    };
  }
}), pFe = `
  min-height:0 !important;
  max-height:none !important;
  height:0 !important;
  visibility:hidden !important;
  overflow:hidden !important;
  position:absolute !important;
  z-index:-1000 !important;
  top:0 !important;
  right:0 !important;
  pointer-events: none !important;
`, vFe = ["letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "font-variant", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing", "word-break", "white-space"], gE = {};
let Ao;
function gFe(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = t.getAttribute("id") || t.getAttribute("data-reactid") || t.getAttribute("name");
  if (e && gE[n])
    return gE[n];
  const r = window.getComputedStyle(t), i = r.getPropertyValue("box-sizing") || r.getPropertyValue("-moz-box-sizing") || r.getPropertyValue("-webkit-box-sizing"), a = parseFloat(r.getPropertyValue("padding-bottom")) + parseFloat(r.getPropertyValue("padding-top")), o = parseFloat(r.getPropertyValue("border-bottom-width")) + parseFloat(r.getPropertyValue("border-top-width")), l = {
    sizingStyle: vFe.map((u) => `${u}:${r.getPropertyValue(u)}`).join(";"),
    paddingSize: a,
    borderSize: o,
    boxSizing: i
  };
  return e && n && (gE[n] = l), l;
}
function mFe(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
  Ao || (Ao = document.createElement("textarea"), Ao.setAttribute("tab-index", "-1"), Ao.setAttribute("aria-hidden", "true"), document.body.appendChild(Ao)), t.getAttribute("wrap") ? Ao.setAttribute("wrap", t.getAttribute("wrap")) : Ao.removeAttribute("wrap");
  const {
    paddingSize: i,
    borderSize: a,
    boxSizing: o,
    sizingStyle: s
  } = gFe(t, e);
  Ao.setAttribute("style", `${s};${pFe}`), Ao.value = t.value || t.placeholder || "";
  let l, u, c, f = Ao.scrollHeight;
  if (o === "border-box" ? f += a : o === "content-box" && (f -= i), n !== null || r !== null) {
    Ao.value = " ";
    const h = Ao.scrollHeight - i;
    n !== null && (l = h * n, o === "border-box" && (l = l + i + a), f = Math.max(l, f)), r !== null && (u = h * r, o === "border-box" && (u = u + i + a), c = f > u ? "" : "hidden", f = Math.min(u, f));
  }
  const d = {
    height: `${f}px`,
    overflowY: c,
    resize: "none"
  };
  return l && (d.minHeight = `${l}px`), u && (d.maxHeight = `${u}px`), d;
}
const mE = 0, yE = 1, bE = 2, yFe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ResizableTextArea",
  inheritAttrs: !1,
  props: Qae(),
  setup(t, e) {
    let {
      attrs: n,
      emit: r,
      expose: i
    } = e, a, o;
    const s = ee(), l = ee({}), u = ee(bE);
    Qt(() => {
      en.cancel(a), en.cancel(o);
    });
    const c = () => {
      try {
        if (s.value && document.activeElement === s.value.input) {
          const x = s.value.getSelectionStart(), C = s.value.getSelectionEnd(), P = s.value.getScrollTop();
          s.value.setSelectionRange(x, C), s.value.setScrollTop(P);
        }
      } catch {
      }
    }, f = ee(), d = ee();
    Vt(() => {
      const x = t.autoSize || t.autosize;
      x ? (f.value = x.minRows, d.value = x.maxRows) : (f.value = void 0, d.value = void 0);
    });
    const h = V(() => !!(t.autoSize || t.autosize)), p = () => {
      u.value = mE;
    };
    me([() => t.value, f, d, h], () => {
      h.value && p();
    }, {
      immediate: !0
    });
    const v = ee();
    me([u, s], () => {
      if (s.value)
        if (u.value === mE)
          u.value = yE;
        else if (u.value === yE) {
          const x = mFe(s.value.input, !1, f.value, d.value);
          u.value = bE, v.value = x;
        } else
          c();
    }, {
      immediate: !0,
      flush: "post"
    });
    const g = In(), m = ee(), y = () => {
      en.cancel(m.value);
    }, _ = (x) => {
      u.value === bE && (r("resize", x), h.value && (y(), m.value = en(() => {
        p();
      })));
    };
    Qt(() => {
      y();
    }), i({
      resizeTextarea: () => {
        p();
      },
      textArea: V(() => {
        var x;
        return (x = s.value) === null || x === void 0 ? void 0 : x.input;
      }),
      instance: g
    }), aa(t.autosize === void 0, "Input.TextArea", "autosize is deprecated, please use autoSize instead.");
    const S = () => {
      const {
        prefixCls: x,
        disabled: C
      } = t, P = si(t, ["prefixCls", "onPressEnter", "autoSize", "autosize", "defaultValue", "allowClear", "type", "maxlength", "valueModifiers"]), $ = Re(x, n.class, {
        [`${x}-disabled`]: C
      }), T = h.value ? v.value : null, E = [n.style, l.value, T], M = k(k(k({}, P), n), {
        style: E,
        class: $
      });
      return (u.value === mE || u.value === yE) && E.push({
        overflowX: "hidden",
        overflowY: "hidden"
      }), M.autofocus || delete M.autofocus, M.rows === 0 && delete M.rows, D($g, {
        onResize: _,
        disabled: !h.value
      }, {
        default: () => [D(t8, te(te({}, M), {}, {
          ref: s,
          tag: "textarea"
        }), null)]
      });
    };
    return () => S();
  }
});
function Hae(t, e) {
  return [...t || ""].slice(0, e).join("");
}
function lH(t, e, n, r) {
  let i = n;
  return t ? i = Hae(n, r) : [...e || ""].length < n.length && [...n || ""].length > r && (i = e), i;
}
const bFe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ATextarea",
  inheritAttrs: !1,
  props: Qae(),
  setup(t, e) {
    let {
      attrs: n,
      expose: r,
      emit: i
    } = e;
    var a;
    const o = Ul(), s = Qs.useInject(), l = V(() => U_(s.status, t.status)), u = ve((a = t.value) !== null && a !== void 0 ? a : t.defaultValue), c = ve(), f = ve(""), {
      prefixCls: d,
      size: h,
      direction: p
    } = hn("input", t), [v, g] = C8(d), m = Vl(), y = V(() => t.showCount === "" || t.showCount || !1), _ = V(() => Number(t.maxlength) > 0), O = ve(!1), S = ve(), x = ve(0), C = (H) => {
      O.value = !0, S.value = f.value, x.value = H.currentTarget.selectionStart, i("compositionstart", H);
    }, P = (H) => {
      var U;
      O.value = !1;
      let j = H.currentTarget.value;
      if (_.value) {
        const Y = x.value >= t.maxlength + 1 || x.value === ((U = S.value) === null || U === void 0 ? void 0 : U.length);
        j = lH(Y, S.value, j, t.maxlength);
      }
      j !== f.value && (M(j), Gy(H.currentTarget, H, I, j)), i("compositionend", H);
    }, $ = In();
    me(() => t.value, () => {
      var H;
      "value" in $.vnode.props, u.value = (H = t.value) !== null && H !== void 0 ? H : "";
    });
    const T = (H) => {
      var U;
      Vae((U = c.value) === null || U === void 0 ? void 0 : U.textArea, H);
    }, E = () => {
      var H, U;
      (U = (H = c.value) === null || H === void 0 ? void 0 : H.textArea) === null || U === void 0 || U.blur();
    }, M = (H, U) => {
      u.value !== H && (t.value === void 0 ? u.value = H : Bt(() => {
        var j, Y, ne;
        c.value.textArea.value !== f.value && ((ne = (j = c.value) === null || j === void 0 ? void 0 : (Y = j.instance).update) === null || ne === void 0 || ne.call(Y));
      }), Bt(() => {
        U && U();
      }));
    }, R = (H) => {
      H.keyCode === 13 && i("pressEnter", H), i("keydown", H);
    }, N = (H) => {
      const {
        onBlur: U
      } = t;
      U == null || U(H), o.onFieldBlur();
    }, I = (H) => {
      i("update:value", H.target.value), i("change", H), i("input", H), o.onFieldChange();
    }, B = (H) => {
      Gy(c.value.textArea, H, I), M("", () => {
        T();
      });
    }, Q = (H) => {
      let U = H.target.value;
      if (u.value !== U) {
        if (_.value) {
          const j = H.target, Y = j.selectionStart >= t.maxlength + 1 || j.selectionStart === U.length || !j.selectionStart;
          U = lH(Y, f.value, U, t.maxlength);
        }
        Gy(H.currentTarget, H, I, U), M(U);
      }
    }, W = () => {
      var H, U;
      const {
        class: j
      } = n, {
        bordered: Y = !0
      } = t, ne = k(k(k({}, si(t, ["allowClear"])), n), {
        class: [{
          [`${d.value}-borderless`]: !Y,
          [`${j}`]: j && !y.value,
          [`${d.value}-sm`]: h.value === "small",
          [`${d.value}-lg`]: h.value === "large"
        }, Eu(d.value, l.value), g.value],
        disabled: m.value,
        showCount: null,
        prefixCls: d.value,
        onInput: Q,
        onChange: Q,
        onBlur: N,
        onKeydown: R,
        onCompositionstart: C,
        onCompositionend: P
      });
      return !((H = t.valueModifiers) === null || H === void 0) && H.lazy && delete ne.onInput, D(yFe, te(te({}, ne), {}, {
        id: (U = ne == null ? void 0 : ne.id) !== null && U !== void 0 ? U : o.id.value,
        ref: c,
        maxlength: t.maxlength,
        lazy: t.lazy
      }), null);
    };
    return r({
      focus: T,
      blur: E,
      resizableTextArea: c
    }), Vt(() => {
      let H = FR(u.value);
      !O.value && _.value && (t.value === null || t.value === void 0) && (H = Hae(H, t.maxlength)), f.value = H;
    }), () => {
      var H;
      const {
        maxlength: U,
        bordered: j = !0,
        hidden: Y
      } = t, {
        style: ne,
        class: fe
      } = n, ue = k(k(k({}, t), n), {
        prefixCls: d.value,
        inputType: "text",
        handleReset: B,
        direction: p.value,
        bordered: j,
        style: y.value ? void 0 : ne,
        hashId: g.value,
        disabled: (H = t.disabled) !== null && H !== void 0 ? H : m.value
      });
      let ye = D(hFe, te(te({}, ue), {}, {
        value: f.value,
        status: t.status
      }), {
        element: W
      });
      if (y.value || s.hasFeedback) {
        const se = [...f.value].length;
        let he = "";
        typeof y.value == "object" ? he = y.value.formatter({
          value: f.value,
          count: se,
          maxlength: U
        }) : he = `${se}${_.value ? ` / ${U}` : ""}`, ye = D("div", {
          hidden: Y,
          class: Re(`${d.value}-textarea`, {
            [`${d.value}-textarea-rtl`]: p.value === "rtl",
            [`${d.value}-textarea-show-count`]: y.value,
            [`${d.value}-textarea-in-form-item`]: s.isFormItemInput
          }, `${d.value}-textarea-show-count`, fe, g.value),
          style: ne,
          "data-count": typeof he != "object" ? he : void 0
        }, [ye, s.hasFeedback && D("span", {
          class: `${d.value}-textarea-suffix`
        }, [s.feedbackIcon])]);
      }
      return v(ye);
    };
  }
});
var _Fe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" };
function uH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      OFe(t, i, n[i]);
    });
  }
  return t;
}
function OFe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var q2 = function(e, n) {
  var r = uH({}, e, n.attrs);
  return D(Rt, uH({}, r, {
    icon: _Fe
  }), null);
};
q2.displayName = "EyeOutlined";
q2.inheritAttrs = !1;
var SFe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { tag: "path", attrs: { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, name: "eye-invisible", theme: "outlined" };
function cH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      xFe(t, i, n[i]);
    });
  }
  return t;
}
function xFe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var k8 = function(e, n) {
  var r = cH({}, e, n.attrs);
  return D(Rt, cH({}, r, {
    icon: SFe
  }), null);
};
k8.displayName = "EyeInvisibleOutlined";
k8.inheritAttrs = !1;
var wFe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const CFe = {
  click: "onClick",
  hover: "onMouseover"
}, TFe = (t) => t ? D(q2, null, null) : D(k8, null, null), PFe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AInputPassword",
  inheritAttrs: !1,
  props: k(k({}, Y2()), {
    prefixCls: String,
    inputPrefixCls: String,
    action: {
      type: String,
      default: "click"
    },
    visibilityToggle: {
      type: Boolean,
      default: !0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    "onUpdate:visible": Function,
    iconRender: Function
  }),
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      expose: i,
      emit: a
    } = e;
    const o = ve(!1), s = () => {
      const {
        disabled: g
      } = t;
      g || (o.value = !o.value, a("update:visible", o.value));
    };
    Vt(() => {
      t.visible !== void 0 && (o.value = !!t.visible);
    });
    const l = ve();
    i({
      focus: () => {
        var g;
        (g = l.value) === null || g === void 0 || g.focus();
      },
      blur: () => {
        var g;
        (g = l.value) === null || g === void 0 || g.blur();
      }
    });
    const f = (g) => {
      const {
        action: m,
        iconRender: y = n.iconRender || TFe
      } = t, _ = CFe[m] || "", O = y(o.value), S = {
        [_]: s,
        class: `${g}-icon`,
        key: "passwordIcon",
        onMousedown: (x) => {
          x.preventDefault();
        },
        onMouseup: (x) => {
          x.preventDefault();
        }
      };
      return Or(po(O) ? O : D("span", null, [O]), S);
    }, {
      prefixCls: d,
      getPrefixCls: h
    } = hn("input-password", t), p = V(() => h("input", t.inputPrefixCls)), v = () => {
      const {
        size: g,
        visibilityToggle: m
      } = t, y = wFe(t, ["size", "visibilityToggle"]), _ = m && f(d.value), O = Re(d.value, r.class, {
        [`${d.value}-${g}`]: !!g
      }), S = k(k(k({}, si(y, ["suffix", "iconRender", "action"])), r), {
        type: o.value ? "text" : "password",
        class: O,
        prefixCls: p.value,
        suffix: _
      });
      return g && (S.size = g), D(Cr, te({
        ref: l
      }, S), n);
    };
    return () => v();
  }
});
Cr.Group = lFe;
Cr.Search = cFe;
Cr.TextArea = bFe;
Cr.Password = PFe;
Cr.install = function(t) {
  return t.component(Cr.name, Cr), t.component(Cr.Group.name, Cr.Group), t.component(Cr.Search.name, Cr.Search), t.component(Cr.TextArea.name, Cr.TextArea), t.component(Cr.Password.name, Cr.Password), t;
};
function K2() {
  return {
    keyboard: {
      type: Boolean,
      default: void 0
    },
    mask: {
      type: Boolean,
      default: void 0
    },
    afterClose: Function,
    closable: {
      type: Boolean,
      default: void 0
    },
    maskClosable: {
      type: Boolean,
      default: void 0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    destroyOnClose: {
      type: Boolean,
      default: void 0
    },
    mousePosition: oe.shape({
      x: Number,
      y: Number
    }).loose,
    title: oe.any,
    footer: oe.any,
    transitionName: String,
    maskTransitionName: String,
    animation: oe.any,
    maskAnimation: oe.any,
    wrapStyle: {
      type: Object,
      default: void 0
    },
    bodyStyle: {
      type: Object,
      default: void 0
    },
    maskStyle: {
      type: Object,
      default: void 0
    },
    prefixCls: String,
    wrapClassName: String,
    rootClassName: String,
    width: [String, Number],
    height: [String, Number],
    zIndex: Number,
    bodyProps: oe.any,
    maskProps: oe.any,
    wrapProps: oe.any,
    getContainer: oe.any,
    dialogStyle: {
      type: Object,
      default: void 0
    },
    dialogClass: String,
    closeIcon: oe.any,
    forceRender: {
      type: Boolean,
      default: void 0
    },
    getOpenCount: Function,
    // https://github.com/ant-design/ant-design/issues/19771
    // https://github.com/react-component/dialog/issues/95
    focusTriggerAfterClose: {
      type: Boolean,
      default: void 0
    },
    onClose: Function,
    modalRender: Function
  };
}
function fH(t, e, n) {
  let r = e;
  return !r && n && (r = `${t}-${n}`), r;
}
let dH = -1;
function $Fe() {
  return dH += 1, dH;
}
function hH(t, e) {
  let n = t[`page${e ? "Y" : "X"}Offset`];
  const r = `scroll${e ? "Top" : "Left"}`;
  if (typeof n != "number") {
    const i = t.document;
    n = i.documentElement[r], typeof n != "number" && (n = i.body[r]);
  }
  return n;
}
function AFe(t) {
  const e = t.getBoundingClientRect(), n = {
    left: e.left,
    top: e.top
  }, r = t.ownerDocument, i = r.defaultView || r.parentWindow;
  return n.left += hH(i), n.top += hH(i, !0), n;
}
const pH = {
  width: 0,
  height: 0,
  overflow: "hidden",
  outline: "none"
}, EFe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "DialogContent",
  inheritAttrs: !1,
  props: k(k({}, K2()), {
    motionName: String,
    ariaId: String,
    onVisibleChanged: Function,
    onMousedown: Function,
    onMouseup: Function
  }),
  setup(t, e) {
    let {
      expose: n,
      slots: r,
      attrs: i
    } = e;
    const a = ee(), o = ee(), s = ee();
    n({
      focus: () => {
        var d;
        (d = a.value) === null || d === void 0 || d.focus();
      },
      changeActive: (d) => {
        const {
          activeElement: h
        } = document;
        d && h === o.value ? a.value.focus() : !d && h === a.value && o.value.focus();
      }
    });
    const l = ee(), u = V(() => {
      const {
        width: d,
        height: h
      } = t, p = {};
      return d !== void 0 && (p.width = typeof d == "number" ? `${d}px` : d), h !== void 0 && (p.height = typeof h == "number" ? `${h}px` : h), l.value && (p.transformOrigin = l.value), p;
    }), c = () => {
      Bt(() => {
        if (s.value) {
          const d = AFe(s.value);
          l.value = t.mousePosition ? `${t.mousePosition.x - d.left}px ${t.mousePosition.y - d.top}px` : "";
        }
      });
    }, f = (d) => {
      t.onVisibleChanged(d);
    };
    return () => {
      var d, h, p, v;
      const {
        prefixCls: g,
        footer: m = (d = r.footer) === null || d === void 0 ? void 0 : d.call(r),
        title: y = (h = r.title) === null || h === void 0 ? void 0 : h.call(r),
        ariaId: _,
        closable: O,
        closeIcon: S = (p = r.closeIcon) === null || p === void 0 ? void 0 : p.call(r),
        onClose: x,
        bodyStyle: C,
        bodyProps: P,
        onMousedown: $,
        onMouseup: T,
        visible: E,
        modalRender: M = r.modalRender,
        destroyOnClose: R,
        motionName: N
      } = t;
      let I;
      m && (I = D("div", {
        class: `${g}-footer`
      }, [m]));
      let B;
      y && (B = D("div", {
        class: `${g}-header`
      }, [D("div", {
        class: `${g}-title`,
        id: _
      }, [y])]));
      let Q;
      O && (Q = D("button", {
        type: "button",
        onClick: x,
        "aria-label": "Close",
        class: `${g}-close`
      }, [S || D("span", {
        class: `${g}-close-x`
      }, null)]));
      const W = D("div", {
        class: `${g}-content`
      }, [Q, B, D("div", te({
        class: `${g}-body`,
        style: C
      }, P), [(v = r.default) === null || v === void 0 ? void 0 : v.call(r)]), I]), H = Z_(N);
      return D(mo, te(te({}, H), {}, {
        onBeforeEnter: c,
        onAfterEnter: () => f(!0),
        onAfterLeave: () => f(!1)
      }), {
        default: () => [E || !R ? _r(D("div", te(te({}, i), {}, {
          ref: s,
          key: "dialog-element",
          role: "document",
          style: [u.value, i.style],
          class: [g, i.class],
          onMousedown: $,
          onMouseup: T
        }), [D("div", {
          tabindex: 0,
          ref: a,
          style: pH,
          "aria-hidden": "true"
        }, null), M ? M({
          originVNode: W
        }) : W, D("div", {
          tabindex: 0,
          ref: o,
          style: pH,
          "aria-hidden": "true"
        }, null)]), [[ho, E]]) : null]
      });
    };
  }
}), MFe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "DialogMask",
  props: {
    prefixCls: String,
    visible: Boolean,
    motionName: String,
    maskProps: Object
  },
  setup(t, e) {
    return () => {
      const {
        prefixCls: n,
        visible: r,
        maskProps: i,
        motionName: a
      } = t, o = Z_(a);
      return D(mo, o, {
        default: () => [_r(D("div", te({
          class: `${n}-mask`
        }, i), null), [[ho, r]])]
      });
    };
  }
}), vH = ae({
  compatConfig: {
    MODE: 3
  },
  name: "VcDialog",
  inheritAttrs: !1,
  props: li(k(k({}, K2()), {
    getOpenCount: Function,
    scrollLocker: Object
  }), {
    mask: !0,
    visible: !1,
    keyboard: !0,
    closable: !0,
    maskClosable: !0,
    destroyOnClose: !1,
    prefixCls: "rc-dialog",
    getOpenCount: () => null,
    focusTriggerAfterClose: !0
  }),
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const i = ve(), a = ve(), o = ve(), s = ve(t.visible), l = ve(`vcDialogTitle${$Fe()}`), u = (m) => {
      var y, _;
      if (m)
        kc(a.value, document.activeElement) || (i.value = document.activeElement, (y = o.value) === null || y === void 0 || y.focus());
      else {
        const O = s.value;
        if (s.value = !1, t.mask && i.value && t.focusTriggerAfterClose) {
          try {
            i.value.focus({
              preventScroll: !0
            });
          } catch {
          }
          i.value = null;
        }
        O && ((_ = t.afterClose) === null || _ === void 0 || _.call(t));
      }
    }, c = (m) => {
      var y;
      (y = t.onClose) === null || y === void 0 || y.call(t, m);
    }, f = ve(!1), d = ve(), h = () => {
      clearTimeout(d.value), f.value = !0;
    }, p = () => {
      d.value = setTimeout(() => {
        f.value = !1;
      });
    }, v = (m) => {
      if (!t.maskClosable) return null;
      f.value ? f.value = !1 : a.value === m.target && c(m);
    }, g = (m) => {
      if (t.keyboard && m.keyCode === Me.ESC) {
        m.stopPropagation(), c(m);
        return;
      }
      t.visible && m.keyCode === Me.TAB && o.value.changeActive(!m.shiftKey);
    };
    return me(() => t.visible, () => {
      t.visible && (s.value = !0);
    }, {
      flush: "post"
    }), Qt(() => {
      var m;
      clearTimeout(d.value), (m = t.scrollLocker) === null || m === void 0 || m.unLock();
    }), Vt(() => {
      var m, y;
      (m = t.scrollLocker) === null || m === void 0 || m.unLock(), s.value && ((y = t.scrollLocker) === null || y === void 0 || y.lock());
    }), () => {
      const {
        prefixCls: m,
        mask: y,
        visible: _,
        maskTransitionName: O,
        maskAnimation: S,
        zIndex: x,
        wrapClassName: C,
        rootClassName: P,
        wrapStyle: $,
        closable: T,
        maskProps: E,
        maskStyle: M,
        transitionName: R,
        animation: N,
        wrapProps: I,
        title: B = r.title
      } = t, {
        style: Q,
        class: W
      } = n;
      return D("div", te({
        class: [`${m}-root`, P]
      }, M2(t, {
        data: !0
      })), [D(MFe, {
        prefixCls: m,
        visible: y && _,
        motionName: fH(m, O, S),
        style: k({
          zIndex: x
        }, M),
        maskProps: E
      }, null), D("div", te({
        tabIndex: -1,
        onKeydown: g,
        class: Re(`${m}-wrap`, C),
        ref: a,
        onClick: v,
        role: "dialog",
        "aria-labelledby": B ? l.value : null,
        style: k(k({
          zIndex: x
        }, $), {
          display: s.value ? null : "none"
        })
      }, I), [D(EFe, te(te({}, si(t, ["scrollLocker"])), {}, {
        style: Q,
        class: W,
        onMousedown: h,
        onMouseup: p,
        ref: o,
        closable: T,
        ariaId: l.value,
        prefixCls: m,
        visible: _,
        onClose: c,
        onVisibleChanged: u,
        motionName: fH(m, R, N)
      }), r)])]);
    };
  }
}), IFe = K2(), Gae = ae({
  compatConfig: {
    MODE: 3
  },
  name: "DialogWrap",
  inheritAttrs: !1,
  props: li(IFe, {
    visible: !1
  }),
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const i = ee(t.visible);
    return e8({}, {
      inTriggerContext: !1
    }), me(() => t.visible, () => {
      t.visible && (i.value = !0);
    }, {
      flush: "post"
    }), () => {
      const {
        visible: a,
        getContainer: o,
        forceRender: s,
        destroyOnClose: l = !1,
        afterClose: u
      } = t;
      let c = k(k(k({}, t), n), {
        ref: "_component",
        key: "dialog"
      });
      return o === !1 ? D(vH, te(te({}, c), {}, {
        getOpenCount: () => 2
      }), r) : !s && l && !i.value ? null : D(Zre, {
        autoLock: !0,
        visible: a,
        forceRender: s,
        getContainer: o
      }, {
        default: (f) => (c = k(k(k({}, c), f), {
          afterClose: () => {
            u == null || u(), i.value = !1;
          }
        }), D(vH, c, r))
      });
    };
  }
});
function DFe(t) {
  const e = ee(null), n = zn(k({}, t)), r = ee([]), i = (a) => {
    e.value === null && (r.value = [], e.value = en(() => {
      let o;
      r.value.forEach((s) => {
        o = k(k({}, o), s);
      }), k(n, o), e.value = null;
    })), r.value.push(a);
  };
  return _t(() => {
    e.value && en.cancel(e.value);
  }), [n, i];
}
function gH(t, e, n, r) {
  const i = e + n, a = (n - r) / 2;
  if (n > r) {
    if (e > 0)
      return {
        [t]: a
      };
    if (e < 0 && i < r)
      return {
        [t]: -a
      };
  } else if (e < 0 || i > r)
    return {
      [t]: e < 0 ? a : -a
    };
  return {};
}
function RFe(t, e, n, r) {
  const {
    width: i,
    height: a
  } = wNe();
  let o = null;
  return t <= i && e <= a ? o = {
    x: 0,
    y: 0
  } : (t > i || e > a) && (o = k(k({}, gH("x", n, t, i)), gH("y", r, e, a))), o;
}
var kFe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const mH = Symbol("previewGroupContext"), L8 = {
  provide: (t) => {
    Et(mH, t);
  },
  inject: () => et(mH, {
    isPreviewGroup: ve(!1),
    previewUrls: V(() => /* @__PURE__ */ new Map()),
    setPreviewUrls: () => {
    },
    current: ee(null),
    setCurrent: () => {
    },
    setShowPreview: () => {
    },
    setMousePosition: () => {
    },
    registerImage: null,
    rootClassName: ""
  })
}, LFe = () => ({
  previewPrefixCls: String,
  preview: {
    type: [Boolean, Object],
    default: !0
  },
  icons: {
    type: Object,
    default: () => ({})
  }
}), NFe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "PreviewGroup",
  inheritAttrs: !1,
  props: LFe(),
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = V(() => {
      const S = {
        visible: void 0,
        onVisibleChange: () => {
        },
        getContainer: void 0,
        current: 0
      };
      return typeof t.preview == "object" ? Xae(t.preview, S) : S;
    }), i = zn(/* @__PURE__ */ new Map()), a = ee(), o = V(() => r.value.visible), s = V(() => r.value.getContainer), l = (S, x) => {
      var C, P;
      (P = (C = r.value).onVisibleChange) === null || P === void 0 || P.call(C, S, x);
    }, [u, c] = Rg(!!o.value, {
      value: o,
      onChange: l
    }), f = ee(null), d = V(() => o.value !== void 0), h = V(() => Array.from(i.keys())), p = V(() => h.value[r.value.current]), v = V(() => new Map(Array.from(i).filter((S) => {
      let [, {
        canPreview: x
      }] = S;
      return !!x;
    }).map((S) => {
      let [x, {
        url: C
      }] = S;
      return [x, C];
    }))), g = function(S, x) {
      let C = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
      i.set(S, {
        url: x,
        canPreview: C
      });
    }, m = (S) => {
      a.value = S;
    }, y = (S) => {
      f.value = S;
    }, _ = function(S, x) {
      let C = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
      const P = () => {
        i.delete(S);
      };
      return i.set(S, {
        url: x,
        canPreview: C
      }), P;
    }, O = (S) => {
      S == null || S.stopPropagation(), c(!1), y(null);
    };
    return me(p, (S) => {
      m(S);
    }, {
      immediate: !0,
      flush: "post"
    }), Vt(() => {
      u.value && d.value && m(p.value);
    }, {
      flush: "post"
    }), L8.provide({
      isPreviewGroup: ve(!0),
      previewUrls: v,
      setPreviewUrls: g,
      current: a,
      setCurrent: m,
      setShowPreview: c,
      setMousePosition: y,
      registerImage: _
    }), () => {
      const S = kFe(r.value, []);
      return D(Wt, null, [n.default && n.default(), D(Zae, te(te({}, S), {}, {
        "ria-hidden": !u.value,
        visible: u.value,
        prefixCls: t.previewPrefixCls,
        onClose: O,
        mousePosition: f.value,
        src: v.value.get(a.value),
        icons: t.icons,
        getContainer: s.value
      }), null)]);
    };
  }
}), jae = NFe, od = {
  x: 0,
  y: 0
}, BFe = k(k({}, K2()), {
  src: String,
  alt: String,
  rootClassName: String,
  icons: {
    type: Object,
    default: () => ({})
  }
}), Zae = ae({
  compatConfig: {
    MODE: 3
  },
  name: "Preview",
  inheritAttrs: !1,
  props: BFe,
  emits: ["close", "afterClose"],
  setup(t, e) {
    let {
      emit: n,
      attrs: r
    } = e;
    const {
      rotateLeft: i,
      rotateRight: a,
      zoomIn: o,
      zoomOut: s,
      close: l,
      left: u,
      right: c,
      flipX: f,
      flipY: d
    } = zn(t.icons), h = ve(1), p = ve(0), v = zn({
      x: 1,
      y: 1
    }), [g, m] = DFe(od), y = () => n("close"), _ = ve(), O = zn({
      originX: 0,
      originY: 0,
      deltaX: 0,
      deltaY: 0
    }), S = ve(!1), x = L8.inject(), {
      previewUrls: C,
      current: P,
      isPreviewGroup: $,
      setCurrent: T
    } = x, E = V(() => C.value.size), M = V(() => Array.from(C.value.keys())), R = V(() => M.value.indexOf(P.value)), N = V(() => $.value ? C.value.get(P.value) : t.src), I = V(() => $.value && E.value > 1), B = ve({
      wheelDirection: 0
    }), Q = () => {
      h.value = 1, p.value = 0, v.x = 1, v.y = 1, m(od), n("afterClose");
    }, W = (Be) => {
      Be ? h.value += 0.5 : h.value++, m(od);
    }, H = (Be) => {
      h.value > 1 && (Be ? h.value -= 0.5 : h.value--), m(od);
    }, U = () => {
      p.value += 90;
    }, j = () => {
      p.value -= 90;
    }, Y = () => {
      v.x = -v.x;
    }, ne = () => {
      v.y = -v.y;
    }, fe = (Be) => {
      Be.preventDefault(), Be.stopPropagation(), R.value > 0 && T(M.value[R.value - 1]);
    }, ue = (Be) => {
      Be.preventDefault(), Be.stopPropagation(), R.value < E.value - 1 && T(M.value[R.value + 1]);
    }, ye = Re({
      [`${t.prefixCls}-moving`]: S.value
    }), se = `${t.prefixCls}-operations-operation`, he = `${t.prefixCls}-operations-icon`, re = [{
      icon: l,
      onClick: y,
      type: "close"
    }, {
      icon: o,
      onClick: () => W(),
      type: "zoomIn"
    }, {
      icon: s,
      onClick: () => H(),
      type: "zoomOut",
      disabled: V(() => h.value === 1)
    }, {
      icon: a,
      onClick: U,
      type: "rotateRight"
    }, {
      icon: i,
      onClick: j,
      type: "rotateLeft"
    }, {
      icon: f,
      onClick: Y,
      type: "flipX"
    }, {
      icon: d,
      onClick: ne,
      type: "flipY"
    }], q = () => {
      if (t.visible && S.value) {
        const Be = _.value.offsetWidth * h.value, Le = _.value.offsetHeight * h.value, {
          left: Pe,
          top: Fe
        } = Ure(_.value), Ye = p.value % 180 !== 0;
        S.value = !1;
        const xt = RFe(Ye ? Le : Be, Ye ? Be : Le, Pe, Fe);
        xt && m(k({}, xt));
      }
    }, K = (Be) => {
      Be.button === 0 && (Be.preventDefault(), Be.stopPropagation(), O.deltaX = Be.pageX - g.x, O.deltaY = Be.pageY - g.y, O.originX = g.x, O.originY = g.y, S.value = !0);
    }, de = (Be) => {
      t.visible && S.value && m({
        x: Be.pageX - O.deltaX,
        y: Be.pageY - O.deltaY
      });
    }, xe = (Be) => {
      if (!t.visible) return;
      Be.preventDefault();
      const Le = Be.deltaY;
      B.value = {
        wheelDirection: Le
      };
    }, we = (Be) => {
      !t.visible || !I.value || (Be.preventDefault(), Be.keyCode === Me.LEFT ? R.value > 0 && T(M.value[R.value - 1]) : Be.keyCode === Me.RIGHT && R.value < E.value - 1 && T(M.value[R.value + 1]));
    }, He = () => {
      t.visible && (h.value !== 1 && (h.value = 1), (g.x !== od.x || g.y !== od.y) && m(od));
    };
    let je = () => {
    };
    return _t(() => {
      me([() => t.visible, S], () => {
        je();
        let Be, Le;
        const Pe = yi(window, "mouseup", q, !1), Fe = yi(window, "mousemove", de, !1), Ye = yi(window, "wheel", xe, {
          passive: !1
        }), xt = yi(window, "keydown", we, !1);
        try {
          window.top !== window.self && (Be = yi(window.top, "mouseup", q, !1), Le = yi(window.top, "mousemove", de, !1));
        } catch (It) {
          Nh(!1, `[vc-image] ${It}`);
        }
        je = () => {
          Pe.remove(), Fe.remove(), Ye.remove(), xt.remove(), Be && Be.remove(), Le && Le.remove();
        };
      }, {
        flush: "post",
        immediate: !0
      }), me([B], () => {
        const {
          wheelDirection: Be
        } = B.value;
        Be > 0 ? H(!0) : Be < 0 && W(!0);
      });
    }), qu(() => {
      je();
    }), () => {
      const {
        visible: Be,
        prefixCls: Le,
        rootClassName: Pe
      } = t;
      return D(Gae, te(te({}, r), {}, {
        transitionName: t.transitionName,
        maskTransitionName: t.maskTransitionName,
        closable: !1,
        keyboard: !0,
        prefixCls: Le,
        onClose: y,
        afterClose: Q,
        visible: Be,
        wrapClassName: ye,
        rootClassName: Pe,
        getContainer: t.getContainer
      }), {
        default: () => [D("div", {
          class: [`${t.prefixCls}-operations-wrapper`, Pe]
        }, [D("ul", {
          class: `${t.prefixCls}-operations`
        }, [re.map((Fe) => {
          let {
            icon: Ye,
            onClick: xt,
            type: It,
            disabled: an
          } = Fe;
          return D("li", {
            class: Re(se, {
              [`${t.prefixCls}-operations-operation-disabled`]: an && (an == null ? void 0 : an.value)
            }),
            onClick: xt,
            key: It
          }, [ku(Ye, {
            class: he
          })]);
        })])]), D("div", {
          class: `${t.prefixCls}-img-wrapper`,
          style: {
            transform: `translate3d(${g.x}px, ${g.y}px, 0)`
          }
        }, [D("img", {
          onMousedown: K,
          onDblclick: He,
          ref: _,
          class: `${t.prefixCls}-img`,
          src: N.value,
          alt: t.alt,
          style: {
            transform: `scale3d(${v.x * h.value}, ${v.y * h.value}, 1) rotate(${p.value}deg)`
          }
        }, null)]), I.value && D("div", {
          class: Re(`${t.prefixCls}-switch-left`, {
            [`${t.prefixCls}-switch-left-disabled`]: R.value <= 0
          }),
          onClick: fe
        }, [u]), I.value && D("div", {
          class: Re(`${t.prefixCls}-switch-right`, {
            [`${t.prefixCls}-switch-right-disabled`]: R.value >= E.value - 1
          }),
          onClick: ue
        }, [c])]
      });
    };
  }
});
var zFe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const Uae = () => ({
  src: String,
  wrapperClassName: String,
  wrapperStyle: {
    type: Object,
    default: void 0
  },
  rootClassName: String,
  prefixCls: String,
  previewPrefixCls: String,
  previewMask: {
    type: [Boolean, Function],
    default: void 0
  },
  placeholder: oe.any,
  fallback: String,
  preview: {
    type: [Boolean, Object],
    default: !0
  },
  onClick: {
    type: Function
  },
  onError: {
    type: Function
  }
}), Xae = (t, e) => {
  const n = k({}, t);
  return Object.keys(e).forEach((r) => {
    t[r] === void 0 && (n[r] = e[r]);
  }), n;
};
let VFe = 0;
const Yae = ae({
  compatConfig: {
    MODE: 3
  },
  name: "VcImage",
  inheritAttrs: !1,
  props: Uae(),
  emits: ["click", "error"],
  setup(t, e) {
    let {
      attrs: n,
      slots: r,
      emit: i
    } = e;
    const a = V(() => t.prefixCls), o = V(() => `${a.value}-preview`), s = V(() => {
      const W = {
        visible: void 0,
        onVisibleChange: () => {
        },
        getContainer: void 0
      };
      return typeof t.preview == "object" ? Xae(t.preview, W) : W;
    }), l = V(() => {
      var W;
      return (W = s.value.src) !== null && W !== void 0 ? W : t.src;
    }), u = V(() => t.placeholder && t.placeholder !== !0 || r.placeholder), c = V(() => s.value.visible), f = V(() => s.value.getContainer), d = V(() => c.value !== void 0), h = (W, H) => {
      var U, j;
      (j = (U = s.value).onVisibleChange) === null || j === void 0 || j.call(U, W, H);
    }, [p, v] = Rg(!!c.value, {
      value: c,
      onChange: h
    }), g = ee(u.value ? "loading" : "normal");
    me(() => t.src, () => {
      g.value = u.value ? "loading" : "normal";
    });
    const m = ee(null), y = V(() => g.value === "error"), _ = L8.inject(), {
      isPreviewGroup: O,
      setCurrent: S,
      setShowPreview: x,
      setMousePosition: C,
      registerImage: P
    } = _, $ = ee(VFe++), T = V(() => t.preview && !y.value), E = () => {
      g.value = "normal";
    }, M = (W) => {
      g.value = "error", i("error", W);
    }, R = (W) => {
      if (!d.value) {
        const {
          left: H,
          top: U
        } = Ure(W.target);
        O.value ? (S($.value), C({
          x: H,
          y: U
        })) : m.value = {
          x: H,
          y: U
        };
      }
      O.value ? x(!0) : v(!0), i("click", W);
    }, N = () => {
      v(!1), d.value || (m.value = null);
    }, I = ee(null);
    me(() => I, () => {
      g.value === "loading" && I.value.complete && (I.value.naturalWidth || I.value.naturalHeight) && E();
    });
    let B = () => {
    };
    _t(() => {
      me([l, T], () => {
        if (B(), !O.value)
          return () => {
          };
        B = P($.value, l.value, T.value), T.value || B();
      }, {
        flush: "post",
        immediate: !0
      });
    }), qu(() => {
      B();
    });
    const Q = (W) => e$e(W) ? W + "px" : W;
    return () => {
      const {
        prefixCls: W,
        wrapperClassName: H,
        fallback: U,
        src: j,
        placeholder: Y,
        wrapperStyle: ne,
        rootClassName: fe
      } = t, {
        width: ue,
        height: ye,
        crossorigin: se,
        decoding: he,
        alt: re,
        sizes: q,
        srcset: K,
        usemap: de,
        class: xe,
        style: we
      } = n, He = s.value, {
        icons: je,
        maskClassName: Be
      } = He, Le = zFe(He, ["icons", "maskClassName"]), Pe = Re(W, H, fe, {
        [`${W}-error`]: y.value
      }), Fe = y.value && U ? U : l.value, Ye = {
        crossorigin: se,
        decoding: he,
        alt: re,
        sizes: q,
        srcset: K,
        usemap: de,
        width: ue,
        height: ye,
        class: Re(`${W}-img`, {
          [`${W}-img-placeholder`]: Y === !0
        }, xe),
        style: k({
          height: Q(ye)
        }, we)
      };
      return D(Wt, null, [D("div", {
        class: Pe,
        onClick: T.value ? R : (xt) => {
          i("click", xt);
        },
        style: k({
          width: Q(ue),
          height: Q(ye)
        }, ne)
      }, [D("img", te(te(te({}, Ye), y.value && U ? {
        src: U
      } : {
        onLoad: E,
        onError: M,
        src: j
      }), {}, {
        ref: I
      }), null), g.value === "loading" && D("div", {
        "aria-hidden": "true",
        class: `${W}-placeholder`
      }, [Y || r.placeholder && r.placeholder()]), r.previewMask && T.value && D("div", {
        class: [`${W}-mask`, Be]
      }, [r.previewMask()])]), !O.value && T.value && D(Zae, te(te({}, Le), {}, {
        "aria-hidden": !p.value,
        visible: p.value,
        prefixCls: o.value,
        onClose: N,
        mousePosition: m.value,
        src: Fe,
        alt: re,
        getContainer: f.value,
        icons: je,
        rootClassName: fe
      }), null)]);
    };
  }
});
Yae.PreviewGroup = jae;
const FFe = Yae;
var WFe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "defs", attrs: {}, children: [{ tag: "style", attrs: {} }] }, { tag: "path", attrs: { d: "M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z" } }, { tag: "path", attrs: { d: "M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z" } }] }, name: "rotate-left", theme: "outlined" };
function yH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      QFe(t, i, n[i]);
    });
  }
  return t;
}
function QFe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var N8 = function(e, n) {
  var r = yH({}, e, n.attrs);
  return D(Rt, yH({}, r, {
    icon: WFe
  }), null);
};
N8.displayName = "RotateLeftOutlined";
N8.inheritAttrs = !1;
var HFe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "defs", attrs: {}, children: [{ tag: "style", attrs: {} }] }, { tag: "path", attrs: { d: "M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z" } }, { tag: "path", attrs: { d: "M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z" } }] }, name: "rotate-right", theme: "outlined" };
function bH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      GFe(t, i, n[i]);
    });
  }
  return t;
}
function GFe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var B8 = function(e, n) {
  var r = bH({}, e, n.attrs);
  return D(Rt, bH({}, r, {
    icon: HFe
  }), null);
};
B8.displayName = "RotateRightOutlined";
B8.inheritAttrs = !1;
var jFe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, name: "zoom-in", theme: "outlined" };
function _H(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      ZFe(t, i, n[i]);
    });
  }
  return t;
}
function ZFe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var z8 = function(e, n) {
  var r = _H({}, e, n.attrs);
  return D(Rt, _H({}, r, {
    icon: jFe
  }), null);
};
z8.displayName = "ZoomInOutlined";
z8.inheritAttrs = !1;
var UFe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, name: "zoom-out", theme: "outlined" };
function OH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      XFe(t, i, n[i]);
    });
  }
  return t;
}
function XFe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var V8 = function(e, n) {
  var r = OH({}, e, n.attrs);
  return D(Rt, OH({}, r, {
    icon: UFe
  }), null);
};
V8.displayName = "ZoomOutOutlined";
V8.inheritAttrs = !1;
var YFe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, name: "swap", theme: "outlined" };
function SH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      qFe(t, i, n[i]);
    });
  }
  return t;
}
function qFe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var pC = function(e, n) {
  var r = SH({}, e, n.attrs);
  return D(Rt, SH({}, r, {
    icon: YFe
  }), null);
};
pC.displayName = "SwapOutlined";
pC.inheritAttrs = !1;
function xH(t) {
  return {
    position: t,
    top: 0,
    insetInlineEnd: 0,
    bottom: 0,
    insetInlineStart: 0
  };
}
const qae = (t) => {
  const {
    componentCls: e
  } = t;
  return [{
    [`${e}-root`]: {
      [`${e}${t.antCls}-zoom-enter, ${e}${t.antCls}-zoom-appear`]: {
        // reset scale avoid mousePosition bug
        transform: "none",
        opacity: 0,
        animationDuration: t.motionDurationSlow,
        // https://github.com/ant-design/ant-design/issues/11777
        userSelect: "none"
      },
      [`${e}${t.antCls}-zoom-leave ${e}-content`]: {
        pointerEvents: "none"
      },
      [`${e}-mask`]: k(k({}, xH("fixed")), {
        zIndex: t.zIndexPopupBase,
        height: "100%",
        backgroundColor: t.colorBgMask,
        [`${e}-hidden`]: {
          display: "none"
        }
      }),
      [`${e}-wrap`]: k(k({}, xH("fixed")), {
        overflow: "auto",
        outline: 0,
        WebkitOverflowScrolling: "touch"
      })
    }
  }, {
    [`${e}-root`]: vie(t)
  }];
}, KFe = (t) => {
  const {
    componentCls: e
  } = t;
  return [
    // ======================== Root =========================
    {
      [`${e}-root`]: {
        [`${e}-wrap`]: {
          zIndex: t.zIndexPopupBase,
          position: "fixed",
          inset: 0,
          overflow: "auto",
          outline: 0,
          WebkitOverflowScrolling: "touch"
        },
        [`${e}-wrap-rtl`]: {
          direction: "rtl"
        },
        [`${e}-centered`]: {
          textAlign: "center",
          "&::before": {
            display: "inline-block",
            width: 0,
            height: "100%",
            verticalAlign: "middle",
            content: '""'
          },
          [e]: {
            top: 0,
            display: "inline-block",
            paddingBottom: 0,
            textAlign: "start",
            verticalAlign: "middle"
          }
        },
        [`@media (max-width: ${t.screenSMMax})`]: {
          [e]: {
            maxWidth: "calc(100vw - 16px)",
            margin: `${t.marginXS} auto`
          },
          [`${e}-centered`]: {
            [e]: {
              flex: 1
            }
          }
        }
      }
    },
    // ======================== Modal ========================
    {
      [e]: k(k({}, Gn(t)), {
        pointerEvents: "none",
        position: "relative",
        top: 100,
        width: "auto",
        maxWidth: `calc(100vw - ${t.margin * 2}px)`,
        margin: "0 auto",
        paddingBottom: t.paddingLG,
        [`${e}-title`]: {
          margin: 0,
          color: t.modalHeadingColor,
          fontWeight: t.fontWeightStrong,
          fontSize: t.modalHeaderTitleFontSize,
          lineHeight: t.modalHeaderTitleLineHeight,
          wordWrap: "break-word"
        },
        [`${e}-content`]: {
          position: "relative",
          backgroundColor: t.modalContentBg,
          backgroundClip: "padding-box",
          border: 0,
          borderRadius: t.borderRadiusLG,
          boxShadow: t.boxShadowSecondary,
          pointerEvents: "auto",
          padding: `${t.paddingMD}px ${t.paddingContentHorizontalLG}px`
        },
        [`${e}-close`]: k({
          position: "absolute",
          top: (t.modalHeaderCloseSize - t.modalCloseBtnSize) / 2,
          insetInlineEnd: (t.modalHeaderCloseSize - t.modalCloseBtnSize) / 2,
          zIndex: t.zIndexPopupBase + 10,
          padding: 0,
          color: t.modalCloseColor,
          fontWeight: t.fontWeightStrong,
          lineHeight: 1,
          textDecoration: "none",
          background: "transparent",
          borderRadius: t.borderRadiusSM,
          width: t.modalConfirmIconSize,
          height: t.modalConfirmIconSize,
          border: 0,
          outline: 0,
          cursor: "pointer",
          transition: `color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,
          "&-x": {
            display: "block",
            fontSize: t.fontSizeLG,
            fontStyle: "normal",
            lineHeight: `${t.modalCloseBtnSize}px`,
            textAlign: "center",
            textTransform: "none",
            textRendering: "auto"
          },
          "&:hover": {
            color: t.modalIconHoverColor,
            backgroundColor: t.wireframe ? "transparent" : t.colorFillContent,
            textDecoration: "none"
          },
          "&:active": {
            backgroundColor: t.wireframe ? "transparent" : t.colorFillContentHover
          }
        }, T2(t)),
        [`${e}-header`]: {
          color: t.colorText,
          background: t.modalHeaderBg,
          borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,
          marginBottom: t.marginXS
        },
        [`${e}-body`]: {
          fontSize: t.fontSize,
          lineHeight: t.lineHeight,
          wordWrap: "break-word"
        },
        [`${e}-footer`]: {
          textAlign: "end",
          background: t.modalFooterBg,
          marginTop: t.marginSM,
          [`${t.antCls}-btn + ${t.antCls}-btn:not(${t.antCls}-dropdown-trigger)`]: {
            marginBottom: 0,
            marginInlineStart: t.marginXS
          }
        },
        [`${e}-open`]: {
          overflow: "hidden"
        }
      })
    },
    // ======================== Pure =========================
    {
      [`${e}-pure-panel`]: {
        top: "auto",
        padding: 0,
        display: "flex",
        flexDirection: "column",
        [`${e}-content,
          ${e}-body,
          ${e}-confirm-body-wrapper`]: {
          display: "flex",
          flexDirection: "column",
          flex: "auto"
        },
        [`${e}-confirm-body`]: {
          marginBottom: "auto"
        }
      }
    }
  ];
}, JFe = (t) => {
  const {
    componentCls: e
  } = t, n = `${e}-confirm`;
  return {
    [n]: {
      "&-rtl": {
        direction: "rtl"
      },
      [`${t.antCls}-modal-header`]: {
        display: "none"
      },
      [`${n}-body-wrapper`]: k({}, Kw()),
      [`${n}-body`]: {
        display: "flex",
        flexWrap: "wrap",
        alignItems: "center",
        [`${n}-title`]: {
          flex: "0 0 100%",
          display: "block",
          // create BFC to avoid
          // https://user-images.githubusercontent.com/507615/37702510-ba844e06-2d2d-11e8-9b67-8e19be57f445.png
          overflow: "hidden",
          color: t.colorTextHeading,
          fontWeight: t.fontWeightStrong,
          fontSize: t.modalHeaderTitleFontSize,
          lineHeight: t.modalHeaderTitleLineHeight,
          [`+ ${n}-content`]: {
            marginBlockStart: t.marginXS,
            flexBasis: "100%",
            maxWidth: `calc(100% - ${t.modalConfirmIconSize + t.marginSM}px)`
          }
        },
        [`${n}-content`]: {
          color: t.colorText,
          fontSize: t.fontSize
        },
        [`> ${t.iconCls}`]: {
          flex: "none",
          marginInlineEnd: t.marginSM,
          fontSize: t.modalConfirmIconSize,
          [`+ ${n}-title`]: {
            flex: 1
          },
          // `content` after `icon` should set marginLeft
          [`+ ${n}-title + ${n}-content`]: {
            marginInlineStart: t.modalConfirmIconSize + t.marginSM
          }
        }
      },
      [`${n}-btns`]: {
        textAlign: "end",
        marginTop: t.marginSM,
        [`${t.antCls}-btn + ${t.antCls}-btn`]: {
          marginBottom: 0,
          marginInlineStart: t.marginXS
        }
      }
    },
    [`${n}-error ${n}-body > ${t.iconCls}`]: {
      color: t.colorError
    },
    [`${n}-warning ${n}-body > ${t.iconCls},
        ${n}-confirm ${n}-body > ${t.iconCls}`]: {
      color: t.colorWarning
    },
    [`${n}-info ${n}-body > ${t.iconCls}`]: {
      color: t.colorInfo
    },
    [`${n}-success ${n}-body > ${t.iconCls}`]: {
      color: t.colorSuccess
    },
    // https://github.com/ant-design/ant-design/issues/37329
    [`${e}-zoom-leave ${e}-btns`]: {
      pointerEvents: "none"
    }
  };
}, eWe = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [`${e}-root`]: {
      [`${e}-wrap-rtl`]: {
        direction: "rtl",
        [`${e}-confirm-body`]: {
          direction: "rtl"
        }
      }
    }
  };
}, tWe = (t) => {
  const {
    componentCls: e,
    antCls: n
  } = t, r = `${e}-confirm`;
  return {
    [e]: {
      [`${e}-content`]: {
        padding: 0
      },
      [`${e}-header`]: {
        padding: t.modalHeaderPadding,
        borderBottom: `${t.modalHeaderBorderWidth}px ${t.modalHeaderBorderStyle} ${t.modalHeaderBorderColorSplit}`,
        marginBottom: 0
      },
      [`${e}-body`]: {
        padding: t.modalBodyPadding
      },
      [`${e}-footer`]: {
        padding: `${t.modalFooterPaddingVertical}px ${t.modalFooterPaddingHorizontal}px`,
        borderTop: `${t.modalFooterBorderWidth}px ${t.modalFooterBorderStyle} ${t.modalFooterBorderColorSplit}`,
        borderRadius: `0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`,
        marginTop: 0
      }
    },
    [r]: {
      [`${n}-modal-body`]: {
        padding: `${t.padding * 2}px ${t.padding * 2}px ${t.paddingLG}px`
      },
      [`${r}-body`]: {
        [`> ${t.iconCls}`]: {
          marginInlineEnd: t.margin,
          // `content` after `icon` should set marginLeft
          [`+ ${r}-title + ${r}-content`]: {
            marginInlineStart: t.modalConfirmIconSize + t.margin
          }
        }
      },
      [`${r}-btns`]: {
        marginTop: t.marginLG
      }
    }
  };
}, nWe = pr("Modal", (t) => {
  const e = t.padding, n = t.fontSizeHeading5, r = t.lineHeightHeading5, i = bn(t, {
    modalBodyPadding: t.paddingLG,
    modalHeaderBg: t.colorBgElevated,
    modalHeaderPadding: `${e}px ${t.paddingLG}px`,
    modalHeaderBorderWidth: t.lineWidth,
    modalHeaderBorderStyle: t.lineType,
    modalHeaderTitleLineHeight: r,
    modalHeaderTitleFontSize: n,
    modalHeaderBorderColorSplit: t.colorSplit,
    modalHeaderCloseSize: r * n + e * 2,
    modalContentBg: t.colorBgElevated,
    modalHeadingColor: t.colorTextHeading,
    modalCloseColor: t.colorTextDescription,
    modalFooterBg: "transparent",
    modalFooterBorderColorSplit: t.colorSplit,
    modalFooterBorderStyle: t.lineType,
    modalFooterPaddingVertical: t.paddingXS,
    modalFooterPaddingHorizontal: t.padding,
    modalFooterBorderWidth: t.lineWidth,
    modalConfirmTitleFontSize: t.fontSizeLG,
    modalIconHoverColor: t.colorIconHover,
    modalConfirmIconSize: t.fontSize * t.lineHeight,
    modalCloseBtnSize: t.controlHeightLG * 0.55
  });
  return [KFe(i), JFe(i), eWe(i), qae(i), t.wireframe && tWe(i), B2(i, "zoom")];
}), WR = (t) => ({
  position: t || "absolute",
  inset: 0
}), rWe = (t) => {
  const {
    iconCls: e,
    motionDurationSlow: n,
    paddingXXS: r,
    marginXXS: i,
    prefixCls: a
  } = t;
  return {
    position: "absolute",
    inset: 0,
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    color: "#fff",
    background: new Hn("#000").setAlpha(0.5).toRgbString(),
    cursor: "pointer",
    opacity: 0,
    transition: `opacity ${n}`,
    [`.${a}-mask-info`]: k(k({}, Mg), {
      padding: `0 ${r}px`,
      [e]: {
        marginInlineEnd: i,
        svg: {
          verticalAlign: "baseline"
        }
      }
    })
  };
}, iWe = (t) => {
  const {
    previewCls: e,
    modalMaskBg: n,
    paddingSM: r,
    previewOperationColorDisabled: i,
    motionDurationSlow: a
  } = t, o = new Hn(n).setAlpha(0.1), s = o.clone().setAlpha(0.2);
  return {
    [`${e}-operations`]: k(k({}, Gn(t)), {
      display: "flex",
      flexDirection: "row-reverse",
      alignItems: "center",
      color: t.previewOperationColor,
      listStyle: "none",
      background: o.toRgbString(),
      pointerEvents: "auto",
      "&-operation": {
        marginInlineStart: r,
        padding: r,
        cursor: "pointer",
        transition: `all ${a}`,
        userSelect: "none",
        "&:hover": {
          background: s.toRgbString()
        },
        "&-disabled": {
          color: i,
          pointerEvents: "none"
        },
        "&:last-of-type": {
          marginInlineStart: 0
        }
      },
      "&-progress": {
        position: "absolute",
        left: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateX(-50%)"
      },
      "&-icon": {
        fontSize: t.previewOperationSize
      }
    })
  };
}, aWe = (t) => {
  const {
    modalMaskBg: e,
    iconCls: n,
    previewOperationColorDisabled: r,
    previewCls: i,
    zIndexPopup: a,
    motionDurationSlow: o
  } = t, s = new Hn(e).setAlpha(0.1), l = s.clone().setAlpha(0.2);
  return {
    [`${i}-switch-left, ${i}-switch-right`]: {
      position: "fixed",
      insetBlockStart: "50%",
      zIndex: a + 1,
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      width: t.imagePreviewSwitchSize,
      height: t.imagePreviewSwitchSize,
      marginTop: -t.imagePreviewSwitchSize / 2,
      color: t.previewOperationColor,
      background: s.toRgbString(),
      borderRadius: "50%",
      transform: "translateY(-50%)",
      cursor: "pointer",
      transition: `all ${o}`,
      pointerEvents: "auto",
      userSelect: "none",
      "&:hover": {
        background: l.toRgbString()
      },
      "&-disabled": {
        "&, &:hover": {
          color: r,
          background: "transparent",
          cursor: "not-allowed",
          [`> ${n}`]: {
            cursor: "not-allowed"
          }
        }
      },
      [`> ${n}`]: {
        fontSize: t.previewOperationSize
      }
    },
    [`${i}-switch-left`]: {
      insetInlineStart: t.marginSM
    },
    [`${i}-switch-right`]: {
      insetInlineEnd: t.marginSM
    }
  };
}, oWe = (t) => {
  const {
    motionEaseOut: e,
    previewCls: n,
    motionDurationSlow: r,
    componentCls: i
  } = t;
  return [
    {
      [`${i}-preview-root`]: {
        [n]: {
          height: "100%",
          textAlign: "center",
          pointerEvents: "none"
        },
        [`${n}-body`]: k(k({}, WR()), {
          overflow: "hidden"
        }),
        [`${n}-img`]: {
          maxWidth: "100%",
          maxHeight: "100%",
          verticalAlign: "middle",
          transform: "scale3d(1, 1, 1)",
          cursor: "grab",
          transition: `transform ${r} ${e} 0s`,
          userSelect: "none",
          pointerEvents: "auto",
          "&-wrapper": k(k({}, WR()), {
            transition: `transform ${r} ${e} 0s`,
            // https://github.com/ant-design/ant-design/issues/39913
            // TailwindCSS will reset img default style.
            // Let's set back.
            display: "flex",
            justifyContent: "center",
            alignItems: "center",
            "&::before": {
              display: "inline-block",
              width: 1,
              height: "50%",
              marginInlineEnd: -1,
              content: '""'
            }
          })
        },
        [`${n}-moving`]: {
          [`${n}-preview-img`]: {
            cursor: "grabbing",
            "&-wrapper": {
              transitionDuration: "0s"
            }
          }
        }
      }
    },
    // Override
    {
      [`${i}-preview-root`]: {
        [`${n}-wrap`]: {
          zIndex: t.zIndexPopup
        }
      }
    },
    // Preview operations & switch
    {
      [`${i}-preview-operations-wrapper`]: {
        position: "fixed",
        insetBlockStart: 0,
        insetInlineEnd: 0,
        zIndex: t.zIndexPopup + 1,
        width: "100%"
      },
      "&": [iWe(t), aWe(t)]
    }
  ];
}, sWe = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    // ============================== image ==============================
    [e]: {
      position: "relative",
      display: "inline-block",
      [`${e}-img`]: {
        width: "100%",
        height: "auto",
        verticalAlign: "middle"
      },
      [`${e}-img-placeholder`]: {
        backgroundColor: t.colorBgContainerDisabled,
        backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",
        backgroundRepeat: "no-repeat",
        backgroundPosition: "center center",
        backgroundSize: "30%"
      },
      [`${e}-mask`]: k({}, rWe(t)),
      [`${e}-mask:hover`]: {
        opacity: 1
      },
      [`${e}-placeholder`]: k({}, WR())
    }
  };
}, lWe = (t) => {
  const {
    previewCls: e
  } = t;
  return {
    [`${e}-root`]: B2(t, "zoom"),
    "&": vie(t, !0)
  };
}, Kae = pr("Image", (t) => {
  const e = `${t.componentCls}-preview`, n = bn(t, {
    previewCls: e,
    modalMaskBg: new Hn("#000").setAlpha(0.45).toRgbString(),
    imagePreviewSwitchSize: t.controlHeightLG
  });
  return [sWe(n), oWe(n), qae(bn(n, {
    componentCls: e
  })), lWe(n)];
}, (t) => ({
  zIndexPopup: t.zIndexPopupBase + 80,
  previewOperationColor: new Hn(t.colorTextLightSolid).toRgbString(),
  previewOperationColorDisabled: new Hn(t.colorTextLightSolid).setAlpha(0.25).toRgbString(),
  previewOperationSize: t.fontSizeIcon * 1.5
  // FIXME: fontSizeIconLG
})), Jae = {
  rotateLeft: D(N8, null, null),
  rotateRight: D(B8, null, null),
  zoomIn: D(z8, null, null),
  zoomOut: D(V8, null, null),
  close: D(tc, null, null),
  left: D(T8, null, null),
  right: D(Q2, null, null),
  flipX: D(pC, null, null),
  flipY: D(pC, {
    rotate: 90
  }, null)
}, uWe = () => ({
  previewPrefixCls: String,
  preview: Fo()
}), cWe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AImagePreviewGroup",
  inheritAttrs: !1,
  props: uWe(),
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const {
      prefixCls: i,
      rootPrefixCls: a
    } = hn("image", t), o = V(() => `${i.value}-preview`), [s, l] = Kae(i), u = V(() => {
      const {
        preview: c
      } = t;
      if (c === !1)
        return c;
      const f = typeof c == "object" ? c : {};
      return k(k({}, f), {
        rootClassName: l.value,
        transitionName: Wl(a.value, "zoom", f.transitionName),
        maskTransitionName: Wl(a.value, "fade", f.maskTransitionName)
      });
    });
    return () => s(D(jae, te(te({}, k(k({}, n), t)), {}, {
      preview: u.value,
      icons: Jae,
      previewPrefixCls: o.value
    }), r));
  }
}), fWe = cWe, Lc = ae({
  name: "AImage",
  inheritAttrs: !1,
  props: Uae(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const {
      prefixCls: i,
      rootPrefixCls: a,
      configProvider: o
    } = hn("image", t), [s, l] = Kae(i), u = V(() => {
      const {
        preview: c
      } = t;
      if (c === !1)
        return c;
      const f = typeof c == "object" ? c : {};
      return k(k({
        icons: Jae
      }, f), {
        transitionName: Wl(a.value, "zoom", f.transitionName),
        maskTransitionName: Wl(a.value, "fade", f.maskTransitionName)
      });
    });
    return () => {
      var c, f;
      const d = ((f = (c = o.locale) === null || c === void 0 ? void 0 : c.value) === null || f === void 0 ? void 0 : f.Image) || Nu.Image, h = () => D("div", {
        class: `${i.value}-mask-info`
      }, [D(q2, null, null), d == null ? void 0 : d.preview]), {
        previewMask: p = n.previewMask || h
      } = t;
      return s(D(FFe, te(te({}, k(k(k({}, r), t), {
        prefixCls: i.value
      })), {}, {
        preview: u.value,
        rootClassName: Re(t.rootClassName, l.value)
      }), k(k({}, n), {
        previewMask: typeof p == "function" ? p : null
      })));
    };
  }
});
Lc.PreviewGroup = fWe;
Lc.install = function(t) {
  return t.component(Lc.name, Lc), t.component(Lc.PreviewGroup.name, Lc.PreviewGroup), t;
};
var dWe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, name: "up", theme: "outlined" };
function wH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      hWe(t, i, n[i]);
    });
  }
  return t;
}
function hWe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var F8 = function(e, n) {
  var r = wH({}, e, n.attrs);
  return D(Rt, wH({}, r, {
    icon: dWe
  }), null);
};
F8.displayName = "UpOutlined";
F8.inheritAttrs = !1;
function QR() {
  return typeof BigInt == "function";
}
function jy(t) {
  let e = t.trim(), n = e.startsWith("-");
  n && (e = e.slice(1)), e = e.replace(/(\.\d*[^0])0*$/, "$1").replace(/\.0*$/, "").replace(/^0+/, ""), e.startsWith(".") && (e = `0${e}`);
  const r = e || "0", i = r.split("."), a = i[0] || "0", o = i[1] || "0";
  a === "0" && o === "0" && (n = !1);
  const s = n ? "-" : "";
  return {
    negative: n,
    negativeStr: s,
    trimStr: r,
    integerStr: a,
    decimalStr: o,
    fullStr: `${s}${r}`
  };
}
function W8(t) {
  const e = String(t);
  return !Number.isNaN(Number(e)) && e.includes("e");
}
function Nb(t) {
  const e = String(t);
  if (W8(t)) {
    let n = Number(e.slice(e.indexOf("e-") + 2));
    const r = e.match(/\.(\d+)/);
    return r != null && r[1] && (n += r[1].length), n;
  }
  return e.includes(".") && H8(e) ? e.length - e.indexOf(".") - 1 : 0;
}
function Q8(t) {
  let e = String(t);
  if (W8(t)) {
    if (t > Number.MAX_SAFE_INTEGER)
      return String(QR() ? BigInt(t).toString() : Number.MAX_SAFE_INTEGER);
    if (t < Number.MIN_SAFE_INTEGER)
      return String(QR() ? BigInt(t).toString() : Number.MIN_SAFE_INTEGER);
    e = t.toFixed(Nb(e));
  }
  return jy(e).fullStr;
}
function H8(t) {
  return typeof t == "number" ? !Number.isNaN(t) : t ? (
    // Normal type: 11.28
    /^\s*-?\d+(\.\d+)?\s*$/.test(t) || // Pre-number: 1.
    /^\s*-?\d+\.\s*$/.test(t) || // Post-number: .1
    /^\s*-?\.\d+\s*$/.test(t)
  ) : !1;
}
function eoe(t) {
  return !t && t !== 0 && !Number.isNaN(t) || !String(t).trim();
}
class Hd {
  constructor(e) {
    if (this.origin = "", eoe(e)) {
      this.empty = !0;
      return;
    }
    this.origin = String(e), this.number = Number(e);
  }
  negate() {
    return new Hd(-this.toNumber());
  }
  add(e) {
    if (this.isInvalidate())
      return new Hd(e);
    const n = Number(e);
    if (Number.isNaN(n))
      return this;
    const r = this.number + n;
    if (r > Number.MAX_SAFE_INTEGER)
      return new Hd(Number.MAX_SAFE_INTEGER);
    if (r < Number.MIN_SAFE_INTEGER)
      return new Hd(Number.MIN_SAFE_INTEGER);
    const i = Math.max(Nb(this.number), Nb(n));
    return new Hd(r.toFixed(i));
  }
  isEmpty() {
    return this.empty;
  }
  isNaN() {
    return Number.isNaN(this.number);
  }
  isInvalidate() {
    return this.isEmpty() || this.isNaN();
  }
  equals(e) {
    return this.toNumber() === (e == null ? void 0 : e.toNumber());
  }
  lessEquals(e) {
    return this.add(e.negate().toString()).toNumber() <= 0;
  }
  toNumber() {
    return this.number;
  }
  toString() {
    return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : Q8(this.number) : this.origin;
  }
}
class Mv {
  constructor(e) {
    if (this.origin = "", eoe(e)) {
      this.empty = !0;
      return;
    }
    if (this.origin = String(e), e === "-" || Number.isNaN(e)) {
      this.nan = !0;
      return;
    }
    let n = e;
    if (W8(n) && (n = Number(n)), n = typeof n == "string" ? n : Q8(n), H8(n)) {
      const r = jy(n);
      this.negative = r.negative;
      const i = r.trimStr.split(".");
      this.integer = BigInt(i[0]);
      const a = i[1] || "0";
      this.decimal = BigInt(a), this.decimalLen = a.length;
    } else
      this.nan = !0;
  }
  getMark() {
    return this.negative ? "-" : "";
  }
  getIntegerStr() {
    return this.integer.toString();
  }
  getDecimalStr() {
    return this.decimal.toString().padStart(this.decimalLen, "0");
  }
  /**
   * Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000
   * This is used for add function only.
   */
  alignDecimal(e) {
    const n = `${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e, "0")}`;
    return BigInt(n);
  }
  negate() {
    const e = new Mv(this.toString());
    return e.negative = !e.negative, e;
  }
  add(e) {
    if (this.isInvalidate())
      return new Mv(e);
    const n = new Mv(e);
    if (n.isInvalidate())
      return this;
    const r = Math.max(this.getDecimalStr().length, n.getDecimalStr().length), i = this.alignDecimal(r), a = n.alignDecimal(r), o = (i + a).toString(), {
      negativeStr: s,
      trimStr: l
    } = jy(o), u = `${s}${l.padStart(r + 1, "0")}`;
    return new Mv(`${u.slice(0, -r)}.${u.slice(-r)}`);
  }
  isEmpty() {
    return this.empty;
  }
  isNaN() {
    return this.nan;
  }
  isInvalidate() {
    return this.isEmpty() || this.isNaN();
  }
  equals(e) {
    return this.toString() === (e == null ? void 0 : e.toString());
  }
  lessEquals(e) {
    return this.add(e.negate().toString()).toNumber() <= 0;
  }
  toNumber() {
    return this.isNaN() ? NaN : Number(this.toString());
  }
  toString() {
    return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : jy(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr : this.origin;
  }
}
function bl(t) {
  return QR() ? new Mv(t) : new Hd(t);
}
function HR(t, e, n) {
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  if (t === "")
    return "";
  const {
    negativeStr: i,
    integerStr: a,
    decimalStr: o
  } = jy(t), s = `${e}${o}`, l = `${i}${a}`;
  if (n >= 0) {
    const u = Number(o[n]);
    if (u >= 5 && !r) {
      const c = bl(t).add(`${i}0.${"0".repeat(n)}${10 - u}`);
      return HR(c.toString(), e, n, r);
    }
    return n === 0 ? l : `${l}${e}${o.padEnd(n, "0").slice(0, n)}`;
  }
  return s === ".0" ? l : `${l}${s}`;
}
const pWe = 200, vWe = 600, gWe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "StepHandler",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    upDisabled: Boolean,
    downDisabled: Boolean,
    onStep: Ct()
  },
  slots: Object,
  setup(t, e) {
    let {
      slots: n,
      emit: r
    } = e;
    const i = ee(), a = (s, l) => {
      s.preventDefault(), r("step", l);
      function u() {
        r("step", l), i.value = setTimeout(u, pWe);
      }
      i.value = setTimeout(u, vWe);
    }, o = () => {
      clearTimeout(i.value);
    };
    return Qt(() => {
      o();
    }), () => {
      if (i8())
        return null;
      const {
        prefixCls: s,
        upDisabled: l,
        downDisabled: u
      } = t, c = `${s}-handler`, f = Re(c, `${c}-up`, {
        [`${c}-up-disabled`]: l
      }), d = Re(c, `${c}-down`, {
        [`${c}-down-disabled`]: u
      }), h = {
        unselectable: "on",
        role: "button",
        onMouseup: o,
        onMouseleave: o
      }, {
        upNode: p,
        downNode: v
      } = n;
      return D("div", {
        class: `${c}-wrap`
      }, [D("span", te(te({}, h), {}, {
        onMousedown: (g) => {
          a(g, !0);
        },
        "aria-label": "Increase Value",
        "aria-disabled": l,
        class: f
      }), [(p == null ? void 0 : p()) || D("span", {
        unselectable: "on",
        class: `${s}-handler-up-inner`
      }, null)]), D("span", te(te({}, h), {}, {
        onMousedown: (g) => {
          a(g, !1);
        },
        "aria-label": "Decrease Value",
        "aria-disabled": u,
        class: d
      }), [(v == null ? void 0 : v()) || D("span", {
        unselectable: "on",
        class: `${s}-handler-down-inner`
      }, null)])]);
    };
  }
});
function mWe(t, e) {
  const n = ee(null);
  function r() {
    try {
      const {
        selectionStart: a,
        selectionEnd: o,
        value: s
      } = t.value, l = s.substring(0, a), u = s.substring(o);
      n.value = {
        start: a,
        end: o,
        value: s,
        beforeTxt: l,
        afterTxt: u
      };
    } catch {
    }
  }
  function i() {
    if (t.value && n.value && e.value)
      try {
        const {
          value: a
        } = t.value, {
          beforeTxt: o,
          afterTxt: s,
          start: l
        } = n.value;
        let u = a.length;
        if (a.endsWith(s))
          u = a.length - n.value.afterTxt.length;
        else if (a.startsWith(o))
          u = o.length;
        else {
          const c = o[l - 1], f = a.indexOf(c, l - 1);
          f !== -1 && (u = f + 1);
        }
        t.value.setSelectionRange(u, u);
      } catch (a) {
        Nh(!1, `Something warning of cursor restore. Please fire issue about this: ${a.message}`);
      }
  }
  return [r, i];
}
const yWe = () => {
  const t = ve(0), e = () => {
    en.cancel(t.value);
  };
  return Qt(() => {
    e();
  }), (n) => {
    e(), t.value = en(() => {
      n();
    });
  };
};
var bWe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const CH = (t, e) => t || e.isEmpty() ? e.toString() : e.toNumber(), TH = (t) => {
  const e = bl(t);
  return e.isInvalidate() ? null : e;
}, toe = () => ({
  /** value will show as string */
  stringMode: Tt(),
  defaultValue: or([String, Number]),
  value: or([String, Number]),
  prefixCls: rr(),
  min: or([String, Number]),
  max: or([String, Number]),
  step: or([String, Number], 1),
  tabindex: Number,
  controls: Tt(!0),
  readonly: Tt(),
  disabled: Tt(),
  autofocus: Tt(),
  keyboard: Tt(!0),
  /** Parse display value to validate number */
  parser: Ct(),
  /** Transform `value` to display value show in input */
  formatter: Ct(),
  /** Syntactic sugar of `formatter`. Config precision of display. */
  precision: Number,
  /** Syntactic sugar of `formatter`. Config decimal separator of display. */
  decimalSeparator: String,
  onInput: Ct(),
  onChange: Ct(),
  onPressEnter: Ct(),
  onStep: Ct(),
  onBlur: Ct(),
  onFocus: Ct()
}), _We = ae({
  compatConfig: {
    MODE: 3
  },
  name: "InnerInputNumber",
  inheritAttrs: !1,
  props: k(k({}, toe()), {
    lazy: Boolean
  }),
  slots: Object,
  setup(t, e) {
    let {
      attrs: n,
      slots: r,
      emit: i,
      expose: a
    } = e;
    const o = ve(), s = ve(!1), l = ve(!1), u = ve(!1), c = ve(bl(t.value));
    function f(j) {
      t.value === void 0 && (c.value = j);
    }
    const d = (j, Y) => {
      if (!Y)
        return t.precision >= 0 ? t.precision : Math.max(Nb(j), Nb(t.step));
    }, h = (j) => {
      const Y = String(j);
      if (t.parser)
        return t.parser(Y);
      let ne = Y;
      return t.decimalSeparator && (ne = ne.replace(t.decimalSeparator, ".")), ne.replace(/[^\w.-]+/g, "");
    }, p = ve(""), v = (j, Y) => {
      if (t.formatter)
        return t.formatter(j, {
          userTyping: Y,
          input: String(p.value)
        });
      let ne = typeof j == "number" ? Q8(j) : j;
      if (!Y) {
        const fe = d(ne, Y);
        if (H8(ne) && (t.decimalSeparator || fe >= 0)) {
          const ue = t.decimalSeparator || ".";
          ne = HR(ne, ue, fe);
        }
      }
      return ne;
    }, g = (() => {
      const j = t.value;
      return c.value.isInvalidate() && ["string", "number"].includes(typeof j) ? Number.isNaN(j) ? "" : j : v(c.value.toString(), !1);
    })();
    p.value = g;
    function m(j, Y) {
      p.value = v(
        // Invalidate number is sometime passed by external control, we should let it go
        // Otherwise is controlled by internal interactive logic which check by userTyping
        // You can ref 'show limited value when input is not focused' test for more info.
        j.isInvalidate() ? j.toString(!1) : j.toString(!Y),
        Y
      );
    }
    const y = V(() => TH(t.max)), _ = V(() => TH(t.min)), O = V(() => !y.value || !c.value || c.value.isInvalidate() ? !1 : y.value.lessEquals(c.value)), S = V(() => !_.value || !c.value || c.value.isInvalidate() ? !1 : c.value.lessEquals(_.value)), [x, C] = mWe(o, s), P = (j) => y.value && !j.lessEquals(y.value) ? y.value : _.value && !_.value.lessEquals(j) ? _.value : null, $ = (j) => !P(j), T = (j, Y) => {
      var ne;
      let fe = j, ue = $(fe) || fe.isEmpty();
      if (!fe.isEmpty() && !Y && (fe = P(fe) || fe, ue = !0), !t.readonly && !t.disabled && ue) {
        const ye = fe.toString(), se = d(ye, Y);
        return se >= 0 && (fe = bl(HR(ye, ".", se))), fe.equals(c.value) || (f(fe), (ne = t.onChange) === null || ne === void 0 || ne.call(t, fe.isEmpty() ? null : CH(t.stringMode, fe)), t.value === void 0 && m(fe, Y)), fe;
      }
      return c.value;
    }, E = yWe(), M = (j) => {
      var Y;
      if (x(), p.value = j, !u.value) {
        const ne = h(j), fe = bl(ne);
        fe.isNaN() || T(fe, !0);
      }
      (Y = t.onInput) === null || Y === void 0 || Y.call(t, j), E(() => {
        let ne = j;
        t.parser || (ne = j.replace(/。/g, ".")), ne !== j && M(ne);
      });
    }, R = () => {
      u.value = !0;
    }, N = () => {
      u.value = !1, M(o.value.value);
    }, I = (j) => {
      M(j.target.value);
    }, B = (j) => {
      var Y, ne;
      if (j && O.value || !j && S.value)
        return;
      l.value = !1;
      let fe = bl(t.step);
      j || (fe = fe.negate());
      const ue = (c.value || bl(0)).add(fe.toString()), ye = T(ue, !1);
      (Y = t.onStep) === null || Y === void 0 || Y.call(t, CH(t.stringMode, ye), {
        offset: t.step,
        type: j ? "up" : "down"
      }), (ne = o.value) === null || ne === void 0 || ne.focus();
    }, Q = (j) => {
      const Y = bl(h(p.value));
      let ne = Y;
      Y.isNaN() ? ne = c.value : ne = T(Y, j), t.value !== void 0 ? m(c.value, !1) : ne.isNaN() || m(ne, !1);
    }, W = (j) => {
      var Y;
      const {
        which: ne
      } = j;
      l.value = !0, ne === Me.ENTER && (u.value || (l.value = !1), Q(!1), (Y = t.onPressEnter) === null || Y === void 0 || Y.call(t, j)), t.keyboard !== !1 && !u.value && [Me.UP, Me.DOWN].includes(ne) && (B(Me.UP === ne), j.preventDefault());
    }, H = () => {
      l.value = !1;
    }, U = (j) => {
      Q(!1), s.value = !1, l.value = !1, i("blur", j);
    };
    return me(() => t.precision, () => {
      c.value.isInvalidate() || m(c.value, !1);
    }, {
      flush: "post"
    }), me(() => t.value, () => {
      const j = bl(t.value);
      c.value = j;
      const Y = bl(h(p.value));
      (!j.equals(Y) || !l.value || t.formatter) && m(j, l.value);
    }, {
      flush: "post"
    }), me(p, () => {
      t.formatter && C();
    }, {
      flush: "post"
    }), me(() => t.disabled, (j) => {
      j && (s.value = !1);
    }), a({
      focus: () => {
        var j;
        (j = o.value) === null || j === void 0 || j.focus();
      },
      blur: () => {
        var j;
        (j = o.value) === null || j === void 0 || j.blur();
      }
    }), () => {
      const j = k(k({}, n), t), {
        prefixCls: Y = "rc-input-number",
        min: ne,
        max: fe,
        step: ue = 1,
        defaultValue: ye,
        value: se,
        disabled: he,
        readonly: re,
        keyboard: q,
        controls: K = !0,
        autofocus: de,
        stringMode: xe,
        parser: we,
        formatter: He,
        precision: je,
        decimalSeparator: Be,
        onChange: Le,
        onInput: Pe,
        onPressEnter: Fe,
        onStep: Ye,
        lazy: xt,
        class: It,
        style: an
      } = j, Ae = bWe(j, ["prefixCls", "min", "max", "step", "defaultValue", "value", "disabled", "readonly", "keyboard", "controls", "autofocus", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "lazy", "class", "style"]), {
        upHandler: gt,
        downHandler: Xt
      } = r, Bn = `${Y}-input`, Dn = {};
      return xt ? Dn.onChange = I : Dn.onInput = I, D("div", {
        class: Re(Y, It, {
          [`${Y}-focused`]: s.value,
          [`${Y}-disabled`]: he,
          [`${Y}-readonly`]: re,
          [`${Y}-not-a-number`]: c.value.isNaN(),
          [`${Y}-out-of-range`]: !c.value.isInvalidate() && !$(c.value)
        }),
        style: an,
        onKeydown: W,
        onKeyup: H
      }, [K && D(gWe, {
        prefixCls: Y,
        upDisabled: O.value,
        downDisabled: S.value,
        onStep: B
      }, {
        upNode: gt,
        downNode: Xt
      }), D("div", {
        class: `${Bn}-wrap`
      }, [D("input", te(te(te({
        autofocus: de,
        autocomplete: "off",
        role: "spinbutton",
        "aria-valuemin": ne,
        "aria-valuemax": fe,
        "aria-valuenow": c.value.isInvalidate() ? null : c.value.toString(),
        step: ue
      }, Ae), {}, {
        ref: o,
        class: Bn,
        value: p.value,
        disabled: he,
        readonly: re,
        onFocus: (Dr) => {
          s.value = !0, i("focus", Dr);
        }
      }, Dn), {}, {
        onBlur: U,
        onCompositionstart: R,
        onCompositionend: N
      }), null)])]);
    };
  }
});
function _E(t) {
  return t != null;
}
const OWe = (t) => {
  const {
    componentCls: e,
    lineWidth: n,
    lineType: r,
    colorBorder: i,
    borderRadius: a,
    fontSizeLG: o,
    controlHeightLG: s,
    controlHeightSM: l,
    colorError: u,
    inputPaddingHorizontalSM: c,
    colorTextDescription: f,
    motionDurationMid: d,
    colorPrimary: h,
    controlHeight: p,
    inputPaddingHorizontal: v,
    colorBgContainer: g,
    colorTextDisabled: m,
    borderRadiusSM: y,
    borderRadiusLG: _,
    controlWidth: O,
    handleVisible: S
  } = t;
  return [
    {
      [e]: k(k(k(k({}, Gn(t)), G2(t)), H2(t, e)), {
        display: "inline-block",
        width: O,
        margin: 0,
        padding: 0,
        border: `${n}px ${r} ${i}`,
        borderRadius: a,
        "&-rtl": {
          direction: "rtl",
          [`${e}-input`]: {
            direction: "rtl"
          }
        },
        "&-lg": {
          padding: 0,
          fontSize: o,
          borderRadius: _,
          [`input${e}-input`]: {
            height: s - 2 * n
          }
        },
        "&-sm": {
          padding: 0,
          borderRadius: y,
          [`input${e}-input`]: {
            height: l - 2 * n,
            padding: `0 ${c}px`
          }
        },
        "&:hover": k({}, X_(t)),
        "&-focused": k({}, cC(t)),
        "&-disabled": k(k({}, Zie(t)), {
          [`${e}-input`]: {
            cursor: "not-allowed"
          }
        }),
        // ===================== Out Of Range =====================
        "&-out-of-range": {
          input: {
            color: u
          }
        },
        // Style for input-group: input with label, with button or dropdown...
        "&-group": k(k(k({}, Gn(t)), Yie(t)), {
          "&-wrapper": {
            display: "inline-block",
            textAlign: "start",
            verticalAlign: "top",
            [`${e}-affix-wrapper`]: {
              width: "100%"
            },
            // Size
            "&-lg": {
              [`${e}-group-addon`]: {
                borderRadius: _
              }
            },
            "&-sm": {
              [`${e}-group-addon`]: {
                borderRadius: y
              }
            }
          }
        }),
        [e]: {
          "&-input": k(k({
            width: "100%",
            height: p - 2 * n,
            padding: `0 ${v}px`,
            textAlign: "start",
            backgroundColor: "transparent",
            border: 0,
            borderRadius: a,
            outline: 0,
            transition: `all ${d} linear`,
            appearance: "textfield",
            color: t.colorText,
            fontSize: "inherit",
            verticalAlign: "top"
          }, jie(t.colorTextPlaceholder)), {
            '&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
              margin: 0,
              /* stylelint-disable-next-line property-no-vendor-prefix */
              webkitAppearance: "none",
              appearance: "none"
            }
          })
        }
      })
    },
    // Handler
    {
      [e]: {
        [`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]: {
          opacity: 1
        },
        [`${e}-handler-wrap`]: {
          position: "absolute",
          insetBlockStart: 0,
          insetInlineEnd: 0,
          width: t.handleWidth,
          height: "100%",
          background: g,
          borderStartStartRadius: 0,
          borderStartEndRadius: a,
          borderEndEndRadius: a,
          borderEndStartRadius: 0,
          opacity: S === !0 ? 1 : 0,
          display: "flex",
          flexDirection: "column",
          alignItems: "stretch",
          transition: `opacity ${d} linear ${d}`,
          // Fix input number inside Menu makes icon too large
          // We arise the selector priority by nest selector here
          // https://github.com/ant-design/ant-design/issues/14367
          [`${e}-handler`]: {
            display: "flex",
            alignItems: "center",
            justifyContent: "center",
            flex: "auto",
            height: "40%",
            [`
              ${e}-handler-up-inner,
              ${e}-handler-down-inner
            `]: {
              marginInlineEnd: 0,
              fontSize: t.handleFontSize
            }
          }
        },
        [`${e}-handler`]: {
          height: "50%",
          overflow: "hidden",
          color: f,
          fontWeight: "bold",
          lineHeight: 0,
          textAlign: "center",
          cursor: "pointer",
          borderInlineStart: `${n}px ${r} ${i}`,
          transition: `all ${d} linear`,
          "&:active": {
            background: t.colorFillAlter
          },
          // Hover
          "&:hover": {
            height: "60%",
            [`
              ${e}-handler-up-inner,
              ${e}-handler-down-inner
            `]: {
              color: h
            }
          },
          "&-up-inner, &-down-inner": k(k({}, hm()), {
            color: f,
            transition: `all ${d} linear`,
            userSelect: "none"
          })
        },
        [`${e}-handler-up`]: {
          borderStartEndRadius: a
        },
        [`${e}-handler-down`]: {
          borderBlockStart: `${n}px ${r} ${i}`,
          borderEndEndRadius: a
        },
        // Disabled
        "&-disabled, &-readonly": {
          [`${e}-handler-wrap`]: {
            display: "none"
          }
        },
        [`
          ${e}-handler-up-disabled,
          ${e}-handler-down-disabled
        `]: {
          cursor: "not-allowed"
        },
        [`
          ${e}-handler-up-disabled:hover &-handler-up-inner,
          ${e}-handler-down-disabled:hover &-handler-down-inner
        `]: {
          color: m
        }
      }
    },
    // Border-less
    {
      [`${e}-borderless`]: {
        borderColor: "transparent",
        boxShadow: "none",
        [`${e}-handler-down`]: {
          borderBlockStartWidth: 0
        }
      }
    }
  ];
}, SWe = (t) => {
  const {
    componentCls: e,
    inputPaddingHorizontal: n,
    inputAffixPadding: r,
    controlWidth: i,
    borderRadiusLG: a,
    borderRadiusSM: o
  } = t;
  return {
    [`${e}-affix-wrapper`]: k(k(k({}, G2(t)), H2(t, `${e}-affix-wrapper`)), {
      // or number handler will cover form status
      position: "relative",
      display: "inline-flex",
      width: i,
      padding: 0,
      paddingInlineStart: n,
      "&-lg": {
        borderRadius: a
      },
      "&-sm": {
        borderRadius: o
      },
      [`&:not(${e}-affix-wrapper-disabled):hover`]: k(k({}, X_(t)), {
        zIndex: 1
      }),
      "&-focused, &:focus": {
        zIndex: 1
      },
      "&-disabled": {
        [`${e}[disabled]`]: {
          background: "transparent"
        }
      },
      [`> div${e}`]: {
        width: "100%",
        border: "none",
        outline: "none",
        [`&${e}-focused`]: {
          boxShadow: "none !important"
        }
      },
      [`input${e}-input`]: {
        padding: 0
      },
      "&::before": {
        width: 0,
        visibility: "hidden",
        content: '"\\a0"'
      },
      [`${e}-handler-wrap`]: {
        zIndex: 2
      },
      [e]: {
        "&-prefix, &-suffix": {
          display: "flex",
          flex: "none",
          alignItems: "center",
          pointerEvents: "none"
        },
        "&-prefix": {
          marginInlineEnd: r
        },
        "&-suffix": {
          position: "absolute",
          insetBlockStart: 0,
          insetInlineEnd: 0,
          zIndex: 1,
          height: "100%",
          marginInlineEnd: n,
          marginInlineStart: r
        }
      }
    })
  };
}, xWe = pr("InputNumber", (t) => {
  const e = qie(t);
  return [
    OWe(e),
    SWe(e),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    z2(e)
  ];
}, (t) => ({
  controlWidth: 90,
  handleWidth: t.controlHeightSM - t.lineWidth * 2,
  handleFontSize: t.fontSize / 2,
  handleVisible: "auto"
}));
var wWe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const PH = toe(), CWe = () => k(k({}, PH), {
  size: rr(),
  bordered: Tt(!0),
  placeholder: String,
  name: String,
  id: String,
  type: String,
  addonBefore: oe.any,
  addonAfter: oe.any,
  prefix: oe.any,
  "onUpdate:value": PH.onChange,
  valueModifiers: Object,
  status: rr()
}), OE = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AInputNumber",
  inheritAttrs: !1,
  props: CWe(),
  // emits: ['focus', 'blur', 'change', 'input', 'update:value'],
  slots: Object,
  setup(t, e) {
    let {
      emit: n,
      expose: r,
      attrs: i,
      slots: a
    } = e;
    var o;
    const s = Ul(), l = Qs.useInject(), u = V(() => U_(l.status, t.status)), {
      prefixCls: c,
      size: f,
      direction: d,
      disabled: h
    } = hn("input-number", t), {
      compactSize: p,
      compactItemClassnames: v
    } = L2(c, d), g = Vl(), m = V(() => {
      var R;
      return (R = h.value) !== null && R !== void 0 ? R : g.value;
    }), [y, _] = xWe(c), O = V(() => p.value || f.value), S = ve((o = t.value) !== null && o !== void 0 ? o : t.defaultValue), x = ve(!1);
    me(() => t.value, () => {
      S.value = t.value;
    });
    const C = ve(null), P = () => {
      var R;
      (R = C.value) === null || R === void 0 || R.focus();
    };
    r({
      focus: P,
      blur: () => {
        var R;
        (R = C.value) === null || R === void 0 || R.blur();
      }
    });
    const T = (R) => {
      t.value === void 0 && (S.value = R), n("update:value", R), n("change", R), s.onFieldChange();
    }, E = (R) => {
      x.value = !1, n("blur", R), s.onFieldBlur();
    }, M = (R) => {
      x.value = !0, n("focus", R);
    };
    return () => {
      var R, N, I, B;
      const {
        hasFeedback: Q,
        isFormItemInput: W,
        feedbackIcon: H
      } = l, U = (R = t.id) !== null && R !== void 0 ? R : s.id.value, j = k(k(k({}, i), t), {
        id: U,
        disabled: m.value
      }), {
        class: Y,
        bordered: ne,
        readonly: fe,
        style: ue,
        addonBefore: ye = (N = a.addonBefore) === null || N === void 0 ? void 0 : N.call(a),
        addonAfter: se = (I = a.addonAfter) === null || I === void 0 ? void 0 : I.call(a),
        prefix: he = (B = a.prefix) === null || B === void 0 ? void 0 : B.call(a),
        valueModifiers: re = {}
      } = j, q = wWe(j, ["class", "bordered", "readonly", "style", "addonBefore", "addonAfter", "prefix", "valueModifiers"]), K = c.value, de = Re({
        [`${K}-lg`]: O.value === "large",
        [`${K}-sm`]: O.value === "small",
        [`${K}-rtl`]: d.value === "rtl",
        [`${K}-readonly`]: fe,
        [`${K}-borderless`]: !ne,
        [`${K}-in-form-item`]: W
      }, Eu(K, u.value), Y, v.value, _.value);
      let xe = D(_We, te(te({}, si(q, ["size", "defaultValue"])), {}, {
        ref: C,
        lazy: !!re.lazy,
        value: S.value,
        class: de,
        prefixCls: K,
        readonly: fe,
        onChange: T,
        onBlur: E,
        onFocus: M
      }), {
        upHandler: a.upIcon ? () => D("span", {
          class: `${K}-handler-up-inner`
        }, [a.upIcon()]) : () => D(F8, {
          class: `${K}-handler-up-inner`
        }, null),
        downHandler: a.downIcon ? () => D("span", {
          class: `${K}-handler-down-inner`
        }, [a.downIcon()]) : () => D(D2, {
          class: `${K}-handler-down-inner`
        }, null)
      });
      const we = _E(ye) || _E(se), He = _E(he);
      if (He || Q) {
        const je = Re(`${K}-affix-wrapper`, Eu(`${K}-affix-wrapper`, u.value, Q), {
          [`${K}-affix-wrapper-focused`]: x.value,
          [`${K}-affix-wrapper-disabled`]: m.value,
          [`${K}-affix-wrapper-sm`]: O.value === "small",
          [`${K}-affix-wrapper-lg`]: O.value === "large",
          [`${K}-affix-wrapper-rtl`]: d.value === "rtl",
          [`${K}-affix-wrapper-readonly`]: fe,
          [`${K}-affix-wrapper-borderless`]: !ne,
          // className will go to addon wrapper
          [`${Y}`]: !we && Y
        }, _.value);
        xe = D("div", {
          class: je,
          style: ue,
          onClick: P
        }, [He && D("span", {
          class: `${K}-prefix`
        }, [he]), xe, Q && D("span", {
          class: `${K}-suffix`
        }, [H])]);
      }
      if (we) {
        const je = `${K}-group`, Be = `${je}-addon`, Le = ye ? D("div", {
          class: Be
        }, [ye]) : null, Pe = se ? D("div", {
          class: Be
        }, [se]) : null, Fe = Re(`${K}-wrapper`, je, {
          [`${je}-rtl`]: d.value === "rtl"
        }, _.value), Ye = Re(`${K}-group-wrapper`, {
          [`${K}-group-wrapper-sm`]: O.value === "small",
          [`${K}-group-wrapper-lg`]: O.value === "large",
          [`${K}-group-wrapper-rtl`]: d.value === "rtl"
        }, Eu(`${c}-group-wrapper`, u.value, Q), Y, _.value);
        xe = D("div", {
          class: Ye,
          style: ue
        }, [D("div", {
          class: Fe
        }, [Le && D(iC, null, {
          default: () => [D(rC, null, {
            default: () => [Le]
          })]
        }), xe, Pe && D(iC, null, {
          default: () => [D(rC, null, {
            default: () => [Pe]
          })]
        })])]);
      }
      return y(Or(xe, {
        style: ue
      }));
    };
  }
}), Y_ = k(OE, {
  install: (t) => (t.component(OE.name, OE), t)
});
function TWe(t, e, n) {
  var r = n || {}, i = r.noTrailing, a = i === void 0 ? !1 : i, o = r.noLeading, s = o === void 0 ? !1 : o, l = r.debounceMode, u = l === void 0 ? void 0 : l, c, f = !1, d = 0;
  function h() {
    c && clearTimeout(c);
  }
  function p(g) {
    var m = g || {}, y = m.upcomingOnly, _ = y === void 0 ? !1 : y;
    h(), f = !_;
  }
  function v() {
    for (var g = arguments.length, m = new Array(g), y = 0; y < g; y++)
      m[y] = arguments[y];
    var _ = this, O = Date.now() - d;
    if (f)
      return;
    function S() {
      d = Date.now(), e.apply(_, m);
    }
    function x() {
      c = void 0;
    }
    !s && u && !c && S(), h(), u === void 0 && O > t ? s ? (d = Date.now(), a || (c = setTimeout(u ? x : S, t))) : S() : a !== !0 && (c = setTimeout(u ? x : S, u === void 0 ? t - O : t));
  }
  return v.cancel = p, v;
}
function PWe(t, e, n) {
  var r = {}, i = r.atBegin, a = i === void 0 ? !1 : i;
  return TWe(t, e, {
    debounceMode: a !== !1
  });
}
const $We = new qt("antSpinMove", {
  to: {
    opacity: 1
  }
}), AWe = new qt("antRotate", {
  to: {
    transform: "rotate(405deg)"
  }
}), EWe = (t) => ({
  [`${t.componentCls}`]: k(k({}, Gn(t)), {
    position: "absolute",
    display: "none",
    color: t.colorPrimary,
    textAlign: "center",
    verticalAlign: "middle",
    opacity: 0,
    transition: `transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,
    "&-spinning": {
      position: "static",
      display: "inline-block",
      opacity: 1
    },
    "&-nested-loading": {
      position: "relative",
      [`> div > ${t.componentCls}`]: {
        position: "absolute",
        top: 0,
        insetInlineStart: 0,
        zIndex: 4,
        display: "block",
        width: "100%",
        height: "100%",
        maxHeight: t.contentHeight,
        [`${t.componentCls}-dot`]: {
          position: "absolute",
          top: "50%",
          insetInlineStart: "50%",
          margin: -t.spinDotSize / 2
        },
        [`${t.componentCls}-text`]: {
          position: "absolute",
          top: "50%",
          width: "100%",
          paddingTop: (t.spinDotSize - t.fontSize) / 2 + 2,
          textShadow: `0 1px 2px ${t.colorBgContainer}`
          // FIXME: shadow
        },
        [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
          marginTop: -(t.spinDotSize / 2) - 10
        },
        "&-sm": {
          [`${t.componentCls}-dot`]: {
            margin: -t.spinDotSizeSM / 2
          },
          [`${t.componentCls}-text`]: {
            paddingTop: (t.spinDotSizeSM - t.fontSize) / 2 + 2
          },
          [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
            marginTop: -(t.spinDotSizeSM / 2) - 10
          }
        },
        "&-lg": {
          [`${t.componentCls}-dot`]: {
            margin: -(t.spinDotSizeLG / 2)
          },
          [`${t.componentCls}-text`]: {
            paddingTop: (t.spinDotSizeLG - t.fontSize) / 2 + 2
          },
          [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
            marginTop: -(t.spinDotSizeLG / 2) - 10
          }
        }
      },
      [`${t.componentCls}-container`]: {
        position: "relative",
        transition: `opacity ${t.motionDurationSlow}`,
        "&::after": {
          position: "absolute",
          top: 0,
          insetInlineEnd: 0,
          bottom: 0,
          insetInlineStart: 0,
          zIndex: 10,
          width: "100%",
          height: "100%",
          background: t.colorBgContainer,
          opacity: 0,
          transition: `all ${t.motionDurationSlow}`,
          content: '""',
          pointerEvents: "none"
        }
      },
      [`${t.componentCls}-blur`]: {
        clear: "both",
        opacity: 0.5,
        userSelect: "none",
        pointerEvents: "none",
        "&::after": {
          opacity: 0.4,
          pointerEvents: "auto"
        }
      }
    },
    // tip
    // ------------------------------
    "&-tip": {
      color: t.spinDotDefault
    },
    // dots
    // ------------------------------
    [`${t.componentCls}-dot`]: {
      position: "relative",
      display: "inline-block",
      fontSize: t.spinDotSize,
      width: "1em",
      height: "1em",
      "&-item": {
        position: "absolute",
        display: "block",
        width: (t.spinDotSize - t.marginXXS / 2) / 2,
        height: (t.spinDotSize - t.marginXXS / 2) / 2,
        backgroundColor: t.colorPrimary,
        borderRadius: "100%",
        transform: "scale(0.75)",
        transformOrigin: "50% 50%",
        opacity: 0.3,
        animationName: $We,
        animationDuration: "1s",
        animationIterationCount: "infinite",
        animationTimingFunction: "linear",
        animationDirection: "alternate",
        "&:nth-child(1)": {
          top: 0,
          insetInlineStart: 0
        },
        "&:nth-child(2)": {
          top: 0,
          insetInlineEnd: 0,
          animationDelay: "0.4s"
        },
        "&:nth-child(3)": {
          insetInlineEnd: 0,
          bottom: 0,
          animationDelay: "0.8s"
        },
        "&:nth-child(4)": {
          bottom: 0,
          insetInlineStart: 0,
          animationDelay: "1.2s"
        }
      },
      "&-spin": {
        transform: "rotate(45deg)",
        animationName: AWe,
        animationDuration: "1.2s",
        animationIterationCount: "infinite",
        animationTimingFunction: "linear"
      }
    },
    // Sizes
    // ------------------------------
    // small
    [`&-sm ${t.componentCls}-dot`]: {
      fontSize: t.spinDotSizeSM,
      i: {
        width: (t.spinDotSizeSM - t.marginXXS / 2) / 2,
        height: (t.spinDotSizeSM - t.marginXXS / 2) / 2
      }
    },
    // large
    [`&-lg ${t.componentCls}-dot`]: {
      fontSize: t.spinDotSizeLG,
      i: {
        width: (t.spinDotSizeLG - t.marginXXS) / 2,
        height: (t.spinDotSizeLG - t.marginXXS) / 2
      }
    },
    [`&${t.componentCls}-show-text ${t.componentCls}-text`]: {
      display: "block"
    }
  })
}), MWe = pr("Spin", (t) => {
  const e = bn(t, {
    spinDotDefault: t.colorTextDescription,
    spinDotSize: t.controlHeightLG / 2,
    spinDotSizeSM: t.controlHeightLG * 0.35,
    spinDotSizeLG: t.controlHeight
  });
  return [EWe(e)];
}, {
  contentHeight: 400
});
var IWe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const DWe = () => ({
  prefixCls: String,
  spinning: {
    type: Boolean,
    default: void 0
  },
  size: String,
  wrapperClassName: String,
  tip: oe.any,
  delay: Number,
  indicator: oe.any
});
let nw = null;
function RWe(t, e) {
  return !!t && !!e && !isNaN(Number(e));
}
function kWe(t) {
  const e = t.indicator;
  nw = typeof e == "function" ? e : () => D(e, null, null);
}
const Zy = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ASpin",
  inheritAttrs: !1,
  props: li(DWe(), {
    size: "default",
    spinning: !0,
    wrapperClassName: ""
  }),
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const {
      prefixCls: i,
      size: a,
      direction: o
    } = hn("spin", t), [s, l] = MWe(i), u = ve(t.spinning && !RWe(t.spinning, t.delay));
    let c;
    return me([() => t.spinning, () => t.delay], () => {
      c == null || c.cancel(), c = PWe(t.delay, () => {
        u.value = t.spinning;
      }), c == null || c();
    }, {
      immediate: !0,
      flush: "post"
    }), Qt(() => {
      c == null || c.cancel();
    }), () => {
      var f, d;
      const {
        class: h
      } = n, p = IWe(n, ["class"]), {
        tip: v = (f = r.tip) === null || f === void 0 ? void 0 : f.call(r)
      } = t, g = (d = r.default) === null || d === void 0 ? void 0 : d.call(r), m = {
        [l.value]: !0,
        [i.value]: !0,
        [`${i.value}-sm`]: a.value === "small",
        [`${i.value}-lg`]: a.value === "large",
        [`${i.value}-spinning`]: u.value,
        [`${i.value}-show-text`]: !!v,
        [`${i.value}-rtl`]: o.value === "rtl",
        [h]: !!h
      };
      function y(O) {
        const S = `${O}-dot`;
        let x = y2(r, t, "indicator");
        return x === null ? null : (Array.isArray(x) && (x = x.length === 1 ? x[0] : x), df(x) ? ku(x, {
          class: S
        }) : nw && df(nw()) ? ku(nw(), {
          class: S
        }) : D("span", {
          class: `${S} ${O}-dot-spin`
        }, [D("i", {
          class: `${O}-dot-item`
        }, null), D("i", {
          class: `${O}-dot-item`
        }, null), D("i", {
          class: `${O}-dot-item`
        }, null), D("i", {
          class: `${O}-dot-item`
        }, null)]));
      }
      const _ = D("div", te(te({}, p), {}, {
        class: m,
        "aria-live": "polite",
        "aria-busy": u.value
      }), [y(i.value), v ? D("div", {
        class: `${i.value}-text`
      }, [v]) : null]);
      if (g && Zl(g).length) {
        const O = {
          [`${i.value}-container`]: !0,
          [`${i.value}-blur`]: u.value
        };
        return s(D("div", {
          class: [`${i.value}-nested-loading`, t.wrapperClassName, l.value]
        }, [u.value && D("div", {
          key: "loading"
        }, [_]), D("div", {
          class: O,
          key: "container"
        }, [g])]));
      }
      return s(_);
    };
  }
});
Zy.setDefaultIndicator = kWe;
Zy.install = function(t) {
  return t.component(Zy.name, Zy), t;
};
var LWe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
let GR;
const NWe = (t) => {
  GR = {
    x: t.pageX,
    y: t.pageY
  }, setTimeout(() => GR = null, 100);
};
iae() && yi(document.documentElement, "click", NWe, !0);
const BWe = () => ({
  prefixCls: String,
  /** @deprecated Please use `open` instead. */
  visible: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  confirmLoading: {
    type: Boolean,
    default: void 0
  },
  title: oe.any,
  closable: {
    type: Boolean,
    default: void 0
  },
  closeIcon: oe.any,
  onOk: Function,
  onCancel: Function,
  "onUpdate:visible": Function,
  "onUpdate:open": Function,
  onChange: Function,
  afterClose: Function,
  centered: {
    type: Boolean,
    default: void 0
  },
  width: [String, Number],
  footer: oe.any,
  okText: oe.any,
  okType: String,
  cancelText: oe.any,
  icon: oe.any,
  maskClosable: {
    type: Boolean,
    default: void 0
  },
  forceRender: {
    type: Boolean,
    default: void 0
  },
  okButtonProps: sn(),
  cancelButtonProps: sn(),
  destroyOnClose: {
    type: Boolean,
    default: void 0
  },
  wrapClassName: String,
  maskTransitionName: String,
  transitionName: String,
  getContainer: {
    type: [String, Function, Boolean, Object],
    default: void 0
  },
  zIndex: Number,
  bodyStyle: sn(),
  maskStyle: sn(),
  mask: {
    type: Boolean,
    default: void 0
  },
  keyboard: {
    type: Boolean,
    default: void 0
  },
  wrapProps: Object,
  focusTriggerAfterClose: {
    type: Boolean,
    default: void 0
  },
  modalRender: Function,
  mousePosition: sn()
}), uo = ae({
  compatConfig: {
    MODE: 3
  },
  name: "AModal",
  inheritAttrs: !1,
  props: li(BWe(), {
    width: 520,
    confirmLoading: !1,
    okType: "primary"
  }),
  setup(t, e) {
    let {
      emit: n,
      slots: r,
      attrs: i
    } = e;
    const [a] = _2("Modal"), {
      prefixCls: o,
      rootPrefixCls: s,
      direction: l,
      getPopupContainer: u
    } = hn("modal", t), [c, f] = nWe(o);
    aa(t.visible === void 0, "Modal", "`visible` will be removed in next major version, please use `open` instead.");
    const d = (v) => {
      n("update:visible", !1), n("update:open", !1), n("cancel", v), n("change", !1);
    }, h = (v) => {
      n("ok", v);
    }, p = () => {
      var v, g;
      const {
        okText: m = (v = r.okText) === null || v === void 0 ? void 0 : v.call(r),
        okType: y,
        cancelText: _ = (g = r.cancelText) === null || g === void 0 ? void 0 : g.call(r),
        confirmLoading: O
      } = t;
      return D(Wt, null, [D(ra, te({
        onClick: d
      }, t.cancelButtonProps), {
        default: () => [_ || a.value.cancelText]
      }), D(ra, te(te({}, Cie(y)), {}, {
        loading: O,
        onClick: h
      }, t.okButtonProps), {
        default: () => [m || a.value.okText]
      })]);
    };
    return () => {
      var v, g;
      const {
        prefixCls: m,
        visible: y,
        open: _,
        wrapClassName: O,
        centered: S,
        getContainer: x,
        closeIcon: C = (v = r.closeIcon) === null || v === void 0 ? void 0 : v.call(r),
        focusTriggerAfterClose: P = !0
      } = t, $ = LWe(t, ["prefixCls", "visible", "open", "wrapClassName", "centered", "getContainer", "closeIcon", "focusTriggerAfterClose"]), T = Re(O, {
        [`${o.value}-centered`]: !!S,
        [`${o.value}-wrap-rtl`]: l.value === "rtl"
      });
      return c(D(Gae, te(te(te({}, $), i), {}, {
        rootClassName: f.value,
        class: Re(f.value, i.class),
        getContainer: x || (u == null ? void 0 : u.value),
        prefixCls: o.value,
        wrapClassName: T,
        visible: _ ?? y,
        onClose: d,
        focusTriggerAfterClose: P,
        transitionName: Wl(s.value, "zoom", t.transitionName),
        maskTransitionName: Wl(s.value, "fade", t.maskTransitionName),
        mousePosition: (g = $.mousePosition) !== null && g !== void 0 ? g : GR
      }), k(k({}, r), {
        footer: r.footer || p,
        closeIcon: () => D("span", {
          class: `${o.value}-close-x`
        }, [C || D(tc, {
          class: `${o.value}-close-icon`
        }, null)])
      })));
    };
  }
}), zWe = () => {
  const t = ve(!1);
  return Qt(() => {
    t.value = !0;
  }), t;
}, VWe = {
  type: {
    type: String
  },
  actionFn: Function,
  close: Function,
  autofocus: Boolean,
  prefixCls: String,
  buttonProps: sn(),
  emitEvent: Boolean,
  quitOnNullishReturnValue: Boolean
};
function $H(t) {
  return !!(t && t.then);
}
const AH = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ActionButton",
  props: VWe,
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = ve(!1), i = ve(), a = ve(!1);
    let o;
    const s = zWe();
    _t(() => {
      t.autofocus && (o = setTimeout(() => {
        var f, d;
        return (d = (f = xu(i.value)) === null || f === void 0 ? void 0 : f.focus) === null || d === void 0 ? void 0 : d.call(f);
      }));
    }), Qt(() => {
      clearTimeout(o);
    });
    const l = function() {
      for (var f, d = arguments.length, h = new Array(d), p = 0; p < d; p++)
        h[p] = arguments[p];
      (f = t.close) === null || f === void 0 || f.call(t, ...h);
    }, u = (f) => {
      $H(f) && (a.value = !0, f.then(function() {
        s.value || (a.value = !1), l(...arguments), r.value = !1;
      }, (d) => (s.value || (a.value = !1), r.value = !1, Promise.reject(d))));
    }, c = (f) => {
      const {
        actionFn: d
      } = t;
      if (r.value)
        return;
      if (r.value = !0, !d) {
        l();
        return;
      }
      let h;
      if (t.emitEvent) {
        if (h = d(f), t.quitOnNullishReturnValue && !$H(h)) {
          r.value = !1, l(f);
          return;
        }
      } else if (d.length)
        h = d(t.close), r.value = !1;
      else if (h = d(), !h) {
        l();
        return;
      }
      u(h);
    };
    return () => {
      const {
        type: f,
        prefixCls: d,
        buttonProps: h
      } = t;
      return D(ra, te(te(te({}, Cie(f)), {}, {
        onClick: c,
        loading: a.value,
        prefixCls: d
      }, h), {}, {
        ref: i
      }), n);
    };
  }
});
function Gp(t) {
  return typeof t == "function" ? t() : t;
}
const noe = ae({
  name: "ConfirmDialog",
  inheritAttrs: !1,
  props: ["icon", "onCancel", "onOk", "close", "closable", "zIndex", "afterClose", "visible", "open", "keyboard", "centered", "getContainer", "maskStyle", "okButtonProps", "cancelButtonProps", "okType", "prefixCls", "okCancel", "width", "mask", "maskClosable", "okText", "cancelText", "autoFocusButton", "transitionName", "maskTransitionName", "type", "title", "content", "direction", "rootPrefixCls", "bodyStyle", "closeIcon", "modalRender", "focusTriggerAfterClose", "wrapClassName", "confirmPrefixCls", "footer"],
  setup(t, e) {
    let {
      attrs: n
    } = e;
    const [r] = _2("Modal");
    return process.env.NODE_ENV !== "production" && aa(t.visible === void 0, "Modal", "`visible` is deprecated, please use `open` instead."), () => {
      const {
        icon: i,
        onCancel: a,
        onOk: o,
        close: s,
        okText: l,
        closable: u = !1,
        zIndex: c,
        afterClose: f,
        keyboard: d,
        centered: h,
        getContainer: p,
        maskStyle: v,
        okButtonProps: g,
        cancelButtonProps: m,
        okCancel: y,
        width: _ = 416,
        mask: O = !0,
        maskClosable: S = !1,
        type: x,
        open: C,
        title: P,
        content: $,
        direction: T,
        closeIcon: E,
        modalRender: M,
        focusTriggerAfterClose: R,
        rootPrefixCls: N,
        bodyStyle: I,
        wrapClassName: B,
        footer: Q
      } = t;
      let W = i;
      if (!i && i !== null)
        switch (x) {
          case "info":
            W = D(cp, null, null);
            break;
          case "success":
            W = D(Df, null, null);
            break;
          case "error":
            W = D(cs, null, null);
            break;
          default:
            W = D(Rf, null, null);
        }
      const H = t.okType || "primary", U = t.prefixCls || "ant-modal", j = `${U}-confirm`, Y = n.style || {}, ne = y ?? x === "confirm", fe = t.autoFocusButton === null ? !1 : t.autoFocusButton || "ok", ue = `${U}-confirm`, ye = Re(ue, `${ue}-${t.type}`, {
        [`${ue}-rtl`]: T === "rtl"
      }, n.class), se = r.value, he = ne && D(AH, {
        actionFn: a,
        close: s,
        autofocus: fe === "cancel",
        buttonProps: m,
        prefixCls: `${N}-btn`
      }, {
        default: () => [Gp(t.cancelText) || se.cancelText]
      });
      return D(uo, {
        prefixCls: U,
        class: ye,
        wrapClassName: Re({
          [`${ue}-centered`]: !!h
        }, B),
        onCancel: (re) => s == null ? void 0 : s({
          triggerCancel: !0
        }, re),
        open: C,
        title: "",
        footer: "",
        transitionName: Wl(N, "zoom", t.transitionName),
        maskTransitionName: Wl(N, "fade", t.maskTransitionName),
        mask: O,
        maskClosable: S,
        maskStyle: v,
        style: Y,
        bodyStyle: I,
        width: _,
        zIndex: c,
        afterClose: f,
        keyboard: d,
        centered: h,
        getContainer: p,
        closable: u,
        closeIcon: E,
        modalRender: M,
        focusTriggerAfterClose: R
      }, {
        default: () => [D("div", {
          class: `${j}-body-wrapper`
        }, [D("div", {
          class: `${j}-body`
        }, [Gp(W), P === void 0 ? null : D("span", {
          class: `${j}-title`
        }, [Gp(P)]), D("div", {
          class: `${j}-content`
        }, [Gp($)])]), Q !== void 0 ? Gp(Q) : D("div", {
          class: `${j}-btns`
        }, [he, D(AH, {
          type: H,
          actionFn: o,
          close: s,
          autofocus: fe === "ok",
          buttonProps: g,
          prefixCls: `${N}-btn`
        }, {
          default: () => [Gp(l) || (ne ? se.okText : se.justOkText)]
        })])])]
      });
    };
  }
}), nh = [], q_ = (t) => {
  const e = document.createDocumentFragment();
  let n = k(k({}, si(t, ["parentContext", "appContext"])), {
    close: a,
    open: !0
  }), r = null;
  function i() {
    r && (Ih(null, e), r = null);
    for (var u = arguments.length, c = new Array(u), f = 0; f < u; f++)
      c[f] = arguments[f];
    const d = c.some((h) => h && h.triggerCancel);
    t.onCancel && d && t.onCancel(() => {
    }, ...c.slice(1));
    for (let h = 0; h < nh.length; h++)
      if (nh[h] === a) {
        nh.splice(h, 1);
        break;
      }
  }
  function a() {
    for (var u = arguments.length, c = new Array(u), f = 0; f < u; f++)
      c[f] = arguments[f];
    n = k(k({}, n), {
      open: !1,
      afterClose: () => {
        typeof t.afterClose == "function" && t.afterClose(), i.apply(this, c);
      }
    }), n.visible && delete n.visible, o(n);
  }
  function o(u) {
    typeof u == "function" ? n = u(n) : n = k(k({}, n), u), r && nNe(r, n, e);
  }
  const s = (u) => {
    const c = gi, f = c.prefixCls, d = u.prefixCls || `${f}-modal`, h = c.iconPrefixCls, p = rVe();
    return D(Gv, te(te({}, c), {}, {
      prefixCls: f
    }), {
      default: () => [D(noe, te(te({}, u), {}, {
        rootPrefixCls: f,
        prefixCls: d,
        iconPrefixCls: h,
        locale: p,
        cancelText: u.cancelText || p.cancelText
      }), null)]
    });
  };
  function l(u) {
    const c = D(s, k({}, u));
    return c.appContext = t.parentContext || t.appContext || c.appContext, Ih(c, e), c;
  }
  return r = l(n), nh.push(a), {
    destroy: a,
    update: o
  };
};
function roe(t) {
  return k(k({}, t), {
    type: "warning"
  });
}
function ioe(t) {
  return k(k({}, t), {
    type: "info"
  });
}
function aoe(t) {
  return k(k({}, t), {
    type: "success"
  });
}
function ooe(t) {
  return k(k({}, t), {
    type: "error"
  });
}
function soe(t) {
  return k(k({}, t), {
    type: "confirm"
  });
}
const FWe = () => ({
  config: Object,
  afterClose: Function,
  destroyAction: Function,
  open: Boolean
}), WWe = ae({
  name: "HookModal",
  inheritAttrs: !1,
  props: li(FWe(), {
    config: {
      width: 520,
      okType: "primary"
    }
  }),
  setup(t, e) {
    let {
      expose: n
    } = e;
    var r;
    const i = V(() => t.open), a = V(() => t.config), {
      direction: o,
      getPrefixCls: s
    } = b2(), l = s("modal"), u = s(), c = () => {
      var p, v;
      t == null || t.afterClose(), (v = (p = a.value).afterClose) === null || v === void 0 || v.call(p);
    }, f = function() {
      t.destroyAction(...arguments);
    };
    n({
      destroy: f
    });
    const d = (r = a.value.okCancel) !== null && r !== void 0 ? r : a.value.type === "confirm", [h] = _2("Modal", Nu.Modal);
    return () => D(noe, te(te({
      prefixCls: l,
      rootPrefixCls: u
    }, a.value), {}, {
      close: f,
      open: i.value,
      afterClose: c,
      okText: a.value.okText || (d ? h == null ? void 0 : h.value.okText : h == null ? void 0 : h.value.justOkText),
      direction: a.value.direction || o.value,
      cancelText: a.value.cancelText || (h == null ? void 0 : h.value.cancelText)
    }), null);
  }
});
let EH = 0;
const QWe = ae({
  name: "ElementsHolder",
  inheritAttrs: !1,
  setup(t, e) {
    let {
      expose: n
    } = e;
    const r = ve([]);
    return n({
      addModal: (a) => (r.value.push(a), r.value = r.value.slice(), () => {
        r.value = r.value.filter((o) => o !== a);
      })
    }), () => r.value.map((a) => a());
  }
});
function HWe() {
  const t = ve(null), e = ve([]);
  me(e, () => {
    e.value.length && ([...e.value].forEach((o) => {
      o();
    }), e.value = []);
  }, {
    immediate: !0
  });
  const n = (a) => function(s) {
    var l;
    EH += 1;
    const u = ve(!0), c = ve(null), f = ve(z(s)), d = ve({});
    me(() => s, (_) => {
      g(k(k({}, Vs(_) ? _.value : _), d.value));
    });
    const h = function() {
      u.value = !1;
      for (var _ = arguments.length, O = new Array(_), S = 0; S < _; S++)
        O[S] = arguments[S];
      const x = O.some((C) => C && C.triggerCancel);
      f.value.onCancel && x && f.value.onCancel(() => {
      }, ...O.slice(1));
    };
    let p;
    const v = () => D(WWe, {
      key: `modal-${EH}`,
      config: a(f.value),
      ref: c,
      open: u.value,
      destroyAction: h,
      afterClose: () => {
        p == null || p();
      }
    }, null);
    p = (l = t.value) === null || l === void 0 ? void 0 : l.addModal(v), p && nh.push(p);
    const g = (_) => {
      f.value = k(k({}, f.value), _);
    };
    return {
      destroy: () => {
        c.value ? h() : e.value = [...e.value, h];
      },
      update: (_) => {
        d.value = _, c.value ? g(_) : e.value = [...e.value, () => g(_)];
      }
    };
  }, r = V(() => ({
    info: n(ioe),
    success: n(aoe),
    error: n(ooe),
    warning: n(roe),
    confirm: n(soe)
  })), i = Symbol("modalHolderKey");
  return [r.value, () => D(QWe, {
    key: i,
    ref: t
  }, null)];
}
function loe(t) {
  return q_(roe(t));
}
uo.useModal = HWe;
uo.info = function(e) {
  return q_(ioe(e));
};
uo.success = function(e) {
  return q_(aoe(e));
};
uo.error = function(e) {
  return q_(ooe(e));
};
uo.warning = loe;
uo.warn = loe;
uo.confirm = function(e) {
  return q_(soe(e));
};
uo.destroyAll = function() {
  for (; nh.length; ) {
    const e = nh.pop();
    e && e();
  }
};
uo.install = function(t) {
  return t.component(uo.name, uo), t;
};
const G8 = (t, e) => {
  let {
    attrs: n
  } = e;
  const {
    included: r,
    vertical: i,
    style: a,
    class: o
  } = n;
  let {
    length: s,
    offset: l,
    reverse: u
  } = n;
  s < 0 && (u = !u, s = Math.abs(s), l = 100 - l);
  const c = i ? {
    [u ? "top" : "bottom"]: `${l}%`,
    [u ? "bottom" : "top"]: "auto",
    height: `${s}%`
  } : {
    [u ? "right" : "left"]: `${l}%`,
    [u ? "left" : "right"]: "auto",
    width: `${s}%`
  }, f = k(k({}, a), c);
  return r ? D("div", {
    class: o,
    style: f
  }, null) : null;
};
G8.inheritAttrs = !1;
const GWe = (t, e, n, r, i, a) => {
  aa(n ? r > 0 : !0, "Slider", "`Slider[step]` should be a positive number in order to make Slider[dots] work.");
  const o = Object.keys(e).map(parseFloat).sort((s, l) => s - l);
  if (n && r)
    for (let s = i; s <= a; s += r)
      o.indexOf(s) === -1 && o.push(s);
  return o;
}, uoe = (t, e) => {
  let {
    attrs: n
  } = e;
  const {
    prefixCls: r,
    vertical: i,
    reverse: a,
    marks: o,
    dots: s,
    step: l,
    included: u,
    lowerBound: c,
    upperBound: f,
    max: d,
    min: h,
    dotStyle: p,
    activeDotStyle: v
  } = n, g = d - h, m = GWe(i, o, s, l, h, d).map((y) => {
    const _ = `${Math.abs(y - h) / g * 100}%`, O = !u && y === f || u && y <= f && y >= c;
    let S = i ? k(k({}, p), {
      [a ? "top" : "bottom"]: _
    }) : k(k({}, p), {
      [a ? "right" : "left"]: _
    });
    O && (S = k(k({}, S), v));
    const x = Re({
      [`${r}-dot`]: !0,
      [`${r}-dot-active`]: O,
      [`${r}-dot-reverse`]: a
    });
    return D("span", {
      class: x,
      style: S,
      key: y
    }, null);
  });
  return D("div", {
    class: `${r}-step`
  }, [m]);
};
uoe.inheritAttrs = !1;
const coe = (t, e) => {
  let {
    attrs: n,
    slots: r
  } = e;
  const {
    class: i,
    vertical: a,
    reverse: o,
    marks: s,
    included: l,
    upperBound: u,
    lowerBound: c,
    max: f,
    min: d,
    onClickLabel: h
  } = n, p = Object.keys(s), v = r.mark, g = f - d, m = p.map(parseFloat).sort((y, _) => y - _).map((y) => {
    const _ = typeof s[y] == "function" ? s[y]() : s[y], O = typeof _ == "object" && !po(_);
    let S = O ? _.label : _;
    if (!S && S !== 0)
      return null;
    v && (S = v({
      point: y,
      label: S
    }));
    const x = !l && y === u || l && y <= u && y >= c, C = Re({
      [`${i}-text`]: !0,
      [`${i}-text-active`]: x
    }), P = {
      marginBottom: "-50%",
      [o ? "top" : "bottom"]: `${(y - d) / g * 100}%`
    }, $ = {
      transform: `translateX(${o ? "50%" : "-50%"})`,
      msTransform: `translateX(${o ? "50%" : "-50%"})`,
      [o ? "right" : "left"]: `${(y - d) / g * 100}%`
    }, T = a ? P : $, E = O ? k(k({}, T), _.style) : T, M = {
      [mi ? "onTouchstartPassive" : "onTouchstart"]: (R) => h(R, y)
    };
    return D("span", te({
      class: C,
      style: E,
      key: y,
      onMousedown: (R) => h(R, y)
    }, M), [S]);
  });
  return D("div", {
    class: i
  }, [m]);
};
coe.inheritAttrs = !1;
const foe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "Handle",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    vertical: {
      type: Boolean,
      default: void 0
    },
    offset: Number,
    disabled: {
      type: Boolean,
      default: void 0
    },
    min: Number,
    max: Number,
    value: Number,
    tabindex: oe.oneOfType([oe.number, oe.string]),
    reverse: {
      type: Boolean,
      default: void 0
    },
    ariaLabel: String,
    ariaLabelledBy: String,
    ariaValueTextFormatter: Function,
    onMouseenter: {
      type: Function
    },
    onMouseleave: {
      type: Function
    },
    onMousedown: {
      type: Function
    }
  },
  setup(t, e) {
    let {
      attrs: n,
      emit: r,
      expose: i
    } = e;
    const a = ve(!1), o = ve(), s = () => {
      document.activeElement === o.value && (a.value = !0);
    }, l = (g) => {
      a.value = !1, r("blur", g);
    }, u = () => {
      a.value = !1;
    }, c = () => {
      var g;
      (g = o.value) === null || g === void 0 || g.focus();
    }, f = () => {
      var g;
      (g = o.value) === null || g === void 0 || g.blur();
    }, d = () => {
      a.value = !0, c();
    }, h = (g) => {
      g.preventDefault(), c(), r("mousedown", g);
    };
    i({
      focus: c,
      blur: f,
      clickFocus: d,
      ref: o
    });
    let p = null;
    _t(() => {
      p = yi(document, "mouseup", s);
    }), Qt(() => {
      p == null || p.remove();
    });
    const v = V(() => {
      const {
        vertical: g,
        offset: m,
        reverse: y
      } = t;
      return g ? {
        [y ? "top" : "bottom"]: `${m}%`,
        [y ? "bottom" : "top"]: "auto",
        transform: y ? null : "translateY(+50%)"
      } : {
        [y ? "right" : "left"]: `${m}%`,
        [y ? "left" : "right"]: "auto",
        transform: `translateX(${y ? "+" : "-"}50%)`
      };
    });
    return () => {
      const {
        prefixCls: g,
        disabled: m,
        min: y,
        max: _,
        value: O,
        tabindex: S,
        ariaLabel: x,
        ariaLabelledBy: C,
        ariaValueTextFormatter: P,
        onMouseenter: $,
        onMouseleave: T
      } = t, E = Re(n.class, {
        [`${g}-handle-click-focused`]: a.value
      }), M = {
        "aria-valuemin": y,
        "aria-valuemax": _,
        "aria-valuenow": O,
        "aria-disabled": !!m
      }, R = [n.style, v.value];
      let N = S || 0;
      (m || S === null) && (N = null);
      let I;
      P && (I = P(O));
      const B = k(k(k(k({}, n), {
        role: "slider",
        tabindex: N
      }), M), {
        class: E,
        onBlur: l,
        onKeydown: u,
        onMousedown: h,
        onMouseenter: $,
        onMouseleave: T,
        ref: o,
        style: R
      });
      return D("div", te(te({}, B), {}, {
        "aria-label": x,
        "aria-labelledby": C,
        "aria-valuetext": I
      }), null);
    };
  }
});
function SE(t, e) {
  try {
    return Object.keys(e).some((n) => t.target === e[n].ref);
  } catch {
    return !1;
  }
}
function doe(t, e) {
  let {
    min: n,
    max: r
  } = e;
  return t < n || t > r;
}
function MH(t) {
  return t.touches.length > 1 || t.type.toLowerCase() === "touchend" && t.touches.length > 0;
}
function IH(t, e) {
  let {
    marks: n,
    step: r,
    min: i,
    max: a
  } = e;
  const o = Object.keys(n).map(parseFloat);
  if (r !== null) {
    const l = Math.pow(10, hoe(r)), u = Math.floor((a * l - i * l) / (r * l)), c = Math.min((t - i) / r, u), f = Math.round(c) * r + i;
    o.push(f);
  }
  const s = o.map((l) => Math.abs(t - l));
  return o[s.indexOf(Math.min(...s))];
}
function hoe(t) {
  const e = t.toString();
  let n = 0;
  return e.indexOf(".") >= 0 && (n = e.length - e.indexOf(".") - 1), n;
}
function DH(t, e) {
  let n = 1;
  return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (t ? e.clientY : e.pageX) / n;
}
function RH(t, e) {
  let n = 1;
  return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (t ? e.touches[0].clientY : e.touches[0].pageX) / n;
}
function kH(t, e) {
  const n = e.getBoundingClientRect();
  return t ? n.top + n.height * 0.5 : window.scrollX + n.left + n.width * 0.5;
}
function j8(t, e) {
  let {
    max: n,
    min: r
  } = e;
  return t <= r ? r : t >= n ? n : t;
}
function poe(t, e) {
  const {
    step: n
  } = e, r = isFinite(IH(t, e)) ? IH(t, e) : 0;
  return n === null ? r : parseFloat(r.toFixed(hoe(n)));
}
function zg(t) {
  t.stopPropagation(), t.preventDefault();
}
function jWe(t, e, n) {
  const r = {
    increase: (o, s) => o + s,
    decrease: (o, s) => o - s
  }, i = r[t](Object.keys(n.marks).indexOf(JSON.stringify(e)), 1), a = Object.keys(n.marks)[i];
  return n.step ? r[t](e, n.step) : Object.keys(n.marks).length && n.marks[a] ? n.marks[a] : e;
}
function voe(t, e, n) {
  const r = "increase", i = "decrease";
  let a = r;
  switch (t.keyCode) {
    case Me.UP:
      a = e && n ? i : r;
      break;
    case Me.RIGHT:
      a = !e && n ? i : r;
      break;
    case Me.DOWN:
      a = e && n ? r : i;
      break;
    case Me.LEFT:
      a = !e && n ? r : i;
      break;
    case Me.END:
      return (o, s) => s.max;
    case Me.HOME:
      return (o, s) => s.min;
    case Me.PAGE_UP:
      return (o, s) => o + s.step * 2;
    case Me.PAGE_DOWN:
      return (o, s) => o - s.step * 2;
    default:
      return;
  }
  return (o, s) => jWe(a, o, s);
}
var ZWe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
function sd() {
}
function goe(t) {
  const e = {
    id: String,
    min: Number,
    max: Number,
    step: Number,
    marks: oe.object,
    included: {
      type: Boolean,
      default: void 0
    },
    prefixCls: String,
    disabled: {
      type: Boolean,
      default: void 0
    },
    handle: Function,
    dots: {
      type: Boolean,
      default: void 0
    },
    vertical: {
      type: Boolean,
      default: void 0
    },
    reverse: {
      type: Boolean,
      default: void 0
    },
    minimumTrackStyle: oe.object,
    maximumTrackStyle: oe.object,
    handleStyle: oe.oneOfType([oe.object, oe.arrayOf(oe.object)]),
    trackStyle: oe.oneOfType([oe.object, oe.arrayOf(oe.object)]),
    railStyle: oe.object,
    dotStyle: oe.object,
    activeDotStyle: oe.object,
    autofocus: {
      type: Boolean,
      default: void 0
    },
    draggableTrack: {
      type: Boolean,
      default: void 0
    }
  };
  return ae({
    compatConfig: {
      MODE: 3
    },
    name: "CreateSlider",
    mixins: [A2, t],
    inheritAttrs: !1,
    props: li(e, {
      prefixCls: "rc-slider",
      min: 0,
      max: 100,
      step: 1,
      marks: {},
      included: !0,
      disabled: !1,
      dots: !1,
      vertical: !1,
      reverse: !1,
      trackStyle: [{}],
      handleStyle: [{}],
      railStyle: {},
      dotStyle: {},
      activeDotStyle: {}
    }),
    emits: ["change", "blur", "focus"],
    data() {
      const {
        step: n,
        max: r,
        min: i
      } = this, a = isFinite(r - i) ? (r - i) % n === 0 : !0;
      return aa(n && Math.floor(n) === n ? a : !0, `Slider[max] - Slider[min] (${r - i}) should be a multiple of Slider[step] (${n})`), this.handlesRefs = {}, {};
    },
    mounted() {
      this.$nextTick(() => {
        this.document = this.sliderRef && this.sliderRef.ownerDocument;
        const {
          autofocus: n,
          disabled: r
        } = this;
        n && !r && this.focus();
      });
    },
    beforeUnmount() {
      this.$nextTick(() => {
        this.removeDocumentEvents();
      });
    },
    methods: {
      defaultHandle(n) {
        var {
          index: r,
          directives: i,
          className: a,
          style: o
        } = n, s = ZWe(n, ["index", "directives", "className", "style"]);
        if (delete s.dragging, s.value === null)
          return null;
        const l = k(k({}, s), {
          class: a,
          style: o,
          key: r
        });
        return D(foe, l, null);
      },
      onDown(n, r) {
        let i = r;
        const {
          draggableTrack: a,
          vertical: o
        } = this.$props, {
          bounds: s
        } = this.$data, l = a && this.positionGetValue ? this.positionGetValue(i) || [] : [], u = SE(n, this.handlesRefs);
        if (this.dragTrack = a && s.length >= 2 && !u && !l.map((c, f) => {
          const d = f ? !0 : c >= s[f];
          return f === l.length - 1 ? c <= s[f] : d;
        }).some((c) => !c), this.dragTrack)
          this.dragOffset = i, this.startBounds = [...s];
        else {
          if (!u)
            this.dragOffset = 0;
          else {
            const c = kH(o, n.target);
            this.dragOffset = i - c, i = c;
          }
          this.onStart(i);
        }
      },
      onMouseDown(n) {
        if (n.button !== 0)
          return;
        this.removeDocumentEvents();
        const r = this.$props.vertical, i = DH(r, n);
        this.onDown(n, i), this.addDocumentMouseEvents();
      },
      onTouchStart(n) {
        if (MH(n)) return;
        const r = this.vertical, i = RH(r, n);
        this.onDown(n, i), this.addDocumentTouchEvents(), zg(n);
      },
      onFocus(n) {
        const {
          vertical: r
        } = this;
        if (SE(n, this.handlesRefs) && !this.dragTrack) {
          const i = kH(r, n.target);
          this.dragOffset = 0, this.onStart(i), zg(n), this.$emit("focus", n);
        }
      },
      onBlur(n) {
        this.dragTrack || this.onEnd(), this.$emit("blur", n);
      },
      onMouseUp() {
        this.handlesRefs[this.prevMovedHandleIndex] && this.handlesRefs[this.prevMovedHandleIndex].clickFocus();
      },
      onMouseMove(n) {
        if (!this.sliderRef) {
          this.onEnd();
          return;
        }
        const r = DH(this.vertical, n);
        this.onMove(n, r - this.dragOffset, this.dragTrack, this.startBounds);
      },
      onTouchMove(n) {
        if (MH(n) || !this.sliderRef) {
          this.onEnd();
          return;
        }
        const r = RH(this.vertical, n);
        this.onMove(n, r - this.dragOffset, this.dragTrack, this.startBounds);
      },
      onKeyDown(n) {
        this.sliderRef && SE(n, this.handlesRefs) && this.onKeyboard(n);
      },
      onClickMarkLabel(n, r) {
        n.stopPropagation(), this.onChange({
          sValue: r
        }), this.setState({
          sValue: r
        }, () => this.onEnd(!0));
      },
      getSliderStart() {
        const n = this.sliderRef, {
          vertical: r,
          reverse: i
        } = this, a = n.getBoundingClientRect();
        return r ? i ? a.bottom : a.top : window.scrollX + (i ? a.right : a.left);
      },
      getSliderLength() {
        const n = this.sliderRef;
        if (!n)
          return 0;
        const r = n.getBoundingClientRect();
        return this.vertical ? r.height : r.width;
      },
      addDocumentTouchEvents() {
        this.onTouchMoveListener = yi(this.document, "touchmove", this.onTouchMove), this.onTouchUpListener = yi(this.document, "touchend", this.onEnd);
      },
      addDocumentMouseEvents() {
        this.onMouseMoveListener = yi(this.document, "mousemove", this.onMouseMove), this.onMouseUpListener = yi(this.document, "mouseup", this.onEnd);
      },
      removeDocumentEvents() {
        this.onTouchMoveListener && this.onTouchMoveListener.remove(), this.onTouchUpListener && this.onTouchUpListener.remove(), this.onMouseMoveListener && this.onMouseMoveListener.remove(), this.onMouseUpListener && this.onMouseUpListener.remove();
      },
      focus() {
        var n;
        this.$props.disabled || (n = this.handlesRefs[0]) === null || n === void 0 || n.focus();
      },
      blur() {
        this.$props.disabled || Object.keys(this.handlesRefs).forEach((n) => {
          var r, i;
          (i = (r = this.handlesRefs[n]) === null || r === void 0 ? void 0 : r.blur) === null || i === void 0 || i.call(r);
        });
      },
      calcValue(n) {
        const {
          vertical: r,
          min: i,
          max: a
        } = this, o = Math.abs(Math.max(n, 0) / this.getSliderLength());
        return r ? (1 - o) * (a - i) + i : o * (a - i) + i;
      },
      calcValueByPos(n) {
        const i = (this.reverse ? -1 : 1) * (n - this.getSliderStart());
        return this.trimAlignValue(this.calcValue(i));
      },
      calcOffset(n) {
        const {
          min: r,
          max: i
        } = this, a = (n - r) / (i - r);
        return Math.max(0, a * 100);
      },
      saveSlider(n) {
        this.sliderRef = n;
      },
      saveHandle(n, r) {
        this.handlesRefs[n] = r;
      }
    },
    render() {
      const {
        prefixCls: n,
        marks: r,
        dots: i,
        step: a,
        included: o,
        disabled: s,
        vertical: l,
        reverse: u,
        min: c,
        max: f,
        maximumTrackStyle: d,
        railStyle: h,
        dotStyle: p,
        activeDotStyle: v,
        id: g
      } = this, {
        class: m,
        style: y
      } = this.$attrs, {
        tracks: _,
        handles: O
      } = this.renderSlider(), S = Re(n, m, {
        [`${n}-with-marks`]: Object.keys(r).length,
        [`${n}-disabled`]: s,
        [`${n}-vertical`]: l,
        [`${n}-horizontal`]: !l
      }), x = {
        vertical: l,
        marks: r,
        included: o,
        lowerBound: this.getLowerBound(),
        upperBound: this.getUpperBound(),
        max: f,
        min: c,
        reverse: u,
        class: `${n}-mark`,
        onClickLabel: s ? sd : this.onClickMarkLabel
      }, C = {
        [mi ? "onTouchstartPassive" : "onTouchstart"]: s ? sd : this.onTouchStart
      };
      return D("div", te(te({
        id: g,
        ref: this.saveSlider,
        tabindex: "-1",
        class: S
      }, C), {}, {
        onMousedown: s ? sd : this.onMouseDown,
        onMouseup: s ? sd : this.onMouseUp,
        onKeydown: s ? sd : this.onKeyDown,
        onFocus: s ? sd : this.onFocus,
        onBlur: s ? sd : this.onBlur,
        style: y
      }), [D("div", {
        class: `${n}-rail`,
        style: k(k({}, d), h)
      }, null), _, D(uoe, {
        prefixCls: n,
        vertical: l,
        reverse: u,
        marks: r,
        dots: i,
        step: a,
        included: o,
        lowerBound: this.getLowerBound(),
        upperBound: this.getUpperBound(),
        max: f,
        min: c,
        dotStyle: p,
        activeDotStyle: v
      }, null), O, D(coe, x, {
        mark: this.$slots.mark
      }), Ine(this)]);
    }
  });
}
const UWe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "Slider",
  mixins: [A2],
  inheritAttrs: !1,
  props: {
    defaultValue: Number,
    value: Number,
    disabled: {
      type: Boolean,
      default: void 0
    },
    autofocus: {
      type: Boolean,
      default: void 0
    },
    tabindex: oe.oneOfType([oe.number, oe.string]),
    reverse: {
      type: Boolean,
      default: void 0
    },
    min: Number,
    max: Number,
    ariaLabelForHandle: String,
    ariaLabelledByForHandle: String,
    ariaValueTextFormatterForHandle: String,
    startPoint: Number
  },
  emits: ["beforeChange", "afterChange", "change"],
  data() {
    const t = this.defaultValue !== void 0 ? this.defaultValue : this.min, e = this.value !== void 0 ? this.value : t;
    return {
      sValue: this.trimAlignValue(e),
      dragging: !1
    };
  },
  watch: {
    value: {
      handler(t) {
        this.setChangeValue(t);
      },
      deep: !0
    },
    min() {
      const {
        sValue: t
      } = this;
      this.setChangeValue(t);
    },
    max() {
      const {
        sValue: t
      } = this;
      this.setChangeValue(t);
    }
  },
  methods: {
    setChangeValue(t) {
      const e = t !== void 0 ? t : this.sValue, n = this.trimAlignValue(e, this.$props);
      n !== this.sValue && (this.setState({
        sValue: n
      }), doe(e, this.$props) && this.$emit("change", n));
    },
    onChange(t) {
      const e = !Zw(this, "value"), n = t.sValue > this.max ? k(k({}, t), {
        sValue: this.max
      }) : t;
      e && this.setState(n);
      const r = n.sValue;
      this.$emit("change", r);
    },
    onStart(t) {
      this.setState({
        dragging: !0
      });
      const {
        sValue: e
      } = this;
      this.$emit("beforeChange", e);
      const n = this.calcValueByPos(t);
      this.startValue = n, this.startPosition = t, n !== e && (this.prevMovedHandleIndex = 0, this.onChange({
        sValue: n
      }));
    },
    onEnd(t) {
      const {
        dragging: e
      } = this;
      this.removeDocumentEvents(), (e || t) && this.$emit("afterChange", this.sValue), this.setState({
        dragging: !1
      });
    },
    onMove(t, e) {
      zg(t);
      const {
        sValue: n
      } = this, r = this.calcValueByPos(e);
      r !== n && this.onChange({
        sValue: r
      });
    },
    onKeyboard(t) {
      const {
        reverse: e,
        vertical: n
      } = this.$props, r = voe(t, n, e);
      if (r) {
        zg(t);
        const {
          sValue: i
        } = this, a = r(i, this.$props), o = this.trimAlignValue(a);
        if (o === i) return;
        this.onChange({
          sValue: o
        }), this.$emit("afterChange", o), this.onEnd();
      }
    },
    getLowerBound() {
      const t = this.$props.startPoint || this.$props.min;
      return this.$data.sValue > t ? t : this.$data.sValue;
    },
    getUpperBound() {
      return this.$data.sValue < this.$props.startPoint ? this.$props.startPoint : this.$data.sValue;
    },
    trimAlignValue(t) {
      let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      if (t === null)
        return null;
      const n = k(k({}, this.$props), e), r = j8(t, n);
      return poe(r, n);
    },
    getTrack(t) {
      let {
        prefixCls: e,
        reverse: n,
        vertical: r,
        included: i,
        minimumTrackStyle: a,
        mergedTrackStyle: o,
        length: s,
        offset: l
      } = t;
      return D(G8, {
        class: `${e}-track`,
        vertical: r,
        included: i,
        offset: l,
        reverse: n,
        length: s,
        style: k(k({}, a), o)
      }, null);
    },
    renderSlider() {
      const {
        prefixCls: t,
        vertical: e,
        included: n,
        disabled: r,
        minimumTrackStyle: i,
        trackStyle: a,
        handleStyle: o,
        tabindex: s,
        ariaLabelForHandle: l,
        ariaLabelledByForHandle: u,
        ariaValueTextFormatterForHandle: c,
        min: f,
        max: d,
        startPoint: h,
        reverse: p,
        handle: v,
        defaultHandle: g
      } = this, m = v || g, {
        sValue: y,
        dragging: _
      } = this, O = this.calcOffset(y), S = m({
        class: `${t}-handle`,
        prefixCls: t,
        vertical: e,
        offset: O,
        value: y,
        dragging: _,
        disabled: r,
        min: f,
        max: d,
        reverse: p,
        index: 0,
        tabindex: s,
        ariaLabel: l,
        ariaLabelledBy: u,
        ariaValueTextFormatter: c,
        style: o[0] || o,
        ref: (P) => this.saveHandle(0, P),
        onFocus: this.onFocus,
        onBlur: this.onBlur
      }), x = h !== void 0 ? this.calcOffset(h) : 0, C = a[0] || a;
      return {
        tracks: this.getTrack({
          prefixCls: t,
          reverse: p,
          vertical: e,
          included: n,
          offset: x,
          minimumTrackStyle: i,
          mergedTrackStyle: C,
          length: O - x
        }),
        handles: S
      };
    }
  }
}), XWe = goe(UWe), S0 = (t) => {
  let {
    value: e,
    handle: n,
    bounds: r,
    props: i
  } = t;
  const {
    allowCross: a,
    pushable: o
  } = i, s = Number(o), l = j8(e, i);
  let u = l;
  return !a && n != null && r !== void 0 && (n > 0 && l <= r[n - 1] + s && (u = r[n - 1] + s), n < r.length - 1 && l >= r[n + 1] - s && (u = r[n + 1] - s)), poe(u, i);
}, YWe = {
  defaultValue: oe.arrayOf(oe.number),
  value: oe.arrayOf(oe.number),
  count: Number,
  pushable: m4e(oe.oneOfType([oe.looseBool, oe.number])),
  allowCross: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  reverse: {
    type: Boolean,
    default: void 0
  },
  tabindex: oe.arrayOf(oe.number),
  prefixCls: String,
  min: Number,
  max: Number,
  autofocus: {
    type: Boolean,
    default: void 0
  },
  ariaLabelGroupForHandles: Array,
  ariaLabelledByGroupForHandles: Array,
  ariaValueTextFormatterGroupForHandles: Array,
  draggableTrack: {
    type: Boolean,
    default: void 0
  }
}, qWe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "Range",
  mixins: [A2],
  inheritAttrs: !1,
  props: li(YWe, {
    count: 1,
    allowCross: !0,
    pushable: !1,
    tabindex: [],
    draggableTrack: !1,
    ariaLabelGroupForHandles: [],
    ariaLabelledByGroupForHandles: [],
    ariaValueTextFormatterGroupForHandles: []
  }),
  emits: ["beforeChange", "afterChange", "change"],
  displayName: "Range",
  data() {
    const {
      count: t,
      min: e,
      max: n
    } = this, r = Array(...Array(t + 1)).map(() => e), i = Zw(this, "defaultValue") ? this.defaultValue : r;
    let {
      value: a
    } = this;
    a === void 0 && (a = i);
    const o = a.map((l, u) => S0({
      value: l,
      handle: u,
      props: this.$props
    }));
    return {
      sHandle: null,
      recent: o[0] === n ? 0 : o.length - 1,
      bounds: o
    };
  },
  watch: {
    value: {
      handler(t) {
        const {
          bounds: e
        } = this;
        this.setChangeValue(t || e);
      },
      deep: !0
    },
    min() {
      const {
        value: t
      } = this;
      this.setChangeValue(t || this.bounds);
    },
    max() {
      const {
        value: t
      } = this;
      this.setChangeValue(t || this.bounds);
    }
  },
  methods: {
    setChangeValue(t) {
      const {
        bounds: e
      } = this;
      let n = t.map((r, i) => S0({
        value: r,
        handle: i,
        bounds: e,
        props: this.$props
      }));
      if (e.length === n.length) {
        if (n.every((r, i) => r === e[i]))
          return null;
      } else
        n = t.map((r, i) => S0({
          value: r,
          handle: i,
          props: this.$props
        }));
      if (this.setState({
        bounds: n
      }), t.some((r) => doe(r, this.$props))) {
        const r = t.map((i) => j8(i, this.$props));
        this.$emit("change", r);
      }
    },
    onChange(t) {
      if (!Zw(this, "value"))
        this.setState(t);
      else {
        const i = {};
        ["sHandle", "recent"].forEach((a) => {
          t[a] !== void 0 && (i[a] = t[a]);
        }), Object.keys(i).length && this.setState(i);
      }
      const r = k(k({}, this.$data), t).bounds;
      this.$emit("change", r);
    },
    positionGetValue(t) {
      const e = this.getValue(), n = this.calcValueByPos(t), r = this.getClosestBound(n), i = this.getBoundNeedMoving(n, r), a = e[i];
      if (n === a) return null;
      const o = [...e];
      return o[i] = n, o;
    },
    onStart(t) {
      const {
        bounds: e
      } = this;
      this.$emit("beforeChange", e);
      const n = this.calcValueByPos(t);
      this.startValue = n, this.startPosition = t;
      const r = this.getClosestBound(n);
      this.prevMovedHandleIndex = this.getBoundNeedMoving(n, r), this.setState({
        sHandle: this.prevMovedHandleIndex,
        recent: this.prevMovedHandleIndex
      });
      const i = e[this.prevMovedHandleIndex];
      if (n === i) return;
      const a = [...e];
      a[this.prevMovedHandleIndex] = n, this.onChange({
        bounds: a
      });
    },
    onEnd(t) {
      const {
        sHandle: e
      } = this;
      this.removeDocumentEvents(), e || (this.dragTrack = !1), (e !== null || t) && this.$emit("afterChange", this.bounds), this.setState({
        sHandle: null
      });
    },
    onMove(t, e, n, r) {
      zg(t);
      const {
        $data: i,
        $props: a
      } = this, o = a.max || 100, s = a.min || 0;
      if (n) {
        let d = a.vertical ? -e : e;
        d = a.reverse ? -d : d;
        const h = o - Math.max(...r), p = s - Math.min(...r), v = Math.min(Math.max(d / (this.getSliderLength() / 100), p), h), g = r.map((m) => Math.floor(Math.max(Math.min(m + v, o), s)));
        i.bounds.map((m, y) => m === g[y]).some((m) => !m) && this.onChange({
          bounds: g
        });
        return;
      }
      const {
        bounds: l,
        sHandle: u
      } = this, c = this.calcValueByPos(e), f = l[u];
      c !== f && this.moveTo(c);
    },
    onKeyboard(t) {
      const {
        reverse: e,
        vertical: n
      } = this.$props, r = voe(t, n, e);
      if (r) {
        zg(t);
        const {
          bounds: i,
          sHandle: a
        } = this, o = i[a === null ? this.recent : a], s = r(o, this.$props), l = S0({
          value: s,
          handle: a,
          bounds: i,
          props: this.$props
        });
        if (l === o) return;
        this.moveTo(l, !0);
      }
    },
    getClosestBound(t) {
      const {
        bounds: e
      } = this;
      let n = 0;
      for (let r = 1; r < e.length - 1; r += 1)
        t >= e[r] && (n = r);
      return Math.abs(e[n + 1] - t) < Math.abs(e[n] - t) && (n += 1), n;
    },
    getBoundNeedMoving(t, e) {
      const {
        bounds: n,
        recent: r
      } = this;
      let i = e;
      const a = n[e + 1] === n[e];
      return a && n[r] === n[e] && (i = r), a && t !== n[e + 1] && (i = t < n[e + 1] ? e : e + 1), i;
    },
    getLowerBound() {
      return this.bounds[0];
    },
    getUpperBound() {
      const {
        bounds: t
      } = this;
      return t[t.length - 1];
    },
    /**
     * Returns an array of possible slider points, taking into account both
     * `marks` and `step`. The result is cached.
     */
    getPoints() {
      const {
        marks: t,
        step: e,
        min: n,
        max: r
      } = this, i = this.internalPointsCache;
      if (!i || i.marks !== t || i.step !== e) {
        const a = k({}, t);
        if (e !== null)
          for (let s = n; s <= r; s += e)
            a[s] = s;
        const o = Object.keys(a).map(parseFloat);
        o.sort((s, l) => s - l), this.internalPointsCache = {
          marks: t,
          step: e,
          points: o
        };
      }
      return this.internalPointsCache.points;
    },
    moveTo(t, e) {
      const n = [...this.bounds], {
        sHandle: r,
        recent: i
      } = this, a = r === null ? i : r;
      n[a] = t;
      let o = a;
      this.$props.pushable !== !1 ? this.pushSurroundingHandles(n, o) : this.$props.allowCross && (n.sort((s, l) => s - l), o = n.indexOf(t)), this.onChange({
        recent: o,
        sHandle: o,
        bounds: n
      }), e && (this.$emit("afterChange", n), this.setState({}, () => {
        this.handlesRefs[o].focus();
      }), this.onEnd());
    },
    pushSurroundingHandles(t, e) {
      const n = t[e], {
        pushable: r
      } = this, i = Number(r);
      let a = 0;
      if (t[e + 1] - n < i && (a = 1), n - t[e - 1] < i && (a = -1), a === 0)
        return;
      const o = e + a, s = a * (t[o] - n);
      this.pushHandle(t, o, a, i - s) || (t[e] = t[o] - a * i);
    },
    pushHandle(t, e, n, r) {
      const i = t[e];
      let a = t[e];
      for (; n * (a - i) < r; ) {
        if (!this.pushHandleOnePoint(t, e, n))
          return t[e] = i, !1;
        a = t[e];
      }
      return !0;
    },
    pushHandleOnePoint(t, e, n) {
      const r = this.getPoints(), a = r.indexOf(t[e]) + n;
      if (a >= r.length || a < 0)
        return !1;
      const o = e + n, s = r[a], {
        pushable: l
      } = this, u = Number(l), c = n * (t[o] - s);
      return this.pushHandle(t, o, n, u - c) ? (t[e] = s, !0) : !1;
    },
    trimAlignValue(t) {
      const {
        sHandle: e,
        bounds: n
      } = this;
      return S0({
        value: t,
        handle: e,
        bounds: n,
        props: this.$props
      });
    },
    ensureValueNotConflict(t, e, n) {
      let {
        allowCross: r,
        pushable: i
      } = n;
      const a = this.$data || {}, {
        bounds: o
      } = a;
      if (t = t === void 0 ? a.sHandle : t, i = Number(i), !r && t != null && o !== void 0) {
        if (t > 0 && e <= o[t - 1] + i)
          return o[t - 1] + i;
        if (t < o.length - 1 && e >= o[t + 1] - i)
          return o[t + 1] - i;
      }
      return e;
    },
    getTrack(t) {
      let {
        bounds: e,
        prefixCls: n,
        reverse: r,
        vertical: i,
        included: a,
        offsets: o,
        trackStyle: s
      } = t;
      return e.slice(0, -1).map((l, u) => {
        const c = u + 1, f = Re({
          [`${n}-track`]: !0,
          [`${n}-track-${c}`]: !0
        });
        return D(G8, {
          class: f,
          vertical: i,
          reverse: r,
          included: a,
          offset: o[c - 1],
          length: o[c] - o[c - 1],
          style: s[u],
          key: c
        }, null);
      });
    },
    renderSlider() {
      const {
        sHandle: t,
        bounds: e,
        prefixCls: n,
        vertical: r,
        included: i,
        disabled: a,
        min: o,
        max: s,
        reverse: l,
        handle: u,
        defaultHandle: c,
        trackStyle: f,
        handleStyle: d,
        tabindex: h,
        ariaLabelGroupForHandles: p,
        ariaLabelledByGroupForHandles: v,
        ariaValueTextFormatterGroupForHandles: g
      } = this, m = u || c, y = e.map((S) => this.calcOffset(S)), _ = `${n}-handle`, O = e.map((S, x) => {
        let C = h[x] || 0;
        (a || h[x] === null) && (C = null);
        const P = t === x;
        return m({
          class: Re({
            [_]: !0,
            [`${_}-${x + 1}`]: !0,
            [`${_}-dragging`]: P
          }),
          prefixCls: n,
          vertical: r,
          dragging: P,
          offset: y[x],
          value: S,
          index: x,
          tabindex: C,
          min: o,
          max: s,
          reverse: l,
          disabled: a,
          style: d[x],
          ref: ($) => this.saveHandle(x, $),
          onFocus: this.onFocus,
          onBlur: this.onBlur,
          ariaLabel: p[x],
          ariaLabelledBy: v[x],
          ariaValueTextFormatter: g[x]
        });
      });
      return {
        tracks: this.getTrack({
          bounds: e,
          prefixCls: n,
          reverse: l,
          vertical: r,
          included: i,
          offsets: y,
          trackStyle: f
        }),
        handles: O
      };
    }
  }
}), KWe = goe(qWe), JWe = ae({
  compatConfig: {
    MODE: 3
  },
  name: "SliderTooltip",
  inheritAttrs: !1,
  props: wie(),
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const i = ee(null), a = ee(null);
    function o() {
      en.cancel(a.value), a.value = null;
    }
    function s() {
      a.value = en(() => {
        var u;
        (u = i.value) === null || u === void 0 || u.forcePopupAlign(), a.value = null;
      });
    }
    const l = () => {
      o(), t.open && s();
    };
    return me([() => t.open, () => t.title], () => {
      l();
    }, {
      flush: "post",
      immediate: !0
    }), hxe(() => {
      l();
    }), Qt(() => {
      o();
    }), () => D(F2, te(te({
      ref: i
    }, t), n), r);
  }
}), e7e = (t) => {
  const {
    componentCls: e,
    controlSize: n,
    dotSize: r,
    marginFull: i,
    marginPart: a,
    colorFillContentHover: o
  } = t;
  return {
    [e]: k(k({}, Gn(t)), {
      position: "relative",
      height: n,
      margin: `${a}px ${i}px`,
      padding: 0,
      cursor: "pointer",
      touchAction: "none",
      "&-vertical": {
        margin: `${i}px ${a}px`
      },
      [`${e}-rail`]: {
        position: "absolute",
        backgroundColor: t.colorFillTertiary,
        borderRadius: t.borderRadiusXS,
        transition: `background-color ${t.motionDurationMid}`
      },
      [`${e}-track`]: {
        position: "absolute",
        backgroundColor: t.colorPrimaryBorder,
        borderRadius: t.borderRadiusXS,
        transition: `background-color ${t.motionDurationMid}`
      },
      "&:hover": {
        [`${e}-rail`]: {
          backgroundColor: t.colorFillSecondary
        },
        [`${e}-track`]: {
          backgroundColor: t.colorPrimaryBorderHover
        },
        [`${e}-dot`]: {
          borderColor: o
        },
        [`${e}-handle::after`]: {
          boxShadow: `0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorderHover}`
        },
        [`${e}-dot-active`]: {
          borderColor: t.colorPrimary
        }
      },
      [`${e}-handle`]: {
        position: "absolute",
        width: t.handleSize,
        height: t.handleSize,
        outline: "none",
        [`${e}-dragging`]: {
          zIndex: 1
        },
        // 扩大选区
        "&::before": {
          content: '""',
          position: "absolute",
          insetInlineStart: -t.handleLineWidth,
          insetBlockStart: -t.handleLineWidth,
          width: t.handleSize + t.handleLineWidth * 2,
          height: t.handleSize + t.handleLineWidth * 2,
          backgroundColor: "transparent"
        },
        "&::after": {
          content: '""',
          position: "absolute",
          insetBlockStart: 0,
          insetInlineStart: 0,
          width: t.handleSize,
          height: t.handleSize,
          backgroundColor: t.colorBgElevated,
          boxShadow: `0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorder}`,
          borderRadius: "50%",
          cursor: "pointer",
          transition: `
            inset-inline-start ${t.motionDurationMid},
            inset-block-start ${t.motionDurationMid},
            width ${t.motionDurationMid},
            height ${t.motionDurationMid},
            box-shadow ${t.motionDurationMid}
          `
        },
        "&:hover, &:active, &:focus": {
          "&::before": {
            insetInlineStart: -((t.handleSizeHover - t.handleSize) / 2 + t.handleLineWidthHover),
            insetBlockStart: -((t.handleSizeHover - t.handleSize) / 2 + t.handleLineWidthHover),
            width: t.handleSizeHover + t.handleLineWidthHover * 2,
            height: t.handleSizeHover + t.handleLineWidthHover * 2
          },
          "&::after": {
            boxShadow: `0 0 0 ${t.handleLineWidthHover}px ${t.colorPrimary}`,
            width: t.handleSizeHover,
            height: t.handleSizeHover,
            insetInlineStart: (t.handleSize - t.handleSizeHover) / 2,
            insetBlockStart: (t.handleSize - t.handleSizeHover) / 2
          }
        }
      },
      [`${e}-mark`]: {
        position: "absolute",
        fontSize: t.fontSize
      },
      [`${e}-mark-text`]: {
        position: "absolute",
        display: "inline-block",
        color: t.colorTextDescription,
        textAlign: "center",
        wordBreak: "keep-all",
        cursor: "pointer",
        userSelect: "none",
        "&-active": {
          color: t.colorText
        }
      },
      [`${e}-step`]: {
        position: "absolute",
        background: "transparent",
        pointerEvents: "none"
      },
      [`${e}-dot`]: {
        position: "absolute",
        width: r,
        height: r,
        backgroundColor: t.colorBgElevated,
        border: `${t.handleLineWidth}px solid ${t.colorBorderSecondary}`,
        borderRadius: "50%",
        cursor: "pointer",
        transition: `border-color ${t.motionDurationSlow}`,
        "&-active": {
          borderColor: t.colorPrimaryBorder
        }
      },
      [`&${e}-disabled`]: {
        cursor: "not-allowed",
        [`${e}-rail`]: {
          backgroundColor: `${t.colorFillSecondary} !important`
        },
        [`${e}-track`]: {
          backgroundColor: `${t.colorTextDisabled} !important`
        },
        [`
          ${e}-dot
        `]: {
          backgroundColor: t.colorBgElevated,
          borderColor: t.colorTextDisabled,
          boxShadow: "none",
          cursor: "not-allowed"
        },
        [`${e}-handle::after`]: {
          backgroundColor: t.colorBgElevated,
          cursor: "not-allowed",
          width: t.handleSize,
          height: t.handleSize,
          boxShadow: `0 0 0 ${t.handleLineWidth}px ${new Hn(t.colorTextDisabled).onBackground(t.colorBgContainer).toHexString()}`,
          insetInlineStart: 0,
          insetBlockStart: 0
        },
        [`
          ${e}-mark-text,
          ${e}-dot
        `]: {
          cursor: "not-allowed !important"
        }
      }
    })
  };
}, moe = (t, e) => {
  const {
    componentCls: n,
    railSize: r,
    handleSize: i,
    dotSize: a
  } = t, o = e ? "paddingBlock" : "paddingInline", s = e ? "width" : "height", l = e ? "height" : "width", u = e ? "insetBlockStart" : "insetInlineStart", c = e ? "top" : "insetInlineStart";
  return {
    [o]: r,
    [l]: r * 3,
    [`${n}-rail`]: {
      [s]: "100%",
      [l]: r
    },
    [`${n}-track`]: {
      [l]: r
    },
    [`${n}-handle`]: {
      [u]: (r * 3 - i) / 2
    },
    [`${n}-mark`]: {
      // Reset all
      insetInlineStart: 0,
      top: 0,
      [c]: i,
      [s]: "100%"
    },
    [`${n}-step`]: {
      // Reset all
      insetInlineStart: 0,
      top: 0,
      [c]: r,
      [s]: "100%",
      [l]: r
    },
    [`${n}-dot`]: {
      position: "absolute",
      [u]: (r - a) / 2
    }
  };
}, t7e = (t) => {
  const {
    componentCls: e,
    marginPartWithMark: n
  } = t;
  return {
    [`${e}-horizontal`]: k(k({}, moe(t, !0)), {
      [`&${e}-with-marks`]: {
        marginBottom: n
      }
    })
  };
}, n7e = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [`${e}-vertical`]: k(k({}, moe(t, !1)), {
      height: "100%"
    })
  };
}, r7e = pr("Slider", (t) => {
  const e = bn(t, {
    marginPart: (t.controlHeight - t.controlSize) / 2,
    marginFull: t.controlSize / 2,
    marginPartWithMark: t.controlHeightLG - t.controlSize
  });
  return [e7e(e), t7e(e), n7e(e)];
}, (t) => {
  const n = t.controlHeightLG / 4, r = t.controlHeightSM / 2, i = t.lineWidth + 1, a = t.lineWidth + 1 * 3;
  return {
    controlSize: n,
    railSize: 4,
    handleSize: n,
    handleSizeHover: r,
    dotSize: 8,
    handleLineWidth: i,
    handleLineWidthHover: a
  };
});
var LH = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const i7e = (t) => typeof t == "number" ? t.toString() : "", a7e = () => ({
  id: String,
  prefixCls: String,
  tooltipPrefixCls: String,
  range: or([Boolean, Object]),
  reverse: Tt(),
  min: Number,
  max: Number,
  step: or([Object, Number]),
  marks: sn(),
  dots: Tt(),
  value: or([Array, Number]),
  defaultValue: or([Array, Number]),
  included: Tt(),
  disabled: Tt(),
  vertical: Tt(),
  tipFormatter: or([Function, Object], () => i7e),
  tooltipOpen: Tt(),
  /** @deprecated `tooltipVisible` is deprecated. Please use `tooltipOpen` instead. */
  tooltipVisible: Tt(),
  tooltipPlacement: rr(),
  getTooltipPopupContainer: Ct(),
  autofocus: Tt(),
  handleStyle: or([Array, Object]),
  trackStyle: or([Array, Object]),
  onChange: Ct(),
  onAfterChange: Ct(),
  onFocus: Ct(),
  onBlur: Ct(),
  "onUpdate:value": Ct()
}), o7e = ae({
  compatConfig: {
    MODE: 3
  },
  name: "ASlider",
  inheritAttrs: !1,
  props: a7e(),
  // emits: ['update:value', 'change', 'afterChange', 'blur'],
  slots: Object,
  setup(t, e) {
    let {
      attrs: n,
      slots: r,
      emit: i,
      expose: a
    } = e;
    process.env.NODE_ENV !== "production" && [["tooltipVisible", "tooltipOpen"]].forEach((C) => {
      let [P, $] = C;
      lo(t.tooltipVisible === void 0, "Slider", `\`${P}\` is deprecated, please use \`${$}\` instead.`);
    });
    const {
      prefixCls: o,
      rootPrefixCls: s,
      direction: l,
      getPopupContainer: u,
      configProvider: c
    } = hn("slider", t), [f, d] = r7e(o), h = Ul(), p = ee(), v = ee({}), g = (C, P) => {
      v.value[C] = P;
    }, m = V(() => t.tooltipPlacement ? t.tooltipPlacement : t.vertical ? l.value === "rtl" ? "left" : "right" : "top"), y = () => {
      var C;
      (C = p.value) === null || C === void 0 || C.focus();
    }, _ = () => {
      var C;
      (C = p.value) === null || C === void 0 || C.blur();
    }, O = (C) => {
      i("update:value", C), i("change", C), h.onFieldChange();
    }, S = (C) => {
      i("blur", C);
    };
    a({
      focus: y,
      blur: _
    });
    const x = (C) => {
      var {
        tooltipPrefixCls: P
      } = C, $ = C.info, {
        value: T,
        dragging: E,
        index: M
      } = $, R = LH($, ["value", "dragging", "index"]);
      const {
        tipFormatter: N,
        tooltipOpen: I = t.tooltipVisible,
        getTooltipPopupContainer: B
      } = t, Q = N ? v.value[M] || E : !1, W = I || I === void 0 && Q;
      return D(JWe, {
        prefixCls: P,
        title: N ? N(T) : "",
        open: W,
        placement: m.value,
        transitionName: `${s.value}-zoom-down`,
        key: M,
        overlayClassName: `${o.value}-tooltip`,
        getPopupContainer: B || (u == null ? void 0 : u.value)
      }, {
        default: () => [D(foe, te(te({}, R), {}, {
          value: T,
          onMouseenter: () => g(M, !0),
          onMouseleave: () => g(M, !1)
        }), null)]
      });
    };
    return () => {
      const {
        tooltipPrefixCls: C,
        range: P,
        id: $ = h.id.value
      } = t, T = LH(t, ["tooltipPrefixCls", "range", "id"]), E = c.getPrefixCls("tooltip", C), M = Re(n.class, {
        [`${o.value}-rtl`]: l.value === "rtl"
      }, d.value);
      l.value === "rtl" && !T.vertical && (T.reverse = !T.reverse);
      let R;
      return typeof P == "object" && (R = P.draggableTrack), f(P ? D(KWe, te(te(te({}, n), T), {}, {
        step: T.step,
        draggableTrack: R,
        class: M,
        ref: p,
        handle: (N) => x({
          tooltipPrefixCls: E,
          prefixCls: o.value,
          info: N
        }),
        prefixCls: o.value,
        onChange: O,
        onBlur: S
      }), {
        mark: r.mark
      }) : D(XWe, te(te(te({}, n), T), {}, {
        id: $,
        step: T.step,
        class: M,
        ref: p,
        handle: (N) => x({
          tooltipPrefixCls: E,
          prefixCls: o.value,
          info: N
        }),
        prefixCls: o.value,
        onChange: O,
        onBlur: S
      }), {
        mark: r.mark
      }));
    };
  }
}), s7e = fm(o7e);
var l7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "align-center", theme: "outlined" };
function NH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      u7e(t, i, n[i]);
    });
  }
  return t;
}
function u7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var Z8 = function(e, n) {
  var r = NH({}, e, n.attrs);
  return D(Rt, NH({}, r, {
    icon: l7e
  }), null);
};
Z8.displayName = "AlignCenterOutlined";
Z8.inheritAttrs = !1;
var c7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "align-left", theme: "outlined" };
function BH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      f7e(t, i, n[i]);
    });
  }
  return t;
}
function f7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var U8 = function(e, n) {
  var r = BH({}, e, n.attrs);
  return D(Rt, BH({}, r, {
    icon: c7e
  }), null);
};
U8.displayName = "AlignLeftOutlined";
U8.inheritAttrs = !1;
var d7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "align-right", theme: "outlined" };
function zH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      h7e(t, i, n[i]);
    });
  }
  return t;
}
function h7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var X8 = function(e, n) {
  var r = zH({}, e, n.attrs);
  return D(Rt, zH({}, r, {
    icon: d7e
  }), null);
};
X8.displayName = "AlignRightOutlined";
X8.inheritAttrs = !1;
var p7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M697.8 481.4c33.6-35 54.2-82.3 54.2-134.3v-10.2C752 229.3 663.9 142 555.3 142H259.4c-15.1 0-27.4 12.3-27.4 27.4v679.1c0 16.3 13.2 29.5 29.5 29.5h318.7c117 0 211.8-94.2 211.8-210.5v-11c0-73-37.4-137.3-94.2-175.1zM328 238h224.7c57.1 0 103.3 44.4 103.3 99.3v9.5c0 54.8-46.3 99.3-103.3 99.3H328V238zm366.6 429.4c0 62.9-51.7 113.9-115.5 113.9H328V542.7h251.1c63.8 0 115.5 51 115.5 113.9v10.8z" } }] }, name: "bold", theme: "outlined" };
function VH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      v7e(t, i, n[i]);
    });
  }
  return t;
}
function v7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var Y8 = function(e, n) {
  var r = VH({}, e, n.attrs);
  return D(Rt, VH({}, r, {
    icon: p7e
  }), null);
};
Y8.displayName = "BoldOutlined";
Y8.inheritAttrs = !1;
var g7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 808H152c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-720-94h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-498h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-166h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm166 166h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm332 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm222-72h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388-404h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388 426h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388-404h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z" } }] }, name: "border-bottom", theme: "outlined" };
function FH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      m7e(t, i, n[i]);
    });
  }
  return t;
}
function m7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var q8 = function(e, n) {
  var r = FH({}, e, n.attrs);
  return D(Rt, FH({}, r, {
    icon: g7e
  }), null);
};
q8.displayName = "BorderBottomOutlined";
q8.inheritAttrs = !1;
var y7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M208 144h-56c-4.4 0-8 3.6-8 8v720c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V152c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm498 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM540 310h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM374 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "border-left", theme: "outlined" };
function WH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      b7e(t, i, n[i]);
    });
  }
  return t;
}
function b7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var K8 = function(e, n) {
  var r = WH({}, e, n.attrs);
  return D(Rt, WH({}, r, {
    icon: y7e
  }), null);
};
K8.displayName = "BorderLeftOutlined";
K8.inheritAttrs = !1;
var _7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 144h-56c-4.4 0-8 3.6-8 8v720c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V152c0-4.4-3.6-8-8-8zm-166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-498 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM208 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm498 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM374 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "border-right", theme: "outlined" };
function QH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      O7e(t, i, n[i]);
    });
  }
  return t;
}
function O7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var J8 = function(e, n) {
  var r = QH({}, e, n.attrs);
  return D(Rt, QH({}, r, {
    icon: _7e
  }), null);
};
J8.displayName = "BorderRightOutlined";
J8.inheritAttrs = !1;
var S7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 144H152c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM208 310h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 498h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166-166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332-498h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "border-top", theme: "outlined" };
function HH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      x7e(t, i, n[i]);
    });
  }
  return t;
}
function x7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var e5 = function(e, n) {
  var r = HH({}, e, n.attrs);
  return D(Rt, HH({}, r, {
    icon: S7e
  }), null);
};
e5.displayName = "BorderTopOutlined";
e5.inheritAttrs = !1;
var w7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "database", theme: "outlined" };
function GH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      C7e(t, i, n[i]);
    });
  }
  return t;
}
function C7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var K_ = function(e, n) {
  var r = GH({}, e, n.attrs);
  return D(Rt, GH({}, r, {
    icon: w7e
  }), null);
};
K_.displayName = "DatabaseOutlined";
K_.inheritAttrs = !1;
var T7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8zm-650.3-80h85c4.2 0 8-2.7 9.3-6.8l53.7-166h219.2l53.2 166c1.3 4 5 6.8 9.3 6.8h89.1c1.1 0 2.2-.2 3.2-.5a9.7 9.7 0 006-12.4L573.6 118.6a9.9 9.9 0 00-9.2-6.6H462.1c-4.2 0-7.9 2.6-9.2 6.6L244.5 723.1c-.4 1-.5 2.1-.5 3.2-.1 5.3 4.3 9.7 9.7 9.7zm255.9-516.1h4.1l83.8 263.8H424.9l84.7-263.8z" } }] }, name: "font-colors", theme: "outlined" };
function jH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      P7e(t, i, n[i]);
    });
  }
  return t;
}
function P7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var t5 = function(e, n) {
  var r = jH({}, e, n.attrs);
  return D(Rt, jH({}, r, {
    icon: T7e
  }), null);
};
t5.displayName = "FontColorsOutlined";
t5.inheritAttrs = !1;
var $7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M798 160H366c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h181.2l-156 544H229c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8H474.4l156-544H798c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z" } }] }, name: "italic", theme: "outlined" };
function ZH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      A7e(t, i, n[i]);
    });
  }
  return t;
}
function A7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var n5 = function(e, n) {
  var r = ZH({}, e, n.attrs);
  return D(Rt, ZH({}, r, {
    icon: $7e
  }), null);
};
n5.displayName = "ItalicOutlined";
n5.inheritAttrs = !1;
var E7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M712 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm2-696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM136 374h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-174h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm752 624h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-230 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm230 624H358c-87.3 0-158-70.7-158-158V484c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v182c0 127 103 230 230 230h182c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "radius-bottomleft", theme: "outlined" };
function UH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      M7e(t, i, n[i]);
    });
  }
  return t;
}
function M7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var r5 = function(e, n) {
  var r = UH({}, e, n.attrs);
  return D(Rt, UH({}, r, {
    icon: E7e
  }), null);
};
r5.displayName = "RadiusBottomleftOutlined";
r5.inheritAttrs = !1;
var I7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M368 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-58-624h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm578 102h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm292 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm174 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm230 276h-56c-4.4 0-8 3.6-8 8v182c0 87.3-70.7 158-158 158H484c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h182c127 0 230-103 230-230V484c0-4.4-3.6-8-8-8z" } }] }, name: "radius-bottomright", theme: "outlined" };
function XH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      D7e(t, i, n[i]);
    });
  }
  return t;
}
function D7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var i5 = function(e, n) {
  var r = XH({}, e, n.attrs);
  return D(Rt, XH({}, r, {
    icon: I7e
  }), null);
};
i5.displayName = "RadiusBottomrightOutlined";
i5.inheritAttrs = !1;
var R7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M656 200h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm58 624h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 650h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm696-696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-174 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm174-696H358c-127 0-230 103-230 230v182c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V358c0-87.3 70.7-158 158-158h182c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "radius-upleft", theme: "outlined" };
function YH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      k7e(t, i, n[i]);
    });
  }
  return t;
}
function k7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var a5 = function(e, n) {
  var r = YH({}, e, n.attrs);
  return D(Rt, YH({}, r, {
    icon: R7e
  }), null);
};
a5.displayName = "RadiusUpleftOutlined";
a5.inheritAttrs = !1;
var L7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M368 128h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-2 696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm522-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 128h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm174 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-48-696H484c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h182c87.3 0 158 70.7 158 158v182c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V358c0-127-103-230-230-230z" } }] }, name: "radius-upright", theme: "outlined" };
function qH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      N7e(t, i, n[i]);
    });
  }
  return t;
}
function N7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var o5 = function(e, n) {
  var r = qH({}, e, n.attrs);
  return D(Rt, qH({}, r, {
    icon: L7e
  }), null);
};
o5.displayName = "RadiusUprightOutlined";
o5.inheritAttrs = !1;
var B7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z" } }] }, name: "setting", theme: "outlined" };
function KH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      z7e(t, i, n[i]);
    });
  }
  return t;
}
function z7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var vC = function(e, n) {
  var r = KH({}, e, n.attrs);
  return D(Rt, KH({}, r, {
    icon: B7e
  }), null);
};
vC.displayName = "SettingOutlined";
vC.inheritAttrs = !1;
var V7e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z" } }] }, name: "skin", theme: "outlined" };
function JH(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      F7e(t, i, n[i]);
    });
  }
  return t;
}
function F7e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var J_ = function(e, n) {
  var r = JH({}, e, n.attrs);
  return D(Rt, JH({}, r, {
    icon: V7e
  }), null);
};
J_.displayName = "SkinOutlined";
J_.inheritAttrs = !1;
function yoe(t, e) {
  return function() {
    return t.apply(e, arguments);
  };
}
const { toString: W7e } = Object.prototype, { getPrototypeOf: s5 } = Object, J2 = /* @__PURE__ */ ((t) => (e) => {
  const n = W7e.call(e);
  return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null)), Ks = (t) => (t = t.toLowerCase(), (e) => J2(e) === t), eP = (t) => (e) => typeof e === t, { isArray: vm } = Array, Bb = eP("undefined");
function Q7e(t) {
  return t !== null && !Bb(t) && t.constructor !== null && !Bb(t.constructor) && Yo(t.constructor.isBuffer) && t.constructor.isBuffer(t);
}
const boe = Ks("ArrayBuffer");
function H7e(t) {
  let e;
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && boe(t.buffer), e;
}
const G7e = eP("string"), Yo = eP("function"), _oe = eP("number"), tP = (t) => t !== null && typeof t == "object", j7e = (t) => t === !0 || t === !1, rw = (t) => {
  if (J2(t) !== "object")
    return !1;
  const e = s5(t);
  return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
}, Z7e = Ks("Date"), U7e = Ks("File"), X7e = Ks("Blob"), Y7e = Ks("FileList"), q7e = (t) => tP(t) && Yo(t.pipe), K7e = (t) => {
  let e;
  return t && (typeof FormData == "function" && t instanceof FormData || Yo(t.append) && ((e = J2(t)) === "formdata" || // detect form-data instance
  e === "object" && Yo(t.toString) && t.toString() === "[object FormData]"));
}, J7e = Ks("URLSearchParams"), [eQe, tQe, nQe, rQe] = ["ReadableStream", "Request", "Response", "Headers"].map(Ks), iQe = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function e1(t, e, { allOwnKeys: n = !1 } = {}) {
  if (t === null || typeof t > "u")
    return;
  let r, i;
  if (typeof t != "object" && (t = [t]), vm(t))
    for (r = 0, i = t.length; r < i; r++)
      e.call(null, t[r], r, t);
  else {
    const a = n ? Object.getOwnPropertyNames(t) : Object.keys(t), o = a.length;
    let s;
    for (r = 0; r < o; r++)
      s = a[r], e.call(null, t[s], s, t);
  }
}
function Ooe(t, e) {
  e = e.toLowerCase();
  const n = Object.keys(t);
  let r = n.length, i;
  for (; r-- > 0; )
    if (i = n[r], e === i.toLowerCase())
      return i;
  return null;
}
const Soe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, xoe = (t) => !Bb(t) && t !== Soe;
function jR() {
  const { caseless: t } = xoe(this) && this || {}, e = {}, n = (r, i) => {
    const a = t && Ooe(e, i) || i;
    rw(e[a]) && rw(r) ? e[a] = jR(e[a], r) : rw(r) ? e[a] = jR({}, r) : vm(r) ? e[a] = r.slice() : e[a] = r;
  };
  for (let r = 0, i = arguments.length; r < i; r++)
    arguments[r] && e1(arguments[r], n);
  return e;
}
const aQe = (t, e, n, { allOwnKeys: r } = {}) => (e1(e, (i, a) => {
  n && Yo(i) ? t[a] = yoe(i, n) : t[a] = i;
}, { allOwnKeys: r }), t), oQe = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), sQe = (t, e, n, r) => {
  t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", {
    value: e.prototype
  }), n && Object.assign(t.prototype, n);
}, lQe = (t, e, n, r) => {
  let i, a, o;
  const s = {};
  if (e = e || {}, t == null) return e;
  do {
    for (i = Object.getOwnPropertyNames(t), a = i.length; a-- > 0; )
      o = i[a], (!r || r(o, t, e)) && !s[o] && (e[o] = t[o], s[o] = !0);
    t = n !== !1 && s5(t);
  } while (t && (!n || n(t, e)) && t !== Object.prototype);
  return e;
}, uQe = (t, e, n) => {
  t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
  const r = t.indexOf(e, n);
  return r !== -1 && r === n;
}, cQe = (t) => {
  if (!t) return null;
  if (vm(t)) return t;
  let e = t.length;
  if (!_oe(e)) return null;
  const n = new Array(e);
  for (; e-- > 0; )
    n[e] = t[e];
  return n;
}, fQe = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && s5(Uint8Array)), dQe = (t, e) => {
  const r = (t && t[Symbol.iterator]).call(t);
  let i;
  for (; (i = r.next()) && !i.done; ) {
    const a = i.value;
    e.call(t, a[0], a[1]);
  }
}, hQe = (t, e) => {
  let n;
  const r = [];
  for (; (n = t.exec(e)) !== null; )
    r.push(n);
  return r;
}, pQe = Ks("HTMLFormElement"), vQe = (t) => t.toLowerCase().replace(
  /[-_\s]([a-z\d])(\w*)/g,
  function(n, r, i) {
    return r.toUpperCase() + i;
  }
), e9 = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), gQe = Ks("RegExp"), woe = (t, e) => {
  const n = Object.getOwnPropertyDescriptors(t), r = {};
  e1(n, (i, a) => {
    let o;
    (o = e(i, a, t)) !== !1 && (r[a] = o || i);
  }), Object.defineProperties(t, r);
}, mQe = (t) => {
  woe(t, (e, n) => {
    if (Yo(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
      return !1;
    const r = t[n];
    if (Yo(r)) {
      if (e.enumerable = !1, "writable" in e) {
        e.writable = !1;
        return;
      }
      e.set || (e.set = () => {
        throw Error("Can not rewrite read-only method '" + n + "'");
      });
    }
  });
}, yQe = (t, e) => {
  const n = {}, r = (i) => {
    i.forEach((a) => {
      n[a] = !0;
    });
  };
  return vm(t) ? r(t) : r(String(t).split(e)), n;
}, bQe = () => {
}, _Qe = (t, e) => t != null && Number.isFinite(t = +t) ? t : e, xE = "abcdefghijklmnopqrstuvwxyz", t9 = "0123456789", Coe = {
  DIGIT: t9,
  ALPHA: xE,
  ALPHA_DIGIT: xE + xE.toUpperCase() + t9
}, OQe = (t = 16, e = Coe.ALPHA_DIGIT) => {
  let n = "";
  const { length: r } = e;
  for (; t--; )
    n += e[Math.random() * r | 0];
  return n;
};
function SQe(t) {
  return !!(t && Yo(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]);
}
const xQe = (t) => {
  const e = new Array(10), n = (r, i) => {
    if (tP(r)) {
      if (e.indexOf(r) >= 0)
        return;
      if (!("toJSON" in r)) {
        e[i] = r;
        const a = vm(r) ? [] : {};
        return e1(r, (o, s) => {
          const l = n(o, i + 1);
          !Bb(l) && (a[s] = l);
        }), e[i] = void 0, a;
      }
    }
    return r;
  };
  return n(t, 0);
}, wQe = Ks("AsyncFunction"), CQe = (t) => t && (tP(t) || Yo(t)) && Yo(t.then) && Yo(t.catch), Te = {
  isArray: vm,
  isArrayBuffer: boe,
  isBuffer: Q7e,
  isFormData: K7e,
  isArrayBufferView: H7e,
  isString: G7e,
  isNumber: _oe,
  isBoolean: j7e,
  isObject: tP,
  isPlainObject: rw,
  isReadableStream: eQe,
  isRequest: tQe,
  isResponse: nQe,
  isHeaders: rQe,
  isUndefined: Bb,
  isDate: Z7e,
  isFile: U7e,
  isBlob: X7e,
  isRegExp: gQe,
  isFunction: Yo,
  isStream: q7e,
  isURLSearchParams: J7e,
  isTypedArray: fQe,
  isFileList: Y7e,
  forEach: e1,
  merge: jR,
  extend: aQe,
  trim: iQe,
  stripBOM: oQe,
  inherits: sQe,
  toFlatObject: lQe,
  kindOf: J2,
  kindOfTest: Ks,
  endsWith: uQe,
  toArray: cQe,
  forEachEntry: dQe,
  matchAll: hQe,
  isHTMLForm: pQe,
  hasOwnProperty: e9,
  hasOwnProp: e9,
  // an alias to avoid ESLint no-prototype-builtins detection
  reduceDescriptors: woe,
  freezeMethods: mQe,
  toObjectSet: yQe,
  toCamelCase: vQe,
  noop: bQe,
  toFiniteNumber: _Qe,
  findKey: Ooe,
  global: Soe,
  isContextDefined: xoe,
  ALPHABET: Coe,
  generateString: OQe,
  isSpecCompliantForm: SQe,
  toJSONObject: xQe,
  isAsyncFn: wQe,
  isThenable: CQe
};
function Ht(t, e, n, r, i) {
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), r && (this.request = r), i && (this.response = i);
}
Te.inherits(Ht, 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: Te.toJSONObject(this.config),
      code: this.code,
      status: this.response && this.response.status ? this.response.status : null
    };
  }
});
const Toe = Ht.prototype, Poe = {};
[
  "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((t) => {
  Poe[t] = { value: t };
});
Object.defineProperties(Ht, Poe);
Object.defineProperty(Toe, "isAxiosError", { value: !0 });
Ht.from = (t, e, n, r, i, a) => {
  const o = Object.create(Toe);
  return Te.toFlatObject(t, o, function(l) {
    return l !== Error.prototype;
  }, (s) => s !== "isAxiosError"), Ht.call(o, t.message, e, n, r, i), o.cause = t, o.name = t.name, a && Object.assign(o, a), o;
};
const TQe = null;
function ZR(t) {
  return Te.isPlainObject(t) || Te.isArray(t);
}
function $oe(t) {
  return Te.endsWith(t, "[]") ? t.slice(0, -2) : t;
}
function n9(t, e, n) {
  return t ? t.concat(e).map(function(i, a) {
    return i = $oe(i), !n && a ? "[" + i + "]" : i;
  }).join(n ? "." : "") : e;
}
function PQe(t) {
  return Te.isArray(t) && !t.some(ZR);
}
const $Qe = Te.toFlatObject(Te, {}, null, function(e) {
  return /^is[A-Z]/.test(e);
});
function nP(t, e, n) {
  if (!Te.isObject(t))
    throw new TypeError("target must be an object");
  e = e || new FormData(), n = Te.toFlatObject(n, {
    metaTokens: !0,
    dots: !1,
    indexes: !1
  }, !1, function(v, g) {
    return !Te.isUndefined(g[v]);
  });
  const r = n.metaTokens, i = n.visitor || c, a = n.dots, o = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && Te.isSpecCompliantForm(e);
  if (!Te.isFunction(i))
    throw new TypeError("visitor must be a function");
  function u(p) {
    if (p === null) return "";
    if (Te.isDate(p))
      return p.toISOString();
    if (!l && Te.isBlob(p))
      throw new Ht("Blob is not supported. Use a Buffer instead.");
    return Te.isArrayBuffer(p) || Te.isTypedArray(p) ? l && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
  }
  function c(p, v, g) {
    let m = p;
    if (p && !g && typeof p == "object") {
      if (Te.endsWith(v, "{}"))
        v = r ? v : v.slice(0, -2), p = JSON.stringify(p);
      else if (Te.isArray(p) && PQe(p) || (Te.isFileList(p) || Te.endsWith(v, "[]")) && (m = Te.toArray(p)))
        return v = $oe(v), m.forEach(function(_, O) {
          !(Te.isUndefined(_) || _ === null) && e.append(
            // eslint-disable-next-line no-nested-ternary
            o === !0 ? n9([v], O, a) : o === null ? v : v + "[]",
            u(_)
          );
        }), !1;
    }
    return ZR(p) ? !0 : (e.append(n9(g, v, a), u(p)), !1);
  }
  const f = [], d = Object.assign($Qe, {
    defaultVisitor: c,
    convertValue: u,
    isVisitable: ZR
  });
  function h(p, v) {
    if (!Te.isUndefined(p)) {
      if (f.indexOf(p) !== -1)
        throw Error("Circular reference detected in " + v.join("."));
      f.push(p), Te.forEach(p, function(m, y) {
        (!(Te.isUndefined(m) || m === null) && i.call(
          e,
          m,
          Te.isString(y) ? y.trim() : y,
          v,
          d
        )) === !0 && h(m, v ? v.concat(y) : [y]);
      }), f.pop();
    }
  }
  if (!Te.isObject(t))
    throw new TypeError("data must be an object");
  return h(t), e;
}
function r9(t) {
  const e = {
    "!": "%21",
    "'": "%27",
    "(": "%28",
    ")": "%29",
    "~": "%7E",
    "%20": "+",
    "%00": "\0"
  };
  return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(r) {
    return e[r];
  });
}
function l5(t, e) {
  this._pairs = [], t && nP(t, this, e);
}
const Aoe = l5.prototype;
Aoe.append = function(e, n) {
  this._pairs.push([e, n]);
};
Aoe.toString = function(e) {
  const n = e ? function(r) {
    return e.call(this, r, r9);
  } : r9;
  return this._pairs.map(function(i) {
    return n(i[0]) + "=" + n(i[1]);
  }, "").join("&");
};
function AQe(t) {
  return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
}
function Eoe(t, e, n) {
  if (!e)
    return t;
  const r = n && n.encode || AQe, i = n && n.serialize;
  let a;
  if (i ? a = i(e, n) : a = Te.isURLSearchParams(e) ? e.toString() : new l5(e, n).toString(r), a) {
    const o = t.indexOf("#");
    o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") + a;
  }
  return t;
}
class i9 {
  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(e, n, r) {
    return this.handlers.push({
      fulfilled: e,
      rejected: n,
      synchronous: r ? r.synchronous : !1,
      runWhen: r ? r.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(e) {
    this.handlers[e] && (this.handlers[e] = 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(e) {
    Te.forEach(this.handlers, function(r) {
      r !== null && e(r);
    });
  }
}
const Moe = {
  silentJSONParsing: !0,
  forcedJSONParsing: !0,
  clarifyTimeoutError: !1
}, EQe = typeof URLSearchParams < "u" ? URLSearchParams : l5, MQe = typeof FormData < "u" ? FormData : null, IQe = typeof Blob < "u" ? Blob : null, DQe = {
  isBrowser: !0,
  classes: {
    URLSearchParams: EQe,
    FormData: MQe,
    Blob: IQe
  },
  protocols: ["http", "https", "file", "blob", "url", "data"]
}, u5 = typeof window < "u" && typeof document < "u", RQe = ((t) => u5 && ["ReactNative", "NativeScript", "NS"].indexOf(t) < 0)(typeof navigator < "u" && navigator.product), kQe = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", LQe = u5 && window.location.href || "http://localhost", NQe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  hasBrowserEnv: u5,
  hasStandardBrowserEnv: RQe,
  hasStandardBrowserWebWorkerEnv: kQe,
  origin: LQe
}, Symbol.toStringTag, { value: "Module" })), Ls = {
  ...NQe,
  ...DQe
};
function BQe(t, e) {
  return nP(t, new Ls.classes.URLSearchParams(), Object.assign({
    visitor: function(n, r, i, a) {
      return Ls.isNode && Te.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments);
    }
  }, e));
}
function zQe(t) {
  return Te.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
}
function VQe(t) {
  const e = {}, n = Object.keys(t);
  let r;
  const i = n.length;
  let a;
  for (r = 0; r < i; r++)
    a = n[r], e[a] = t[a];
  return e;
}
function Ioe(t) {
  function e(n, r, i, a) {
    let o = n[a++];
    if (o === "__proto__") return !0;
    const s = Number.isFinite(+o), l = a >= n.length;
    return o = !o && Te.isArray(i) ? i.length : o, l ? (Te.hasOwnProp(i, o) ? i[o] = [i[o], r] : i[o] = r, !s) : ((!i[o] || !Te.isObject(i[o])) && (i[o] = []), e(n, r, i[o], a) && Te.isArray(i[o]) && (i[o] = VQe(i[o])), !s);
  }
  if (Te.isFormData(t) && Te.isFunction(t.entries)) {
    const n = {};
    return Te.forEachEntry(t, (r, i) => {
      e(zQe(r), i, n, 0);
    }), n;
  }
  return null;
}
function FQe(t, e, n) {
  if (Te.isString(t))
    try {
      return (e || JSON.parse)(t), Te.trim(t);
    } catch (r) {
      if (r.name !== "SyntaxError")
        throw r;
    }
  return (n || JSON.stringify)(t);
}
const t1 = {
  transitional: Moe,
  adapter: ["xhr", "http", "fetch"],
  transformRequest: [function(e, n) {
    const r = n.getContentType() || "", i = r.indexOf("application/json") > -1, a = Te.isObject(e);
    if (a && Te.isHTMLForm(e) && (e = new FormData(e)), Te.isFormData(e))
      return i ? JSON.stringify(Ioe(e)) : e;
    if (Te.isArrayBuffer(e) || Te.isBuffer(e) || Te.isStream(e) || Te.isFile(e) || Te.isBlob(e) || Te.isReadableStream(e))
      return e;
    if (Te.isArrayBufferView(e))
      return e.buffer;
    if (Te.isURLSearchParams(e))
      return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
    let s;
    if (a) {
      if (r.indexOf("application/x-www-form-urlencoded") > -1)
        return BQe(e, this.formSerializer).toString();
      if ((s = Te.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
        const l = this.env && this.env.FormData;
        return nP(
          s ? { "files[]": e } : e,
          l && new l(),
          this.formSerializer
        );
      }
    }
    return a || i ? (n.setContentType("application/json", !1), FQe(e)) : e;
  }],
  transformResponse: [function(e) {
    const n = this.transitional || t1.transitional, r = n && n.forcedJSONParsing, i = this.responseType === "json";
    if (Te.isResponse(e) || Te.isReadableStream(e))
      return e;
    if (e && Te.isString(e) && (r && !this.responseType || i)) {
      const o = !(n && n.silentJSONParsing) && i;
      try {
        return JSON.parse(e);
      } catch (s) {
        if (o)
          throw s.name === "SyntaxError" ? Ht.from(s, Ht.ERR_BAD_RESPONSE, this, null, this.response) : s;
      }
    }
    return e;
  }],
  /**
   * 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: Ls.classes.FormData,
    Blob: Ls.classes.Blob
  },
  validateStatus: function(e) {
    return e >= 200 && e < 300;
  },
  headers: {
    common: {
      Accept: "application/json, text/plain, */*",
      "Content-Type": void 0
    }
  }
};
Te.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
  t1.headers[t] = {};
});
const WQe = Te.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"
]), QQe = (t) => {
  const e = {};
  let n, r, i;
  return t && t.split(`
`).forEach(function(o) {
    i = o.indexOf(":"), n = o.substring(0, i).trim().toLowerCase(), r = o.substring(i + 1).trim(), !(!n || e[n] && WQe[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
  }), e;
}, a9 = Symbol("internals");
function x0(t) {
  return t && String(t).trim().toLowerCase();
}
function iw(t) {
  return t === !1 || t == null ? t : Te.isArray(t) ? t.map(iw) : String(t);
}
function HQe(t) {
  const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
  let r;
  for (; r = n.exec(t); )
    e[r[1]] = r[2];
  return e;
}
const GQe = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
function wE(t, e, n, r, i) {
  if (Te.isFunction(r))
    return r.call(this, e, n);
  if (i && (e = n), !!Te.isString(e)) {
    if (Te.isString(r))
      return e.indexOf(r) !== -1;
    if (Te.isRegExp(r))
      return r.test(e);
  }
}
function jQe(t) {
  return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
}
function ZQe(t, e) {
  const n = Te.toCamelCase(" " + e);
  ["get", "set", "has"].forEach((r) => {
    Object.defineProperty(t, r + n, {
      value: function(i, a, o) {
        return this[r].call(this, e, i, a, o);
      },
      configurable: !0
    });
  });
}
class La {
  constructor(e) {
    e && this.set(e);
  }
  set(e, n, r) {
    const i = this;
    function a(s, l, u) {
      const c = x0(l);
      if (!c)
        throw new Error("header name must be a non-empty string");
      const f = Te.findKey(i, c);
      (!f || i[f] === void 0 || u === !0 || u === void 0 && i[f] !== !1) && (i[f || l] = iw(s));
    }
    const o = (s, l) => Te.forEach(s, (u, c) => a(u, c, l));
    if (Te.isPlainObject(e) || e instanceof this.constructor)
      o(e, n);
    else if (Te.isString(e) && (e = e.trim()) && !GQe(e))
      o(QQe(e), n);
    else if (Te.isHeaders(e))
      for (const [s, l] of e.entries())
        a(l, s, r);
    else
      e != null && a(n, e, r);
    return this;
  }
  get(e, n) {
    if (e = x0(e), e) {
      const r = Te.findKey(this, e);
      if (r) {
        const i = this[r];
        if (!n)
          return i;
        if (n === !0)
          return HQe(i);
        if (Te.isFunction(n))
          return n.call(this, i, r);
        if (Te.isRegExp(n))
          return n.exec(i);
        throw new TypeError("parser must be boolean|regexp|function");
      }
    }
  }
  has(e, n) {
    if (e = x0(e), e) {
      const r = Te.findKey(this, e);
      return !!(r && this[r] !== void 0 && (!n || wE(this, this[r], r, n)));
    }
    return !1;
  }
  delete(e, n) {
    const r = this;
    let i = !1;
    function a(o) {
      if (o = x0(o), o) {
        const s = Te.findKey(r, o);
        s && (!n || wE(r, r[s], s, n)) && (delete r[s], i = !0);
      }
    }
    return Te.isArray(e) ? e.forEach(a) : a(e), i;
  }
  clear(e) {
    const n = Object.keys(this);
    let r = n.length, i = !1;
    for (; r--; ) {
      const a = n[r];
      (!e || wE(this, this[a], a, e, !0)) && (delete this[a], i = !0);
    }
    return i;
  }
  normalize(e) {
    const n = this, r = {};
    return Te.forEach(this, (i, a) => {
      const o = Te.findKey(r, a);
      if (o) {
        n[o] = iw(i), delete n[a];
        return;
      }
      const s = e ? jQe(a) : String(a).trim();
      s !== a && delete n[a], n[s] = iw(i), r[s] = !0;
    }), this;
  }
  concat(...e) {
    return this.constructor.concat(this, ...e);
  }
  toJSON(e) {
    const n = /* @__PURE__ */ Object.create(null);
    return Te.forEach(this, (r, i) => {
      r != null && r !== !1 && (n[i] = e && Te.isArray(r) ? r.join(", ") : r);
    }), n;
  }
  [Symbol.iterator]() {
    return Object.entries(this.toJSON())[Symbol.iterator]();
  }
  toString() {
    return Object.entries(this.toJSON()).map(([e, n]) => e + ": " + n).join(`
`);
  }
  get [Symbol.toStringTag]() {
    return "AxiosHeaders";
  }
  static from(e) {
    return e instanceof this ? e : new this(e);
  }
  static concat(e, ...n) {
    const r = new this(e);
    return n.forEach((i) => r.set(i)), r;
  }
  static accessor(e) {
    const r = (this[a9] = this[a9] = {
      accessors: {}
    }).accessors, i = this.prototype;
    function a(o) {
      const s = x0(o);
      r[s] || (ZQe(i, o), r[s] = !0);
    }
    return Te.isArray(e) ? e.forEach(a) : a(e), this;
  }
}
La.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
Te.reduceDescriptors(La.prototype, ({ value: t }, e) => {
  let n = e[0].toUpperCase() + e.slice(1);
  return {
    get: () => t,
    set(r) {
      this[n] = r;
    }
  };
});
Te.freezeMethods(La);
function CE(t, e) {
  const n = this || t1, r = e || n, i = La.from(r.headers);
  let a = r.data;
  return Te.forEach(t, function(s) {
    a = s.call(n, a, i.normalize(), e ? e.status : void 0);
  }), i.normalize(), a;
}
function Doe(t) {
  return !!(t && t.__CANCEL__);
}
function gm(t, e, n) {
  Ht.call(this, t ?? "canceled", Ht.ERR_CANCELED, e, n), this.name = "CanceledError";
}
Te.inherits(gm, Ht, {
  __CANCEL__: !0
});
function Roe(t, e, n) {
  const r = n.config.validateStatus;
  !n.status || !r || r(n.status) ? t(n) : e(new Ht(
    "Request failed with status code " + n.status,
    [Ht.ERR_BAD_REQUEST, Ht.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
    n.config,
    n.request,
    n
  ));
}
function UQe(t) {
  const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
  return e && e[1] || "";
}
function XQe(t, e) {
  t = t || 10;
  const n = new Array(t), r = new Array(t);
  let i = 0, a = 0, o;
  return e = e !== void 0 ? e : 1e3, function(l) {
    const u = Date.now(), c = r[a];
    o || (o = u), n[i] = l, r[i] = u;
    let f = a, d = 0;
    for (; f !== i; )
      d += n[f++], f = f % t;
    if (i = (i + 1) % t, i === a && (a = (a + 1) % t), u - o < e)
      return;
    const h = c && u - c;
    return h ? Math.round(d * 1e3 / h) : void 0;
  };
}
function YQe(t, e) {
  let n = 0;
  const r = 1e3 / e;
  let i = null;
  return function() {
    const o = this === !0, s = Date.now();
    if (o || s - n > r)
      return i && (clearTimeout(i), i = null), n = s, t.apply(null, arguments);
    i || (i = setTimeout(() => (i = null, n = Date.now(), t.apply(null, arguments)), r - (s - n)));
  };
}
const gC = (t, e, n = 3) => {
  let r = 0;
  const i = XQe(50, 250);
  return YQe((a) => {
    const o = a.loaded, s = a.lengthComputable ? a.total : void 0, l = o - r, u = i(l), c = o <= s;
    r = o;
    const f = {
      loaded: o,
      total: s,
      progress: s ? o / s : void 0,
      bytes: l,
      rate: u || void 0,
      estimated: u && s && c ? (s - o) / u : void 0,
      event: a,
      lengthComputable: s != null
    };
    f[e ? "download" : "upload"] = !0, t(f);
  }, n);
}, qQe = Ls.hasStandardBrowserEnv ? (
  // Standard browser envs have full support of the APIs needed to test
  // whether the request URL is of the same origin as current location.
  function() {
    const e = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
    let r;
    function i(a) {
      let o = a;
      return e && (n.setAttribute("href", o), o = n.href), n.setAttribute("href", o), {
        href: n.href,
        protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
        host: n.host,
        search: n.search ? n.search.replace(/^\?/, "") : "",
        hash: n.hash ? n.hash.replace(/^#/, "") : "",
        hostname: n.hostname,
        port: n.port,
        pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
      };
    }
    return r = i(window.location.href), function(o) {
      const s = Te.isString(o) ? i(o) : o;
      return s.protocol === r.protocol && s.host === r.host;
    };
  }()
) : (
  // Non standard browser envs (web workers, react-native) lack needed support.
  /* @__PURE__ */ function() {
    return function() {
      return !0;
    };
  }()
), KQe = Ls.hasStandardBrowserEnv ? (
  // Standard browser envs support document.cookie
  {
    write(t, e, n, r, i, a) {
      const o = [t + "=" + encodeURIComponent(e)];
      Te.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), Te.isString(r) && o.push("path=" + r), Te.isString(i) && o.push("domain=" + i), a === !0 && o.push("secure"), document.cookie = o.join("; ");
    },
    read(t) {
      const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
      return e ? decodeURIComponent(e[3]) : null;
    },
    remove(t) {
      this.write(t, "", Date.now() - 864e5);
    }
  }
) : (
  // Non-standard browser env (web workers, react-native) lack needed support.
  {
    write() {
    },
    read() {
      return null;
    },
    remove() {
    }
  }
);
function JQe(t) {
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
}
function eHe(t, e) {
  return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
}
function koe(t, e) {
  return t && !JQe(e) ? eHe(t, e) : e;
}
const o9 = (t) => t instanceof La ? { ...t } : t;
function Qh(t, e) {
  e = e || {};
  const n = {};
  function r(u, c, f) {
    return Te.isPlainObject(u) && Te.isPlainObject(c) ? Te.merge.call({ caseless: f }, u, c) : Te.isPlainObject(c) ? Te.merge({}, c) : Te.isArray(c) ? c.slice() : c;
  }
  function i(u, c, f) {
    if (Te.isUndefined(c)) {
      if (!Te.isUndefined(u))
        return r(void 0, u, f);
    } else return r(u, c, f);
  }
  function a(u, c) {
    if (!Te.isUndefined(c))
      return r(void 0, c);
  }
  function o(u, c) {
    if (Te.isUndefined(c)) {
      if (!Te.isUndefined(u))
        return r(void 0, u);
    } else return r(void 0, c);
  }
  function s(u, c, f) {
    if (f in e)
      return r(u, c);
    if (f in t)
      return r(void 0, u);
  }
  const l = {
    url: a,
    method: a,
    data: a,
    baseURL: o,
    transformRequest: o,
    transformResponse: o,
    paramsSerializer: o,
    timeout: o,
    timeoutMessage: o,
    withCredentials: o,
    withXSRFToken: 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, c) => i(o9(u), o9(c), !0)
  };
  return Te.forEach(Object.keys(Object.assign({}, t, e)), function(c) {
    const f = l[c] || i, d = f(t[c], e[c], c);
    Te.isUndefined(d) && f !== s || (n[c] = d);
  }), n;
}
const Loe = (t) => {
  const e = Qh({}, t);
  let { data: n, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: a, headers: o, auth: s } = e;
  e.headers = o = La.from(o), e.url = Eoe(koe(e.baseURL, e.url), t.params, t.paramsSerializer), s && o.set(
    "Authorization",
    "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))
  );
  let l;
  if (Te.isFormData(n)) {
    if (Ls.hasStandardBrowserEnv || Ls.hasStandardBrowserWebWorkerEnv)
      o.setContentType(void 0);
    else if ((l = o.getContentType()) !== !1) {
      const [u, ...c] = l ? l.split(";").map((f) => f.trim()).filter(Boolean) : [];
      o.setContentType([u || "multipart/form-data", ...c].join("; "));
    }
  }
  if (Ls.hasStandardBrowserEnv && (r && Te.isFunction(r) && (r = r(e)), r || r !== !1 && qQe(e.url))) {
    const u = i && a && KQe.read(a);
    u && o.set(i, u);
  }
  return e;
}, tHe = typeof XMLHttpRequest < "u", nHe = tHe && function(t) {
  return new Promise(function(n, r) {
    const i = Loe(t);
    let a = i.data;
    const o = La.from(i.headers).normalize();
    let { responseType: s } = i, l;
    function u() {
      i.cancelToken && i.cancelToken.unsubscribe(l), i.signal && i.signal.removeEventListener("abort", l);
    }
    let c = new XMLHttpRequest();
    c.open(i.method.toUpperCase(), i.url, !0), c.timeout = i.timeout;
    function f() {
      if (!c)
        return;
      const h = La.from(
        "getAllResponseHeaders" in c && c.getAllResponseHeaders()
      ), v = {
        data: !s || s === "text" || s === "json" ? c.responseText : c.response,
        status: c.status,
        statusText: c.statusText,
        headers: h,
        config: t,
        request: c
      };
      Roe(function(m) {
        n(m), u();
      }, function(m) {
        r(m), u();
      }, v), c = null;
    }
    "onloadend" in c ? c.onloadend = f : c.onreadystatechange = function() {
      !c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(f);
    }, c.onabort = function() {
      c && (r(new Ht("Request aborted", Ht.ECONNABORTED, i, c)), c = null);
    }, c.onerror = function() {
      r(new Ht("Network Error", Ht.ERR_NETWORK, i, c)), c = null;
    }, c.ontimeout = function() {
      let p = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
      const v = i.transitional || Moe;
      i.timeoutErrorMessage && (p = i.timeoutErrorMessage), r(new Ht(
        p,
        v.clarifyTimeoutError ? Ht.ETIMEDOUT : Ht.ECONNABORTED,
        i,
        c
      )), c = null;
    }, a === void 0 && o.setContentType(null), "setRequestHeader" in c && Te.forEach(o.toJSON(), function(p, v) {
      c.setRequestHeader(v, p);
    }), Te.isUndefined(i.withCredentials) || (c.withCredentials = !!i.withCredentials), s && s !== "json" && (c.responseType = i.responseType), typeof i.onDownloadProgress == "function" && c.addEventListener("progress", gC(i.onDownloadProgress, !0)), typeof i.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", gC(i.onUploadProgress)), (i.cancelToken || i.signal) && (l = (h) => {
      c && (r(!h || h.type ? new gm(null, t, c) : h), c.abort(), c = null);
    }, i.cancelToken && i.cancelToken.subscribe(l), i.signal && (i.signal.aborted ? l() : i.signal.addEventListener("abort", l)));
    const d = UQe(i.url);
    if (d && Ls.protocols.indexOf(d) === -1) {
      r(new Ht("Unsupported protocol " + d + ":", Ht.ERR_BAD_REQUEST, t));
      return;
    }
    c.send(a || null);
  });
}, rHe = (t, e) => {
  let n = new AbortController(), r;
  const i = function(l) {
    if (!r) {
      r = !0, o();
      const u = l instanceof Error ? l : this.reason;
      n.abort(u instanceof Ht ? u : new gm(u instanceof Error ? u.message : u));
    }
  };
  let a = e && setTimeout(() => {
    i(new Ht(`timeout ${e} of ms exceeded`, Ht.ETIMEDOUT));
  }, e);
  const o = () => {
    t && (a && clearTimeout(a), a = null, t.forEach((l) => {
      l && (l.removeEventListener ? l.removeEventListener("abort", i) : l.unsubscribe(i));
    }), t = null);
  };
  t.forEach((l) => l && l.addEventListener && l.addEventListener("abort", i));
  const { signal: s } = n;
  return s.unsubscribe = o, [s, () => {
    a && clearTimeout(a), a = null;
  }];
}, iHe = function* (t, e) {
  let n = t.byteLength;
  if (!e || n < e) {
    yield t;
    return;
  }
  let r = 0, i;
  for (; r < n; )
    i = r + e, yield t.slice(r, i), r = i;
}, aHe = async function* (t, e, n) {
  for await (const r of t)
    yield* iHe(ArrayBuffer.isView(r) ? r : await n(String(r)), e);
}, s9 = (t, e, n, r, i) => {
  const a = aHe(t, e, i);
  let o = 0;
  return new ReadableStream({
    type: "bytes",
    async pull(s) {
      const { done: l, value: u } = await a.next();
      if (l) {
        s.close(), r();
        return;
      }
      let c = u.byteLength;
      n && n(o += c), s.enqueue(new Uint8Array(u));
    },
    cancel(s) {
      return r(s), a.return();
    }
  }, {
    highWaterMark: 2
  });
}, l9 = (t, e) => {
  const n = t != null;
  return (r) => setTimeout(() => e({
    lengthComputable: n,
    total: t,
    loaded: r
  }));
}, rP = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Noe = rP && typeof ReadableStream == "function", UR = rP && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), oHe = Noe && (() => {
  let t = !1;
  const e = new Request(Ls.origin, {
    body: new ReadableStream(),
    method: "POST",
    get duplex() {
      return t = !0, "half";
    }
  }).headers.has("Content-Type");
  return t && !e;
})(), u9 = 64 * 1024, XR = Noe && !!(() => {
  try {
    return Te.isReadableStream(new Response("").body);
  } catch {
  }
})(), mC = {
  stream: XR && ((t) => t.body)
};
rP && ((t) => {
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
    !mC[e] && (mC[e] = Te.isFunction(t[e]) ? (n) => n[e]() : (n, r) => {
      throw new Ht(`Response type '${e}' is not supported`, Ht.ERR_NOT_SUPPORT, r);
    });
  });
})(new Response());
const sHe = async (t) => {
  if (t == null)
    return 0;
  if (Te.isBlob(t))
    return t.size;
  if (Te.isSpecCompliantForm(t))
    return (await new Request(t).arrayBuffer()).byteLength;
  if (Te.isArrayBufferView(t))
    return t.byteLength;
  if (Te.isURLSearchParams(t) && (t = t + ""), Te.isString(t))
    return (await UR(t)).byteLength;
}, lHe = async (t, e) => {
  const n = Te.toFiniteNumber(t.getContentLength());
  return n ?? sHe(e);
}, uHe = rP && (async (t) => {
  let {
    url: e,
    method: n,
    data: r,
    signal: i,
    cancelToken: a,
    timeout: o,
    onDownloadProgress: s,
    onUploadProgress: l,
    responseType: u,
    headers: c,
    withCredentials: f = "same-origin",
    fetchOptions: d
  } = Loe(t);
  u = u ? (u + "").toLowerCase() : "text";
  let [h, p] = i || a || o ? rHe([i, a], o) : [], v, g;
  const m = () => {
    !v && setTimeout(() => {
      h && h.unsubscribe();
    }), v = !0;
  };
  let y;
  try {
    if (l && oHe && n !== "get" && n !== "head" && (y = await lHe(c, r)) !== 0) {
      let x = new Request(e, {
        method: "POST",
        body: r,
        duplex: "half"
      }), C;
      Te.isFormData(r) && (C = x.headers.get("content-type")) && c.setContentType(C), x.body && (r = s9(x.body, u9, l9(
        y,
        gC(l)
      ), null, UR));
    }
    Te.isString(f) || (f = f ? "cors" : "omit"), g = new Request(e, {
      ...d,
      signal: h,
      method: n.toUpperCase(),
      headers: c.normalize().toJSON(),
      body: r,
      duplex: "half",
      withCredentials: f
    });
    let _ = await fetch(g);
    const O = XR && (u === "stream" || u === "response");
    if (XR && (s || O)) {
      const x = {};
      ["status", "statusText", "headers"].forEach((P) => {
        x[P] = _[P];
      });
      const C = Te.toFiniteNumber(_.headers.get("content-length"));
      _ = new Response(
        s9(_.body, u9, s && l9(
          C,
          gC(s, !0)
        ), O && m, UR),
        x
      );
    }
    u = u || "text";
    let S = await mC[Te.findKey(mC, u) || "text"](_, t);
    return !O && m(), p && p(), await new Promise((x, C) => {
      Roe(x, C, {
        data: S,
        headers: La.from(_.headers),
        status: _.status,
        statusText: _.statusText,
        config: t,
        request: g
      });
    });
  } catch (_) {
    throw m(), _ && _.name === "TypeError" && /fetch/i.test(_.message) ? Object.assign(
      new Ht("Network Error", Ht.ERR_NETWORK, t, g),
      {
        cause: _.cause || _
      }
    ) : Ht.from(_, _ && _.code, t, g);
  }
}), YR = {
  http: TQe,
  xhr: nHe,
  fetch: uHe
};
Te.forEach(YR, (t, e) => {
  if (t) {
    try {
      Object.defineProperty(t, "name", { value: e });
    } catch {
    }
    Object.defineProperty(t, "adapterName", { value: e });
  }
});
const c9 = (t) => `- ${t}`, cHe = (t) => Te.isFunction(t) || t === null || t === !1, Boe = {
  getAdapter: (t) => {
    t = Te.isArray(t) ? t : [t];
    const { length: e } = t;
    let n, r;
    const i = {};
    for (let a = 0; a < e; a++) {
      n = t[a];
      let o;
      if (r = n, !cHe(n) && (r = YR[(o = String(n)).toLowerCase()], r === void 0))
        throw new Ht(`Unknown adapter '${o}'`);
      if (r)
        break;
      i[o || "#" + a] = r;
    }
    if (!r) {
      const a = Object.entries(i).map(
        ([s, l]) => `adapter ${s} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
      );
      let o = e ? a.length > 1 ? `since :
` + a.map(c9).join(`
`) : " " + c9(a[0]) : "as no adapter specified";
      throw new Ht(
        "There is no suitable adapter to dispatch the request " + o,
        "ERR_NOT_SUPPORT"
      );
    }
    return r;
  },
  adapters: YR
};
function TE(t) {
  if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
    throw new gm(null, t);
}
function f9(t) {
  return TE(t), t.headers = La.from(t.headers), t.data = CE.call(
    t,
    t.transformRequest
  ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Boe.getAdapter(t.adapter || t1.adapter)(t).then(function(r) {
    return TE(t), r.data = CE.call(
      t,
      t.transformResponse,
      r
    ), r.headers = La.from(r.headers), r;
  }, function(r) {
    return Doe(r) || (TE(t), r && r.response && (r.response.data = CE.call(
      t,
      t.transformResponse,
      r.response
    ), r.response.headers = La.from(r.response.headers))), Promise.reject(r);
  });
}
const zoe = "1.7.2", c5 = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
  c5[t] = function(r) {
    return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
  };
});
const d9 = {};
c5.transitional = function(e, n, r) {
  function i(a, o) {
    return "[Axios v" + zoe + "] Transitional option '" + a + "'" + o + (r ? ". " + r : "");
  }
  return (a, o, s) => {
    if (e === !1)
      throw new Ht(
        i(o, " has been removed" + (n ? " in " + n : "")),
        Ht.ERR_DEPRECATED
      );
    return n && !d9[o] && (d9[o] = !0, console.warn(
      i(
        o,
        " has been deprecated since v" + n + " and will be removed in the near future"
      )
    )), e ? e(a, o, s) : !0;
  };
};
function fHe(t, e, n) {
  if (typeof t != "object")
    throw new Ht("options must be an object", Ht.ERR_BAD_OPTION_VALUE);
  const r = Object.keys(t);
  let i = r.length;
  for (; i-- > 0; ) {
    const a = r[i], o = e[a];
    if (o) {
      const s = t[a], l = s === void 0 || o(s, a, t);
      if (l !== !0)
        throw new Ht("option " + a + " must be " + l, Ht.ERR_BAD_OPTION_VALUE);
      continue;
    }
    if (n !== !0)
      throw new Ht("Unknown option " + a, Ht.ERR_BAD_OPTION);
  }
}
const qR = {
  assertOptions: fHe,
  validators: c5
}, yc = qR.validators;
class Oh {
  constructor(e) {
    this.defaults = e, this.interceptors = {
      request: new i9(),
      response: new i9()
    };
  }
  /**
   * 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
   */
  async request(e, n) {
    try {
      return await this._request(e, n);
    } catch (r) {
      if (r instanceof Error) {
        let i;
        Error.captureStackTrace ? Error.captureStackTrace(i = {}) : i = new Error();
        const a = i.stack ? i.stack.replace(/^.+\n/, "") : "";
        try {
          r.stack ? a && !String(r.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (r.stack += `
` + a) : r.stack = a;
        } catch {
        }
      }
      throw r;
    }
  }
  _request(e, n) {
    typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = Qh(this.defaults, n);
    const { transitional: r, paramsSerializer: i, headers: a } = n;
    r !== void 0 && qR.assertOptions(r, {
      silentJSONParsing: yc.transitional(yc.boolean),
      forcedJSONParsing: yc.transitional(yc.boolean),
      clarifyTimeoutError: yc.transitional(yc.boolean)
    }, !1), i != null && (Te.isFunction(i) ? n.paramsSerializer = {
      serialize: i
    } : qR.assertOptions(i, {
      encode: yc.function,
      serialize: yc.function
    }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
    let o = a && Te.merge(
      a.common,
      a[n.method]
    );
    a && Te.forEach(
      ["delete", "get", "head", "post", "put", "patch", "common"],
      (p) => {
        delete a[p];
      }
    ), n.headers = La.concat(o, a);
    const s = [];
    let l = !0;
    this.interceptors.request.forEach(function(v) {
      typeof v.runWhen == "function" && v.runWhen(n) === !1 || (l = l && v.synchronous, s.unshift(v.fulfilled, v.rejected));
    });
    const u = [];
    this.interceptors.response.forEach(function(v) {
      u.push(v.fulfilled, v.rejected);
    });
    let c, f = 0, d;
    if (!l) {
      const p = [f9.bind(this), void 0];
      for (p.unshift.apply(p, s), p.push.apply(p, u), d = p.length, c = Promise.resolve(n); f < d; )
        c = c.then(p[f++], p[f++]);
      return c;
    }
    d = s.length;
    let h = n;
    for (f = 0; f < d; ) {
      const p = s[f++], v = s[f++];
      try {
        h = p(h);
      } catch (g) {
        v.call(this, g);
        break;
      }
    }
    try {
      c = f9.call(this, h);
    } catch (p) {
      return Promise.reject(p);
    }
    for (f = 0, d = u.length; f < d; )
      c = c.then(u[f++], u[f++]);
    return c;
  }
  getUri(e) {
    e = Qh(this.defaults, e);
    const n = koe(e.baseURL, e.url);
    return Eoe(n, e.params, e.paramsSerializer);
  }
}
Te.forEach(["delete", "get", "head", "options"], function(e) {
  Oh.prototype[e] = function(n, r) {
    return this.request(Qh(r || {}, {
      method: e,
      url: n,
      data: (r || {}).data
    }));
  };
});
Te.forEach(["post", "put", "patch"], function(e) {
  function n(r) {
    return function(a, o, s) {
      return this.request(Qh(s || {}, {
        method: e,
        headers: r ? {
          "Content-Type": "multipart/form-data"
        } : {},
        url: a,
        data: o
      }));
    };
  }
  Oh.prototype[e] = n(), Oh.prototype[e + "Form"] = n(!0);
});
class f5 {
  constructor(e) {
    if (typeof e != "function")
      throw new TypeError("executor must be a function.");
    let n;
    this.promise = new Promise(function(a) {
      n = a;
    });
    const r = this;
    this.promise.then((i) => {
      if (!r._listeners) return;
      let a = r._listeners.length;
      for (; a-- > 0; )
        r._listeners[a](i);
      r._listeners = null;
    }), this.promise.then = (i) => {
      let a;
      const o = new Promise((s) => {
        r.subscribe(s), a = s;
      }).then(i);
      return o.cancel = function() {
        r.unsubscribe(a);
      }, o;
    }, e(function(a, o, s) {
      r.reason || (r.reason = new gm(a, o, s), n(r.reason));
    });
  }
  /**
   * Throws a `CanceledError` if cancellation has been requested.
   */
  throwIfRequested() {
    if (this.reason)
      throw this.reason;
  }
  /**
   * Subscribe to the cancel signal
   */
  subscribe(e) {
    if (this.reason) {
      e(this.reason);
      return;
    }
    this._listeners ? this._listeners.push(e) : this._listeners = [e];
  }
  /**
   * Unsubscribe from the cancel signal
   */
  unsubscribe(e) {
    if (!this._listeners)
      return;
    const n = this._listeners.indexOf(e);
    n !== -1 && this._listeners.splice(n, 1);
  }
  /**
   * Returns an object that contains a new `CancelToken` and a function that, when called,
   * cancels the `CancelToken`.
   */
  static source() {
    let e;
    return {
      token: new f5(function(i) {
        e = i;
      }),
      cancel: e
    };
  }
}
function dHe(t) {
  return function(n) {
    return t.apply(null, n);
  };
}
function hHe(t) {
  return Te.isObject(t) && t.isAxiosError === !0;
}
const KR = {
  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(KR).forEach(([t, e]) => {
  KR[e] = t;
});
function Voe(t) {
  const e = new Oh(t), n = yoe(Oh.prototype.request, e);
  return Te.extend(n, Oh.prototype, e, { allOwnKeys: !0 }), Te.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(i) {
    return Voe(Qh(t, i));
  }, n;
}
const Wr = Voe(t1);
Wr.Axios = Oh;
Wr.CanceledError = gm;
Wr.CancelToken = f5;
Wr.isCancel = Doe;
Wr.VERSION = zoe;
Wr.toFormData = nP;
Wr.AxiosError = Ht;
Wr.Cancel = Wr.CanceledError;
Wr.all = function(e) {
  return Promise.all(e);
};
Wr.spread = dHe;
Wr.isAxiosError = hHe;
Wr.mergeConfig = Qh;
Wr.AxiosHeaders = La;
Wr.formToJSON = (t) => Ioe(Te.isHTMLForm(t) ? new FormData(t) : t);
Wr.getAdapter = Boe.getAdapter;
Wr.HttpStatusCode = KR;
Wr.default = Wr;
class pHe {
  constructor(e, n) {
    this.axiosInstance = Wr.create({
      baseURL: e,
      timeout: 5e3
      // Set your desired timeout value
    }), this.options = n;
  }
  get(e, n) {
    return this.request({ url: e, method: "GET", ...n });
  }
  post(e, n, r) {
    return this.request({ url: e, method: "POST", data: n, ...r });
  }
  put(e, n, r) {
    return this.request({ url: e, method: "PUT", data: n, ...r });
  }
  delete(e, n) {
    return this.request({ url: e, method: "DELETE", ...n });
  }
  request(e) {
    e.headers = {
      ...e.headers,
      Authorization: localStorage.getItem("token") || ""
    };
    const { transformResponse: n } = this.options || {};
    return new Promise((r, i) => {
      this.axiosInstance.request(e).then((a) => {
        if (n)
          try {
            const o = n(a.data, e);
            r(o);
          } catch (o) {
            i(o);
          }
        r(a.data);
      }).catch((a) => {
        i(a);
      });
    });
  }
}
var vHe = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
const gHe = vHe.VITE_APP_BASE_URL, mHe = (t, e) => {
  if (e.responseType === "blob")
    return t;
  if (t.code === 1)
    return t.result;
  throw Wh.warning(t.error), new Error(t.error);
}, Foe = new pHe(gHe, { transformResponse: mHe });
function yHe(t) {
  return Foe.post("/api/table/GetAllTablesAndViews", t);
}
function bHe(t) {
  return Foe.post("/api/system/GetAllBasicData", t);
}
const _He = (t) => {
  const e = ee(), n = ee(!1), r = ee(""), i = ee(""), a = ee(), o = ee("");
  t === "view" && (e.value = [
    { label: "系统视图", children: [] },
    { label: "数据源视图", children: [] }
  ], n.value = !0, yHe({ types: t }).then((u) => {
    const { bpmViewTables: c = [] } = u || {};
    c.forEach((f) => {
      const { name: d, schemaName: h, type: p, id: v } = f;
      e.value[p - 1] && e.value[p - 1].children.push({
        label: `${h}(${d})`,
        value: h,
        id: v
      });
    });
  }).finally(() => {
    n.value = !1;
  }));
  const s = (u, c) => {
    if (u.level === 0)
      return c([{ name: "基础数据" }]);
    const f = u.data;
    bHe({
      currentPage: 1,
      pageSize: 999,
      orderByProperty: "id",
      Ascending: !0,
      totalPage: 1,
      totalCount: 1,
      filters: f != null && f.id ? [{ name: "parentId", value: f.id }] : null
    }).then((d) => {
      c(d || []);
    });
  }, l = () => t === "table" ? /* @__PURE__ */ React.createElement(
    WW,
    {
      ref: a,
      lazy: !0,
      load: s,
      props: {
        label: (u) => u.path ? `${u.path}(${u.name})` : u.name,
        children: "children"
      },
      "onNode-click": (u) => {
        u != null && u.path && (r.value = u.path);
      },
      filterNodeMethod: (u, c) => {
        var f;
        return ((f = c.path) == null ? void 0 : f.toUpperCase().includes(u.toUpperCase())) || c.name.toUpperCase().includes(u.toUpperCase());
      },
      "empty-text": "暂无数据"
    }
  ) : /* @__PURE__ */ React.createElement(
    WW,
    {
      ref: a,
      data: e.value,
      defaultExpandAll: !0,
      "onNode-click": (u) => {
        u != null && u.value && u.id && (r.value = u.value, o.value = u.id);
      },
      filterNodeMethod: (u, c) => {
        var f;
        return (f = c.label) == null ? void 0 : f.includes(u);
      },
      "empty-text": "暂无数据"
    }
  );
  return new Promise((u, c) => {
    const f = document.createElement("div"), d = pxe({
      render() {
        return /* @__PURE__ */ React.createElement(
          uRe,
          {
            modelValue: !0,
            title: t === "table" ? "选择数据集" : "选择视图表",
            width: "800px",
            style: { height: "600px" },
            "v-slots": {
              footer: () => /* @__PURE__ */ React.createElement(
                oR,
                {
                  type: "primary",
                  disabled: !r.value,
                  onClick: () => {
                    u({ value: r.value }), document.body.removeChild(f);
                  }
                },
                "确定"
              )
            },
            onClose: () => {
              c("close"), document.body.removeChild(f);
            }
          },
          /* @__PURE__ */ React.createElement(
            p2,
            {
              size: "small",
              placeholder: "请输入关键字进行搜索",
              "v-model": i.value,
              onInput: () => {
                var h;
                (h = a.value) == null || h.filter(i.value);
              },
              style: {
                marginBottom: "10px",
                height: "35px",
                fontSize: "14px"
              }
            }
          ),
          /* @__PURE__ */ React.createElement("div", { style: { height: "379px", overflow: "auto" } }, l())
        );
      }
    });
    document.body.appendChild(f), d.mount(f);
  });
};
function JR(t) {
  const e = {};
  for (const n in t)
    if (typeof t[n] == "object")
      switch (n) {
        case "background":
          t[n].type === "none" && (e[n] = "none"), t[n].type === "color" && (e[n] = t[n].color), t[n].type === "image" && (e[n + "-image"] = `url(${t[n].image}) no-repeat center center`, e[n + "-size"] = t[n].fillType);
          break;
        case "border":
          t[n].type === "none" ? e[n] = "none" : e[n] = `${t[n].width}px ${t[n].type} ${t[n].color}`;
          break;
        case "borderRadius":
          t[n].type === "all" ? e[n] = `${t[n].value}${t[n].unit}` : e[n] = `${t[n].topLeft}${t[n].unit} ${t[n].topRight}${t[n].unit} ${t[n].bottomLeft}${t[n].unit} ${t[n].bottomRight}${t[n].unit}`;
          break;
        case "boxShadow":
          t[n].enabled && (e[n] = `${t[n].offsetX}px ${t[n].offsetY}px ${t[n].blurRadius}px ${t[n].spreadRadius}px ${t[n].color} ${t[n].inset ? "inset" : ""}`);
          break;
        case "backdropFilter":
          t[n].enabled && (e[n] = `blur(${t[n].blur}px)`);
          break;
      }
    else typeof t[n] == "number" ? e[n] = t[n] + "px" : typeof t[n] == "string" && (e[n] = t[n]);
  return e;
}
var yC = { exports: {} };
/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */
yC.exports;
(function(t, e) {
  (function() {
    var n, r = "4.17.21", i = 200, a = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", o = "Expected a function", s = "Invalid `variable` option passed into `_.template`", l = "__lodash_hash_undefined__", u = 500, c = "__lodash_placeholder__", f = 1, d = 2, h = 4, p = 1, v = 2, g = 1, m = 2, y = 4, _ = 8, O = 16, S = 32, x = 64, C = 128, P = 256, $ = 512, T = 30, E = "...", M = 800, R = 16, N = 1, I = 2, B = 3, Q = 1 / 0, W = 9007199254740991, H = 17976931348623157e292, U = NaN, j = 4294967295, Y = j - 1, ne = j >>> 1, fe = [
      ["ary", C],
      ["bind", g],
      ["bindKey", m],
      ["curry", _],
      ["curryRight", O],
      ["flip", $],
      ["partial", S],
      ["partialRight", x],
      ["rearg", P]
    ], ue = "[object Arguments]", ye = "[object Array]", se = "[object AsyncFunction]", he = "[object Boolean]", re = "[object Date]", q = "[object DOMException]", K = "[object Error]", de = "[object Function]", xe = "[object GeneratorFunction]", we = "[object Map]", He = "[object Number]", je = "[object Null]", Be = "[object Object]", Le = "[object Promise]", Pe = "[object Proxy]", Fe = "[object RegExp]", Ye = "[object Set]", xt = "[object String]", It = "[object Symbol]", an = "[object Undefined]", Ae = "[object WeakMap]", gt = "[object WeakSet]", Xt = "[object ArrayBuffer]", Bn = "[object DataView]", Dn = "[object Float32Array]", Dr = "[object Float64Array]", Gi = "[object Int8Array]", tu = "[object Int16Array]", nu = "[object Int32Array]", oc = "[object Uint8Array]", Qf = "[object Uint8ClampedArray]", rl = "[object Uint16Array]", Hf = "[object Uint32Array]", Gf = /\b__p \+= '';/g, Gm = /\b(__p \+=) '' \+/g, sc = /(__e\(.*?\)|\b__t\)) \+\n'';/g, jm = /&(?:amp|lt|gt|quot|#39);/g, g$ = /[&<>"']/g, FB = RegExp(jm.source), WB = RegExp(g$.source), QB = /<%-([\s\S]+?)%>/g, HB = /<%([\s\S]+?)%>/g, Sp = /<%=([\s\S]+?)%>/g, Zm = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, z1 = /^\w*$/, xp = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Um = /[\\^$.*+?()[\]{}|]/g, m$ = RegExp(Um.source), Xm = /^\s+/, y$ = /\s/, b$ = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, _$ = /\{\n\/\* \[wrapped with (.+)\] \*/, V1 = /,? & /, jf = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, Ym = /[()=,{}\[\]\/\s]/, F1 = /\\(\\)?/g, W1 = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, qm = /\w*$/, Q1 = /^[-+]0x[0-9a-f]+$/i, O$ = /^0b[01]+$/i, S$ = /^\[object .+?Constructor\]$/, x$ = /^0o[0-7]+$/i, H1 = /^(?:0|[1-9]\d*)$/, Km = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, yo = /($^)/, G1 = /['\n\r\u2028\u2029\\]/g, wp = "\\ud800-\\udfff", Jme = "\\u0300-\\u036f", e0e = "\\ufe20-\\ufe2f", t0e = "\\u20d0-\\u20ff", GB = Jme + e0e + t0e, jB = "\\u2700-\\u27bf", ZB = "a-z\\xdf-\\xf6\\xf8-\\xff", n0e = "\\xac\\xb1\\xd7\\xf7", r0e = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", i0e = "\\u2000-\\u206f", a0e = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", UB = "A-Z\\xc0-\\xd6\\xd8-\\xde", XB = "\\ufe0e\\ufe0f", YB = n0e + r0e + i0e + a0e, w$ = "['’]", o0e = "[" + wp + "]", qB = "[" + YB + "]", j1 = "[" + GB + "]", KB = "\\d+", s0e = "[" + jB + "]", JB = "[" + ZB + "]", ez = "[^" + wp + YB + KB + jB + ZB + UB + "]", C$ = "\\ud83c[\\udffb-\\udfff]", l0e = "(?:" + j1 + "|" + C$ + ")", tz = "[^" + wp + "]", T$ = "(?:\\ud83c[\\udde6-\\uddff]){2}", P$ = "[\\ud800-\\udbff][\\udc00-\\udfff]", Cp = "[" + UB + "]", nz = "\\u200d", rz = "(?:" + JB + "|" + ez + ")", u0e = "(?:" + Cp + "|" + ez + ")", iz = "(?:" + w$ + "(?:d|ll|m|re|s|t|ve))?", az = "(?:" + w$ + "(?:D|LL|M|RE|S|T|VE))?", oz = l0e + "?", sz = "[" + XB + "]?", c0e = "(?:" + nz + "(?:" + [tz, T$, P$].join("|") + ")" + sz + oz + ")*", f0e = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", d0e = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", lz = sz + oz + c0e, h0e = "(?:" + [s0e, T$, P$].join("|") + ")" + lz, p0e = "(?:" + [tz + j1 + "?", j1, T$, P$, o0e].join("|") + ")", v0e = RegExp(w$, "g"), g0e = RegExp(j1, "g"), $$ = RegExp(C$ + "(?=" + C$ + ")|" + p0e + lz, "g"), m0e = RegExp([
      Cp + "?" + JB + "+" + iz + "(?=" + [qB, Cp, "$"].join("|") + ")",
      u0e + "+" + az + "(?=" + [qB, Cp + rz, "$"].join("|") + ")",
      Cp + "?" + rz + "+" + iz,
      Cp + "+" + az,
      d0e,
      f0e,
      KB,
      h0e
    ].join("|"), "g"), y0e = RegExp("[" + nz + wp + GB + XB + "]"), b0e = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, _0e = [
      "Array",
      "Buffer",
      "DataView",
      "Date",
      "Error",
      "Float32Array",
      "Float64Array",
      "Function",
      "Int8Array",
      "Int16Array",
      "Int32Array",
      "Map",
      "Math",
      "Object",
      "Promise",
      "RegExp",
      "Set",
      "String",
      "Symbol",
      "TypeError",
      "Uint8Array",
      "Uint8ClampedArray",
      "Uint16Array",
      "Uint32Array",
      "WeakMap",
      "_",
      "clearTimeout",
      "isFinite",
      "parseInt",
      "setTimeout"
    ], O0e = -1, qn = {};
    qn[Dn] = qn[Dr] = qn[Gi] = qn[tu] = qn[nu] = qn[oc] = qn[Qf] = qn[rl] = qn[Hf] = !0, qn[ue] = qn[ye] = qn[Xt] = qn[he] = qn[Bn] = qn[re] = qn[K] = qn[de] = qn[we] = qn[He] = qn[Be] = qn[Fe] = qn[Ye] = qn[xt] = qn[Ae] = !1;
    var jn = {};
    jn[ue] = jn[ye] = jn[Xt] = jn[Bn] = jn[he] = jn[re] = jn[Dn] = jn[Dr] = jn[Gi] = jn[tu] = jn[nu] = jn[we] = jn[He] = jn[Be] = jn[Fe] = jn[Ye] = jn[xt] = jn[It] = jn[oc] = jn[Qf] = jn[rl] = jn[Hf] = !0, jn[K] = jn[de] = jn[Ae] = !1;
    var S0e = {
      // Latin-1 Supplement block.
      À: "A",
      Á: "A",
      Â: "A",
      Ã: "A",
      Ä: "A",
      Å: "A",
      à: "a",
      á: "a",
      â: "a",
      ã: "a",
      ä: "a",
      å: "a",
      Ç: "C",
      ç: "c",
      Ð: "D",
      ð: "d",
      È: "E",
      É: "E",
      Ê: "E",
      Ë: "E",
      è: "e",
      é: "e",
      ê: "e",
      ë: "e",
      Ì: "I",
      Í: "I",
      Î: "I",
      Ï: "I",
      ì: "i",
      í: "i",
      î: "i",
      ï: "i",
      Ñ: "N",
      ñ: "n",
      Ò: "O",
      Ó: "O",
      Ô: "O",
      Õ: "O",
      Ö: "O",
      Ø: "O",
      ò: "o",
      ó: "o",
      ô: "o",
      õ: "o",
      ö: "o",
      ø: "o",
      Ù: "U",
      Ú: "U",
      Û: "U",
      Ü: "U",
      ù: "u",
      ú: "u",
      û: "u",
      ü: "u",
      Ý: "Y",
      ý: "y",
      ÿ: "y",
      Æ: "Ae",
      æ: "ae",
      Þ: "Th",
      þ: "th",
      ß: "ss",
      // Latin Extended-A block.
      Ā: "A",
      Ă: "A",
      Ą: "A",
      ā: "a",
      ă: "a",
      ą: "a",
      Ć: "C",
      Ĉ: "C",
      Ċ: "C",
      Č: "C",
      ć: "c",
      ĉ: "c",
      ċ: "c",
      č: "c",
      Ď: "D",
      Đ: "D",
      ď: "d",
      đ: "d",
      Ē: "E",
      Ĕ: "E",
      Ė: "E",
      Ę: "E",
      Ě: "E",
      ē: "e",
      ĕ: "e",
      ė: "e",
      ę: "e",
      ě: "e",
      Ĝ: "G",
      Ğ: "G",
      Ġ: "G",
      Ģ: "G",
      ĝ: "g",
      ğ: "g",
      ġ: "g",
      ģ: "g",
      Ĥ: "H",
      Ħ: "H",
      ĥ: "h",
      ħ: "h",
      Ĩ: "I",
      Ī: "I",
      Ĭ: "I",
      Į: "I",
      İ: "I",
      ĩ: "i",
      ī: "i",
      ĭ: "i",
      į: "i",
      ı: "i",
      Ĵ: "J",
      ĵ: "j",
      Ķ: "K",
      ķ: "k",
      ĸ: "k",
      Ĺ: "L",
      Ļ: "L",
      Ľ: "L",
      Ŀ: "L",
      Ł: "L",
      ĺ: "l",
      ļ: "l",
      ľ: "l",
      ŀ: "l",
      ł: "l",
      Ń: "N",
      Ņ: "N",
      Ň: "N",
      Ŋ: "N",
      ń: "n",
      ņ: "n",
      ň: "n",
      ŋ: "n",
      Ō: "O",
      Ŏ: "O",
      Ő: "O",
      ō: "o",
      ŏ: "o",
      ő: "o",
      Ŕ: "R",
      Ŗ: "R",
      Ř: "R",
      ŕ: "r",
      ŗ: "r",
      ř: "r",
      Ś: "S",
      Ŝ: "S",
      Ş: "S",
      Š: "S",
      ś: "s",
      ŝ: "s",
      ş: "s",
      š: "s",
      Ţ: "T",
      Ť: "T",
      Ŧ: "T",
      ţ: "t",
      ť: "t",
      ŧ: "t",
      Ũ: "U",
      Ū: "U",
      Ŭ: "U",
      Ů: "U",
      Ű: "U",
      Ų: "U",
      ũ: "u",
      ū: "u",
      ŭ: "u",
      ů: "u",
      ű: "u",
      ų: "u",
      Ŵ: "W",
      ŵ: "w",
      Ŷ: "Y",
      ŷ: "y",
      Ÿ: "Y",
      Ź: "Z",
      Ż: "Z",
      Ž: "Z",
      ź: "z",
      ż: "z",
      ž: "z",
      Ĳ: "IJ",
      ĳ: "ij",
      Œ: "Oe",
      œ: "oe",
      ŉ: "'n",
      ſ: "s"
    }, x0e = {
      "&": "&amp;",
      "<": "&lt;",
      ">": "&gt;",
      '"': "&quot;",
      "'": "&#39;"
    }, w0e = {
      "&amp;": "&",
      "&lt;": "<",
      "&gt;": ">",
      "&quot;": '"',
      "&#39;": "'"
    }, C0e = {
      "\\": "\\",
      "'": "'",
      "\n": "n",
      "\r": "r",
      "\u2028": "u2028",
      "\u2029": "u2029"
    }, T0e = parseFloat, P0e = parseInt, uz = typeof Su == "object" && Su && Su.Object === Object && Su, $0e = typeof self == "object" && self && self.Object === Object && self, di = uz || $0e || Function("return this")(), A$ = e && !e.nodeType && e, Zf = A$ && !0 && t && !t.nodeType && t, cz = Zf && Zf.exports === A$, E$ = cz && uz.process, bo = function() {
      try {
        var pe = Zf && Zf.require && Zf.require("util").types;
        return pe || E$ && E$.binding && E$.binding("util");
      } catch {
      }
    }(), fz = bo && bo.isArrayBuffer, dz = bo && bo.isDate, hz = bo && bo.isMap, pz = bo && bo.isRegExp, vz = bo && bo.isSet, gz = bo && bo.isTypedArray;
    function Fa(pe, $e, Oe) {
      switch (Oe.length) {
        case 0:
          return pe.call($e);
        case 1:
          return pe.call($e, Oe[0]);
        case 2:
          return pe.call($e, Oe[0], Oe[1]);
        case 3:
          return pe.call($e, Oe[0], Oe[1], Oe[2]);
      }
      return pe.apply($e, Oe);
    }
    function A0e(pe, $e, Oe, st) {
      for (var Lt = -1, Tn = pe == null ? 0 : pe.length; ++Lt < Tn; ) {
        var Qr = pe[Lt];
        $e(st, Qr, Oe(Qr), pe);
      }
      return st;
    }
    function _o(pe, $e) {
      for (var Oe = -1, st = pe == null ? 0 : pe.length; ++Oe < st && $e(pe[Oe], Oe, pe) !== !1; )
        ;
      return pe;
    }
    function E0e(pe, $e) {
      for (var Oe = pe == null ? 0 : pe.length; Oe-- && $e(pe[Oe], Oe, pe) !== !1; )
        ;
      return pe;
    }
    function mz(pe, $e) {
      for (var Oe = -1, st = pe == null ? 0 : pe.length; ++Oe < st; )
        if (!$e(pe[Oe], Oe, pe))
          return !1;
      return !0;
    }
    function lc(pe, $e) {
      for (var Oe = -1, st = pe == null ? 0 : pe.length, Lt = 0, Tn = []; ++Oe < st; ) {
        var Qr = pe[Oe];
        $e(Qr, Oe, pe) && (Tn[Lt++] = Qr);
      }
      return Tn;
    }
    function Z1(pe, $e) {
      var Oe = pe == null ? 0 : pe.length;
      return !!Oe && Tp(pe, $e, 0) > -1;
    }
    function M$(pe, $e, Oe) {
      for (var st = -1, Lt = pe == null ? 0 : pe.length; ++st < Lt; )
        if (Oe($e, pe[st]))
          return !0;
      return !1;
    }
    function ar(pe, $e) {
      for (var Oe = -1, st = pe == null ? 0 : pe.length, Lt = Array(st); ++Oe < st; )
        Lt[Oe] = $e(pe[Oe], Oe, pe);
      return Lt;
    }
    function uc(pe, $e) {
      for (var Oe = -1, st = $e.length, Lt = pe.length; ++Oe < st; )
        pe[Lt + Oe] = $e[Oe];
      return pe;
    }
    function I$(pe, $e, Oe, st) {
      var Lt = -1, Tn = pe == null ? 0 : pe.length;
      for (st && Tn && (Oe = pe[++Lt]); ++Lt < Tn; )
        Oe = $e(Oe, pe[Lt], Lt, pe);
      return Oe;
    }
    function M0e(pe, $e, Oe, st) {
      var Lt = pe == null ? 0 : pe.length;
      for (st && Lt && (Oe = pe[--Lt]); Lt--; )
        Oe = $e(Oe, pe[Lt], Lt, pe);
      return Oe;
    }
    function D$(pe, $e) {
      for (var Oe = -1, st = pe == null ? 0 : pe.length; ++Oe < st; )
        if ($e(pe[Oe], Oe, pe))
          return !0;
      return !1;
    }
    var I0e = R$("length");
    function D0e(pe) {
      return pe.split("");
    }
    function R0e(pe) {
      return pe.match(jf) || [];
    }
    function yz(pe, $e, Oe) {
      var st;
      return Oe(pe, function(Lt, Tn, Qr) {
        if ($e(Lt, Tn, Qr))
          return st = Tn, !1;
      }), st;
    }
    function U1(pe, $e, Oe, st) {
      for (var Lt = pe.length, Tn = Oe + (st ? 1 : -1); st ? Tn-- : ++Tn < Lt; )
        if ($e(pe[Tn], Tn, pe))
          return Tn;
      return -1;
    }
    function Tp(pe, $e, Oe) {
      return $e === $e ? j0e(pe, $e, Oe) : U1(pe, bz, Oe);
    }
    function k0e(pe, $e, Oe, st) {
      for (var Lt = Oe - 1, Tn = pe.length; ++Lt < Tn; )
        if (st(pe[Lt], $e))
          return Lt;
      return -1;
    }
    function bz(pe) {
      return pe !== pe;
    }
    function _z(pe, $e) {
      var Oe = pe == null ? 0 : pe.length;
      return Oe ? L$(pe, $e) / Oe : U;
    }
    function R$(pe) {
      return function($e) {
        return $e == null ? n : $e[pe];
      };
    }
    function k$(pe) {
      return function($e) {
        return pe == null ? n : pe[$e];
      };
    }
    function Oz(pe, $e, Oe, st, Lt) {
      return Lt(pe, function(Tn, Qr, Fn) {
        Oe = st ? (st = !1, Tn) : $e(Oe, Tn, Qr, Fn);
      }), Oe;
    }
    function L0e(pe, $e) {
      var Oe = pe.length;
      for (pe.sort($e); Oe--; )
        pe[Oe] = pe[Oe].value;
      return pe;
    }
    function L$(pe, $e) {
      for (var Oe, st = -1, Lt = pe.length; ++st < Lt; ) {
        var Tn = $e(pe[st]);
        Tn !== n && (Oe = Oe === n ? Tn : Oe + Tn);
      }
      return Oe;
    }
    function N$(pe, $e) {
      for (var Oe = -1, st = Array(pe); ++Oe < pe; )
        st[Oe] = $e(Oe);
      return st;
    }
    function N0e(pe, $e) {
      return ar($e, function(Oe) {
        return [Oe, pe[Oe]];
      });
    }
    function Sz(pe) {
      return pe && pe.slice(0, Tz(pe) + 1).replace(Xm, "");
    }
    function Wa(pe) {
      return function($e) {
        return pe($e);
      };
    }
    function B$(pe, $e) {
      return ar($e, function(Oe) {
        return pe[Oe];
      });
    }
    function Jm(pe, $e) {
      return pe.has($e);
    }
    function xz(pe, $e) {
      for (var Oe = -1, st = pe.length; ++Oe < st && Tp($e, pe[Oe], 0) > -1; )
        ;
      return Oe;
    }
    function wz(pe, $e) {
      for (var Oe = pe.length; Oe-- && Tp($e, pe[Oe], 0) > -1; )
        ;
      return Oe;
    }
    function B0e(pe, $e) {
      for (var Oe = pe.length, st = 0; Oe--; )
        pe[Oe] === $e && ++st;
      return st;
    }
    var z0e = k$(S0e), V0e = k$(x0e);
    function F0e(pe) {
      return "\\" + C0e[pe];
    }
    function W0e(pe, $e) {
      return pe == null ? n : pe[$e];
    }
    function Pp(pe) {
      return y0e.test(pe);
    }
    function Q0e(pe) {
      return b0e.test(pe);
    }
    function H0e(pe) {
      for (var $e, Oe = []; !($e = pe.next()).done; )
        Oe.push($e.value);
      return Oe;
    }
    function z$(pe) {
      var $e = -1, Oe = Array(pe.size);
      return pe.forEach(function(st, Lt) {
        Oe[++$e] = [Lt, st];
      }), Oe;
    }
    function Cz(pe, $e) {
      return function(Oe) {
        return pe($e(Oe));
      };
    }
    function cc(pe, $e) {
      for (var Oe = -1, st = pe.length, Lt = 0, Tn = []; ++Oe < st; ) {
        var Qr = pe[Oe];
        (Qr === $e || Qr === c) && (pe[Oe] = c, Tn[Lt++] = Oe);
      }
      return Tn;
    }
    function X1(pe) {
      var $e = -1, Oe = Array(pe.size);
      return pe.forEach(function(st) {
        Oe[++$e] = st;
      }), Oe;
    }
    function G0e(pe) {
      var $e = -1, Oe = Array(pe.size);
      return pe.forEach(function(st) {
        Oe[++$e] = [st, st];
      }), Oe;
    }
    function j0e(pe, $e, Oe) {
      for (var st = Oe - 1, Lt = pe.length; ++st < Lt; )
        if (pe[st] === $e)
          return st;
      return -1;
    }
    function Z0e(pe, $e, Oe) {
      for (var st = Oe + 1; st--; )
        if (pe[st] === $e)
          return st;
      return st;
    }
    function $p(pe) {
      return Pp(pe) ? X0e(pe) : I0e(pe);
    }
    function ms(pe) {
      return Pp(pe) ? Y0e(pe) : D0e(pe);
    }
    function Tz(pe) {
      for (var $e = pe.length; $e-- && y$.test(pe.charAt($e)); )
        ;
      return $e;
    }
    var U0e = k$(w0e);
    function X0e(pe) {
      for (var $e = $$.lastIndex = 0; $$.test(pe); )
        ++$e;
      return $e;
    }
    function Y0e(pe) {
      return pe.match($$) || [];
    }
    function q0e(pe) {
      return pe.match(m0e) || [];
    }
    var K0e = function pe($e) {
      $e = $e == null ? di : Ap.defaults(di.Object(), $e, Ap.pick(di, _0e));
      var Oe = $e.Array, st = $e.Date, Lt = $e.Error, Tn = $e.Function, Qr = $e.Math, Fn = $e.Object, V$ = $e.RegExp, J0e = $e.String, Oo = $e.TypeError, Y1 = Oe.prototype, eye = Tn.prototype, Ep = Fn.prototype, q1 = $e["__core-js_shared__"], K1 = eye.toString, Rn = Ep.hasOwnProperty, tye = 0, Pz = function() {
        var b = /[^.]+$/.exec(q1 && q1.keys && q1.keys.IE_PROTO || "");
        return b ? "Symbol(src)_1." + b : "";
      }(), J1 = Ep.toString, nye = K1.call(Fn), rye = di._, iye = V$(
        "^" + K1.call(Rn).replace(Um, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
      ), eO = cz ? $e.Buffer : n, fc = $e.Symbol, tO = $e.Uint8Array, $z = eO ? eO.allocUnsafe : n, nO = Cz(Fn.getPrototypeOf, Fn), Az = Fn.create, Ez = Ep.propertyIsEnumerable, rO = Y1.splice, Mz = fc ? fc.isConcatSpreadable : n, e0 = fc ? fc.iterator : n, Uf = fc ? fc.toStringTag : n, iO = function() {
        try {
          var b = Jf(Fn, "defineProperty");
          return b({}, "", {}), b;
        } catch {
        }
      }(), aye = $e.clearTimeout !== di.clearTimeout && $e.clearTimeout, oye = st && st.now !== di.Date.now && st.now, sye = $e.setTimeout !== di.setTimeout && $e.setTimeout, aO = Qr.ceil, oO = Qr.floor, F$ = Fn.getOwnPropertySymbols, lye = eO ? eO.isBuffer : n, Iz = $e.isFinite, uye = Y1.join, cye = Cz(Fn.keys, Fn), Hr = Qr.max, Mi = Qr.min, fye = st.now, dye = $e.parseInt, Dz = Qr.random, hye = Y1.reverse, W$ = Jf($e, "DataView"), t0 = Jf($e, "Map"), Q$ = Jf($e, "Promise"), Mp = Jf($e, "Set"), n0 = Jf($e, "WeakMap"), r0 = Jf(Fn, "create"), sO = n0 && new n0(), Ip = {}, pye = ed(W$), vye = ed(t0), gye = ed(Q$), mye = ed(Mp), yye = ed(n0), lO = fc ? fc.prototype : n, i0 = lO ? lO.valueOf : n, Rz = lO ? lO.toString : n;
      function Z(b) {
        if (gr(b) && !Ft(b) && !(b instanceof ln)) {
          if (b instanceof So)
            return b;
          if (Rn.call(b, "__wrapped__"))
            return kV(b);
        }
        return new So(b);
      }
      var Dp = /* @__PURE__ */ function() {
        function b() {
        }
        return function(w) {
          if (!cr(w))
            return {};
          if (Az)
            return Az(w);
          b.prototype = w;
          var A = new b();
          return b.prototype = n, A;
        };
      }();
      function uO() {
      }
      function So(b, w) {
        this.__wrapped__ = b, this.__actions__ = [], this.__chain__ = !!w, this.__index__ = 0, this.__values__ = n;
      }
      Z.templateSettings = {
        /**
         * Used to detect `data` property values to be HTML-escaped.
         *
         * @memberOf _.templateSettings
         * @type {RegExp}
         */
        escape: QB,
        /**
         * Used to detect code to be evaluated.
         *
         * @memberOf _.templateSettings
         * @type {RegExp}
         */
        evaluate: HB,
        /**
         * Used to detect `data` property values to inject.
         *
         * @memberOf _.templateSettings
         * @type {RegExp}
         */
        interpolate: Sp,
        /**
         * Used to reference the data object in the template text.
         *
         * @memberOf _.templateSettings
         * @type {string}
         */
        variable: "",
        /**
         * Used to import variables into the compiled template.
         *
         * @memberOf _.templateSettings
         * @type {Object}
         */
        imports: {
          /**
           * A reference to the `lodash` function.
           *
           * @memberOf _.templateSettings.imports
           * @type {Function}
           */
          _: Z
        }
      }, Z.prototype = uO.prototype, Z.prototype.constructor = Z, So.prototype = Dp(uO.prototype), So.prototype.constructor = So;
      function ln(b) {
        this.__wrapped__ = b, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = j, this.__views__ = [];
      }
      function bye() {
        var b = new ln(this.__wrapped__);
        return b.__actions__ = ga(this.__actions__), b.__dir__ = this.__dir__, b.__filtered__ = this.__filtered__, b.__iteratees__ = ga(this.__iteratees__), b.__takeCount__ = this.__takeCount__, b.__views__ = ga(this.__views__), b;
      }
      function _ye() {
        if (this.__filtered__) {
          var b = new ln(this);
          b.__dir__ = -1, b.__filtered__ = !0;
        } else
          b = this.clone(), b.__dir__ *= -1;
        return b;
      }
      function Oye() {
        var b = this.__wrapped__.value(), w = this.__dir__, A = Ft(b), L = w < 0, G = A ? b.length : 0, X = Dbe(0, G, this.__views__), J = X.start, ie = X.end, ge = ie - J, Ee = L ? ie : J - 1, Ie = this.__iteratees__, Ne = Ie.length, Ke = 0, ht = Mi(ge, this.__takeCount__);
        if (!A || !L && G == ge && ht == ge)
          return iV(b, this.__actions__);
        var Pt = [];
        e:
          for (; ge-- && Ke < ht; ) {
            Ee += w;
            for (var Jt = -1, $t = b[Ee]; ++Jt < Ne; ) {
              var on = Ie[Jt], pn = on.iteratee, Ga = on.type, Ui = pn($t);
              if (Ga == I)
                $t = Ui;
              else if (!Ui) {
                if (Ga == N)
                  continue e;
                break e;
              }
            }
            Pt[Ke++] = $t;
          }
        return Pt;
      }
      ln.prototype = Dp(uO.prototype), ln.prototype.constructor = ln;
      function Xf(b) {
        var w = -1, A = b == null ? 0 : b.length;
        for (this.clear(); ++w < A; ) {
          var L = b[w];
          this.set(L[0], L[1]);
        }
      }
      function Sye() {
        this.__data__ = r0 ? r0(null) : {}, this.size = 0;
      }
      function xye(b) {
        var w = this.has(b) && delete this.__data__[b];
        return this.size -= w ? 1 : 0, w;
      }
      function wye(b) {
        var w = this.__data__;
        if (r0) {
          var A = w[b];
          return A === l ? n : A;
        }
        return Rn.call(w, b) ? w[b] : n;
      }
      function Cye(b) {
        var w = this.__data__;
        return r0 ? w[b] !== n : Rn.call(w, b);
      }
      function Tye(b, w) {
        var A = this.__data__;
        return this.size += this.has(b) ? 0 : 1, A[b] = r0 && w === n ? l : w, this;
      }
      Xf.prototype.clear = Sye, Xf.prototype.delete = xye, Xf.prototype.get = wye, Xf.prototype.has = Cye, Xf.prototype.set = Tye;
      function ru(b) {
        var w = -1, A = b == null ? 0 : b.length;
        for (this.clear(); ++w < A; ) {
          var L = b[w];
          this.set(L[0], L[1]);
        }
      }
      function Pye() {
        this.__data__ = [], this.size = 0;
      }
      function $ye(b) {
        var w = this.__data__, A = cO(w, b);
        if (A < 0)
          return !1;
        var L = w.length - 1;
        return A == L ? w.pop() : rO.call(w, A, 1), --this.size, !0;
      }
      function Aye(b) {
        var w = this.__data__, A = cO(w, b);
        return A < 0 ? n : w[A][1];
      }
      function Eye(b) {
        return cO(this.__data__, b) > -1;
      }
      function Mye(b, w) {
        var A = this.__data__, L = cO(A, b);
        return L < 0 ? (++this.size, A.push([b, w])) : A[L][1] = w, this;
      }
      ru.prototype.clear = Pye, ru.prototype.delete = $ye, ru.prototype.get = Aye, ru.prototype.has = Eye, ru.prototype.set = Mye;
      function iu(b) {
        var w = -1, A = b == null ? 0 : b.length;
        for (this.clear(); ++w < A; ) {
          var L = b[w];
          this.set(L[0], L[1]);
        }
      }
      function Iye() {
        this.size = 0, this.__data__ = {
          hash: new Xf(),
          map: new (t0 || ru)(),
          string: new Xf()
        };
      }
      function Dye(b) {
        var w = SO(this, b).delete(b);
        return this.size -= w ? 1 : 0, w;
      }
      function Rye(b) {
        return SO(this, b).get(b);
      }
      function kye(b) {
        return SO(this, b).has(b);
      }
      function Lye(b, w) {
        var A = SO(this, b), L = A.size;
        return A.set(b, w), this.size += A.size == L ? 0 : 1, this;
      }
      iu.prototype.clear = Iye, iu.prototype.delete = Dye, iu.prototype.get = Rye, iu.prototype.has = kye, iu.prototype.set = Lye;
      function Yf(b) {
        var w = -1, A = b == null ? 0 : b.length;
        for (this.__data__ = new iu(); ++w < A; )
          this.add(b[w]);
      }
      function Nye(b) {
        return this.__data__.set(b, l), this;
      }
      function Bye(b) {
        return this.__data__.has(b);
      }
      Yf.prototype.add = Yf.prototype.push = Nye, Yf.prototype.has = Bye;
      function ys(b) {
        var w = this.__data__ = new ru(b);
        this.size = w.size;
      }
      function zye() {
        this.__data__ = new ru(), this.size = 0;
      }
      function Vye(b) {
        var w = this.__data__, A = w.delete(b);
        return this.size = w.size, A;
      }
      function Fye(b) {
        return this.__data__.get(b);
      }
      function Wye(b) {
        return this.__data__.has(b);
      }
      function Qye(b, w) {
        var A = this.__data__;
        if (A instanceof ru) {
          var L = A.__data__;
          if (!t0 || L.length < i - 1)
            return L.push([b, w]), this.size = ++A.size, this;
          A = this.__data__ = new iu(L);
        }
        return A.set(b, w), this.size = A.size, this;
      }
      ys.prototype.clear = zye, ys.prototype.delete = Vye, ys.prototype.get = Fye, ys.prototype.has = Wye, ys.prototype.set = Qye;
      function kz(b, w) {
        var A = Ft(b), L = !A && td(b), G = !A && !L && gc(b), X = !A && !L && !G && Np(b), J = A || L || G || X, ie = J ? N$(b.length, J0e) : [], ge = ie.length;
        for (var Ee in b)
          (w || Rn.call(b, Ee)) && !(J && // Safari 9 has enumerable `arguments.length` in strict mode.
          (Ee == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
          G && (Ee == "offset" || Ee == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
          X && (Ee == "buffer" || Ee == "byteLength" || Ee == "byteOffset") || // Skip index properties.
          lu(Ee, ge))) && ie.push(Ee);
        return ie;
      }
      function Lz(b) {
        var w = b.length;
        return w ? b[eA(0, w - 1)] : n;
      }
      function Hye(b, w) {
        return xO(ga(b), qf(w, 0, b.length));
      }
      function Gye(b) {
        return xO(ga(b));
      }
      function H$(b, w, A) {
        (A !== n && !bs(b[w], A) || A === n && !(w in b)) && au(b, w, A);
      }
      function a0(b, w, A) {
        var L = b[w];
        (!(Rn.call(b, w) && bs(L, A)) || A === n && !(w in b)) && au(b, w, A);
      }
      function cO(b, w) {
        for (var A = b.length; A--; )
          if (bs(b[A][0], w))
            return A;
        return -1;
      }
      function jye(b, w, A, L) {
        return dc(b, function(G, X, J) {
          w(L, G, A(G), J);
        }), L;
      }
      function Nz(b, w) {
        return b && al(w, ri(w), b);
      }
      function Zye(b, w) {
        return b && al(w, ya(w), b);
      }
      function au(b, w, A) {
        w == "__proto__" && iO ? iO(b, w, {
          configurable: !0,
          enumerable: !0,
          value: A,
          writable: !0
        }) : b[w] = A;
      }
      function G$(b, w) {
        for (var A = -1, L = w.length, G = Oe(L), X = b == null; ++A < L; )
          G[A] = X ? n : CA(b, w[A]);
        return G;
      }
      function qf(b, w, A) {
        return b === b && (A !== n && (b = b <= A ? b : A), w !== n && (b = b >= w ? b : w)), b;
      }
      function xo(b, w, A, L, G, X) {
        var J, ie = w & f, ge = w & d, Ee = w & h;
        if (A && (J = G ? A(b, L, G, X) : A(b)), J !== n)
          return J;
        if (!cr(b))
          return b;
        var Ie = Ft(b);
        if (Ie) {
          if (J = kbe(b), !ie)
            return ga(b, J);
        } else {
          var Ne = Ii(b), Ke = Ne == de || Ne == xe;
          if (gc(b))
            return sV(b, ie);
          if (Ne == Be || Ne == ue || Ke && !G) {
            if (J = ge || Ke ? {} : TV(b), !ie)
              return ge ? wbe(b, Zye(J, b)) : xbe(b, Nz(J, b));
          } else {
            if (!jn[Ne])
              return G ? b : {};
            J = Lbe(b, Ne, ie);
          }
        }
        X || (X = new ys());
        var ht = X.get(b);
        if (ht)
          return ht;
        X.set(b, J), tF(b) ? b.forEach(function($t) {
          J.add(xo($t, w, A, $t, b, X));
        }) : JV(b) && b.forEach(function($t, on) {
          J.set(on, xo($t, w, A, on, b, X));
        });
        var Pt = Ee ? ge ? fA : cA : ge ? ya : ri, Jt = Ie ? n : Pt(b);
        return _o(Jt || b, function($t, on) {
          Jt && (on = $t, $t = b[on]), a0(J, on, xo($t, w, A, on, b, X));
        }), J;
      }
      function Uye(b) {
        var w = ri(b);
        return function(A) {
          return Bz(A, b, w);
        };
      }
      function Bz(b, w, A) {
        var L = A.length;
        if (b == null)
          return !L;
        for (b = Fn(b); L--; ) {
          var G = A[L], X = w[G], J = b[G];
          if (J === n && !(G in b) || !X(J))
            return !1;
        }
        return !0;
      }
      function zz(b, w, A) {
        if (typeof b != "function")
          throw new Oo(o);
        return d0(function() {
          b.apply(n, A);
        }, w);
      }
      function o0(b, w, A, L) {
        var G = -1, X = Z1, J = !0, ie = b.length, ge = [], Ee = w.length;
        if (!ie)
          return ge;
        A && (w = ar(w, Wa(A))), L ? (X = M$, J = !1) : w.length >= i && (X = Jm, J = !1, w = new Yf(w));
        e:
          for (; ++G < ie; ) {
            var Ie = b[G], Ne = A == null ? Ie : A(Ie);
            if (Ie = L || Ie !== 0 ? Ie : 0, J && Ne === Ne) {
              for (var Ke = Ee; Ke--; )
                if (w[Ke] === Ne)
                  continue e;
              ge.push(Ie);
            } else X(w, Ne, L) || ge.push(Ie);
          }
        return ge;
      }
      var dc = dV(il), Vz = dV(Z$, !0);
      function Xye(b, w) {
        var A = !0;
        return dc(b, function(L, G, X) {
          return A = !!w(L, G, X), A;
        }), A;
      }
      function fO(b, w, A) {
        for (var L = -1, G = b.length; ++L < G; ) {
          var X = b[L], J = w(X);
          if (J != null && (ie === n ? J === J && !Ha(J) : A(J, ie)))
            var ie = J, ge = X;
        }
        return ge;
      }
      function Yye(b, w, A, L) {
        var G = b.length;
        for (A = Yt(A), A < 0 && (A = -A > G ? 0 : G + A), L = L === n || L > G ? G : Yt(L), L < 0 && (L += G), L = A > L ? 0 : rF(L); A < L; )
          b[A++] = w;
        return b;
      }
      function Fz(b, w) {
        var A = [];
        return dc(b, function(L, G, X) {
          w(L, G, X) && A.push(L);
        }), A;
      }
      function hi(b, w, A, L, G) {
        var X = -1, J = b.length;
        for (A || (A = Bbe), G || (G = []); ++X < J; ) {
          var ie = b[X];
          w > 0 && A(ie) ? w > 1 ? hi(ie, w - 1, A, L, G) : uc(G, ie) : L || (G[G.length] = ie);
        }
        return G;
      }
      var j$ = hV(), Wz = hV(!0);
      function il(b, w) {
        return b && j$(b, w, ri);
      }
      function Z$(b, w) {
        return b && Wz(b, w, ri);
      }
      function dO(b, w) {
        return lc(w, function(A) {
          return uu(b[A]);
        });
      }
      function Kf(b, w) {
        w = pc(w, b);
        for (var A = 0, L = w.length; b != null && A < L; )
          b = b[ol(w[A++])];
        return A && A == L ? b : n;
      }
      function Qz(b, w, A) {
        var L = w(b);
        return Ft(b) ? L : uc(L, A(b));
      }
      function ji(b) {
        return b == null ? b === n ? an : je : Uf && Uf in Fn(b) ? Ibe(b) : Gbe(b);
      }
      function U$(b, w) {
        return b > w;
      }
      function qye(b, w) {
        return b != null && Rn.call(b, w);
      }
      function Kye(b, w) {
        return b != null && w in Fn(b);
      }
      function Jye(b, w, A) {
        return b >= Mi(w, A) && b < Hr(w, A);
      }
      function X$(b, w, A) {
        for (var L = A ? M$ : Z1, G = b[0].length, X = b.length, J = X, ie = Oe(X), ge = 1 / 0, Ee = []; J--; ) {
          var Ie = b[J];
          J && w && (Ie = ar(Ie, Wa(w))), ge = Mi(Ie.length, ge), ie[J] = !A && (w || G >= 120 && Ie.length >= 120) ? new Yf(J && Ie) : n;
        }
        Ie = b[0];
        var Ne = -1, Ke = ie[0];
        e:
          for (; ++Ne < G && Ee.length < ge; ) {
            var ht = Ie[Ne], Pt = w ? w(ht) : ht;
            if (ht = A || ht !== 0 ? ht : 0, !(Ke ? Jm(Ke, Pt) : L(Ee, Pt, A))) {
              for (J = X; --J; ) {
                var Jt = ie[J];
                if (!(Jt ? Jm(Jt, Pt) : L(b[J], Pt, A)))
                  continue e;
              }
              Ke && Ke.push(Pt), Ee.push(ht);
            }
          }
        return Ee;
      }
      function ebe(b, w, A, L) {
        return il(b, function(G, X, J) {
          w(L, A(G), X, J);
        }), L;
      }
      function s0(b, w, A) {
        w = pc(w, b), b = EV(b, w);
        var L = b == null ? b : b[ol(Co(w))];
        return L == null ? n : Fa(L, b, A);
      }
      function Hz(b) {
        return gr(b) && ji(b) == ue;
      }
      function tbe(b) {
        return gr(b) && ji(b) == Xt;
      }
      function nbe(b) {
        return gr(b) && ji(b) == re;
      }
      function l0(b, w, A, L, G) {
        return b === w ? !0 : b == null || w == null || !gr(b) && !gr(w) ? b !== b && w !== w : rbe(b, w, A, L, l0, G);
      }
      function rbe(b, w, A, L, G, X) {
        var J = Ft(b), ie = Ft(w), ge = J ? ye : Ii(b), Ee = ie ? ye : Ii(w);
        ge = ge == ue ? Be : ge, Ee = Ee == ue ? Be : Ee;
        var Ie = ge == Be, Ne = Ee == Be, Ke = ge == Ee;
        if (Ke && gc(b)) {
          if (!gc(w))
            return !1;
          J = !0, Ie = !1;
        }
        if (Ke && !Ie)
          return X || (X = new ys()), J || Np(b) ? xV(b, w, A, L, G, X) : Ebe(b, w, ge, A, L, G, X);
        if (!(A & p)) {
          var ht = Ie && Rn.call(b, "__wrapped__"), Pt = Ne && Rn.call(w, "__wrapped__");
          if (ht || Pt) {
            var Jt = ht ? b.value() : b, $t = Pt ? w.value() : w;
            return X || (X = new ys()), G(Jt, $t, A, L, X);
          }
        }
        return Ke ? (X || (X = new ys()), Mbe(b, w, A, L, G, X)) : !1;
      }
      function ibe(b) {
        return gr(b) && Ii(b) == we;
      }
      function Y$(b, w, A, L) {
        var G = A.length, X = G, J = !L;
        if (b == null)
          return !X;
        for (b = Fn(b); G--; ) {
          var ie = A[G];
          if (J && ie[2] ? ie[1] !== b[ie[0]] : !(ie[0] in b))
            return !1;
        }
        for (; ++G < X; ) {
          ie = A[G];
          var ge = ie[0], Ee = b[ge], Ie = ie[1];
          if (J && ie[2]) {
            if (Ee === n && !(ge in b))
              return !1;
          } else {
            var Ne = new ys();
            if (L)
              var Ke = L(Ee, Ie, ge, b, w, Ne);
            if (!(Ke === n ? l0(Ie, Ee, p | v, L, Ne) : Ke))
              return !1;
          }
        }
        return !0;
      }
      function Gz(b) {
        if (!cr(b) || Vbe(b))
          return !1;
        var w = uu(b) ? iye : S$;
        return w.test(ed(b));
      }
      function abe(b) {
        return gr(b) && ji(b) == Fe;
      }
      function obe(b) {
        return gr(b) && Ii(b) == Ye;
      }
      function sbe(b) {
        return gr(b) && AO(b.length) && !!qn[ji(b)];
      }
      function jz(b) {
        return typeof b == "function" ? b : b == null ? ba : typeof b == "object" ? Ft(b) ? Xz(b[0], b[1]) : Uz(b) : pF(b);
      }
      function q$(b) {
        if (!f0(b))
          return cye(b);
        var w = [];
        for (var A in Fn(b))
          Rn.call(b, A) && A != "constructor" && w.push(A);
        return w;
      }
      function lbe(b) {
        if (!cr(b))
          return Hbe(b);
        var w = f0(b), A = [];
        for (var L in b)
          L == "constructor" && (w || !Rn.call(b, L)) || A.push(L);
        return A;
      }
      function K$(b, w) {
        return b < w;
      }
      function Zz(b, w) {
        var A = -1, L = ma(b) ? Oe(b.length) : [];
        return dc(b, function(G, X, J) {
          L[++A] = w(G, X, J);
        }), L;
      }
      function Uz(b) {
        var w = hA(b);
        return w.length == 1 && w[0][2] ? $V(w[0][0], w[0][1]) : function(A) {
          return A === b || Y$(A, b, w);
        };
      }
      function Xz(b, w) {
        return vA(b) && PV(w) ? $V(ol(b), w) : function(A) {
          var L = CA(A, b);
          return L === n && L === w ? TA(A, b) : l0(w, L, p | v);
        };
      }
      function hO(b, w, A, L, G) {
        b !== w && j$(w, function(X, J) {
          if (G || (G = new ys()), cr(X))
            ube(b, w, J, A, hO, L, G);
          else {
            var ie = L ? L(mA(b, J), X, J + "", b, w, G) : n;
            ie === n && (ie = X), H$(b, J, ie);
          }
        }, ya);
      }
      function ube(b, w, A, L, G, X, J) {
        var ie = mA(b, A), ge = mA(w, A), Ee = J.get(ge);
        if (Ee) {
          H$(b, A, Ee);
          return;
        }
        var Ie = X ? X(ie, ge, A + "", b, w, J) : n, Ne = Ie === n;
        if (Ne) {
          var Ke = Ft(ge), ht = !Ke && gc(ge), Pt = !Ke && !ht && Np(ge);
          Ie = ge, Ke || ht || Pt ? Ft(ie) ? Ie = ie : xr(ie) ? Ie = ga(ie) : ht ? (Ne = !1, Ie = sV(ge, !0)) : Pt ? (Ne = !1, Ie = lV(ge, !0)) : Ie = [] : h0(ge) || td(ge) ? (Ie = ie, td(ie) ? Ie = iF(ie) : (!cr(ie) || uu(ie)) && (Ie = TV(ge))) : Ne = !1;
        }
        Ne && (J.set(ge, Ie), G(Ie, ge, L, X, J), J.delete(ge)), H$(b, A, Ie);
      }
      function Yz(b, w) {
        var A = b.length;
        if (A)
          return w += w < 0 ? A : 0, lu(w, A) ? b[w] : n;
      }
      function qz(b, w, A) {
        w.length ? w = ar(w, function(X) {
          return Ft(X) ? function(J) {
            return Kf(J, X.length === 1 ? X[0] : X);
          } : X;
        }) : w = [ba];
        var L = -1;
        w = ar(w, Wa(wt()));
        var G = Zz(b, function(X, J, ie) {
          var ge = ar(w, function(Ee) {
            return Ee(X);
          });
          return { criteria: ge, index: ++L, value: X };
        });
        return L0e(G, function(X, J) {
          return Sbe(X, J, A);
        });
      }
      function cbe(b, w) {
        return Kz(b, w, function(A, L) {
          return TA(b, L);
        });
      }
      function Kz(b, w, A) {
        for (var L = -1, G = w.length, X = {}; ++L < G; ) {
          var J = w[L], ie = Kf(b, J);
          A(ie, J) && u0(X, pc(J, b), ie);
        }
        return X;
      }
      function fbe(b) {
        return function(w) {
          return Kf(w, b);
        };
      }
      function J$(b, w, A, L) {
        var G = L ? k0e : Tp, X = -1, J = w.length, ie = b;
        for (b === w && (w = ga(w)), A && (ie = ar(b, Wa(A))); ++X < J; )
          for (var ge = 0, Ee = w[X], Ie = A ? A(Ee) : Ee; (ge = G(ie, Ie, ge, L)) > -1; )
            ie !== b && rO.call(ie, ge, 1), rO.call(b, ge, 1);
        return b;
      }
      function Jz(b, w) {
        for (var A = b ? w.length : 0, L = A - 1; A--; ) {
          var G = w[A];
          if (A == L || G !== X) {
            var X = G;
            lu(G) ? rO.call(b, G, 1) : rA(b, G);
          }
        }
        return b;
      }
      function eA(b, w) {
        return b + oO(Dz() * (w - b + 1));
      }
      function dbe(b, w, A, L) {
        for (var G = -1, X = Hr(aO((w - b) / (A || 1)), 0), J = Oe(X); X--; )
          J[L ? X : ++G] = b, b += A;
        return J;
      }
      function tA(b, w) {
        var A = "";
        if (!b || w < 1 || w > W)
          return A;
        do
          w % 2 && (A += b), w = oO(w / 2), w && (b += b);
        while (w);
        return A;
      }
      function nn(b, w) {
        return yA(AV(b, w, ba), b + "");
      }
      function hbe(b) {
        return Lz(Bp(b));
      }
      function pbe(b, w) {
        var A = Bp(b);
        return xO(A, qf(w, 0, A.length));
      }
      function u0(b, w, A, L) {
        if (!cr(b))
          return b;
        w = pc(w, b);
        for (var G = -1, X = w.length, J = X - 1, ie = b; ie != null && ++G < X; ) {
          var ge = ol(w[G]), Ee = A;
          if (ge === "__proto__" || ge === "constructor" || ge === "prototype")
            return b;
          if (G != J) {
            var Ie = ie[ge];
            Ee = L ? L(Ie, ge, ie) : n, Ee === n && (Ee = cr(Ie) ? Ie : lu(w[G + 1]) ? [] : {});
          }
          a0(ie, ge, Ee), ie = ie[ge];
        }
        return b;
      }
      var eV = sO ? function(b, w) {
        return sO.set(b, w), b;
      } : ba, vbe = iO ? function(b, w) {
        return iO(b, "toString", {
          configurable: !0,
          enumerable: !1,
          value: $A(w),
          writable: !0
        });
      } : ba;
      function gbe(b) {
        return xO(Bp(b));
      }
      function wo(b, w, A) {
        var L = -1, G = b.length;
        w < 0 && (w = -w > G ? 0 : G + w), A = A > G ? G : A, A < 0 && (A += G), G = w > A ? 0 : A - w >>> 0, w >>>= 0;
        for (var X = Oe(G); ++L < G; )
          X[L] = b[L + w];
        return X;
      }
      function mbe(b, w) {
        var A;
        return dc(b, function(L, G, X) {
          return A = w(L, G, X), !A;
        }), !!A;
      }
      function pO(b, w, A) {
        var L = 0, G = b == null ? L : b.length;
        if (typeof w == "number" && w === w && G <= ne) {
          for (; L < G; ) {
            var X = L + G >>> 1, J = b[X];
            J !== null && !Ha(J) && (A ? J <= w : J < w) ? L = X + 1 : G = X;
          }
          return G;
        }
        return nA(b, w, ba, A);
      }
      function nA(b, w, A, L) {
        var G = 0, X = b == null ? 0 : b.length;
        if (X === 0)
          return 0;
        w = A(w);
        for (var J = w !== w, ie = w === null, ge = Ha(w), Ee = w === n; G < X; ) {
          var Ie = oO((G + X) / 2), Ne = A(b[Ie]), Ke = Ne !== n, ht = Ne === null, Pt = Ne === Ne, Jt = Ha(Ne);
          if (J)
            var $t = L || Pt;
          else Ee ? $t = Pt && (L || Ke) : ie ? $t = Pt && Ke && (L || !ht) : ge ? $t = Pt && Ke && !ht && (L || !Jt) : ht || Jt ? $t = !1 : $t = L ? Ne <= w : Ne < w;
          $t ? G = Ie + 1 : X = Ie;
        }
        return Mi(X, Y);
      }
      function tV(b, w) {
        for (var A = -1, L = b.length, G = 0, X = []; ++A < L; ) {
          var J = b[A], ie = w ? w(J) : J;
          if (!A || !bs(ie, ge)) {
            var ge = ie;
            X[G++] = J === 0 ? 0 : J;
          }
        }
        return X;
      }
      function nV(b) {
        return typeof b == "number" ? b : Ha(b) ? U : +b;
      }
      function Qa(b) {
        if (typeof b == "string")
          return b;
        if (Ft(b))
          return ar(b, Qa) + "";
        if (Ha(b))
          return Rz ? Rz.call(b) : "";
        var w = b + "";
        return w == "0" && 1 / b == -Q ? "-0" : w;
      }
      function hc(b, w, A) {
        var L = -1, G = Z1, X = b.length, J = !0, ie = [], ge = ie;
        if (A)
          J = !1, G = M$;
        else if (X >= i) {
          var Ee = w ? null : $be(b);
          if (Ee)
            return X1(Ee);
          J = !1, G = Jm, ge = new Yf();
        } else
          ge = w ? [] : ie;
        e:
          for (; ++L < X; ) {
            var Ie = b[L], Ne = w ? w(Ie) : Ie;
            if (Ie = A || Ie !== 0 ? Ie : 0, J && Ne === Ne) {
              for (var Ke = ge.length; Ke--; )
                if (ge[Ke] === Ne)
                  continue e;
              w && ge.push(Ne), ie.push(Ie);
            } else G(ge, Ne, A) || (ge !== ie && ge.push(Ne), ie.push(Ie));
          }
        return ie;
      }
      function rA(b, w) {
        return w = pc(w, b), b = EV(b, w), b == null || delete b[ol(Co(w))];
      }
      function rV(b, w, A, L) {
        return u0(b, w, A(Kf(b, w)), L);
      }
      function vO(b, w, A, L) {
        for (var G = b.length, X = L ? G : -1; (L ? X-- : ++X < G) && w(b[X], X, b); )
          ;
        return A ? wo(b, L ? 0 : X, L ? X + 1 : G) : wo(b, L ? X + 1 : 0, L ? G : X);
      }
      function iV(b, w) {
        var A = b;
        return A instanceof ln && (A = A.value()), I$(w, function(L, G) {
          return G.func.apply(G.thisArg, uc([L], G.args));
        }, A);
      }
      function iA(b, w, A) {
        var L = b.length;
        if (L < 2)
          return L ? hc(b[0]) : [];
        for (var G = -1, X = Oe(L); ++G < L; )
          for (var J = b[G], ie = -1; ++ie < L; )
            ie != G && (X[G] = o0(X[G] || J, b[ie], w, A));
        return hc(hi(X, 1), w, A);
      }
      function aV(b, w, A) {
        for (var L = -1, G = b.length, X = w.length, J = {}; ++L < G; ) {
          var ie = L < X ? w[L] : n;
          A(J, b[L], ie);
        }
        return J;
      }
      function aA(b) {
        return xr(b) ? b : [];
      }
      function oA(b) {
        return typeof b == "function" ? b : ba;
      }
      function pc(b, w) {
        return Ft(b) ? b : vA(b, w) ? [b] : RV(An(b));
      }
      var ybe = nn;
      function vc(b, w, A) {
        var L = b.length;
        return A = A === n ? L : A, !w && A >= L ? b : wo(b, w, A);
      }
      var oV = aye || function(b) {
        return di.clearTimeout(b);
      };
      function sV(b, w) {
        if (w)
          return b.slice();
        var A = b.length, L = $z ? $z(A) : new b.constructor(A);
        return b.copy(L), L;
      }
      function sA(b) {
        var w = new b.constructor(b.byteLength);
        return new tO(w).set(new tO(b)), w;
      }
      function bbe(b, w) {
        var A = w ? sA(b.buffer) : b.buffer;
        return new b.constructor(A, b.byteOffset, b.byteLength);
      }
      function _be(b) {
        var w = new b.constructor(b.source, qm.exec(b));
        return w.lastIndex = b.lastIndex, w;
      }
      function Obe(b) {
        return i0 ? Fn(i0.call(b)) : {};
      }
      function lV(b, w) {
        var A = w ? sA(b.buffer) : b.buffer;
        return new b.constructor(A, b.byteOffset, b.length);
      }
      function uV(b, w) {
        if (b !== w) {
          var A = b !== n, L = b === null, G = b === b, X = Ha(b), J = w !== n, ie = w === null, ge = w === w, Ee = Ha(w);
          if (!ie && !Ee && !X && b > w || X && J && ge && !ie && !Ee || L && J && ge || !A && ge || !G)
            return 1;
          if (!L && !X && !Ee && b < w || Ee && A && G && !L && !X || ie && A && G || !J && G || !ge)
            return -1;
        }
        return 0;
      }
      function Sbe(b, w, A) {
        for (var L = -1, G = b.criteria, X = w.criteria, J = G.length, ie = A.length; ++L < J; ) {
          var ge = uV(G[L], X[L]);
          if (ge) {
            if (L >= ie)
              return ge;
            var Ee = A[L];
            return ge * (Ee == "desc" ? -1 : 1);
          }
        }
        return b.index - w.index;
      }
      function cV(b, w, A, L) {
        for (var G = -1, X = b.length, J = A.length, ie = -1, ge = w.length, Ee = Hr(X - J, 0), Ie = Oe(ge + Ee), Ne = !L; ++ie < ge; )
          Ie[ie] = w[ie];
        for (; ++G < J; )
          (Ne || G < X) && (Ie[A[G]] = b[G]);
        for (; Ee--; )
          Ie[ie++] = b[G++];
        return Ie;
      }
      function fV(b, w, A, L) {
        for (var G = -1, X = b.length, J = -1, ie = A.length, ge = -1, Ee = w.length, Ie = Hr(X - ie, 0), Ne = Oe(Ie + Ee), Ke = !L; ++G < Ie; )
          Ne[G] = b[G];
        for (var ht = G; ++ge < Ee; )
          Ne[ht + ge] = w[ge];
        for (; ++J < ie; )
          (Ke || G < X) && (Ne[ht + A[J]] = b[G++]);
        return Ne;
      }
      function ga(b, w) {
        var A = -1, L = b.length;
        for (w || (w = Oe(L)); ++A < L; )
          w[A] = b[A];
        return w;
      }
      function al(b, w, A, L) {
        var G = !A;
        A || (A = {});
        for (var X = -1, J = w.length; ++X < J; ) {
          var ie = w[X], ge = L ? L(A[ie], b[ie], ie, A, b) : n;
          ge === n && (ge = b[ie]), G ? au(A, ie, ge) : a0(A, ie, ge);
        }
        return A;
      }
      function xbe(b, w) {
        return al(b, pA(b), w);
      }
      function wbe(b, w) {
        return al(b, wV(b), w);
      }
      function gO(b, w) {
        return function(A, L) {
          var G = Ft(A) ? A0e : jye, X = w ? w() : {};
          return G(A, b, wt(L, 2), X);
        };
      }
      function Rp(b) {
        return nn(function(w, A) {
          var L = -1, G = A.length, X = G > 1 ? A[G - 1] : n, J = G > 2 ? A[2] : n;
          for (X = b.length > 3 && typeof X == "function" ? (G--, X) : n, J && Zi(A[0], A[1], J) && (X = G < 3 ? n : X, G = 1), w = Fn(w); ++L < G; ) {
            var ie = A[L];
            ie && b(w, ie, L, X);
          }
          return w;
        });
      }
      function dV(b, w) {
        return function(A, L) {
          if (A == null)
            return A;
          if (!ma(A))
            return b(A, L);
          for (var G = A.length, X = w ? G : -1, J = Fn(A); (w ? X-- : ++X < G) && L(J[X], X, J) !== !1; )
            ;
          return A;
        };
      }
      function hV(b) {
        return function(w, A, L) {
          for (var G = -1, X = Fn(w), J = L(w), ie = J.length; ie--; ) {
            var ge = J[b ? ie : ++G];
            if (A(X[ge], ge, X) === !1)
              break;
          }
          return w;
        };
      }
      function Cbe(b, w, A) {
        var L = w & g, G = c0(b);
        function X() {
          var J = this && this !== di && this instanceof X ? G : b;
          return J.apply(L ? A : this, arguments);
        }
        return X;
      }
      function pV(b) {
        return function(w) {
          w = An(w);
          var A = Pp(w) ? ms(w) : n, L = A ? A[0] : w.charAt(0), G = A ? vc(A, 1).join("") : w.slice(1);
          return L[b]() + G;
        };
      }
      function kp(b) {
        return function(w) {
          return I$(dF(fF(w).replace(v0e, "")), b, "");
        };
      }
      function c0(b) {
        return function() {
          var w = arguments;
          switch (w.length) {
            case 0:
              return new b();
            case 1:
              return new b(w[0]);
            case 2:
              return new b(w[0], w[1]);
            case 3:
              return new b(w[0], w[1], w[2]);
            case 4:
              return new b(w[0], w[1], w[2], w[3]);
            case 5:
              return new b(w[0], w[1], w[2], w[3], w[4]);
            case 6:
              return new b(w[0], w[1], w[2], w[3], w[4], w[5]);
            case 7:
              return new b(w[0], w[1], w[2], w[3], w[4], w[5], w[6]);
          }
          var A = Dp(b.prototype), L = b.apply(A, w);
          return cr(L) ? L : A;
        };
      }
      function Tbe(b, w, A) {
        var L = c0(b);
        function G() {
          for (var X = arguments.length, J = Oe(X), ie = X, ge = Lp(G); ie--; )
            J[ie] = arguments[ie];
          var Ee = X < 3 && J[0] !== ge && J[X - 1] !== ge ? [] : cc(J, ge);
          if (X -= Ee.length, X < A)
            return bV(
              b,
              w,
              mO,
              G.placeholder,
              n,
              J,
              Ee,
              n,
              n,
              A - X
            );
          var Ie = this && this !== di && this instanceof G ? L : b;
          return Fa(Ie, this, J);
        }
        return G;
      }
      function vV(b) {
        return function(w, A, L) {
          var G = Fn(w);
          if (!ma(w)) {
            var X = wt(A, 3);
            w = ri(w), A = function(ie) {
              return X(G[ie], ie, G);
            };
          }
          var J = b(w, A, L);
          return J > -1 ? G[X ? w[J] : J] : n;
        };
      }
      function gV(b) {
        return su(function(w) {
          var A = w.length, L = A, G = So.prototype.thru;
          for (b && w.reverse(); L--; ) {
            var X = w[L];
            if (typeof X != "function")
              throw new Oo(o);
            if (G && !J && OO(X) == "wrapper")
              var J = new So([], !0);
          }
          for (L = J ? L : A; ++L < A; ) {
            X = w[L];
            var ie = OO(X), ge = ie == "wrapper" ? dA(X) : n;
            ge && gA(ge[0]) && ge[1] == (C | _ | S | P) && !ge[4].length && ge[9] == 1 ? J = J[OO(ge[0])].apply(J, ge[3]) : J = X.length == 1 && gA(X) ? J[ie]() : J.thru(X);
          }
          return function() {
            var Ee = arguments, Ie = Ee[0];
            if (J && Ee.length == 1 && Ft(Ie))
              return J.plant(Ie).value();
            for (var Ne = 0, Ke = A ? w[Ne].apply(this, Ee) : Ie; ++Ne < A; )
              Ke = w[Ne].call(this, Ke);
            return Ke;
          };
        });
      }
      function mO(b, w, A, L, G, X, J, ie, ge, Ee) {
        var Ie = w & C, Ne = w & g, Ke = w & m, ht = w & (_ | O), Pt = w & $, Jt = Ke ? n : c0(b);
        function $t() {
          for (var on = arguments.length, pn = Oe(on), Ga = on; Ga--; )
            pn[Ga] = arguments[Ga];
          if (ht)
            var Ui = Lp($t), ja = B0e(pn, Ui);
          if (L && (pn = cV(pn, L, G, ht)), X && (pn = fV(pn, X, J, ht)), on -= ja, ht && on < Ee) {
            var wr = cc(pn, Ui);
            return bV(
              b,
              w,
              mO,
              $t.placeholder,
              A,
              pn,
              wr,
              ie,
              ge,
              Ee - on
            );
          }
          var _s = Ne ? A : this, fu = Ke ? _s[b] : b;
          return on = pn.length, ie ? pn = jbe(pn, ie) : Pt && on > 1 && pn.reverse(), Ie && ge < on && (pn.length = ge), this && this !== di && this instanceof $t && (fu = Jt || c0(fu)), fu.apply(_s, pn);
        }
        return $t;
      }
      function mV(b, w) {
        return function(A, L) {
          return ebe(A, b, w(L), {});
        };
      }
      function yO(b, w) {
        return function(A, L) {
          var G;
          if (A === n && L === n)
            return w;
          if (A !== n && (G = A), L !== n) {
            if (G === n)
              return L;
            typeof A == "string" || typeof L == "string" ? (A = Qa(A), L = Qa(L)) : (A = nV(A), L = nV(L)), G = b(A, L);
          }
          return G;
        };
      }
      function lA(b) {
        return su(function(w) {
          return w = ar(w, Wa(wt())), nn(function(A) {
            var L = this;
            return b(w, function(G) {
              return Fa(G, L, A);
            });
          });
        });
      }
      function bO(b, w) {
        w = w === n ? " " : Qa(w);
        var A = w.length;
        if (A < 2)
          return A ? tA(w, b) : w;
        var L = tA(w, aO(b / $p(w)));
        return Pp(w) ? vc(ms(L), 0, b).join("") : L.slice(0, b);
      }
      function Pbe(b, w, A, L) {
        var G = w & g, X = c0(b);
        function J() {
          for (var ie = -1, ge = arguments.length, Ee = -1, Ie = L.length, Ne = Oe(Ie + ge), Ke = this && this !== di && this instanceof J ? X : b; ++Ee < Ie; )
            Ne[Ee] = L[Ee];
          for (; ge--; )
            Ne[Ee++] = arguments[++ie];
          return Fa(Ke, G ? A : this, Ne);
        }
        return J;
      }
      function yV(b) {
        return function(w, A, L) {
          return L && typeof L != "number" && Zi(w, A, L) && (A = L = n), w = cu(w), A === n ? (A = w, w = 0) : A = cu(A), L = L === n ? w < A ? 1 : -1 : cu(L), dbe(w, A, L, b);
        };
      }
      function _O(b) {
        return function(w, A) {
          return typeof w == "string" && typeof A == "string" || (w = To(w), A = To(A)), b(w, A);
        };
      }
      function bV(b, w, A, L, G, X, J, ie, ge, Ee) {
        var Ie = w & _, Ne = Ie ? J : n, Ke = Ie ? n : J, ht = Ie ? X : n, Pt = Ie ? n : X;
        w |= Ie ? S : x, w &= ~(Ie ? x : S), w & y || (w &= ~(g | m));
        var Jt = [
          b,
          w,
          G,
          ht,
          Ne,
          Pt,
          Ke,
          ie,
          ge,
          Ee
        ], $t = A.apply(n, Jt);
        return gA(b) && MV($t, Jt), $t.placeholder = L, IV($t, b, w);
      }
      function uA(b) {
        var w = Qr[b];
        return function(A, L) {
          if (A = To(A), L = L == null ? 0 : Mi(Yt(L), 292), L && Iz(A)) {
            var G = (An(A) + "e").split("e"), X = w(G[0] + "e" + (+G[1] + L));
            return G = (An(X) + "e").split("e"), +(G[0] + "e" + (+G[1] - L));
          }
          return w(A);
        };
      }
      var $be = Mp && 1 / X1(new Mp([, -0]))[1] == Q ? function(b) {
        return new Mp(b);
      } : MA;
      function _V(b) {
        return function(w) {
          var A = Ii(w);
          return A == we ? z$(w) : A == Ye ? G0e(w) : N0e(w, b(w));
        };
      }
      function ou(b, w, A, L, G, X, J, ie) {
        var ge = w & m;
        if (!ge && typeof b != "function")
          throw new Oo(o);
        var Ee = L ? L.length : 0;
        if (Ee || (w &= ~(S | x), L = G = n), J = J === n ? J : Hr(Yt(J), 0), ie = ie === n ? ie : Yt(ie), Ee -= G ? G.length : 0, w & x) {
          var Ie = L, Ne = G;
          L = G = n;
        }
        var Ke = ge ? n : dA(b), ht = [
          b,
          w,
          A,
          L,
          G,
          Ie,
          Ne,
          X,
          J,
          ie
        ];
        if (Ke && Qbe(ht, Ke), b = ht[0], w = ht[1], A = ht[2], L = ht[3], G = ht[4], ie = ht[9] = ht[9] === n ? ge ? 0 : b.length : Hr(ht[9] - Ee, 0), !ie && w & (_ | O) && (w &= ~(_ | O)), !w || w == g)
          var Pt = Cbe(b, w, A);
        else w == _ || w == O ? Pt = Tbe(b, w, ie) : (w == S || w == (g | S)) && !G.length ? Pt = Pbe(b, w, A, L) : Pt = mO.apply(n, ht);
        var Jt = Ke ? eV : MV;
        return IV(Jt(Pt, ht), b, w);
      }
      function OV(b, w, A, L) {
        return b === n || bs(b, Ep[A]) && !Rn.call(L, A) ? w : b;
      }
      function SV(b, w, A, L, G, X) {
        return cr(b) && cr(w) && (X.set(w, b), hO(b, w, n, SV, X), X.delete(w)), b;
      }
      function Abe(b) {
        return h0(b) ? n : b;
      }
      function xV(b, w, A, L, G, X) {
        var J = A & p, ie = b.length, ge = w.length;
        if (ie != ge && !(J && ge > ie))
          return !1;
        var Ee = X.get(b), Ie = X.get(w);
        if (Ee && Ie)
          return Ee == w && Ie == b;
        var Ne = -1, Ke = !0, ht = A & v ? new Yf() : n;
        for (X.set(b, w), X.set(w, b); ++Ne < ie; ) {
          var Pt = b[Ne], Jt = w[Ne];
          if (L)
            var $t = J ? L(Jt, Pt, Ne, w, b, X) : L(Pt, Jt, Ne, b, w, X);
          if ($t !== n) {
            if ($t)
              continue;
            Ke = !1;
            break;
          }
          if (ht) {
            if (!D$(w, function(on, pn) {
              if (!Jm(ht, pn) && (Pt === on || G(Pt, on, A, L, X)))
                return ht.push(pn);
            })) {
              Ke = !1;
              break;
            }
          } else if (!(Pt === Jt || G(Pt, Jt, A, L, X))) {
            Ke = !1;
            break;
          }
        }
        return X.delete(b), X.delete(w), Ke;
      }
      function Ebe(b, w, A, L, G, X, J) {
        switch (A) {
          case Bn:
            if (b.byteLength != w.byteLength || b.byteOffset != w.byteOffset)
              return !1;
            b = b.buffer, w = w.buffer;
          case Xt:
            return !(b.byteLength != w.byteLength || !X(new tO(b), new tO(w)));
          case he:
          case re:
          case He:
            return bs(+b, +w);
          case K:
            return b.name == w.name && b.message == w.message;
          case Fe:
          case xt:
            return b == w + "";
          case we:
            var ie = z$;
          case Ye:
            var ge = L & p;
            if (ie || (ie = X1), b.size != w.size && !ge)
              return !1;
            var Ee = J.get(b);
            if (Ee)
              return Ee == w;
            L |= v, J.set(b, w);
            var Ie = xV(ie(b), ie(w), L, G, X, J);
            return J.delete(b), Ie;
          case It:
            if (i0)
              return i0.call(b) == i0.call(w);
        }
        return !1;
      }
      function Mbe(b, w, A, L, G, X) {
        var J = A & p, ie = cA(b), ge = ie.length, Ee = cA(w), Ie = Ee.length;
        if (ge != Ie && !J)
          return !1;
        for (var Ne = ge; Ne--; ) {
          var Ke = ie[Ne];
          if (!(J ? Ke in w : Rn.call(w, Ke)))
            return !1;
        }
        var ht = X.get(b), Pt = X.get(w);
        if (ht && Pt)
          return ht == w && Pt == b;
        var Jt = !0;
        X.set(b, w), X.set(w, b);
        for (var $t = J; ++Ne < ge; ) {
          Ke = ie[Ne];
          var on = b[Ke], pn = w[Ke];
          if (L)
            var Ga = J ? L(pn, on, Ke, w, b, X) : L(on, pn, Ke, b, w, X);
          if (!(Ga === n ? on === pn || G(on, pn, A, L, X) : Ga)) {
            Jt = !1;
            break;
          }
          $t || ($t = Ke == "constructor");
        }
        if (Jt && !$t) {
          var Ui = b.constructor, ja = w.constructor;
          Ui != ja && "constructor" in b && "constructor" in w && !(typeof Ui == "function" && Ui instanceof Ui && typeof ja == "function" && ja instanceof ja) && (Jt = !1);
        }
        return X.delete(b), X.delete(w), Jt;
      }
      function su(b) {
        return yA(AV(b, n, BV), b + "");
      }
      function cA(b) {
        return Qz(b, ri, pA);
      }
      function fA(b) {
        return Qz(b, ya, wV);
      }
      var dA = sO ? function(b) {
        return sO.get(b);
      } : MA;
      function OO(b) {
        for (var w = b.name + "", A = Ip[w], L = Rn.call(Ip, w) ? A.length : 0; L--; ) {
          var G = A[L], X = G.func;
          if (X == null || X == b)
            return G.name;
        }
        return w;
      }
      function Lp(b) {
        var w = Rn.call(Z, "placeholder") ? Z : b;
        return w.placeholder;
      }
      function wt() {
        var b = Z.iteratee || AA;
        return b = b === AA ? jz : b, arguments.length ? b(arguments[0], arguments[1]) : b;
      }
      function SO(b, w) {
        var A = b.__data__;
        return zbe(w) ? A[typeof w == "string" ? "string" : "hash"] : A.map;
      }
      function hA(b) {
        for (var w = ri(b), A = w.length; A--; ) {
          var L = w[A], G = b[L];
          w[A] = [L, G, PV(G)];
        }
        return w;
      }
      function Jf(b, w) {
        var A = W0e(b, w);
        return Gz(A) ? A : n;
      }
      function Ibe(b) {
        var w = Rn.call(b, Uf), A = b[Uf];
        try {
          b[Uf] = n;
          var L = !0;
        } catch {
        }
        var G = J1.call(b);
        return L && (w ? b[Uf] = A : delete b[Uf]), G;
      }
      var pA = F$ ? function(b) {
        return b == null ? [] : (b = Fn(b), lc(F$(b), function(w) {
          return Ez.call(b, w);
        }));
      } : IA, wV = F$ ? function(b) {
        for (var w = []; b; )
          uc(w, pA(b)), b = nO(b);
        return w;
      } : IA, Ii = ji;
      (W$ && Ii(new W$(new ArrayBuffer(1))) != Bn || t0 && Ii(new t0()) != we || Q$ && Ii(Q$.resolve()) != Le || Mp && Ii(new Mp()) != Ye || n0 && Ii(new n0()) != Ae) && (Ii = function(b) {
        var w = ji(b), A = w == Be ? b.constructor : n, L = A ? ed(A) : "";
        if (L)
          switch (L) {
            case pye:
              return Bn;
            case vye:
              return we;
            case gye:
              return Le;
            case mye:
              return Ye;
            case yye:
              return Ae;
          }
        return w;
      });
      function Dbe(b, w, A) {
        for (var L = -1, G = A.length; ++L < G; ) {
          var X = A[L], J = X.size;
          switch (X.type) {
            case "drop":
              b += J;
              break;
            case "dropRight":
              w -= J;
              break;
            case "take":
              w = Mi(w, b + J);
              break;
            case "takeRight":
              b = Hr(b, w - J);
              break;
          }
        }
        return { start: b, end: w };
      }
      function Rbe(b) {
        var w = b.match(_$);
        return w ? w[1].split(V1) : [];
      }
      function CV(b, w, A) {
        w = pc(w, b);
        for (var L = -1, G = w.length, X = !1; ++L < G; ) {
          var J = ol(w[L]);
          if (!(X = b != null && A(b, J)))
            break;
          b = b[J];
        }
        return X || ++L != G ? X : (G = b == null ? 0 : b.length, !!G && AO(G) && lu(J, G) && (Ft(b) || td(b)));
      }
      function kbe(b) {
        var w = b.length, A = new b.constructor(w);
        return w && typeof b[0] == "string" && Rn.call(b, "index") && (A.index = b.index, A.input = b.input), A;
      }
      function TV(b) {
        return typeof b.constructor == "function" && !f0(b) ? Dp(nO(b)) : {};
      }
      function Lbe(b, w, A) {
        var L = b.constructor;
        switch (w) {
          case Xt:
            return sA(b);
          case he:
          case re:
            return new L(+b);
          case Bn:
            return bbe(b, A);
          case Dn:
          case Dr:
          case Gi:
          case tu:
          case nu:
          case oc:
          case Qf:
          case rl:
          case Hf:
            return lV(b, A);
          case we:
            return new L();
          case He:
          case xt:
            return new L(b);
          case Fe:
            return _be(b);
          case Ye:
            return new L();
          case It:
            return Obe(b);
        }
      }
      function Nbe(b, w) {
        var A = w.length;
        if (!A)
          return b;
        var L = A - 1;
        return w[L] = (A > 1 ? "& " : "") + w[L], w = w.join(A > 2 ? ", " : " "), b.replace(b$, `{
/* [wrapped with ` + w + `] */
`);
      }
      function Bbe(b) {
        return Ft(b) || td(b) || !!(Mz && b && b[Mz]);
      }
      function lu(b, w) {
        var A = typeof b;
        return w = w ?? W, !!w && (A == "number" || A != "symbol" && H1.test(b)) && b > -1 && b % 1 == 0 && b < w;
      }
      function Zi(b, w, A) {
        if (!cr(A))
          return !1;
        var L = typeof w;
        return (L == "number" ? ma(A) && lu(w, A.length) : L == "string" && w in A) ? bs(A[w], b) : !1;
      }
      function vA(b, w) {
        if (Ft(b))
          return !1;
        var A = typeof b;
        return A == "number" || A == "symbol" || A == "boolean" || b == null || Ha(b) ? !0 : z1.test(b) || !Zm.test(b) || w != null && b in Fn(w);
      }
      function zbe(b) {
        var w = typeof b;
        return w == "string" || w == "number" || w == "symbol" || w == "boolean" ? b !== "__proto__" : b === null;
      }
      function gA(b) {
        var w = OO(b), A = Z[w];
        if (typeof A != "function" || !(w in ln.prototype))
          return !1;
        if (b === A)
          return !0;
        var L = dA(A);
        return !!L && b === L[0];
      }
      function Vbe(b) {
        return !!Pz && Pz in b;
      }
      var Fbe = q1 ? uu : DA;
      function f0(b) {
        var w = b && b.constructor, A = typeof w == "function" && w.prototype || Ep;
        return b === A;
      }
      function PV(b) {
        return b === b && !cr(b);
      }
      function $V(b, w) {
        return function(A) {
          return A == null ? !1 : A[b] === w && (w !== n || b in Fn(A));
        };
      }
      function Wbe(b) {
        var w = PO(b, function(L) {
          return A.size === u && A.clear(), L;
        }), A = w.cache;
        return w;
      }
      function Qbe(b, w) {
        var A = b[1], L = w[1], G = A | L, X = G < (g | m | C), J = L == C && A == _ || L == C && A == P && b[7].length <= w[8] || L == (C | P) && w[7].length <= w[8] && A == _;
        if (!(X || J))
          return b;
        L & g && (b[2] = w[2], G |= A & g ? 0 : y);
        var ie = w[3];
        if (ie) {
          var ge = b[3];
          b[3] = ge ? cV(ge, ie, w[4]) : ie, b[4] = ge ? cc(b[3], c) : w[4];
        }
        return ie = w[5], ie && (ge = b[5], b[5] = ge ? fV(ge, ie, w[6]) : ie, b[6] = ge ? cc(b[5], c) : w[6]), ie = w[7], ie && (b[7] = ie), L & C && (b[8] = b[8] == null ? w[8] : Mi(b[8], w[8])), b[9] == null && (b[9] = w[9]), b[0] = w[0], b[1] = G, b;
      }
      function Hbe(b) {
        var w = [];
        if (b != null)
          for (var A in Fn(b))
            w.push(A);
        return w;
      }
      function Gbe(b) {
        return J1.call(b);
      }
      function AV(b, w, A) {
        return w = Hr(w === n ? b.length - 1 : w, 0), function() {
          for (var L = arguments, G = -1, X = Hr(L.length - w, 0), J = Oe(X); ++G < X; )
            J[G] = L[w + G];
          G = -1;
          for (var ie = Oe(w + 1); ++G < w; )
            ie[G] = L[G];
          return ie[w] = A(J), Fa(b, this, ie);
        };
      }
      function EV(b, w) {
        return w.length < 2 ? b : Kf(b, wo(w, 0, -1));
      }
      function jbe(b, w) {
        for (var A = b.length, L = Mi(w.length, A), G = ga(b); L--; ) {
          var X = w[L];
          b[L] = lu(X, A) ? G[X] : n;
        }
        return b;
      }
      function mA(b, w) {
        if (!(w === "constructor" && typeof b[w] == "function") && w != "__proto__")
          return b[w];
      }
      var MV = DV(eV), d0 = sye || function(b, w) {
        return di.setTimeout(b, w);
      }, yA = DV(vbe);
      function IV(b, w, A) {
        var L = w + "";
        return yA(b, Nbe(L, Zbe(Rbe(L), A)));
      }
      function DV(b) {
        var w = 0, A = 0;
        return function() {
          var L = fye(), G = R - (L - A);
          if (A = L, G > 0) {
            if (++w >= M)
              return arguments[0];
          } else
            w = 0;
          return b.apply(n, arguments);
        };
      }
      function xO(b, w) {
        var A = -1, L = b.length, G = L - 1;
        for (w = w === n ? L : w; ++A < w; ) {
          var X = eA(A, G), J = b[X];
          b[X] = b[A], b[A] = J;
        }
        return b.length = w, b;
      }
      var RV = Wbe(function(b) {
        var w = [];
        return b.charCodeAt(0) === 46 && w.push(""), b.replace(xp, function(A, L, G, X) {
          w.push(G ? X.replace(F1, "$1") : L || A);
        }), w;
      });
      function ol(b) {
        if (typeof b == "string" || Ha(b))
          return b;
        var w = b + "";
        return w == "0" && 1 / b == -Q ? "-0" : w;
      }
      function ed(b) {
        if (b != null) {
          try {
            return K1.call(b);
          } catch {
          }
          try {
            return b + "";
          } catch {
          }
        }
        return "";
      }
      function Zbe(b, w) {
        return _o(fe, function(A) {
          var L = "_." + A[0];
          w & A[1] && !Z1(b, L) && b.push(L);
        }), b.sort();
      }
      function kV(b) {
        if (b instanceof ln)
          return b.clone();
        var w = new So(b.__wrapped__, b.__chain__);
        return w.__actions__ = ga(b.__actions__), w.__index__ = b.__index__, w.__values__ = b.__values__, w;
      }
      function Ube(b, w, A) {
        (A ? Zi(b, w, A) : w === n) ? w = 1 : w = Hr(Yt(w), 0);
        var L = b == null ? 0 : b.length;
        if (!L || w < 1)
          return [];
        for (var G = 0, X = 0, J = Oe(aO(L / w)); G < L; )
          J[X++] = wo(b, G, G += w);
        return J;
      }
      function Xbe(b) {
        for (var w = -1, A = b == null ? 0 : b.length, L = 0, G = []; ++w < A; ) {
          var X = b[w];
          X && (G[L++] = X);
        }
        return G;
      }
      function Ybe() {
        var b = arguments.length;
        if (!b)
          return [];
        for (var w = Oe(b - 1), A = arguments[0], L = b; L--; )
          w[L - 1] = arguments[L];
        return uc(Ft(A) ? ga(A) : [A], hi(w, 1));
      }
      var qbe = nn(function(b, w) {
        return xr(b) ? o0(b, hi(w, 1, xr, !0)) : [];
      }), Kbe = nn(function(b, w) {
        var A = Co(w);
        return xr(A) && (A = n), xr(b) ? o0(b, hi(w, 1, xr, !0), wt(A, 2)) : [];
      }), Jbe = nn(function(b, w) {
        var A = Co(w);
        return xr(A) && (A = n), xr(b) ? o0(b, hi(w, 1, xr, !0), n, A) : [];
      });
      function e_e(b, w, A) {
        var L = b == null ? 0 : b.length;
        return L ? (w = A || w === n ? 1 : Yt(w), wo(b, w < 0 ? 0 : w, L)) : [];
      }
      function t_e(b, w, A) {
        var L = b == null ? 0 : b.length;
        return L ? (w = A || w === n ? 1 : Yt(w), w = L - w, wo(b, 0, w < 0 ? 0 : w)) : [];
      }
      function n_e(b, w) {
        return b && b.length ? vO(b, wt(w, 3), !0, !0) : [];
      }
      function r_e(b, w) {
        return b && b.length ? vO(b, wt(w, 3), !0) : [];
      }
      function i_e(b, w, A, L) {
        var G = b == null ? 0 : b.length;
        return G ? (A && typeof A != "number" && Zi(b, w, A) && (A = 0, L = G), Yye(b, w, A, L)) : [];
      }
      function LV(b, w, A) {
        var L = b == null ? 0 : b.length;
        if (!L)
          return -1;
        var G = A == null ? 0 : Yt(A);
        return G < 0 && (G = Hr(L + G, 0)), U1(b, wt(w, 3), G);
      }
      function NV(b, w, A) {
        var L = b == null ? 0 : b.length;
        if (!L)
          return -1;
        var G = L - 1;
        return A !== n && (G = Yt(A), G = A < 0 ? Hr(L + G, 0) : Mi(G, L - 1)), U1(b, wt(w, 3), G, !0);
      }
      function BV(b) {
        var w = b == null ? 0 : b.length;
        return w ? hi(b, 1) : [];
      }
      function a_e(b) {
        var w = b == null ? 0 : b.length;
        return w ? hi(b, Q) : [];
      }
      function o_e(b, w) {
        var A = b == null ? 0 : b.length;
        return A ? (w = w === n ? 1 : Yt(w), hi(b, w)) : [];
      }
      function s_e(b) {
        for (var w = -1, A = b == null ? 0 : b.length, L = {}; ++w < A; ) {
          var G = b[w];
          L[G[0]] = G[1];
        }
        return L;
      }
      function zV(b) {
        return b && b.length ? b[0] : n;
      }
      function l_e(b, w, A) {
        var L = b == null ? 0 : b.length;
        if (!L)
          return -1;
        var G = A == null ? 0 : Yt(A);
        return G < 0 && (G = Hr(L + G, 0)), Tp(b, w, G);
      }
      function u_e(b) {
        var w = b == null ? 0 : b.length;
        return w ? wo(b, 0, -1) : [];
      }
      var c_e = nn(function(b) {
        var w = ar(b, aA);
        return w.length && w[0] === b[0] ? X$(w) : [];
      }), f_e = nn(function(b) {
        var w = Co(b), A = ar(b, aA);
        return w === Co(A) ? w = n : A.pop(), A.length && A[0] === b[0] ? X$(A, wt(w, 2)) : [];
      }), d_e = nn(function(b) {
        var w = Co(b), A = ar(b, aA);
        return w = typeof w == "function" ? w : n, w && A.pop(), A.length && A[0] === b[0] ? X$(A, n, w) : [];
      });
      function h_e(b, w) {
        return b == null ? "" : uye.call(b, w);
      }
      function Co(b) {
        var w = b == null ? 0 : b.length;
        return w ? b[w - 1] : n;
      }
      function p_e(b, w, A) {
        var L = b == null ? 0 : b.length;
        if (!L)
          return -1;
        var G = L;
        return A !== n && (G = Yt(A), G = G < 0 ? Hr(L + G, 0) : Mi(G, L - 1)), w === w ? Z0e(b, w, G) : U1(b, bz, G, !0);
      }
      function v_e(b, w) {
        return b && b.length ? Yz(b, Yt(w)) : n;
      }
      var g_e = nn(VV);
      function VV(b, w) {
        return b && b.length && w && w.length ? J$(b, w) : b;
      }
      function m_e(b, w, A) {
        return b && b.length && w && w.length ? J$(b, w, wt(A, 2)) : b;
      }
      function y_e(b, w, A) {
        return b && b.length && w && w.length ? J$(b, w, n, A) : b;
      }
      var b_e = su(function(b, w) {
        var A = b == null ? 0 : b.length, L = G$(b, w);
        return Jz(b, ar(w, function(G) {
          return lu(G, A) ? +G : G;
        }).sort(uV)), L;
      });
      function __e(b, w) {
        var A = [];
        if (!(b && b.length))
          return A;
        var L = -1, G = [], X = b.length;
        for (w = wt(w, 3); ++L < X; ) {
          var J = b[L];
          w(J, L, b) && (A.push(J), G.push(L));
        }
        return Jz(b, G), A;
      }
      function bA(b) {
        return b == null ? b : hye.call(b);
      }
      function O_e(b, w, A) {
        var L = b == null ? 0 : b.length;
        return L ? (A && typeof A != "number" && Zi(b, w, A) ? (w = 0, A = L) : (w = w == null ? 0 : Yt(w), A = A === n ? L : Yt(A)), wo(b, w, A)) : [];
      }
      function S_e(b, w) {
        return pO(b, w);
      }
      function x_e(b, w, A) {
        return nA(b, w, wt(A, 2));
      }
      function w_e(b, w) {
        var A = b == null ? 0 : b.length;
        if (A) {
          var L = pO(b, w);
          if (L < A && bs(b[L], w))
            return L;
        }
        return -1;
      }
      function C_e(b, w) {
        return pO(b, w, !0);
      }
      function T_e(b, w, A) {
        return nA(b, w, wt(A, 2), !0);
      }
      function P_e(b, w) {
        var A = b == null ? 0 : b.length;
        if (A) {
          var L = pO(b, w, !0) - 1;
          if (bs(b[L], w))
            return L;
        }
        return -1;
      }
      function $_e(b) {
        return b && b.length ? tV(b) : [];
      }
      function A_e(b, w) {
        return b && b.length ? tV(b, wt(w, 2)) : [];
      }
      function E_e(b) {
        var w = b == null ? 0 : b.length;
        return w ? wo(b, 1, w) : [];
      }
      function M_e(b, w, A) {
        return b && b.length ? (w = A || w === n ? 1 : Yt(w), wo(b, 0, w < 0 ? 0 : w)) : [];
      }
      function I_e(b, w, A) {
        var L = b == null ? 0 : b.length;
        return L ? (w = A || w === n ? 1 : Yt(w), w = L - w, wo(b, w < 0 ? 0 : w, L)) : [];
      }
      function D_e(b, w) {
        return b && b.length ? vO(b, wt(w, 3), !1, !0) : [];
      }
      function R_e(b, w) {
        return b && b.length ? vO(b, wt(w, 3)) : [];
      }
      var k_e = nn(function(b) {
        return hc(hi(b, 1, xr, !0));
      }), L_e = nn(function(b) {
        var w = Co(b);
        return xr(w) && (w = n), hc(hi(b, 1, xr, !0), wt(w, 2));
      }), N_e = nn(function(b) {
        var w = Co(b);
        return w = typeof w == "function" ? w : n, hc(hi(b, 1, xr, !0), n, w);
      });
      function B_e(b) {
        return b && b.length ? hc(b) : [];
      }
      function z_e(b, w) {
        return b && b.length ? hc(b, wt(w, 2)) : [];
      }
      function V_e(b, w) {
        return w = typeof w == "function" ? w : n, b && b.length ? hc(b, n, w) : [];
      }
      function _A(b) {
        if (!(b && b.length))
          return [];
        var w = 0;
        return b = lc(b, function(A) {
          if (xr(A))
            return w = Hr(A.length, w), !0;
        }), N$(w, function(A) {
          return ar(b, R$(A));
        });
      }
      function FV(b, w) {
        if (!(b && b.length))
          return [];
        var A = _A(b);
        return w == null ? A : ar(A, function(L) {
          return Fa(w, n, L);
        });
      }
      var F_e = nn(function(b, w) {
        return xr(b) ? o0(b, w) : [];
      }), W_e = nn(function(b) {
        return iA(lc(b, xr));
      }), Q_e = nn(function(b) {
        var w = Co(b);
        return xr(w) && (w = n), iA(lc(b, xr), wt(w, 2));
      }), H_e = nn(function(b) {
        var w = Co(b);
        return w = typeof w == "function" ? w : n, iA(lc(b, xr), n, w);
      }), G_e = nn(_A);
      function j_e(b, w) {
        return aV(b || [], w || [], a0);
      }
      function Z_e(b, w) {
        return aV(b || [], w || [], u0);
      }
      var U_e = nn(function(b) {
        var w = b.length, A = w > 1 ? b[w - 1] : n;
        return A = typeof A == "function" ? (b.pop(), A) : n, FV(b, A);
      });
      function WV(b) {
        var w = Z(b);
        return w.__chain__ = !0, w;
      }
      function X_e(b, w) {
        return w(b), b;
      }
      function wO(b, w) {
        return w(b);
      }
      var Y_e = su(function(b) {
        var w = b.length, A = w ? b[0] : 0, L = this.__wrapped__, G = function(X) {
          return G$(X, b);
        };
        return w > 1 || this.__actions__.length || !(L instanceof ln) || !lu(A) ? this.thru(G) : (L = L.slice(A, +A + (w ? 1 : 0)), L.__actions__.push({
          func: wO,
          args: [G],
          thisArg: n
        }), new So(L, this.__chain__).thru(function(X) {
          return w && !X.length && X.push(n), X;
        }));
      });
      function q_e() {
        return WV(this);
      }
      function K_e() {
        return new So(this.value(), this.__chain__);
      }
      function J_e() {
        this.__values__ === n && (this.__values__ = nF(this.value()));
        var b = this.__index__ >= this.__values__.length, w = b ? n : this.__values__[this.__index__++];
        return { done: b, value: w };
      }
      function e1e() {
        return this;
      }
      function t1e(b) {
        for (var w, A = this; A instanceof uO; ) {
          var L = kV(A);
          L.__index__ = 0, L.__values__ = n, w ? G.__wrapped__ = L : w = L;
          var G = L;
          A = A.__wrapped__;
        }
        return G.__wrapped__ = b, w;
      }
      function n1e() {
        var b = this.__wrapped__;
        if (b instanceof ln) {
          var w = b;
          return this.__actions__.length && (w = new ln(this)), w = w.reverse(), w.__actions__.push({
            func: wO,
            args: [bA],
            thisArg: n
          }), new So(w, this.__chain__);
        }
        return this.thru(bA);
      }
      function r1e() {
        return iV(this.__wrapped__, this.__actions__);
      }
      var i1e = gO(function(b, w, A) {
        Rn.call(b, A) ? ++b[A] : au(b, A, 1);
      });
      function a1e(b, w, A) {
        var L = Ft(b) ? mz : Xye;
        return A && Zi(b, w, A) && (w = n), L(b, wt(w, 3));
      }
      function o1e(b, w) {
        var A = Ft(b) ? lc : Fz;
        return A(b, wt(w, 3));
      }
      var s1e = vV(LV), l1e = vV(NV);
      function u1e(b, w) {
        return hi(CO(b, w), 1);
      }
      function c1e(b, w) {
        return hi(CO(b, w), Q);
      }
      function f1e(b, w, A) {
        return A = A === n ? 1 : Yt(A), hi(CO(b, w), A);
      }
      function QV(b, w) {
        var A = Ft(b) ? _o : dc;
        return A(b, wt(w, 3));
      }
      function HV(b, w) {
        var A = Ft(b) ? E0e : Vz;
        return A(b, wt(w, 3));
      }
      var d1e = gO(function(b, w, A) {
        Rn.call(b, A) ? b[A].push(w) : au(b, A, [w]);
      });
      function h1e(b, w, A, L) {
        b = ma(b) ? b : Bp(b), A = A && !L ? Yt(A) : 0;
        var G = b.length;
        return A < 0 && (A = Hr(G + A, 0)), EO(b) ? A <= G && b.indexOf(w, A) > -1 : !!G && Tp(b, w, A) > -1;
      }
      var p1e = nn(function(b, w, A) {
        var L = -1, G = typeof w == "function", X = ma(b) ? Oe(b.length) : [];
        return dc(b, function(J) {
          X[++L] = G ? Fa(w, J, A) : s0(J, w, A);
        }), X;
      }), v1e = gO(function(b, w, A) {
        au(b, A, w);
      });
      function CO(b, w) {
        var A = Ft(b) ? ar : Zz;
        return A(b, wt(w, 3));
      }
      function g1e(b, w, A, L) {
        return b == null ? [] : (Ft(w) || (w = w == null ? [] : [w]), A = L ? n : A, Ft(A) || (A = A == null ? [] : [A]), qz(b, w, A));
      }
      var m1e = gO(function(b, w, A) {
        b[A ? 0 : 1].push(w);
      }, function() {
        return [[], []];
      });
      function y1e(b, w, A) {
        var L = Ft(b) ? I$ : Oz, G = arguments.length < 3;
        return L(b, wt(w, 4), A, G, dc);
      }
      function b1e(b, w, A) {
        var L = Ft(b) ? M0e : Oz, G = arguments.length < 3;
        return L(b, wt(w, 4), A, G, Vz);
      }
      function _1e(b, w) {
        var A = Ft(b) ? lc : Fz;
        return A(b, $O(wt(w, 3)));
      }
      function O1e(b) {
        var w = Ft(b) ? Lz : hbe;
        return w(b);
      }
      function S1e(b, w, A) {
        (A ? Zi(b, w, A) : w === n) ? w = 1 : w = Yt(w);
        var L = Ft(b) ? Hye : pbe;
        return L(b, w);
      }
      function x1e(b) {
        var w = Ft(b) ? Gye : gbe;
        return w(b);
      }
      function w1e(b) {
        if (b == null)
          return 0;
        if (ma(b))
          return EO(b) ? $p(b) : b.length;
        var w = Ii(b);
        return w == we || w == Ye ? b.size : q$(b).length;
      }
      function C1e(b, w, A) {
        var L = Ft(b) ? D$ : mbe;
        return A && Zi(b, w, A) && (w = n), L(b, wt(w, 3));
      }
      var T1e = nn(function(b, w) {
        if (b == null)
          return [];
        var A = w.length;
        return A > 1 && Zi(b, w[0], w[1]) ? w = [] : A > 2 && Zi(w[0], w[1], w[2]) && (w = [w[0]]), qz(b, hi(w, 1), []);
      }), TO = oye || function() {
        return di.Date.now();
      };
      function P1e(b, w) {
        if (typeof w != "function")
          throw new Oo(o);
        return b = Yt(b), function() {
          if (--b < 1)
            return w.apply(this, arguments);
        };
      }
      function GV(b, w, A) {
        return w = A ? n : w, w = b && w == null ? b.length : w, ou(b, C, n, n, n, n, w);
      }
      function jV(b, w) {
        var A;
        if (typeof w != "function")
          throw new Oo(o);
        return b = Yt(b), function() {
          return --b > 0 && (A = w.apply(this, arguments)), b <= 1 && (w = n), A;
        };
      }
      var OA = nn(function(b, w, A) {
        var L = g;
        if (A.length) {
          var G = cc(A, Lp(OA));
          L |= S;
        }
        return ou(b, L, w, A, G);
      }), ZV = nn(function(b, w, A) {
        var L = g | m;
        if (A.length) {
          var G = cc(A, Lp(ZV));
          L |= S;
        }
        return ou(w, L, b, A, G);
      });
      function UV(b, w, A) {
        w = A ? n : w;
        var L = ou(b, _, n, n, n, n, n, w);
        return L.placeholder = UV.placeholder, L;
      }
      function XV(b, w, A) {
        w = A ? n : w;
        var L = ou(b, O, n, n, n, n, n, w);
        return L.placeholder = XV.placeholder, L;
      }
      function YV(b, w, A) {
        var L, G, X, J, ie, ge, Ee = 0, Ie = !1, Ne = !1, Ke = !0;
        if (typeof b != "function")
          throw new Oo(o);
        w = To(w) || 0, cr(A) && (Ie = !!A.leading, Ne = "maxWait" in A, X = Ne ? Hr(To(A.maxWait) || 0, w) : X, Ke = "trailing" in A ? !!A.trailing : Ke);
        function ht(wr) {
          var _s = L, fu = G;
          return L = G = n, Ee = wr, J = b.apply(fu, _s), J;
        }
        function Pt(wr) {
          return Ee = wr, ie = d0(on, w), Ie ? ht(wr) : J;
        }
        function Jt(wr) {
          var _s = wr - ge, fu = wr - Ee, vF = w - _s;
          return Ne ? Mi(vF, X - fu) : vF;
        }
        function $t(wr) {
          var _s = wr - ge, fu = wr - Ee;
          return ge === n || _s >= w || _s < 0 || Ne && fu >= X;
        }
        function on() {
          var wr = TO();
          if ($t(wr))
            return pn(wr);
          ie = d0(on, Jt(wr));
        }
        function pn(wr) {
          return ie = n, Ke && L ? ht(wr) : (L = G = n, J);
        }
        function Ga() {
          ie !== n && oV(ie), Ee = 0, L = ge = G = ie = n;
        }
        function Ui() {
          return ie === n ? J : pn(TO());
        }
        function ja() {
          var wr = TO(), _s = $t(wr);
          if (L = arguments, G = this, ge = wr, _s) {
            if (ie === n)
              return Pt(ge);
            if (Ne)
              return oV(ie), ie = d0(on, w), ht(ge);
          }
          return ie === n && (ie = d0(on, w)), J;
        }
        return ja.cancel = Ga, ja.flush = Ui, ja;
      }
      var $1e = nn(function(b, w) {
        return zz(b, 1, w);
      }), A1e = nn(function(b, w, A) {
        return zz(b, To(w) || 0, A);
      });
      function E1e(b) {
        return ou(b, $);
      }
      function PO(b, w) {
        if (typeof b != "function" || w != null && typeof w != "function")
          throw new Oo(o);
        var A = function() {
          var L = arguments, G = w ? w.apply(this, L) : L[0], X = A.cache;
          if (X.has(G))
            return X.get(G);
          var J = b.apply(this, L);
          return A.cache = X.set(G, J) || X, J;
        };
        return A.cache = new (PO.Cache || iu)(), A;
      }
      PO.Cache = iu;
      function $O(b) {
        if (typeof b != "function")
          throw new Oo(o);
        return function() {
          var w = arguments;
          switch (w.length) {
            case 0:
              return !b.call(this);
            case 1:
              return !b.call(this, w[0]);
            case 2:
              return !b.call(this, w[0], w[1]);
            case 3:
              return !b.call(this, w[0], w[1], w[2]);
          }
          return !b.apply(this, w);
        };
      }
      function M1e(b) {
        return jV(2, b);
      }
      var I1e = ybe(function(b, w) {
        w = w.length == 1 && Ft(w[0]) ? ar(w[0], Wa(wt())) : ar(hi(w, 1), Wa(wt()));
        var A = w.length;
        return nn(function(L) {
          for (var G = -1, X = Mi(L.length, A); ++G < X; )
            L[G] = w[G].call(this, L[G]);
          return Fa(b, this, L);
        });
      }), SA = nn(function(b, w) {
        var A = cc(w, Lp(SA));
        return ou(b, S, n, w, A);
      }), qV = nn(function(b, w) {
        var A = cc(w, Lp(qV));
        return ou(b, x, n, w, A);
      }), D1e = su(function(b, w) {
        return ou(b, P, n, n, n, w);
      });
      function R1e(b, w) {
        if (typeof b != "function")
          throw new Oo(o);
        return w = w === n ? w : Yt(w), nn(b, w);
      }
      function k1e(b, w) {
        if (typeof b != "function")
          throw new Oo(o);
        return w = w == null ? 0 : Hr(Yt(w), 0), nn(function(A) {
          var L = A[w], G = vc(A, 0, w);
          return L && uc(G, L), Fa(b, this, G);
        });
      }
      function L1e(b, w, A) {
        var L = !0, G = !0;
        if (typeof b != "function")
          throw new Oo(o);
        return cr(A) && (L = "leading" in A ? !!A.leading : L, G = "trailing" in A ? !!A.trailing : G), YV(b, w, {
          leading: L,
          maxWait: w,
          trailing: G
        });
      }
      function N1e(b) {
        return GV(b, 1);
      }
      function B1e(b, w) {
        return SA(oA(w), b);
      }
      function z1e() {
        if (!arguments.length)
          return [];
        var b = arguments[0];
        return Ft(b) ? b : [b];
      }
      function V1e(b) {
        return xo(b, h);
      }
      function F1e(b, w) {
        return w = typeof w == "function" ? w : n, xo(b, h, w);
      }
      function W1e(b) {
        return xo(b, f | h);
      }
      function Q1e(b, w) {
        return w = typeof w == "function" ? w : n, xo(b, f | h, w);
      }
      function H1e(b, w) {
        return w == null || Bz(b, w, ri(w));
      }
      function bs(b, w) {
        return b === w || b !== b && w !== w;
      }
      var G1e = _O(U$), j1e = _O(function(b, w) {
        return b >= w;
      }), td = Hz(/* @__PURE__ */ function() {
        return arguments;
      }()) ? Hz : function(b) {
        return gr(b) && Rn.call(b, "callee") && !Ez.call(b, "callee");
      }, Ft = Oe.isArray, Z1e = fz ? Wa(fz) : tbe;
      function ma(b) {
        return b != null && AO(b.length) && !uu(b);
      }
      function xr(b) {
        return gr(b) && ma(b);
      }
      function U1e(b) {
        return b === !0 || b === !1 || gr(b) && ji(b) == he;
      }
      var gc = lye || DA, X1e = dz ? Wa(dz) : nbe;
      function Y1e(b) {
        return gr(b) && b.nodeType === 1 && !h0(b);
      }
      function q1e(b) {
        if (b == null)
          return !0;
        if (ma(b) && (Ft(b) || typeof b == "string" || typeof b.splice == "function" || gc(b) || Np(b) || td(b)))
          return !b.length;
        var w = Ii(b);
        if (w == we || w == Ye)
          return !b.size;
        if (f0(b))
          return !q$(b).length;
        for (var A in b)
          if (Rn.call(b, A))
            return !1;
        return !0;
      }
      function K1e(b, w) {
        return l0(b, w);
      }
      function J1e(b, w, A) {
        A = typeof A == "function" ? A : n;
        var L = A ? A(b, w) : n;
        return L === n ? l0(b, w, n, A) : !!L;
      }
      function xA(b) {
        if (!gr(b))
          return !1;
        var w = ji(b);
        return w == K || w == q || typeof b.message == "string" && typeof b.name == "string" && !h0(b);
      }
      function eOe(b) {
        return typeof b == "number" && Iz(b);
      }
      function uu(b) {
        if (!cr(b))
          return !1;
        var w = ji(b);
        return w == de || w == xe || w == se || w == Pe;
      }
      function KV(b) {
        return typeof b == "number" && b == Yt(b);
      }
      function AO(b) {
        return typeof b == "number" && b > -1 && b % 1 == 0 && b <= W;
      }
      function cr(b) {
        var w = typeof b;
        return b != null && (w == "object" || w == "function");
      }
      function gr(b) {
        return b != null && typeof b == "object";
      }
      var JV = hz ? Wa(hz) : ibe;
      function tOe(b, w) {
        return b === w || Y$(b, w, hA(w));
      }
      function nOe(b, w, A) {
        return A = typeof A == "function" ? A : n, Y$(b, w, hA(w), A);
      }
      function rOe(b) {
        return eF(b) && b != +b;
      }
      function iOe(b) {
        if (Fbe(b))
          throw new Lt(a);
        return Gz(b);
      }
      function aOe(b) {
        return b === null;
      }
      function oOe(b) {
        return b == null;
      }
      function eF(b) {
        return typeof b == "number" || gr(b) && ji(b) == He;
      }
      function h0(b) {
        if (!gr(b) || ji(b) != Be)
          return !1;
        var w = nO(b);
        if (w === null)
          return !0;
        var A = Rn.call(w, "constructor") && w.constructor;
        return typeof A == "function" && A instanceof A && K1.call(A) == nye;
      }
      var wA = pz ? Wa(pz) : abe;
      function sOe(b) {
        return KV(b) && b >= -W && b <= W;
      }
      var tF = vz ? Wa(vz) : obe;
      function EO(b) {
        return typeof b == "string" || !Ft(b) && gr(b) && ji(b) == xt;
      }
      function Ha(b) {
        return typeof b == "symbol" || gr(b) && ji(b) == It;
      }
      var Np = gz ? Wa(gz) : sbe;
      function lOe(b) {
        return b === n;
      }
      function uOe(b) {
        return gr(b) && Ii(b) == Ae;
      }
      function cOe(b) {
        return gr(b) && ji(b) == gt;
      }
      var fOe = _O(K$), dOe = _O(function(b, w) {
        return b <= w;
      });
      function nF(b) {
        if (!b)
          return [];
        if (ma(b))
          return EO(b) ? ms(b) : ga(b);
        if (e0 && b[e0])
          return H0e(b[e0]());
        var w = Ii(b), A = w == we ? z$ : w == Ye ? X1 : Bp;
        return A(b);
      }
      function cu(b) {
        if (!b)
          return b === 0 ? b : 0;
        if (b = To(b), b === Q || b === -Q) {
          var w = b < 0 ? -1 : 1;
          return w * H;
        }
        return b === b ? b : 0;
      }
      function Yt(b) {
        var w = cu(b), A = w % 1;
        return w === w ? A ? w - A : w : 0;
      }
      function rF(b) {
        return b ? qf(Yt(b), 0, j) : 0;
      }
      function To(b) {
        if (typeof b == "number")
          return b;
        if (Ha(b))
          return U;
        if (cr(b)) {
          var w = typeof b.valueOf == "function" ? b.valueOf() : b;
          b = cr(w) ? w + "" : w;
        }
        if (typeof b != "string")
          return b === 0 ? b : +b;
        b = Sz(b);
        var A = O$.test(b);
        return A || x$.test(b) ? P0e(b.slice(2), A ? 2 : 8) : Q1.test(b) ? U : +b;
      }
      function iF(b) {
        return al(b, ya(b));
      }
      function hOe(b) {
        return b ? qf(Yt(b), -W, W) : b === 0 ? b : 0;
      }
      function An(b) {
        return b == null ? "" : Qa(b);
      }
      var pOe = Rp(function(b, w) {
        if (f0(w) || ma(w)) {
          al(w, ri(w), b);
          return;
        }
        for (var A in w)
          Rn.call(w, A) && a0(b, A, w[A]);
      }), aF = Rp(function(b, w) {
        al(w, ya(w), b);
      }), MO = Rp(function(b, w, A, L) {
        al(w, ya(w), b, L);
      }), vOe = Rp(function(b, w, A, L) {
        al(w, ri(w), b, L);
      }), gOe = su(G$);
      function mOe(b, w) {
        var A = Dp(b);
        return w == null ? A : Nz(A, w);
      }
      var yOe = nn(function(b, w) {
        b = Fn(b);
        var A = -1, L = w.length, G = L > 2 ? w[2] : n;
        for (G && Zi(w[0], w[1], G) && (L = 1); ++A < L; )
          for (var X = w[A], J = ya(X), ie = -1, ge = J.length; ++ie < ge; ) {
            var Ee = J[ie], Ie = b[Ee];
            (Ie === n || bs(Ie, Ep[Ee]) && !Rn.call(b, Ee)) && (b[Ee] = X[Ee]);
          }
        return b;
      }), bOe = nn(function(b) {
        return b.push(n, SV), Fa(oF, n, b);
      });
      function _Oe(b, w) {
        return yz(b, wt(w, 3), il);
      }
      function OOe(b, w) {
        return yz(b, wt(w, 3), Z$);
      }
      function SOe(b, w) {
        return b == null ? b : j$(b, wt(w, 3), ya);
      }
      function xOe(b, w) {
        return b == null ? b : Wz(b, wt(w, 3), ya);
      }
      function wOe(b, w) {
        return b && il(b, wt(w, 3));
      }
      function COe(b, w) {
        return b && Z$(b, wt(w, 3));
      }
      function TOe(b) {
        return b == null ? [] : dO(b, ri(b));
      }
      function POe(b) {
        return b == null ? [] : dO(b, ya(b));
      }
      function CA(b, w, A) {
        var L = b == null ? n : Kf(b, w);
        return L === n ? A : L;
      }
      function $Oe(b, w) {
        return b != null && CV(b, w, qye);
      }
      function TA(b, w) {
        return b != null && CV(b, w, Kye);
      }
      var AOe = mV(function(b, w, A) {
        w != null && typeof w.toString != "function" && (w = J1.call(w)), b[w] = A;
      }, $A(ba)), EOe = mV(function(b, w, A) {
        w != null && typeof w.toString != "function" && (w = J1.call(w)), Rn.call(b, w) ? b[w].push(A) : b[w] = [A];
      }, wt), MOe = nn(s0);
      function ri(b) {
        return ma(b) ? kz(b) : q$(b);
      }
      function ya(b) {
        return ma(b) ? kz(b, !0) : lbe(b);
      }
      function IOe(b, w) {
        var A = {};
        return w = wt(w, 3), il(b, function(L, G, X) {
          au(A, w(L, G, X), L);
        }), A;
      }
      function DOe(b, w) {
        var A = {};
        return w = wt(w, 3), il(b, function(L, G, X) {
          au(A, G, w(L, G, X));
        }), A;
      }
      var ROe = Rp(function(b, w, A) {
        hO(b, w, A);
      }), oF = Rp(function(b, w, A, L) {
        hO(b, w, A, L);
      }), kOe = su(function(b, w) {
        var A = {};
        if (b == null)
          return A;
        var L = !1;
        w = ar(w, function(X) {
          return X = pc(X, b), L || (L = X.length > 1), X;
        }), al(b, fA(b), A), L && (A = xo(A, f | d | h, Abe));
        for (var G = w.length; G--; )
          rA(A, w[G]);
        return A;
      });
      function LOe(b, w) {
        return sF(b, $O(wt(w)));
      }
      var NOe = su(function(b, w) {
        return b == null ? {} : cbe(b, w);
      });
      function sF(b, w) {
        if (b == null)
          return {};
        var A = ar(fA(b), function(L) {
          return [L];
        });
        return w = wt(w), Kz(b, A, function(L, G) {
          return w(L, G[0]);
        });
      }
      function BOe(b, w, A) {
        w = pc(w, b);
        var L = -1, G = w.length;
        for (G || (G = 1, b = n); ++L < G; ) {
          var X = b == null ? n : b[ol(w[L])];
          X === n && (L = G, X = A), b = uu(X) ? X.call(b) : X;
        }
        return b;
      }
      function zOe(b, w, A) {
        return b == null ? b : u0(b, w, A);
      }
      function VOe(b, w, A, L) {
        return L = typeof L == "function" ? L : n, b == null ? b : u0(b, w, A, L);
      }
      var lF = _V(ri), uF = _V(ya);
      function FOe(b, w, A) {
        var L = Ft(b), G = L || gc(b) || Np(b);
        if (w = wt(w, 4), A == null) {
          var X = b && b.constructor;
          G ? A = L ? new X() : [] : cr(b) ? A = uu(X) ? Dp(nO(b)) : {} : A = {};
        }
        return (G ? _o : il)(b, function(J, ie, ge) {
          return w(A, J, ie, ge);
        }), A;
      }
      function WOe(b, w) {
        return b == null ? !0 : rA(b, w);
      }
      function QOe(b, w, A) {
        return b == null ? b : rV(b, w, oA(A));
      }
      function HOe(b, w, A, L) {
        return L = typeof L == "function" ? L : n, b == null ? b : rV(b, w, oA(A), L);
      }
      function Bp(b) {
        return b == null ? [] : B$(b, ri(b));
      }
      function GOe(b) {
        return b == null ? [] : B$(b, ya(b));
      }
      function jOe(b, w, A) {
        return A === n && (A = w, w = n), A !== n && (A = To(A), A = A === A ? A : 0), w !== n && (w = To(w), w = w === w ? w : 0), qf(To(b), w, A);
      }
      function ZOe(b, w, A) {
        return w = cu(w), A === n ? (A = w, w = 0) : A = cu(A), b = To(b), Jye(b, w, A);
      }
      function UOe(b, w, A) {
        if (A && typeof A != "boolean" && Zi(b, w, A) && (w = A = n), A === n && (typeof w == "boolean" ? (A = w, w = n) : typeof b == "boolean" && (A = b, b = n)), b === n && w === n ? (b = 0, w = 1) : (b = cu(b), w === n ? (w = b, b = 0) : w = cu(w)), b > w) {
          var L = b;
          b = w, w = L;
        }
        if (A || b % 1 || w % 1) {
          var G = Dz();
          return Mi(b + G * (w - b + T0e("1e-" + ((G + "").length - 1))), w);
        }
        return eA(b, w);
      }
      var XOe = kp(function(b, w, A) {
        return w = w.toLowerCase(), b + (A ? cF(w) : w);
      });
      function cF(b) {
        return PA(An(b).toLowerCase());
      }
      function fF(b) {
        return b = An(b), b && b.replace(Km, z0e).replace(g0e, "");
      }
      function YOe(b, w, A) {
        b = An(b), w = Qa(w);
        var L = b.length;
        A = A === n ? L : qf(Yt(A), 0, L);
        var G = A;
        return A -= w.length, A >= 0 && b.slice(A, G) == w;
      }
      function qOe(b) {
        return b = An(b), b && WB.test(b) ? b.replace(g$, V0e) : b;
      }
      function KOe(b) {
        return b = An(b), b && m$.test(b) ? b.replace(Um, "\\$&") : b;
      }
      var JOe = kp(function(b, w, A) {
        return b + (A ? "-" : "") + w.toLowerCase();
      }), eSe = kp(function(b, w, A) {
        return b + (A ? " " : "") + w.toLowerCase();
      }), tSe = pV("toLowerCase");
      function nSe(b, w, A) {
        b = An(b), w = Yt(w);
        var L = w ? $p(b) : 0;
        if (!w || L >= w)
          return b;
        var G = (w - L) / 2;
        return bO(oO(G), A) + b + bO(aO(G), A);
      }
      function rSe(b, w, A) {
        b = An(b), w = Yt(w);
        var L = w ? $p(b) : 0;
        return w && L < w ? b + bO(w - L, A) : b;
      }
      function iSe(b, w, A) {
        b = An(b), w = Yt(w);
        var L = w ? $p(b) : 0;
        return w && L < w ? bO(w - L, A) + b : b;
      }
      function aSe(b, w, A) {
        return A || w == null ? w = 0 : w && (w = +w), dye(An(b).replace(Xm, ""), w || 0);
      }
      function oSe(b, w, A) {
        return (A ? Zi(b, w, A) : w === n) ? w = 1 : w = Yt(w), tA(An(b), w);
      }
      function sSe() {
        var b = arguments, w = An(b[0]);
        return b.length < 3 ? w : w.replace(b[1], b[2]);
      }
      var lSe = kp(function(b, w, A) {
        return b + (A ? "_" : "") + w.toLowerCase();
      });
      function uSe(b, w, A) {
        return A && typeof A != "number" && Zi(b, w, A) && (w = A = n), A = A === n ? j : A >>> 0, A ? (b = An(b), b && (typeof w == "string" || w != null && !wA(w)) && (w = Qa(w), !w && Pp(b)) ? vc(ms(b), 0, A) : b.split(w, A)) : [];
      }
      var cSe = kp(function(b, w, A) {
        return b + (A ? " " : "") + PA(w);
      });
      function fSe(b, w, A) {
        return b = An(b), A = A == null ? 0 : qf(Yt(A), 0, b.length), w = Qa(w), b.slice(A, A + w.length) == w;
      }
      function dSe(b, w, A) {
        var L = Z.templateSettings;
        A && Zi(b, w, A) && (w = n), b = An(b), w = MO({}, w, L, OV);
        var G = MO({}, w.imports, L.imports, OV), X = ri(G), J = B$(G, X), ie, ge, Ee = 0, Ie = w.interpolate || yo, Ne = "__p += '", Ke = V$(
          (w.escape || yo).source + "|" + Ie.source + "|" + (Ie === Sp ? W1 : yo).source + "|" + (w.evaluate || yo).source + "|$",
          "g"
        ), ht = "//# sourceURL=" + (Rn.call(w, "sourceURL") ? (w.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++O0e + "]") + `
`;
        b.replace(Ke, function($t, on, pn, Ga, Ui, ja) {
          return pn || (pn = Ga), Ne += b.slice(Ee, ja).replace(G1, F0e), on && (ie = !0, Ne += `' +
__e(` + on + `) +
'`), Ui && (ge = !0, Ne += `';
` + Ui + `;
__p += '`), pn && (Ne += `' +
((__t = (` + pn + `)) == null ? '' : __t) +
'`), Ee = ja + $t.length, $t;
        }), Ne += `';
`;
        var Pt = Rn.call(w, "variable") && w.variable;
        if (!Pt)
          Ne = `with (obj) {
` + Ne + `
}
`;
        else if (Ym.test(Pt))
          throw new Lt(s);
        Ne = (ge ? Ne.replace(Gf, "") : Ne).replace(Gm, "$1").replace(sc, "$1;"), Ne = "function(" + (Pt || "obj") + `) {
` + (Pt ? "" : `obj || (obj = {});
`) + "var __t, __p = ''" + (ie ? ", __e = _.escape" : "") + (ge ? `, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
` : `;
`) + Ne + `return __p
}`;
        var Jt = hF(function() {
          return Tn(X, ht + "return " + Ne).apply(n, J);
        });
        if (Jt.source = Ne, xA(Jt))
          throw Jt;
        return Jt;
      }
      function hSe(b) {
        return An(b).toLowerCase();
      }
      function pSe(b) {
        return An(b).toUpperCase();
      }
      function vSe(b, w, A) {
        if (b = An(b), b && (A || w === n))
          return Sz(b);
        if (!b || !(w = Qa(w)))
          return b;
        var L = ms(b), G = ms(w), X = xz(L, G), J = wz(L, G) + 1;
        return vc(L, X, J).join("");
      }
      function gSe(b, w, A) {
        if (b = An(b), b && (A || w === n))
          return b.slice(0, Tz(b) + 1);
        if (!b || !(w = Qa(w)))
          return b;
        var L = ms(b), G = wz(L, ms(w)) + 1;
        return vc(L, 0, G).join("");
      }
      function mSe(b, w, A) {
        if (b = An(b), b && (A || w === n))
          return b.replace(Xm, "");
        if (!b || !(w = Qa(w)))
          return b;
        var L = ms(b), G = xz(L, ms(w));
        return vc(L, G).join("");
      }
      function ySe(b, w) {
        var A = T, L = E;
        if (cr(w)) {
          var G = "separator" in w ? w.separator : G;
          A = "length" in w ? Yt(w.length) : A, L = "omission" in w ? Qa(w.omission) : L;
        }
        b = An(b);
        var X = b.length;
        if (Pp(b)) {
          var J = ms(b);
          X = J.length;
        }
        if (A >= X)
          return b;
        var ie = A - $p(L);
        if (ie < 1)
          return L;
        var ge = J ? vc(J, 0, ie).join("") : b.slice(0, ie);
        if (G === n)
          return ge + L;
        if (J && (ie += ge.length - ie), wA(G)) {
          if (b.slice(ie).search(G)) {
            var Ee, Ie = ge;
            for (G.global || (G = V$(G.source, An(qm.exec(G)) + "g")), G.lastIndex = 0; Ee = G.exec(Ie); )
              var Ne = Ee.index;
            ge = ge.slice(0, Ne === n ? ie : Ne);
          }
        } else if (b.indexOf(Qa(G), ie) != ie) {
          var Ke = ge.lastIndexOf(G);
          Ke > -1 && (ge = ge.slice(0, Ke));
        }
        return ge + L;
      }
      function bSe(b) {
        return b = An(b), b && FB.test(b) ? b.replace(jm, U0e) : b;
      }
      var _Se = kp(function(b, w, A) {
        return b + (A ? " " : "") + w.toUpperCase();
      }), PA = pV("toUpperCase");
      function dF(b, w, A) {
        return b = An(b), w = A ? n : w, w === n ? Q0e(b) ? q0e(b) : R0e(b) : b.match(w) || [];
      }
      var hF = nn(function(b, w) {
        try {
          return Fa(b, n, w);
        } catch (A) {
          return xA(A) ? A : new Lt(A);
        }
      }), OSe = su(function(b, w) {
        return _o(w, function(A) {
          A = ol(A), au(b, A, OA(b[A], b));
        }), b;
      });
      function SSe(b) {
        var w = b == null ? 0 : b.length, A = wt();
        return b = w ? ar(b, function(L) {
          if (typeof L[1] != "function")
            throw new Oo(o);
          return [A(L[0]), L[1]];
        }) : [], nn(function(L) {
          for (var G = -1; ++G < w; ) {
            var X = b[G];
            if (Fa(X[0], this, L))
              return Fa(X[1], this, L);
          }
        });
      }
      function xSe(b) {
        return Uye(xo(b, f));
      }
      function $A(b) {
        return function() {
          return b;
        };
      }
      function wSe(b, w) {
        return b == null || b !== b ? w : b;
      }
      var CSe = gV(), TSe = gV(!0);
      function ba(b) {
        return b;
      }
      function AA(b) {
        return jz(typeof b == "function" ? b : xo(b, f));
      }
      function PSe(b) {
        return Uz(xo(b, f));
      }
      function $Se(b, w) {
        return Xz(b, xo(w, f));
      }
      var ASe = nn(function(b, w) {
        return function(A) {
          return s0(A, b, w);
        };
      }), ESe = nn(function(b, w) {
        return function(A) {
          return s0(b, A, w);
        };
      });
      function EA(b, w, A) {
        var L = ri(w), G = dO(w, L);
        A == null && !(cr(w) && (G.length || !L.length)) && (A = w, w = b, b = this, G = dO(w, ri(w)));
        var X = !(cr(A) && "chain" in A) || !!A.chain, J = uu(b);
        return _o(G, function(ie) {
          var ge = w[ie];
          b[ie] = ge, J && (b.prototype[ie] = function() {
            var Ee = this.__chain__;
            if (X || Ee) {
              var Ie = b(this.__wrapped__), Ne = Ie.__actions__ = ga(this.__actions__);
              return Ne.push({ func: ge, args: arguments, thisArg: b }), Ie.__chain__ = Ee, Ie;
            }
            return ge.apply(b, uc([this.value()], arguments));
          });
        }), b;
      }
      function MSe() {
        return di._ === this && (di._ = rye), this;
      }
      function MA() {
      }
      function ISe(b) {
        return b = Yt(b), nn(function(w) {
          return Yz(w, b);
        });
      }
      var DSe = lA(ar), RSe = lA(mz), kSe = lA(D$);
      function pF(b) {
        return vA(b) ? R$(ol(b)) : fbe(b);
      }
      function LSe(b) {
        return function(w) {
          return b == null ? n : Kf(b, w);
        };
      }
      var NSe = yV(), BSe = yV(!0);
      function IA() {
        return [];
      }
      function DA() {
        return !1;
      }
      function zSe() {
        return {};
      }
      function VSe() {
        return "";
      }
      function FSe() {
        return !0;
      }
      function WSe(b, w) {
        if (b = Yt(b), b < 1 || b > W)
          return [];
        var A = j, L = Mi(b, j);
        w = wt(w), b -= j;
        for (var G = N$(L, w); ++A < b; )
          w(A);
        return G;
      }
      function QSe(b) {
        return Ft(b) ? ar(b, ol) : Ha(b) ? [b] : ga(RV(An(b)));
      }
      function HSe(b) {
        var w = ++tye;
        return An(b) + w;
      }
      var GSe = yO(function(b, w) {
        return b + w;
      }, 0), jSe = uA("ceil"), ZSe = yO(function(b, w) {
        return b / w;
      }, 1), USe = uA("floor");
      function XSe(b) {
        return b && b.length ? fO(b, ba, U$) : n;
      }
      function YSe(b, w) {
        return b && b.length ? fO(b, wt(w, 2), U$) : n;
      }
      function qSe(b) {
        return _z(b, ba);
      }
      function KSe(b, w) {
        return _z(b, wt(w, 2));
      }
      function JSe(b) {
        return b && b.length ? fO(b, ba, K$) : n;
      }
      function exe(b, w) {
        return b && b.length ? fO(b, wt(w, 2), K$) : n;
      }
      var txe = yO(function(b, w) {
        return b * w;
      }, 1), nxe = uA("round"), rxe = yO(function(b, w) {
        return b - w;
      }, 0);
      function ixe(b) {
        return b && b.length ? L$(b, ba) : 0;
      }
      function axe(b, w) {
        return b && b.length ? L$(b, wt(w, 2)) : 0;
      }
      return Z.after = P1e, Z.ary = GV, Z.assign = pOe, Z.assignIn = aF, Z.assignInWith = MO, Z.assignWith = vOe, Z.at = gOe, Z.before = jV, Z.bind = OA, Z.bindAll = OSe, Z.bindKey = ZV, Z.castArray = z1e, Z.chain = WV, Z.chunk = Ube, Z.compact = Xbe, Z.concat = Ybe, Z.cond = SSe, Z.conforms = xSe, Z.constant = $A, Z.countBy = i1e, Z.create = mOe, Z.curry = UV, Z.curryRight = XV, Z.debounce = YV, Z.defaults = yOe, Z.defaultsDeep = bOe, Z.defer = $1e, Z.delay = A1e, Z.difference = qbe, Z.differenceBy = Kbe, Z.differenceWith = Jbe, Z.drop = e_e, Z.dropRight = t_e, Z.dropRightWhile = n_e, Z.dropWhile = r_e, Z.fill = i_e, Z.filter = o1e, Z.flatMap = u1e, Z.flatMapDeep = c1e, Z.flatMapDepth = f1e, Z.flatten = BV, Z.flattenDeep = a_e, Z.flattenDepth = o_e, Z.flip = E1e, Z.flow = CSe, Z.flowRight = TSe, Z.fromPairs = s_e, Z.functions = TOe, Z.functionsIn = POe, Z.groupBy = d1e, Z.initial = u_e, Z.intersection = c_e, Z.intersectionBy = f_e, Z.intersectionWith = d_e, Z.invert = AOe, Z.invertBy = EOe, Z.invokeMap = p1e, Z.iteratee = AA, Z.keyBy = v1e, Z.keys = ri, Z.keysIn = ya, Z.map = CO, Z.mapKeys = IOe, Z.mapValues = DOe, Z.matches = PSe, Z.matchesProperty = $Se, Z.memoize = PO, Z.merge = ROe, Z.mergeWith = oF, Z.method = ASe, Z.methodOf = ESe, Z.mixin = EA, Z.negate = $O, Z.nthArg = ISe, Z.omit = kOe, Z.omitBy = LOe, Z.once = M1e, Z.orderBy = g1e, Z.over = DSe, Z.overArgs = I1e, Z.overEvery = RSe, Z.overSome = kSe, Z.partial = SA, Z.partialRight = qV, Z.partition = m1e, Z.pick = NOe, Z.pickBy = sF, Z.property = pF, Z.propertyOf = LSe, Z.pull = g_e, Z.pullAll = VV, Z.pullAllBy = m_e, Z.pullAllWith = y_e, Z.pullAt = b_e, Z.range = NSe, Z.rangeRight = BSe, Z.rearg = D1e, Z.reject = _1e, Z.remove = __e, Z.rest = R1e, Z.reverse = bA, Z.sampleSize = S1e, Z.set = zOe, Z.setWith = VOe, Z.shuffle = x1e, Z.slice = O_e, Z.sortBy = T1e, Z.sortedUniq = $_e, Z.sortedUniqBy = A_e, Z.split = uSe, Z.spread = k1e, Z.tail = E_e, Z.take = M_e, Z.takeRight = I_e, Z.takeRightWhile = D_e, Z.takeWhile = R_e, Z.tap = X_e, Z.throttle = L1e, Z.thru = wO, Z.toArray = nF, Z.toPairs = lF, Z.toPairsIn = uF, Z.toPath = QSe, Z.toPlainObject = iF, Z.transform = FOe, Z.unary = N1e, Z.union = k_e, Z.unionBy = L_e, Z.unionWith = N_e, Z.uniq = B_e, Z.uniqBy = z_e, Z.uniqWith = V_e, Z.unset = WOe, Z.unzip = _A, Z.unzipWith = FV, Z.update = QOe, Z.updateWith = HOe, Z.values = Bp, Z.valuesIn = GOe, Z.without = F_e, Z.words = dF, Z.wrap = B1e, Z.xor = W_e, Z.xorBy = Q_e, Z.xorWith = H_e, Z.zip = G_e, Z.zipObject = j_e, Z.zipObjectDeep = Z_e, Z.zipWith = U_e, Z.entries = lF, Z.entriesIn = uF, Z.extend = aF, Z.extendWith = MO, EA(Z, Z), Z.add = GSe, Z.attempt = hF, Z.camelCase = XOe, Z.capitalize = cF, Z.ceil = jSe, Z.clamp = jOe, Z.clone = V1e, Z.cloneDeep = W1e, Z.cloneDeepWith = Q1e, Z.cloneWith = F1e, Z.conformsTo = H1e, Z.deburr = fF, Z.defaultTo = wSe, Z.divide = ZSe, Z.endsWith = YOe, Z.eq = bs, Z.escape = qOe, Z.escapeRegExp = KOe, Z.every = a1e, Z.find = s1e, Z.findIndex = LV, Z.findKey = _Oe, Z.findLast = l1e, Z.findLastIndex = NV, Z.findLastKey = OOe, Z.floor = USe, Z.forEach = QV, Z.forEachRight = HV, Z.forIn = SOe, Z.forInRight = xOe, Z.forOwn = wOe, Z.forOwnRight = COe, Z.get = CA, Z.gt = G1e, Z.gte = j1e, Z.has = $Oe, Z.hasIn = TA, Z.head = zV, Z.identity = ba, Z.includes = h1e, Z.indexOf = l_e, Z.inRange = ZOe, Z.invoke = MOe, Z.isArguments = td, Z.isArray = Ft, Z.isArrayBuffer = Z1e, Z.isArrayLike = ma, Z.isArrayLikeObject = xr, Z.isBoolean = U1e, Z.isBuffer = gc, Z.isDate = X1e, Z.isElement = Y1e, Z.isEmpty = q1e, Z.isEqual = K1e, Z.isEqualWith = J1e, Z.isError = xA, Z.isFinite = eOe, Z.isFunction = uu, Z.isInteger = KV, Z.isLength = AO, Z.isMap = JV, Z.isMatch = tOe, Z.isMatchWith = nOe, Z.isNaN = rOe, Z.isNative = iOe, Z.isNil = oOe, Z.isNull = aOe, Z.isNumber = eF, Z.isObject = cr, Z.isObjectLike = gr, Z.isPlainObject = h0, Z.isRegExp = wA, Z.isSafeInteger = sOe, Z.isSet = tF, Z.isString = EO, Z.isSymbol = Ha, Z.isTypedArray = Np, Z.isUndefined = lOe, Z.isWeakMap = uOe, Z.isWeakSet = cOe, Z.join = h_e, Z.kebabCase = JOe, Z.last = Co, Z.lastIndexOf = p_e, Z.lowerCase = eSe, Z.lowerFirst = tSe, Z.lt = fOe, Z.lte = dOe, Z.max = XSe, Z.maxBy = YSe, Z.mean = qSe, Z.meanBy = KSe, Z.min = JSe, Z.minBy = exe, Z.stubArray = IA, Z.stubFalse = DA, Z.stubObject = zSe, Z.stubString = VSe, Z.stubTrue = FSe, Z.multiply = txe, Z.nth = v_e, Z.noConflict = MSe, Z.noop = MA, Z.now = TO, Z.pad = nSe, Z.padEnd = rSe, Z.padStart = iSe, Z.parseInt = aSe, Z.random = UOe, Z.reduce = y1e, Z.reduceRight = b1e, Z.repeat = oSe, Z.replace = sSe, Z.result = BOe, Z.round = nxe, Z.runInContext = pe, Z.sample = O1e, Z.size = w1e, Z.snakeCase = lSe, Z.some = C1e, Z.sortedIndex = S_e, Z.sortedIndexBy = x_e, Z.sortedIndexOf = w_e, Z.sortedLastIndex = C_e, Z.sortedLastIndexBy = T_e, Z.sortedLastIndexOf = P_e, Z.startCase = cSe, Z.startsWith = fSe, Z.subtract = rxe, Z.sum = ixe, Z.sumBy = axe, Z.template = dSe, Z.times = WSe, Z.toFinite = cu, Z.toInteger = Yt, Z.toLength = rF, Z.toLower = hSe, Z.toNumber = To, Z.toSafeInteger = hOe, Z.toString = An, Z.toUpper = pSe, Z.trim = vSe, Z.trimEnd = gSe, Z.trimStart = mSe, Z.truncate = ySe, Z.unescape = bSe, Z.uniqueId = HSe, Z.upperCase = _Se, Z.upperFirst = PA, Z.each = QV, Z.eachRight = HV, Z.first = zV, EA(Z, function() {
        var b = {};
        return il(Z, function(w, A) {
          Rn.call(Z.prototype, A) || (b[A] = w);
        }), b;
      }(), { chain: !1 }), Z.VERSION = r, _o(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(b) {
        Z[b].placeholder = Z;
      }), _o(["drop", "take"], function(b, w) {
        ln.prototype[b] = function(A) {
          A = A === n ? 1 : Hr(Yt(A), 0);
          var L = this.__filtered__ && !w ? new ln(this) : this.clone();
          return L.__filtered__ ? L.__takeCount__ = Mi(A, L.__takeCount__) : L.__views__.push({
            size: Mi(A, j),
            type: b + (L.__dir__ < 0 ? "Right" : "")
          }), L;
        }, ln.prototype[b + "Right"] = function(A) {
          return this.reverse()[b](A).reverse();
        };
      }), _o(["filter", "map", "takeWhile"], function(b, w) {
        var A = w + 1, L = A == N || A == B;
        ln.prototype[b] = function(G) {
          var X = this.clone();
          return X.__iteratees__.push({
            iteratee: wt(G, 3),
            type: A
          }), X.__filtered__ = X.__filtered__ || L, X;
        };
      }), _o(["head", "last"], function(b, w) {
        var A = "take" + (w ? "Right" : "");
        ln.prototype[b] = function() {
          return this[A](1).value()[0];
        };
      }), _o(["initial", "tail"], function(b, w) {
        var A = "drop" + (w ? "" : "Right");
        ln.prototype[b] = function() {
          return this.__filtered__ ? new ln(this) : this[A](1);
        };
      }), ln.prototype.compact = function() {
        return this.filter(ba);
      }, ln.prototype.find = function(b) {
        return this.filter(b).head();
      }, ln.prototype.findLast = function(b) {
        return this.reverse().find(b);
      }, ln.prototype.invokeMap = nn(function(b, w) {
        return typeof b == "function" ? new ln(this) : this.map(function(A) {
          return s0(A, b, w);
        });
      }), ln.prototype.reject = function(b) {
        return this.filter($O(wt(b)));
      }, ln.prototype.slice = function(b, w) {
        b = Yt(b);
        var A = this;
        return A.__filtered__ && (b > 0 || w < 0) ? new ln(A) : (b < 0 ? A = A.takeRight(-b) : b && (A = A.drop(b)), w !== n && (w = Yt(w), A = w < 0 ? A.dropRight(-w) : A.take(w - b)), A);
      }, ln.prototype.takeRightWhile = function(b) {
        return this.reverse().takeWhile(b).reverse();
      }, ln.prototype.toArray = function() {
        return this.take(j);
      }, il(ln.prototype, function(b, w) {
        var A = /^(?:filter|find|map|reject)|While$/.test(w), L = /^(?:head|last)$/.test(w), G = Z[L ? "take" + (w == "last" ? "Right" : "") : w], X = L || /^find/.test(w);
        G && (Z.prototype[w] = function() {
          var J = this.__wrapped__, ie = L ? [1] : arguments, ge = J instanceof ln, Ee = ie[0], Ie = ge || Ft(J), Ne = function(on) {
            var pn = G.apply(Z, uc([on], ie));
            return L && Ke ? pn[0] : pn;
          };
          Ie && A && typeof Ee == "function" && Ee.length != 1 && (ge = Ie = !1);
          var Ke = this.__chain__, ht = !!this.__actions__.length, Pt = X && !Ke, Jt = ge && !ht;
          if (!X && Ie) {
            J = Jt ? J : new ln(this);
            var $t = b.apply(J, ie);
            return $t.__actions__.push({ func: wO, args: [Ne], thisArg: n }), new So($t, Ke);
          }
          return Pt && Jt ? b.apply(this, ie) : ($t = this.thru(Ne), Pt ? L ? $t.value()[0] : $t.value() : $t);
        });
      }), _o(["pop", "push", "shift", "sort", "splice", "unshift"], function(b) {
        var w = Y1[b], A = /^(?:push|sort|unshift)$/.test(b) ? "tap" : "thru", L = /^(?:pop|shift)$/.test(b);
        Z.prototype[b] = function() {
          var G = arguments;
          if (L && !this.__chain__) {
            var X = this.value();
            return w.apply(Ft(X) ? X : [], G);
          }
          return this[A](function(J) {
            return w.apply(Ft(J) ? J : [], G);
          });
        };
      }), il(ln.prototype, function(b, w) {
        var A = Z[w];
        if (A) {
          var L = A.name + "";
          Rn.call(Ip, L) || (Ip[L] = []), Ip[L].push({ name: w, func: A });
        }
      }), Ip[mO(n, m).name] = [{
        name: "wrapper",
        func: n
      }], ln.prototype.clone = bye, ln.prototype.reverse = _ye, ln.prototype.value = Oye, Z.prototype.at = Y_e, Z.prototype.chain = q_e, Z.prototype.commit = K_e, Z.prototype.next = J_e, Z.prototype.plant = t1e, Z.prototype.reverse = n1e, Z.prototype.toJSON = Z.prototype.valueOf = Z.prototype.value = r1e, Z.prototype.first = Z.prototype.head, e0 && (Z.prototype[e0] = e1e), Z;
    }, Ap = K0e();
    Zf ? ((Zf.exports = Ap)._ = Ap, A$._ = Ap) : di._ = Ap;
  }).call(Su);
})(yC, yC.exports);
var h9 = yC.exports;
const OHe = ae({
  name: "DContainer",
  props: {
    style: Object,
    props: Object
  },
  setup(t) {
    const e = V(() => {
      var i, a, o, s, l, u;
      return {
        width: ((i = t.props) == null ? void 0 : i.width) + "px",
        height: ((a = t.props) == null ? void 0 : a.height) + "px",
        transform: `rotateX(${((o = t.props) == null ? void 0 : o.rotateX) || 0}deg) rotateY(${((s = t.props) == null ? void 0 : s.rotateY) || 0}deg) rotateZ(${((l = t.props) == null ? void 0 : l.rotateZ) || 0}deg)`,
        opacity: ((u = t.props) == null ? void 0 : u.opacity) / 100,
        ...JR(
          h9.pick(t.style, [
            "boxShadow",
            "webkitBoxReflect"
          ])
        )
      };
    }), n = V(() => {
      var i, a, o, s;
      return {
        paddingLeft: ((i = t.props) == null ? void 0 : i.paddingLeft) + "px",
        paddingRight: ((a = t.props) == null ? void 0 : a.paddingRight) + "px",
        paddingTop: ((o = t.props) == null ? void 0 : o.paddingTop) + "px",
        paddingBottom: ((s = t.props) == null ? void 0 : s.paddingBottom) + "px",
        overflow: "hidden"
      };
    }), r = V(() => {
      var o, s;
      const { style: i = {} } = t, a = JR(
        h9.pick(i, [
          "background",
          "backdropFilter",
          "borderRadius",
          "borderStyle",
          "borderColor",
          "borderWidth"
        ])
      );
      return {
        position: "absolute",
        boxSizing: "border-box",
        left: 0,
        top: 0,
        opacity: i.opacity / 100,
        width: ((o = t.props) == null ? void 0 : o.width) + "px",
        height: ((s = t.props) == null ? void 0 : s.height) + "px",
        ...a
      };
    });
    return {
      getContentStyle: n,
      getBackgroundStyle: r,
      getContainetStyle: e
    };
  }
}), ui = (t, e) => {
  const n = t.__vccOpts || t;
  for (const [r, i] of e)
    n[r] = i;
  return n;
};
function SHe(t, e, n, r, i, a) {
  return be(), Ue("div", Xn({
    class: "component-contaier",
    style: t.getContainetStyle
  }, t.$attrs), [
    tt("div", {
      class: "component-background",
      style: dr(t.getBackgroundStyle)
    }, null, 4),
    tt("div", {
      class: "component-content",
      style: dr(t.getContentStyle)
    }, [
      dn(t.$slots, "default", {}, void 0, !0)
    ], 4)
  ], 16);
}
const jv = /* @__PURE__ */ ui(OHe, [["render", SHe], ["__scopeId", "data-v-54953270"]]);
jv.install = (t) => (t.component(jv.name, jv), t);
const xHe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Container: jv,
  default: jv
}, Symbol.toStringTag, { value: "Module" })), d5 = {
  text: {
    type: String,
    required: !0
  },
  width: {
    type: Number
  },
  height: {
    type: Number
  },
  fontSize: {
    type: Number
  },
  fontWeight: {
    type: [Number, String]
  },
  color: {
    type: String
  },
  backgroundColor: {
    type: String
  },
  textAlign: {
    type: String
  },
  direction: {
    type: String
  }
}, wHe = {
  container: {
    style: {
      background: {
        type: "none"
      }
    },
    props: {
      width: 300,
      height: 80
    }
  },
  props: {
    text: "标题内容",
    fontSize: 24,
    color: "#fff",
    fontWeight: "bold",
    textAlign: "left",
    direction: "horizontal"
  }
}, CHe = ae({
  name: "DTitle",
  props: d5,
  setup(t) {
    return {
      style: V(() => {
        const n = JR(t), r = {};
        return n.color.length > 9 && (r.backgroundImage = n.color, r.webkitBackgroundClip = "text", r.webkitTextFillColor = "transparent"), {
          ...r,
          ...n,
          width: "100%",
          height: "100%",
          lineHeight: t.height + "px"
        };
      })
    };
  }
});
function THe(t, e, n, r, i, a) {
  return be(), Ue("div", {
    class: "cus-title",
    style: dr(t.style)
  }, xi(t.text), 5);
}
const Zv = /* @__PURE__ */ ui(CHe, [["render", THe]]), Woe = (t) => (JT("data-v-70598cf2"), t = t(), e2(), t), PHe = {
  key: 0,
  class: "color-box"
}, $He = { class: "img-preview" }, AHe = /* @__PURE__ */ Woe(() => /* @__PURE__ */ tt("div", { class: "img-empty" }, "未选择", -1)), EHe = /* @__PURE__ */ Woe(() => /* @__PURE__ */ tt("div", { class: "img-tip" }, "选择素材", -1)), MHe = /* @__PURE__ */ ae({
  __name: "BackgroundSelect",
  props: {
    value: { default: () => ({
      type: "none",
      color: "",
      image: "",
      fillType: ""
    }) },
    filterOptions: {}
  },
  emits: ["update:value"],
  setup(t, { emit: e }) {
    const n = t, r = e, i = ee(n.value), a = [
      { label: "无", value: "none" },
      { label: "颜色", value: "color" },
      { label: "图片", value: "image" }
    ], o = V(() => n.filterOptions ? a.filter((l) => {
      var u;
      return !((u = n.filterOptions) != null && u.includes(l.value));
    }) : a);
    me(
      () => i.value,
      () => {
        r("update:value", i.value);
      },
      {
        deep: !0
      }
    );
    const s = (l) => {
      l === "color" && !i.value.color && (i.value.color = "#0B074BFF");
    };
    return (l, u) => (be(), Ue(Wt, null, [
      D(z(Ca), {
        value: i.value.type,
        "onUpdate:value": u[0] || (u[0] = (c) => i.value.type = c),
        style: { width: "100%" },
        options: o.value,
        onChange: s
      }, null, 8, ["value", "options"]),
      i.value.type === "color" ? (be(), Ue("div", PHe, [
        D(z(Fv), {
          modelValue: i.value.color,
          "onUpdate:modelValue": u[1] || (u[1] = (c) => i.value.color = c),
          "color-format": "hex",
          "show-alpha": "",
          size: "small"
        }, null, 8, ["modelValue"]),
        D(z(p2), {
          modelValue: i.value.color,
          "onUpdate:modelValue": u[2] || (u[2] = (c) => i.value.color = c),
          size: "small"
        }, null, 8, ["modelValue"])
      ])) : i.value.type === "image" ? (be(), Ue(Wt, { key: 1 }, [
        tt("div", $He, [
          AHe,
          D(z(Lc), {
            src: i.value.image
          }, null, 8, ["src"]),
          EHe
        ]),
        D(z(yne), {
          modelValue: i.value.fillType,
          "onUpdate:modelValue": u[3] || (u[3] = (c) => i.value.fillType = c)
        }, {
          default: ke(() => [
            D(z(By), { value: "cover" }, {
              default: ke(() => [
                Pn("填充")
              ]),
              _: 1
            }),
            D(z(By), { value: "contain" }, {
              default: ke(() => [
                Pn("适应")
              ]),
              _: 1
            }),
            D(z(By), { value: "stretch" }, {
              default: ke(() => [
                Pn("拉伸")
              ]),
              _: 1
            })
          ]),
          _: 1
        }, 8, ["modelValue"])
      ], 64)) : Ot("", !0)
    ], 64));
  }
}), IHe = /* @__PURE__ */ ui(MHe, [["__scopeId", "data-v-70598cf2"]]), DHe = /* @__PURE__ */ ae({
  __name: "ColorSelect",
  props: {
    value: {},
    gradient: { type: Boolean, default: !0 }
  },
  emits: ["update:value"],
  setup(t, { emit: e }) {
    var s, l;
    const n = e, r = t, i = ee(((s = r.value) == null ? void 0 : s.length) <= 9 || !r.value ? "pure" : "gradient"), a = ee(r.value), o = ee(((l = r.value) == null ? void 0 : l.length) >= 9 ? r.value.slice(22).replace(")", "").split(",") : ["#4ba9ff", "#fff"]);
    return me(
      () => [i.value, a.value, o.value],
      () => {
        i.value === "pure" ? a.value = a.value.length > 9 ? "#FFFFFFFF" : a.value : a.value = `linear-gradient(90deg, ${o.value.join(",")})`, n("update:value", a.value);
      },
      {
        deep: !0
      }
    ), me(
      () => r.gradient,
      (u) => {
        u || (i.value = "pure", a.value = a.value.length > 9 ? "#FFFFFFFF" : a.value);
      }
    ), (u, c) => (be(), Ue(Wt, null, [
      u.gradient ? (be(), Je(z(yne), {
        key: 0,
        modelValue: i.value,
        "onUpdate:modelValue": c[0] || (c[0] = (f) => i.value = f),
        size: "small",
        style: { width: "100%" }
      }, {
        default: ke(() => [
          D(z(By), { value: "pure" }, {
            default: ke(() => [
              Pn("单色")
            ]),
            _: 1
          }),
          D(z(By), { value: "gradient" }, {
            default: ke(() => [
              Pn("渐变色")
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["modelValue"])) : Ot("", !0),
      i.value === "pure" ? (be(), Ue("div", {
        key: 1,
        class: "color-box",
        style: dr({ marginTop: u.gradient ? "12px" : "0" })
      }, [
        D(z(Fv), {
          modelValue: a.value,
          "onUpdate:modelValue": c[1] || (c[1] = (f) => a.value = f),
          "color-format": "hex",
          "show-alpha": "",
          size: "small"
        }, null, 8, ["modelValue"]),
        D(z(p2), {
          modelValue: a.value,
          "onUpdate:modelValue": c[2] || (c[2] = (f) => a.value = f),
          size: "small"
        }, null, 8, ["modelValue"])
      ], 4)) : i.value === "gradient" ? (be(), Ue("div", {
        key: 2,
        class: "gradient-box",
        style: dr({ background: a.value })
      }, [
        D(z(Fv), {
          modelValue: o.value[0],
          "onUpdate:modelValue": c[3] || (c[3] = (f) => o.value[0] = f),
          "color-format": "hex",
          "show-alpha": "",
          size: "small"
        }, null, 8, ["modelValue"]),
        D(z(Fv), {
          modelValue: o.value[1],
          "onUpdate:modelValue": c[4] || (c[4] = (f) => o.value[1] = f),
          "color-format": "hex",
          "show-alpha": "",
          size: "small"
        }, null, 8, ["modelValue"])
      ], 4)) : Ot("", !0)
    ], 64));
  }
}), RHe = /* @__PURE__ */ ui(DHe, [["__scopeId", "data-v-d5768739"]]), bC = [
  {
    name: "清新",
    color: ["#00a8e1", "#99cc00", "#e30039", "#fcd300", "#800080"]
  },
  {
    name: "复古",
    color: ["#FFA69E", "#FAE3D9", "#B8F2E6", "#56E39F", "#3A837D"]
  },
  {
    name: "商务",
    color: ["#194f97", "#555555", "#bd6b08", "#00686b", "#c82d31"]
  },
  {
    name: "经典",
    color: ["#002c53", "#ffa510", "#0c84c6", "#ffffff", "#f74d4d"]
  },
  {
    name: "怀旧",
    color: ["#3b6291", "#943c39", "#779043", "#624c7c", "#388498"]
  }
], kHe = {
  // 调色盘-预设颜色
  color: bC[0].color,
  // 标题
  title: {
    show: !0,
    left: "center",
    top: 8,
    textStyle: {
      color: "#FFFFFFFF",
      fontSize: 16,
      fontWeight: "normal"
    }
  },
  // 图例
  legend: {
    show: !0,
    textStyle: {
      color: "#FFFFFFFF"
    },
    top: 32,
    bottom: "auto",
    left: "center",
    right: "auto"
  },
  // 布局
  grid: {
    bottom: 34,
    right: 20,
    left: 20,
    top: 60
  },
  // x轴
  xAxis: {
    type: "category",
    name: "",
    nameLocation: "middle",
    nameTruncate: {
      ellipsis: "...",
      maxWidth: 80
    },
    nameTextStyle: {
      color: "#FFFFFFFF",
      fontSize: 12,
      fontWeight: "normal",
      fontStyle: "normal"
    },
    axisLabel: {
      show: !0,
      color: "#9fadbf",
      fontSize: 12,
      fontWeight: "normal",
      fontStyle: "normal"
    },
    axisLine: {
      show: !0,
      lineStyle: {
        width: 1
      }
    },
    axisTick: {
      show: !0,
      lineStyle: {
        width: 1,
        color: "#ccc"
      }
    }
  },
  // y轴
  yAxis: {
    splitLine: {
      show: !0,
      lineStyle: {
        type: "dashed",
        color: "#36485f"
      }
    },
    type: "value",
    name: "",
    nameLocation: "middle",
    nameTruncate: {
      ellipsis: "...",
      maxWidth: 80
    },
    nameTextStyle: {
      color: "#FFFFFFFF",
      fontSize: 12,
      fontWeight: "normal",
      fontStyle: "normal"
    },
    axisLabel: {
      show: !0,
      color: "#9fadbf",
      fontSize: 12,
      fontWeight: "normal",
      fontStyle: "normal",
      rotate: 0
    },
    axisLine: {
      show: !1,
      lineStyle: {
        width: 1,
        color: "#ccc"
      }
    },
    axisTick: {
      show: !1,
      lineStyle: {
        width: 1,
        color: "#ccc"
      }
    }
  },
  // 提示
  tooltip: {
    show: !0,
    trigger: "axis",
    formatter: "{b} {c}",
    // valueFormatter: "(value, dataIndex) => value",
    axisPointer: {
      type: "line"
    },
    textStyle: {
      color: "#000000FF",
      fontSize: 12,
      fontWeight: "normal",
      fontStyle: "normal"
    },
    padding: 10,
    borderWidth: 1,
    borderColor: "#ccc",
    borderRadius: 4,
    backgroundColor: "#FFFFFFFF",
    extraCssText: ""
  }
}, LHe = { class: "color-list" }, NHe = { class: "del-btn" }, BHe = /* @__PURE__ */ ae({
  __name: "ColorScheme",
  props: {
    value: {
      type: Array,
      default: () => []
    }
  },
  emits: ["update:value"],
  setup(t, { emit: e }) {
    const n = t, r = bC.map((d) => d.color.join(",")), i = e, a = ee(r.includes(n.value.join(",")) ? n.value.join(",") : "custom"), o = ee(n.value), s = ee();
    function l(d) {
      d === "custom" || (o.value = d.split(","), i("update:value", d.split(",")));
    }
    const u = () => {
      var d;
      (d = s.value) == null || d.show();
    };
    function c(d) {
      o.value.push(d), a.value = "custom", i("update:value", o.value);
    }
    const f = (d) => {
      o.value.splice(d, 1), a.value = "custom", i("update:value", o.value);
    };
    return (d, h) => (be(), Ue("div", null, [
      D(z(Ca), {
        value: a.value,
        "onUpdate:value": h[0] || (h[0] = (p) => a.value = p),
        size: "small",
        style: { width: "100%" },
        onChange: l
      }, {
        default: ke(() => [
          (be(!0), Ue(Wt, null, hh(z(bC), (p) => (be(), Je(z(Ev), {
            key: p.name,
            value: p.color.join(",")
          }, {
            default: ke(() => [
              (be(!0), Ue(Wt, null, hh(p.color.slice(0, 5), (v) => (be(), Ue("span", {
                class: "color-block",
                key: v,
                style: dr({ background: v })
              }, null, 4))), 128)),
              Pn(" " + xi(p.name), 1)
            ]),
            _: 2
          }, 1032, ["value"]))), 128)),
          D(z(Ev), { value: "custom" }, {
            default: ke(() => [
              Pn("自定义组合")
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["value"]),
      tt("div", LHe, [
        (be(!0), Ue(Wt, null, hh(o.value, (p, v) => (be(), Ue("span", {
          class: "color-block",
          key: v,
          style: dr({ background: p })
        }, [
          tt("span", NHe, [
            D(z(cs), {
              onClick: (g) => f(v)
            }, null, 8, ["onClick"])
          ])
        ], 4))), 128)),
        tt("span", {
          class: "color-block cus-btn",
          onClick: u
        }, [
          D(z(j2))
        ]),
        D(z(Fv), {
          ref_key: "colorPickerRef",
          ref: s,
          style: { width: "0", height: "0", opacity: "0" },
          onChange: c
        }, null, 512)
      ])
    ]));
  }
}), zHe = /* @__PURE__ */ ui(BHe, [["__scopeId", "data-v-b29b1b78"]]), VHe = { class: "position" }, FHe = /* @__PURE__ */ ae({
  __name: "Position",
  props: {
    value: {},
    type: { default: "line" }
  },
  emits: ["update:value"],
  setup(t) {
    return (e, n) => (be(), Ue("div", VHe, [
      e.type === "line" ? (be(), Je(z(Fh), {
        key: 0,
        value: e.value,
        onChange: n[0] || (n[0] = (r) => e.$emit("update:value", r.target.value))
      }, {
        default: ke(() => [
          D(z(_l), { value: "left" }, {
            default: ke(() => [
              D(z(U8))
            ]),
            _: 1
          }),
          D(z(_l), { value: "center" }, {
            default: ke(() => [
              D(z(Z8))
            ]),
            _: 1
          }),
          D(z(_l), { value: "right" }, {
            default: ke(() => [
              D(z(X8))
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["value"])) : e.type === "round" ? (be(), Je(z(Fh), {
        key: 1,
        value: e.value,
        onChange: n[1] || (n[1] = (r) => e.$emit("update:value", r.target.value))
      }, {
        default: ke(() => [
          D(z(_l), { value: "top" }, {
            default: ke(() => [
              D(z(e5))
            ]),
            _: 1
          }),
          D(z(_l), { value: "bottom" }, {
            default: ke(() => [
              D(z(q8))
            ]),
            _: 1
          }),
          D(z(_l), { value: "left" }, {
            default: ke(() => [
              D(z(K8))
            ]),
            _: 1
          }),
          D(z(_l), { value: "right" }, {
            default: ke(() => [
              D(z(J8))
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["value"])) : Ot("", !0)
    ]));
  }
}), WHe = /* @__PURE__ */ ui(FHe, [["__scopeId", "data-v-a4b8591a"]]), QHe = { class: "font-style" }, HHe = { class: "cus-btn" }, GHe = /* @__PURE__ */ ae({
  __name: "FontStyle",
  props: {
    value: {}
  },
  emits: ["update:value"],
  setup(t, { emit: e }) {
    var v, g, m, y;
    const n = t, r = e, i = ee((v = n.value) == null ? void 0 : v.bold), a = ee((g = n.value) == null ? void 0 : g.italic), o = ee((m = n.value) == null ? void 0 : m.size), s = ee((y = n.value) == null ? void 0 : y.color), l = ee(), u = () => {
      r("update:value", {
        size: o.value,
        bold: i.value,
        italic: a.value,
        color: s.value
      });
    }, c = () => {
      i.value = !i.value, u();
    }, f = () => {
      a.value = !a.value, u();
    };
    function d(_) {
      s.value = _, u();
    }
    function h(_) {
      o.value = _, u();
    }
    const p = () => {
      var _;
      (_ = l.value) == null || _.show();
    };
    return (_, O) => (be(), Ue("div", QHe, [
      D(z(ra), {
        size: "small",
        onClick: p
      }, {
        default: ke(() => [
          tt("span", HHe, [
            D(z(t5)),
            tt("div", {
              class: "color-block",
              style: dr({ background: s.value })
            }, null, 4),
            D(z(Fv), {
              ref_key: "colorPickerRef",
              ref: l,
              style: { width: "0", height: "0", opacity: "0" },
              value: s.value,
              "onUpdate:value": O[0] || (O[0] = (S) => s.value = S),
              onChange: d
            }, null, 8, ["value"])
          ])
        ]),
        _: 1
      }),
      D(z(ra), {
        size: "small",
        onClick: c
      }, {
        default: ke(() => [
          tt("span", {
            class: Ge(["cus-btn", { "active-btn": i.value }])
          }, [
            D(z(Y8))
          ], 2)
        ]),
        _: 1
      }),
      D(z(ra), {
        size: "small",
        onClick: f
      }, {
        default: ke(() => [
          tt("span", {
            class: Ge(["cus-btn", { "active-btn": a.value }])
          }, [
            D(z(n5))
          ], 2)
        ]),
        _: 1
      }),
      D(z(Y_), {
        size: "small",
        value: o.value,
        min: 12,
        step: 1,
        precision: 0,
        style: { width: "80px" },
        onChange: h
      }, {
        addonAfter: ke(() => [
          Pn("px")
        ]),
        _: 1
      }, 8, ["value"])
    ]));
  }
}), jHe = /* @__PURE__ */ ui(GHe, [["__scopeId", "data-v-12e62bfe"]]), ZHe = { class: "cus-slider" }, UHe = /* @__PURE__ */ ae({
  __name: "CusSlider",
  props: {
    value: {}
  },
  emits: ["update:value"],
  setup(t) {
    return (e, n) => (be(), Ue("div", ZHe, [
      D(z(s7e), {
        value: e.value,
        onChange: n[0] || (n[0] = (r) => e.$emit("update:value", r)),
        "tip-formatter": (r) => `${r}%`
      }, null, 8, ["value", "tip-formatter"]),
      D(z(Y_), {
        value: e.value,
        onChange: n[1] || (n[1] = (r) => e.$emit("update:value", r)),
        "addon-after": "%"
      }, null, 8, ["value"])
    ]));
  }
}), XHe = /* @__PURE__ */ ui(UHe, [["__scopeId", "data-v-2fe8fa98"]]), YHe = ae({
  name: "FmBorderRadius",
  components: {
    RadioGroup: Fh,
    RadioButton: _l,
    InputNumber: Y_,
    Select: Ca,
    RadiusUpleftOutlined: a5,
    RadiusUprightOutlined: o5,
    RadiusBottomleftOutlined: r5,
    RadiusBottomrightOutlined: i5
  },
  props: {
    value: {
      type: Object,
      default: () => ({})
    }
  },
  emits: ["update:value"],
  setup(t, { emit: e }) {
    var r, i, a, o;
    const n = zn({
      type: t.value.type || "all",
      value: t.value.type === "all" ? t.value.value : 0,
      unit: t.value.unit || "px",
      topLeft: typeof t.value.value == "object" ? (r = t.value.value) == null ? void 0 : r.topLeft : 0,
      topRight: typeof t.value.value == "object" ? (i = t.value.value) == null ? void 0 : i.topRight : 0,
      bottomLeft: typeof t.value.value == "object" ? (a = t.value.value) == null ? void 0 : a.bottomLeft : 0,
      bottomRight: typeof t.value.value == "object" ? (o = t.value.value) == null ? void 0 : o.bottomRight : 0
    });
    return me(
      () => n,
      (s) => {
        e("update:value", {
          type: s.type,
          value: s.type === "all" ? s.value : {
            topLeft: s.topLeft,
            topRight: s.topRight,
            bottomLeft: s.bottomLeft,
            bottomRight: s.bottomRight
          },
          unit: s.unit
        });
      },
      {
        deep: !0
      }
    ), {
      radius: n,
      unitOptions: [
        { label: "px", value: "px" },
        { label: "%", value: "%" }
      ]
    };
  }
}), qHe = {
  key: 0,
  class: "all"
}, KHe = {
  key: 1,
  class: "custom"
};
function JHe(t, e, n, r, i, a) {
  const o = $r("RadioButton"), s = $r("RadioGroup"), l = $r("InputNumber"), u = $r("Select"), c = $r("RadiusUpleftOutlined"), f = $r("RadiusUprightOutlined"), d = $r("RadiusBottomleftOutlined"), h = $r("RadiusBottomrightOutlined");
  return be(), Ue("div", null, [
    D(s, {
      value: t.radius.type,
      "onUpdate:value": e[0] || (e[0] = (p) => t.radius.type = p)
    }, {
      default: ke(() => [
        D(o, { value: "all" }, {
          default: ke(() => [
            Pn("整体")
          ]),
          _: 1
        }),
        D(o, { value: "custom" }, {
          default: ke(() => [
            Pn("单个")
          ]),
          _: 1
        })
      ]),
      _: 1
    }, 8, ["value"]),
    t.radius.type === "all" ? (be(), Ue("div", qHe, [
      D(l, {
        value: t.radius.value,
        "onUpdate:value": e[1] || (e[1] = (p) => t.radius.value = p)
      }, null, 8, ["value"]),
      D(u, {
        value: t.radius.unit,
        "onUpdate:value": e[2] || (e[2] = (p) => t.radius.unit = p),
        options: t.unitOptions
      }, null, 8, ["value", "options"])
    ])) : (be(), Ue("div", KHe, [
      D(l, {
        value: t.radius.topLeft,
        "onUpdate:value": e[3] || (e[3] = (p) => t.radius.topLeft = p)
      }, {
        addonBefore: ke(() => [
          D(c)
        ]),
        _: 1
      }, 8, ["value"]),
      D(l, {
        value: t.radius.topRight,
        "onUpdate:value": e[4] || (e[4] = (p) => t.radius.topRight = p)
      }, {
        addonBefore: ke(() => [
          D(f)
        ]),
        _: 1
      }, 8, ["value"]),
      D(l, {
        value: t.radius.bottomLeft,
        "onUpdate:value": e[5] || (e[5] = (p) => t.radius.bottomLeft = p)
      }, {
        addonBefore: ke(() => [
          D(d)
        ]),
        _: 1
      }, 8, ["value"]),
      D(l, {
        value: t.radius.bottomRight,
        "onUpdate:value": e[6] || (e[6] = (p) => t.radius.bottomRight = p)
      }, {
        addonBefore: ke(() => [
          D(h)
        ]),
        _: 1
      }, 8, ["value"]),
      D(u, {
        value: t.radius.unit,
        "onUpdate:value": e[7] || (e[7] = (p) => t.radius.unit = p),
        options: t.unitOptions
      }, null, 8, ["value", "options"])
    ]))
  ]);
}
const e9e = /* @__PURE__ */ ui(YHe, [["render", JHe], ["__scopeId", "data-v-da2b5cf6"]]), t9e = /* @__PURE__ */ ae({
  __name: "CusFormItem",
  props: {
    item: {},
    modelValue: {}
  },
  emits: ["update:modelValue"],
  setup(t, { emit: e }) {
    const n = t, r = e, i = ee(n.modelValue);
    return me(
      () => i.value,
      () => {
        r("update:modelValue", i.value);
      },
      { deep: !0 }
    ), me(
      () => n.modelValue,
      (a) => {
        z_(a, i.value) || (i.value = a);
      }
    ), (a, o) => (be(), Je(z(pae), {
      label: a.item.type !== "divider" ? a.item.label : "",
      name: a.item.prop,
      rules: a.item.rules
    }, {
      default: ke(() => {
        var s, l, u, c, f, d, h, p, v, g, m;
        return [
          a.item.type === "divider" ? (be(), Je(z(nFe), {
            key: 0,
            style: { margin: "0" }
          }, {
            default: ke(() => [
              Pn(xi(a.item.label), 1)
            ]),
            _: 1
          })) : a.item.type === "input" ? (be(), Je(z(Cr), Xn({
            key: 1,
            value: i.value,
            "onUpdate:value": o[0] || (o[0] = (y) => i.value = y)
          }, (s = a.item) == null ? void 0 : s.fieldProps), null, 16, ["value"])) : a.item.type === "select" ? (be(), Je(z(Ca), Xn({
            key: 2,
            value: i.value,
            "onUpdate:value": o[1] || (o[1] = (y) => i.value = y)
          }, (l = a.item) == null ? void 0 : l.fieldProps), null, 16, ["value"])) : a.item.type === "inputNumber" ? (be(), Je(z(Y_), Xn({
            key: 3,
            value: i.value,
            "onUpdate:value": o[2] || (o[2] = (y) => i.value = y)
          }, (u = a.item) == null ? void 0 : u.fieldProps, { style: { width: "100%" } }), null, 16, ["value"])) : a.item.type === "image" ? (be(), Je(z(Lc), Xn({
            key: 4,
            value: i.value,
            "onUpdate:value": o[3] || (o[3] = (y) => i.value = y)
          }, (c = a.item) == null ? void 0 : c.fieldProps), null, 16, ["value"])) : a.item.type === "checkboxGroup" ? (be(), Je(z(dC), Xn({
            key: 5,
            value: i.value,
            "onUpdate:value": o[4] || (o[4] = (y) => i.value = y)
          }, (f = a.item) == null ? void 0 : f.fieldProps), null, 16, ["value"])) : a.item.type === "backgroundSelect" ? (be(), Je(IHe, Xn({
            key: 6,
            value: i.value,
            "onUpdate:value": o[5] || (o[5] = (y) => i.value = y)
          }, (d = a.item) == null ? void 0 : d.fieldProps), null, 16, ["value"])) : a.item.type === "colorSelect" ? (be(), Je(RHe, Xn({
            key: 7,
            value: i.value,
            "onUpdate:value": o[6] || (o[6] = (y) => i.value = y)
          }, (h = a.item) == null ? void 0 : h.fieldProps), null, 16, ["value"])) : a.item.type === "colorScheme" ? (be(), Je(zHe, Xn({
            key: 8,
            value: i.value,
            "onUpdate:value": o[7] || (o[7] = (y) => i.value = y)
          }, (p = a.item) == null ? void 0 : p.fieldProps), null, 16, ["value"])) : a.item.type === "radioGroup" ? (be(), Je(z(Fh), Xn({
            key: 9,
            value: i.value,
            "onUpdate:value": o[8] || (o[8] = (y) => i.value = y),
            size: "small"
          }, (v = a.item) == null ? void 0 : v.fieldProps), null, 16, ["value"])) : a.item.type === "radioGroupButton" ? (be(), Je(z(Fh), {
            key: 10,
            value: i.value,
            "onUpdate:value": o[9] || (o[9] = (y) => i.value = y),
            size: "small"
          }, {
            default: ke(() => [
              (be(!0), Ue(Wt, null, hh(a.item.fieldProps.options, (y) => (be(), Je(z(_l), {
                key: y.value,
                value: y.value
              }, {
                default: ke(() => [
                  Pn(xi(y.label), 1)
                ]),
                _: 2
              }, 1032, ["value"]))), 128))
            ]),
            _: 1
          }, 8, ["value"])) : a.item.type === "position" ? (be(), Je(WHe, Xn({
            key: 11,
            value: i.value,
            "onUpdate:value": o[10] || (o[10] = (y) => i.value = y)
          }, (g = a.item) == null ? void 0 : g.fieldProps), null, 16, ["value"])) : a.item.type === "fontStyle" ? (be(), Je(jHe, Xn({
            key: 12,
            value: i.value,
            "onUpdate:value": o[11] || (o[11] = (y) => i.value = y)
          }, (m = a.item) == null ? void 0 : m.fieldProps), null, 16, ["value"])) : a.item.type === "slider" ? (be(), Je(z(Lb), { key: 13 }, {
            default: ke(() => {
              var y;
              return [
                D(XHe, Xn({
                  value: i.value,
                  "onUpdate:value": o[12] || (o[12] = (_) => i.value = _)
                }, (y = a.item) == null ? void 0 : y.fieldProps), null, 16, ["value"])
              ];
            }),
            _: 1
          })) : a.item.type === "boderRadiusSelect" ? (be(), Je(z(Lb), { key: 14 }, {
            default: ke(() => {
              var y;
              return [
                D(e9e, Xn({
                  value: i.value,
                  "onUpdate:value": o[13] || (o[13] = (_) => i.value = _)
                }, (y = a.item) == null ? void 0 : y.fieldProps), null, 16, ["value"])
              ];
            }),
            _: 1
          })) : Ot("", !0),
          a.item.tip ? (be(), Je(z(F2), {
            key: 15,
            title: a.item.tip
          }, {
            default: ke(() => [
              D(z(V2), { style: { color: "#666" } })
            ]),
            _: 1
          }, 8, ["title"])) : Ot("", !0)
        ];
      }),
      _: 1
    }, 8, ["label", "name", "rules"]));
  }
}), n9e = /* @__PURE__ */ ui(t9e, [["__scopeId", "data-v-04c55003"]]), Sh = ae({
  name: "DCusForm",
  props: {
    columns: {
      type: Array,
      default: () => []
    },
    formModel: {
      type: Object,
      default: () => ({})
    }
  },
  emits: ["change"],
  setup(t, { emit: e }) {
    const n = ee({}), r = ee(), i = ee({}), a = V(() => t.columns.map((f) => ({
      ...f,
      rules: (f == null ? void 0 : f.rules) || []
    }))), o = (f) => {
      f == null || f.forEach((d) => {
        var h;
        if (d.type === "group")
          o(d.children);
        else if (d.type === "dependency") {
          const p = (h = d.children) == null ? void 0 : h.call(
            d,
            mg(n.value, d.name || []),
            n
          );
          o(p);
        } else {
          if (d.type === "divider") return;
          const p = vn(t.formModel, d.prop);
          n.value[d.prop] = d != null && d.valueToForm ? d.valueToForm(p, t.formModel) : p ?? d.defaultValue, d.format ? d.format(i, n.value[d.prop]) : i.value[d.prop] = p ?? d.defaultValue;
        }
      });
    }, s = (f, d) => {
      n.value[d.prop] = f, d.format ? d.format(i, f) : i.value[d.prop] = f, e("change", i.value);
    }, l = (f) => {
      var d;
      switch (f.type) {
        case "dependency": {
          const h = (d = f.children) == null ? void 0 : d.call(
            f,
            mg(n.value, f.name || []),
            n
          );
          return o(h), c(h);
        }
        case "group":
          return u(f);
        default:
          return /* @__PURE__ */ React.createElement(
            n9e,
            {
              key: f.prop,
              item: f,
              modelValue: n.value[f.prop],
              "onUpdate:modelValue": (h) => {
                s(h, f);
              }
            }
          );
      }
    }, u = (f) => {
      var d;
      return /* @__PURE__ */ React.createElement(Wy, { style: { borderRadius: 0 } }, /* @__PURE__ */ React.createElement(fC, { style: { borderRadius: 0 }, key: f.prop, header: f.label }, (d = f.children) == null ? void 0 : d.map((h) => l(h))));
    }, c = (f) => f.map((d) => {
      switch (d.type) {
        case "group":
          return u(d);
        default:
          return l(d);
      }
    });
    return me(
      () => a.value,
      (f) => {
        f && o(f);
      },
      { immediate: !0 }
    ), () => /* @__PURE__ */ React.createElement(
      Gr,
      {
        model: n,
        colon: !1,
        "label-col": { span: 8 },
        ref: r,
        layout: "horizontal",
        size: "small"
      },
      c(a.value)
    );
  }
});
Sh.install = (t) => (t.component(Sh.name, Sh), t);
const Qoe = /* @__PURE__ */ ae({
  __name: "Config",
  props: d5,
  emits: ["change"],
  setup(t, { emit: e }) {
    const n = t, r = e, i = V(() => [
      {
        label: "内容",
        prop: "text",
        type: "input",
        defaultValue: n.text
      },
      {
        label: "字体",
        prop: "fontSize",
        type: "inputNumber",
        defaultValue: n.fontSize
      },
      {
        label: "颜色",
        prop: "color",
        type: "colorSelect",
        defaultValue: n.color
      },
      {
        label: "对齐",
        prop: "textAlign",
        type: "radioGroup",
        defaultValue: n.textAlign,
        fieldProps: {
          options: [
            { label: "左对齐", value: "left" },
            { label: "居中", value: "center" },
            { label: "右对齐", value: "right" }
          ]
        }
      }
    ]), a = (o) => {
      r("change", o);
    };
    return (o, s) => (be(), Je(z(Sh), Xn({ columns: i.value }, o.$attrs, { onChange: a }), null, 16, ["columns"]));
  }
});
Zv.Config = Qoe;
Zv.install = (t) => (t.component(Zv.name, Zv), t);
const r9e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Config: Qoe,
  default: Zv,
  defaultPropsValue: wHe,
  titleProps: d5
}, Symbol.toStringTag, { value: "Module" }));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var ek = function(t, e) {
  return ek = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
    n.__proto__ = r;
  } || function(n, r) {
    for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
  }, ek(t, e);
};
function le(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
  ek(t, e);
  function n() {
    this.constructor = t;
  }
  t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
}
var i9e = /* @__PURE__ */ function() {
  function t() {
    this.firefox = !1, this.ie = !1, this.edge = !1, this.newEdge = !1, this.weChat = !1;
  }
  return t;
}(), a9e = /* @__PURE__ */ function() {
  function t() {
    this.browser = new i9e(), this.node = !1, this.wxa = !1, this.worker = !1, this.svgSupported = !1, this.touchEventsSupported = !1, this.pointerEventsSupported = !1, this.domSupported = !1, this.transformSupported = !1, this.transform3dSupported = !1, this.hasGlobalWindow = typeof window < "u";
  }
  return t;
}(), Rd = new a9e();
typeof wx == "object" && typeof wx.getSystemInfoSync == "function" ? (Rd.wxa = !0, Rd.touchEventsSupported = !0) : typeof document > "u" && typeof self < "u" ? Rd.worker = !0 : typeof navigator > "u" || navigator.userAgent.indexOf("Node.js") === 0 ? (Rd.node = !0, Rd.svgSupported = !0) : o9e(navigator.userAgent, Rd);
function o9e(t, e) {
  var n = e.browser, r = t.match(/Firefox\/([\d.]+)/), i = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/), a = t.match(/Edge?\/([\d.]+)/), o = /micromessenger/i.test(t);
  r && (n.firefox = !0, n.version = r[1]), i && (n.ie = !0, n.version = i[1]), a && (n.edge = !0, n.version = a[1], n.newEdge = +a[1].split(".")[0] > 18), o && (n.weChat = !0), e.svgSupported = typeof SVGRect < "u", e.touchEventsSupported = "ontouchstart" in window && !n.ie && !n.edge, e.pointerEventsSupported = "onpointerdown" in window && (n.edge || n.ie && +n.version >= 11), e.domSupported = typeof document < "u";
  var s = document.documentElement.style;
  e.transform3dSupported = (n.ie && "transition" in s || n.edge || "WebKitCSSMatrix" in window && "m11" in new WebKitCSSMatrix() || "MozPerspective" in s) && !("OTransition" in s), e.transformSupported = e.transform3dSupported || n.ie && +n.version >= 9;
}
const Gt = Rd;
var h5 = 12, Hoe = "sans-serif", vf = h5 + "px " + Hoe, s9e = 20, l9e = 100, u9e = "007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";
function c9e(t) {
  var e = {};
  if (typeof JSON > "u")
    return e;
  for (var n = 0; n < t.length; n++) {
    var r = String.fromCharCode(n + 32), i = (t.charCodeAt(n) - s9e) / l9e;
    e[r] = i;
  }
  return e;
}
var f9e = c9e(u9e), Hs = {
  createCanvas: function() {
    return typeof document < "u" && document.createElement("canvas");
  },
  measureText: /* @__PURE__ */ function() {
    var t, e;
    return function(n, r) {
      if (!t) {
        var i = Hs.createCanvas();
        t = i && i.getContext("2d");
      }
      if (t)
        return e !== r && (e = t.font = r || vf), t.measureText(n);
      n = n || "", r = r || vf;
      var a = /((?:\d+)?\.?\d*)px/.exec(r), o = a && +a[1] || h5, s = 0;
      if (r.indexOf("mono") >= 0)
        s = o * n.length;
      else
        for (var l = 0; l < n.length; l++) {
          var u = f9e[n[l]];
          s += u == null ? o : u * o;
        }
      return { width: s };
    };
  }(),
  loadImage: function(t, e, n) {
    var r = new Image();
    return r.onload = e, r.onerror = n, r.src = t, r;
  }
};
function Goe(t) {
  for (var e in Hs)
    t[e] && (Hs[e] = t[e]);
}
var joe = os([
  "Function",
  "RegExp",
  "Date",
  "Error",
  "CanvasGradient",
  "CanvasPattern",
  "Image",
  "Canvas"
], function(t, e) {
  return t["[object " + e + "]"] = !0, t;
}, {}), Zoe = os([
  "Int8",
  "Uint8",
  "Uint8Clamped",
  "Int16",
  "Uint16",
  "Int32",
  "Uint32",
  "Float32",
  "Float64"
], function(t, e) {
  return t["[object " + e + "Array]"] = !0, t;
}, {}), mm = Object.prototype.toString, iP = Array.prototype, d9e = iP.forEach, h9e = iP.filter, p5 = iP.slice, p9e = iP.map, p9 = (function() {
}).constructor, nS = p9 ? p9.prototype : null, v5 = "__proto__", v9e = 2311;
function g5() {
  return v9e++;
}
function qo() {
  for (var t = [], e = 0; e < arguments.length; e++)
    t[e] = arguments[e];
  typeof console < "u" && console.error.apply(console, t);
}
function ot(t) {
  if (t == null || typeof t != "object")
    return t;
  var e = t, n = mm.call(t);
  if (n === "[object Array]") {
    if (!Uv(t)) {
      e = [];
      for (var r = 0, i = t.length; r < i; r++)
        e[r] = ot(t[r]);
    }
  } else if (Zoe[n]) {
    if (!Uv(t)) {
      var a = t.constructor;
      if (a.from)
        e = a.from(t);
      else {
        e = new a(t.length);
        for (var r = 0, i = t.length; r < i; r++)
          e[r] = t[r];
      }
    }
  } else if (!joe[n] && !Uv(t) && !gf(t)) {
    e = {};
    for (var o in t)
      t.hasOwnProperty(o) && o !== v5 && (e[o] = ot(t[o]));
  }
  return e;
}
function mt(t, e, n) {
  if (!nt(e) || !nt(t))
    return n ? ot(e) : t;
  for (var r in e)
    if (e.hasOwnProperty(r) && r !== v5) {
      var i = t[r], a = e[r];
      nt(a) && nt(i) && !Se(a) && !Se(i) && !gf(a) && !gf(i) && !tk(a) && !tk(i) && !Uv(a) && !Uv(i) ? mt(i, a, n) : (n || !(r in t)) && (t[r] = ot(e[r]));
    }
  return t;
}
function aP(t, e) {
  for (var n = t[0], r = 1, i = t.length; r < i; r++)
    n = mt(n, t[r], e);
  return n;
}
function _e(t, e) {
  if (Object.assign)
    Object.assign(t, e);
  else
    for (var n in e)
      e.hasOwnProperty(n) && n !== v5 && (t[n] = e[n]);
  return t;
}
function it(t, e, n) {
  for (var r = kt(e), i = 0; i < r.length; i++) {
    var a = r[i];
    (n ? e[a] != null : t[a] == null) && (t[a] = e[a]);
  }
  return t;
}
var g9e = Hs.createCanvas;
function St(t, e) {
  if (t) {
    if (t.indexOf)
      return t.indexOf(e);
    for (var n = 0, r = t.length; n < r; n++)
      if (t[n] === e)
        return n;
  }
  return -1;
}
function m5(t, e) {
  var n = t.prototype;
  function r() {
  }
  r.prototype = e.prototype, t.prototype = new r();
  for (var i in n)
    n.hasOwnProperty(i) && (t.prototype[i] = n[i]);
  t.prototype.constructor = t, t.superClass = e;
}
function vr(t, e, n) {
  if (t = "prototype" in t ? t.prototype : t, e = "prototype" in e ? e.prototype : e, Object.getOwnPropertyNames)
    for (var r = Object.getOwnPropertyNames(e), i = 0; i < r.length; i++) {
      var a = r[i];
      a !== "constructor" && (n ? e[a] != null : t[a] == null) && (t[a] = e[a]);
    }
  else
    it(t, e, n);
}
function Pi(t) {
  return !t || typeof t == "string" ? !1 : typeof t.length == "number";
}
function F(t, e, n) {
  if (t && e)
    if (t.forEach && t.forEach === d9e)
      t.forEach(e, n);
    else if (t.length === +t.length)
      for (var r = 0, i = t.length; r < i; r++)
        e.call(n, t[r], r, t);
    else
      for (var a in t)
        t.hasOwnProperty(a) && e.call(n, t[a], a, t);
}
function Ce(t, e, n) {
  if (!t)
    return [];
  if (!e)
    return oP(t);
  if (t.map && t.map === p9e)
    return t.map(e, n);
  for (var r = [], i = 0, a = t.length; i < a; i++)
    r.push(e.call(n, t[i], i, t));
  return r;
}
function os(t, e, n, r) {
  if (t && e) {
    for (var i = 0, a = t.length; i < a; i++)
      n = e.call(r, n, t[i], i, t);
    return n;
  }
}
function yn(t, e, n) {
  if (!t)
    return [];
  if (!e)
    return oP(t);
  if (t.filter && t.filter === h9e)
    return t.filter(e, n);
  for (var r = [], i = 0, a = t.length; i < a; i++)
    e.call(n, t[i], i, t) && r.push(t[i]);
  return r;
}
function Uoe(t, e, n) {
  if (t && e) {
    for (var r = 0, i = t.length; r < i; r++)
      if (e.call(n, t[r], r, t))
        return t[r];
  }
}
function kt(t) {
  if (!t)
    return [];
  if (Object.keys)
    return Object.keys(t);
  var e = [];
  for (var n in t)
    t.hasOwnProperty(n) && e.push(n);
  return e;
}
function m9e(t, e) {
  for (var n = [], r = 2; r < arguments.length; r++)
    n[r - 2] = arguments[r];
  return function() {
    return t.apply(e, n.concat(p5.call(arguments)));
  };
}
var We = nS && qe(nS.bind) ? nS.call.bind(nS.bind) : m9e;
function vt(t) {
  for (var e = [], n = 1; n < arguments.length; n++)
    e[n - 1] = arguments[n];
  return function() {
    return t.apply(this, e.concat(p5.call(arguments)));
  };
}
function Se(t) {
  return Array.isArray ? Array.isArray(t) : mm.call(t) === "[object Array]";
}
function qe(t) {
  return typeof t == "function";
}
function Ve(t) {
  return typeof t == "string";
}
function zb(t) {
  return mm.call(t) === "[object String]";
}
function Kt(t) {
  return typeof t == "number";
}
function nt(t) {
  var e = typeof t;
  return e === "function" || !!t && e === "object";
}
function tk(t) {
  return !!joe[mm.call(t)];
}
function Wi(t) {
  return !!Zoe[mm.call(t)];
}
function gf(t) {
  return typeof t == "object" && typeof t.nodeType == "number" && typeof t.ownerDocument == "object";
}
function n1(t) {
  return t.colorStops != null;
}
function Xoe(t) {
  return t.image != null;
}
function y5(t) {
  return mm.call(t) === "[object RegExp]";
}
function mf(t) {
  return t !== t;
}
function br() {
  for (var t = [], e = 0; e < arguments.length; e++)
    t[e] = arguments[e];
  for (var n = 0, r = t.length; n < r; n++)
    if (t[n] != null)
      return t[n];
}
function dt(t, e) {
  return t ?? e;
}
function co(t, e, n) {
  return t ?? e ?? n;
}
function oP(t) {
  for (var e = [], n = 1; n < arguments.length; n++)
    e[n - 1] = arguments[n];
  return p5.apply(t, e);
}
function sP(t) {
  if (typeof t == "number")
    return [t, t, t, t];
  var e = t.length;
  return e === 2 ? [t[0], t[1], t[0], t[1]] : e === 3 ? [t[0], t[1], t[2], t[1]] : t;
}
function at(t, e) {
  if (!t)
    throw new Error(e);
}
function Zo(t) {
  return t == null ? null : typeof t.trim == "function" ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
}
var Yoe = "__ec_primitive__";
function Vb(t) {
  t[Yoe] = !0;
}
function Uv(t) {
  return t[Yoe];
}
var y9e = function() {
  function t() {
    this.data = {};
  }
  return t.prototype.delete = function(e) {
    var n = this.has(e);
    return n && delete this.data[e], n;
  }, t.prototype.has = function(e) {
    return this.data.hasOwnProperty(e);
  }, t.prototype.get = function(e) {
    return this.data[e];
  }, t.prototype.set = function(e, n) {
    return this.data[e] = n, this;
  }, t.prototype.keys = function() {
    return kt(this.data);
  }, t.prototype.forEach = function(e) {
    var n = this.data;
    for (var r in n)
      n.hasOwnProperty(r) && e(n[r], r);
  }, t;
}(), qoe = typeof Map == "function";
function b9e() {
  return qoe ? /* @__PURE__ */ new Map() : new y9e();
}
var Koe = function() {
  function t(e) {
    var n = Se(e);
    this.data = b9e();
    var r = this;
    e instanceof t ? e.each(i) : e && F(e, i);
    function i(a, o) {
      n ? r.set(a, o) : r.set(o, a);
    }
  }
  return t.prototype.hasKey = function(e) {
    return this.data.has(e);
  }, t.prototype.get = function(e) {
    return this.data.get(e);
  }, t.prototype.set = function(e, n) {
    return this.data.set(e, n), n;
  }, t.prototype.each = function(e, n) {
    this.data.forEach(function(r, i) {
      e.call(n, r, i);
    });
  }, t.prototype.keys = function() {
    var e = this.data.keys();
    return qoe ? Array.from(e) : e;
  }, t.prototype.removeKey = function(e) {
    this.data.delete(e);
  }, t;
}();
function Ze(t) {
  return new Koe(t);
}
function Fb(t, e) {
  for (var n = new t.constructor(t.length + e.length), r = 0; r < t.length; r++)
    n[r] = t[r];
  for (var i = t.length, r = 0; r < e.length; r++)
    n[r + i] = e[r];
  return n;
}
function r1(t, e) {
  var n;
  if (Object.create)
    n = Object.create(t);
  else {
    var r = function() {
    };
    r.prototype = t, n = new r();
  }
  return e && _e(n, e), n;
}
function b5(t) {
  var e = t.style;
  e.webkitUserSelect = "none", e.userSelect = "none", e.webkitTapHighlightColor = "rgba(0,0,0,0)", e["-webkit-touch-callout"] = "none";
}
function Qe(t, e) {
  return t.hasOwnProperty(e);
}
function fr() {
}
var Uy = 180 / Math.PI;
const _9e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  HashMap: Koe,
  RADIAN_TO_DEGREE: Uy,
  assert: at,
  bind: We,
  clone: ot,
  concatArray: Fb,
  createCanvas: g9e,
  createHashMap: Ze,
  createObject: r1,
  curry: vt,
  defaults: it,
  disableUserSelect: b5,
  each: F,
  eqNaN: mf,
  extend: _e,
  filter: yn,
  find: Uoe,
  guid: g5,
  hasOwn: Qe,
  indexOf: St,
  inherits: m5,
  isArray: Se,
  isArrayLike: Pi,
  isBuiltInObject: tk,
  isDom: gf,
  isFunction: qe,
  isGradientObject: n1,
  isImagePatternObject: Xoe,
  isNumber: Kt,
  isObject: nt,
  isPrimitive: Uv,
  isRegExp: y5,
  isString: Ve,
  isStringSafe: zb,
  isTypedArray: Wi,
  keys: kt,
  logError: qo,
  map: Ce,
  merge: mt,
  mergeAll: aP,
  mixin: vr,
  noop: fr,
  normalizeCssArray: sP,
  reduce: os,
  retrieve: br,
  retrieve2: dt,
  retrieve3: co,
  setAsPrimitive: Vb,
  slice: oP,
  trim: Zo
}, Symbol.toStringTag, { value: "Module" }));
function kf(t, e) {
  return t == null && (t = 0), e == null && (e = 0), [t, e];
}
function ki(t, e) {
  return t[0] = e[0], t[1] = e[1], t;
}
function kl(t) {
  return [t[0], t[1]];
}
function Joe(t, e, n) {
  return t[0] = e, t[1] = n, t;
}
function nk(t, e, n) {
  return t[0] = e[0] + n[0], t[1] = e[1] + n[1], t;
}
function _C(t, e, n, r) {
  return t[0] = e[0] + n[0] * r, t[1] = e[1] + n[1] * r, t;
}
function Wc(t, e, n) {
  return t[0] = e[0] - n[0], t[1] = e[1] - n[1], t;
}
function Wb(t) {
  return Math.sqrt(_5(t));
}
var O9e = Wb;
function _5(t) {
  return t[0] * t[0] + t[1] * t[1];
}
var S9e = _5;
function x9e(t, e, n) {
  return t[0] = e[0] * n[0], t[1] = e[1] * n[1], t;
}
function w9e(t, e, n) {
  return t[0] = e[0] / n[0], t[1] = e[1] / n[1], t;
}
function C9e(t, e) {
  return t[0] * e[0] + t[1] * e[1];
}
function Xy(t, e, n) {
  return t[0] = e[0] * n, t[1] = e[1] * n, t;
}
function fp(t, e) {
  var n = Wb(e);
  return n === 0 ? (t[0] = 0, t[1] = 0) : (t[0] = e[0] / n, t[1] = e[1] / n), t;
}
function OC(t, e) {
  return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]));
}
var wu = OC;
function ese(t, e) {
  return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]);
}
var nf = ese;
function T9e(t, e) {
  return t[0] = -e[0], t[1] = -e[1], t;
}
function Yy(t, e, n, r) {
  return t[0] = e[0] + r * (n[0] - e[0]), t[1] = e[1] + r * (n[1] - e[1]), t;
}
function oi(t, e, n) {
  var r = e[0], i = e[1];
  return t[0] = n[0] * r + n[2] * i + n[4], t[1] = n[1] * r + n[3] * i + n[5], t;
}
function Cu(t, e, n) {
  return t[0] = Math.min(e[0], n[0]), t[1] = Math.min(e[1], n[1]), t;
}
function Tu(t, e, n) {
  return t[0] = Math.max(e[0], n[0]), t[1] = Math.max(e[1], n[1]), t;
}
const P9e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  add: nk,
  applyTransform: oi,
  clone: kl,
  copy: ki,
  create: kf,
  dist: wu,
  distSquare: nf,
  distance: OC,
  distanceSquare: ese,
  div: w9e,
  dot: C9e,
  len: Wb,
  lenSquare: _5,
  length: O9e,
  lengthSquare: S9e,
  lerp: Yy,
  max: Tu,
  min: Cu,
  mul: x9e,
  negate: T9e,
  normalize: fp,
  scale: Xy,
  scaleAndAdd: _C,
  set: Joe,
  sub: Wc
}, Symbol.toStringTag, { value: "Module" }));
var jp = /* @__PURE__ */ function() {
  function t(e, n) {
    this.target = e, this.topTarget = n && n.topTarget;
  }
  return t;
}(), $9e = function() {
  function t(e) {
    this.handler = e, e.on("mousedown", this._dragStart, this), e.on("mousemove", this._drag, this), e.on("mouseup", this._dragEnd, this);
  }
  return t.prototype._dragStart = function(e) {
    for (var n = e.target; n && !n.draggable; )
      n = n.parent || n.__hostTarget;
    n && (this._draggingTarget = n, n.dragging = !0, this._x = e.offsetX, this._y = e.offsetY, this.handler.dispatchToElement(new jp(n, e), "dragstart", e.event));
  }, t.prototype._drag = function(e) {
    var n = this._draggingTarget;
    if (n) {
      var r = e.offsetX, i = e.offsetY, a = r - this._x, o = i - this._y;
      this._x = r, this._y = i, n.drift(a, o, e), this.handler.dispatchToElement(new jp(n, e), "drag", e.event);
      var s = this.handler.findHover(r, i, n).target, l = this._dropTarget;
      this._dropTarget = s, n !== s && (l && s !== l && this.handler.dispatchToElement(new jp(l, e), "dragleave", e.event), s && s !== l && this.handler.dispatchToElement(new jp(s, e), "dragenter", e.event));
    }
  }, t.prototype._dragEnd = function(e) {
    var n = this._draggingTarget;
    n && (n.dragging = !1), this.handler.dispatchToElement(new jp(n, e), "dragend", e.event), this._dropTarget && this.handler.dispatchToElement(new jp(this._dropTarget, e), "drop", e.event), this._draggingTarget = null, this._dropTarget = null;
  }, t;
}(), fs = function() {
  function t(e) {
    e && (this._$eventProcessor = e);
  }
  return t.prototype.on = function(e, n, r, i) {
    this._$handlers || (this._$handlers = {});
    var a = this._$handlers;
    if (typeof n == "function" && (i = r, r = n, n = null), !r || !e)
      return this;
    var o = this._$eventProcessor;
    n != null && o && o.normalizeQuery && (n = o.normalizeQuery(n)), a[e] || (a[e] = []);
    for (var s = 0; s < a[e].length; s++)
      if (a[e][s].h === r)
        return this;
    var l = {
      h: r,
      query: n,
      ctx: i || this,
      callAtLast: r.zrEventfulCallAtLast
    }, u = a[e].length - 1, c = a[e][u];
    return c && c.callAtLast ? a[e].splice(u, 0, l) : a[e].push(l), this;
  }, t.prototype.isSilent = function(e) {
    var n = this._$handlers;
    return !n || !n[e] || !n[e].length;
  }, t.prototype.off = function(e, n) {
    var r = this._$handlers;
    if (!r)
      return this;
    if (!e)
      return this._$handlers = {}, this;
    if (n) {
      if (r[e]) {
        for (var i = [], a = 0, o = r[e].length; a < o; a++)
          r[e][a].h !== n && i.push(r[e][a]);
        r[e] = i;
      }
      r[e] && r[e].length === 0 && delete r[e];
    } else
      delete r[e];
    return this;
  }, t.prototype.trigger = function(e) {
    for (var n = [], r = 1; r < arguments.length; r++)
      n[r - 1] = arguments[r];
    if (!this._$handlers)
      return this;
    var i = this._$handlers[e], a = this._$eventProcessor;
    if (i)
      for (var o = n.length, s = i.length, l = 0; l < s; l++) {
        var u = i[l];
        if (!(a && a.filter && u.query != null && !a.filter(e, u.query)))
          switch (o) {
            case 0:
              u.h.call(u.ctx);
              break;
            case 1:
              u.h.call(u.ctx, n[0]);
              break;
            case 2:
              u.h.call(u.ctx, n[0], n[1]);
              break;
            default:
              u.h.apply(u.ctx, n);
              break;
          }
      }
    return a && a.afterTrigger && a.afterTrigger(e), this;
  }, t.prototype.triggerWithContext = function(e) {
    for (var n = [], r = 1; r < arguments.length; r++)
      n[r - 1] = arguments[r];
    if (!this._$handlers)
      return this;
    var i = this._$handlers[e], a = this._$eventProcessor;
    if (i)
      for (var o = n.length, s = n[o - 1], l = i.length, u = 0; u < l; u++) {
        var c = i[u];
        if (!(a && a.filter && c.query != null && !a.filter(e, c.query)))
          switch (o) {
            case 0:
              c.h.call(s);
              break;
            case 1:
              c.h.call(s, n[0]);
              break;
            case 2:
              c.h.call(s, n[0], n[1]);
              break;
            default:
              c.h.apply(s, n.slice(1, o - 1));
              break;
          }
      }
    return a && a.afterTrigger && a.afterTrigger(e), this;
  }, t;
}(), A9e = Math.log(2);
function rk(t, e, n, r, i, a) {
  var o = r + "-" + i, s = t.length;
  if (a.hasOwnProperty(o))
    return a[o];
  if (e === 1) {
    var l = Math.round(Math.log((1 << s) - 1 & ~i) / A9e);
    return t[n][l];
  }
  for (var u = r | 1 << n, c = n + 1; r & 1 << c; )
    c++;
  for (var f = 0, d = 0, h = 0; d < s; d++) {
    var p = 1 << d;
    p & i || (f += (h % 2 ? -1 : 1) * t[n][d] * rk(t, e - 1, c, u, i | p, a), h++);
  }
  return a[o] = f, f;
}
function v9(t, e) {
  var n = [
    [t[0], t[1], 1, 0, 0, 0, -e[0] * t[0], -e[0] * t[1]],
    [0, 0, 0, t[0], t[1], 1, -e[1] * t[0], -e[1] * t[1]],
    [t[2], t[3], 1, 0, 0, 0, -e[2] * t[2], -e[2] * t[3]],
    [0, 0, 0, t[2], t[3], 1, -e[3] * t[2], -e[3] * t[3]],
    [t[4], t[5], 1, 0, 0, 0, -e[4] * t[4], -e[4] * t[5]],
    [0, 0, 0, t[4], t[5], 1, -e[5] * t[4], -e[5] * t[5]],
    [t[6], t[7], 1, 0, 0, 0, -e[6] * t[6], -e[6] * t[7]],
    [0, 0, 0, t[6], t[7], 1, -e[7] * t[6], -e[7] * t[7]]
  ], r = {}, i = rk(n, 8, 0, 0, 0, r);
  if (i !== 0) {
    for (var a = [], o = 0; o < 8; o++)
      for (var s = 0; s < 8; s++)
        a[s] == null && (a[s] = 0), a[s] += ((o + s) % 2 ? -1 : 1) * rk(n, 7, o === 0 ? 1 : 0, 1 << o, 1 << s, r) / i * e[o];
    return function(l, u, c) {
      var f = u * a[6] + c * a[7] + 1;
      l[0] = (u * a[0] + c * a[1] + a[2]) / f, l[1] = (u * a[3] + c * a[4] + a[5]) / f;
    };
  }
}
var g9 = "___zrEVENTSAVED", PE = [];
function E9e(t, e, n, r, i) {
  return ik(PE, e, r, i, !0) && ik(t, n, PE[0], PE[1]);
}
function ik(t, e, n, r, i) {
  if (e.getBoundingClientRect && Gt.domSupported && !tse(e)) {
    var a = e[g9] || (e[g9] = {}), o = M9e(e, a), s = I9e(o, a, i);
    if (s)
      return s(t, n, r), !0;
  }
  return !1;
}
function M9e(t, e) {
  var n = e.markers;
  if (n)
    return n;
  n = e.markers = [];
  for (var r = ["left", "right"], i = ["top", "bottom"], a = 0; a < 4; a++) {
    var o = document.createElement("div"), s = o.style, l = a % 2, u = (a >> 1) % 2;
    s.cssText = [
      "position: absolute",
      "visibility: hidden",
      "padding: 0",
      "margin: 0",
      "border-width: 0",
      "user-select: none",
      "width:0",
      "height:0",
      r[l] + ":0",
      i[u] + ":0",
      r[1 - l] + ":auto",
      i[1 - u] + ":auto",
      ""
    ].join("!important;"), t.appendChild(o), n.push(o);
  }
  return n;
}
function I9e(t, e, n) {
  for (var r = n ? "invTrans" : "trans", i = e[r], a = e.srcCoords, o = [], s = [], l = !0, u = 0; u < 4; u++) {
    var c = t[u].getBoundingClientRect(), f = 2 * u, d = c.left, h = c.top;
    o.push(d, h), l = l && a && d === a[f] && h === a[f + 1], s.push(t[u].offsetLeft, t[u].offsetTop);
  }
  return l && i ? i : (e.srcCoords = o, e[r] = n ? v9(s, o) : v9(o, s));
}
function tse(t) {
  return t.nodeName.toUpperCase() === "CANVAS";
}
var D9e = /([&<>"'])/g, R9e = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#39;"
};
function ea(t) {
  return t == null ? "" : (t + "").replace(D9e, function(e, n) {
    return R9e[n];
  });
}
var k9e = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, $E = [], L9e = Gt.browser.firefox && +Gt.browser.version.split(".")[0] < 39;
function ak(t, e, n, r) {
  return n = n || {}, r ? m9(t, e, n) : L9e && e.layerX != null && e.layerX !== e.offsetX ? (n.zrX = e.layerX, n.zrY = e.layerY) : e.offsetX != null ? (n.zrX = e.offsetX, n.zrY = e.offsetY) : m9(t, e, n), n;
}
function m9(t, e, n) {
  if (Gt.domSupported && t.getBoundingClientRect) {
    var r = e.clientX, i = e.clientY;
    if (tse(t)) {
      var a = t.getBoundingClientRect();
      n.zrX = r - a.left, n.zrY = i - a.top;
      return;
    } else if (ik($E, t, r, i)) {
      n.zrX = $E[0], n.zrY = $E[1];
      return;
    }
  }
  n.zrX = n.zrY = 0;
}
function O5(t) {
  return t || window.event;
}
function No(t, e, n) {
  if (e = O5(e), e.zrX != null)
    return e;
  var r = e.type, i = r && r.indexOf("touch") >= 0;
  if (i) {
    var o = r !== "touchend" ? e.targetTouches[0] : e.changedTouches[0];
    o && ak(t, o, e, n);
  } else {
    ak(t, e, e, n);
    var a = N9e(e);
    e.zrDelta = a ? a / 120 : -(e.detail || 0) / 3;
  }
  var s = e.button;
  return e.which == null && s !== void 0 && k9e.test(e.type) && (e.which = s & 1 ? 1 : s & 2 ? 3 : s & 4 ? 2 : 0), e;
}
function N9e(t) {
  var e = t.wheelDelta;
  if (e)
    return e;
  var n = t.deltaX, r = t.deltaY;
  if (n == null || r == null)
    return e;
  var i = Math.abs(r !== 0 ? r : n), a = r > 0 ? -1 : r < 0 ? 1 : n > 0 ? -1 : 1;
  return 3 * i * a;
}
function ok(t, e, n, r) {
  t.addEventListener(e, n, r);
}
function B9e(t, e, n, r) {
  t.removeEventListener(e, n, r);
}
var Vu = function(t) {
  t.preventDefault(), t.stopPropagation(), t.cancelBubble = !0;
};
function y9(t) {
  return t.which === 2 || t.which === 3;
}
var z9e = function() {
  function t() {
    this._track = [];
  }
  return t.prototype.recognize = function(e, n, r) {
    return this._doTrack(e, n, r), this._recognize(e);
  }, t.prototype.clear = function() {
    return this._track.length = 0, this;
  }, t.prototype._doTrack = function(e, n, r) {
    var i = e.touches;
    if (i) {
      for (var a = {
        points: [],
        touches: [],
        target: n,
        event: e
      }, o = 0, s = i.length; o < s; o++) {
        var l = i[o], u = ak(r, l, {});
        a.points.push([u.zrX, u.zrY]), a.touches.push(l);
      }
      this._track.push(a);
    }
  }, t.prototype._recognize = function(e) {
    for (var n in AE)
      if (AE.hasOwnProperty(n)) {
        var r = AE[n](this._track, e);
        if (r)
          return r;
      }
  }, t;
}();
function b9(t) {
  var e = t[1][0] - t[0][0], n = t[1][1] - t[0][1];
  return Math.sqrt(e * e + n * n);
}
function V9e(t) {
  return [
    (t[0][0] + t[1][0]) / 2,
    (t[0][1] + t[1][1]) / 2
  ];
}
var AE = {
  pinch: function(t, e) {
    var n = t.length;
    if (n) {
      var r = (t[n - 1] || {}).points, i = (t[n - 2] || {}).points || r;
      if (i && i.length > 1 && r && r.length > 1) {
        var a = b9(r) / b9(i);
        !isFinite(a) && (a = 1), e.pinchScale = a;
        var o = V9e(r);
        return e.pinchX = o[0], e.pinchY = o[1], {
          type: "pinch",
          target: t[0].target,
          event: e
        };
      }
    }
  }
};
function Na() {
  return [1, 0, 0, 1, 0, 0];
}
function i1(t) {
  return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 0, t[5] = 0, t;
}
function lP(t, e) {
  return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4], t[5] = e[5], t;
}
function Ll(t, e, n) {
  var r = e[0] * n[0] + e[2] * n[1], i = e[1] * n[0] + e[3] * n[1], a = e[0] * n[2] + e[2] * n[3], o = e[1] * n[2] + e[3] * n[3], s = e[0] * n[4] + e[2] * n[5] + e[4], l = e[1] * n[4] + e[3] * n[5] + e[5];
  return t[0] = r, t[1] = i, t[2] = a, t[3] = o, t[4] = s, t[5] = l, t;
}
function Gs(t, e, n) {
  return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4] + n[0], t[5] = e[5] + n[1], t;
}
function Lf(t, e, n, r) {
  r === void 0 && (r = [0, 0]);
  var i = e[0], a = e[2], o = e[4], s = e[1], l = e[3], u = e[5], c = Math.sin(n), f = Math.cos(n);
  return t[0] = i * f + s * c, t[1] = -i * c + s * f, t[2] = a * f + l * c, t[3] = -a * c + f * l, t[4] = f * (o - r[0]) + c * (u - r[1]) + r[0], t[5] = f * (u - r[1]) - c * (o - r[0]) + r[1], t;
}
function uP(t, e, n) {
  var r = n[0], i = n[1];
  return t[0] = e[0] * r, t[1] = e[1] * i, t[2] = e[2] * r, t[3] = e[3] * i, t[4] = e[4] * r, t[5] = e[5] * i, t;
}
function dp(t, e) {
  var n = e[0], r = e[2], i = e[4], a = e[1], o = e[3], s = e[5], l = n * o - a * r;
  return l ? (l = 1 / l, t[0] = o * l, t[1] = -a * l, t[2] = -r * l, t[3] = n * l, t[4] = (r * s - o * i) * l, t[5] = (a * i - n * s) * l, t) : null;
}
function nse(t) {
  var e = Na();
  return lP(e, t), e;
}
const F9e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  clone: nse,
  copy: lP,
  create: Na,
  identity: i1,
  invert: dp,
  mul: Ll,
  rotate: Lf,
  scale: uP,
  translate: Gs
}, Symbol.toStringTag, { value: "Module" }));
var yt = function() {
  function t(e, n) {
    this.x = e || 0, this.y = n || 0;
  }
  return t.prototype.copy = function(e) {
    return this.x = e.x, this.y = e.y, this;
  }, t.prototype.clone = function() {
    return new t(this.x, this.y);
  }, t.prototype.set = function(e, n) {
    return this.x = e, this.y = n, this;
  }, t.prototype.equal = function(e) {
    return e.x === this.x && e.y === this.y;
  }, t.prototype.add = function(e) {
    return this.x += e.x, this.y += e.y, this;
  }, t.prototype.scale = function(e) {
    this.x *= e, this.y *= e;
  }, t.prototype.scaleAndAdd = function(e, n) {
    this.x += e.x * n, this.y += e.y * n;
  }, t.prototype.sub = function(e) {
    return this.x -= e.x, this.y -= e.y, this;
  }, t.prototype.dot = function(e) {
    return this.x * e.x + this.y * e.y;
  }, t.prototype.len = function() {
    return Math.sqrt(this.x * this.x + this.y * this.y);
  }, t.prototype.lenSquare = function() {
    return this.x * this.x + this.y * this.y;
  }, t.prototype.normalize = function() {
    var e = this.len();
    return this.x /= e, this.y /= e, this;
  }, t.prototype.distance = function(e) {
    var n = this.x - e.x, r = this.y - e.y;
    return Math.sqrt(n * n + r * r);
  }, t.prototype.distanceSquare = function(e) {
    var n = this.x - e.x, r = this.y - e.y;
    return n * n + r * r;
  }, t.prototype.negate = function() {
    return this.x = -this.x, this.y = -this.y, this;
  }, t.prototype.transform = function(e) {
    if (e) {
      var n = this.x, r = this.y;
      return this.x = e[0] * n + e[2] * r + e[4], this.y = e[1] * n + e[3] * r + e[5], this;
    }
  }, t.prototype.toArray = function(e) {
    return e[0] = this.x, e[1] = this.y, e;
  }, t.prototype.fromArray = function(e) {
    this.x = e[0], this.y = e[1];
  }, t.set = function(e, n, r) {
    e.x = n, e.y = r;
  }, t.copy = function(e, n) {
    e.x = n.x, e.y = n.y;
  }, t.len = function(e) {
    return Math.sqrt(e.x * e.x + e.y * e.y);
  }, t.lenSquare = function(e) {
    return e.x * e.x + e.y * e.y;
  }, t.dot = function(e, n) {
    return e.x * n.x + e.y * n.y;
  }, t.add = function(e, n, r) {
    e.x = n.x + r.x, e.y = n.y + r.y;
  }, t.sub = function(e, n, r) {
    e.x = n.x - r.x, e.y = n.y - r.y;
  }, t.scale = function(e, n, r) {
    e.x = n.x * r, e.y = n.y * r;
  }, t.scaleAndAdd = function(e, n, r, i) {
    e.x = n.x + r.x * i, e.y = n.y + r.y * i;
  }, t.lerp = function(e, n, r, i) {
    var a = 1 - i;
    e.x = a * n.x + i * r.x, e.y = a * n.y + i * r.y;
  }, t;
}(), rS = Math.min, iS = Math.max, ld = new yt(), ud = new yt(), cd = new yt(), fd = new yt(), w0 = new yt(), C0 = new yt(), W9e = function() {
  function t(e, n, r, i) {
    r < 0 && (e = e + r, r = -r), i < 0 && (n = n + i, i = -i), this.x = e, this.y = n, this.width = r, this.height = i;
  }
  return t.prototype.union = function(e) {
    var n = rS(e.x, this.x), r = rS(e.y, this.y);
    isFinite(this.x) && isFinite(this.width) ? this.width = iS(e.x + e.width, this.x + this.width) - n : this.width = e.width, isFinite(this.y) && isFinite(this.height) ? this.height = iS(e.y + e.height, this.y + this.height) - r : this.height = e.height, this.x = n, this.y = r;
  }, t.prototype.applyTransform = function(e) {
    t.applyTransform(this, this, e);
  }, t.prototype.calculateTransform = function(e) {
    var n = this, r = e.width / n.width, i = e.height / n.height, a = Na();
    return Gs(a, a, [-n.x, -n.y]), uP(a, a, [r, i]), Gs(a, a, [e.x, e.y]), a;
  }, t.prototype.intersect = function(e, n) {
    if (!e)
      return !1;
    e instanceof t || (e = t.create(e));
    var r = this, i = r.x, a = r.x + r.width, o = r.y, s = r.y + r.height, l = e.x, u = e.x + e.width, c = e.y, f = e.y + e.height, d = !(a < l || u < i || s < c || f < o);
    if (n) {
      var h = 1 / 0, p = 0, v = Math.abs(a - l), g = Math.abs(u - i), m = Math.abs(s - c), y = Math.abs(f - o), _ = Math.min(v, g), O = Math.min(m, y);
      a < l || u < i ? _ > p && (p = _, v < g ? yt.set(C0, -v, 0) : yt.set(C0, g, 0)) : _ < h && (h = _, v < g ? yt.set(w0, v, 0) : yt.set(w0, -g, 0)), s < c || f < o ? O > p && (p = O, m < y ? yt.set(C0, 0, -m) : yt.set(C0, 0, y)) : _ < h && (h = _, m < y ? yt.set(w0, 0, m) : yt.set(w0, 0, -y));
    }
    return n && yt.copy(n, d ? w0 : C0), d;
  }, t.prototype.contain = function(e, n) {
    var r = this;
    return e >= r.x && e <= r.x + r.width && n >= r.y && n <= r.y + r.height;
  }, t.prototype.clone = function() {
    return new t(this.x, this.y, this.width, this.height);
  }, t.prototype.copy = function(e) {
    t.copy(this, e);
  }, t.prototype.plain = function() {
    return {
      x: this.x,
      y: this.y,
      width: this.width,
      height: this.height
    };
  }, t.prototype.isFinite = function() {
    return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height);
  }, t.prototype.isZero = function() {
    return this.width === 0 || this.height === 0;
  }, t.create = function(e) {
    return new t(e.x, e.y, e.width, e.height);
  }, t.copy = function(e, n) {
    e.x = n.x, e.y = n.y, e.width = n.width, e.height = n.height;
  }, t.applyTransform = function(e, n, r) {
    if (!r) {
      e !== n && t.copy(e, n);
      return;
    }
    if (r[1] < 1e-5 && r[1] > -1e-5 && r[2] < 1e-5 && r[2] > -1e-5) {
      var i = r[0], a = r[3], o = r[4], s = r[5];
      e.x = n.x * i + o, e.y = n.y * a + s, e.width = n.width * i, e.height = n.height * a, e.width < 0 && (e.x += e.width, e.width = -e.width), e.height < 0 && (e.y += e.height, e.height = -e.height);
      return;
    }
    ld.x = cd.x = n.x, ld.y = fd.y = n.y, ud.x = fd.x = n.x + n.width, ud.y = cd.y = n.y + n.height, ld.transform(r), fd.transform(r), ud.transform(r), cd.transform(r), e.x = rS(ld.x, ud.x, cd.x, fd.x), e.y = rS(ld.y, ud.y, cd.y, fd.y);
    var l = iS(ld.x, ud.x, cd.x, fd.x), u = iS(ld.y, ud.y, cd.y, fd.y);
    e.width = l - e.x, e.height = u - e.y;
  }, t;
}();
const bt = W9e;
var rse = "silent";
function Q9e(t, e, n) {
  return {
    type: t,
    event: n,
    target: e.target,
    topTarget: e.topTarget,
    cancelBubble: !1,
    offsetX: n.zrX,
    offsetY: n.zrY,
    gestureEvent: n.gestureEvent,
    pinchX: n.pinchX,
    pinchY: n.pinchY,
    pinchScale: n.pinchScale,
    wheelDelta: n.zrDelta,
    zrByTouch: n.zrByTouch,
    which: n.which,
    stop: H9e
  };
}
function H9e() {
  Vu(this.event);
}
var G9e = function(t) {
  le(e, t);
  function e() {
    var n = t !== null && t.apply(this, arguments) || this;
    return n.handler = null, n;
  }
  return e.prototype.dispose = function() {
  }, e.prototype.setCursor = function() {
  }, e;
}(fs), T0 = /* @__PURE__ */ function() {
  function t(e, n) {
    this.x = e, this.y = n;
  }
  return t;
}(), j9e = [
  "click",
  "dblclick",
  "mousewheel",
  "mouseout",
  "mouseup",
  "mousedown",
  "mousemove",
  "contextmenu"
], EE = new bt(0, 0, 0, 0), ise = function(t) {
  le(e, t);
  function e(n, r, i, a, o) {
    var s = t.call(this) || this;
    return s._hovered = new T0(0, 0), s.storage = n, s.painter = r, s.painterRoot = a, s._pointerSize = o, i = i || new G9e(), s.proxy = null, s.setHandlerProxy(i), s._draggingMgr = new $9e(s), s;
  }
  return e.prototype.setHandlerProxy = function(n) {
    this.proxy && this.proxy.dispose(), n && (F(j9e, function(r) {
      n.on && n.on(r, this[r], this);
    }, this), n.handler = this), this.proxy = n;
  }, e.prototype.mousemove = function(n) {
    var r = n.zrX, i = n.zrY, a = ase(this, r, i), o = this._hovered, s = o.target;
    s && !s.__zr && (o = this.findHover(o.x, o.y), s = o.target);
    var l = this._hovered = a ? new T0(r, i) : this.findHover(r, i), u = l.target, c = this.proxy;
    c.setCursor && c.setCursor(u ? u.cursor : "default"), s && u !== s && this.dispatchToElement(o, "mouseout", n), this.dispatchToElement(l, "mousemove", n), u && u !== s && this.dispatchToElement(l, "mouseover", n);
  }, e.prototype.mouseout = function(n) {
    var r = n.zrEventControl;
    r !== "only_globalout" && this.dispatchToElement(this._hovered, "mouseout", n), r !== "no_globalout" && this.trigger("globalout", { type: "globalout", event: n });
  }, e.prototype.resize = function() {
    this._hovered = new T0(0, 0);
  }, e.prototype.dispatch = function(n, r) {
    var i = this[n];
    i && i.call(this, r);
  }, e.prototype.dispose = function() {
    this.proxy.dispose(), this.storage = null, this.proxy = null, this.painter = null;
  }, e.prototype.setCursorStyle = function(n) {
    var r = this.proxy;
    r.setCursor && r.setCursor(n);
  }, e.prototype.dispatchToElement = function(n, r, i) {
    n = n || {};
    var a = n.target;
    if (!(a && a.silent)) {
      for (var o = "on" + r, s = Q9e(r, n, i); a && (a[o] && (s.cancelBubble = !!a[o].call(a, s)), a.trigger(r, s), a = a.__hostTarget ? a.__hostTarget : a.parent, !s.cancelBubble); )
        ;
      s.cancelBubble || (this.trigger(r, s), this.painter && this.painter.eachOtherLayer && this.painter.eachOtherLayer(function(l) {
        typeof l[o] == "function" && l[o].call(l, s), l.trigger && l.trigger(r, s);
      }));
    }
  }, e.prototype.findHover = function(n, r, i) {
    var a = this.storage.getDisplayList(), o = new T0(n, r);
    if (_9(a, o, n, r, i), this._pointerSize && !o.target) {
      for (var s = [], l = this._pointerSize, u = l / 2, c = new bt(n - u, r - u, l, l), f = a.length - 1; f >= 0; f--) {
        var d = a[f];
        d !== i && !d.ignore && !d.ignoreCoarsePointer && (!d.parent || !d.parent.ignoreCoarsePointer) && (EE.copy(d.getBoundingRect()), d.transform && EE.applyTransform(d.transform), EE.intersect(c) && s.push(d));
      }
      if (s.length)
        for (var h = 4, p = Math.PI / 12, v = Math.PI * 2, g = 0; g < u; g += h)
          for (var m = 0; m < v; m += p) {
            var y = n + g * Math.cos(m), _ = r + g * Math.sin(m);
            if (_9(s, o, y, _, i), o.target)
              return o;
          }
    }
    return o;
  }, e.prototype.processGesture = function(n, r) {
    this._gestureMgr || (this._gestureMgr = new z9e());
    var i = this._gestureMgr;
    r === "start" && i.clear();
    var a = i.recognize(n, this.findHover(n.zrX, n.zrY, null).target, this.proxy.dom);
    if (r === "end" && i.clear(), a) {
      var o = a.type;
      n.gestureEvent = o;
      var s = new T0();
      s.target = a.target, this.dispatchToElement(s, o, a.event);
    }
  }, e;
}(fs);
F(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function(t) {
  ise.prototype[t] = function(e) {
    var n = e.zrX, r = e.zrY, i = ase(this, n, r), a, o;
    if ((t !== "mouseup" || !i) && (a = this.findHover(n, r), o = a.target), t === "mousedown")
      this._downEl = o, this._downPoint = [e.zrX, e.zrY], this._upEl = o;
    else if (t === "mouseup")
      this._upEl = o;
    else if (t === "click") {
      if (this._downEl !== this._upEl || !this._downPoint || wu(this._downPoint, [e.zrX, e.zrY]) > 4)
        return;
      this._downPoint = null;
    }
    this.dispatchToElement(a, t, e);
  };
});
function Z9e(t, e, n) {
  if (t[t.rectHover ? "rectContain" : "contain"](e, n)) {
    for (var r = t, i = void 0, a = !1; r; ) {
      if (r.ignoreClip && (a = !0), !a) {
        var o = r.getClipPath();
        if (o && !o.contain(e, n))
          return !1;
      }
      r.silent && (i = !0);
      var s = r.__hostTarget;
      r = s || r.parent;
    }
    return i ? rse : !0;
  }
  return !1;
}
function _9(t, e, n, r, i) {
  for (var a = t.length - 1; a >= 0; a--) {
    var o = t[a], s = void 0;
    if (o !== i && !o.ignore && (s = Z9e(o, n, r)) && (!e.topTarget && (e.topTarget = o), s !== rse)) {
      e.target = o;
      break;
    }
  }
}
function ase(t, e, n) {
  var r = t.painter;
  return e < 0 || e > r.getWidth() || n < 0 || n > r.getHeight();
}
var ose = 32, P0 = 7;
function U9e(t) {
  for (var e = 0; t >= ose; )
    e |= t & 1, t >>= 1;
  return t + e;
}
function O9(t, e, n, r) {
  var i = e + 1;
  if (i === n)
    return 1;
  if (r(t[i++], t[e]) < 0) {
    for (; i < n && r(t[i], t[i - 1]) < 0; )
      i++;
    X9e(t, e, i);
  } else
    for (; i < n && r(t[i], t[i - 1]) >= 0; )
      i++;
  return i - e;
}
function X9e(t, e, n) {
  for (n--; e < n; ) {
    var r = t[e];
    t[e++] = t[n], t[n--] = r;
  }
}
function S9(t, e, n, r, i) {
  for (r === e && r++; r < n; r++) {
    for (var a = t[r], o = e, s = r, l; o < s; )
      l = o + s >>> 1, i(a, t[l]) < 0 ? s = l : o = l + 1;
    var u = r - o;
    switch (u) {
      case 3:
        t[o + 3] = t[o + 2];
      case 2:
        t[o + 2] = t[o + 1];
      case 1:
        t[o + 1] = t[o];
        break;
      default:
        for (; u > 0; )
          t[o + u] = t[o + u - 1], u--;
    }
    t[o] = a;
  }
}
function ME(t, e, n, r, i, a) {
  var o = 0, s = 0, l = 1;
  if (a(t, e[n + i]) > 0) {
    for (s = r - i; l < s && a(t, e[n + i + l]) > 0; )
      o = l, l = (l << 1) + 1, l <= 0 && (l = s);
    l > s && (l = s), o += i, l += i;
  } else {
    for (s = i + 1; l < s && a(t, e[n + i - l]) <= 0; )
      o = l, l = (l << 1) + 1, l <= 0 && (l = s);
    l > s && (l = s);
    var u = o;
    o = i - l, l = i - u;
  }
  for (o++; o < l; ) {
    var c = o + (l - o >>> 1);
    a(t, e[n + c]) > 0 ? o = c + 1 : l = c;
  }
  return l;
}
function IE(t, e, n, r, i, a) {
  var o = 0, s = 0, l = 1;
  if (a(t, e[n + i]) < 0) {
    for (s = i + 1; l < s && a(t, e[n + i - l]) < 0; )
      o = l, l = (l << 1) + 1, l <= 0 && (l = s);
    l > s && (l = s);
    var u = o;
    o = i - l, l = i - u;
  } else {
    for (s = r - i; l < s && a(t, e[n + i + l]) >= 0; )
      o = l, l = (l << 1) + 1, l <= 0 && (l = s);
    l > s && (l = s), o += i, l += i;
  }
  for (o++; o < l; ) {
    var c = o + (l - o >>> 1);
    a(t, e[n + c]) < 0 ? l = c : o = c + 1;
  }
  return l;
}
function Y9e(t, e) {
  var n = P0, r, i, a = 0, o = [];
  r = [], i = [];
  function s(h, p) {
    r[a] = h, i[a] = p, a += 1;
  }
  function l() {
    for (; a > 1; ) {
      var h = a - 2;
      if (h >= 1 && i[h - 1] <= i[h] + i[h + 1] || h >= 2 && i[h - 2] <= i[h] + i[h - 1])
        i[h - 1] < i[h + 1] && h--;
      else if (i[h] > i[h + 1])
        break;
      c(h);
    }
  }
  function u() {
    for (; a > 1; ) {
      var h = a - 2;
      h > 0 && i[h - 1] < i[h + 1] && h--, c(h);
    }
  }
  function c(h) {
    var p = r[h], v = i[h], g = r[h + 1], m = i[h + 1];
    i[h] = v + m, h === a - 3 && (r[h + 1] = r[h + 2], i[h + 1] = i[h + 2]), a--;
    var y = IE(t[g], t, p, v, 0, e);
    p += y, v -= y, v !== 0 && (m = ME(t[p + v - 1], t, g, m, m - 1, e), m !== 0 && (v <= m ? f(p, v, g, m) : d(p, v, g, m)));
  }
  function f(h, p, v, g) {
    var m = 0;
    for (m = 0; m < p; m++)
      o[m] = t[h + m];
    var y = 0, _ = v, O = h;
    if (t[O++] = t[_++], --g === 0) {
      for (m = 0; m < p; m++)
        t[O + m] = o[y + m];
      return;
    }
    if (p === 1) {
      for (m = 0; m < g; m++)
        t[O + m] = t[_ + m];
      t[O + g] = o[y];
      return;
    }
    for (var S = n, x, C, P; ; ) {
      x = 0, C = 0, P = !1;
      do
        if (e(t[_], o[y]) < 0) {
          if (t[O++] = t[_++], C++, x = 0, --g === 0) {
            P = !0;
            break;
          }
        } else if (t[O++] = o[y++], x++, C = 0, --p === 1) {
          P = !0;
          break;
        }
      while ((x | C) < S);
      if (P)
        break;
      do {
        if (x = IE(t[_], o, y, p, 0, e), x !== 0) {
          for (m = 0; m < x; m++)
            t[O + m] = o[y + m];
          if (O += x, y += x, p -= x, p <= 1) {
            P = !0;
            break;
          }
        }
        if (t[O++] = t[_++], --g === 0) {
          P = !0;
          break;
        }
        if (C = ME(o[y], t, _, g, 0, e), C !== 0) {
          for (m = 0; m < C; m++)
            t[O + m] = t[_ + m];
          if (O += C, _ += C, g -= C, g === 0) {
            P = !0;
            break;
          }
        }
        if (t[O++] = o[y++], --p === 1) {
          P = !0;
          break;
        }
        S--;
      } while (x >= P0 || C >= P0);
      if (P)
        break;
      S < 0 && (S = 0), S += 2;
    }
    if (n = S, n < 1 && (n = 1), p === 1) {
      for (m = 0; m < g; m++)
        t[O + m] = t[_ + m];
      t[O + g] = o[y];
    } else {
      if (p === 0)
        throw new Error();
      for (m = 0; m < p; m++)
        t[O + m] = o[y + m];
    }
  }
  function d(h, p, v, g) {
    var m = 0;
    for (m = 0; m < g; m++)
      o[m] = t[v + m];
    var y = h + p - 1, _ = g - 1, O = v + g - 1, S = 0, x = 0;
    if (t[O--] = t[y--], --p === 0) {
      for (S = O - (g - 1), m = 0; m < g; m++)
        t[S + m] = o[m];
      return;
    }
    if (g === 1) {
      for (O -= p, y -= p, x = O + 1, S = y + 1, m = p - 1; m >= 0; m--)
        t[x + m] = t[S + m];
      t[O] = o[_];
      return;
    }
    for (var C = n; ; ) {
      var P = 0, $ = 0, T = !1;
      do
        if (e(o[_], t[y]) < 0) {
          if (t[O--] = t[y--], P++, $ = 0, --p === 0) {
            T = !0;
            break;
          }
        } else if (t[O--] = o[_--], $++, P = 0, --g === 1) {
          T = !0;
          break;
        }
      while ((P | $) < C);
      if (T)
        break;
      do {
        if (P = p - IE(o[_], t, h, p, p - 1, e), P !== 0) {
          for (O -= P, y -= P, p -= P, x = O + 1, S = y + 1, m = P - 1; m >= 0; m--)
            t[x + m] = t[S + m];
          if (p === 0) {
            T = !0;
            break;
          }
        }
        if (t[O--] = o[_--], --g === 1) {
          T = !0;
          break;
        }
        if ($ = g - ME(t[y], o, 0, g, g - 1, e), $ !== 0) {
          for (O -= $, _ -= $, g -= $, x = O + 1, S = _ + 1, m = 0; m < $; m++)
            t[x + m] = o[S + m];
          if (g <= 1) {
            T = !0;
            break;
          }
        }
        if (t[O--] = t[y--], --p === 0) {
          T = !0;
          break;
        }
        C--;
      } while (P >= P0 || $ >= P0);
      if (T)
        break;
      C < 0 && (C = 0), C += 2;
    }
    if (n = C, n < 1 && (n = 1), g === 1) {
      for (O -= p, y -= p, x = O + 1, S = y + 1, m = p - 1; m >= 0; m--)
        t[x + m] = t[S + m];
      t[O] = o[_];
    } else {
      if (g === 0)
        throw new Error();
      for (S = O - (g - 1), m = 0; m < g; m++)
        t[S + m] = o[m];
    }
  }
  return {
    mergeRuns: l,
    forceMergeRuns: u,
    pushRun: s
  };
}
function aw(t, e, n, r) {
  n || (n = 0), r || (r = t.length);
  var i = r - n;
  if (!(i < 2)) {
    var a = 0;
    if (i < ose) {
      a = O9(t, n, r, e), S9(t, n, r, n + a, e);
      return;
    }
    var o = Y9e(t, e), s = U9e(i);
    do {
      if (a = O9(t, n, r, e), a < s) {
        var l = i;
        l > s && (l = s), S9(t, n, n + l, n + a, e), a = l;
      }
      o.pushRun(n, a), o.mergeRuns(), i -= a, n += a;
    } while (i !== 0);
    o.forceMergeRuns();
  }
}
var to = 1, hy = 2, _v = 4, x9 = !1;
function DE() {
  x9 || (x9 = !0, console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"));
}
function w9(t, e) {
  return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel;
}
var q9e = function() {
  function t() {
    this._roots = [], this._displayList = [], this._displayListLen = 0, this.displayableSortFunc = w9;
  }
  return t.prototype.traverse = function(e, n) {
    for (var r = 0; r < this._roots.length; r++)
      this._roots[r].traverse(e, n);
  }, t.prototype.getDisplayList = function(e, n) {
    n = n || !1;
    var r = this._displayList;
    return (e || !r.length) && this.updateDisplayList(n), r;
  }, t.prototype.updateDisplayList = function(e) {
    this._displayListLen = 0;
    for (var n = this._roots, r = this._displayList, i = 0, a = n.length; i < a; i++)
      this._updateAndAddDisplayable(n[i], null, e);
    r.length = this._displayListLen, aw(r, w9);
  }, t.prototype._updateAndAddDisplayable = function(e, n, r) {
    if (!(e.ignore && !r)) {
      e.beforeUpdate(), e.update(), e.afterUpdate();
      var i = e.getClipPath();
      if (e.ignoreClip)
        n = null;
      else if (i) {
        n ? n = n.slice() : n = [];
        for (var a = i, o = e; a; )
          a.parent = o, a.updateTransform(), n.push(a), o = a, a = a.getClipPath();
      }
      if (e.childrenRef) {
        for (var s = e.childrenRef(), l = 0; l < s.length; l++) {
          var u = s[l];
          e.__dirty && (u.__dirty |= to), this._updateAndAddDisplayable(u, n, r);
        }
        e.__dirty = 0;
      } else {
        var c = e;
        n && n.length ? c.__clipPaths = n : c.__clipPaths && c.__clipPaths.length > 0 && (c.__clipPaths = []), isNaN(c.z) && (DE(), c.z = 0), isNaN(c.z2) && (DE(), c.z2 = 0), isNaN(c.zlevel) && (DE(), c.zlevel = 0), this._displayList[this._displayListLen++] = c;
      }
      var f = e.getDecalElement && e.getDecalElement();
      f && this._updateAndAddDisplayable(f, n, r);
      var d = e.getTextGuideLine();
      d && this._updateAndAddDisplayable(d, n, r);
      var h = e.getTextContent();
      h && this._updateAndAddDisplayable(h, n, r);
    }
  }, t.prototype.addRoot = function(e) {
    e.__zr && e.__zr.storage === this || this._roots.push(e);
  }, t.prototype.delRoot = function(e) {
    if (e instanceof Array) {
      for (var n = 0, r = e.length; n < r; n++)
        this.delRoot(e[n]);
      return;
    }
    var i = St(this._roots, e);
    i >= 0 && this._roots.splice(i, 1);
  }, t.prototype.delAllRoots = function() {
    this._roots = [], this._displayList = [], this._displayListLen = 0;
  }, t.prototype.getRoots = function() {
    return this._roots;
  }, t.prototype.dispose = function() {
    this._displayList = null, this._roots = null;
  }, t;
}(), SC;
SC = Gt.hasGlobalWindow && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function(t) {
  return setTimeout(t, 16);
};
var qy = {
  linear: function(t) {
    return t;
  },
  quadraticIn: function(t) {
    return t * t;
  },
  quadraticOut: function(t) {
    return t * (2 - t);
  },
  quadraticInOut: function(t) {
    return (t *= 2) < 1 ? 0.5 * t * t : -0.5 * (--t * (t - 2) - 1);
  },
  cubicIn: function(t) {
    return t * t * t;
  },
  cubicOut: function(t) {
    return --t * t * t + 1;
  },
  cubicInOut: function(t) {
    return (t *= 2) < 1 ? 0.5 * t * t * t : 0.5 * ((t -= 2) * t * t + 2);
  },
  quarticIn: function(t) {
    return t * t * t * t;
  },
  quarticOut: function(t) {
    return 1 - --t * t * t * t;
  },
  quarticInOut: function(t) {
    return (t *= 2) < 1 ? 0.5 * t * t * t * t : -0.5 * ((t -= 2) * t * t * t - 2);
  },
  quinticIn: function(t) {
    return t * t * t * t * t;
  },
  quinticOut: function(t) {
    return --t * t * t * t * t + 1;
  },
  quinticInOut: function(t) {
    return (t *= 2) < 1 ? 0.5 * t * t * t * t * t : 0.5 * ((t -= 2) * t * t * t * t + 2);
  },
  sinusoidalIn: function(t) {
    return 1 - Math.cos(t * Math.PI / 2);
  },
  sinusoidalOut: function(t) {
    return Math.sin(t * Math.PI / 2);
  },
  sinusoidalInOut: function(t) {
    return 0.5 * (1 - Math.cos(Math.PI * t));
  },
  exponentialIn: function(t) {
    return t === 0 ? 0 : Math.pow(1024, t - 1);
  },
  exponentialOut: function(t) {
    return t === 1 ? 1 : 1 - Math.pow(2, -10 * t);
  },
  exponentialInOut: function(t) {
    return t === 0 ? 0 : t === 1 ? 1 : (t *= 2) < 1 ? 0.5 * Math.pow(1024, t - 1) : 0.5 * (-Math.pow(2, -10 * (t - 1)) + 2);
  },
  circularIn: function(t) {
    return 1 - Math.sqrt(1 - t * t);
  },
  circularOut: function(t) {
    return Math.sqrt(1 - --t * t);
  },
  circularInOut: function(t) {
    return (t *= 2) < 1 ? -0.5 * (Math.sqrt(1 - t * t) - 1) : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);
  },
  elasticIn: function(t) {
    var e, n = 0.1, r = 0.4;
    return t === 0 ? 0 : t === 1 ? 1 : (!n || n < 1 ? (n = 1, e = r / 4) : e = r * Math.asin(1 / n) / (2 * Math.PI), -(n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / r)));
  },
  elasticOut: function(t) {
    var e, n = 0.1, r = 0.4;
    return t === 0 ? 0 : t === 1 ? 1 : (!n || n < 1 ? (n = 1, e = r / 4) : e = r * Math.asin(1 / n) / (2 * Math.PI), n * Math.pow(2, -10 * t) * Math.sin((t - e) * (2 * Math.PI) / r) + 1);
  },
  elasticInOut: function(t) {
    var e, n = 0.1, r = 0.4;
    return t === 0 ? 0 : t === 1 ? 1 : (!n || n < 1 ? (n = 1, e = r / 4) : e = r * Math.asin(1 / n) / (2 * Math.PI), (t *= 2) < 1 ? -0.5 * (n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / r)) : n * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / r) * 0.5 + 1);
  },
  backIn: function(t) {
    var e = 1.70158;
    return t * t * ((e + 1) * t - e);
  },
  backOut: function(t) {
    var e = 1.70158;
    return --t * t * ((e + 1) * t + e) + 1;
  },
  backInOut: function(t) {
    var e = 2.5949095;
    return (t *= 2) < 1 ? 0.5 * (t * t * ((e + 1) * t - e)) : 0.5 * ((t -= 2) * t * ((e + 1) * t + e) + 2);
  },
  bounceIn: function(t) {
    return 1 - qy.bounceOut(1 - t);
  },
  bounceOut: function(t) {
    return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + 0.75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + 0.9375 : 7.5625 * (t -= 2.625 / 2.75) * t + 0.984375;
  },
  bounceInOut: function(t) {
    return t < 0.5 ? qy.bounceIn(t * 2) * 0.5 : qy.bounceOut(t * 2 - 1) * 0.5 + 0.5;
  }
}, aS = Math.pow, rf = Math.sqrt, xC = 1e-8, sse = 1e-4, C9 = rf(3), oS = 1 / 3, xl = kf(), Qo = kf(), Xv = kf();
function Qc(t) {
  return t > -xC && t < xC;
}
function lse(t) {
  return t > xC || t < -xC;
}
function jr(t, e, n, r, i) {
  var a = 1 - i;
  return a * a * (a * t + 3 * i * e) + i * i * (i * r + 3 * a * n);
}
function T9(t, e, n, r, i) {
  var a = 1 - i;
  return 3 * (((e - t) * a + 2 * (n - e) * i) * a + (r - n) * i * i);
}
function wC(t, e, n, r, i, a) {
  var o = r + 3 * (e - n) - t, s = 3 * (n - e * 2 + t), l = 3 * (e - t), u = t - i, c = s * s - 3 * o * l, f = s * l - 9 * o * u, d = l * l - 3 * s * u, h = 0;
  if (Qc(c) && Qc(f))
    if (Qc(s))
      a[0] = 0;
    else {
      var p = -l / s;
      p >= 0 && p <= 1 && (a[h++] = p);
    }
  else {
    var v = f * f - 4 * c * d;
    if (Qc(v)) {
      var g = f / c, p = -s / o + g, m = -g / 2;
      p >= 0 && p <= 1 && (a[h++] = p), m >= 0 && m <= 1 && (a[h++] = m);
    } else if (v > 0) {
      var y = rf(v), _ = c * s + 1.5 * o * (-f + y), O = c * s + 1.5 * o * (-f - y);
      _ < 0 ? _ = -aS(-_, oS) : _ = aS(_, oS), O < 0 ? O = -aS(-O, oS) : O = aS(O, oS);
      var p = (-s - (_ + O)) / (3 * o);
      p >= 0 && p <= 1 && (a[h++] = p);
    } else {
      var S = (2 * c * s - 3 * o * f) / (2 * rf(c * c * c)), x = Math.acos(S) / 3, C = rf(c), P = Math.cos(x), p = (-s - 2 * C * P) / (3 * o), m = (-s + C * (P + C9 * Math.sin(x))) / (3 * o), $ = (-s + C * (P - C9 * Math.sin(x))) / (3 * o);
      p >= 0 && p <= 1 && (a[h++] = p), m >= 0 && m <= 1 && (a[h++] = m), $ >= 0 && $ <= 1 && (a[h++] = $);
    }
  }
  return h;
}
function use(t, e, n, r, i) {
  var a = 6 * n - 12 * e + 6 * t, o = 9 * e + 3 * r - 3 * t - 9 * n, s = 3 * e - 3 * t, l = 0;
  if (Qc(o)) {
    if (lse(a)) {
      var u = -s / a;
      u >= 0 && u <= 1 && (i[l++] = u);
    }
  } else {
    var c = a * a - 4 * o * s;
    if (Qc(c))
      i[0] = -a / (2 * o);
    else if (c > 0) {
      var f = rf(c), u = (-a + f) / (2 * o), d = (-a - f) / (2 * o);
      u >= 0 && u <= 1 && (i[l++] = u), d >= 0 && d <= 1 && (i[l++] = d);
    }
  }
  return l;
}
function yf(t, e, n, r, i, a) {
  var o = (e - t) * i + t, s = (n - e) * i + e, l = (r - n) * i + n, u = (s - o) * i + o, c = (l - s) * i + s, f = (c - u) * i + u;
  a[0] = t, a[1] = o, a[2] = u, a[3] = f, a[4] = f, a[5] = c, a[6] = l, a[7] = r;
}
function cse(t, e, n, r, i, a, o, s, l, u, c) {
  var f, d = 5e-3, h = 1 / 0, p, v, g, m;
  xl[0] = l, xl[1] = u;
  for (var y = 0; y < 1; y += 0.05)
    Qo[0] = jr(t, n, i, o, y), Qo[1] = jr(e, r, a, s, y), g = nf(xl, Qo), g < h && (f = y, h = g);
  h = 1 / 0;
  for (var _ = 0; _ < 32 && !(d < sse); _++)
    p = f - d, v = f + d, Qo[0] = jr(t, n, i, o, p), Qo[1] = jr(e, r, a, s, p), g = nf(Qo, xl), p >= 0 && g < h ? (f = p, h = g) : (Xv[0] = jr(t, n, i, o, v), Xv[1] = jr(e, r, a, s, v), m = nf(Xv, xl), v <= 1 && m < h ? (f = v, h = m) : d *= 0.5);
  return c && (c[0] = jr(t, n, i, o, f), c[1] = jr(e, r, a, s, f)), rf(h);
}
function K9e(t, e, n, r, i, a, o, s, l) {
  for (var u = t, c = e, f = 0, d = 1 / l, h = 1; h <= l; h++) {
    var p = h * d, v = jr(t, n, i, o, p), g = jr(e, r, a, s, p), m = v - u, y = g - c;
    f += Math.sqrt(m * m + y * y), u = v, c = g;
  }
  return f;
}
function ii(t, e, n, r) {
  var i = 1 - r;
  return i * (i * t + 2 * r * e) + r * r * n;
}
function sk(t, e, n, r) {
  return 2 * ((1 - r) * (e - t) + r * (n - e));
}
function J9e(t, e, n, r, i) {
  var a = t - 2 * e + n, o = 2 * (e - t), s = t - r, l = 0;
  if (Qc(a)) {
    if (lse(o)) {
      var u = -s / o;
      u >= 0 && u <= 1 && (i[l++] = u);
    }
  } else {
    var c = o * o - 4 * a * s;
    if (Qc(c)) {
      var u = -o / (2 * a);
      u >= 0 && u <= 1 && (i[l++] = u);
    } else if (c > 0) {
      var f = rf(c), u = (-o + f) / (2 * a), d = (-o - f) / (2 * a);
      u >= 0 && u <= 1 && (i[l++] = u), d >= 0 && d <= 1 && (i[l++] = d);
    }
  }
  return l;
}
function fse(t, e, n) {
  var r = t + n - 2 * e;
  return r === 0 ? 0.5 : (t - e) / r;
}
function Qb(t, e, n, r, i) {
  var a = (e - t) * r + t, o = (n - e) * r + e, s = (o - a) * r + a;
  i[0] = t, i[1] = a, i[2] = s, i[3] = s, i[4] = o, i[5] = n;
}
function dse(t, e, n, r, i, a, o, s, l) {
  var u, c = 5e-3, f = 1 / 0;
  xl[0] = o, xl[1] = s;
  for (var d = 0; d < 1; d += 0.05) {
    Qo[0] = ii(t, n, i, d), Qo[1] = ii(e, r, a, d);
    var h = nf(xl, Qo);
    h < f && (u = d, f = h);
  }
  f = 1 / 0;
  for (var p = 0; p < 32 && !(c < sse); p++) {
    var v = u - c, g = u + c;
    Qo[0] = ii(t, n, i, v), Qo[1] = ii(e, r, a, v);
    var h = nf(Qo, xl);
    if (v >= 0 && h < f)
      u = v, f = h;
    else {
      Xv[0] = ii(t, n, i, g), Xv[1] = ii(e, r, a, g);
      var m = nf(Xv, xl);
      g <= 1 && m < f ? (u = g, f = m) : c *= 0.5;
    }
  }
  return l && (l[0] = ii(t, n, i, u), l[1] = ii(e, r, a, u)), rf(f);
}
function eGe(t, e, n, r, i, a, o) {
  for (var s = t, l = e, u = 0, c = 1 / o, f = 1; f <= o; f++) {
    var d = f * c, h = ii(t, n, i, d), p = ii(e, r, a, d), v = h - s, g = p - l;
    u += Math.sqrt(v * v + g * g), s = h, l = p;
  }
  return u;
}
var tGe = /cubic-bezier\(([0-9,\.e ]+)\)/;
function S5(t) {
  var e = t && tGe.exec(t);
  if (e) {
    var n = e[1].split(","), r = +Zo(n[0]), i = +Zo(n[1]), a = +Zo(n[2]), o = +Zo(n[3]);
    if (isNaN(r + i + a + o))
      return;
    var s = [];
    return function(l) {
      return l <= 0 ? 0 : l >= 1 ? 1 : wC(0, r, a, 1, l, s) && jr(0, i, o, 1, s[0]);
    };
  }
}
var nGe = function() {
  function t(e) {
    this._inited = !1, this._startTime = 0, this._pausedTime = 0, this._paused = !1, this._life = e.life || 1e3, this._delay = e.delay || 0, this.loop = e.loop || !1, this.onframe = e.onframe || fr, this.ondestroy = e.ondestroy || fr, this.onrestart = e.onrestart || fr, e.easing && this.setEasing(e.easing);
  }
  return t.prototype.step = function(e, n) {
    if (this._inited || (this._startTime = e + this._delay, this._inited = !0), this._paused) {
      this._pausedTime += n;
      return;
    }
    var r = this._life, i = e - this._startTime - this._pausedTime, a = i / r;
    a < 0 && (a = 0), a = Math.min(a, 1);
    var o = this.easingFunc, s = o ? o(a) : a;
    if (this.onframe(s), a === 1)
      if (this.loop) {
        var l = i % r;
        this._startTime = e - l, this._pausedTime = 0, this.onrestart();
      } else
        return !0;
    return !1;
  }, t.prototype.pause = function() {
    this._paused = !0;
  }, t.prototype.resume = function() {
    this._paused = !1;
  }, t.prototype.setEasing = function(e) {
    this.easing = e, this.easingFunc = qe(e) ? e : qy[e] || S5(e);
  }, t;
}(), hse = /* @__PURE__ */ function() {
  function t(e) {
    this.value = e;
  }
  return t;
}(), rGe = function() {
  function t() {
    this._len = 0;
  }
  return t.prototype.insert = function(e) {
    var n = new hse(e);
    return this.insertEntry(n), n;
  }, t.prototype.insertEntry = function(e) {
    this.head ? (this.tail.next = e, e.prev = this.tail, e.next = null, this.tail = e) : this.head = this.tail = e, this._len++;
  }, t.prototype.remove = function(e) {
    var n = e.prev, r = e.next;
    n ? n.next = r : this.head = r, r ? r.prev = n : this.tail = n, e.next = e.prev = null, this._len--;
  }, t.prototype.len = function() {
    return this._len;
  }, t.prototype.clear = function() {
    this.head = this.tail = null, this._len = 0;
  }, t;
}(), a1 = function() {
  function t(e) {
    this._list = new rGe(), this._maxSize = 10, this._map = {}, this._maxSize = e;
  }
  return t.prototype.put = function(e, n) {
    var r = this._list, i = this._map, a = null;
    if (i[e] == null) {
      var o = r.len(), s = this._lastRemovedEntry;
      if (o >= this._maxSize && o > 0) {
        var l = r.head;
        r.remove(l), delete i[l.key], a = l.value, this._lastRemovedEntry = l;
      }
      s ? s.value = n : s = new hse(n), s.key = e, r.insertEntry(s), i[e] = s;
    }
    return a;
  }, t.prototype.get = function(e) {
    var n = this._map[e], r = this._list;
    if (n != null)
      return n !== r.tail && (r.remove(n), r.insertEntry(n)), n.value;
  }, t.prototype.clear = function() {
    this._list.clear(), this._map = {};
  }, t.prototype.len = function() {
    return this._list.len();
  }, t;
}(), P9 = {
  transparent: [0, 0, 0, 0],
  aliceblue: [240, 248, 255, 1],
  antiquewhite: [250, 235, 215, 1],
  aqua: [0, 255, 255, 1],
  aquamarine: [127, 255, 212, 1],
  azure: [240, 255, 255, 1],
  beige: [245, 245, 220, 1],
  bisque: [255, 228, 196, 1],
  black: [0, 0, 0, 1],
  blanchedalmond: [255, 235, 205, 1],
  blue: [0, 0, 255, 1],
  blueviolet: [138, 43, 226, 1],
  brown: [165, 42, 42, 1],
  burlywood: [222, 184, 135, 1],
  cadetblue: [95, 158, 160, 1],
  chartreuse: [127, 255, 0, 1],
  chocolate: [210, 105, 30, 1],
  coral: [255, 127, 80, 1],
  cornflowerblue: [100, 149, 237, 1],
  cornsilk: [255, 248, 220, 1],
  crimson: [220, 20, 60, 1],
  cyan: [0, 255, 255, 1],
  darkblue: [0, 0, 139, 1],
  darkcyan: [0, 139, 139, 1],
  darkgoldenrod: [184, 134, 11, 1],
  darkgray: [169, 169, 169, 1],
  darkgreen: [0, 100, 0, 1],
  darkgrey: [169, 169, 169, 1],
  darkkhaki: [189, 183, 107, 1],
  darkmagenta: [139, 0, 139, 1],
  darkolivegreen: [85, 107, 47, 1],
  darkorange: [255, 140, 0, 1],
  darkorchid: [153, 50, 204, 1],
  darkred: [139, 0, 0, 1],
  darksalmon: [233, 150, 122, 1],
  darkseagreen: [143, 188, 143, 1],
  darkslateblue: [72, 61, 139, 1],
  darkslategray: [47, 79, 79, 1],
  darkslategrey: [47, 79, 79, 1],
  darkturquoise: [0, 206, 209, 1],
  darkviolet: [148, 0, 211, 1],
  deeppink: [255, 20, 147, 1],
  deepskyblue: [0, 191, 255, 1],
  dimgray: [105, 105, 105, 1],
  dimgrey: [105, 105, 105, 1],
  dodgerblue: [30, 144, 255, 1],
  firebrick: [178, 34, 34, 1],
  floralwhite: [255, 250, 240, 1],
  forestgreen: [34, 139, 34, 1],
  fuchsia: [255, 0, 255, 1],
  gainsboro: [220, 220, 220, 1],
  ghostwhite: [248, 248, 255, 1],
  gold: [255, 215, 0, 1],
  goldenrod: [218, 165, 32, 1],
  gray: [128, 128, 128, 1],
  green: [0, 128, 0, 1],
  greenyellow: [173, 255, 47, 1],
  grey: [128, 128, 128, 1],
  honeydew: [240, 255, 240, 1],
  hotpink: [255, 105, 180, 1],
  indianred: [205, 92, 92, 1],
  indigo: [75, 0, 130, 1],
  ivory: [255, 255, 240, 1],
  khaki: [240, 230, 140, 1],
  lavender: [230, 230, 250, 1],
  lavenderblush: [255, 240, 245, 1],
  lawngreen: [124, 252, 0, 1],
  lemonchiffon: [255, 250, 205, 1],
  lightblue: [173, 216, 230, 1],
  lightcoral: [240, 128, 128, 1],
  lightcyan: [224, 255, 255, 1],
  lightgoldenrodyellow: [250, 250, 210, 1],
  lightgray: [211, 211, 211, 1],
  lightgreen: [144, 238, 144, 1],
  lightgrey: [211, 211, 211, 1],
  lightpink: [255, 182, 193, 1],
  lightsalmon: [255, 160, 122, 1],
  lightseagreen: [32, 178, 170, 1],
  lightskyblue: [135, 206, 250, 1],
  lightslategray: [119, 136, 153, 1],
  lightslategrey: [119, 136, 153, 1],
  lightsteelblue: [176, 196, 222, 1],
  lightyellow: [255, 255, 224, 1],
  lime: [0, 255, 0, 1],
  limegreen: [50, 205, 50, 1],
  linen: [250, 240, 230, 1],
  magenta: [255, 0, 255, 1],
  maroon: [128, 0, 0, 1],
  mediumaquamarine: [102, 205, 170, 1],
  mediumblue: [0, 0, 205, 1],
  mediumorchid: [186, 85, 211, 1],
  mediumpurple: [147, 112, 219, 1],
  mediumseagreen: [60, 179, 113, 1],
  mediumslateblue: [123, 104, 238, 1],
  mediumspringgreen: [0, 250, 154, 1],
  mediumturquoise: [72, 209, 204, 1],
  mediumvioletred: [199, 21, 133, 1],
  midnightblue: [25, 25, 112, 1],
  mintcream: [245, 255, 250, 1],
  mistyrose: [255, 228, 225, 1],
  moccasin: [255, 228, 181, 1],
  navajowhite: [255, 222, 173, 1],
  navy: [0, 0, 128, 1],
  oldlace: [253, 245, 230, 1],
  olive: [128, 128, 0, 1],
  olivedrab: [107, 142, 35, 1],
  orange: [255, 165, 0, 1],
  orangered: [255, 69, 0, 1],
  orchid: [218, 112, 214, 1],
  palegoldenrod: [238, 232, 170, 1],
  palegreen: [152, 251, 152, 1],
  paleturquoise: [175, 238, 238, 1],
  palevioletred: [219, 112, 147, 1],
  papayawhip: [255, 239, 213, 1],
  peachpuff: [255, 218, 185, 1],
  peru: [205, 133, 63, 1],
  pink: [255, 192, 203, 1],
  plum: [221, 160, 221, 1],
  powderblue: [176, 224, 230, 1],
  purple: [128, 0, 128, 1],
  red: [255, 0, 0, 1],
  rosybrown: [188, 143, 143, 1],
  royalblue: [65, 105, 225, 1],
  saddlebrown: [139, 69, 19, 1],
  salmon: [250, 128, 114, 1],
  sandybrown: [244, 164, 96, 1],
  seagreen: [46, 139, 87, 1],
  seashell: [255, 245, 238, 1],
  sienna: [160, 82, 45, 1],
  silver: [192, 192, 192, 1],
  skyblue: [135, 206, 235, 1],
  slateblue: [106, 90, 205, 1],
  slategray: [112, 128, 144, 1],
  slategrey: [112, 128, 144, 1],
  snow: [255, 250, 250, 1],
  springgreen: [0, 255, 127, 1],
  steelblue: [70, 130, 180, 1],
  tan: [210, 180, 140, 1],
  teal: [0, 128, 128, 1],
  thistle: [216, 191, 216, 1],
  tomato: [255, 99, 71, 1],
  turquoise: [64, 224, 208, 1],
  violet: [238, 130, 238, 1],
  wheat: [245, 222, 179, 1],
  white: [255, 255, 255, 1],
  whitesmoke: [245, 245, 245, 1],
  yellow: [255, 255, 0, 1],
  yellowgreen: [154, 205, 50, 1]
};
function Ns(t) {
  return t = Math.round(t), t < 0 ? 0 : t > 255 ? 255 : t;
}
function iGe(t) {
  return t = Math.round(t), t < 0 ? 0 : t > 360 ? 360 : t;
}
function Hb(t) {
  return t < 0 ? 0 : t > 1 ? 1 : t;
}
function RE(t) {
  var e = t;
  return e.length && e.charAt(e.length - 1) === "%" ? Ns(parseFloat(e) / 100 * 255) : Ns(parseInt(e, 10));
}
function xh(t) {
  var e = t;
  return e.length && e.charAt(e.length - 1) === "%" ? Hb(parseFloat(e) / 100) : Hb(parseFloat(e));
}
function kE(t, e, n) {
  return n < 0 ? n += 1 : n > 1 && (n -= 1), n * 6 < 1 ? t + (e - t) * n * 6 : n * 2 < 1 ? e : n * 3 < 2 ? t + (e - t) * (2 / 3 - n) * 6 : t;
}
function Hc(t, e, n) {
  return t + (e - t) * n;
}
function ko(t, e, n, r, i) {
  return t[0] = e, t[1] = n, t[2] = r, t[3] = i, t;
}
function lk(t, e) {
  return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t;
}
var pse = new a1(20), sS = null;
function Zp(t, e) {
  sS && lk(sS, e), sS = pse.put(t, sS || e.slice());
}
function oa(t, e) {
  if (t) {
    e = e || [];
    var n = pse.get(t);
    if (n)
      return lk(e, n);
    t = t + "";
    var r = t.replace(/ /g, "").toLowerCase();
    if (r in P9)
      return lk(e, P9[r]), Zp(t, e), e;
    var i = r.length;
    if (r.charAt(0) === "#") {
      if (i === 4 || i === 5) {
        var a = parseInt(r.slice(1, 4), 16);
        if (!(a >= 0 && a <= 4095)) {
          ko(e, 0, 0, 0, 1);
          return;
        }
        return ko(e, (a & 3840) >> 4 | (a & 3840) >> 8, a & 240 | (a & 240) >> 4, a & 15 | (a & 15) << 4, i === 5 ? parseInt(r.slice(4), 16) / 15 : 1), Zp(t, e), e;
      } else if (i === 7 || i === 9) {
        var a = parseInt(r.slice(1, 7), 16);
        if (!(a >= 0 && a <= 16777215)) {
          ko(e, 0, 0, 0, 1);
          return;
        }
        return ko(e, (a & 16711680) >> 16, (a & 65280) >> 8, a & 255, i === 9 ? parseInt(r.slice(7), 16) / 255 : 1), Zp(t, e), e;
      }
      return;
    }
    var o = r.indexOf("("), s = r.indexOf(")");
    if (o !== -1 && s + 1 === i) {
      var l = r.substr(0, o), u = r.substr(o + 1, s - (o + 1)).split(","), c = 1;
      switch (l) {
        case "rgba":
          if (u.length !== 4)
            return u.length === 3 ? ko(e, +u[0], +u[1], +u[2], 1) : ko(e, 0, 0, 0, 1);
          c = xh(u.pop());
        case "rgb":
          if (u.length >= 3)
            return ko(e, RE(u[0]), RE(u[1]), RE(u[2]), u.length === 3 ? c : xh(u[3])), Zp(t, e), e;
          ko(e, 0, 0, 0, 1);
          return;
        case "hsla":
          if (u.length !== 4) {
            ko(e, 0, 0, 0, 1);
            return;
          }
          return u[3] = xh(u[3]), uk(u, e), Zp(t, e), e;
        case "hsl":
          if (u.length !== 3) {
            ko(e, 0, 0, 0, 1);
            return;
          }
          return uk(u, e), Zp(t, e), e;
        default:
          return;
      }
    }
    ko(e, 0, 0, 0, 1);
  }
}
function uk(t, e) {
  var n = (parseFloat(t[0]) % 360 + 360) % 360 / 360, r = xh(t[1]), i = xh(t[2]), a = i <= 0.5 ? i * (r + 1) : i + r - i * r, o = i * 2 - a;
  return e = e || [], ko(e, Ns(kE(o, a, n + 1 / 3) * 255), Ns(kE(o, a, n) * 255), Ns(kE(o, a, n - 1 / 3) * 255), 1), t.length === 4 && (e[3] = t[3]), e;
}
function aGe(t) {
  if (t) {
    var e = t[0] / 255, n = t[1] / 255, r = t[2] / 255, i = Math.min(e, n, r), a = Math.max(e, n, r), o = a - i, s = (a + i) / 2, l, u;
    if (o === 0)
      l = 0, u = 0;
    else {
      s < 0.5 ? u = o / (a + i) : u = o / (2 - a - i);
      var c = ((a - e) / 6 + o / 2) / o, f = ((a - n) / 6 + o / 2) / o, d = ((a - r) / 6 + o / 2) / o;
      e === a ? l = d - f : n === a ? l = 1 / 3 + c - d : r === a && (l = 2 / 3 + f - c), l < 0 && (l += 1), l > 1 && (l -= 1);
    }
    var h = [l * 360, u, s];
    return t[3] != null && h.push(t[3]), h;
  }
}
function CC(t, e) {
  var n = oa(t);
  if (n) {
    for (var r = 0; r < 3; r++)
      e < 0 ? n[r] = n[r] * (1 - e) | 0 : n[r] = (255 - n[r]) * e + n[r] | 0, n[r] > 255 ? n[r] = 255 : n[r] < 0 && (n[r] = 0);
    return Bs(n, n.length === 4 ? "rgba" : "rgb");
  }
}
function oGe(t) {
  var e = oa(t);
  if (e)
    return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1);
}
function Ky(t, e, n) {
  if (!(!(e && e.length) || !(t >= 0 && t <= 1))) {
    n = n || [];
    var r = t * (e.length - 1), i = Math.floor(r), a = Math.ceil(r), o = e[i], s = e[a], l = r - i;
    return n[0] = Ns(Hc(o[0], s[0], l)), n[1] = Ns(Hc(o[1], s[1], l)), n[2] = Ns(Hc(o[2], s[2], l)), n[3] = Hb(Hc(o[3], s[3], l)), n;
  }
}
var sGe = Ky;
function x5(t, e, n) {
  if (!(!(e && e.length) || !(t >= 0 && t <= 1))) {
    var r = t * (e.length - 1), i = Math.floor(r), a = Math.ceil(r), o = oa(e[i]), s = oa(e[a]), l = r - i, u = Bs([
      Ns(Hc(o[0], s[0], l)),
      Ns(Hc(o[1], s[1], l)),
      Ns(Hc(o[2], s[2], l)),
      Hb(Hc(o[3], s[3], l))
    ], "rgba");
    return n ? {
      color: u,
      leftIndex: i,
      rightIndex: a,
      value: r
    } : u;
  }
}
var lGe = x5;
function Yv(t, e, n, r) {
  var i = oa(t);
  if (t)
    return i = aGe(i), e != null && (i[0] = iGe(e)), n != null && (i[1] = xh(n)), r != null && (i[2] = xh(r)), Bs(uk(i), "rgba");
}
function Gb(t, e) {
  var n = oa(t);
  if (n && e != null)
    return n[3] = Hb(e), Bs(n, "rgba");
}
function Bs(t, e) {
  if (!(!t || !t.length)) {
    var n = t[0] + "," + t[1] + "," + t[2];
    return (e === "rgba" || e === "hsva" || e === "hsla") && (n += "," + t[3]), e + "(" + n + ")";
  }
}
function jb(t, e) {
  var n = oa(t);
  return n ? (0.299 * n[0] + 0.587 * n[1] + 0.114 * n[2]) * n[3] / 255 + (1 - n[3]) * e : 0;
}
function uGe() {
  return Bs([
    Math.round(Math.random() * 255),
    Math.round(Math.random() * 255),
    Math.round(Math.random() * 255)
  ], "rgb");
}
var $9 = new a1(100);
function TC(t) {
  if (Ve(t)) {
    var e = $9.get(t);
    return e || (e = CC(t, -0.1), $9.put(t, e)), e;
  } else if (n1(t)) {
    var n = _e({}, t);
    return n.colorStops = Ce(t.colorStops, function(r) {
      return {
        offset: r.offset,
        color: CC(r.color, -0.1)
      };
    }), n;
  }
  return t;
}
const cGe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  fastLerp: Ky,
  fastMapToColor: sGe,
  lerp: x5,
  lift: CC,
  liftColor: TC,
  lum: jb,
  mapToColor: lGe,
  modifyAlpha: Gb,
  modifyHSL: Yv,
  parse: oa,
  random: uGe,
  stringify: Bs,
  toHex: oGe
}, Symbol.toStringTag, { value: "Module" }));
var PC = Math.round;
function Zb(t) {
  var e;
  if (!t || t === "transparent")
    t = "none";
  else if (typeof t == "string" && t.indexOf("rgba") > -1) {
    var n = oa(t);
    n && (t = "rgb(" + n[0] + "," + n[1] + "," + n[2] + ")", e = n[3]);
  }
  return {
    color: t,
    opacity: e ?? 1
  };
}
var A9 = 1e-4;
function Gc(t) {
  return t < A9 && t > -A9;
}
function lS(t) {
  return PC(t * 1e3) / 1e3;
}
function ck(t) {
  return PC(t * 1e4) / 1e4;
}
function fGe(t) {
  return "matrix(" + lS(t[0]) + "," + lS(t[1]) + "," + lS(t[2]) + "," + lS(t[3]) + "," + ck(t[4]) + "," + ck(t[5]) + ")";
}
var dGe = {
  left: "start",
  right: "end",
  center: "middle",
  middle: "middle"
};
function hGe(t, e, n) {
  return n === "top" ? t += e / 2 : n === "bottom" && (t -= e / 2), t;
}
function pGe(t) {
  return t && (t.shadowBlur || t.shadowOffsetX || t.shadowOffsetY);
}
function vGe(t) {
  var e = t.style, n = t.getGlobalScale();
  return [
    e.shadowColor,
    (e.shadowBlur || 0).toFixed(2),
    (e.shadowOffsetX || 0).toFixed(2),
    (e.shadowOffsetY || 0).toFixed(2),
    n[0],
    n[1]
  ].join(",");
}
function vse(t) {
  return t && !!t.image;
}
function gGe(t) {
  return t && !!t.svgElement;
}
function w5(t) {
  return vse(t) || gGe(t);
}
function gse(t) {
  return t.type === "linear";
}
function mse(t) {
  return t.type === "radial";
}
function yse(t) {
  return t && (t.type === "linear" || t.type === "radial");
}
function cP(t) {
  return "url(#" + t + ")";
}
function bse(t) {
  var e = t.getGlobalScale(), n = Math.max(e[0], e[1]);
  return Math.max(Math.ceil(Math.log(n) / Math.log(10)), 1);
}
function _se(t) {
  var e = t.x || 0, n = t.y || 0, r = (t.rotation || 0) * Uy, i = dt(t.scaleX, 1), a = dt(t.scaleY, 1), o = t.skewX || 0, s = t.skewY || 0, l = [];
  return (e || n) && l.push("translate(" + e + "px," + n + "px)"), r && l.push("rotate(" + r + ")"), (i !== 1 || a !== 1) && l.push("scale(" + i + "," + a + ")"), (o || s) && l.push("skew(" + PC(o * Uy) + "deg, " + PC(s * Uy) + "deg)"), l.join(" ");
}
var mGe = function() {
  return Gt.hasGlobalWindow && qe(window.btoa) ? function(t) {
    return window.btoa(unescape(encodeURIComponent(t)));
  } : typeof Buffer < "u" ? function(t) {
    return Buffer.from(t).toString("base64");
  } : function(t) {
    return process.env.NODE_ENV !== "production" && qo("Base64 isn't natively supported in the current environment."), null;
  };
}(), fk = Array.prototype.slice;
function yu(t, e, n) {
  return (e - t) * n + t;
}
function LE(t, e, n, r) {
  for (var i = e.length, a = 0; a < i; a++)
    t[a] = yu(e[a], n[a], r);
  return t;
}
function yGe(t, e, n, r) {
  for (var i = e.length, a = i && e[0].length, o = 0; o < i; o++) {
    t[o] || (t[o] = []);
    for (var s = 0; s < a; s++)
      t[o][s] = yu(e[o][s], n[o][s], r);
  }
  return t;
}
function uS(t, e, n, r) {
  for (var i = e.length, a = 0; a < i; a++)
    t[a] = e[a] + n[a] * r;
  return t;
}
function E9(t, e, n, r) {
  for (var i = e.length, a = i && e[0].length, o = 0; o < i; o++) {
    t[o] || (t[o] = []);
    for (var s = 0; s < a; s++)
      t[o][s] = e[o][s] + n[o][s] * r;
  }
  return t;
}
function bGe(t, e) {
  for (var n = t.length, r = e.length, i = n > r ? e : t, a = Math.min(n, r), o = i[a - 1] || { color: [0, 0, 0, 0], offset: 0 }, s = a; s < Math.max(n, r); s++)
    i.push({
      offset: o.offset,
      color: o.color.slice()
    });
}
function _Ge(t, e, n) {
  var r = t, i = e;
  if (!(!r.push || !i.push)) {
    var a = r.length, o = i.length;
    if (a !== o) {
      var s = a > o;
      if (s)
        r.length = o;
      else
        for (var l = a; l < o; l++)
          r.push(n === 1 ? i[l] : fk.call(i[l]));
    }
    for (var u = r[0] && r[0].length, l = 0; l < r.length; l++)
      if (n === 1)
        isNaN(r[l]) && (r[l] = i[l]);
      else
        for (var c = 0; c < u; c++)
          isNaN(r[l][c]) && (r[l][c] = i[l][c]);
  }
}
function Jy(t) {
  if (Pi(t)) {
    var e = t.length;
    if (Pi(t[0])) {
      for (var n = [], r = 0; r < e; r++)
        n.push(fk.call(t[r]));
      return n;
    }
    return fk.call(t);
  }
  return t;
}
function ow(t) {
  return t[0] = Math.floor(t[0]) || 0, t[1] = Math.floor(t[1]) || 0, t[2] = Math.floor(t[2]) || 0, t[3] = t[3] == null ? 1 : t[3], "rgba(" + t.join(",") + ")";
}
function OGe(t) {
  return Pi(t && t[0]) ? 2 : 1;
}
var cS = 0, sw = 1, Ose = 2, py = 3, dk = 4, hk = 5, M9 = 6;
function I9(t) {
  return t === dk || t === hk;
}
function fS(t) {
  return t === sw || t === Ose;
}
var $0 = [0, 0, 0, 0], SGe = function() {
  function t(e) {
    this.keyframes = [], this.discrete = !1, this._invalid = !1, this._needsSort = !1, this._lastFr = 0, this._lastFrP = 0, this.propName = e;
  }
  return t.prototype.isFinished = function() {
    return this._finished;
  }, t.prototype.setFinished = function() {
    this._finished = !0, this._additiveTrack && this._additiveTrack.setFinished();
  }, t.prototype.needsAnimate = function() {
    return this.keyframes.length >= 1;
  }, t.prototype.getAdditiveTrack = function() {
    return this._additiveTrack;
  }, t.prototype.addKeyframe = function(e, n, r) {
    this._needsSort = !0;
    var i = this.keyframes, a = i.length, o = !1, s = M9, l = n;
    if (Pi(n)) {
      var u = OGe(n);
      s = u, (u === 1 && !Kt(n[0]) || u === 2 && !Kt(n[0][0])) && (o = !0);
    } else if (Kt(n) && !mf(n))
      s = cS;
    else if (Ve(n))
      if (!isNaN(+n))
        s = cS;
      else {
        var c = oa(n);
        c && (l = c, s = py);
      }
    else if (n1(n)) {
      var f = _e({}, l);
      f.colorStops = Ce(n.colorStops, function(h) {
        return {
          offset: h.offset,
          color: oa(h.color)
        };
      }), gse(n) ? s = dk : mse(n) && (s = hk), l = f;
    }
    a === 0 ? this.valType = s : (s !== this.valType || s === M9) && (o = !0), this.discrete = this.discrete || o;
    var d = {
      time: e,
      value: l,
      rawValue: n,
      percent: 0
    };
    return r && (d.easing = r, d.easingFunc = qe(r) ? r : qy[r] || S5(r)), i.push(d), d;
  }, t.prototype.prepare = function(e, n) {
    var r = this.keyframes;
    this._needsSort && r.sort(function(v, g) {
      return v.time - g.time;
    });
    for (var i = this.valType, a = r.length, o = r[a - 1], s = this.discrete, l = fS(i), u = I9(i), c = 0; c < a; c++) {
      var f = r[c], d = f.value, h = o.value;
      f.percent = f.time / e, s || (l && c !== a - 1 ? _Ge(d, h, i) : u && bGe(d.colorStops, h.colorStops));
    }
    if (!s && i !== hk && n && this.needsAnimate() && n.needsAnimate() && i === n.valType && !n._finished) {
      this._additiveTrack = n;
      for (var p = r[0].value, c = 0; c < a; c++)
        i === cS ? r[c].additiveValue = r[c].value - p : i === py ? r[c].additiveValue = uS([], r[c].value, p, -1) : fS(i) && (r[c].additiveValue = i === sw ? uS([], r[c].value, p, -1) : E9([], r[c].value, p, -1));
    }
  }, t.prototype.step = function(e, n) {
    if (!this._finished) {
      this._additiveTrack && this._additiveTrack._finished && (this._additiveTrack = null);
      var r = this._additiveTrack != null, i = r ? "additiveValue" : "value", a = this.valType, o = this.keyframes, s = o.length, l = this.propName, u = a === py, c, f = this._lastFr, d = Math.min, h, p;
      if (s === 1)
        h = p = o[0];
      else {
        if (n < 0)
          c = 0;
        else if (n < this._lastFrP) {
          var v = d(f + 1, s - 1);
          for (c = v; c >= 0 && !(o[c].percent <= n); c--)
            ;
          c = d(c, s - 2);
        } else {
          for (c = f; c < s && !(o[c].percent > n); c++)
            ;
          c = d(c - 1, s - 2);
        }
        p = o[c + 1], h = o[c];
      }
      if (h && p) {
        this._lastFr = c, this._lastFrP = n;
        var g = p.percent - h.percent, m = g === 0 ? 1 : d((n - h.percent) / g, 1);
        p.easingFunc && (m = p.easingFunc(m));
        var y = r ? this._additiveValue : u ? $0 : e[l];
        if ((fS(a) || u) && !y && (y = this._additiveValue = []), this.discrete)
          e[l] = m < 1 ? h.rawValue : p.rawValue;
        else if (fS(a))
          a === sw ? LE(y, h[i], p[i], m) : yGe(y, h[i], p[i], m);
        else if (I9(a)) {
          var _ = h[i], O = p[i], S = a === dk;
          e[l] = {
            type: S ? "linear" : "radial",
            x: yu(_.x, O.x, m),
            y: yu(_.y, O.y, m),
            colorStops: Ce(_.colorStops, function(C, P) {
              var $ = O.colorStops[P];
              return {
                offset: yu(C.offset, $.offset, m),
                color: ow(LE([], C.color, $.color, m))
              };
            }),
            global: O.global
          }, S ? (e[l].x2 = yu(_.x2, O.x2, m), e[l].y2 = yu(_.y2, O.y2, m)) : e[l].r = yu(_.r, O.r, m);
        } else if (u)
          LE(y, h[i], p[i], m), r || (e[l] = ow(y));
        else {
          var x = yu(h[i], p[i], m);
          r ? this._additiveValue = x : e[l] = x;
        }
        r && this._addToTarget(e);
      }
    }
  }, t.prototype._addToTarget = function(e) {
    var n = this.valType, r = this.propName, i = this._additiveValue;
    n === cS ? e[r] = e[r] + i : n === py ? (oa(e[r], $0), uS($0, $0, i, 1), e[r] = ow($0)) : n === sw ? uS(e[r], e[r], i, 1) : n === Ose && E9(e[r], e[r], i, 1);
  }, t;
}(), C5 = function() {
  function t(e, n, r, i) {
    if (this._tracks = {}, this._trackKeys = [], this._maxTime = 0, this._started = 0, this._clip = null, this._target = e, this._loop = n, n && i) {
      qo("Can' use additive animation on looped animation.");
      return;
    }
    this._additiveAnimators = i, this._allowDiscrete = r;
  }
  return t.prototype.getMaxTime = function() {
    return this._maxTime;
  }, t.prototype.getDelay = function() {
    return this._delay;
  }, t.prototype.getLoop = function() {
    return this._loop;
  }, t.prototype.getTarget = function() {
    return this._target;
  }, t.prototype.changeTarget = function(e) {
    this._target = e;
  }, t.prototype.when = function(e, n, r) {
    return this.whenWithKeys(e, n, kt(n), r);
  }, t.prototype.whenWithKeys = function(e, n, r, i) {
    for (var a = this._tracks, o = 0; o < r.length; o++) {
      var s = r[o], l = a[s];
      if (!l) {
        l = a[s] = new SGe(s);
        var u = void 0, c = this._getAdditiveTrack(s);
        if (c) {
          var f = c.keyframes, d = f[f.length - 1];
          u = d && d.value, c.valType === py && u && (u = ow(u));
        } else
          u = this._target[s];
        if (u == null)
          continue;
        e > 0 && l.addKeyframe(0, Jy(u), i), this._trackKeys.push(s);
      }
      l.addKeyframe(e, Jy(n[s]), i);
    }
    return this._maxTime = Math.max(this._maxTime, e), this;
  }, t.prototype.pause = function() {
    this._clip.pause(), this._paused = !0;
  }, t.prototype.resume = function() {
    this._clip.resume(), this._paused = !1;
  }, t.prototype.isPaused = function() {
    return !!this._paused;
  }, t.prototype.duration = function(e) {
    return this._maxTime = e, this._force = !0, this;
  }, t.prototype._doneCallback = function() {
    this._setTracksFinished(), this._clip = null;
    var e = this._doneCbs;
    if (e)
      for (var n = e.length, r = 0; r < n; r++)
        e[r].call(this);
  }, t.prototype._abortedCallback = function() {
    this._setTracksFinished();
    var e = this.animation, n = this._abortedCbs;
    if (e && e.removeClip(this._clip), this._clip = null, n)
      for (var r = 0; r < n.length; r++)
        n[r].call(this);
  }, t.prototype._setTracksFinished = function() {
    for (var e = this._tracks, n = this._trackKeys, r = 0; r < n.length; r++)
      e[n[r]].setFinished();
  }, t.prototype._getAdditiveTrack = function(e) {
    var n, r = this._additiveAnimators;
    if (r)
      for (var i = 0; i < r.length; i++) {
        var a = r[i].getTrack(e);
        a && (n = a);
      }
    return n;
  }, t.prototype.start = function(e) {
    if (!(this._started > 0)) {
      this._started = 1;
      for (var n = this, r = [], i = this._maxTime || 0, a = 0; a < this._trackKeys.length; a++) {
        var o = this._trackKeys[a], s = this._tracks[o], l = this._getAdditiveTrack(o), u = s.keyframes, c = u.length;
        if (s.prepare(i, l), s.needsAnimate())
          if (!this._allowDiscrete && s.discrete) {
            var f = u[c - 1];
            f && (n._target[s.propName] = f.rawValue), s.setFinished();
          } else
            r.push(s);
      }
      if (r.length || this._force) {
        var d = new nGe({
          life: i,
          loop: this._loop,
          delay: this._delay || 0,
          onframe: function(h) {
            n._started = 2;
            var p = n._additiveAnimators;
            if (p) {
              for (var v = !1, g = 0; g < p.length; g++)
                if (p[g]._clip) {
                  v = !0;
                  break;
                }
              v || (n._additiveAnimators = null);
            }
            for (var g = 0; g < r.length; g++)
              r[g].step(n._target, h);
            var m = n._onframeCbs;
            if (m)
              for (var g = 0; g < m.length; g++)
                m[g](n._target, h);
          },
          ondestroy: function() {
            n._doneCallback();
          }
        });
        this._clip = d, this.animation && this.animation.addClip(d), e && d.setEasing(e);
      } else
        this._doneCallback();
      return this;
    }
  }, t.prototype.stop = function(e) {
    if (this._clip) {
      var n = this._clip;
      e && n.onframe(1), this._abortedCallback();
    }
  }, t.prototype.delay = function(e) {
    return this._delay = e, this;
  }, t.prototype.during = function(e) {
    return e && (this._onframeCbs || (this._onframeCbs = []), this._onframeCbs.push(e)), this;
  }, t.prototype.done = function(e) {
    return e && (this._doneCbs || (this._doneCbs = []), this._doneCbs.push(e)), this;
  }, t.prototype.aborted = function(e) {
    return e && (this._abortedCbs || (this._abortedCbs = []), this._abortedCbs.push(e)), this;
  }, t.prototype.getClip = function() {
    return this._clip;
  }, t.prototype.getTrack = function(e) {
    return this._tracks[e];
  }, t.prototype.getTracks = function() {
    var e = this;
    return Ce(this._trackKeys, function(n) {
      return e._tracks[n];
    });
  }, t.prototype.stopTracks = function(e, n) {
    if (!e.length || !this._clip)
      return !0;
    for (var r = this._tracks, i = this._trackKeys, a = 0; a < e.length; a++) {
      var o = r[e[a]];
      o && !o.isFinished() && (n ? o.step(this._target, 1) : this._started === 1 && o.step(this._target, 0), o.setFinished());
    }
    for (var s = !0, a = 0; a < i.length; a++)
      if (!r[i[a]].isFinished()) {
        s = !1;
        break;
      }
    return s && this._abortedCallback(), s;
  }, t.prototype.saveTo = function(e, n, r) {
    if (e) {
      n = n || this._trackKeys;
      for (var i = 0; i < n.length; i++) {
        var a = n[i], o = this._tracks[a];
        if (!(!o || o.isFinished())) {
          var s = o.keyframes, l = s[r ? 0 : s.length - 1];
          l && (e[a] = Jy(l.rawValue));
        }
      }
    }
  }, t.prototype.__changeFinalValue = function(e, n) {
    n = n || kt(e);
    for (var r = 0; r < n.length; r++) {
      var i = n[r], a = this._tracks[i];
      if (a) {
        var o = a.keyframes;
        if (o.length > 1) {
          var s = o.pop();
          a.addKeyframe(s.time, e[i]), a.prepare(this._maxTime, a.getAdditiveTrack());
        }
      }
    }
  }, t;
}();
function Iv() {
  return (/* @__PURE__ */ new Date()).getTime();
}
var xGe = function(t) {
  le(e, t);
  function e(n) {
    var r = t.call(this) || this;
    return r._running = !1, r._time = 0, r._pausedTime = 0, r._pauseStart = 0, r._paused = !1, n = n || {}, r.stage = n.stage || {}, r;
  }
  return e.prototype.addClip = function(n) {
    n.animation && this.removeClip(n), this._head ? (this._tail.next = n, n.prev = this._tail, n.next = null, this._tail = n) : this._head = this._tail = n, n.animation = this;
  }, e.prototype.addAnimator = function(n) {
    n.animation = this;
    var r = n.getClip();
    r && this.addClip(r);
  }, e.prototype.removeClip = function(n) {
    if (n.animation) {
      var r = n.prev, i = n.next;
      r ? r.next = i : this._head = i, i ? i.prev = r : this._tail = r, n.next = n.prev = n.animation = null;
    }
  }, e.prototype.removeAnimator = function(n) {
    var r = n.getClip();
    r && this.removeClip(r), n.animation = null;
  }, e.prototype.update = function(n) {
    for (var r = Iv() - this._pausedTime, i = r - this._time, a = this._head; a; ) {
      var o = a.next, s = a.step(r, i);
      s && (a.ondestroy(), this.removeClip(a)), a = o;
    }
    this._time = r, n || (this.trigger("frame", i), this.stage.update && this.stage.update());
  }, e.prototype._startLoop = function() {
    var n = this;
    this._running = !0;
    function r() {
      n._running && (SC(r), !n._paused && n.update());
    }
    SC(r);
  }, e.prototype.start = function() {
    this._running || (this._time = Iv(), this._pausedTime = 0, this._startLoop());
  }, e.prototype.stop = function() {
    this._running = !1;
  }, e.prototype.pause = function() {
    this._paused || (this._pauseStart = Iv(), this._paused = !0);
  }, e.prototype.resume = function() {
    this._paused && (this._pausedTime += Iv() - this._pauseStart, this._paused = !1);
  }, e.prototype.clear = function() {
    for (var n = this._head; n; ) {
      var r = n.next;
      n.prev = n.next = n.animation = null, n = r;
    }
    this._head = this._tail = null;
  }, e.prototype.isFinished = function() {
    return this._head == null;
  }, e.prototype.animate = function(n, r) {
    r = r || {}, this.start();
    var i = new C5(n, r.loop);
    return this.addAnimator(i), i;
  }, e;
}(fs), wGe = 300, NE = Gt.domSupported, BE = function() {
  var t = [
    "click",
    "dblclick",
    "mousewheel",
    "wheel",
    "mouseout",
    "mouseup",
    "mousedown",
    "mousemove",
    "contextmenu"
  ], e = [
    "touchstart",
    "touchend",
    "touchmove"
  ], n = {
    pointerdown: 1,
    pointerup: 1,
    pointermove: 1,
    pointerout: 1
  }, r = Ce(t, function(i) {
    var a = i.replace("mouse", "pointer");
    return n.hasOwnProperty(a) ? a : i;
  });
  return {
    mouse: t,
    touch: e,
    pointer: r
  };
}(), D9 = {
  mouse: ["mousemove", "mouseup"],
  pointer: ["pointermove", "pointerup"]
}, R9 = !1;
function pk(t) {
  var e = t.pointerType;
  return e === "pen" || e === "touch";
}
function CGe(t) {
  t.touching = !0, t.touchTimer != null && (clearTimeout(t.touchTimer), t.touchTimer = null), t.touchTimer = setTimeout(function() {
    t.touching = !1, t.touchTimer = null;
  }, 700);
}
function zE(t) {
  t && (t.zrByTouch = !0);
}
function TGe(t, e) {
  return No(t.dom, new PGe(t, e), !0);
}
function Sse(t, e) {
  for (var n = e, r = !1; n && n.nodeType !== 9 && !(r = n.domBelongToZr || n !== e && n === t.painterRoot); )
    n = n.parentNode;
  return r;
}
var PGe = /* @__PURE__ */ function() {
  function t(e, n) {
    this.stopPropagation = fr, this.stopImmediatePropagation = fr, this.preventDefault = fr, this.type = n.type, this.target = this.currentTarget = e.dom, this.pointerType = n.pointerType, this.clientX = n.clientX, this.clientY = n.clientY;
  }
  return t;
}(), Cs = {
  mousedown: function(t) {
    t = No(this.dom, t), this.__mayPointerCapture = [t.zrX, t.zrY], this.trigger("mousedown", t);
  },
  mousemove: function(t) {
    t = No(this.dom, t);
    var e = this.__mayPointerCapture;
    e && (t.zrX !== e[0] || t.zrY !== e[1]) && this.__togglePointerCapture(!0), this.trigger("mousemove", t);
  },
  mouseup: function(t) {
    t = No(this.dom, t), this.__togglePointerCapture(!1), this.trigger("mouseup", t);
  },
  mouseout: function(t) {
    t = No(this.dom, t);
    var e = t.toElement || t.relatedTarget;
    Sse(this, e) || (this.__pointerCapturing && (t.zrEventControl = "no_globalout"), this.trigger("mouseout", t));
  },
  wheel: function(t) {
    R9 = !0, t = No(this.dom, t), this.trigger("mousewheel", t);
  },
  mousewheel: function(t) {
    R9 || (t = No(this.dom, t), this.trigger("mousewheel", t));
  },
  touchstart: function(t) {
    t = No(this.dom, t), zE(t), this.__lastTouchMoment = /* @__PURE__ */ new Date(), this.handler.processGesture(t, "start"), Cs.mousemove.call(this, t), Cs.mousedown.call(this, t);
  },
  touchmove: function(t) {
    t = No(this.dom, t), zE(t), this.handler.processGesture(t, "change"), Cs.mousemove.call(this, t);
  },
  touchend: function(t) {
    t = No(this.dom, t), zE(t), this.handler.processGesture(t, "end"), Cs.mouseup.call(this, t), +/* @__PURE__ */ new Date() - +this.__lastTouchMoment < wGe && Cs.click.call(this, t);
  },
  pointerdown: function(t) {
    Cs.mousedown.call(this, t);
  },
  pointermove: function(t) {
    pk(t) || Cs.mousemove.call(this, t);
  },
  pointerup: function(t) {
    Cs.mouseup.call(this, t);
  },
  pointerout: function(t) {
    pk(t) || Cs.mouseout.call(this, t);
  }
};
F(["click", "dblclick", "contextmenu"], function(t) {
  Cs[t] = function(e) {
    e = No(this.dom, e), this.trigger(t, e);
  };
});
var vk = {
  pointermove: function(t) {
    pk(t) || vk.mousemove.call(this, t);
  },
  pointerup: function(t) {
    vk.mouseup.call(this, t);
  },
  mousemove: function(t) {
    this.trigger("mousemove", t);
  },
  mouseup: function(t) {
    var e = this.__pointerCapturing;
    this.__togglePointerCapture(!1), this.trigger("mouseup", t), e && (t.zrEventControl = "only_globalout", this.trigger("mouseout", t));
  }
};
function $Ge(t, e) {
  var n = e.domHandlers;
  Gt.pointerEventsSupported ? F(BE.pointer, function(r) {
    lw(e, r, function(i) {
      n[r].call(t, i);
    });
  }) : (Gt.touchEventsSupported && F(BE.touch, function(r) {
    lw(e, r, function(i) {
      n[r].call(t, i), CGe(e);
    });
  }), F(BE.mouse, function(r) {
    lw(e, r, function(i) {
      i = O5(i), e.touching || n[r].call(t, i);
    });
  }));
}
function AGe(t, e) {
  Gt.pointerEventsSupported ? F(D9.pointer, n) : Gt.touchEventsSupported || F(D9.mouse, n);
  function n(r) {
    function i(a) {
      a = O5(a), Sse(t, a.target) || (a = TGe(t, a), e.domHandlers[r].call(t, a));
    }
    lw(e, r, i, { capture: !0 });
  }
}
function lw(t, e, n, r) {
  t.mounted[e] = n, t.listenerOpts[e] = r, ok(t.domTarget, e, n, r);
}
function VE(t) {
  var e = t.mounted;
  for (var n in e)
    e.hasOwnProperty(n) && B9e(t.domTarget, n, e[n], t.listenerOpts[n]);
  t.mounted = {};
}
var k9 = /* @__PURE__ */ function() {
  function t(e, n) {
    this.mounted = {}, this.listenerOpts = {}, this.touching = !1, this.domTarget = e, this.domHandlers = n;
  }
  return t;
}(), EGe = function(t) {
  le(e, t);
  function e(n, r) {
    var i = t.call(this) || this;
    return i.__pointerCapturing = !1, i.dom = n, i.painterRoot = r, i._localHandlerScope = new k9(n, Cs), NE && (i._globalHandlerScope = new k9(document, vk)), $Ge(i, i._localHandlerScope), i;
  }
  return e.prototype.dispose = function() {
    VE(this._localHandlerScope), NE && VE(this._globalHandlerScope);
  }, e.prototype.setCursor = function(n) {
    this.dom.style && (this.dom.style.cursor = n || "default");
  }, e.prototype.__togglePointerCapture = function(n) {
    if (this.__mayPointerCapture = null, NE && +this.__pointerCapturing ^ +n) {
      this.__pointerCapturing = n;
      var r = this._globalHandlerScope;
      n ? AGe(this, r) : VE(r);
    }
  }, e;
}(fs), xse = 1;
Gt.hasGlobalWindow && (xse = Math.max(window.devicePixelRatio || window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI || 1, 1));
var $C = xse, gk = 0.4, mk = "#333", yk = "#ccc", MGe = "#eee", L9 = i1, N9 = 5e-5;
function dd(t) {
  return t > N9 || t < -N9;
}
var hd = [], Up = [], FE = Na(), WE = Math.abs, IGe = function() {
  function t() {
  }
  return t.prototype.getLocalTransform = function(e) {
    return t.getLocalTransform(this, e);
  }, t.prototype.setPosition = function(e) {
    this.x = e[0], this.y = e[1];
  }, t.prototype.setScale = function(e) {
    this.scaleX = e[0], this.scaleY = e[1];
  }, t.prototype.setSkew = function(e) {
    this.skewX = e[0], this.skewY = e[1];
  }, t.prototype.setOrigin = function(e) {
    this.originX = e[0], this.originY = e[1];
  }, t.prototype.needLocalTransform = function() {
    return dd(this.rotation) || dd(this.x) || dd(this.y) || dd(this.scaleX - 1) || dd(this.scaleY - 1) || dd(this.skewX) || dd(this.skewY);
  }, t.prototype.updateTransform = function() {
    var e = this.parent && this.parent.transform, n = this.needLocalTransform(), r = this.transform;
    if (!(n || e)) {
      r && (L9(r), this.invTransform = null);
      return;
    }
    r = r || Na(), n ? this.getLocalTransform(r) : L9(r), e && (n ? Ll(r, e, r) : lP(r, e)), this.transform = r, this._resolveGlobalScaleRatio(r);
  }, t.prototype._resolveGlobalScaleRatio = function(e) {
    var n = this.globalScaleRatio;
    if (n != null && n !== 1) {
      this.getGlobalScale(hd);
      var r = hd[0] < 0 ? -1 : 1, i = hd[1] < 0 ? -1 : 1, a = ((hd[0] - r) * n + r) / hd[0] || 0, o = ((hd[1] - i) * n + i) / hd[1] || 0;
      e[0] *= a, e[1] *= a, e[2] *= o, e[3] *= o;
    }
    this.invTransform = this.invTransform || Na(), dp(this.invTransform, e);
  }, t.prototype.getComputedTransform = function() {
    for (var e = this, n = []; e; )
      n.push(e), e = e.parent;
    for (; e = n.pop(); )
      e.updateTransform();
    return this.transform;
  }, t.prototype.setLocalTransform = function(e) {
    if (e) {
      var n = e[0] * e[0] + e[1] * e[1], r = e[2] * e[2] + e[3] * e[3], i = Math.atan2(e[1], e[0]), a = Math.PI / 2 + i - Math.atan2(e[3], e[2]);
      r = Math.sqrt(r) * Math.cos(a), n = Math.sqrt(n), this.skewX = a, this.skewY = 0, this.rotation = -i, this.x = +e[4], this.y = +e[5], this.scaleX = n, this.scaleY = r, this.originX = 0, this.originY = 0;
    }
  }, t.prototype.decomposeTransform = function() {
    if (this.transform) {
      var e = this.parent, n = this.transform;
      e && e.transform && (e.invTransform = e.invTransform || Na(), Ll(Up, e.invTransform, n), n = Up);
      var r = this.originX, i = this.originY;
      (r || i) && (FE[4] = r, FE[5] = i, Ll(Up, n, FE), Up[4] -= r, Up[5] -= i, n = Up), this.setLocalTransform(n);
    }
  }, t.prototype.getGlobalScale = function(e) {
    var n = this.transform;
    return e = e || [], n ? (e[0] = Math.sqrt(n[0] * n[0] + n[1] * n[1]), e[1] = Math.sqrt(n[2] * n[2] + n[3] * n[3]), n[0] < 0 && (e[0] = -e[0]), n[3] < 0 && (e[1] = -e[1]), e) : (e[0] = 1, e[1] = 1, e);
  }, t.prototype.transformCoordToLocal = function(e, n) {
    var r = [e, n], i = this.invTransform;
    return i && oi(r, r, i), r;
  }, t.prototype.transformCoordToGlobal = function(e, n) {
    var r = [e, n], i = this.transform;
    return i && oi(r, r, i), r;
  }, t.prototype.getLineScale = function() {
    var e = this.transform;
    return e && WE(e[0] - 1) > 1e-10 && WE(e[3] - 1) > 1e-10 ? Math.sqrt(WE(e[0] * e[3] - e[2] * e[1])) : 1;
  }, t.prototype.copyTransform = function(e) {
    wse(this, e);
  }, t.getLocalTransform = function(e, n) {
    n = n || [];
    var r = e.originX || 0, i = e.originY || 0, a = e.scaleX, o = e.scaleY, s = e.anchorX, l = e.anchorY, u = e.rotation || 0, c = e.x, f = e.y, d = e.skewX ? Math.tan(e.skewX) : 0, h = e.skewY ? Math.tan(-e.skewY) : 0;
    if (r || i || s || l) {
      var p = r + s, v = i + l;
      n[4] = -p * a - d * v * o, n[5] = -v * o - h * p * a;
    } else
      n[4] = n[5] = 0;
    return n[0] = a, n[3] = o, n[1] = h * a, n[2] = d * o, u && Lf(n, n, u), n[4] += r + c, n[5] += i + f, n;
  }, t.initDefaultProps = function() {
    var e = t.prototype;
    e.scaleX = e.scaleY = e.globalScaleRatio = 1, e.x = e.y = e.originX = e.originY = e.skewX = e.skewY = e.rotation = e.anchorX = e.anchorY = 0;
  }(), t;
}(), Hl = [
  "x",
  "y",
  "originX",
  "originY",
  "anchorX",
  "anchorY",
  "rotation",
  "scaleX",
  "scaleY",
  "skewX",
  "skewY"
];
function wse(t, e) {
  for (var n = 0; n < Hl.length; n++) {
    var r = Hl[n];
    t[r] = e[r];
  }
}
const Pu = IGe;
var B9 = {};
function fo(t, e) {
  e = e || vf;
  var n = B9[e];
  n || (n = B9[e] = new a1(500));
  var r = n.get(t);
  return r == null && (r = Hs.measureText(t, e).width, n.put(t, r)), r;
}
function z9(t, e, n, r) {
  var i = fo(t, e), a = fP(e), o = vy(0, i, n), s = Ov(0, a, r), l = new bt(o, s, i, a);
  return l;
}
function o1(t, e, n, r) {
  var i = ((t || "") + "").split(`
`), a = i.length;
  if (a === 1)
    return z9(i[0], e, n, r);
  for (var o = new bt(0, 0, 0, 0), s = 0; s < i.length; s++) {
    var l = z9(i[s], e, n, r);
    s === 0 ? o.copy(l) : o.union(l);
  }
  return o;
}
function vy(t, e, n) {
  return n === "right" ? t -= e : n === "center" && (t -= e / 2), t;
}
function Ov(t, e, n) {
  return n === "middle" ? t -= e / 2 : n === "bottom" && (t -= e), t;
}
function fP(t) {
  return fo("国", t);
}
function js(t, e) {
  return typeof t == "string" ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t;
}
function AC(t, e, n) {
  var r = e.position || "inside", i = e.distance != null ? e.distance : 5, a = n.height, o = n.width, s = a / 2, l = n.x, u = n.y, c = "left", f = "top";
  if (r instanceof Array)
    l += js(r[0], n.width), u += js(r[1], n.height), c = null, f = null;
  else
    switch (r) {
      case "left":
        l -= i, u += s, c = "right", f = "middle";
        break;
      case "right":
        l += i + o, u += s, f = "middle";
        break;
      case "top":
        l += o / 2, u -= i, c = "center", f = "bottom";
        break;
      case "bottom":
        l += o / 2, u += a + i, c = "center";
        break;
      case "inside":
        l += o / 2, u += s, c = "center", f = "middle";
        break;
      case "insideLeft":
        l += i, u += s, f = "middle";
        break;
      case "insideRight":
        l += o - i, u += s, c = "right", f = "middle";
        break;
      case "insideTop":
        l += o / 2, u += i, c = "center";
        break;
      case "insideBottom":
        l += o / 2, u += a - i, c = "center", f = "bottom";
        break;
      case "insideTopLeft":
        l += i, u += i;
        break;
      case "insideTopRight":
        l += o - i, u += i, c = "right";
        break;
      case "insideBottomLeft":
        l += i, u += a - i, f = "bottom";
        break;
      case "insideBottomRight":
        l += o - i, u += a - i, c = "right", f = "bottom";
        break;
    }
  return t = t || {}, t.x = l, t.y = u, t.align = c, t.verticalAlign = f, t;
}
var QE = "__zr_normal__", HE = Hl.concat(["ignore"]), DGe = os(Hl, function(t, e) {
  return t[e] = !0, t;
}, { ignore: !1 }), Xp = {}, RGe = new bt(0, 0, 0, 0), dP = function() {
  function t(e) {
    this.id = g5(), this.animators = [], this.currentStates = [], this.states = {}, this._init(e);
  }
  return t.prototype._init = function(e) {
    this.attr(e);
  }, t.prototype.drift = function(e, n, r) {
    switch (this.draggable) {
      case "horizontal":
        n = 0;
        break;
      case "vertical":
        e = 0;
        break;
    }
    var i = this.transform;
    i || (i = this.transform = [1, 0, 0, 1, 0, 0]), i[4] += e, i[5] += n, this.decomposeTransform(), this.markRedraw();
  }, t.prototype.beforeUpdate = function() {
  }, t.prototype.afterUpdate = function() {
  }, t.prototype.update = function() {
    this.updateTransform(), this.__dirty && this.updateInnerText();
  }, t.prototype.updateInnerText = function(e) {
    var n = this._textContent;
    if (n && (!n.ignore || e)) {
      this.textConfig || (this.textConfig = {});
      var r = this.textConfig, i = r.local, a = n.innerTransformable, o = void 0, s = void 0, l = !1;
      a.parent = i ? this : null;
      var u = !1;
      if (a.copyTransform(n), r.position != null) {
        var c = RGe;
        r.layoutRect ? c.copy(r.layoutRect) : c.copy(this.getBoundingRect()), i || c.applyTransform(this.transform), this.calculateTextPosition ? this.calculateTextPosition(Xp, r, c) : AC(Xp, r, c), a.x = Xp.x, a.y = Xp.y, o = Xp.align, s = Xp.verticalAlign;
        var f = r.origin;
        if (f && r.rotation != null) {
          var d = void 0, h = void 0;
          f === "center" ? (d = c.width * 0.5, h = c.height * 0.5) : (d = js(f[0], c.width), h = js(f[1], c.height)), u = !0, a.originX = -a.x + d + (i ? 0 : c.x), a.originY = -a.y + h + (i ? 0 : c.y);
        }
      }
      r.rotation != null && (a.rotation = r.rotation);
      var p = r.offset;
      p && (a.x += p[0], a.y += p[1], u || (a.originX = -p[0], a.originY = -p[1]));
      var v = r.inside == null ? typeof r.position == "string" && r.position.indexOf("inside") >= 0 : r.inside, g = this._innerTextDefaultStyle || (this._innerTextDefaultStyle = {}), m = void 0, y = void 0, _ = void 0;
      v && this.canBeInsideText() ? (m = r.insideFill, y = r.insideStroke, (m == null || m === "auto") && (m = this.getInsideTextFill()), (y == null || y === "auto") && (y = this.getInsideTextStroke(m), _ = !0)) : (m = r.outsideFill, y = r.outsideStroke, (m == null || m === "auto") && (m = this.getOutsideFill()), (y == null || y === "auto") && (y = this.getOutsideStroke(m), _ = !0)), m = m || "#000", (m !== g.fill || y !== g.stroke || _ !== g.autoStroke || o !== g.align || s !== g.verticalAlign) && (l = !0, g.fill = m, g.stroke = y, g.autoStroke = _, g.align = o, g.verticalAlign = s, n.setDefaultTextStyle(g)), n.__dirty |= to, l && n.dirtyStyle(!0);
    }
  }, t.prototype.canBeInsideText = function() {
    return !0;
  }, t.prototype.getInsideTextFill = function() {
    return "#fff";
  }, t.prototype.getInsideTextStroke = function(e) {
    return "#000";
  }, t.prototype.getOutsideFill = function() {
    return this.__zr && this.__zr.isDarkMode() ? yk : mk;
  }, t.prototype.getOutsideStroke = function(e) {
    var n = this.__zr && this.__zr.getBackgroundColor(), r = typeof n == "string" && oa(n);
    r || (r = [255, 255, 255, 1]);
    for (var i = r[3], a = this.__zr.isDarkMode(), o = 0; o < 3; o++)
      r[o] = r[o] * i + (a ? 0 : 255) * (1 - i);
    return r[3] = 1, Bs(r, "rgba");
  }, t.prototype.traverse = function(e, n) {
  }, t.prototype.attrKV = function(e, n) {
    e === "textConfig" ? this.setTextConfig(n) : e === "textContent" ? this.setTextContent(n) : e === "clipPath" ? this.setClipPath(n) : e === "extra" ? (this.extra = this.extra || {}, _e(this.extra, n)) : this[e] = n;
  }, t.prototype.hide = function() {
    this.ignore = !0, this.markRedraw();
  }, t.prototype.show = function() {
    this.ignore = !1, this.markRedraw();
  }, t.prototype.attr = function(e, n) {
    if (typeof e == "string")
      this.attrKV(e, n);
    else if (nt(e))
      for (var r = e, i = kt(r), a = 0; a < i.length; a++) {
        var o = i[a];
        this.attrKV(o, e[o]);
      }
    return this.markRedraw(), this;
  }, t.prototype.saveCurrentToNormalState = function(e) {
    this._innerSaveToNormal(e);
    for (var n = this._normalState, r = 0; r < this.animators.length; r++) {
      var i = this.animators[r], a = i.__fromStateTransition;
      if (!(i.getLoop() || a && a !== QE)) {
        var o = i.targetName, s = o ? n[o] : n;
        i.saveTo(s);
      }
    }
  }, t.prototype._innerSaveToNormal = function(e) {
    var n = this._normalState;
    n || (n = this._normalState = {}), e.textConfig && !n.textConfig && (n.textConfig = this.textConfig), this._savePrimaryToNormal(e, n, HE);
  }, t.prototype._savePrimaryToNormal = function(e, n, r) {
    for (var i = 0; i < r.length; i++) {
      var a = r[i];
      e[a] != null && !(a in n) && (n[a] = this[a]);
    }
  }, t.prototype.hasState = function() {
    return this.currentStates.length > 0;
  }, t.prototype.getState = function(e) {
    return this.states[e];
  }, t.prototype.ensureState = function(e) {
    var n = this.states;
    return n[e] || (n[e] = {}), n[e];
  }, t.prototype.clearStates = function(e) {
    this.useState(QE, !1, e);
  }, t.prototype.useState = function(e, n, r, i) {
    var a = e === QE, o = this.hasState();
    if (!(!o && a)) {
      var s = this.currentStates, l = this.stateTransition;
      if (!(St(s, e) >= 0 && (n || s.length === 1))) {
        var u;
        if (this.stateProxy && !a && (u = this.stateProxy(e)), u || (u = this.states && this.states[e]), !u && !a) {
          qo("State " + e + " not exists.");
          return;
        }
        a || this.saveCurrentToNormalState(u);
        var c = !!(u && u.hoverLayer || i);
        c && this._toggleHoverLayerFlag(!0), this._applyStateObj(e, u, this._normalState, n, !r && !this.__inHover && l && l.duration > 0, l);
        var f = this._textContent, d = this._textGuide;
        return f && f.useState(e, n, r, c), d && d.useState(e, n, r, c), a ? (this.currentStates = [], this._normalState = {}) : n ? this.currentStates.push(e) : this.currentStates = [e], this._updateAnimationTargets(), this.markRedraw(), !c && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= ~to), u;
      }
    }
  }, t.prototype.useStates = function(e, n, r) {
    if (!e.length)
      this.clearStates();
    else {
      var i = [], a = this.currentStates, o = e.length, s = o === a.length;
      if (s) {
        for (var l = 0; l < o; l++)
          if (e[l] !== a[l]) {
            s = !1;
            break;
          }
      }
      if (s)
        return;
      for (var l = 0; l < o; l++) {
        var u = e[l], c = void 0;
        this.stateProxy && (c = this.stateProxy(u, e)), c || (c = this.states[u]), c && i.push(c);
      }
      var f = i[o - 1], d = !!(f && f.hoverLayer || r);
      d && this._toggleHoverLayerFlag(!0);
      var h = this._mergeStates(i), p = this.stateTransition;
      this.saveCurrentToNormalState(h), this._applyStateObj(e.join(","), h, this._normalState, !1, !n && !this.__inHover && p && p.duration > 0, p);
      var v = this._textContent, g = this._textGuide;
      v && v.useStates(e, n, d), g && g.useStates(e, n, d), this._updateAnimationTargets(), this.currentStates = e.slice(), this.markRedraw(), !d && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= ~to);
    }
  }, t.prototype.isSilent = function() {
    for (var e = this.silent, n = this.parent; !e && n; ) {
      if (n.silent) {
        e = !0;
        break;
      }
      n = n.parent;
    }
    return e;
  }, t.prototype._updateAnimationTargets = function() {
    for (var e = 0; e < this.animators.length; e++) {
      var n = this.animators[e];
      n.targetName && n.changeTarget(this[n.targetName]);
    }
  }, t.prototype.removeState = function(e) {
    var n = St(this.currentStates, e);
    if (n >= 0) {
      var r = this.currentStates.slice();
      r.splice(n, 1), this.useStates(r);
    }
  }, t.prototype.replaceState = function(e, n, r) {
    var i = this.currentStates.slice(), a = St(i, e), o = St(i, n) >= 0;
    a >= 0 ? o ? i.splice(a, 1) : i[a] = n : r && !o && i.push(n), this.useStates(i);
  }, t.prototype.toggleState = function(e, n) {
    n ? this.useState(e, !0) : this.removeState(e);
  }, t.prototype._mergeStates = function(e) {
    for (var n = {}, r, i = 0; i < e.length; i++) {
      var a = e[i];
      _e(n, a), a.textConfig && (r = r || {}, _e(r, a.textConfig));
    }
    return r && (n.textConfig = r), n;
  }, t.prototype._applyStateObj = function(e, n, r, i, a, o) {
    var s = !(n && i);
    n && n.textConfig ? (this.textConfig = _e({}, i ? this.textConfig : r.textConfig), _e(this.textConfig, n.textConfig)) : s && r.textConfig && (this.textConfig = r.textConfig);
    for (var l = {}, u = !1, c = 0; c < HE.length; c++) {
      var f = HE[c], d = a && DGe[f];
      n && n[f] != null ? d ? (u = !0, l[f] = n[f]) : this[f] = n[f] : s && r[f] != null && (d ? (u = !0, l[f] = r[f]) : this[f] = r[f]);
    }
    if (!a)
      for (var c = 0; c < this.animators.length; c++) {
        var h = this.animators[c], p = h.targetName;
        h.getLoop() || h.__changeFinalValue(p ? (n || r)[p] : n || r);
      }
    u && this._transitionState(e, l, o);
  }, t.prototype._attachComponent = function(e) {
    if (e.__zr && !e.__hostTarget) {
      if (process.env.NODE_ENV !== "production")
        throw new Error("Text element has been added to zrender.");
      return;
    }
    if (e === this) {
      if (process.env.NODE_ENV !== "production")
        throw new Error("Recursive component attachment.");
      return;
    }
    var n = this.__zr;
    n && e.addSelfToZr(n), e.__zr = n, e.__hostTarget = this;
  }, t.prototype._detachComponent = function(e) {
    e.__zr && e.removeSelfFromZr(e.__zr), e.__zr = null, e.__hostTarget = null;
  }, t.prototype.getClipPath = function() {
    return this._clipPath;
  }, t.prototype.setClipPath = function(e) {
    this._clipPath && this._clipPath !== e && this.removeClipPath(), this._attachComponent(e), this._clipPath = e, this.markRedraw();
  }, t.prototype.removeClipPath = function() {
    var e = this._clipPath;
    e && (this._detachComponent(e), this._clipPath = null, this.markRedraw());
  }, t.prototype.getTextContent = function() {
    return this._textContent;
  }, t.prototype.setTextContent = function(e) {
    var n = this._textContent;
    if (n !== e) {
      if (n && n !== e && this.removeTextContent(), process.env.NODE_ENV !== "production" && e.__zr && !e.__hostTarget)
        throw new Error("Text element has been added to zrender.");
      e.innerTransformable = new Pu(), this._attachComponent(e), this._textContent = e, this.markRedraw();
    }
  }, t.prototype.setTextConfig = function(e) {
    this.textConfig || (this.textConfig = {}), _e(this.textConfig, e), this.markRedraw();
  }, t.prototype.removeTextConfig = function() {
    this.textConfig = null, this.markRedraw();
  }, t.prototype.removeTextContent = function() {
    var e = this._textContent;
    e && (e.innerTransformable = null, this._detachComponent(e), this._textContent = null, this._innerTextDefaultStyle = null, this.markRedraw());
  }, t.prototype.getTextGuideLine = function() {
    return this._textGuide;
  }, t.prototype.setTextGuideLine = function(e) {
    this._textGuide && this._textGuide !== e && this.removeTextGuideLine(), this._attachComponent(e), this._textGuide = e, this.markRedraw();
  }, t.prototype.removeTextGuideLine = function() {
    var e = this._textGuide;
    e && (this._detachComponent(e), this._textGuide = null, this.markRedraw());
  }, t.prototype.markRedraw = function() {
    this.__dirty |= to;
    var e = this.__zr;
    e && (this.__inHover ? e.refreshHover() : e.refresh()), this.__hostTarget && this.__hostTarget.markRedraw();
  }, t.prototype.dirty = function() {
    this.markRedraw();
  }, t.prototype._toggleHoverLayerFlag = function(e) {
    this.__inHover = e;
    var n = this._textContent, r = this._textGuide;
    n && (n.__inHover = e), r && (r.__inHover = e);
  }, t.prototype.addSelfToZr = function(e) {
    if (this.__zr !== e) {
      this.__zr = e;
      var n = this.animators;
      if (n)
        for (var r = 0; r < n.length; r++)
          e.animation.addAnimator(n[r]);
      this._clipPath && this._clipPath.addSelfToZr(e), this._textContent && this._textContent.addSelfToZr(e), this._textGuide && this._textGuide.addSelfToZr(e);
    }
  }, t.prototype.removeSelfFromZr = function(e) {
    if (this.__zr) {
      this.__zr = null;
      var n = this.animators;
      if (n)
        for (var r = 0; r < n.length; r++)
          e.animation.removeAnimator(n[r]);
      this._clipPath && this._clipPath.removeSelfFromZr(e), this._textContent && this._textContent.removeSelfFromZr(e), this._textGuide && this._textGuide.removeSelfFromZr(e);
    }
  }, t.prototype.animate = function(e, n, r) {
    var i = e ? this[e] : this;
    if (process.env.NODE_ENV !== "production" && !i) {
      qo('Property "' + e + '" is not existed in element ' + this.id);
      return;
    }
    var a = new C5(i, n, r);
    return e && (a.targetName = e), this.addAnimator(a, e), a;
  }, t.prototype.addAnimator = function(e, n) {
    var r = this.__zr, i = this;
    e.during(function() {
      i.updateDuringAnimation(n);
    }).done(function() {
      var a = i.animators, o = St(a, e);
      o >= 0 && a.splice(o, 1);
    }), this.animators.push(e), r && r.animation.addAnimator(e), r && r.wakeUp();
  }, t.prototype.updateDuringAnimation = function(e) {
    this.markRedraw();
  }, t.prototype.stopAnimation = function(e, n) {
    for (var r = this.animators, i = r.length, a = [], o = 0; o < i; o++) {
      var s = r[o];
      !e || e === s.scope ? s.stop(n) : a.push(s);
    }
    return this.animators = a, this;
  }, t.prototype.animateTo = function(e, n, r) {
    GE(this, e, n, r);
  }, t.prototype.animateFrom = function(e, n, r) {
    GE(this, e, n, r, !0);
  }, t.prototype._transitionState = function(e, n, r, i) {
    for (var a = GE(this, n, r, i), o = 0; o < a.length; o++)
      a[o].__fromStateTransition = e;
  }, t.prototype.getBoundingRect = function() {
    return null;
  }, t.prototype.getPaintRect = function() {
    return null;
  }, t.initDefaultProps = function() {
    var e = t.prototype;
    e.type = "element", e.name = "", e.ignore = e.silent = e.isGroup = e.draggable = e.dragging = e.ignoreClip = e.__inHover = !1, e.__dirty = to;
    var n = {};
    function r(a, o, s) {
      n[a + o + s] || (console.warn("DEPRECATED: '" + a + "' has been deprecated. use '" + o + "', '" + s + "' instead"), n[a + o + s] = !0);
    }
    function i(a, o, s, l) {
      Object.defineProperty(e, a, {
        get: function() {
          if (process.env.NODE_ENV !== "production" && r(a, s, l), !this[o]) {
            var c = this[o] = [];
            u(this, c);
          }
          return this[o];
        },
        set: function(c) {
          process.env.NODE_ENV !== "production" && r(a, s, l), this[s] = c[0], this[l] = c[1], this[o] = c, u(this, c);
        }
      });
      function u(c, f) {
        Object.defineProperty(f, 0, {
          get: function() {
            return c[s];
          },
          set: function(d) {
            c[s] = d;
          }
        }), Object.defineProperty(f, 1, {
          get: function() {
            return c[l];
          },
          set: function(d) {
            c[l] = d;
          }
        });
      }
    }
    Object.defineProperty && (i("position", "_legacyPos", "x", "y"), i("scale", "_legacyScale", "scaleX", "scaleY"), i("origin", "_legacyOrigin", "originX", "originY"));
  }(), t;
}();
vr(dP, fs);
vr(dP, Pu);
function GE(t, e, n, r, i) {
  n = n || {};
  var a = [];
  Cse(t, "", t, e, n, r, a, i);
  var o = a.length, s = !1, l = n.done, u = n.aborted, c = function() {
    s = !0, o--, o <= 0 && (s ? l && l() : u && u());
  }, f = function() {
    o--, o <= 0 && (s ? l && l() : u && u());
  };
  o || l && l(), a.length > 0 && n.during && a[0].during(function(p, v) {
    n.during(v);
  });
  for (var d = 0; d < a.length; d++) {
    var h = a[d];
    c && h.done(c), f && h.aborted(f), n.force && h.duration(n.duration), h.start(n.easing);
  }
  return a;
}
function jE(t, e, n) {
  for (var r = 0; r < n; r++)
    t[r] = e[r];
}
function kGe(t) {
  return Pi(t[0]);
}
function LGe(t, e, n) {
  if (Pi(e[n]))
    if (Pi(t[n]) || (t[n] = []), Wi(e[n])) {
      var r = e[n].length;
      t[n].length !== r && (t[n] = new e[n].constructor(r), jE(t[n], e[n], r));
    } else {
      var i = e[n], a = t[n], o = i.length;
      if (kGe(i))
        for (var s = i[0].length, l = 0; l < o; l++)
          a[l] ? jE(a[l], i[l], s) : a[l] = Array.prototype.slice.call(i[l]);
      else
        jE(a, i, o);
      a.length = i.length;
    }
  else
    t[n] = e[n];
}
function NGe(t, e) {
  return t === e || Pi(t) && Pi(e) && BGe(t, e);
}
function BGe(t, e) {
  var n = t.length;
  if (n !== e.length)
    return !1;
  for (var r = 0; r < n; r++)
    if (t[r] !== e[r])
      return !1;
  return !0;
}
function Cse(t, e, n, r, i, a, o, s) {
  for (var l = kt(r), u = i.duration, c = i.delay, f = i.additive, d = i.setToFinal, h = !nt(a), p = t.animators, v = [], g = 0; g < l.length; g++) {
    var m = l[g], y = r[m];
    if (y != null && n[m] != null && (h || a[m]))
      if (nt(y) && !Pi(y) && !n1(y)) {
        if (e) {
          s || (n[m] = y, t.updateDuringAnimation(e));
          continue;
        }
        Cse(t, m, n[m], y, i, a && a[m], o, s);
      } else
        v.push(m);
    else s || (n[m] = y, t.updateDuringAnimation(e), v.push(m));
  }
  var _ = v.length;
  if (!f && _)
    for (var O = 0; O < p.length; O++) {
      var S = p[O];
      if (S.targetName === e) {
        var x = S.stopTracks(v);
        if (x) {
          var C = St(p, S);
          p.splice(C, 1);
        }
      }
    }
  if (i.force || (v = yn(v, function(E) {
    return !NGe(r[E], n[E]);
  }), _ = v.length), _ > 0 || i.force && !o.length) {
    var P = void 0, $ = void 0, T = void 0;
    if (s) {
      $ = {}, d && (P = {});
      for (var O = 0; O < _; O++) {
        var m = v[O];
        $[m] = n[m], d ? P[m] = r[m] : n[m] = r[m];
      }
    } else if (d) {
      T = {};
      for (var O = 0; O < _; O++) {
        var m = v[O];
        T[m] = Jy(n[m]), LGe(n, r, m);
      }
    }
    var S = new C5(n, !1, !1, f ? yn(p, function(M) {
      return M.targetName === e;
    }) : null);
    S.targetName = e, i.scope && (S.scope = i.scope), d && P && S.whenWithKeys(0, P, v), T && S.whenWithKeys(0, T, v), S.whenWithKeys(u ?? 500, s ? $ : r, v).delay(c || 0), t.addAnimator(S, e), o.push(S);
  }
}
var Tse = function(t) {
  le(e, t);
  function e(n) {
    var r = t.call(this) || this;
    return r.isGroup = !0, r._children = [], r.attr(n), r;
  }
  return e.prototype.childrenRef = function() {
    return this._children;
  }, e.prototype.children = function() {
    return this._children.slice();
  }, e.prototype.childAt = function(n) {
    return this._children[n];
  }, e.prototype.childOfName = function(n) {
    for (var r = this._children, i = 0; i < r.length; i++)
      if (r[i].name === n)
        return r[i];
  }, e.prototype.childCount = function() {
    return this._children.length;
  }, e.prototype.add = function(n) {
    if (n && (n !== this && n.parent !== this && (this._children.push(n), this._doAdd(n)), process.env.NODE_ENV !== "production" && n.__hostTarget))
      throw "This elemenet has been used as an attachment";
    return this;
  }, e.prototype.addBefore = function(n, r) {
    if (n && n !== this && n.parent !== this && r && r.parent === this) {
      var i = this._children, a = i.indexOf(r);
      a >= 0 && (i.splice(a, 0, n), this._doAdd(n));
    }
    return this;
  }, e.prototype.replace = function(n, r) {
    var i = St(this._children, n);
    return i >= 0 && this.replaceAt(r, i), this;
  }, e.prototype.replaceAt = function(n, r) {
    var i = this._children, a = i[r];
    if (n && n !== this && n.parent !== this && n !== a) {
      i[r] = n, a.parent = null;
      var o = this.__zr;
      o && a.removeSelfFromZr(o), this._doAdd(n);
    }
    return this;
  }, e.prototype._doAdd = function(n) {
    n.parent && n.parent.remove(n), n.parent = this;
    var r = this.__zr;
    r && r !== n.__zr && n.addSelfToZr(r), r && r.refresh();
  }, e.prototype.remove = function(n) {
    var r = this.__zr, i = this._children, a = St(i, n);
    return a < 0 ? this : (i.splice(a, 1), n.parent = null, r && n.removeSelfFromZr(r), r && r.refresh(), this);
  }, e.prototype.removeAll = function() {
    for (var n = this._children, r = this.__zr, i = 0; i < n.length; i++) {
      var a = n[i];
      r && a.removeSelfFromZr(r), a.parent = null;
    }
    return n.length = 0, this;
  }, e.prototype.eachChild = function(n, r) {
    for (var i = this._children, a = 0; a < i.length; a++) {
      var o = i[a];
      n.call(r, o, a);
    }
    return this;
  }, e.prototype.traverse = function(n, r) {
    for (var i = 0; i < this._children.length; i++) {
      var a = this._children[i], o = n.call(r, a);
      a.isGroup && !o && a.traverse(n, r);
    }
    return this;
  }, e.prototype.addSelfToZr = function(n) {
    t.prototype.addSelfToZr.call(this, n);
    for (var r = 0; r < this._children.length; r++) {
      var i = this._children[r];
      i.addSelfToZr(n);
    }
  }, e.prototype.removeSelfFromZr = function(n) {
    t.prototype.removeSelfFromZr.call(this, n);
    for (var r = 0; r < this._children.length; r++) {
      var i = this._children[r];
      i.removeSelfFromZr(n);
    }
  }, e.prototype.getBoundingRect = function(n) {
    for (var r = new bt(0, 0, 0, 0), i = n || this._children, a = [], o = null, s = 0; s < i.length; s++) {
      var l = i[s];
      if (!(l.ignore || l.invisible)) {
        var u = l.getBoundingRect(), c = l.getLocalTransform(a);
        c ? (bt.applyTransform(r, u, c), o = o || r.clone(), o.union(r)) : (o = o || u.clone(), o.union(u));
      }
    }
    return o || r;
  }, e;
}(dP);
Tse.prototype.type = "group";
const ct = Tse;
/*!
* ZRender, a high performance 2d drawing library.
*
* Copyright (c) 2013, Baidu Inc.
* All rights reserved.
*
* LICENSE
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
*/
var gy = {}, rh = {};
function zGe(t) {
  delete rh[t];
}
function VGe(t) {
  if (!t)
    return !1;
  if (typeof t == "string")
    return jb(t, 1) < gk;
  if (t.colorStops) {
    for (var e = t.colorStops, n = 0, r = e.length, i = 0; i < r; i++)
      n += jb(e[i].color, 1);
    return n /= r, n < gk;
  }
  return !1;
}
var FGe = function() {
  function t(e, n, r) {
    var i = this;
    this._sleepAfterStill = 10, this._stillFrameAccum = 0, this._needsRefresh = !0, this._needsRefreshHover = !0, this._darkMode = !1, r = r || {}, this.dom = n, this.id = e;
    var a = new q9e(), o = r.renderer || "canvas";
    if (gy[o] || (o = kt(gy)[0]), process.env.NODE_ENV !== "production" && !gy[o])
      throw new Error("Renderer '" + o + "' is not imported. Please import it first.");
    r.useDirtyRect = r.useDirtyRect == null ? !1 : r.useDirtyRect;
    var s = new gy[o](n, a, r, e), l = r.ssr || s.ssrOnly;
    this.storage = a, this.painter = s;
    var u = !Gt.node && !Gt.worker && !l ? new EGe(s.getViewportRoot(), s.root) : null, c = r.useCoarsePointer, f = c == null || c === "auto" ? Gt.touchEventsSupported : !!c, d = 44, h;
    f && (h = dt(r.pointerSize, d)), this.handler = new ise(a, s, u, s.root, h), this.animation = new xGe({
      stage: {
        update: l ? null : function() {
          return i._flush(!0);
        }
      }
    }), l || this.animation.start();
  }
  return t.prototype.add = function(e) {
    this._disposed || !e || (this.storage.addRoot(e), e.addSelfToZr(this), this.refresh());
  }, t.prototype.remove = function(e) {
    this._disposed || !e || (this.storage.delRoot(e), e.removeSelfFromZr(this), this.refresh());
  }, t.prototype.configLayer = function(e, n) {
    this._disposed || (this.painter.configLayer && this.painter.configLayer(e, n), this.refresh());
  }, t.prototype.setBackgroundColor = function(e) {
    this._disposed || (this.painter.setBackgroundColor && this.painter.setBackgroundColor(e), this.refresh(), this._backgroundColor = e, this._darkMode = VGe(e));
  }, t.prototype.getBackgroundColor = function() {
    return this._backgroundColor;
  }, t.prototype.setDarkMode = function(e) {
    this._darkMode = e;
  }, t.prototype.isDarkMode = function() {
    return this._darkMode;
  }, t.prototype.refreshImmediately = function(e) {
    this._disposed || (e || this.animation.update(!0), this._needsRefresh = !1, this.painter.refresh(), this._needsRefresh = !1);
  }, t.prototype.refresh = function() {
    this._disposed || (this._needsRefresh = !0, this.animation.start());
  }, t.prototype.flush = function() {
    this._disposed || this._flush(!1);
  }, t.prototype._flush = function(e) {
    var n, r = Iv();
    this._needsRefresh && (n = !0, this.refreshImmediately(e)), this._needsRefreshHover && (n = !0, this.refreshHoverImmediately());
    var i = Iv();
    n ? (this._stillFrameAccum = 0, this.trigger("rendered", {
      elapsedTime: i - r
    })) : this._sleepAfterStill > 0 && (this._stillFrameAccum++, this._stillFrameAccum > this._sleepAfterStill && this.animation.stop());
  }, t.prototype.setSleepAfterStill = function(e) {
    this._sleepAfterStill = e;
  }, t.prototype.wakeUp = function() {
    this._disposed || (this.animation.start(), this._stillFrameAccum = 0);
  }, t.prototype.refreshHover = function() {
    this._needsRefreshHover = !0;
  }, t.prototype.refreshHoverImmediately = function() {
    this._disposed || (this._needsRefreshHover = !1, this.painter.refreshHover && this.painter.getType() === "canvas" && this.painter.refreshHover());
  }, t.prototype.resize = function(e) {
    this._disposed || (e = e || {}, this.painter.resize(e.width, e.height), this.handler.resize());
  }, t.prototype.clearAnimation = function() {
    this._disposed || this.animation.clear();
  }, t.prototype.getWidth = function() {
    if (!this._disposed)
      return this.painter.getWidth();
  }, t.prototype.getHeight = function() {
    if (!this._disposed)
      return this.painter.getHeight();
  }, t.prototype.setCursorStyle = function(e) {
    this._disposed || this.handler.setCursorStyle(e);
  }, t.prototype.findHover = function(e, n) {
    if (!this._disposed)
      return this.handler.findHover(e, n);
  }, t.prototype.on = function(e, n, r) {
    return this._disposed || this.handler.on(e, n, r), this;
  }, t.prototype.off = function(e, n) {
    this._disposed || this.handler.off(e, n);
  }, t.prototype.trigger = function(e, n) {
    this._disposed || this.handler.trigger(e, n);
  }, t.prototype.clear = function() {
    if (!this._disposed) {
      for (var e = this.storage.getRoots(), n = 0; n < e.length; n++)
        e[n] instanceof ct && e[n].removeSelfFromZr(this);
      this.storage.delAllRoots(), this.painter.clear();
    }
  }, t.prototype.dispose = function() {
    this._disposed || (this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, this._disposed = !0, zGe(this.id));
  }, t;
}();
function bk(t, e) {
  var n = new FGe(g5(), t, e);
  return rh[n.id] = n, n;
}
function WGe(t) {
  t.dispose();
}
function QGe() {
  for (var t in rh)
    rh.hasOwnProperty(t) && rh[t].dispose();
  rh = {};
}
function HGe(t) {
  return rh[t];
}
function Pse(t, e) {
  gy[t] = e;
}
var _k;
function $se(t) {
  if (typeof _k == "function")
    return _k(t);
}
function Ase(t) {
  _k = t;
}
var GGe = "5.6.0";
const jGe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  dispose: WGe,
  disposeAll: QGe,
  getElementSSRData: $se,
  getInstance: HGe,
  init: bk,
  registerPainter: Pse,
  registerSSRDataGetter: Ase,
  version: GGe
}, Symbol.toStringTag, { value: "Module" }));
var V9 = 1e-4, Ese = 20;
function ZGe(t) {
  return t.replace(/^\s+|\s+$/g, "");
}
function gn(t, e, n, r) {
  var i = e[0], a = e[1], o = n[0], s = n[1], l = a - i, u = s - o;
  if (l === 0)
    return u === 0 ? o : (o + s) / 2;
  if (r)
    if (l > 0) {
      if (t <= i)
        return o;
      if (t >= a)
        return s;
    } else {
      if (t >= i)
        return o;
      if (t <= a)
        return s;
    }
  else {
    if (t === i)
      return o;
    if (t === a)
      return s;
  }
  return (t - i) / l * u + o;
}
function ze(t, e) {
  switch (t) {
    case "center":
    case "middle":
      t = "50%";
      break;
    case "left":
    case "top":
      t = "0%";
      break;
    case "right":
    case "bottom":
      t = "100%";
      break;
  }
  return Ve(t) ? ZGe(t).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : t == null ? NaN : +t;
}
function sr(t, e, n) {
  return e == null && (e = 10), e = Math.min(Math.max(0, e), Ese), t = (+t).toFixed(e), n ? t : +t;
}
function ao(t) {
  return t.sort(function(e, n) {
    return e - n;
  }), t;
}
function Ms(t) {
  if (t = +t, isNaN(t))
    return 0;
  if (t > 1e-14) {
    for (var e = 1, n = 0; n < 15; n++, e *= 10)
      if (Math.round(t * e) / e === t)
        return n;
  }
  return EC(t);
}
function EC(t) {
  var e = t.toString().toLowerCase(), n = e.indexOf("e"), r = n > 0 ? +e.slice(n + 1) : 0, i = n > 0 ? n : e.length, a = e.indexOf("."), o = a < 0 ? 0 : i - 1 - a;
  return Math.max(0, o - r);
}
function T5(t, e) {
  var n = Math.log, r = Math.LN10, i = Math.floor(n(t[1] - t[0]) / r), a = Math.round(n(Math.abs(e[1] - e[0])) / r), o = Math.min(Math.max(-i + a, 0), 20);
  return isFinite(o) ? o : 20;
}
function UGe(t, e, n) {
  if (!t[e])
    return 0;
  var r = Mse(t, n);
  return r[e] || 0;
}
function Mse(t, e) {
  var n = os(t, function(h, p) {
    return h + (isNaN(p) ? 0 : p);
  }, 0);
  if (n === 0)
    return [];
  for (var r = Math.pow(10, e), i = Ce(t, function(h) {
    return (isNaN(h) ? 0 : h) / n * r * 100;
  }), a = r * 100, o = Ce(i, function(h) {
    return Math.floor(h);
  }), s = os(o, function(h, p) {
    return h + p;
  }, 0), l = Ce(i, function(h, p) {
    return h - o[p];
  }); s < a; ) {
    for (var u = Number.NEGATIVE_INFINITY, c = null, f = 0, d = l.length; f < d; ++f)
      l[f] > u && (u = l[f], c = f);
    ++o[c], l[c] = 0, ++s;
  }
  return Ce(o, function(h) {
    return h / r;
  });
}
function XGe(t, e) {
  var n = Math.max(Ms(t), Ms(e)), r = t + e;
  return n > Ese ? r : sr(r, n);
}
var Ok = 9007199254740991;
function P5(t) {
  var e = Math.PI * 2;
  return (t % e + e) % e;
}
function Vg(t) {
  return t > -V9 && t < V9;
}
var YGe = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;
function go(t) {
  if (t instanceof Date)
    return t;
  if (Ve(t)) {
    var e = YGe.exec(t);
    if (!e)
      return /* @__PURE__ */ new Date(NaN);
    if (e[8]) {
      var n = +e[4] || 0;
      return e[8].toUpperCase() !== "Z" && (n -= +e[8].slice(0, 3)), new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] || 1, n, +(e[5] || 0), +e[6] || 0, e[7] ? +e[7].substring(0, 3) : 0));
    } else
      return new Date(+e[1], +(e[2] || 1) - 1, +e[3] || 1, +e[4] || 0, +(e[5] || 0), +e[6] || 0, e[7] ? +e[7].substring(0, 3) : 0);
  } else if (t == null)
    return /* @__PURE__ */ new Date(NaN);
  return new Date(Math.round(t));
}
function Ise(t) {
  return Math.pow(10, s1(t));
}
function s1(t) {
  if (t === 0)
    return 0;
  var e = Math.floor(Math.log(t) / Math.LN10);
  return t / Math.pow(10, e) >= 10 && e++, e;
}
function $5(t, e) {
  var n = s1(t), r = Math.pow(10, n), i = t / r, a;
  return e ? i < 1.5 ? a = 1 : i < 2.5 ? a = 2 : i < 4 ? a = 3 : i < 7 ? a = 5 : a = 10 : i < 1 ? a = 1 : i < 2 ? a = 2 : i < 3 ? a = 3 : i < 5 ? a = 5 : a = 10, t = a * r, n >= -20 ? +t.toFixed(n < 0 ? -n : 0) : t;
}
function uw(t, e) {
  var n = (t.length - 1) * e + 1, r = Math.floor(n), i = +t[r - 1], a = n - r;
  return a ? i + a * (t[r] - i) : i;
}
function Sk(t) {
  t.sort(function(l, u) {
    return s(l, u, 0) ? -1 : 1;
  });
  for (var e = -1 / 0, n = 1, r = 0; r < t.length; ) {
    for (var i = t[r].interval, a = t[r].close, o = 0; o < 2; o++)
      i[o] <= e && (i[o] = e, a[o] = o ? 1 : 1 - n), e = i[o], n = a[o];
    i[0] === i[1] && a[0] * a[1] !== 1 ? t.splice(r, 1) : r++;
  }
  return t;
  function s(l, u, c) {
    return l.interval[c] < u.interval[c] || l.interval[c] === u.interval[c] && (l.close[c] - u.close[c] === (c ? -1 : 1) || !c && s(l, u, 1));
  }
}
function Gl(t) {
  var e = parseFloat(t);
  return e == t && (e !== 0 || !Ve(t) || t.indexOf("x") <= 0) ? e : NaN;
}
function hP(t) {
  return !isNaN(Gl(t));
}
function Dse() {
  return Math.round(Math.random() * 9);
}
function Rse(t, e) {
  return e === 0 ? t : Rse(e, t % e);
}
function F9(t, e) {
  return t == null ? e : e == null ? t : t * e / Rse(t, e);
}
var qGe = "[ECharts] ", W9 = {}, KGe = typeof console < "u" && console.warn && console.log;
function pP(t, e, n) {
  if (KGe) {
    if (n) {
      if (W9[e])
        return;
      W9[e] = !0;
    }
    console[t](qGe + e);
  }
}
function JGe(t, e) {
  pP("log", t, e);
}
function nr(t, e) {
  pP("warn", t, e);
}
function $i(t, e) {
  pP("error", t, e);
}
function ss(t) {
  process.env.NODE_ENV !== "production" && pP("warn", "DEPRECATED: " + t, !0);
}
function yr(t, e, n) {
  process.env.NODE_ENV !== "production" && ss((n ? "[" + n + "]" : "") + (t + " is deprecated, use " + e + " instead."));
}
function fa() {
  for (var t = [], e = 0; e < arguments.length; e++)
    t[e] = arguments[e];
  var n = "";
  if (process.env.NODE_ENV !== "production") {
    var r = function(i) {
      return i === void 0 ? "undefined" : i === 1 / 0 ? "Infinity" : i === -1 / 0 ? "-Infinity" : mf(i) ? "NaN" : i instanceof Date ? "Date(" + i.toISOString() + ")" : qe(i) ? "function () { ... }" : y5(i) ? i + "" : null;
    };
    n = Ce(t, function(i) {
      if (Ve(i))
        return i;
      var a = r(i);
      if (a != null)
        return a;
      if (typeof JSON < "u" && JSON.stringify)
        try {
          return JSON.stringify(i, function(o, s) {
            var l = r(s);
            return l ?? s;
          });
        } catch {
          return "?";
        }
      else
        return "?";
    }).join(" ");
  }
  return n;
}
function cn(t) {
  throw new Error(t);
}
function Q9(t, e, n) {
  return (e - t) * n + t;
}
var kse = "series\0", Lse = "\0_ec_\0";
function wn(t) {
  return t instanceof Array ? t : t == null ? [] : [t];
}
function Hh(t, e, n) {
  if (t) {
    t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {};
    for (var r = 0, i = n.length; r < i; r++) {
      var a = n[r];
      !t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a) && (t.emphasis[e][a] = t[e][a]);
    }
  }
}
var H9 = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "rich", "tag", "color", "textBorderColor", "textBorderWidth", "width", "height", "lineHeight", "align", "verticalAlign", "baseline", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY", "backgroundColor", "borderColor", "borderWidth", "borderRadius", "padding"];
function ym(t) {
  return nt(t) && !Se(t) && !(t instanceof Date) ? t.value : t;
}
function eje(t) {
  return nt(t) && !(t instanceof Array);
}
function Nse(t, e, n) {
  var r = n === "normalMerge", i = n === "replaceMerge", a = n === "replaceAll";
  t = t || [], e = (e || []).slice();
  var o = Ze();
  F(e, function(l, u) {
    if (!nt(l)) {
      e[u] = null;
      return;
    }
    process.env.NODE_ENV !== "production" && (l.id != null && !j9(l.id) && G9(l.id), l.name != null && !j9(l.name) && G9(l.name));
  });
  var s = tje(t, o, n);
  return (r || i) && nje(s, t, o, e), r && rje(s, e), r || i ? ije(s, e, i) : a && aje(s, e), oje(s), s;
}
function tje(t, e, n) {
  var r = [];
  if (n === "replaceAll")
    return r;
  for (var i = 0; i < t.length; i++) {
    var a = t[i];
    a && a.id != null && e.set(a.id, i), r.push({
      existing: n === "replaceMerge" || Fg(a) ? null : a,
      newOption: null,
      keyInfo: null,
      brandNew: null
    });
  }
  return r;
}
function nje(t, e, n, r) {
  F(r, function(i, a) {
    if (!(!i || i.id == null)) {
      var o = eb(i.id), s = n.get(o);
      if (s != null) {
        var l = t[s];
        at(!l.newOption, 'Duplicated option on id "' + o + '".'), l.newOption = i, l.existing = e[s], r[a] = null;
      }
    }
  });
}
function rje(t, e) {
  F(e, function(n, r) {
    if (!(!n || n.name == null))
      for (var i = 0; i < t.length; i++) {
        var a = t[i].existing;
        if (!t[i].newOption && a && (a.id == null || n.id == null) && !Fg(n) && !Fg(a) && Bse("name", a, n)) {
          t[i].newOption = n, e[r] = null;
          return;
        }
      }
  });
}
function ije(t, e, n) {
  F(e, function(r) {
    if (r) {
      for (
        var i, a = 0;
        // Be `!resultItem` only when `nextIdx >= result.length`.
        (i = t[a]) && (i.newOption || Fg(i.existing) || // In mode "replaceMerge", here no not-mapped-non-internal-existing.
        i.existing && r.id != null && !Bse("id", r, i.existing));
      )
        a++;
      i ? (i.newOption = r, i.brandNew = n) : t.push({
        newOption: r,
        brandNew: n,
        existing: null,
        keyInfo: null
      }), a++;
    }
  });
}
function aje(t, e) {
  F(e, function(n) {
    t.push({
      newOption: n,
      brandNew: !0,
      existing: null,
      keyInfo: null
    });
  });
}
function oje(t) {
  var e = Ze();
  F(t, function(n) {
    var r = n.existing;
    r && e.set(r.id, n);
  }), F(t, function(n) {
    var r = n.newOption;
    at(!r || r.id == null || !e.get(r.id) || e.get(r.id) === n, "id duplicates: " + (r && r.id)), r && r.id != null && e.set(r.id, n), !n.keyInfo && (n.keyInfo = {});
  }), F(t, function(n, r) {
    var i = n.existing, a = n.newOption, o = n.keyInfo;
    if (nt(a)) {
      if (o.name = a.name != null ? eb(a.name) : i ? i.name : kse + r, i)
        o.id = eb(i.id);
      else if (a.id != null)
        o.id = eb(a.id);
      else {
        var s = 0;
        do
          o.id = "\0" + o.name + "\0" + s++;
        while (e.get(o.id));
      }
      e.set(o.id, n);
    }
  });
}
function Bse(t, e, n) {
  var r = Br(e[t], null), i = Br(n[t], null);
  return r != null && i != null && r === i;
}
function eb(t) {
  if (process.env.NODE_ENV !== "production" && t == null)
    throw new Error();
  return Br(t, "");
}
function Br(t, e) {
  return t == null ? e : Ve(t) ? t : Kt(t) || zb(t) ? t + "" : e;
}
function G9(t) {
  process.env.NODE_ENV !== "production" && nr("`" + t + "` is invalid id or name. Must be a string or number.");
}
function j9(t) {
  return zb(t) || hP(t);
}
function A5(t) {
  var e = t.name;
  return !!(e && e.indexOf(kse));
}
function Fg(t) {
  return t && t.id != null && eb(t.id).indexOf(Lse) === 0;
}
function sje(t) {
  return Lse + t;
}
function lje(t, e, n) {
  F(t, function(r) {
    var i = r.newOption;
    nt(i) && (r.keyInfo.mainType = e, r.keyInfo.subType = uje(e, i, r.existing, n));
  });
}
function uje(t, e, n, r) {
  var i = e.type ? e.type : n ? n.subType : r.determineSubType(t, e);
  return i;
}
function cje(t, e) {
  var n = {}, r = {};
  return i(t || [], n), i(e || [], r, n), [a(n), a(r)];
  function i(o, s, l) {
    for (var u = 0, c = o.length; u < c; u++) {
      var f = Br(o[u].seriesId, null);
      if (f == null)
        return;
      for (var d = wn(o[u].dataIndex), h = l && l[f], p = 0, v = d.length; p < v; p++) {
        var g = d[p];
        h && h[g] ? h[g] = null : (s[f] || (s[f] = {}))[g] = 1;
      }
    }
  }
  function a(o, s) {
    var l = [];
    for (var u in o)
      if (o.hasOwnProperty(u) && o[u] != null)
        if (s)
          l.push(+u);
        else {
          var c = a(o[u], !0);
          c.length && l.push({
            seriesId: u,
            dataIndex: c
          });
        }
    return l;
  }
}
function Gh(t, e) {
  if (e.dataIndexInside != null)
    return e.dataIndexInside;
  if (e.dataIndex != null)
    return Se(e.dataIndex) ? Ce(e.dataIndex, function(n) {
      return t.indexOfRawIndex(n);
    }) : t.indexOfRawIndex(e.dataIndex);
  if (e.name != null)
    return Se(e.name) ? Ce(e.name, function(n) {
      return t.indexOfName(n);
    }) : t.indexOfName(e.name);
}
function Ut() {
  var t = "__ec_inner_" + fje++;
  return function(e) {
    return e[t] || (e[t] = {});
  };
}
var fje = Dse();
function tb(t, e, n) {
  var r = E5(e, n), i = r.mainTypeSpecified, a = r.queryOptionMap, o = r.others, s = o, l = n ? n.defaultMainType : null;
  return !i && l && a.set(l, {}), a.each(function(u, c) {
    var f = l1(t, c, u, {
      useDefault: l === c,
      enableAll: n && n.enableAll != null ? n.enableAll : !0,
      enableNone: n && n.enableNone != null ? n.enableNone : !0
    });
    s[c + "Models"] = f.models, s[c + "Model"] = f.models[0];
  }), s;
}
function E5(t, e) {
  var n;
  if (Ve(t)) {
    var r = {};
    r[t + "Index"] = 0, n = r;
  } else
    n = t;
  var i = Ze(), a = {}, o = !1;
  return F(n, function(s, l) {
    if (l === "dataIndex" || l === "dataIndexInside") {
      a[l] = s;
      return;
    }
    var u = l.match(/^(\w+)(Index|Id|Name)$/) || [], c = u[1], f = (u[2] || "").toLowerCase();
    if (!(!c || !f || e && e.includeMainTypes && St(e.includeMainTypes, c) < 0)) {
      o = o || !!c;
      var d = i.get(c) || i.set(c, {});
      d[f] = s;
    }
  }), {
    mainTypeSpecified: o,
    queryOptionMap: i,
    others: a
  };
}
var Er = {
  useDefault: !0,
  enableAll: !1,
  enableNone: !1
}, dje = {
  useDefault: !1,
  enableAll: !0,
  enableNone: !0
};
function l1(t, e, n, r) {
  r = r || Er;
  var i = n.index, a = n.id, o = n.name, s = {
    models: null,
    specified: i != null || a != null || o != null
  };
  if (!s.specified) {
    var l = void 0;
    return s.models = r.useDefault && (l = t.getComponent(e)) ? [l] : [], s;
  }
  return i === "none" || i === !1 ? (at(r.enableNone, '`"none"` or `false` is not a valid value on index option.'), s.models = [], s) : (i === "all" && (at(r.enableAll, '`"all"` is not a valid value on index option.'), i = a = o = null), s.models = t.queryComponents({
    mainType: e,
    index: i,
    id: a,
    name: o
  }), s);
}
function zse(t, e, n) {
  t.setAttribute ? t.setAttribute(e, n) : t[e] = n;
}
function hje(t, e) {
  return t.getAttribute ? t.getAttribute(e) : t[e];
}
function pje(t) {
  return t === "auto" ? Gt.domSupported ? "html" : "richText" : t || "html";
}
function xk(t, e) {
  var n = Ze(), r = [];
  return F(t, function(i) {
    var a = e(i);
    (n.get(a) || (r.push(a), n.set(a, []))).push(i);
  }), {
    keys: r,
    buckets: n
  };
}
function Vse(t, e, n, r, i) {
  var a = e == null || e === "auto";
  if (r == null)
    return r;
  if (Kt(r)) {
    var o = Q9(n || 0, r, i);
    return sr(o, a ? Math.max(Ms(n || 0), Ms(r)) : e);
  } else {
    if (Ve(r))
      return i < 1 ? n : r;
    for (var s = [], l = n, u = r, c = Math.max(l ? l.length : 0, u.length), f = 0; f < c; ++f) {
      var d = t.getDimensionInfo(f);
      if (d && d.type === "ordinal")
        s[f] = (i < 1 && l ? l : u)[f];
      else {
        var h = l && l[f] ? l[f] : 0, p = u[f], o = Q9(h, p, i);
        s[f] = sr(o, a ? Math.max(Ms(h), Ms(p)) : e);
      }
    }
    return s;
  }
}
var vje = ".", pd = "___EC__COMPONENT__CONTAINER___", Fse = "___EC__EXTENDED_CLASS___";
function $l(t) {
  var e = {
    main: "",
    sub: ""
  };
  if (t) {
    var n = t.split(vje);
    e.main = n[0] || "", e.sub = n[1] || "";
  }
  return e;
}
function gje(t) {
  at(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal');
}
function mje(t) {
  return !!(t && t[Fse]);
}
function M5(t, e) {
  t.$constructor = t, t.extend = function(n) {
    process.env.NODE_ENV !== "production" && F(e, function(a) {
      n[a] || console.warn("Method `" + a + "` should be implemented" + (n.type ? " in " + n.type : "") + ".");
    });
    var r = this, i;
    return yje(r) ? i = /** @class */
    function(a) {
      le(o, a);
      function o() {
        return a.apply(this, arguments) || this;
      }
      return o;
    }(r) : (i = function() {
      (n.$constructor || r).apply(this, arguments);
    }, m5(i, this)), _e(i.prototype, n), i[Fse] = !0, i.extend = this.extend, i.superCall = Oje, i.superApply = Sje, i.superClass = r, i;
  };
}
function yje(t) {
  return qe(t) && /^class\s/.test(Function.prototype.toString.call(t));
}
function Wse(t, e) {
  t.extend = e.extend;
}
var bje = Math.round(Math.random() * 10);
function _je(t) {
  var e = ["__\0is_clz", bje++].join("_");
  t.prototype[e] = !0, process.env.NODE_ENV !== "production" && at(!t.isInstance, 'The method "is" can not be defined.'), t.isInstance = function(n) {
    return !!(n && n[e]);
  };
}
function Oje(t, e) {
  for (var n = [], r = 2; r < arguments.length; r++)
    n[r - 2] = arguments[r];
  return this.superClass.prototype[e].apply(t, n);
}
function Sje(t, e, n) {
  return this.superClass.prototype[e].apply(t, n);
}
function vP(t) {
  var e = {};
  t.registerClass = function(r) {
    var i = r.type || r.prototype.type;
    if (i) {
      gje(i), r.prototype.type = i;
      var a = $l(i);
      if (!a.sub)
        process.env.NODE_ENV !== "production" && e[a.main] && console.warn(a.main + " exists."), e[a.main] = r;
      else if (a.sub !== pd) {
        var o = n(a);
        o[a.sub] = r;
      }
    }
    return r;
  }, t.getClass = function(r, i, a) {
    var o = e[r];
    if (o && o[pd] && (o = i ? o[i] : null), a && !o)
      throw new Error(i ? "Component " + r + "." + (i || "") + " is used but not imported." : r + ".type should be specified.");
    return o;
  }, t.getClassesByMainType = function(r) {
    var i = $l(r), a = [], o = e[i.main];
    return o && o[pd] ? F(o, function(s, l) {
      l !== pd && a.push(s);
    }) : a.push(o), a;
  }, t.hasClass = function(r) {
    var i = $l(r);
    return !!e[i.main];
  }, t.getAllClassMainTypes = function() {
    var r = [];
    return F(e, function(i, a) {
      r.push(a);
    }), r;
  }, t.hasSubTypes = function(r) {
    var i = $l(r), a = e[i.main];
    return a && a[pd];
  };
  function n(r) {
    var i = e[r.main];
    return (!i || !i[pd]) && (i = e[r.main] = {}, i[pd] = !0), i;
  }
}
function jh(t, e) {
  for (var n = 0; n < t.length; n++)
    t[n][1] || (t[n][1] = t[n][0]);
  return e = e || !1, function(r, i, a) {
    for (var o = {}, s = 0; s < t.length; s++) {
      var l = t[s][1];
      if (!(i && St(i, l) >= 0 || a && St(a, l) < 0)) {
        var u = r.getShallow(l, e);
        u != null && (o[t[s][0]] = u);
      }
    }
    return o;
  };
}
var xje = [
  ["fill", "color"],
  ["shadowBlur"],
  ["shadowOffsetX"],
  ["shadowOffsetY"],
  ["opacity"],
  ["shadowColor"]
  // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  // So do not transfer decal directly.
], wje = jh(xje), Cje = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getAreaStyle = function(e, n) {
      return wje(this, e, n);
    }, t;
  }()
), wk = new a1(50);
function Tje(t) {
  if (typeof t == "string") {
    var e = wk.get(t);
    return e && e.image;
  } else
    return t;
}
function I5(t, e, n, r, i) {
  if (t)
    if (typeof t == "string") {
      if (e && e.__zrImageSrc === t || !n)
        return e;
      var a = wk.get(t), o = { hostEl: n, cb: r, cbPayload: i };
      return a ? (e = a.image, !gP(e) && a.pending.push(o)) : (e = Hs.loadImage(t, Z9, Z9), e.__zrImageSrc = t, wk.put(t, e.__cachedImgObj = {
        image: e,
        pending: [o]
      })), e;
    } else
      return t;
  else return e;
}
function Z9() {
  var t = this.__cachedImgObj;
  this.onload = this.onerror = this.__cachedImgObj = null;
  for (var e = 0; e < t.pending.length; e++) {
    var n = t.pending[e], r = n.cb;
    r && r(this, n.cbPayload), n.hostEl.dirty();
  }
  t.pending.length = 0;
}
function gP(t) {
  return t && t.width && t.height;
}
var ZE = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;
function Qse(t, e, n, r, i) {
  if (!e)
    return "";
  var a = (t + "").split(`
`);
  i = Hse(e, n, r, i);
  for (var o = 0, s = a.length; o < s; o++)
    a[o] = Gse(a[o], i);
  return a.join(`
`);
}
function Hse(t, e, n, r) {
  r = r || {};
  var i = _e({}, r);
  i.font = e, n = dt(n, "..."), i.maxIterations = dt(r.maxIterations, 2);
  var a = i.minChar = dt(r.minChar, 0);
  i.cnCharWidth = fo("国", e);
  var o = i.ascCharWidth = fo("a", e);
  i.placeholder = dt(r.placeholder, "");
  for (var s = t = Math.max(0, t - 1), l = 0; l < a && s >= o; l++)
    s -= o;
  var u = fo(n, e);
  return u > s && (n = "", u = 0), s = t - u, i.ellipsis = n, i.ellipsisWidth = u, i.contentWidth = s, i.containerWidth = t, i;
}
function Gse(t, e) {
  var n = e.containerWidth, r = e.font, i = e.contentWidth;
  if (!n)
    return "";
  var a = fo(t, r);
  if (a <= n)
    return t;
  for (var o = 0; ; o++) {
    if (a <= i || o >= e.maxIterations) {
      t += e.ellipsis;
      break;
    }
    var s = o === 0 ? Pje(t, i, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(t.length * i / a) : 0;
    t = t.substr(0, s), a = fo(t, r);
  }
  return t === "" && (t = e.placeholder), t;
}
function Pje(t, e, n, r) {
  for (var i = 0, a = 0, o = t.length; a < o && i < e; a++) {
    var s = t.charCodeAt(a);
    i += 0 <= s && s <= 127 ? n : r;
  }
  return a;
}
function $je(t, e) {
  t != null && (t += "");
  var n = e.overflow, r = e.padding, i = e.font, a = n === "truncate", o = fP(i), s = dt(e.lineHeight, o), l = !!e.backgroundColor, u = e.lineOverflow === "truncate", c = e.width, f;
  c != null && (n === "break" || n === "breakAll") ? f = t ? jse(t, e.font, c, n === "breakAll", 0).lines : [] : f = t ? t.split(`
`) : [];
  var d = f.length * s, h = dt(e.height, d);
  if (d > h && u) {
    var p = Math.floor(h / s);
    f = f.slice(0, p);
  }
  if (t && a && c != null)
    for (var v = Hse(c, i, e.ellipsis, {
      minChar: e.truncateMinChar,
      placeholder: e.placeholder
    }), g = 0; g < f.length; g++)
      f[g] = Gse(f[g], v);
  for (var m = h, y = 0, g = 0; g < f.length; g++)
    y = Math.max(fo(f[g], i), y);
  c == null && (c = y);
  var _ = y;
  return r && (m += r[0] + r[2], _ += r[1] + r[3], c += r[1] + r[3]), l && (_ = c), {
    lines: f,
    height: h,
    outerWidth: _,
    outerHeight: m,
    lineHeight: s,
    calculatedLineHeight: o,
    contentWidth: y,
    contentHeight: d,
    width: c
  };
}
var Aje = /* @__PURE__ */ function() {
  function t() {
  }
  return t;
}(), U9 = /* @__PURE__ */ function() {
  function t(e) {
    this.tokens = [], e && (this.tokens = e);
  }
  return t;
}(), Eje = /* @__PURE__ */ function() {
  function t() {
    this.width = 0, this.height = 0, this.contentWidth = 0, this.contentHeight = 0, this.outerWidth = 0, this.outerHeight = 0, this.lines = [];
  }
  return t;
}();
function Mje(t, e) {
  var n = new Eje();
  if (t != null && (t += ""), !t)
    return n;
  for (var r = e.width, i = e.height, a = e.overflow, o = (a === "break" || a === "breakAll") && r != null ? { width: r, accumWidth: 0, breakAll: a === "breakAll" } : null, s = ZE.lastIndex = 0, l; (l = ZE.exec(t)) != null; ) {
    var u = l.index;
    u > s && UE(n, t.substring(s, u), e, o), UE(n, l[2], e, o, l[1]), s = ZE.lastIndex;
  }
  s < t.length && UE(n, t.substring(s, t.length), e, o);
  var c = [], f = 0, d = 0, h = e.padding, p = a === "truncate", v = e.lineOverflow === "truncate";
  function g(W, H, U) {
    W.width = H, W.lineHeight = U, f += U, d = Math.max(d, H);
  }
  e: for (var m = 0; m < n.lines.length; m++) {
    for (var y = n.lines[m], _ = 0, O = 0, S = 0; S < y.tokens.length; S++) {
      var x = y.tokens[S], C = x.styleName && e.rich[x.styleName] || {}, P = x.textPadding = C.padding, $ = P ? P[1] + P[3] : 0, T = x.font = C.font || e.font;
      x.contentHeight = fP(T);
      var E = dt(C.height, x.contentHeight);
      if (x.innerHeight = E, P && (E += P[0] + P[2]), x.height = E, x.lineHeight = co(C.lineHeight, e.lineHeight, E), x.align = C && C.align || e.align, x.verticalAlign = C && C.verticalAlign || "middle", v && i != null && f + x.lineHeight > i) {
        S > 0 ? (y.tokens = y.tokens.slice(0, S), g(y, O, _), n.lines = n.lines.slice(0, m + 1)) : n.lines = n.lines.slice(0, m);
        break e;
      }
      var M = C.width, R = M == null || M === "auto";
      if (typeof M == "string" && M.charAt(M.length - 1) === "%")
        x.percentWidth = M, c.push(x), x.contentWidth = fo(x.text, T);
      else {
        if (R) {
          var N = C.backgroundColor, I = N && N.image;
          I && (I = Tje(I), gP(I) && (x.width = Math.max(x.width, I.width * E / I.height)));
        }
        var B = p && r != null ? r - O : null;
        B != null && B < x.width ? !R || B < $ ? (x.text = "", x.width = x.contentWidth = 0) : (x.text = Qse(x.text, B - $, T, e.ellipsis, { minChar: e.truncateMinChar }), x.width = x.contentWidth = fo(x.text, T)) : x.contentWidth = fo(x.text, T);
      }
      x.width += $, O += x.width, C && (_ = Math.max(_, x.lineHeight));
    }
    g(y, O, _);
  }
  n.outerWidth = n.width = dt(r, d), n.outerHeight = n.height = dt(i, f), n.contentHeight = f, n.contentWidth = d, h && (n.outerWidth += h[1] + h[3], n.outerHeight += h[0] + h[2]);
  for (var m = 0; m < c.length; m++) {
    var x = c[m], Q = x.percentWidth;
    x.width = parseInt(Q, 10) / 100 * n.width;
  }
  return n;
}
function UE(t, e, n, r, i) {
  var a = e === "", o = i && n.rich[i] || {}, s = t.lines, l = o.font || n.font, u = !1, c, f;
  if (r) {
    var d = o.padding, h = d ? d[1] + d[3] : 0;
    if (o.width != null && o.width !== "auto") {
      var p = js(o.width, r.width) + h;
      s.length > 0 && p + r.accumWidth > r.width && (c = e.split(`
`), u = !0), r.accumWidth = p;
    } else {
      var v = jse(e, l, r.width, r.breakAll, r.accumWidth);
      r.accumWidth = v.accumWidth + h, f = v.linesWidths, c = v.lines;
    }
  } else
    c = e.split(`
`);
  for (var g = 0; g < c.length; g++) {
    var m = c[g], y = new Aje();
    if (y.styleName = i, y.text = m, y.isLineHolder = !m && !a, typeof o.width == "number" ? y.width = o.width : y.width = f ? f[g] : fo(m, l), !g && !u) {
      var _ = (s[s.length - 1] || (s[0] = new U9())).tokens, O = _.length;
      O === 1 && _[0].isLineHolder ? _[0] = y : (m || !O || a) && _.push(y);
    } else
      s.push(new U9([y]));
  }
}
function Ije(t) {
  var e = t.charCodeAt(0);
  return e >= 32 && e <= 591 || e >= 880 && e <= 4351 || e >= 4608 && e <= 5119 || e >= 7680 && e <= 8303;
}
var Dje = os(",&?/;] ".split(""), function(t, e) {
  return t[e] = !0, t;
}, {});
function Rje(t) {
  return Ije(t) ? !!Dje[t] : !0;
}
function jse(t, e, n, r, i) {
  for (var a = [], o = [], s = "", l = "", u = 0, c = 0, f = 0; f < t.length; f++) {
    var d = t.charAt(f);
    if (d === `
`) {
      l && (s += l, c += u), a.push(s), o.push(c), s = "", l = "", u = 0, c = 0;
      continue;
    }
    var h = fo(d, e), p = r ? !1 : !Rje(d);
    if (a.length ? c + h > n : i + c + h > n) {
      c ? (s || l) && (p ? (s || (s = l, l = "", u = 0, c = u), a.push(s), o.push(c - u), l += d, u += h, s = "", c = u) : (l && (s += l, l = "", u = 0), a.push(s), o.push(c), s = d, c = h)) : p ? (a.push(l), o.push(u), l = d, u = h) : (a.push(d), o.push(h));
      continue;
    }
    c += h, p ? (l += d, u += h) : (l && (s += l, l = "", u = 0), s += d);
  }
  return !a.length && !s && (s = t, l = "", u = 0), l && (s += l), s && (a.push(s), o.push(c)), a.length === 1 && (c += i), {
    accumWidth: c,
    lines: a,
    linesWidths: o
  };
}
var Ck = "__zr_style_" + Math.round(Math.random() * 10), wh = {
  shadowBlur: 0,
  shadowOffsetX: 0,
  shadowOffsetY: 0,
  shadowColor: "#000",
  opacity: 1,
  blend: "source-over"
}, mP = {
  style: {
    shadowBlur: !0,
    shadowOffsetX: !0,
    shadowOffsetY: !0,
    shadowColor: !0,
    opacity: !0
  }
};
wh[Ck] = !0;
var X9 = ["z", "z2", "invisible"], kje = ["invisible"], Lje = function(t) {
  le(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype._init = function(n) {
    for (var r = kt(n), i = 0; i < r.length; i++) {
      var a = r[i];
      a === "style" ? this.useStyle(n[a]) : t.prototype.attrKV.call(this, a, n[a]);
    }
    this.style || this.useStyle({});
  }, e.prototype.beforeBrush = function() {
  }, e.prototype.afterBrush = function() {
  }, e.prototype.innerBeforeBrush = function() {
  }, e.prototype.innerAfterBrush = function() {
  }, e.prototype.shouldBePainted = function(n, r, i, a) {
    var o = this.transform;
    if (this.ignore || this.invisible || this.style.opacity === 0 || this.culling && Nje(this, n, r) || o && !o[0] && !o[3])
      return !1;
    if (i && this.__clipPaths) {
      for (var s = 0; s < this.__clipPaths.length; ++s)
        if (this.__clipPaths[s].isZeroArea())
          return !1;
    }
    if (a && this.parent)
      for (var l = this.parent; l; ) {
        if (l.ignore)
          return !1;
        l = l.parent;
      }
    return !0;
  }, e.prototype.contain = function(n, r) {
    return this.rectContain(n, r);
  }, e.prototype.traverse = function(n, r) {
    n.call(r, this);
  }, e.prototype.rectContain = function(n, r) {
    var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
    return a.contain(i[0], i[1]);
  }, e.prototype.getPaintRect = function() {
    var n = this._paintRect;
    if (!this._paintRect || this.__dirty) {
      var r = this.transform, i = this.getBoundingRect(), a = this.style, o = a.shadowBlur || 0, s = a.shadowOffsetX || 0, l = a.shadowOffsetY || 0;
      n = this._paintRect || (this._paintRect = new bt(0, 0, 0, 0)), r ? bt.applyTransform(n, i, r) : n.copy(i), (o || s || l) && (n.width += o * 2 + Math.abs(s), n.height += o * 2 + Math.abs(l), n.x = Math.min(n.x, n.x + s - o), n.y = Math.min(n.y, n.y + l - o));
      var u = this.dirtyRectTolerance;
      n.isZero() || (n.x = Math.floor(n.x - u), n.y = Math.floor(n.y - u), n.width = Math.ceil(n.width + 1 + u * 2), n.height = Math.ceil(n.height + 1 + u * 2));
    }
    return n;
  }, e.prototype.setPrevPaintRect = function(n) {
    n ? (this._prevPaintRect = this._prevPaintRect || new bt(0, 0, 0, 0), this._prevPaintRect.copy(n)) : this._prevPaintRect = null;
  }, e.prototype.getPrevPaintRect = function() {
    return this._prevPaintRect;
  }, e.prototype.animateStyle = function(n) {
    return this.animate("style", n);
  }, e.prototype.updateDuringAnimation = function(n) {
    n === "style" ? this.dirtyStyle() : this.markRedraw();
  }, e.prototype.attrKV = function(n, r) {
    n !== "style" ? t.prototype.attrKV.call(this, n, r) : this.style ? this.setStyle(r) : this.useStyle(r);
  }, e.prototype.setStyle = function(n, r) {
    return typeof n == "string" ? this.style[n] = r : _e(this.style, n), this.dirtyStyle(), this;
  }, e.prototype.dirtyStyle = function(n) {
    n || this.markRedraw(), this.__dirty |= hy, this._rect && (this._rect = null);
  }, e.prototype.dirty = function() {
    this.dirtyStyle();
  }, e.prototype.styleChanged = function() {
    return !!(this.__dirty & hy);
  }, e.prototype.styleUpdated = function() {
    this.__dirty &= ~hy;
  }, e.prototype.createStyle = function(n) {
    return r1(wh, n);
  }, e.prototype.useStyle = function(n) {
    n[Ck] || (n = this.createStyle(n)), this.__inHover ? this.__hoverStyle = n : this.style = n, this.dirtyStyle();
  }, e.prototype.isStyleObject = function(n) {
    return n[Ck];
  }, e.prototype._innerSaveToNormal = function(n) {
    t.prototype._innerSaveToNormal.call(this, n);
    var r = this._normalState;
    n.style && !r.style && (r.style = this._mergeStyle(this.createStyle(), this.style)), this._savePrimaryToNormal(n, r, X9);
  }, e.prototype._applyStateObj = function(n, r, i, a, o, s) {
    t.prototype._applyStateObj.call(this, n, r, i, a, o, s);
    var l = !(r && a), u;
    if (r && r.style ? o ? a ? u = r.style : (u = this._mergeStyle(this.createStyle(), i.style), this._mergeStyle(u, r.style)) : (u = this._mergeStyle(this.createStyle(), a ? this.style : i.style), this._mergeStyle(u, r.style)) : l && (u = i.style), u)
      if (o) {
        var c = this.style;
        if (this.style = this.createStyle(l ? {} : c), l)
          for (var f = kt(c), d = 0; d < f.length; d++) {
            var h = f[d];
            h in u && (u[h] = u[h], this.style[h] = c[h]);
          }
        for (var p = kt(u), d = 0; d < p.length; d++) {
          var h = p[d];
          this.style[h] = this.style[h];
        }
        this._transitionState(n, {
          style: u
        }, s, this.getAnimationStyleProps());
      } else
        this.useStyle(u);
    for (var v = this.__inHover ? kje : X9, d = 0; d < v.length; d++) {
      var h = v[d];
      r && r[h] != null ? this[h] = r[h] : l && i[h] != null && (this[h] = i[h]);
    }
  }, e.prototype._mergeStates = function(n) {
    for (var r = t.prototype._mergeStates.call(this, n), i, a = 0; a < n.length; a++) {
      var o = n[a];
      o.style && (i = i || {}, this._mergeStyle(i, o.style));
    }
    return i && (r.style = i), r;
  }, e.prototype._mergeStyle = function(n, r) {
    return _e(n, r), n;
  }, e.prototype.getAnimationStyleProps = function() {
    return mP;
  }, e.initDefaultProps = function() {
    var n = e.prototype;
    n.type = "displayable", n.invisible = !1, n.z = 0, n.z2 = 0, n.zlevel = 0, n.culling = !1, n.cursor = "pointer", n.rectHover = !1, n.incremental = !1, n._rect = null, n.dirtyRectTolerance = 0, n.__dirty = to | hy;
  }(), e;
}(dP), XE = new bt(0, 0, 0, 0), YE = new bt(0, 0, 0, 0);
function Nje(t, e, n) {
  return XE.copy(t.getBoundingRect()), t.transform && XE.applyTransform(t.transform), YE.width = e, YE.height = n, !XE.intersect(YE);
}
const ls = Lje;
var Pa = Math.min, $a = Math.max, qE = Math.sin, KE = Math.cos, vd = Math.PI * 2, dS = kf(), hS = kf(), pS = kf();
function yP(t, e, n) {
  if (t.length !== 0) {
    for (var r = t[0], i = r[0], a = r[0], o = r[1], s = r[1], l = 1; l < t.length; l++)
      r = t[l], i = Pa(i, r[0]), a = $a(a, r[0]), o = Pa(o, r[1]), s = $a(s, r[1]);
    e[0] = i, e[1] = o, n[0] = a, n[1] = s;
  }
}
function Y9(t, e, n, r, i, a) {
  i[0] = Pa(t, n), i[1] = Pa(e, r), a[0] = $a(t, n), a[1] = $a(e, r);
}
var q9 = [], K9 = [];
function Bje(t, e, n, r, i, a, o, s, l, u) {
  var c = use, f = jr, d = c(t, n, i, o, q9);
  l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0;
  for (var h = 0; h < d; h++) {
    var p = f(t, n, i, o, q9[h]);
    l[0] = Pa(p, l[0]), u[0] = $a(p, u[0]);
  }
  d = c(e, r, a, s, K9);
  for (var h = 0; h < d; h++) {
    var v = f(e, r, a, s, K9[h]);
    l[1] = Pa(v, l[1]), u[1] = $a(v, u[1]);
  }
  l[0] = Pa(t, l[0]), u[0] = $a(t, u[0]), l[0] = Pa(o, l[0]), u[0] = $a(o, u[0]), l[1] = Pa(e, l[1]), u[1] = $a(e, u[1]), l[1] = Pa(s, l[1]), u[1] = $a(s, u[1]);
}
function zje(t, e, n, r, i, a, o, s) {
  var l = fse, u = ii, c = $a(Pa(l(t, n, i), 1), 0), f = $a(Pa(l(e, r, a), 1), 0), d = u(t, n, i, c), h = u(e, r, a, f);
  o[0] = Pa(t, i, d), o[1] = Pa(e, a, h), s[0] = $a(t, i, d), s[1] = $a(e, a, h);
}
function Vje(t, e, n, r, i, a, o, s, l) {
  var u = Cu, c = Tu, f = Math.abs(i - a);
  if (f % vd < 1e-4 && f > 1e-4) {
    s[0] = t - n, s[1] = e - r, l[0] = t + n, l[1] = e + r;
    return;
  }
  if (dS[0] = KE(i) * n + t, dS[1] = qE(i) * r + e, hS[0] = KE(a) * n + t, hS[1] = qE(a) * r + e, u(s, dS, hS), c(l, dS, hS), i = i % vd, i < 0 && (i = i + vd), a = a % vd, a < 0 && (a = a + vd), i > a && !o ? a += vd : i < a && o && (i += vd), o) {
    var d = a;
    a = i, i = d;
  }
  for (var h = 0; h < a; h += Math.PI / 2)
    h > i && (pS[0] = KE(h) * n + t, pS[1] = qE(h) * r + e, u(s, pS, s), c(l, pS, l));
}
var En = {
  M: 1,
  L: 2,
  C: 3,
  Q: 4,
  A: 5,
  Z: 6,
  R: 7
}, gd = [], md = [], sl = [], bc = [], ll = [], ul = [], JE = Math.min, eM = Math.max, yd = Math.cos, bd = Math.sin, pu = Math.abs, Tk = Math.PI, Ac = Tk * 2, tM = typeof Float32Array < "u", A0 = [];
function nM(t) {
  var e = Math.round(t / Tk * 1e8) / 1e8;
  return e % 2 * Tk;
}
function D5(t, e) {
  var n = nM(t[0]);
  n < 0 && (n += Ac);
  var r = n - t[0], i = t[1];
  i += r, !e && i - n >= Ac ? i = n + Ac : e && n - i >= Ac ? i = n - Ac : !e && n > i ? i = n + (Ac - nM(n - i)) : e && n < i && (i = n - (Ac - nM(i - n))), t[0] = n, t[1] = i;
}
var jl = function() {
  function t(e) {
    this.dpr = 1, this._xi = 0, this._yi = 0, this._x0 = 0, this._y0 = 0, this._len = 0, e && (this._saveData = !1), this._saveData && (this.data = []);
  }
  return t.prototype.increaseVersion = function() {
    this._version++;
  }, t.prototype.getVersion = function() {
    return this._version;
  }, t.prototype.setScale = function(e, n, r) {
    r = r || 0, r > 0 && (this._ux = pu(r / $C / e) || 0, this._uy = pu(r / $C / n) || 0);
  }, t.prototype.setDPR = function(e) {
    this.dpr = e;
  }, t.prototype.setContext = function(e) {
    this._ctx = e;
  }, t.prototype.getContext = function() {
    return this._ctx;
  }, t.prototype.beginPath = function() {
    return this._ctx && this._ctx.beginPath(), this.reset(), this;
  }, t.prototype.reset = function() {
    this._saveData && (this._len = 0), this._pathSegLen && (this._pathSegLen = null, this._pathLen = 0), this._version++;
  }, t.prototype.moveTo = function(e, n) {
    return this._drawPendingPt(), this.addData(En.M, e, n), this._ctx && this._ctx.moveTo(e, n), this._x0 = e, this._y0 = n, this._xi = e, this._yi = n, this;
  }, t.prototype.lineTo = function(e, n) {
    var r = pu(e - this._xi), i = pu(n - this._yi), a = r > this._ux || i > this._uy;
    if (this.addData(En.L, e, n), this._ctx && a && this._ctx.lineTo(e, n), a)
      this._xi = e, this._yi = n, this._pendingPtDist = 0;
    else {
      var o = r * r + i * i;
      o > this._pendingPtDist && (this._pendingPtX = e, this._pendingPtY = n, this._pendingPtDist = o);
    }
    return this;
  }, t.prototype.bezierCurveTo = function(e, n, r, i, a, o) {
    return this._drawPendingPt(), this.addData(En.C, e, n, r, i, a, o), this._ctx && this._ctx.bezierCurveTo(e, n, r, i, a, o), this._xi = a, this._yi = o, this;
  }, t.prototype.quadraticCurveTo = function(e, n, r, i) {
    return this._drawPendingPt(), this.addData(En.Q, e, n, r, i), this._ctx && this._ctx.quadraticCurveTo(e, n, r, i), this._xi = r, this._yi = i, this;
  }, t.prototype.arc = function(e, n, r, i, a, o) {
    this._drawPendingPt(), A0[0] = i, A0[1] = a, D5(A0, o), i = A0[0], a = A0[1];
    var s = a - i;
    return this.addData(En.A, e, n, r, r, i, s, 0, o ? 0 : 1), this._ctx && this._ctx.arc(e, n, r, i, a, o), this._xi = yd(a) * r + e, this._yi = bd(a) * r + n, this;
  }, t.prototype.arcTo = function(e, n, r, i, a) {
    return this._drawPendingPt(), this._ctx && this._ctx.arcTo(e, n, r, i, a), this;
  }, t.prototype.rect = function(e, n, r, i) {
    return this._drawPendingPt(), this._ctx && this._ctx.rect(e, n, r, i), this.addData(En.R, e, n, r, i), this;
  }, t.prototype.closePath = function() {
    this._drawPendingPt(), this.addData(En.Z);
    var e = this._ctx, n = this._x0, r = this._y0;
    return e && e.closePath(), this._xi = n, this._yi = r, this;
  }, t.prototype.fill = function(e) {
    e && e.fill(), this.toStatic();
  }, t.prototype.stroke = function(e) {
    e && e.stroke(), this.toStatic();
  }, t.prototype.len = function() {
    return this._len;
  }, t.prototype.setData = function(e) {
    var n = e.length;
    !(this.data && this.data.length === n) && tM && (this.data = new Float32Array(n));
    for (var r = 0; r < n; r++)
      this.data[r] = e[r];
    this._len = n;
  }, t.prototype.appendPath = function(e) {
    e instanceof Array || (e = [e]);
    for (var n = e.length, r = 0, i = this._len, a = 0; a < n; a++)
      r += e[a].len();
    tM && this.data instanceof Float32Array && (this.data = new Float32Array(i + r));
    for (var a = 0; a < n; a++)
      for (var o = e[a].data, s = 0; s < o.length; s++)
        this.data[i++] = o[s];
    this._len = i;
  }, t.prototype.addData = function(e, n, r, i, a, o, s, l, u) {
    if (this._saveData) {
      var c = this.data;
      this._len + arguments.length > c.length && (this._expandData(), c = this.data);
      for (var f = 0; f < arguments.length; f++)
        c[this._len++] = arguments[f];
    }
  }, t.prototype._drawPendingPt = function() {
    this._pendingPtDist > 0 && (this._ctx && this._ctx.lineTo(this._pendingPtX, this._pendingPtY), this._pendingPtDist = 0);
  }, t.prototype._expandData = function() {
    if (!(this.data instanceof Array)) {
      for (var e = [], n = 0; n < this._len; n++)
        e[n] = this.data[n];
      this.data = e;
    }
  }, t.prototype.toStatic = function() {
    if (this._saveData) {
      this._drawPendingPt();
      var e = this.data;
      e instanceof Array && (e.length = this._len, tM && this._len > 11 && (this.data = new Float32Array(e)));
    }
  }, t.prototype.getBoundingRect = function() {
    sl[0] = sl[1] = ll[0] = ll[1] = Number.MAX_VALUE, bc[0] = bc[1] = ul[0] = ul[1] = -Number.MAX_VALUE;
    var e = this.data, n = 0, r = 0, i = 0, a = 0, o;
    for (o = 0; o < this._len; ) {
      var s = e[o++], l = o === 1;
      switch (l && (n = e[o], r = e[o + 1], i = n, a = r), s) {
        case En.M:
          n = i = e[o++], r = a = e[o++], ll[0] = i, ll[1] = a, ul[0] = i, ul[1] = a;
          break;
        case En.L:
          Y9(n, r, e[o], e[o + 1], ll, ul), n = e[o++], r = e[o++];
          break;
        case En.C:
          Bje(n, r, e[o++], e[o++], e[o++], e[o++], e[o], e[o + 1], ll, ul), n = e[o++], r = e[o++];
          break;
        case En.Q:
          zje(n, r, e[o++], e[o++], e[o], e[o + 1], ll, ul), n = e[o++], r = e[o++];
          break;
        case En.A:
          var u = e[o++], c = e[o++], f = e[o++], d = e[o++], h = e[o++], p = e[o++] + h;
          o += 1;
          var v = !e[o++];
          l && (i = yd(h) * f + u, a = bd(h) * d + c), Vje(u, c, f, d, h, p, v, ll, ul), n = yd(p) * f + u, r = bd(p) * d + c;
          break;
        case En.R:
          i = n = e[o++], a = r = e[o++];
          var g = e[o++], m = e[o++];
          Y9(i, a, i + g, a + m, ll, ul);
          break;
        case En.Z:
          n = i, r = a;
          break;
      }
      Cu(sl, sl, ll), Tu(bc, bc, ul);
    }
    return o === 0 && (sl[0] = sl[1] = bc[0] = bc[1] = 0), new bt(sl[0], sl[1], bc[0] - sl[0], bc[1] - sl[1]);
  }, t.prototype._calculateLength = function() {
    var e = this.data, n = this._len, r = this._ux, i = this._uy, a = 0, o = 0, s = 0, l = 0;
    this._pathSegLen || (this._pathSegLen = []);
    for (var u = this._pathSegLen, c = 0, f = 0, d = 0; d < n; ) {
      var h = e[d++], p = d === 1;
      p && (a = e[d], o = e[d + 1], s = a, l = o);
      var v = -1;
      switch (h) {
        case En.M:
          a = s = e[d++], o = l = e[d++];
          break;
        case En.L: {
          var g = e[d++], m = e[d++], y = g - a, _ = m - o;
          (pu(y) > r || pu(_) > i || d === n - 1) && (v = Math.sqrt(y * y + _ * _), a = g, o = m);
          break;
        }
        case En.C: {
          var O = e[d++], S = e[d++], g = e[d++], m = e[d++], x = e[d++], C = e[d++];
          v = K9e(a, o, O, S, g, m, x, C, 10), a = x, o = C;
          break;
        }
        case En.Q: {
          var O = e[d++], S = e[d++], g = e[d++], m = e[d++];
          v = eGe(a, o, O, S, g, m, 10), a = g, o = m;
          break;
        }
        case En.A:
          var P = e[d++], $ = e[d++], T = e[d++], E = e[d++], M = e[d++], R = e[d++], N = R + M;
          d += 1, p && (s = yd(M) * T + P, l = bd(M) * E + $), v = eM(T, E) * JE(Ac, Math.abs(R)), a = yd(N) * T + P, o = bd(N) * E + $;
          break;
        case En.R: {
          s = a = e[d++], l = o = e[d++];
          var I = e[d++], B = e[d++];
          v = I * 2 + B * 2;
          break;
        }
        case En.Z: {
          var y = s - a, _ = l - o;
          v = Math.sqrt(y * y + _ * _), a = s, o = l;
          break;
        }
      }
      v >= 0 && (u[f++] = v, c += v);
    }
    return this._pathLen = c, c;
  }, t.prototype.rebuildPath = function(e, n) {
    var r = this.data, i = this._ux, a = this._uy, o = this._len, s, l, u, c, f, d, h = n < 1, p, v, g = 0, m = 0, y, _ = 0, O, S;
    if (!(h && (this._pathSegLen || this._calculateLength(), p = this._pathSegLen, v = this._pathLen, y = n * v, !y)))
      e: for (var x = 0; x < o; ) {
        var C = r[x++], P = x === 1;
        switch (P && (u = r[x], c = r[x + 1], s = u, l = c), C !== En.L && _ > 0 && (e.lineTo(O, S), _ = 0), C) {
          case En.M:
            s = u = r[x++], l = c = r[x++], e.moveTo(u, c);
            break;
          case En.L: {
            f = r[x++], d = r[x++];
            var $ = pu(f - u), T = pu(d - c);
            if ($ > i || T > a) {
              if (h) {
                var E = p[m++];
                if (g + E > y) {
                  var M = (y - g) / E;
                  e.lineTo(u * (1 - M) + f * M, c * (1 - M) + d * M);
                  break e;
                }
                g += E;
              }
              e.lineTo(f, d), u = f, c = d, _ = 0;
            } else {
              var R = $ * $ + T * T;
              R > _ && (O = f, S = d, _ = R);
            }
            break;
          }
          case En.C: {
            var N = r[x++], I = r[x++], B = r[x++], Q = r[x++], W = r[x++], H = r[x++];
            if (h) {
              var E = p[m++];
              if (g + E > y) {
                var M = (y - g) / E;
                yf(u, N, B, W, M, gd), yf(c, I, Q, H, M, md), e.bezierCurveTo(gd[1], md[1], gd[2], md[2], gd[3], md[3]);
                break e;
              }
              g += E;
            }
            e.bezierCurveTo(N, I, B, Q, W, H), u = W, c = H;
            break;
          }
          case En.Q: {
            var N = r[x++], I = r[x++], B = r[x++], Q = r[x++];
            if (h) {
              var E = p[m++];
              if (g + E > y) {
                var M = (y - g) / E;
                Qb(u, N, B, M, gd), Qb(c, I, Q, M, md), e.quadraticCurveTo(gd[1], md[1], gd[2], md[2]);
                break e;
              }
              g += E;
            }
            e.quadraticCurveTo(N, I, B, Q), u = B, c = Q;
            break;
          }
          case En.A:
            var U = r[x++], j = r[x++], Y = r[x++], ne = r[x++], fe = r[x++], ue = r[x++], ye = r[x++], se = !r[x++], he = Y > ne ? Y : ne, re = pu(Y - ne) > 1e-3, q = fe + ue, K = !1;
            if (h) {
              var E = p[m++];
              g + E > y && (q = fe + ue * (y - g) / E, K = !0), g += E;
            }
            if (re && e.ellipse ? e.ellipse(U, j, Y, ne, ye, fe, q, se) : e.arc(U, j, he, fe, q, se), K)
              break e;
            P && (s = yd(fe) * Y + U, l = bd(fe) * ne + j), u = yd(q) * Y + U, c = bd(q) * ne + j;
            break;
          case En.R:
            s = u = r[x], l = c = r[x + 1], f = r[x++], d = r[x++];
            var de = r[x++], xe = r[x++];
            if (h) {
              var E = p[m++];
              if (g + E > y) {
                var we = y - g;
                e.moveTo(f, d), e.lineTo(f + JE(we, de), d), we -= de, we > 0 && e.lineTo(f + de, d + JE(we, xe)), we -= xe, we > 0 && e.lineTo(f + eM(de - we, 0), d + xe), we -= de, we > 0 && e.lineTo(f, d + eM(xe - we, 0));
                break e;
              }
              g += E;
            }
            e.rect(f, d, de, xe);
            break;
          case En.Z:
            if (h) {
              var E = p[m++];
              if (g + E > y) {
                var M = (y - g) / E;
                e.lineTo(u * (1 - M) + s * M, c * (1 - M) + l * M);
                break e;
              }
              g += E;
            }
            e.closePath(), u = s, c = l;
        }
      }
  }, t.prototype.clone = function() {
    var e = new t(), n = this.data;
    return e.data = n.slice ? n.slice() : Array.prototype.slice.call(n), e._len = this._len, e;
  }, t.CMD = En, t.initDefaultProps = function() {
    var e = t.prototype;
    e._saveData = !0, e._ux = 0, e._uy = 0, e._pendingPtDist = 0, e._version = 0;
  }(), t;
}();
function Mc(t, e, n, r, i, a, o) {
  if (i === 0)
    return !1;
  var s = i, l = 0, u = t;
  if (o > e + s && o > r + s || o < e - s && o < r - s || a > t + s && a > n + s || a < t - s && a < n - s)
    return !1;
  if (t !== n)
    l = (e - r) / (t - n), u = (t * r - n * e) / (t - n);
  else
    return Math.abs(a - t) <= s / 2;
  var c = l * a - o + u, f = c * c / (l * l + 1);
  return f <= s / 2 * s / 2;
}
function Fje(t, e, n, r, i, a, o, s, l, u, c) {
  if (l === 0)
    return !1;
  var f = l;
  if (c > e + f && c > r + f && c > a + f && c > s + f || c < e - f && c < r - f && c < a - f && c < s - f || u > t + f && u > n + f && u > i + f && u > o + f || u < t - f && u < n - f && u < i - f && u < o - f)
    return !1;
  var d = cse(t, e, n, r, i, a, o, s, u, c, null);
  return d <= f / 2;
}
function Zse(t, e, n, r, i, a, o, s, l) {
  if (o === 0)
    return !1;
  var u = o;
  if (l > e + u && l > r + u && l > a + u || l < e - u && l < r - u && l < a - u || s > t + u && s > n + u && s > i + u || s < t - u && s < n - u && s < i - u)
    return !1;
  var c = dse(t, e, n, r, i, a, s, l, null);
  return c <= u / 2;
}
var J9 = Math.PI * 2;
function oo(t) {
  return t %= J9, t < 0 && (t += J9), t;
}
var E0 = Math.PI * 2;
function Wje(t, e, n, r, i, a, o, s, l) {
  if (o === 0)
    return !1;
  var u = o;
  s -= t, l -= e;
  var c = Math.sqrt(s * s + l * l);
  if (c - u > n || c + u < n)
    return !1;
  if (Math.abs(r - i) % E0 < 1e-4)
    return !0;
  if (a) {
    var f = r;
    r = oo(i), i = oo(f);
  } else
    r = oo(r), i = oo(i);
  r > i && (i += E0);
  var d = Math.atan2(l, s);
  return d < 0 && (d += E0), d >= r && d <= i || d + E0 >= r && d + E0 <= i;
}
function bu(t, e, n, r, i, a) {
  if (a > e && a > r || a < e && a < r || r === e)
    return 0;
  var o = (a - e) / (r - e), s = r < e ? 1 : -1;
  (o === 1 || o === 0) && (s = r < e ? 0.5 : -0.5);
  var l = o * (n - t) + t;
  return l === i ? 1 / 0 : l > i ? s : 0;
}
var _c = jl.CMD, _d = Math.PI * 2, Qje = 1e-4;
function Hje(t, e) {
  return Math.abs(t - e) < Qje;
}
var qi = [-1, -1, -1], zo = [-1, -1];
function Gje() {
  var t = zo[0];
  zo[0] = zo[1], zo[1] = t;
}
function jje(t, e, n, r, i, a, o, s, l, u) {
  if (u > e && u > r && u > a && u > s || u < e && u < r && u < a && u < s)
    return 0;
  var c = wC(e, r, a, s, u, qi);
  if (c === 0)
    return 0;
  for (var f = 0, d = -1, h = void 0, p = void 0, v = 0; v < c; v++) {
    var g = qi[v], m = g === 0 || g === 1 ? 0.5 : 1, y = jr(t, n, i, o, g);
    y < l || (d < 0 && (d = use(e, r, a, s, zo), zo[1] < zo[0] && d > 1 && Gje(), h = jr(e, r, a, s, zo[0]), d > 1 && (p = jr(e, r, a, s, zo[1]))), d === 2 ? g < zo[0] ? f += h < e ? m : -m : g < zo[1] ? f += p < h ? m : -m : f += s < p ? m : -m : g < zo[0] ? f += h < e ? m : -m : f += s < h ? m : -m);
  }
  return f;
}
function Zje(t, e, n, r, i, a, o, s) {
  if (s > e && s > r && s > a || s < e && s < r && s < a)
    return 0;
  var l = J9e(e, r, a, s, qi);
  if (l === 0)
    return 0;
  var u = fse(e, r, a);
  if (u >= 0 && u <= 1) {
    for (var c = 0, f = ii(e, r, a, u), d = 0; d < l; d++) {
      var h = qi[d] === 0 || qi[d] === 1 ? 0.5 : 1, p = ii(t, n, i, qi[d]);
      p < o || (qi[d] < u ? c += f < e ? h : -h : c += a < f ? h : -h);
    }
    return c;
  } else {
    var h = qi[0] === 0 || qi[0] === 1 ? 0.5 : 1, p = ii(t, n, i, qi[0]);
    return p < o ? 0 : a < e ? h : -h;
  }
}
function Uje(t, e, n, r, i, a, o, s) {
  if (s -= e, s > n || s < -n)
    return 0;
  var l = Math.sqrt(n * n - s * s);
  qi[0] = -l, qi[1] = l;
  var u = Math.abs(r - i);
  if (u < 1e-4)
    return 0;
  if (u >= _d - 1e-4) {
    r = 0, i = _d;
    var c = a ? 1 : -1;
    return o >= qi[0] + t && o <= qi[1] + t ? c : 0;
  }
  if (r > i) {
    var f = r;
    r = i, i = f;
  }
  r < 0 && (r += _d, i += _d);
  for (var d = 0, h = 0; h < 2; h++) {
    var p = qi[h];
    if (p + t > o) {
      var v = Math.atan2(s, p), c = a ? 1 : -1;
      v < 0 && (v = _d + v), (v >= r && v <= i || v + _d >= r && v + _d <= i) && (v > Math.PI / 2 && v < Math.PI * 1.5 && (c = -c), d += c);
    }
  }
  return d;
}
function Use(t, e, n, r, i) {
  for (var a = t.data, o = t.len(), s = 0, l = 0, u = 0, c = 0, f = 0, d, h, p = 0; p < o; ) {
    var v = a[p++], g = p === 1;
    switch (v === _c.M && p > 1 && (n || (s += bu(l, u, c, f, r, i))), g && (l = a[p], u = a[p + 1], c = l, f = u), v) {
      case _c.M:
        c = a[p++], f = a[p++], l = c, u = f;
        break;
      case _c.L:
        if (n) {
          if (Mc(l, u, a[p], a[p + 1], e, r, i))
            return !0;
        } else
          s += bu(l, u, a[p], a[p + 1], r, i) || 0;
        l = a[p++], u = a[p++];
        break;
      case _c.C:
        if (n) {
          if (Fje(l, u, a[p++], a[p++], a[p++], a[p++], a[p], a[p + 1], e, r, i))
            return !0;
        } else
          s += jje(l, u, a[p++], a[p++], a[p++], a[p++], a[p], a[p + 1], r, i) || 0;
        l = a[p++], u = a[p++];
        break;
      case _c.Q:
        if (n) {
          if (Zse(l, u, a[p++], a[p++], a[p], a[p + 1], e, r, i))
            return !0;
        } else
          s += Zje(l, u, a[p++], a[p++], a[p], a[p + 1], r, i) || 0;
        l = a[p++], u = a[p++];
        break;
      case _c.A:
        var m = a[p++], y = a[p++], _ = a[p++], O = a[p++], S = a[p++], x = a[p++];
        p += 1;
        var C = !!(1 - a[p++]);
        d = Math.cos(S) * _ + m, h = Math.sin(S) * O + y, g ? (c = d, f = h) : s += bu(l, u, d, h, r, i);
        var P = (r - m) * O / _ + m;
        if (n) {
          if (Wje(m, y, O, S, S + x, C, e, P, i))
            return !0;
        } else
          s += Uje(m, y, O, S, S + x, C, P, i);
        l = Math.cos(S + x) * _ + m, u = Math.sin(S + x) * O + y;
        break;
      case _c.R:
        c = l = a[p++], f = u = a[p++];
        var $ = a[p++], T = a[p++];
        if (d = c + $, h = f + T, n) {
          if (Mc(c, f, d, f, e, r, i) || Mc(d, f, d, h, e, r, i) || Mc(d, h, c, h, e, r, i) || Mc(c, h, c, f, e, r, i))
            return !0;
        } else
          s += bu(d, f, d, h, r, i), s += bu(c, h, c, f, r, i);
        break;
      case _c.Z:
        if (n) {
          if (Mc(l, u, c, f, e, r, i))
            return !0;
        } else
          s += bu(l, u, c, f, r, i);
        l = c, u = f;
        break;
    }
  }
  return !n && !Hje(u, f) && (s += bu(l, u, c, f, r, i) || 0), s !== 0;
}
function Xje(t, e, n) {
  return Use(t, 0, !1, e, n);
}
function Yje(t, e, n, r) {
  return Use(t, e, !0, n, r);
}
var MC = it({
  fill: "#000",
  stroke: null,
  strokePercent: 1,
  fillOpacity: 1,
  strokeOpacity: 1,
  lineDashOffset: 0,
  lineWidth: 1,
  lineCap: "butt",
  miterLimit: 10,
  strokeNoScale: !1,
  strokeFirst: !1
}, wh), qje = {
  style: it({
    fill: !0,
    stroke: !0,
    strokePercent: !0,
    fillOpacity: !0,
    strokeOpacity: !0,
    lineDashOffset: !0,
    lineWidth: !0,
    miterLimit: !0
  }, mP.style)
}, rM = Hl.concat([
  "invisible",
  "culling",
  "z",
  "z2",
  "zlevel",
  "parent"
]), Dt = function(t) {
  le(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.update = function() {
    var n = this;
    t.prototype.update.call(this);
    var r = this.style;
    if (r.decal) {
      var i = this._decalEl = this._decalEl || new e();
      i.buildPath === e.prototype.buildPath && (i.buildPath = function(l) {
        n.buildPath(l, n.shape);
      }), i.silent = !0;
      var a = i.style;
      for (var o in r)
        a[o] !== r[o] && (a[o] = r[o]);
      a.fill = r.fill ? r.decal : null, a.decal = null, a.shadowColor = null, r.strokeFirst && (a.stroke = null);
      for (var s = 0; s < rM.length; ++s)
        i[rM[s]] = this[rM[s]];
      i.__dirty |= to;
    } else this._decalEl && (this._decalEl = null);
  }, e.prototype.getDecalElement = function() {
    return this._decalEl;
  }, e.prototype._init = function(n) {
    var r = kt(n);
    this.shape = this.getDefaultShape();
    var i = this.getDefaultStyle();
    i && this.useStyle(i);
    for (var a = 0; a < r.length; a++) {
      var o = r[a], s = n[o];
      o === "style" ? this.style ? _e(this.style, s) : this.useStyle(s) : o === "shape" ? _e(this.shape, s) : t.prototype.attrKV.call(this, o, s);
    }
    this.style || this.useStyle({});
  }, e.prototype.getDefaultStyle = function() {
    return null;
  }, e.prototype.getDefaultShape = function() {
    return {};
  }, e.prototype.canBeInsideText = function() {
    return this.hasFill();
  }, e.prototype.getInsideTextFill = function() {
    var n = this.style.fill;
    if (n !== "none") {
      if (Ve(n)) {
        var r = jb(n, 0);
        return r > 0.5 ? mk : r > 0.2 ? MGe : yk;
      } else if (n)
        return yk;
    }
    return mk;
  }, e.prototype.getInsideTextStroke = function(n) {
    var r = this.style.fill;
    if (Ve(r)) {
      var i = this.__zr, a = !!(i && i.isDarkMode()), o = jb(n, 0) < gk;
      if (a === o)
        return r;
    }
  }, e.prototype.buildPath = function(n, r, i) {
  }, e.prototype.pathUpdated = function() {
    this.__dirty &= ~_v;
  }, e.prototype.getUpdatedPathProxy = function(n) {
    return !this.path && this.createPathProxy(), this.path.beginPath(), this.buildPath(this.path, this.shape, n), this.path;
  }, e.prototype.createPathProxy = function() {
    this.path = new jl(!1);
  }, e.prototype.hasStroke = function() {
    var n = this.style, r = n.stroke;
    return !(r == null || r === "none" || !(n.lineWidth > 0));
  }, e.prototype.hasFill = function() {
    var n = this.style, r = n.fill;
    return r != null && r !== "none";
  }, e.prototype.getBoundingRect = function() {
    var n = this._rect, r = this.style, i = !n;
    if (i) {
      var a = !1;
      this.path || (a = !0, this.createPathProxy());
      var o = this.path;
      (a || this.__dirty & _v) && (o.beginPath(), this.buildPath(o, this.shape, !1), this.pathUpdated()), n = o.getBoundingRect();
    }
    if (this._rect = n, this.hasStroke() && this.path && this.path.len() > 0) {
      var s = this._rectStroke || (this._rectStroke = n.clone());
      if (this.__dirty || i) {
        s.copy(n);
        var l = r.strokeNoScale ? this.getLineScale() : 1, u = r.lineWidth;
        if (!this.hasFill()) {
          var c = this.strokeContainThreshold;
          u = Math.max(u, c ?? 4);
        }
        l > 1e-10 && (s.width += u / l, s.height += u / l, s.x -= u / l / 2, s.y -= u / l / 2);
      }
      return s;
    }
    return n;
  }, e.prototype.contain = function(n, r) {
    var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect(), o = this.style;
    if (n = i[0], r = i[1], a.contain(n, r)) {
      var s = this.path;
      if (this.hasStroke()) {
        var l = o.lineWidth, u = o.strokeNoScale ? this.getLineScale() : 1;
        if (u > 1e-10 && (this.hasFill() || (l = Math.max(l, this.strokeContainThreshold)), Yje(s, l / u, n, r)))
          return !0;
      }
      if (this.hasFill())
        return Xje(s, n, r);
    }
    return !1;
  }, e.prototype.dirtyShape = function() {
    this.__dirty |= _v, this._rect && (this._rect = null), this._decalEl && this._decalEl.dirtyShape(), this.markRedraw();
  }, e.prototype.dirty = function() {
    this.dirtyStyle(), this.dirtyShape();
  }, e.prototype.animateShape = function(n) {
    return this.animate("shape", n);
  }, e.prototype.updateDuringAnimation = function(n) {
    n === "style" ? this.dirtyStyle() : n === "shape" ? this.dirtyShape() : this.markRedraw();
  }, e.prototype.attrKV = function(n, r) {
    n === "shape" ? this.setShape(r) : t.prototype.attrKV.call(this, n, r);
  }, e.prototype.setShape = function(n, r) {
    var i = this.shape;
    return i || (i = this.shape = {}), typeof n == "string" ? i[n] = r : _e(i, n), this.dirtyShape(), this;
  }, e.prototype.shapeChanged = function() {
    return !!(this.__dirty & _v);
  }, e.prototype.createStyle = function(n) {
    return r1(MC, n);
  }, e.prototype._innerSaveToNormal = function(n) {
    t.prototype._innerSaveToNormal.call(this, n);
    var r = this._normalState;
    n.shape && !r.shape && (r.shape = _e({}, this.shape));
  }, e.prototype._applyStateObj = function(n, r, i, a, o, s) {
    t.prototype._applyStateObj.call(this, n, r, i, a, o, s);
    var l = !(r && a), u;
    if (r && r.shape ? o ? a ? u = r.shape : (u = _e({}, i.shape), _e(u, r.shape)) : (u = _e({}, a ? this.shape : i.shape), _e(u, r.shape)) : l && (u = i.shape), u)
      if (o) {
        this.shape = _e({}, this.shape);
        for (var c = {}, f = kt(u), d = 0; d < f.length; d++) {
          var h = f[d];
          typeof u[h] == "object" ? this.shape[h] = u[h] : c[h] = u[h];
        }
        this._transitionState(n, {
          shape: c
        }, s);
      } else
        this.shape = u, this.dirtyShape();
  }, e.prototype._mergeStates = function(n) {
    for (var r = t.prototype._mergeStates.call(this, n), i, a = 0; a < n.length; a++) {
      var o = n[a];
      o.shape && (i = i || {}, this._mergeStyle(i, o.shape));
    }
    return i && (r.shape = i), r;
  }, e.prototype.getAnimationStyleProps = function() {
    return qje;
  }, e.prototype.isZeroArea = function() {
    return !1;
  }, e.extend = function(n) {
    var r = function(a) {
      le(o, a);
      function o(s) {
        var l = a.call(this, s) || this;
        return n.init && n.init.call(l, s), l;
      }
      return o.prototype.getDefaultStyle = function() {
        return ot(n.style);
      }, o.prototype.getDefaultShape = function() {
        return ot(n.shape);
      }, o;
    }(e);
    for (var i in n)
      typeof n[i] == "function" && (r.prototype[i] = n[i]);
    return r;
  }, e.initDefaultProps = function() {
    var n = e.prototype;
    n.type = "path", n.strokeContainThreshold = 5, n.segmentIgnoreThreshold = 0, n.subPixelOptimize = !1, n.autoBatch = !1, n.__dirty = to | hy | _v;
  }(), e;
}(ls), Kje = it({
  strokeFirst: !0,
  font: vf,
  x: 0,
  y: 0,
  textAlign: "left",
  textBaseline: "top",
  miterLimit: 2
}, MC), Wg = function(t) {
  le(e, t);
  function e() {
    return t !== null && t.apply(this, arguments) || this;
  }
  return e.prototype.hasStroke = function() {
    var n = this.style, r = n.stroke;
    return r != null && r !== "none" && n.lineWidth > 0;
  }, e.prototype.hasFill = function() {
    var n = this.style, r = n.fill;
    return r != null && r !== "none";
  }, e.prototype.createStyle = function(n) {
    return r1(Kje, n);
  }, e.prototype.setBoundingRect = function(n) {
    this._rect = n;
  }, e.prototype.getBoundingRect = function() {
    var n = this.style;
    if (!this._rect) {
      var r = n.text;
      r != null ? r += "" : r = "";
      var i = o1(r, n.font, n.textAlign, n.textBaseline);
      if (i.x += n.x || 0, i.y += n.y || 0, this.hasStroke()) {
        var a = n.lineWidth;
        i.x -= a / 2, i.y -= a / 2, i.width += a, i.height += a;
      }
      this._rect = i;
    }
    return this._rect;
  }, e.initDefaultProps = function() {
    var n = e.prototype;
    n.dirtyRectTolerance = 10;
  }(), e;
}(ls);
Wg.prototype.type = "tspan";
var Jje = it({
  x: 0,
  y: 0
}, wh), eZe = {
  style: it({
    x: !0,
    y: !0,
    width: !0,
    height: !0,
    sx: !0,
    sy: !0,
    sWidth: !0,
    sHeight: !0
  }, mP.style)
};
function tZe(t) {
  return !!(t && typeof t != "string" && t.width && t.height);
}
var Xse = function(t) {
  le(e, t);
  function e() {
    return t !== null && t.apply(this, arguments) || this;
  }
  return e.prototype.createStyle = function(n) {
    return r1(Jje, n);
  }, e.prototype._getSize = function(n) {
    var r = this.style, i = r[n];
    if (i != null)
      return i;
    var a = tZe(r.image) ? r.image : this.__image;
    if (!a)
      return 0;
    var o = n === "width" ? "height" : "width", s = r[o];
    return s == null ? a[n] : a[n] / a[o] * s;
  }, e.prototype.getWidth = function() {
    return this._getSize("width");
  }, e.prototype.getHeight = function() {
    return this._getSize("height");
  }, e.prototype.getAnimationStyleProps = function() {
    return eZe;
  }, e.prototype.getBoundingRect = function() {
    var n = this.style;
    return this._rect || (this._rect = new bt(n.x || 0, n.y || 0, this.getWidth(), this.getHeight())), this._rect;
  }, e;
}(ls);
Xse.prototype.type = "image";
const ci = Xse;
function nZe(t, e) {
  var n = e.x, r = e.y, i = e.width, a = e.height, o = e.r, s, l, u, c;
  i < 0 && (n = n + i, i = -i), a < 0 && (r = r + a, a = -a), typeof o == "number" ? s = l = u = c = o : o instanceof Array ? o.length === 1 ? s = l = u = c = o[0] : o.length === 2 ? (s = u = o[0], l = c = o[1]) : o.length === 3 ? (s = o[0], l = c = o[1], u = o[2]) : (s = o[0], l = o[1], u = o[2], c = o[3]) : s = l = u = c = 0;
  var f;
  s + l > i && (f = s + l, s *= i / f, l *= i / f), u + c > i && (f = u + c, u *= i / f, c *= i / f), l + u > a && (f = l + u, l *= a / f, u *= a / f), s + c > a && (f = s + c, s *= a / f, c *= a / f), t.moveTo(n + s, r), t.lineTo(n + i - l, r), l !== 0 && t.arc(n + i - l, r + l, l, -Math.PI / 2, 0), t.lineTo(n + i, r + a - u), u !== 0 && t.arc(n + i - u, r + a - u, u, 0, Math.PI / 2), t.lineTo(n + c, r + a), c !== 0 && t.arc(n + c, r + a - c, c, Math.PI / 2, Math.PI), t.lineTo(n, r + s), s !== 0 && t.arc(n + s, r + s, s, Math.PI, Math.PI * 1.5);
}
var Dv = Math.round;
function Yse(t, e, n) {
  if (e) {
    var r = e.x1, i = e.x2, a = e.y1, o = e.y2;
    t.x1 = r, t.x2 = i, t.y1 = a, t.y2 = o;
    var s = n && n.lineWidth;
    return s && (Dv(r * 2) === Dv(i * 2) && (t.x1 = t.x2 = ih(r, s, !0)), Dv(a * 2) === Dv(o * 2) && (t.y1 = t.y2 = ih(a, s, !0))), t;
  }
}
function qse(t, e, n) {
  if (e) {
    var r = e.x, i = e.y, a = e.width, o = e.height;
    t.x = r, t.y = i, t.width = a, t.height = o;
    var s = n && n.lineWidth;
    return s && (t.x = ih(r, s, !0), t.y = ih(i, s, !0), t.width = Math.max(ih(r + a, s, !1) - t.x, a === 0 ? 0 : 1), t.height = Math.max(ih(i + o, s, !1) - t.y, o === 0 ? 0 : 1)), t;
  }
}
function ih(t, e, n) {
  if (!e)
    return t;
  var r = Dv(t * 2);
  return (r + Dv(e)) % 2 === 0 ? r / 2 : (r + (n ? 1 : -1)) / 2;
}
var rZe = /* @__PURE__ */ function() {
  function t() {
    this.x = 0, this.y = 0, this.width = 0, this.height = 0;
  }
  return t;
}(), iZe = {}, Kse = function(t) {
  le(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new rZe();
  }, e.prototype.buildPath = function(n, r) {
    var i, a, o, s;
    if (this.subPixelOptimize) {
      var l = qse(iZe, r, this.style);
      i = l.x, a = l.y, o = l.width, s = l.height, l.r = r.r, r = l;
    } else
      i = r.x, a = r.y, o = r.width, s = r.height;
    r.r ? nZe(n, r) : n.rect(i, a, o, s);
  }, e.prototype.isZeroArea = function() {
    return !this.shape.width || !this.shape.height;
  }, e;
}(Dt);
Kse.prototype.type = "rect";
const Zt = Kse;
var eG = {
  fill: "#000"
}, tG = 2, aZe = {
  style: it({
    fill: !0,
    stroke: !0,
    fillOpacity: !0,
    strokeOpacity: !0,
    lineWidth: !0,
    fontSize: !0,
    lineHeight: !0,
    width: !0,
    height: !0,
    textShadowColor: !0,
    textShadowBlur: !0,
    textShadowOffsetX: !0,
    textShadowOffsetY: !0,
    backgroundColor: !0,
    padding: !0,
    borderColor: !0,
    borderWidth: !0,
    borderRadius: !0
  }, mP.style)
}, Jse = function(t) {
  le(e, t);
  function e(n) {
    var r = t.call(this) || this;
    return r.type = "text", r._children = [], r._defaultStyle = eG, r.attr(n), r;
  }
  return e.prototype.childrenRef = function() {
    return this._children;
  }, e.prototype.update = function() {
    t.prototype.update.call(this), this.styleChanged() && this._updateSubTexts();
    for (var n = 0; n < this._children.length; n++) {
      var r = this._children[n];
      r.zlevel = this.zlevel, r.z = this.z, r.z2 = this.z2, r.culling = this.culling, r.cursor = this.cursor, r.invisible = this.invisible;
    }
  }, e.prototype.updateTransform = function() {
    var n = this.innerTransformable;
    n ? (n.updateTransform(), n.transform && (this.transform = n.transform)) : t.prototype.updateTransform.call(this);
  }, e.prototype.getLocalTransform = function(n) {
    var r = this.innerTransformable;
    return r ? r.getLocalTransform(n) : t.prototype.getLocalTransform.call(this, n);
  }, e.prototype.getComputedTransform = function() {
    return this.__hostTarget && (this.__hostTarget.getComputedTransform(), this.__hostTarget.updateInnerText(!0)), t.prototype.getComputedTransform.call(this);
  }, e.prototype._updateSubTexts = function() {
    this._childCursor = 0, lZe(this.style), this.style.rich ? this._updateRichTexts() : this._updatePlainTexts(), this._children.length = this._childCursor, this.styleUpdated();
  }, e.prototype.addSelfToZr = function(n) {
    t.prototype.addSelfToZr.call(this, n);
    for (var r = 0; r < this._children.length; r++)
      this._children[r].__zr = n;
  }, e.prototype.removeSelfFromZr = function(n) {
    t.prototype.removeSelfFromZr.call(this, n);
    for (var r = 0; r < this._children.length; r++)
      this._children[r].__zr = null;
  }, e.prototype.getBoundingRect = function() {
    if (this.styleChanged() && this._updateSubTexts(), !this._rect) {
      for (var n = new bt(0, 0, 0, 0), r = this._children, i = [], a = null, o = 0; o < r.length; o++) {
        var s = r[o], l = s.getBoundingRect(), u = s.getLocalTransform(i);
        u ? (n.copy(l), n.applyTransform(u), a = a || n.clone(), a.union(n)) : (a = a || l.clone(), a.union(l));
      }
      this._rect = a || n;
    }
    return this._rect;
  }, e.prototype.setDefaultTextStyle = function(n) {
    this._defaultStyle = n || eG;
  }, e.prototype.setTextContent = function(n) {
    if (process.env.NODE_ENV !== "production")
      throw new Error("Can't attach text on another text");
  }, e.prototype._mergeStyle = function(n, r) {
    if (!r)
      return n;
    var i = r.rich, a = n.rich || i && {};
    return _e(n, r), i && a ? (this._mergeRich(a, i), n.rich = a) : a && (n.rich = a), n;
  }, e.prototype._mergeRich = function(n, r) {
    for (var i = kt(r), a = 0; a < i.length; a++) {
      var o = i[a];
      n[o] = n[o] || {}, _e(n[o], r[o]);
    }
  }, e.prototype.getAnimationStyleProps = function() {
    return aZe;
  }, e.prototype._getOrCreateChild = function(n) {
    var r = this._children[this._childCursor];
    return (!r || !(r instanceof n)) && (r = new n()), this._children[this._childCursor++] = r, r.__zr = this.__zr, r.parent = this, r;
  }, e.prototype._updatePlainTexts = function() {
    var n = this.style, r = n.font || vf, i = n.padding, a = lG(n), o = $je(a, n), s = iM(n), l = !!n.backgroundColor, u = o.outerHeight, c = o.outerWidth, f = o.contentWidth, d = o.lines, h = o.lineHeight, p = this._defaultStyle, v = n.x || 0, g = n.y || 0, m = n.align || p.align || "left", y = n.verticalAlign || p.verticalAlign || "top", _ = v, O = Ov(g, o.contentHeight, y);
    if (s || i) {
      var S = vy(v, c, m), x = Ov(g, u, y);
      s && this._renderBackground(n, n, S, x, c, u);
    }
    O += h / 2, i && (_ = sG(v, m, i), y === "top" ? O += i[0] : y === "bottom" && (O -= i[2]));
    for (var C = 0, P = !1, $ = oG("fill" in n ? n.fill : (P = !0, p.fill)), T = aG("stroke" in n ? n.stroke : !l && (!p.autoStroke || P) ? (C = tG, p.stroke) : null), E = n.textShadowBlur > 0, M = n.width != null && (n.overflow === "truncate" || n.overflow === "break" || n.overflow === "breakAll"), R = o.calculatedLineHeight, N = 0; N < d.length; N++) {
      var I = this._getOrCreateChild(Wg), B = I.createStyle();
      I.useStyle(B), B.text = d[N], B.x = _, B.y = O, m && (B.textAlign = m), B.textBaseline = "middle", B.opacity = n.opacity, B.strokeFirst = !0, E && (B.shadowBlur = n.textShadowBlur || 0, B.shadowColor = n.textShadowColor || "transparent", B.shadowOffsetX = n.textShadowOffsetX || 0, B.shadowOffsetY = n.textShadowOffsetY || 0), B.stroke = T, B.fill = $, T && (B.lineWidth = n.lineWidth || C, B.lineDash = n.lineDash, B.lineDashOffset = n.lineDashOffset || 0), B.font = r, rG(B, n), O += h, M && I.setBoundingRect(new bt(vy(B.x, n.width, B.textAlign), Ov(B.y, R, B.textBaseline), f, R));
    }
  }, e.prototype._updateRichTexts = function() {
    var n = this.style, r = lG(n), i = Mje(r, n), a = i.width, o = i.outerWidth, s = i.outerHeight, l = n.padding, u = n.x || 0, c = n.y || 0, f = this._defaultStyle, d = n.align || f.align, h = n.verticalAlign || f.verticalAlign, p = vy(u, o, d), v = Ov(c, s, h), g = p, m = v;
    l && (g += l[3], m += l[0]);
    var y = g + a;
    iM(n) && this._renderBackground(n, n, p, v, o, s);
    for (var _ = !!n.backgroundColor, O = 0; O < i.lines.length; O++) {
      for (var S = i.lines[O], x = S.tokens, C = x.length, P = S.lineHeight, $ = S.width, T = 0, E = g, M = y, R = C - 1, N = void 0; T < C && (N = x[T], !N.align || N.align === "left"); )
        this._placeToken(N, n, P, m, E, "left", _), $ -= N.width, E += N.width, T++;
      for (; R >= 0 && (N = x[R], N.align === "right"); )
        this._placeToken(N, n, P, m, M, "right", _), $ -= N.width, M -= N.width, R--;
      for (E += (a - (E - g) - (y - M) - $) / 2; T <= R; )
        N = x[T], this._placeToken(N, n, P, m, E + N.width / 2, "center", _), E += N.width, T++;
      m += P;
    }
  }, e.prototype._placeToken = function(n, r, i, a, o, s, l) {
    var u = r.rich[n.styleName] || {};
    u.text = n.text;
    var c = n.verticalAlign, f = a + i / 2;
    c === "top" ? f = a + n.height / 2 : c === "bottom" && (f = a + i - n.height / 2);
    var d = !n.isLineHolder && iM(u);
    d && this._renderBackground(u, r, s === "right" ? o - n.width : s === "center" ? o - n.width / 2 : o, f - n.height / 2, n.width, n.height);
    var h = !!u.backgroundColor, p = n.textPadding;
    p && (o = sG(o, s, p), f -= n.height / 2 - p[0] - n.innerHeight / 2);
    var v = this._getOrCreateChild(Wg), g = v.createStyle();
    v.useStyle(g);
    var m = this._defaultStyle, y = !1, _ = 0, O = oG("fill" in u ? u.fill : "fill" in r ? r.fill : (y = !0, m.fill)), S = aG("stroke" in u ? u.stroke : "stroke" in r ? r.stroke : !h && !l && (!m.autoStroke || y) ? (_ = tG, m.stroke) : null), x = u.textShadowBlur > 0 || r.textShadowBlur > 0;
    g.text = n.text, g.x = o, g.y = f, x && (g.shadowBlur = u.textShadowBlur || r.textShadowBlur || 0, g.shadowColor = u.textShadowColor || r.textShadowColor || "transparent", g.shadowOffsetX = u.textShadowOffsetX || r.textShadowOffsetX || 0, g.shadowOffsetY = u.textShadowOffsetY || r.textShadowOffsetY || 0), g.textAlign = s, g.textBaseline = "middle", g.font = n.font || vf, g.opacity = co(u.opacity, r.opacity, 1), rG(g, u), S && (g.lineWidth = co(u.lineWidth, r.lineWidth, _), g.lineDash = dt(u.lineDash, r.lineDash), g.lineDashOffset = r.lineDashOffset || 0, g.stroke = S), O && (g.fill = O);
    var C = n.contentWidth, P = n.contentHeight;
    v.setBoundingRect(new bt(vy(g.x, C, g.textAlign), Ov(g.y, P, g.textBaseline), C, P));
  }, e.prototype._renderBackground = function(n, r, i, a, o, s) {
    var l = n.backgroundColor, u = n.borderWidth, c = n.borderColor, f = l && l.image, d = l && !f, h = n.borderRadius, p = this, v, g;
    if (d || n.lineHeight || u && c) {
      v = this._getOrCreateChild(Zt), v.useStyle(v.createStyle()), v.style.fill = null;
      var m = v.shape;
      m.x = i, m.y = a, m.width = o, m.height = s, m.r = h, v.dirtyShape();
    }
    if (d) {
      var y = v.style;
      y.fill = l || null, y.fillOpacity = dt(n.fillOpacity, 1);
    } else if (f) {
      g = this._getOrCreateChild(ci), g.onload = function() {
        p.dirtyStyle();
      };
      var _ = g.style;
      _.image = l.image, _.x = i, _.y = a, _.width = o, _.height = s;
    }
    if (u && c) {
      var y = v.style;
      y.lineWidth = u, y.stroke = c, y.strokeOpacity = dt(n.strokeOpacity, 1), y.lineDash = n.borderDash, y.lineDashOffset = n.borderDashOffset || 0, v.strokeContainThreshold = 0, v.hasFill() && v.hasStroke() && (y.strokeFirst = !0, y.lineWidth *= 2);
    }
    var O = (v || g).style;
    O.shadowBlur = n.shadowBlur || 0, O.shadowColor = n.shadowColor || "transparent", O.shadowOffsetX = n.shadowOffsetX || 0, O.shadowOffsetY = n.shadowOffsetY || 0, O.opacity = co(n.opacity, r.opacity, 1);
  }, e.makeFont = function(n) {
    var r = "";
    return tle(n) && (r = [
      n.fontStyle,
      n.fontWeight,
      ele(n.fontSize),
      n.fontFamily || "sans-serif"
    ].join(" ")), r && Zo(r) || n.textFont || n.font;
  }, e;
}(ls), oZe = { left: !0, right: 1, center: 1 }, sZe = { top: 1, bottom: 1, middle: 1 }, nG = ["fontStyle", "fontWeight", "fontSize", "fontFamily"];
function ele(t) {
  return typeof t == "string" && (t.indexOf("px") !== -1 || t.indexOf("rem") !== -1 || t.indexOf("em") !== -1) ? t : isNaN(+t) ? h5 + "px" : t + "px";
}
function rG(t, e) {
  for (var n = 0; n < nG.length; n++) {
    var r = nG[n], i = e[r];
    i != null && (t[r] = i);
  }
}
function tle(t) {
  return t.fontSize != null || t.fontFamily || t.fontWeight;
}
function lZe(t) {
  return iG(t), F(t.rich, iG), t;
}
function iG(t) {
  if (t) {
    t.font = Jse.makeFont(t);
    var e = t.align;
    e === "middle" && (e = "center"), t.align = e == null || oZe[e] ? e : "left";
    var n = t.verticalAlign;
    n === "center" && (n = "middle"), t.verticalAlign = n == null || sZe[n] ? n : "top";
    var r = t.padding;
    r && (t.padding = sP(t.padding));
  }
}
function aG(t, e) {
  return t == null || e <= 0 || t === "transparent" || t === "none" ? null : t.image || t.colorStops ? "#000" : t;
}
function oG(t) {
  return t == null || t === "none" ? null : t.image || t.colorStops ? "#000" : t;
}
function sG(t, e, n) {
  return e === "right" ? t - n[1] : e === "center" ? t + n[3] / 2 - n[1] / 2 : t + n[3];
}
function lG(t) {
  var e = t.text;
  return e != null && (e += ""), e;
}
function iM(t) {
  return !!(t.backgroundColor || t.lineHeight || t.borderWidth && t.borderColor);
}
const jt = Jse;
var ft = Ut(), Pk = function(t, e, n, r) {
  if (r) {
    var i = ft(r);
    i.dataIndex = n, i.dataType = e, i.seriesIndex = t, i.ssrType = "chart", r.type === "group" && r.traverse(function(a) {
      var o = ft(a);
      o.seriesIndex = t, o.dataIndex = n, o.dataType = e, o.ssrType = "chart";
    });
  }
}, uG = 1, cG = {}, nle = Ut(), R5 = Ut(), k5 = 0, u1 = 1, bP = 2, da = ["emphasis", "blur", "select"], Ub = ["normal", "emphasis", "blur", "select"], bm = 10, uZe = 9, Ch = "highlight", cw = "downplay", nb = "select", fw = "unselect", rb = "toggleSelect";
function Yp(t) {
  return t != null && t !== "none";
}
function _P(t, e, n) {
  t.onHoverStateChange && (t.hoverState || 0) !== n && t.onHoverStateChange(e), t.hoverState = n;
}
function rle(t) {
  _P(t, "emphasis", bP);
}
function ile(t) {
  t.hoverState === bP && _P(t, "normal", k5);
}
function L5(t) {
  _P(t, "blur", u1);
}
function ale(t) {
  t.hoverState === u1 && _P(t, "normal", k5);
}
function cZe(t) {
  t.selected = !0;
}
function fZe(t) {
  t.selected = !1;
}
function fG(t, e, n) {
  e(t, n);
}
function rc(t, e, n) {
  fG(t, e, n), t.isGroup && t.traverse(function(r) {
    fG(r, e, n);
  });
}
function IC(t, e) {
  switch (e) {
    case "emphasis":
      t.hoverState = bP;
      break;
    case "normal":
      t.hoverState = k5;
      break;
    case "blur":
      t.hoverState = u1;
      break;
    case "select":
      t.selected = !0;
  }
}
function dZe(t, e, n, r) {
  for (var i = t.style, a = {}, o = 0; o < e.length; o++) {
    var s = e[o], l = i[s];
    a[s] = l ?? (r && r[s]);
  }
  for (var o = 0; o < t.animators.length; o++) {
    var u = t.animators[o];
    u.__fromStateTransition && u.__fromStateTransition.indexOf(n) < 0 && u.targetName === "style" && u.saveTo(a, e);
  }
  return a;
}
function hZe(t, e, n, r) {
  var i = n && St(n, "select") >= 0, a = !1;
  if (t instanceof Dt) {
    var o = nle(t), s = i && o.selectFill || o.normalFill, l = i && o.selectStroke || o.normalStroke;
    if (Yp(s) || Yp(l)) {
      r = r || {};
      var u = r.style || {};
      u.fill === "inherit" ? (a = !0, r = _e({}, r), u = _e({}, u), u.fill = s) : !Yp(u.fill) && Yp(s) ? (a = !0, r = _e({}, r), u = _e({}, u), u.fill = TC(s)) : !Yp(u.stroke) && Yp(l) && (a || (r = _e({}, r), u = _e({}, u)), u.stroke = TC(l)), r.style = u;
    }
  }
  if (r && r.z2 == null) {
    a || (r = _e({}, r));
    var c = t.z2EmphasisLift;
    r.z2 = t.z2 + (c ?? bm);
  }
  return r;
}
function pZe(t, e, n) {
  if (n && n.z2 == null) {
    n = _e({}, n);
    var r = t.z2SelectLift;
    n.z2 = t.z2 + (r ?? uZe);
  }
  return n;
}
function vZe(t, e, n) {
  var r = St(t.currentStates, e) >= 0, i = t.style.opacity, a = r ? null : dZe(t, ["opacity"], e, {
    opacity: 1
  });
  n = n || {};
  var o = n.style || {};
  return o.opacity == null && (n = _e({}, n), o = _e({
    // Already being applied 'emphasis'. DON'T mul opacity multiple times.
    opacity: r ? i : a.opacity * 0.1
  }, o), n.style = o), n;
}
function aM(t, e) {
  var n = this.states[t];
  if (this.style) {
    if (t === "emphasis")
      return hZe(this, t, e, n);
    if (t === "blur")
      return vZe(this, t, n);
    if (t === "select")
      return pZe(this, t, n);
  }
  return n;
}
function Zh(t) {
  t.stateProxy = aM;
  var e = t.getTextContent(), n = t.getTextGuideLine();
  e && (e.stateProxy = aM), n && (n.stateProxy = aM);
}
function dG(t, e) {
  !ule(t, e) && !t.__highByOuter && rc(t, rle);
}
function hG(t, e) {
  !ule(t, e) && !t.__highByOuter && rc(t, ile);
}
function Fu(t, e) {
  t.__highByOuter |= 1 << (e || 0), rc(t, rle);
}
function Wu(t, e) {
  !(t.__highByOuter &= ~(1 << (e || 0))) && rc(t, ile);
}
function ole(t) {
  rc(t, L5);
}
function N5(t) {
  rc(t, ale);
}
function sle(t) {
  rc(t, cZe);
}
function lle(t) {
  rc(t, fZe);
}
function ule(t, e) {
  return t.__highDownSilentOnTouch && e.zrByTouch;
}
function cle(t) {
  var e = t.getModel(), n = [], r = [];
  e.eachComponent(function(i, a) {
    var o = R5(a), s = i === "series", l = s ? t.getViewOfSeriesModel(a) : t.getViewOfComponentModel(a);
    !s && r.push(l), o.isBlured && (l.group.traverse(function(u) {
      ale(u);
    }), s && n.push(a)), o.isBlured = !1;
  }), F(r, function(i) {
    i && i.toggleBlurSeries && i.toggleBlurSeries(n, !1, e);
  });
}
function $k(t, e, n, r) {
  var i = r.getModel();
  n = n || "coordinateSystem";
  function a(u, c) {
    for (var f = 0; f < c.length; f++) {
      var d = u.getItemGraphicEl(c[f]);
      d && N5(d);
    }
  }
  if (t != null && !(!e || e === "none")) {
    var o = i.getSeriesByIndex(t), s = o.coordinateSystem;
    s && s.master && (s = s.master);
    var l = [];
    i.eachSeries(function(u) {
      var c = o === u, f = u.coordinateSystem;
      f && f.master && (f = f.master);
      var d = f && s ? f === s : c;
      if (!// Not blur other series if blurScope series
      (n === "series" && !c || n === "coordinateSystem" && !d || e === "series" && c)) {
        var h = r.getViewOfSeriesModel(u);
        if (h.group.traverse(function(g) {
          g.__highByOuter && c && e === "self" || L5(g);
        }), Pi(e))
          a(u.getData(), e);
        else if (nt(e))
          for (var p = kt(e), v = 0; v < p.length; v++)
            a(u.getData(p[v]), e[p[v]]);
        l.push(u), R5(u).isBlured = !0;
      }
    }), i.eachComponent(function(u, c) {
      if (u !== "series") {
        var f = r.getViewOfComponentModel(c);
        f && f.toggleBlurSeries && f.toggleBlurSeries(l, !0, i);
      }
    });
  }
}
function Ak(t, e, n) {
  if (!(t == null || e == null)) {
    var r = n.getModel().getComponent(t, e);
    if (r) {
      R5(r).isBlured = !0;
      var i = n.getViewOfComponentModel(r);
      !i || !i.focusBlurEnabled || i.group.traverse(function(a) {
        L5(a);
      });
    }
  }
}
function gZe(t, e, n) {
  var r = t.seriesIndex, i = t.getData(e.dataType);
  if (!i) {
    process.env.NODE_ENV !== "production" && $i("Unknown dataType " + e.dataType);
    return;
  }
  var a = Gh(i, e);
  a = (Se(a) ? a[0] : a) || 0;
  var o = i.getItemGraphicEl(a);
  if (!o)
    for (var s = i.count(), l = 0; !o && l < s; )
      o = i.getItemGraphicEl(l++);
  if (o) {
    var u = ft(o);
    $k(r, u.focus, u.blurScope, n);
  } else {
    var c = t.get(["emphasis", "focus"]), f = t.get(["emphasis", "blurScope"]);
    c != null && $k(r, c, f, n);
  }
}
function B5(t, e, n, r) {
  var i = {
    focusSelf: !1,
    dispatchers: null
  };
  if (t == null || t === "series" || e == null || n == null)
    return i;
  var a = r.getModel().getComponent(t, e);
  if (!a)
    return i;
  var o = r.getViewOfComponentModel(a);
  if (!o || !o.findHighDownDispatchers)
    return i;
  for (var s = o.findHighDownDispatchers(n), l, u = 0; u < s.length; u++)
    if (process.env.NODE_ENV !== "production" && !bf(s[u]) && $i("param should be highDownDispatcher"), ft(s[u]).focus === "self") {
      l = !0;
      break;
    }
  return {
    focusSelf: l,
    dispatchers: s
  };
}
function mZe(t, e, n) {
  process.env.NODE_ENV !== "production" && !bf(t) && $i("param should be highDownDispatcher");
  var r = ft(t), i = B5(r.componentMainType, r.componentIndex, r.componentHighDownName, n), a = i.dispatchers, o = i.focusSelf;
  a ? (o && Ak(r.componentMainType, r.componentIndex, n), F(a, function(s) {
    return dG(s, e);
  })) : ($k(r.seriesIndex, r.focus, r.blurScope, n), r.focus === "self" && Ak(r.componentMainType, r.componentIndex, n), dG(t, e));
}
function yZe(t, e, n) {
  process.env.NODE_ENV !== "production" && !bf(t) && $i("param should be highDownDispatcher"), cle(n);
  var r = ft(t), i = B5(r.componentMainType, r.componentIndex, r.componentHighDownName, n).dispatchers;
  i ? F(i, function(a) {
    return hG(a, e);
  }) : hG(t, e);
}
function bZe(t, e, n) {
  if (Mk(e)) {
    var r = e.dataType, i = t.getData(r), a = Gh(i, e);
    Se(a) || (a = [a]), t[e.type === rb ? "toggleSelect" : e.type === nb ? "select" : "unselect"](a, r);
  }
}
function pG(t) {
  var e = t.getAllData();
  F(e, function(n) {
    var r = n.data, i = n.type;
    r.eachItemGraphicEl(function(a, o) {
      t.isSelected(o, i) ? sle(a) : lle(a);
    });
  });
}
function _Ze(t) {
  var e = [];
  return t.eachSeries(function(n) {
    var r = n.getAllData();
    F(r, function(i) {
      i.data;
      var a = i.type, o = n.getSelectedDataIndices();
      if (o.length > 0) {
        var s = {
          dataIndex: o,
          seriesIndex: n.seriesIndex
        };
        a != null && (s.dataType = a), e.push(s);
      }
    });
  }), e;
}
function af(t, e, n) {
  ah(t, !0), rc(t, Zh), Ek(t, e, n);
}
function OZe(t) {
  ah(t, !1);
}
function ur(t, e, n, r) {
  r ? OZe(t) : af(t, e, n);
}
function Ek(t, e, n) {
  var r = ft(t);
  e != null ? (r.focus = e, r.blurScope = n) : r.focus && (r.focus = null);
}
var vG = ["emphasis", "blur", "select"], SZe = {
  itemStyle: "getItemStyle",
  lineStyle: "getLineStyle",
  areaStyle: "getAreaStyle"
};
function Ai(t, e, n, r) {
  n = n || "itemStyle";
  for (var i = 0; i < vG.length; i++) {
    var a = vG[i], o = e.getModel([a, n]), s = t.ensureState(a);
    s.style = r ? r(o) : o[SZe[n]]();
  }
}
function ah(t, e) {
  var n = e === !1, r = t;
  t.highDownSilentOnTouch && (r.__highDownSilentOnTouch = t.highDownSilentOnTouch), (!n || r.__highDownDispatcher) && (r.__highByOuter = r.__highByOuter || 0, r.__highDownDispatcher = !n);
}
function bf(t) {
  return !!(t && t.__highDownDispatcher);
}
function xZe(t, e, n) {
  var r = ft(t);
  r.componentMainType = e.mainType, r.componentIndex = e.componentIndex, r.componentHighDownName = n;
}
function wZe(t) {
  var e = cG[t];
  return e == null && uG <= 32 && (e = cG[t] = uG++), e;
}
function Mk(t) {
  var e = t.type;
  return e === nb || e === fw || e === rb;
}
function gG(t) {
  var e = t.type;
  return e === Ch || e === cw;
}
function CZe(t) {
  var e = nle(t);
  e.normalFill = t.style.fill, e.normalStroke = t.style.stroke;
  var n = t.states.select || {};
  e.selectFill = n.style && n.style.fill || null, e.selectStroke = n.style && n.style.stroke || null;
}
var qp = jl.CMD, TZe = [[], [], []], mG = Math.sqrt, PZe = Math.atan2;
function fle(t, e) {
  if (e) {
    var n = t.data, r = t.len(), i, a, o, s, l, u, c = qp.M, f = qp.C, d = qp.L, h = qp.R, p = qp.A, v = qp.Q;
    for (o = 0, s = 0; o < r; ) {
      switch (i = n[o++], s = o, a = 0, i) {
        case c:
          a = 1;
          break;
        case d:
          a = 1;
          break;
        case f:
          a = 3;
          break;
        case v:
          a = 2;
          break;
        case p:
          var g = e[4], m = e[5], y = mG(e[0] * e[0] + e[1] * e[1]), _ = mG(e[2] * e[2] + e[3] * e[3]), O = PZe(-e[1] / _, e[0] / y);
          n[o] *= y, n[o++] += g, n[o] *= _, n[o++] += m, n[o++] *= y, n[o++] *= _, n[o++] += O, n[o++] += O, o += 2, s = o;
          break;
        case h:
          u[0] = n[o++], u[1] = n[o++], oi(u, u, e), n[s++] = u[0], n[s++] = u[1], u[0] += n[o++], u[1] += n[o++], oi(u, u, e), n[s++] = u[0], n[s++] = u[1];
      }
      for (l = 0; l < a; l++) {
        var S = TZe[l];
        S[0] = n[o++], S[1] = n[o++], oi(S, S, e), n[s++] = S[0], n[s++] = S[1];
      }
    }
    t.increaseVersion();
  }
}
var oM = Math.sqrt, vS = Math.sin, gS = Math.cos, M0 = Math.PI;
function yG(t) {
  return Math.sqrt(t[0] * t[0] + t[1] * t[1]);
}
function Ik(t, e) {
  return (t[0] * e[0] + t[1] * e[1]) / (yG(t) * yG(e));
}
function bG(t, e) {
  return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(Ik(t, e));
}
function _G(t, e, n, r, i, a, o, s, l, u, c) {
  var f = l * (M0 / 180), d = gS(f) * (t - n) / 2 + vS(f) * (e - r) / 2, h = -1 * vS(f) * (t - n) / 2 + gS(f) * (e - r) / 2, p = d * d / (o * o) + h * h / (s * s);
  p > 1 && (o *= oM(p), s *= oM(p));
  var v = (i === a ? -1 : 1) * oM((o * o * (s * s) - o * o * (h * h) - s * s * (d * d)) / (o * o * (h * h) + s * s * (d * d))) || 0, g = v * o * h / s, m = v * -s * d / o, y = (t + n) / 2 + gS(f) * g - vS(f) * m, _ = (e + r) / 2 + vS(f) * g + gS(f) * m, O = bG([1, 0], [(d - g) / o, (h - m) / s]), S = [(d - g) / o, (h - m) / s], x = [(-1 * d - g) / o, (-1 * h - m) / s], C = bG(S, x);
  if (Ik(S, x) <= -1 && (C = M0), Ik(S, x) >= 1 && (C = 0), C < 0) {
    var P = Math.round(C / M0 * 1e6) / 1e6;
    C = M0 * 2 + P % 2 * M0;
  }
  c.addData(u, y, _, o, s, O, C, f, a);
}
var $Ze = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig, AZe = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
function EZe(t) {
  var e = new jl();
  if (!t)
    return e;
  var n = 0, r = 0, i = n, a = r, o, s = jl.CMD, l = t.match($Ze);
  if (!l)
    return e;
  for (var u = 0; u < l.length; u++) {
    for (var c = l[u], f = c.charAt(0), d = void 0, h = c.match(AZe) || [], p = h.length, v = 0; v < p; v++)
      h[v] = parseFloat(h[v]);
    for (var g = 0; g < p; ) {
      var m = void 0, y = void 0, _ = void 0, O = void 0, S = void 0, x = void 0, C = void 0, P = n, $ = r, T = void 0, E = void 0;
      switch (f) {
        case "l":
          n += h[g++], r += h[g++], d = s.L, e.addData(d, n, r);
          break;
        case "L":
          n = h[g++], r = h[g++], d = s.L, e.addData(d, n, r);
          break;
        case "m":
          n += h[g++], r += h[g++], d = s.M, e.addData(d, n, r), i = n, a = r, f = "l";
          break;
        case "M":
          n = h[g++], r = h[g++], d = s.M, e.addData(d, n, r), i = n, a = r, f = "L";
          break;
        case "h":
          n += h[g++], d = s.L, e.addData(d, n, r);
          break;
        case "H":
          n = h[g++], d = s.L, e.addData(d, n, r);
          break;
        case "v":
          r += h[g++], d = s.L, e.addData(d, n, r);
          break;
        case "V":
          r = h[g++], d = s.L, e.addData(d, n, r);
          break;
        case "C":
          d = s.C, e.addData(d, h[g++], h[g++], h[g++], h[g++], h[g++], h[g++]), n = h[g - 2], r = h[g - 1];
          break;
        case "c":
          d = s.C, e.addData(d, h[g++] + n, h[g++] + r, h[g++] + n, h[g++] + r, h[g++] + n, h[g++] + r), n += h[g - 2], r += h[g - 1];
          break;
        case "S":
          m = n, y = r, T = e.len(), E = e.data, o === s.C && (m += n - E[T - 4], y += r - E[T - 3]), d = s.C, P = h[g++], $ = h[g++], n = h[g++], r = h[g++], e.addData(d, m, y, P, $, n, r);
          break;
        case "s":
          m = n, y = r, T = e.len(), E = e.data, o === s.C && (m += n - E[T - 4], y += r - E[T - 3]), d = s.C, P = n + h[g++], $ = r + h[g++], n += h[g++], r += h[g++], e.addData(d, m, y, P, $, n, r);
          break;
        case "Q":
          P = h[g++], $ = h[g++], n = h[g++], r = h[g++], d = s.Q, e.addData(d, P, $, n, r);
          break;
        case "q":
          P = h[g++] + n, $ = h[g++] + r, n += h[g++], r += h[g++], d = s.Q, e.addData(d, P, $, n, r);
          break;
        case "T":
          m = n, y = r, T = e.len(), E = e.data, o === s.Q && (m += n - E[T - 4], y += r - E[T - 3]), n = h[g++], r = h[g++], d = s.Q, e.addData(d, m, y, n, r);
          break;
        case "t":
          m = n, y = r, T = e.len(), E = e.data, o === s.Q && (m += n - E[T - 4], y += r - E[T - 3]), n += h[g++], r += h[g++], d = s.Q, e.addData(d, m, y, n, r);
          break;
        case "A":
          _ = h[g++], O = h[g++], S = h[g++], x = h[g++], C = h[g++], P = n, $ = r, n = h[g++], r = h[g++], d = s.A, _G(P, $, n, r, x, C, _, O, S, d, e);
          break;
        case "a":
          _ = h[g++], O = h[g++], S = h[g++], x = h[g++], C = h[g++], P = n, $ = r, n += h[g++], r += h[g++], d = s.A, _G(P, $, n, r, x, C, _, O, S, d, e);
          break;
      }
    }
    (f === "z" || f === "Z") && (d = s.Z, e.addData(d), n = i, r = a), o = d;
  }
  return e.toStatic(), e;
}
var dle = function(t) {
  le(e, t);
  function e() {
    return t !== null && t.apply(this, arguments) || this;
  }
  return e.prototype.applyTransform = function(n) {
  }, e;
}(Dt);
function hle(t) {
  return t.setData != null;
}
function ple(t, e) {
  var n = EZe(t), r = _e({}, e);
  return r.buildPath = function(i) {
    if (hle(i)) {
      i.setData(n.data);
      var a = i.getContext();
      a && i.rebuildPath(a, 1);
    } else {
      var a = i;
      n.rebuildPath(a, 1);
    }
  }, r.applyTransform = function(i) {
    fle(n, i), this.dirtyShape();
  }, r;
}
function vle(t, e) {
  return new dle(ple(t, e));
}
function MZe(t, e) {
  var n = ple(t, e), r = function(i) {
    le(a, i);
    function a(o) {
      var s = i.call(this, o) || this;
      return s.applyTransform = n.applyTransform, s.buildPath = n.buildPath, s;
    }
    return a;
  }(dle);
  return r;
}
function IZe(t, e) {
  for (var n = [], r = t.length, i = 0; i < r; i++) {
    var a = t[i];
    n.push(a.getUpdatedPathProxy(!0));
  }
  var o = new Dt(e);
  return o.createPathProxy(), o.buildPath = function(s) {
    if (hle(s)) {
      s.appendPath(n);
      var l = s.getContext();
      l && s.rebuildPath(l, 1);
    }
  }, o;
}
function z5(t, e) {
  e = e || {};
  var n = new Dt();
  return t.shape && n.setShape(t.shape), n.setStyle(t.style), e.bakeTransform ? fle(n.path, t.getComputedTransform()) : e.toLocal ? n.setLocalTransform(t.getComputedTransform()) : n.copyTransform(t), n.buildPath = t.buildPath, n.applyTransform = n.applyTransform, n.z = t.z, n.z2 = t.z2, n.zlevel = t.zlevel, n;
}
var DZe = /* @__PURE__ */ function() {
  function t() {
    this.cx = 0, this.cy = 0, this.r = 0;
  }
  return t;
}(), gle = function(t) {
  le(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new DZe();
  }, e.prototype.buildPath = function(n, r) {
    n.moveTo(r.cx + r.r, r.cy), n.arc(r.cx, r.cy, r.r, 0, Math.PI * 2);
  }, e;
}(Dt);
gle.prototype.type = "circle";
const ic = gle;
var RZe = /* @__PURE__ */ function() {
  function t() {
    this.cx = 0, this.cy = 0, this.rx = 0, this.ry = 0;
  }
  return t;
}(), mle = function(t) {
  le(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new RZe();
  }, e.prototype.buildPath = function(n, r) {
    var i = 0.5522848, a = r.cx, o = r.cy, s = r.rx, l = r.ry, u = s * i, c = l * i;
    n.moveTo(a - s, o), n.bezierCurveTo(a - s, o - c, a - u, o - l, a, o - l), n.bezierCurveTo(a + u, o - l, a + s, o - c, a + s, o), n.bezierCurveTo(a + s, o + c, a + u, o + l, a, o + l), n.bezierCurveTo(a - u, o + l, a - s, o + c, a - s, o), n.closePath();
  }, e;
}(Dt);
mle.prototype.type = "ellipse";
const OP = mle;
var yle = Math.PI, sM = yle * 2, Od = Math.sin, Kp = Math.cos, kZe = Math.acos, Di = Math.atan2, OG = Math.abs, ib = Math.sqrt, my = Math.max, cl = Math.min, ws = 1e-4;
function LZe(t, e, n, r, i, a, o, s) {
  var l = n - t, u = r - e, c = o - i, f = s - a, d = f * l - c * u;
  if (!(d * d < ws))
    return d = (c * (e - a) - f * (t - i)) / d, [t + d * l, e + d * u];
}
function mS(t, e, n, r, i, a, o) {
  var s = t - n, l = e - r, u = (o ? a : -a) / ib(s * s + l * l), c = u * l, f = -u * s, d = t + c, h = e + f, p = n + c, v = r + f, g = (d + p) / 2, m = (h + v) / 2, y = p - d, _ = v - h, O = y * y + _ * _, S = i - a, x = d * v - p * h, C = (_ < 0 ? -1 : 1) * ib(my(0, S * S * O - x * x)), P = (x * _ - y * C) / O, $ = (-x * y - _ * C) / O, T = (x * _ + y * C) / O, E = (-x * y + _ * C) / O, M = P - g, R = $ - m, N = T - g, I = E - m;
  return M * M + R * R > N * N + I * I && (P = T, $ = E), {
    cx: P,
    cy: $,
    x0: -c,
    y0: -f,
    x1: P * (i / S - 1),
    y1: $ * (i / S - 1)
  };
}
function NZe(t) {
  var e;
  if (Se(t)) {
    var n = t.length;
    if (!n)
      return t;
    n === 1 ? e = [t[0], t[0], 0, 0] : n === 2 ? e = [t[0], t[0], t[1], t[1]] : n === 3 ? e = t.concat(t[2]) : e = t;
  } else
    e = [t, t, t, t];
  return e;
}
function BZe(t, e) {
  var n, r = my(e.r, 0), i = my(e.r0 || 0, 0), a = r > 0, o = i > 0;
  if (!(!a && !o)) {
    if (a || (r = i, i = 0), i > r) {
      var s = r;
      r = i, i = s;
    }
    var l = e.startAngle, u = e.endAngle;
    if (!(isNaN(l) || isNaN(u))) {
      var c = e.cx, f = e.cy, d = !!e.clockwise, h = OG(u - l), p = h > sM && h % sM;
      if (p > ws && (h = p), !(r > ws))
        t.moveTo(c, f);
      else if (h > sM - ws)
        t.moveTo(c + r * Kp(l), f + r * Od(l)), t.arc(c, f, r, l, u, !d), i > ws && (t.moveTo(c + i * Kp(u), f + i * Od(u)), t.arc(c, f, i, u, l, d));
      else {
        var v = void 0, g = void 0, m = void 0, y = void 0, _ = void 0, O = void 0, S = void 0, x = void 0, C = void 0, P = void 0, $ = void 0, T = void 0, E = void 0, M = void 0, R = void 0, N = void 0, I = r * Kp(l), B = r * Od(l), Q = i * Kp(u), W = i * Od(u), H = h > ws;
        if (H) {
          var U = e.cornerRadius;
          U && (n = NZe(U), v = n[0], g = n[1], m = n[2], y = n[3]);
          var j = OG(r - i) / 2;
          if (_ = cl(j, m), O = cl(j, y), S = cl(j, v), x = cl(j, g), $ = C = my(_, O), T = P = my(S, x), (C > ws || P > ws) && (E = r * Kp(u), M = r * Od(u), R = i * Kp(l), N = i * Od(l), h < yle)) {
            var Y = LZe(I, B, R, N, E, M, Q, W);
            if (Y) {
              var ne = I - Y[0], fe = B - Y[1], ue = E - Y[0], ye = M - Y[1], se = 1 / Od(kZe((ne * ue + fe * ye) / (ib(ne * ne + fe * fe) * ib(ue * ue + ye * ye))) / 2), he = ib(Y[0] * Y[0] + Y[1] * Y[1]);
              $ = cl(C, (r - he) / (se + 1)), T = cl(P, (i - he) / (se - 1));
            }
          }
        }
        if (!H)
          t.moveTo(c + I, f + B);
        else if ($ > ws) {
          var re = cl(m, $), q = cl(y, $), K = mS(R, N, I, B, r, re, d), de = mS(E, M, Q, W, r, q, d);
          t.moveTo(c + K.cx + K.x0, f + K.cy + K.y0), $ < C && re === q ? t.arc(c + K.cx, f + K.cy, $, Di(K.y0, K.x0), Di(de.y0, de.x0), !d) : (re > 0 && t.arc(c + K.cx, f + K.cy, re, Di(K.y0, K.x0), Di(K.y1, K.x1), !d), t.arc(c, f, r, Di(K.cy + K.y1, K.cx + K.x1), Di(de.cy + de.y1, de.cx + de.x1), !d), q > 0 && t.arc(c + de.cx, f + de.cy, q, Di(de.y1, de.x1), Di(de.y0, de.x0), !d));
        } else
          t.moveTo(c + I, f + B), t.arc(c, f, r, l, u, !d);
        if (!(i > ws) || !H)
          t.lineTo(c + Q, f + W);
        else if (T > ws) {
          var re = cl(v, T), q = cl(g, T), K = mS(Q, W, E, M, i, -q, d), de = mS(I, B, R, N, i, -re, d);
          t.lineTo(c + K.cx + K.x0, f + K.cy + K.y0), T < P && re === q ? t.arc(c + K.cx, f + K.cy, T, Di(K.y0, K.x0), Di(de.y0, de.x0), !d) : (q > 0 && t.arc(c + K.cx, f + K.cy, q, Di(K.y0, K.x0), Di(K.y1, K.x1), !d), t.arc(c, f, i, Di(K.cy + K.y1, K.cx + K.x1), Di(de.cy + de.y1, de.cx + de.x1), d), re > 0 && t.arc(c + de.cx, f + de.cy, re, Di(de.y1, de.x1), Di(de.y0, de.x0), !d));
        } else
          t.lineTo(c + Q, f + W), t.arc(c, f, i, u, l, d);
      }
      t.closePath();
    }
  }
}
var zZe = /* @__PURE__ */ function() {
  function t() {
    this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0, this.cornerRadius = 0;
  }
  return t;
}(), ble = function(t) {
  le(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new zZe();
  }, e.prototype.buildPath = function(n, r) {
    BZe(n, r);
  }, e.prototype.isZeroArea = function() {
    return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0;
  }, e;
}(Dt);
ble.prototype.type = "sector";
const ha = ble;
var VZe = /* @__PURE__ */ function() {
  function t() {
    this.cx = 0, this.cy = 0, this.r = 0, this.r0 = 0;
  }
  return t;
}(), _le = function(t) {
  le(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new VZe();
  }, e.prototype.buildPath = function(n, r) {
    var i = r.cx, a = r.cy, o = Math.PI * 2;
    n.moveTo(i + r.r, a), n.arc(i, a, r.r, 0, o, !1), n.moveTo(i + r.r0, a), n.arc(i, a, r.r0, 0, o, !0);
  }, e;
}(Dt);
_le.prototype.type = "ring";
const c1 = _le;
function FZe(t, e, n, r) {
  var i = [], a = [], o = [], s = [], l, u, c, f;
  if (r) {
    c = [1 / 0, 1 / 0], f = [-1 / 0, -1 / 0];
    for (var d = 0, h = t.length; d < h; d++)
      Cu(c, c, t[d]), Tu(f, f, t[d]);
    Cu(c, c, r[0]), Tu(f, f, r[1]);
  }
  for (var d = 0, h = t.length; d < h; d++) {
    var p = t[d];
    if (n)
      l = t[d ? d - 1 : h - 1], u = t[(d + 1) % h];
    else if (d === 0 || d === h - 1) {
      i.push(kl(t[d]));
      continue;
    } else
      l = t[d - 1], u = t[d + 1];
    Wc(a, u, l), Xy(a, a, e);
    var v = OC(p, l), g = OC(p, u), m = v + g;
    m !== 0 && (v /= m, g /= m), Xy(o, a, -v), Xy(s, a, g);
    var y = nk([], p, o), _ = nk([], p, s);
    r && (Tu(y, y, c), Cu(y, y, f), Tu(_, _, c), Cu(_, _, f)), i.push(y), i.push(_);
  }
  return n && i.push(i.shift()), i;
}
function Ole(t, e, n) {
  var r = e.smooth, i = e.points;
  if (i && i.length >= 2) {
    if (r) {
      var a = FZe(i, r, n, e.smoothConstraint);
      t.moveTo(i[0][0], i[0][1]);
      for (var o = i.length, s = 0; s < (n ? o : o - 1); s++) {
        var l = a[s * 2], u = a[s * 2 + 1], c = i[(s + 1) % o];
        t.bezierCurveTo(l[0], l[1], u[0], u[1], c[0], c[1]);
      }
    } else {
      t.moveTo(i[0][0], i[0][1]);
      for (var s = 1, f = i.length; s < f; s++)
        t.lineTo(i[s][0], i[s][1]);
    }
    n && t.closePath();
  }
}
var WZe = /* @__PURE__ */ function() {
  function t() {
    this.points = null, this.smooth = 0, this.smoothConstraint = null;
  }
  return t;
}(), Sle = function(t) {
  le(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new WZe();
  }, e.prototype.buildPath = function(n, r) {
    Ole(n, r, !0);
  }, e;
}(Dt);
Sle.prototype.type = "polygon";
const pa = Sle;
var QZe = /* @__PURE__ */ function() {
  function t() {
    this.points = null, this.percent = 1, this.smooth = 0, this.smoothConstraint = null;
  }
  return t;
}(), xle = function(t) {
  le(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultStyle = function() {
    return {
      stroke: "#000",
      fill: null
    };
  }, e.prototype.getDefaultShape = function() {
    return new QZe();
  }, e.prototype.buildPath = function(n, r) {
    Ole(n, r, !1);
  }, e;
}(Dt);
xle.prototype.type = "polyline";
const va = xle;
var HZe = {}, GZe = /* @__PURE__ */ function() {
  function t() {
    this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
  }
  return t;
}(), wle = function(t) {
  le(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultStyle = function() {
    return {
      stroke: "#000",
      fill: null
    };
  }, e.prototype.getDefaultShape = function() {
    return new GZe();
  }, e.prototype.buildPath = function(n, r) {
    var i, a, o, s;
    if (this.subPixelOptimize) {
      var l = Yse(HZe, r, this.style);
      i = l.x1, a = l.y1, o = l.x2, s = l.y2;
    } else
      i = r.x1, a = r.y1, o = r.x2, s = r.y2;
    var u = r.percent;
    u !== 0 && (n.moveTo(i, a), u < 1 && (o = i * (1 - u) + o * u, s = a * (1 - u) + s * u), n.lineTo(o, s));
  }, e.prototype.pointAt = function(n) {
    var r = this.shape;
    return [
      r.x1 * (1 - n) + r.x2 * n,
      r.y1 * (1 - n) + r.y2 * n
    ];
  }, e;
}(Dt);
wle.prototype.type = "line";
const Xr = wle;
var _a = [], jZe = /* @__PURE__ */ function() {
  function t() {
    this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.percent = 1;
  }
  return t;
}();
function SG(t, e, n) {
  var r = t.cpx2, i = t.cpy2;
  return r != null || i != null ? [
    (n ? T9 : jr)(t.x1, t.cpx1, t.cpx2, t.x2, e),
    (n ? T9 : jr)(t.y1, t.cpy1, t.cpy2, t.y2, e)
  ] : [
    (n ? sk : ii)(t.x1, t.cpx1, t.x2, e),
    (n ? sk : ii)(t.y1, t.cpy1, t.y2, e)
  ];
}
var Cle = function(t) {
  le(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultStyle = function() {
    return {
      stroke: "#000",
      fill: null
    };
  }, e.prototype.getDefaultShape = function() {
    return new jZe();
  }, e.prototype.buildPath = function(n, r) {
    var i = r.x1, a = r.y1, o = r.x2, s = r.y2, l = r.cpx1, u = r.cpy1, c = r.cpx2, f = r.cpy2, d = r.percent;
    d !== 0 && (n.moveTo(i, a), c == null || f == null ? (d < 1 && (Qb(i, l, o, d, _a), l = _a[1], o = _a[2], Qb(a, u, s, d, _a), u = _a[1], s = _a[2]), n.quadraticCurveTo(l, u, o, s)) : (d < 1 && (yf(i, l, c, o, d, _a), l = _a[1], c = _a[2], o = _a[3], yf(a, u, f, s, d, _a), u = _a[1], f = _a[2], s = _a[3]), n.bezierCurveTo(l, u, c, f, o, s)));
  }, e.prototype.pointAt = function(n) {
    return SG(this.shape, n, !1);
  }, e.prototype.tangentAt = function(n) {
    var r = SG(this.shape, n, !0);
    return fp(r, r);
  }, e;
}(Dt);
Cle.prototype.type = "bezier-curve";
const f1 = Cle;
var ZZe = /* @__PURE__ */ function() {
  function t() {
    this.cx = 0, this.cy = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
  }
  return t;
}(), Tle = function(t) {
  le(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultStyle = function() {
    return {
      stroke: "#000",
      fill: null
    };
  }, e.prototype.getDefaultShape = function() {
    return new ZZe();
  }, e.prototype.buildPath = function(n, r) {
    var i = r.cx, a = r.cy, o = Math.max(r.r, 0), s = r.startAngle, l = r.endAngle, u = r.clockwise, c = Math.cos(s), f = Math.sin(s);
    n.moveTo(c * o + i, f * o + a), n.arc(i, a, o, s, l, !u);
  }, e;
}(Dt);
Tle.prototype.type = "arc";
const SP = Tle;
var UZe = function(t) {
  le(e, t);
  function e() {
    var n = t !== null && t.apply(this, arguments) || this;
    return n.type = "compound", n;
  }
  return e.prototype._updatePathDirty = function() {
    for (var n = this.shape.paths, r = this.shapeChanged(), i = 0; i < n.length; i++)
      r = r || n[i].shapeChanged();
    r && this.dirtyShape();
  }, e.prototype.beforeBrush = function() {
    this._updatePathDirty();
    for (var n = this.shape.paths || [], r = this.getGlobalScale(), i = 0; i < n.length; i++)
      n[i].path || n[i].createPathProxy(), n[i].path.setScale(r[0], r[1], n[i].segmentIgnoreThreshold);
  }, e.prototype.buildPath = function(n, r) {
    for (var i = r.paths || [], a = 0; a < i.length; a++)
      i[a].buildPath(n, i[a].shape, !0);
  }, e.prototype.afterBrush = function() {
    for (var n = this.shape.paths || [], r = 0; r < n.length; r++)
      n[r].pathUpdated();
  }, e.prototype.getBoundingRect = function() {
    return this._updatePathDirty.call(this), Dt.prototype.getBoundingRect.call(this);
  }, e;
}(Dt);
const xP = UZe;
var Ple = function() {
  function t(e) {
    this.colorStops = e || [];
  }
  return t.prototype.addColorStop = function(e, n) {
    this.colorStops.push({
      offset: e,
      color: n
    });
  }, t;
}(), XZe = function(t) {
  le(e, t);
  function e(n, r, i, a, o, s) {
    var l = t.call(this, o) || this;
    return l.x = n ?? 0, l.y = r ?? 0, l.x2 = i ?? 1, l.y2 = a ?? 0, l.type = "linear", l.global = s || !1, l;
  }
  return e;
}(Ple);
const _m = XZe;
var YZe = function(t) {
  le(e, t);
  function e(n, r, i, a, o) {
    var s = t.call(this, a) || this;
    return s.x = n ?? 0.5, s.y = r ?? 0.5, s.r = i ?? 0.5, s.type = "radial", s.global = o || !1, s;
  }
  return e;
}(Ple);
const V5 = YZe;
var Sd = [0, 0], xd = [0, 0], yS = new yt(), bS = new yt(), qZe = function() {
  function t(e, n) {
    this._corners = [], this._axes = [], this._origin = [0, 0];
    for (var r = 0; r < 4; r++)
      this._corners[r] = new yt();
    for (var r = 0; r < 2; r++)
      this._axes[r] = new yt();
    e && this.fromBoundingRect(e, n);
  }
  return t.prototype.fromBoundingRect = function(e, n) {
    var r = this._corners, i = this._axes, a = e.x, o = e.y, s = a + e.width, l = o + e.height;
    if (r[0].set(a, o), r[1].set(s, o), r[2].set(s, l), r[3].set(a, l), n)
      for (var u = 0; u < 4; u++)
        r[u].transform(n);
    yt.sub(i[0], r[1], r[0]), yt.sub(i[1], r[3], r[0]), i[0].normalize(), i[1].normalize();
    for (var u = 0; u < 2; u++)
      this._origin[u] = i[u].dot(r[0]);
  }, t.prototype.intersect = function(e, n) {
    var r = !0, i = !n;
    return yS.set(1 / 0, 1 / 0), bS.set(0, 0), !this._intersectCheckOneSide(this, e, yS, bS, i, 1) && (r = !1, i) || !this._intersectCheckOneSide(e, this, yS, bS, i, -1) && (r = !1, i) || i || yt.copy(n, r ? yS : bS), r;
  }, t.prototype._intersectCheckOneSide = function(e, n, r, i, a, o) {
    for (var s = !0, l = 0; l < 2; l++) {
      var u = this._axes[l];
      if (this._getProjMinMaxOnAxis(l, e._corners, Sd), this._getProjMinMaxOnAxis(l, n._corners, xd), Sd[1] < xd[0] || Sd[0] > xd[1]) {
        if (s = !1, a)
          return s;
        var c = Math.abs(xd[0] - Sd[1]), f = Math.abs(Sd[0] - xd[1]);
        Math.min(c, f) > i.len() && (c < f ? yt.scale(i, u, -c * o) : yt.scale(i, u, f * o));
      } else if (r) {
        var c = Math.abs(xd[0] - Sd[1]), f = Math.abs(Sd[0] - xd[1]);
        Math.min(c, f) < r.len() && (c < f ? yt.scale(r, u, c * o) : yt.scale(r, u, -f * o));
      }
    }
    return s;
  }, t.prototype._getProjMinMaxOnAxis = function(e, n, r) {
    for (var i = this._axes[e], a = this._origin, o = n[0].dot(i) + a[e], s = o, l = o, u = 1; u < n.length; u++) {
      var c = n[u].dot(i) + a[e];
      s = Math.min(c, s), l = Math.max(c, l);
    }
    r[0] = s, r[1] = l;
  }, t;
}();
const DC = qZe;
var KZe = [], JZe = function(t) {
  le(e, t);
  function e() {
    var n = t !== null && t.apply(this, arguments) || this;
    return n.notClear = !0, n.incremental = !0, n._displayables = [], n._temporaryDisplayables = [], n._cursor = 0, n;
  }
  return e.prototype.traverse = function(n, r) {
    n.call(r, this);
  }, e.prototype.useStyle = function() {
    this.style = {};
  }, e.prototype.getCursor = function() {
    return this._cursor;
  }, e.prototype.innerAfterBrush = function() {
    this._cursor = this._displayables.length;
  }, e.prototype.clearDisplaybles = function() {
    this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.markRedraw(), this.notClear = !1;
  }, e.prototype.clearTemporalDisplayables = function() {
    this._temporaryDisplayables = [];
  }, e.prototype.addDisplayable = function(n, r) {
    r ? this._temporaryDisplayables.push(n) : this._displayables.push(n), this.markRedraw();
  }, e.prototype.addDisplayables = function(n, r) {
    r = r || !1;
    for (var i = 0; i < n.length; i++)
      this.addDisplayable(n[i], r);
  }, e.prototype.getDisplayables = function() {
    return this._displayables;
  }, e.prototype.getTemporalDisplayables = function() {
    return this._temporaryDisplayables;
  }, e.prototype.eachPendingDisplayable = function(n) {
    for (var r = this._cursor; r < this._displayables.length; r++)
      n && n(this._displayables[r]);
    for (var r = 0; r < this._temporaryDisplayables.length; r++)
      n && n(this._temporaryDisplayables[r]);
  }, e.prototype.update = function() {
    this.updateTransform();
    for (var n = this._cursor; n < this._displayables.length; n++) {
      var r = this._displayables[n];
      r.parent = this, r.update(), r.parent = null;
    }
    for (var n = 0; n < this._temporaryDisplayables.length; n++) {
      var r = this._temporaryDisplayables[n];
      r.parent = this, r.update(), r.parent = null;
    }
  }, e.prototype.getBoundingRect = function() {
    if (!this._rect) {
      for (var n = new bt(1 / 0, 1 / 0, -1 / 0, -1 / 0), r = 0; r < this._displayables.length; r++) {
        var i = this._displayables[r], a = i.getBoundingRect().clone();
        i.needLocalTransform() && a.applyTransform(i.getLocalTransform(KZe)), n.union(a);
      }
      this._rect = n;
    }
    return this._rect;
  }, e.prototype.contain = function(n, r) {
    var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
    if (a.contain(i[0], i[1]))
      for (var o = 0; o < this._displayables.length; o++) {
        var s = this._displayables[o];
        if (s.contain(n, r))
          return !0;
      }
    return !1;
  }, e;
}(ls);
const $le = JZe;
var Ale = Ut();
function Om(t, e, n, r, i) {
  var a;
  if (e && e.ecModel) {
    var o = e.ecModel.getUpdatePayload();
    a = o && o.animation;
  }
  var s = e && e.isAnimationEnabled(), l = t === "update";
  if (s) {
    var u = void 0, c = void 0, f = void 0;
    r ? (u = dt(r.duration, 200), c = dt(r.easing, "cubicOut"), f = 0) : (u = e.getShallow(l ? "animationDurationUpdate" : "animationDuration"), c = e.getShallow(l ? "animationEasingUpdate" : "animationEasing"), f = e.getShallow(l ? "animationDelayUpdate" : "animationDelay")), a && (a.duration != null && (u = a.duration), a.easing != null && (c = a.easing), a.delay != null && (f = a.delay)), qe(f) && (f = f(n, i)), qe(u) && (u = u(n));
    var d = {
      duration: u || 0,
      delay: f,
      easing: c
    };
    return d;
  } else
    return null;
}
function F5(t, e, n, r, i, a, o) {
  var s = !1, l;
  qe(i) ? (o = a, a = i, i = null) : nt(i) && (a = i.cb, o = i.during, s = i.isFrom, l = i.removeOpt, i = i.dataIndex);
  var u = t === "leave";
  u || e.stopAnimation("leave");
  var c = Om(t, r, i, u ? l || {} : null, r && r.getAnimationDelayParams ? r.getAnimationDelayParams(e, i) : null);
  if (c && c.duration > 0) {
    var f = c.duration, d = c.delay, h = c.easing, p = {
      duration: f,
      delay: d || 0,
      easing: h,
      done: a,
      force: !!a || !!o,
      // Set to final state in update/init animation.
      // So the post processing based on the path shape can be done correctly.
      setToFinal: !u,
      scope: t,
      during: o
    };
    s ? e.animateFrom(n, p) : e.animateTo(n, p);
  } else
    e.stopAnimation(), !s && e.attr(n), o && o(1), a && a();
}
function tn(t, e, n, r, i, a) {
  F5("update", t, e, n, r, i, a);
}
function Vn(t, e, n, r, i, a) {
  F5("enter", t, e, n, r, i, a);
}
function qv(t) {
  if (!t.__zr)
    return !0;
  for (var e = 0; e < t.animators.length; e++) {
    var n = t.animators[e];
    if (n.scope === "leave")
      return !0;
  }
  return !1;
}
function _f(t, e, n, r, i, a) {
  qv(t) || F5("leave", t, e, n, r, i, a);
}
function xG(t, e, n, r) {
  t.removeTextContent(), t.removeTextGuideLine(), _f(t, {
    style: {
      opacity: 0
    }
  }, e, n, r);
}
function Xb(t, e, n) {
  function r() {
    t.parent && t.parent.remove(t);
  }
  t.isGroup ? t.traverse(function(i) {
    i.isGroup || xG(i, e, n, r);
  }) : xG(t, e, n, r);
}
function Zs(t) {
  Ale(t).oldStyle = t.style;
}
function eUe(t) {
  return Ale(t).oldStyle;
}
var RC = Math.max, kC = Math.min, Dk = {};
function Ele(t) {
  return Dt.extend(t);
}
var tUe = MZe;
function Mle(t, e) {
  return tUe(t, e);
}
function ds(t, e) {
  Dk[t] = e;
}
function wP(t) {
  if (Dk.hasOwnProperty(t))
    return Dk[t];
}
function d1(t, e, n, r) {
  var i = vle(t, e);
  return n && (r === "center" && (n = Ile(n, i.getBoundingRect())), Q5(i, n)), i;
}
function W5(t, e, n) {
  var r = new ci({
    style: {
      image: t,
      x: e.x,
      y: e.y,
      width: e.width,
      height: e.height
    },
    onload: function(i) {
      if (n === "center") {
        var a = {
          width: i.width,
          height: i.height
        };
        r.setStyle(Ile(e, a));
      }
    }
  });
  return r;
}
function Ile(t, e) {
  var n = e.width / e.height, r = t.height * n, i;
  r <= t.width ? i = t.height : (r = t.width, i = r / n);
  var a = t.x + t.width / 2, o = t.y + t.height / 2;
  return {
    x: a - r / 2,
    y: o - i / 2,
    width: r,
    height: i
  };
}
var no = IZe;
function Q5(t, e) {
  if (t.applyTransform) {
    var n = t.getBoundingRect(), r = n.calculateTransform(e);
    t.applyTransform(r);
  }
}
function Qg(t, e) {
  return Yse(t, t, {
    lineWidth: e
  }), t;
}
function nUe(t) {
  return qse(t.shape, t.shape, t.style), t;
}
var dw = ih;
function of(t, e) {
  for (var n = i1([]); t && t !== e; )
    Ll(n, t.getLocalTransform(), n), t = t.parent;
  return n;
}
function zs(t, e, n) {
  return e && !Pi(e) && (e = Pu.getLocalTransform(e)), n && (e = dp([], e)), oi([], t, e);
}
function CP(t, e, n) {
  var r = e[4] === 0 || e[5] === 0 || e[0] === 0 ? 1 : Math.abs(2 * e[4] / e[0]), i = e[4] === 0 || e[5] === 0 || e[2] === 0 ? 1 : Math.abs(2 * e[4] / e[2]), a = [t === "left" ? -r : t === "right" ? r : 0, t === "top" ? -i : t === "bottom" ? i : 0];
  return a = zs(a, e, n), Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top";
}
function wG(t) {
  return !t.isGroup;
}
function rUe(t) {
  return t.shape != null;
}
function h1(t, e, n) {
  if (!t || !e)
    return;
  function r(o) {
    var s = {};
    return o.traverse(function(l) {
      wG(l) && l.anid && (s[l.anid] = l);
    }), s;
  }
  function i(o) {
    var s = {
      x: o.x,
      y: o.y,
      rotation: o.rotation
    };
    return rUe(o) && (s.shape = _e({}, o.shape)), s;
  }
  var a = r(t);
  e.traverse(function(o) {
    if (wG(o) && o.anid) {
      var s = a[o.anid];
      if (s) {
        var l = i(o);
        o.attr(i(s)), tn(o, l, n, ft(o).dataIndex);
      }
    }
  });
}
function H5(t, e) {
  return Ce(t, function(n) {
    var r = n[0];
    r = RC(r, e.x), r = kC(r, e.x + e.width);
    var i = n[1];
    return i = RC(i, e.y), i = kC(i, e.y + e.height), [r, i];
  });
}
function Dle(t, e) {
  var n = RC(t.x, e.x), r = kC(t.x + t.width, e.x + e.width), i = RC(t.y, e.y), a = kC(t.y + t.height, e.y + e.height);
  if (r >= n && a >= i)
    return {
      x: n,
      y: i,
      width: r - n,
      height: a - i
    };
}
function Sm(t, e, n) {
  var r = _e({
    rectHover: !0
  }, e), i = r.style = {
    strokeNoScale: !0
  };
  if (n = n || {
    x: -1,
    y: -1,
    width: 2,
    height: 2
  }, t)
    return t.indexOf("image://") === 0 ? (i.image = t.slice(8), it(i, n), new ci(r)) : d1(t.replace("path://", ""), r, n, "center");
}
function yy(t, e, n, r, i) {
  for (var a = 0, o = i[i.length - 1]; a < i.length; a++) {
    var s = i[a];
    if (Rle(t, e, n, r, s[0], s[1], o[0], o[1]))
      return !0;
    o = s;
  }
}
function Rle(t, e, n, r, i, a, o, s) {
  var l = n - t, u = r - e, c = o - i, f = s - a, d = lM(c, f, l, u);
  if (iUe(d))
    return !1;
  var h = t - i, p = e - a, v = lM(h, p, l, u) / d;
  if (v < 0 || v > 1)
    return !1;
  var g = lM(h, p, c, f) / d;
  return !(g < 0 || g > 1);
}
function lM(t, e, n, r) {
  return t * r - n * e;
}
function iUe(t) {
  return t <= 1e-6 && t >= -1e-6;
}
function xm(t) {
  var e = t.itemTooltipOption, n = t.componentModel, r = t.itemName, i = Ve(e) ? {
    formatter: e
  } : e, a = n.mainType, o = n.componentIndex, s = {
    componentType: a,
    name: r,
    $vars: ["name"]
  };
  s[a + "Index"] = o;
  var l = t.formatterParamsExtra;
  l && F(kt(l), function(c) {
    Qe(s, c) || (s[c] = l[c], s.$vars.push(c));
  });
  var u = ft(t.el);
  u.componentMainType = a, u.componentIndex = o, u.tooltipConfig = {
    name: r,
    option: it({
      content: r,
      encodeHTMLContent: !0,
      formatterParams: s
    }, i)
  };
}
function CG(t, e) {
  var n;
  t.isGroup && (n = e(t)), n || t.traverse(e);
}
function Nf(t, e) {
  if (t)
    if (Se(t))
      for (var n = 0; n < t.length; n++)
        CG(t[n], e);
    else
      CG(t, e);
}
ds("circle", ic);
ds("ellipse", OP);
ds("sector", ha);
ds("ring", c1);
ds("polygon", pa);
ds("polyline", va);
ds("rect", Zt);
ds("line", Xr);
ds("bezierCurve", f1);
ds("arc", SP);
const hp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Arc: SP,
  BezierCurve: f1,
  BoundingRect: bt,
  Circle: ic,
  CompoundPath: xP,
  Ellipse: OP,
  Group: ct,
  Image: ci,
  IncrementalDisplayable: $le,
  Line: Xr,
  LinearGradient: _m,
  OrientedBoundingRect: DC,
  Path: Dt,
  Point: yt,
  Polygon: pa,
  Polyline: va,
  RadialGradient: V5,
  Rect: Zt,
  Ring: c1,
  Sector: ha,
  Text: jt,
  applyTransform: zs,
  clipPointsByRect: H5,
  clipRectByRect: Dle,
  createIcon: Sm,
  extendPath: Mle,
  extendShape: Ele,
  getShapeClass: wP,
  getTransform: of,
  groupTransition: h1,
  initProps: Vn,
  isElementRemoved: qv,
  lineLineIntersect: Rle,
  linePolygonIntersect: yy,
  makeImage: W5,
  makePath: d1,
  mergePath: no,
  registerShape: ds,
  removeElement: _f,
  removeElementWithFadeOut: Xb,
  resizePath: Q5,
  setTooltipConfig: xm,
  subPixelOptimize: dw,
  subPixelOptimizeLine: Qg,
  subPixelOptimizeRect: nUe,
  transformDirection: CP,
  traverseElements: Nf,
  updateProps: tn
}, Symbol.toStringTag, { value: "Module" }));
var TP = {};
function kle(t, e) {
  for (var n = 0; n < da.length; n++) {
    var r = da[n], i = e[r], a = t.ensureState(r);
    a.style = a.style || {}, a.style.text = i;
  }
  var o = t.currentStates.slice();
  t.clearStates(!0), t.setStyle({
    text: e.normal
  }), t.useStates(o, !0);
}
function Rk(t, e, n) {
  var r = t.labelFetcher, i = t.labelDataIndex, a = t.labelDimIndex, o = e.normal, s;
  r && (s = r.getFormattedLabel(i, "normal", null, a, o && o.get("formatter"), n != null ? {
    interpolatedValue: n
  } : null)), s == null && (s = qe(t.defaultText) ? t.defaultText(i, t, n) : t.defaultText);
  for (var l = {
    normal: s
  }, u = 0; u < da.length; u++) {
    var c = da[u], f = e[c];
    l[c] = dt(r ? r.getFormattedLabel(i, c, null, a, f && f.get("formatter")) : null, s);
  }
  return l;
}
function Ei(t, e, n, r) {
  n = n || TP;
  for (var i = t instanceof jt, a = !1, o = 0; o < Ub.length; o++) {
    var s = e[Ub[o]];
    if (s && s.getShallow("show")) {
      a = !0;
      break;
    }
  }
  var l = i ? t : t.getTextContent();
  if (a) {
    i || (l || (l = new jt(), t.setTextContent(l)), t.stateProxy && (l.stateProxy = t.stateProxy));
    var u = Rk(n, e), c = e.normal, f = !!c.getShallow("show"), d = Mn(c, r && r.normal, n, !1, !i);
    d.text = u.normal, i || t.setTextConfig(LC(c, n, !1));
    for (var o = 0; o < da.length; o++) {
      var h = da[o], s = e[h];
      if (s) {
        var p = l.ensureState(h), v = !!dt(s.getShallow("show"), f);
        if (v !== f && (p.ignore = !v), p.style = Mn(s, r && r[h], n, !0, !i), p.style.text = u[h], !i) {
          var g = t.ensureState(h);
          g.textConfig = LC(s, n, !0);
        }
      }
    }
    l.silent = !!c.getShallow("silent"), l.style.x != null && (d.x = l.style.x), l.style.y != null && (d.y = l.style.y), l.ignore = !f, l.useStyle(d), l.dirty(), n.enableTextSetter && (wm(l).setLabelText = function(m) {
      var y = Rk(n, e, m);
      kle(l, y);
    });
  } else l && (l.ignore = !0);
  t.dirty();
}
function ei(t, e) {
  e = e || "label";
  for (var n = {
    normal: t.getModel(e)
  }, r = 0; r < da.length; r++) {
    var i = da[r];
    n[i] = t.getModel([i, e]);
  }
  return n;
}
function Mn(t, e, n, r, i) {
  var a = {};
  return aUe(a, t, n, r, i), e && _e(a, e), a;
}
function LC(t, e, n) {
  e = e || {};
  var r = {}, i, a = t.getShallow("rotate"), o = dt(t.getShallow("distance"), n ? null : 5), s = t.getShallow("offset");
  return i = t.getShallow("position") || (n ? null : "inside"), i === "outside" && (i = e.defaultOutsidePosition || "top"), i != null && (r.position = i), s != null && (r.offset = s), a != null && (a *= Math.PI / 180, r.rotation = a), o != null && (r.distance = o), r.outsideFill = t.get("color") === "inherit" ? e.inheritColor || null : "auto", r;
}
function aUe(t, e, n, r, i) {
  n = n || TP;
  var a = e.ecModel, o = a && a.option.textStyle, s = oUe(e), l;
  if (s) {
    l = {};
    for (var u in s)
      if (s.hasOwnProperty(u)) {
        var c = e.getModel(["rich", u]);
        AG(l[u] = {}, c, o, n, r, i, !1, !0);
      }
  }
  l && (t.rich = l);
  var f = e.get("overflow");
  f && (t.overflow = f);
  var d = e.get("minMargin");
  d != null && (t.margin = d), AG(t, e, o, n, r, i, !0, !1);
}
function oUe(t) {
  for (var e; t && t !== t.ecModel; ) {
    var n = (t.option || TP).rich;
    if (n) {
      e = e || {};
      for (var r = kt(n), i = 0; i < r.length; i++) {
        var a = r[i];
        e[a] = 1;
      }
    }
    t = t.parentModel;
  }
  return e;
}
var TG = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], PG = ["align", "lineHeight", "width", "height", "tag", "verticalAlign", "ellipsis"], $G = ["padding", "borderWidth", "borderRadius", "borderDashOffset", "backgroundColor", "borderColor", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
function AG(t, e, n, r, i, a, o, s) {
  n = !i && n || TP;
  var l = r && r.inheritColor, u = e.getShallow("color"), c = e.getShallow("textBorderColor"), f = dt(e.getShallow("opacity"), n.opacity);
  (u === "inherit" || u === "auto") && (process.env.NODE_ENV !== "production" && u === "auto" && yr("color: 'auto'", "color: 'inherit'"), l ? u = l : u = null), (c === "inherit" || c === "auto") && (process.env.NODE_ENV !== "production" && c === "auto" && yr("color: 'auto'", "color: 'inherit'"), l ? c = l : c = null), a || (u = u || n.color, c = c || n.textBorderColor), u != null && (t.fill = u), c != null && (t.stroke = c);
  var d = dt(e.getShallow("textBorderWidth"), n.textBorderWidth);
  d != null && (t.lineWidth = d);
  var h = dt(e.getShallow("textBorderType"), n.textBorderType);
  h != null && (t.lineDash = h);
  var p = dt(e.getShallow("textBorderDashOffset"), n.textBorderDashOffset);
  p != null && (t.lineDashOffset = p), !i && f == null && !s && (f = r && r.defaultOpacity), f != null && (t.opacity = f), !i && !a && t.fill == null && r.inheritColor && (t.fill = r.inheritColor);
  for (var v = 0; v < TG.length; v++) {
    var g = TG[v], m = dt(e.getShallow(g), n[g]);
    m != null && (t[g] = m);
  }
  for (var v = 0; v < PG.length; v++) {
    var g = PG[v], m = e.getShallow(g);
    m != null && (t[g] = m);
  }
  if (t.verticalAlign == null) {
    var y = e.getShallow("baseline");
    y != null && (t.verticalAlign = y);
  }
  if (!o || !r.disableBox) {
    for (var v = 0; v < $G.length; v++) {
      var g = $G[v], m = e.getShallow(g);
      m != null && (t[g] = m);
    }
    var _ = e.getShallow("borderType");
    _ != null && (t.borderDash = _), (t.backgroundColor === "auto" || t.backgroundColor === "inherit") && l && (process.env.NODE_ENV !== "production" && t.backgroundColor === "auto" && yr("backgroundColor: 'auto'", "backgroundColor: 'inherit'"), t.backgroundColor = l), (t.borderColor === "auto" || t.borderColor === "inherit") && l && (process.env.NODE_ENV !== "production" && t.borderColor === "auto" && yr("borderColor: 'auto'", "borderColor: 'inherit'"), t.borderColor = l);
  }
}
function G5(t, e) {
  var n = e && e.getModel("textStyle");
  return Zo([
    // FIXME in node-canvas fontWeight is before fontStyle
    t.fontStyle || n && n.getShallow("fontStyle") || "",
    t.fontWeight || n && n.getShallow("fontWeight") || "",
    (t.fontSize || n && n.getShallow("fontSize") || 12) + "px",
    t.fontFamily || n && n.getShallow("fontFamily") || "sans-serif"
  ].join(" "));
}
var wm = Ut();
function Lle(t, e, n, r) {
  if (t) {
    var i = wm(t);
    i.prevValue = i.value, i.value = n;
    var a = e.normal;
    i.valueAnimation = a.get("valueAnimation"), i.valueAnimation && (i.precision = a.get("precision"), i.defaultInterpolatedText = r, i.statesModels = e);
  }
}
function Nle(t, e, n, r, i) {
  var a = wm(t);
  if (!a.valueAnimation || a.prevValue === a.value)
    return;
  var o = a.defaultInterpolatedText, s = dt(a.interpolatedValue, a.prevValue), l = a.value;
  function u(c) {
    var f = Vse(n, a.precision, s, l, c);
    a.interpolatedValue = c === 1 ? null : f;
    var d = Rk({
      labelDataIndex: e,
      labelFetcher: i,
      defaultText: o ? o(f) : f + ""
    }, a.statesModels, f);
    kle(t, d);
  }
  t.percent = 0, (a.prevValue == null ? Vn : tn)(t, {
    // percent is used to prevent animation from being aborted #15916
    percent: 1
  }, r, e, null, u);
}
var sUe = ["textStyle", "color"], uM = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "padding", "lineHeight", "rich", "width", "height", "overflow"], cM = new jt(), lUe = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getTextColor = function(e) {
      var n = this.ecModel;
      return this.getShallow("color") || (!e && n ? n.get(sUe) : null);
    }, t.prototype.getFont = function() {
      return G5({
        fontStyle: this.getShallow("fontStyle"),
        fontWeight: this.getShallow("fontWeight"),
        fontSize: this.getShallow("fontSize"),
        fontFamily: this.getShallow("fontFamily")
      }, this.ecModel);
    }, t.prototype.getTextRect = function(e) {
      for (var n = {
        text: e,
        verticalAlign: this.getShallow("verticalAlign") || this.getShallow("baseline")
      }, r = 0; r < uM.length; r++)
        n[uM[r]] = this.getShallow(uM[r]);
      return cM.useStyle(n), cM.update(), cM.getBoundingRect();
    }, t;
  }()
), Ble = [
  ["lineWidth", "width"],
  ["stroke", "color"],
  ["opacity"],
  ["shadowBlur"],
  ["shadowOffsetX"],
  ["shadowOffsetY"],
  ["shadowColor"],
  ["lineDash", "type"],
  ["lineDashOffset", "dashOffset"],
  ["lineCap", "cap"],
  ["lineJoin", "join"],
  ["miterLimit"]
  // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  // So do not transfer decal directly.
], uUe = jh(Ble), cUe = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getLineStyle = function(e) {
      return uUe(this, e);
    }, t;
  }()
), zle = [
  ["fill", "color"],
  ["stroke", "borderColor"],
  ["lineWidth", "borderWidth"],
  ["opacity"],
  ["shadowBlur"],
  ["shadowOffsetX"],
  ["shadowOffsetY"],
  ["shadowColor"],
  ["lineDash", "borderType"],
  ["lineDashOffset", "borderDashOffset"],
  ["lineCap", "borderCap"],
  ["lineJoin", "borderJoin"],
  ["miterLimit", "borderMiterLimit"]
  // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  // So do not transfer decal directly.
], fUe = jh(zle), dUe = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getItemStyle = function(e, n) {
      return fUe(this, e, n);
    }, t;
  }()
), pp = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.parentModel = n, this.ecModel = r, this.option = e;
    }
    return t.prototype.init = function(e, n, r) {
    }, t.prototype.mergeOption = function(e, n) {
      mt(this.option, e, !0);
    }, t.prototype.get = function(e, n) {
      return e == null ? this.option : this._doGet(this.parsePath(e), !n && this.parentModel);
    }, t.prototype.getShallow = function(e, n) {
      var r = this.option, i = r == null ? r : r[e];
      if (i == null && !n) {
        var a = this.parentModel;
        a && (i = a.getShallow(e));
      }
      return i;
    }, t.prototype.getModel = function(e, n) {
      var r = e != null, i = r ? this.parsePath(e) : null, a = r ? this._doGet(i) : this.option;
      return n = n || this.parentModel && this.parentModel.getModel(this.resolveParentPath(i)), new t(a, n, this.ecModel);
    }, t.prototype.isEmpty = function() {
      return this.option == null;
    }, t.prototype.restoreData = function() {
    }, t.prototype.clone = function() {
      var e = this.constructor;
      return new e(ot(this.option));
    }, t.prototype.parsePath = function(e) {
      return typeof e == "string" ? e.split(".") : e;
    }, t.prototype.resolveParentPath = function(e) {
      return e;
    }, t.prototype.isAnimationEnabled = function() {
      if (!Gt.node && this.option) {
        if (this.option.animation != null)
          return !!this.option.animation;
        if (this.parentModel)
          return this.parentModel.isAnimationEnabled();
      }
    }, t.prototype._doGet = function(e, n) {
      var r = this.option;
      if (!e)
        return r;
      for (var i = 0; i < e.length && !(e[i] && (r = r && typeof r == "object" ? r[e[i]] : null, r == null)); i++)
        ;
      return r == null && n && (r = n._doGet(this.resolveParentPath(e), n.parentModel)), r;
    }, t;
  }()
);
M5(pp);
_je(pp);
vr(pp, cUe);
vr(pp, dUe);
vr(pp, Cje);
vr(pp, lUe);
const xn = pp;
var hUe = Math.round(Math.random() * 10);
function Cm(t) {
  return [t || "", hUe++].join("_");
}
function pUe(t) {
  var e = {};
  t.registerSubTypeDefaulter = function(n, r) {
    var i = $l(n);
    e[i.main] = r;
  }, t.determineSubType = function(n, r) {
    var i = r.type;
    if (!i) {
      var a = $l(n).main;
      t.hasSubTypes(n) && e[a] && (i = e[a](r));
    }
    return i;
  };
}
function vUe(t, e) {
  t.topologicalTravel = function(a, o, s, l) {
    if (!a.length)
      return;
    var u = n(o), c = u.graph, f = u.noEntryList, d = {};
    for (F(a, function(y) {
      d[y] = !0;
    }); f.length; ) {
      var h = f.pop(), p = c[h], v = !!d[h];
      v && (s.call(l, h, p.originalDeps.slice()), delete d[h]), F(p.successor, v ? m : g);
    }
    F(d, function() {
      var y = "";
      throw process.env.NODE_ENV !== "production" && (y = fa("Circular dependency may exists: ", d, a, o)), new Error(y);
    });
    function g(y) {
      c[y].entryCount--, c[y].entryCount === 0 && f.push(y);
    }
    function m(y) {
      d[y] = !0, g(y);
    }
  };
  function n(a) {
    var o = {}, s = [];
    return F(a, function(l) {
      var u = r(o, l), c = u.originalDeps = e(l), f = i(c, a);
      u.entryCount = f.length, u.entryCount === 0 && s.push(l), F(f, function(d) {
        St(u.predecessor, d) < 0 && u.predecessor.push(d);
        var h = r(o, d);
        St(h.successor, d) < 0 && h.successor.push(l);
      });
    }), {
      graph: o,
      noEntryList: s
    };
  }
  function r(a, o) {
    return a[o] || (a[o] = {
      predecessor: [],
      successor: []
    }), a[o];
  }
  function i(a, o) {
    var s = [];
    return F(a, function(l) {
      St(o, l) >= 0 && s.push(l);
    }), s;
  }
}
function Bf(t, e) {
  return mt(mt({}, t, !0), e, !0);
}
const gUe = {
  time: {
    month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
    monthAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
    dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
    dayOfWeekAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
  },
  legend: {
    selector: {
      all: "All",
      inverse: "Inv"
    }
  },
  toolbox: {
    brush: {
      title: {
        rect: "Box Select",
        polygon: "Lasso Select",
        lineX: "Horizontally Select",
        lineY: "Vertically Select",
        keep: "Keep Selections",
        clear: "Clear Selections"
      }
    },
    dataView: {
      title: "Data View",
      lang: ["Data View", "Close", "Refresh"]
    },
    dataZoom: {
      title: {
        zoom: "Zoom",
        back: "Zoom Reset"
      }
    },
    magicType: {
      title: {
        line: "Switch to Line Chart",
        bar: "Switch to Bar Chart",
        stack: "Stack",
        tiled: "Tile"
      }
    },
    restore: {
      title: "Restore"
    },
    saveAsImage: {
      title: "Save as Image",
      lang: ["Right Click to Save Image"]
    }
  },
  series: {
    typeNames: {
      pie: "Pie chart",
      bar: "Bar chart",
      line: "Line chart",
      scatter: "Scatter plot",
      effectScatter: "Ripple scatter plot",
      radar: "Radar chart",
      tree: "Tree",
      treemap: "Treemap",
      boxplot: "Boxplot",
      candlestick: "Candlestick",
      k: "K line chart",
      heatmap: "Heat map",
      map: "Map",
      parallel: "Parallel coordinate map",
      lines: "Line graph",
      graph: "Relationship graph",
      sankey: "Sankey diagram",
      funnel: "Funnel chart",
      gauge: "Gauge",
      pictorialBar: "Pictorial bar",
      themeRiver: "Theme River Map",
      sunburst: "Sunburst",
      custom: "Custom chart",
      chart: "Chart"
    }
  },
  aria: {
    general: {
      withTitle: 'This is a chart about "{title}"',
      withoutTitle: "This is a chart"
    },
    series: {
      single: {
        prefix: "",
        withName: " with type {seriesType} named {seriesName}.",
        withoutName: " with type {seriesType}."
      },
      multiple: {
        prefix: ". It consists of {seriesCount} series count.",
        withName: " The {seriesId} series is a {seriesType} representing {seriesName}.",
        withoutName: " The {seriesId} series is a {seriesType}.",
        separator: {
          middle: "",
          end: ""
        }
      }
    },
    data: {
      allData: "The data is as follows: ",
      partialData: "The first {displayCnt} items are: ",
      withName: "the data for {name} is {value}",
      withoutName: "{value}",
      separator: {
        middle: ", ",
        end: ". "
      }
    }
  }
}, mUe = {
  time: {
    month: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
    monthAbbr: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
    dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
    dayOfWeekAbbr: ["日", "一", "二", "三", "四", "五", "六"]
  },
  legend: {
    selector: {
      all: "全选",
      inverse: "反选"
    }
  },
  toolbox: {
    brush: {
      title: {
        rect: "矩形选择",
        polygon: "圈选",
        lineX: "横向选择",
        lineY: "纵向选择",
        keep: "保持选择",
        clear: "清除选择"
      }
    },
    dataView: {
      title: "数据视图",
      lang: ["数据视图", "关闭", "刷新"]
    },
    dataZoom: {
      title: {
        zoom: "区域缩放",
        back: "区域缩放还原"
      }
    },
    magicType: {
      title: {
        line: "切换为折线图",
        bar: "切换为柱状图",
        stack: "切换为堆叠",
        tiled: "切换为平铺"
      }
    },
    restore: {
      title: "还原"
    },
    saveAsImage: {
      title: "保存为图片",
      lang: ["右键另存为图片"]
    }
  },
  series: {
    typeNames: {
      pie: "饼图",
      bar: "柱状图",
      line: "折线图",
      scatter: "散点图",
      effectScatter: "涟漪散点图",
      radar: "雷达图",
      tree: "树图",
      treemap: "矩形树图",
      boxplot: "箱型图",
      candlestick: "K线图",
      k: "K线图",
      heatmap: "热力图",
      map: "地图",
      parallel: "平行坐标图",
      lines: "线图",
      graph: "关系图",
      sankey: "桑基图",
      funnel: "漏斗图",
      gauge: "仪表盘图",
      pictorialBar: "象形柱图",
      themeRiver: "主题河流图",
      sunburst: "旭日图",
      custom: "自定义图表",
      chart: "图表"
    }
  },
  aria: {
    general: {
      withTitle: "这是一个关于“{title}”的图表。",
      withoutTitle: "这是一个图表，"
    },
    series: {
      single: {
        prefix: "",
        withName: "图表类型是{seriesType}，表示{seriesName}。",
        withoutName: "图表类型是{seriesType}。"
      },
      multiple: {
        prefix: "它由{seriesCount}个图表系列组成。",
        withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType}，",
        withoutName: "第{seriesId}个系列是一个{seriesType}，",
        separator: {
          middle: "；",
          end: "。"
        }
      }
    },
    data: {
      allData: "其数据是——",
      partialData: "其中，前{displayCnt}项是——",
      withName: "{name}的数据是{value}",
      withoutName: "{value}",
      separator: {
        middle: "，",
        end: ""
      }
    }
  }
};
var NC = "ZH", j5 = "EN", Kv = j5, hw = {}, Z5 = {}, Vle = Gt.domSupported ? function() {
  var t = (
    /* eslint-disable-next-line */
    (document.documentElement.lang || navigator.language || navigator.browserLanguage || Kv).toUpperCase()
  );
  return t.indexOf(NC) > -1 ? NC : Kv;
}() : Kv;
function U5(t, e) {
  t = t.toUpperCase(), Z5[t] = new xn(e), hw[t] = e;
}
function yUe(t) {
  if (Ve(t)) {
    var e = hw[t.toUpperCase()] || {};
    return t === NC || t === j5 ? ot(e) : mt(ot(e), ot(hw[Kv]), !1);
  } else
    return mt(ot(t), ot(hw[Kv]), !1);
}
function kk(t) {
  return Z5[t];
}
function bUe() {
  return Z5[Kv];
}
U5(j5, gUe);
U5(NC, mUe);
var X5 = 1e3, Y5 = X5 * 60, ab = Y5 * 60, Go = ab * 24, EG = Go * 365, by = {
  year: "{yyyy}",
  month: "{MMM}",
  day: "{d}",
  hour: "{HH}:{mm}",
  minute: "{HH}:{mm}",
  second: "{HH}:{mm}:{ss}",
  millisecond: "{HH}:{mm}:{ss} {SSS}",
  none: "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"
}, _S = "{yyyy}-{MM}-{dd}", MG = {
  year: "{yyyy}",
  month: "{yyyy}-{MM}",
  day: _S,
  hour: _S + " " + by.hour,
  minute: _S + " " + by.minute,
  second: _S + " " + by.second,
  millisecond: by.none
}, fM = ["year", "month", "day", "hour", "minute", "second", "millisecond"], Fle = ["year", "half-year", "quarter", "month", "week", "half-week", "day", "half-day", "quarter-day", "hour", "minute", "second", "millisecond"];
function Ki(t, e) {
  return t += "", "0000".substr(0, e - t.length) + t;
}
function Jv(t) {
  switch (t) {
    case "half-year":
    case "quarter":
      return "month";
    case "week":
    case "half-week":
      return "day";
    case "half-day":
    case "quarter-day":
      return "hour";
    default:
      return t;
  }
}
function _Ue(t) {
  return t === Jv(t);
}
function OUe(t) {
  switch (t) {
    case "year":
    case "month":
      return "day";
    case "millisecond":
      return "millisecond";
    default:
      return "second";
  }
}
function p1(t, e, n, r) {
  var i = go(t), a = i[q5(n)](), o = i[eg(n)]() + 1, s = Math.floor((o - 1) / 3) + 1, l = i[PP(n)](), u = i["get" + (n ? "UTC" : "") + "Day"](), c = i[Yb(n)](), f = (c - 1) % 12 + 1, d = i[$P(n)](), h = i[AP(n)](), p = i[EP(n)](), v = c >= 12 ? "pm" : "am", g = v.toUpperCase(), m = r instanceof xn ? r : kk(r || Vle) || bUe(), y = m.getModel("time"), _ = y.get("month"), O = y.get("monthAbbr"), S = y.get("dayOfWeek"), x = y.get("dayOfWeekAbbr");
  return (e || "").replace(/{a}/g, v + "").replace(/{A}/g, g + "").replace(/{yyyy}/g, a + "").replace(/{yy}/g, Ki(a % 100 + "", 2)).replace(/{Q}/g, s + "").replace(/{MMMM}/g, _[o - 1]).replace(/{MMM}/g, O[o - 1]).replace(/{MM}/g, Ki(o, 2)).replace(/{M}/g, o + "").replace(/{dd}/g, Ki(l, 2)).replace(/{d}/g, l + "").replace(/{eeee}/g, S[u]).replace(/{ee}/g, x[u]).replace(/{e}/g, u + "").replace(/{HH}/g, Ki(c, 2)).replace(/{H}/g, c + "").replace(/{hh}/g, Ki(f + "", 2)).replace(/{h}/g, f + "").replace(/{mm}/g, Ki(d, 2)).replace(/{m}/g, d + "").replace(/{ss}/g, Ki(h, 2)).replace(/{s}/g, h + "").replace(/{SSS}/g, Ki(p, 3)).replace(/{S}/g, p + "");
}
function SUe(t, e, n, r, i) {
  var a = null;
  if (Ve(n))
    a = n;
  else if (qe(n))
    a = n(t.value, e, {
      level: t.level
    });
  else {
    var o = _e({}, by);
    if (t.level > 0)
      for (var s = 0; s < fM.length; ++s)
        o[fM[s]] = "{primary|" + o[fM[s]] + "}";
    var l = n ? n.inherit === !1 ? n : it(n, o) : o, u = Wle(t.value, i);
    if (l[u])
      a = l[u];
    else if (l.inherit) {
      for (var c = Fle.indexOf(u), s = c - 1; s >= 0; --s)
        if (l[u]) {
          a = l[u];
          break;
        }
      a = a || o.none;
    }
    if (Se(a)) {
      var f = t.level == null ? 0 : t.level >= 0 ? t.level : a.length + t.level;
      f = Math.min(f, a.length - 1), a = a[f];
    }
  }
  return p1(new Date(t.value), a, i, r);
}
function Wle(t, e) {
  var n = go(t), r = n[eg(e)]() + 1, i = n[PP(e)](), a = n[Yb(e)](), o = n[$P(e)](), s = n[AP(e)](), l = n[EP(e)](), u = l === 0, c = u && s === 0, f = c && o === 0, d = f && a === 0, h = d && i === 1, p = h && r === 1;
  return p ? "year" : h ? "month" : d ? "day" : f ? "hour" : c ? "minute" : u ? "second" : "millisecond";
}
function IG(t, e, n) {
  var r = Kt(t) ? go(t) : t;
  switch (e = e || Wle(t, n), e) {
    case "year":
      return r[q5(n)]();
    case "half-year":
      return r[eg(n)]() >= 6 ? 1 : 0;
    case "quarter":
      return Math.floor((r[eg(n)]() + 1) / 4);
    case "month":
      return r[eg(n)]();
    case "day":
      return r[PP(n)]();
    case "half-day":
      return r[Yb(n)]() / 24;
    case "hour":
      return r[Yb(n)]();
    case "minute":
      return r[$P(n)]();
    case "second":
      return r[AP(n)]();
    case "millisecond":
      return r[EP(n)]();
  }
}
function q5(t) {
  return t ? "getUTCFullYear" : "getFullYear";
}
function eg(t) {
  return t ? "getUTCMonth" : "getMonth";
}
function PP(t) {
  return t ? "getUTCDate" : "getDate";
}
function Yb(t) {
  return t ? "getUTCHours" : "getHours";
}
function $P(t) {
  return t ? "getUTCMinutes" : "getMinutes";
}
function AP(t) {
  return t ? "getUTCSeconds" : "getSeconds";
}
function EP(t) {
  return t ? "getUTCMilliseconds" : "getMilliseconds";
}
function xUe(t) {
  return t ? "setUTCFullYear" : "setFullYear";
}
function Qle(t) {
  return t ? "setUTCMonth" : "setMonth";
}
function Hle(t) {
  return t ? "setUTCDate" : "setDate";
}
function Gle(t) {
  return t ? "setUTCHours" : "setHours";
}
function jle(t) {
  return t ? "setUTCMinutes" : "setMinutes";
}
function Zle(t) {
  return t ? "setUTCSeconds" : "setSeconds";
}
function Ule(t) {
  return t ? "setUTCMilliseconds" : "setMilliseconds";
}
function wUe(t, e, n, r, i, a, o, s) {
  var l = new jt({
    style: {
      text: t,
      font: e,
      align: n,
      verticalAlign: r,
      padding: i,
      rich: a,
      overflow: o ? "truncate" : null,
      lineHeight: s
    }
  });
  return l.getBoundingRect();
}
function K5(t) {
  if (!hP(t))
    return Ve(t) ? t : "-";
  var e = (t + "").split(".");
  return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (e.length > 1 ? "." + e[1] : "");
}
function J5(t, e) {
  return t = (t || "").toLowerCase().replace(/-(.)/g, function(n, r) {
    return r.toUpperCase();
  }), e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)), t;
}
var vp = sP;
function Lk(t, e, n) {
  var r = "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";
  function i(c) {
    return c && Zo(c) ? c : "-";
  }
  function a(c) {
    return !!(c != null && !isNaN(c) && isFinite(c));
  }
  var o = e === "time", s = t instanceof Date;
  if (o || s) {
    var l = o ? go(t) : t;
    if (isNaN(+l)) {
      if (s)
        return "-";
    } else return p1(l, r, n);
  }
  if (e === "ordinal")
    return zb(t) ? i(t) : Kt(t) && a(t) ? t + "" : "-";
  var u = Gl(t);
  return a(u) ? K5(u) : zb(t) ? i(t) : typeof t == "boolean" ? t + "" : "-";
}
var DG = ["a", "b", "c", "d", "e", "f", "g"], dM = function(t, e) {
  return "{" + t + (e ?? "") + "}";
};
function e3(t, e, n) {
  Se(e) || (e = [e]);
  var r = e.length;
  if (!r)
    return "";
  for (var i = e[0].$vars || [], a = 0; a < i.length; a++) {
    var o = DG[a];
    t = t.replace(dM(o), dM(o, 0));
  }
  for (var s = 0; s < r; s++)
    for (var l = 0; l < i.length; l++) {
      var u = e[s][i[l]];
      t = t.replace(dM(DG[l], s), n ? ea(u) : u);
    }
  return t;
}
function CUe(t, e, n) {
  return F(e, function(r, i) {
    t = t.replace("{" + i + "}", r);
  }), t;
}
function Xle(t, e) {
  var n = Ve(t) ? {
    color: t,
    extraCssText: e
  } : t || {}, r = n.color, i = n.type;
  e = n.extraCssText;
  var a = n.renderMode || "html";
  if (!r)
    return "";
  if (a === "html")
    return i === "subItem" ? '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' + ea(r) + ";" + (e || "") + '"></span>' : '<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:' + ea(r) + ";" + (e || "") + '"></span>';
  var o = n.markerId || "markerX";
  return {
    renderMode: a,
    content: "{" + o + "|}  ",
    style: i === "subItem" ? {
      width: 4,
      height: 4,
      borderRadius: 2,
      backgroundColor: r
    } : {
      width: 10,
      height: 10,
      borderRadius: 5,
      backgroundColor: r
    }
  };
}
function TUe(t, e, n) {
  process.env.NODE_ENV !== "production" && yr("echarts.format.formatTime", "echarts.time.format"), (t === "week" || t === "month" || t === "quarter" || t === "half-year" || t === "year") && (t = `MM-dd
yyyy`);
  var r = go(e), i = n ? "getUTC" : "get", a = r[i + "FullYear"](), o = r[i + "Month"]() + 1, s = r[i + "Date"](), l = r[i + "Hours"](), u = r[i + "Minutes"](), c = r[i + "Seconds"](), f = r[i + "Milliseconds"]();
  return t = t.replace("MM", Ki(o, 2)).replace("M", o).replace("yyyy", a).replace("yy", Ki(a % 100 + "", 2)).replace("dd", Ki(s, 2)).replace("d", s).replace("hh", Ki(l, 2)).replace("h", l).replace("mm", Ki(u, 2)).replace("m", u).replace("ss", Ki(c, 2)).replace("s", c).replace("SSS", Ki(f, 3)), t;
}
function PUe(t) {
  return t && t.charAt(0).toUpperCase() + t.substr(1);
}
function Uh(t, e) {
  return e = e || "transparent", Ve(t) ? t : nt(t) && t.colorStops && (t.colorStops[0] || {}).color || e;
}
function BC(t, e) {
  if (e === "_blank" || e === "blank") {
    var n = window.open();
    n.opener = null, n.location.href = t;
  } else
    window.open(t, e);
}
var pw = F, Yle = ["left", "right", "top", "bottom", "width", "height"], oh = [["width", "left", "right"], ["height", "top", "bottom"]];
function t3(t, e, n, r, i) {
  var a = 0, o = 0;
  r == null && (r = 1 / 0), i == null && (i = 1 / 0);
  var s = 0;
  e.eachChild(function(l, u) {
    var c = l.getBoundingRect(), f = e.childAt(u + 1), d = f && f.getBoundingRect(), h, p;
    if (t === "horizontal") {
      var v = c.width + (d ? -d.x + c.x : 0);
      h = a + v, h > r || l.newline ? (a = 0, h = v, o += s + n, s = c.height) : s = Math.max(s, c.height);
    } else {
      var g = c.height + (d ? -d.y + c.y : 0);
      p = o + g, p > i || l.newline ? (a += s + n, o = 0, p = g, s = c.width) : s = Math.max(s, c.width);
    }
    l.newline || (l.x = a, l.y = o, l.markRedraw(), t === "horizontal" ? a = h + n : o = p + n);
  });
}
var Th = t3;
vt(t3, "vertical");
vt(t3, "horizontal");
function $Ue(t, e, n) {
  var r = e.width, i = e.height, a = ze(t.left, r), o = ze(t.top, i), s = ze(t.right, r), l = ze(t.bottom, i);
  return (isNaN(a) || isNaN(parseFloat(t.left))) && (a = 0), (isNaN(s) || isNaN(parseFloat(t.right))) && (s = r), (isNaN(o) || isNaN(parseFloat(t.top))) && (o = 0), (isNaN(l) || isNaN(parseFloat(t.bottom))) && (l = i), n = vp(n || 0), {
    width: Math.max(s - a - n[1] - n[3], 0),
    height: Math.max(l - o - n[0] - n[2], 0)
  };
}
function Mr(t, e, n) {
  n = vp(n || 0);
  var r = e.width, i = e.height, a = ze(t.left, r), o = ze(t.top, i), s = ze(t.right, r), l = ze(t.bottom, i), u = ze(t.width, r), c = ze(t.height, i), f = n[2] + n[0], d = n[1] + n[3], h = t.aspect;
  switch (isNaN(u) && (u = r - s - d - a), isNaN(c) && (c = i - l - f - o), h != null && (isNaN(u) && isNaN(c) && (h > r / i ? u = r * 0.8 : c = i * 0.8), isNaN(u) && (u = h * c), isNaN(c) && (c = u / h)), isNaN(a) && (a = r - s - u - d), isNaN(o) && (o = i - l - c - f), t.left || t.right) {
    case "center":
      a = r / 2 - u / 2 - n[3];
      break;
    case "right":
      a = r - u - d;
      break;
  }
  switch (t.top || t.bottom) {
    case "middle":
    case "center":
      o = i / 2 - c / 2 - n[0];
      break;
    case "bottom":
      o = i - c - f;
      break;
  }
  a = a || 0, o = o || 0, isNaN(u) && (u = r - d - a - (s || 0)), isNaN(c) && (c = i - f - o - (l || 0));
  var p = new bt(a + n[3], o + n[0], u, c);
  return p.margin = n, p;
}
function MP(t, e, n, r, i, a) {
  var o = !i || !i.hv || i.hv[0], s = !i || !i.hv || i.hv[1], l = i && i.boundingMode || "all";
  if (a = a || t, a.x = t.x, a.y = t.y, !o && !s)
    return !1;
  var u;
  if (l === "raw")
    u = t.type === "group" ? new bt(0, 0, +e.width || 0, +e.height || 0) : t.getBoundingRect();
  else if (u = t.getBoundingRect(), t.needLocalTransform()) {
    var c = t.getLocalTransform();
    u = u.clone(), u.applyTransform(c);
  }
  var f = Mr(it({
    width: u.width,
    height: u.height
  }, e), n, r), d = o ? f.x - u.x : 0, h = s ? f.y - u.y : 0;
  return l === "raw" ? (a.x = d, a.y = h) : (a.x += d, a.y += h), a === t && t.markRedraw(), !0;
}
function AUe(t, e) {
  return t[oh[e][0]] != null || t[oh[e][1]] != null && t[oh[e][2]] != null;
}
function qb(t) {
  var e = t.layoutMode || t.constructor.layoutMode;
  return nt(e) ? e : e ? {
    type: e
  } : null;
}
function Of(t, e, n) {
  var r = n && n.ignoreSize;
  !Se(r) && (r = [r, r]);
  var i = o(oh[0], 0), a = o(oh[1], 1);
  u(oh[0], t, i), u(oh[1], t, a);
  function o(c, f) {
    var d = {}, h = 0, p = {}, v = 0, g = 2;
    if (pw(c, function(_) {
      p[_] = t[_];
    }), pw(c, function(_) {
      s(e, _) && (d[_] = p[_] = e[_]), l(d, _) && h++, l(p, _) && v++;
    }), r[f])
      return l(e, c[1]) ? p[c[2]] = null : l(e, c[2]) && (p[c[1]] = null), p;
    if (v === g || !h)
      return p;
    if (h >= g)
      return d;
    for (var m = 0; m < c.length; m++) {
      var y = c[m];
      if (!s(d, y) && s(t, y)) {
        d[y] = t[y];
        break;
      }
    }
    return d;
  }
  function s(c, f) {
    return c.hasOwnProperty(f);
  }
  function l(c, f) {
    return c[f] != null && c[f] !== "auto";
  }
  function u(c, f, d) {
    pw(c, function(h) {
      f[h] = d[h];
    });
  }
}
function Tm(t) {
  return qle({}, t);
}
function qle(t, e) {
  return e && t && pw(Yle, function(n) {
    e.hasOwnProperty(n) && (t[n] = e[n]);
  }), t;
}
var EUe = Ut(), At = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i) {
      var a = t.call(this, n, r, i) || this;
      return a.uid = Cm("ec_cpt_model"), a;
    }
    return e.prototype.init = function(n, r, i) {
      this.mergeDefaultAndTheme(n, i);
    }, e.prototype.mergeDefaultAndTheme = function(n, r) {
      var i = qb(this), a = i ? Tm(n) : {}, o = r.getTheme();
      mt(n, o.get(this.mainType)), mt(n, this.getDefaultOption()), i && Of(n, a, i);
    }, e.prototype.mergeOption = function(n, r) {
      mt(this.option, n, !0);
      var i = qb(this);
      i && Of(this.option, n, i);
    }, e.prototype.optionUpdated = function(n, r) {
    }, e.prototype.getDefaultOption = function() {
      var n = this.constructor;
      if (!mje(n))
        return n.defaultOption;
      var r = EUe(this);
      if (!r.defaultOption) {
        for (var i = [], a = n; a; ) {
          var o = a.prototype.defaultOption;
          o && i.push(o), a = a.superClass;
        }
        for (var s = {}, l = i.length - 1; l >= 0; l--)
          s = mt(s, i[l], !0);
        r.defaultOption = s;
      }
      return r.defaultOption;
    }, e.prototype.getReferringComponents = function(n, r) {
      var i = n + "Index", a = n + "Id";
      return l1(this.ecModel, n, {
        index: this.get(i, !0),
        id: this.get(a, !0)
      }, r);
    }, e.prototype.getBoxLayoutParams = function() {
      var n = this;
      return {
        left: n.get("left"),
        top: n.get("top"),
        right: n.get("right"),
        bottom: n.get("bottom"),
        width: n.get("width"),
        height: n.get("height")
      };
    }, e.prototype.getZLevelKey = function() {
      return "";
    }, e.prototype.setZLevel = function(n) {
      this.option.zlevel = n;
    }, e.protoInitialize = function() {
      var n = e.prototype;
      n.type = "component", n.id = "", n.name = "", n.mainType = "", n.subType = "", n.componentIndex = 0;
    }(), e;
  }(xn)
);
Wse(At, xn);
vP(At);
pUe(At);
vUe(At, MUe);
function MUe(t) {
  var e = [];
  return F(At.getClassesByMainType(t), function(n) {
    e = e.concat(n.dependencies || n.prototype.dependencies || []);
  }), e = Ce(e, function(n) {
    return $l(n).main;
  }), t !== "dataset" && St(e, "dataset") <= 0 && e.unshift("dataset"), e;
}
var Kle = "";
typeof navigator < "u" && (Kle = navigator.platform || "");
var Jp = "rgba(0, 0, 0, 0.2)";
const IUe = {
  darkMode: "auto",
  // backgroundColor: 'rgba(0,0,0,0)',
  colorBy: "series",
  color: ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"],
  gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
  aria: {
    decal: {
      decals: [{
        color: Jp,
        dashArrayX: [1, 0],
        dashArrayY: [2, 5],
        symbolSize: 1,
        rotation: Math.PI / 6
      }, {
        color: Jp,
        symbol: "circle",
        dashArrayX: [[8, 8], [0, 8, 8, 0]],
        dashArrayY: [6, 0],
        symbolSize: 0.8
      }, {
        color: Jp,
        dashArrayX: [1, 0],
        dashArrayY: [4, 3],
        rotation: -Math.PI / 4
      }, {
        color: Jp,
        dashArrayX: [[6, 6], [0, 6, 6, 0]],
        dashArrayY: [6, 0]
      }, {
        color: Jp,
        dashArrayX: [[1, 0], [1, 6]],
        dashArrayY: [1, 0, 6, 0],
        rotation: Math.PI / 4
      }, {
        color: Jp,
        symbol: "triangle",
        dashArrayX: [[9, 9], [0, 9, 9, 0]],
        dashArrayY: [7, 2],
        symbolSize: 0.75
      }]
    }
  },
  // If xAxis and yAxis declared, grid is created by default.
  // grid: {},
  textStyle: {
    // color: '#000',
    // decoration: 'none',
    // PENDING
    fontFamily: Kle.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
    // fontFamily: 'Arial, Verdana, sans-serif',
    fontSize: 12,
    fontStyle: "normal",
    fontWeight: "normal"
  },
  // http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/
  // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
  // Default is source-over
  blendMode: null,
  stateAnimation: {
    duration: 300,
    easing: "cubicOut"
  },
  animation: "auto",
  animationDuration: 1e3,
  animationDurationUpdate: 500,
  animationEasing: "cubicInOut",
  animationEasingUpdate: "cubicInOut",
  animationThreshold: 2e3,
  // Configuration for progressive/incremental rendering
  progressiveThreshold: 3e3,
  progressive: 400,
  // Threshold of if use single hover layer to optimize.
  // It is recommended that `hoverLayerThreshold` is equivalent to or less than
  // `progressiveThreshold`, otherwise hover will cause restart of progressive,
  // which is unexpected.
  // see example <echarts/test/heatmap-large.html>.
  hoverLayerThreshold: 3e3,
  // See: module:echarts/scale/Time
  useUTC: !1
};
var Nk = Ze(["tooltip", "label", "itemName", "itemId", "itemGroupId", "itemChildGroupId", "seriesName"]), hs = "original", Qi = "arrayRows", ps = "objectRows", Xl = "keyedColumns", Mu = "typedArray", Jle = "unknown", Nl = "column", Pm = "row", pi = {
  Must: 1,
  Might: 2,
  Not: 3
  // Other cases
}, eue = Ut();
function DUe(t) {
  eue(t).datasetMap = Ze();
}
function tue(t, e, n) {
  var r = {}, i = r3(e);
  if (!i || !t)
    return r;
  var a = [], o = [], s = e.ecModel, l = eue(s).datasetMap, u = i.uid + "_" + n.seriesLayoutBy, c, f;
  t = t.slice(), F(t, function(v, g) {
    var m = nt(v) ? v : t[g] = {
      name: v
    };
    m.type === "ordinal" && c == null && (c = g, f = p(m)), r[m.name] = [];
  });
  var d = l.get(u) || l.set(u, {
    categoryWayDim: f,
    valueWayDim: 0
  });
  F(t, function(v, g) {
    var m = v.name, y = p(v);
    if (c == null) {
      var _ = d.valueWayDim;
      h(r[m], _, y), h(o, _, y), d.valueWayDim += y;
    } else if (c === g)
      h(r[m], 0, y), h(a, 0, y);
    else {
      var _ = d.categoryWayDim;
      h(r[m], _, y), h(o, _, y), d.categoryWayDim += y;
    }
  });
  function h(v, g, m) {
    for (var y = 0; y < m; y++)
      v.push(g + y);
  }
  function p(v) {
    var g = v.dimsDef;
    return g ? g.length : 1;
  }
  return a.length && (r.itemName = a), o.length && (r.seriesName = o), r;
}
function n3(t, e, n) {
  var r = {}, i = r3(t);
  if (!i)
    return r;
  var a = e.sourceFormat, o = e.dimensionsDefine, s;
  (a === ps || a === Xl) && F(o, function(c, f) {
    (nt(c) ? c.name : c) === "name" && (s = f);
  });
  var l = function() {
    for (var c = {}, f = {}, d = [], h = 0, p = Math.min(5, n); h < p; h++) {
      var v = rue(e.data, a, e.seriesLayoutBy, o, e.startIndex, h);
      d.push(v);
      var g = v === pi.Not;
      if (g && c.v == null && h !== s && (c.v = h), (c.n == null || c.n === c.v || !g && d[c.n] === pi.Not) && (c.n = h), m(c) && d[c.n] !== pi.Not)
        return c;
      g || (v === pi.Might && f.v == null && h !== s && (f.v = h), (f.n == null || f.n === f.v) && (f.n = h));
    }
    function m(y) {
      return y.v != null && y.n != null;
    }
    return m(c) ? c : m(f) ? f : null;
  }();
  if (l) {
    r.value = [l.v];
    var u = s ?? l.n;
    r.itemName = [u], r.seriesName = [u];
  }
  return r;
}
function r3(t) {
  var e = t.get("data", !0);
  if (!e)
    return l1(t.ecModel, "dataset", {
      index: t.get("datasetIndex", !0),
      id: t.get("datasetId", !0)
    }, Er).models[0];
}
function RUe(t) {
  return !t.get("transform", !0) && !t.get("fromTransformResult", !0) ? [] : l1(t.ecModel, "dataset", {
    index: t.get("fromDatasetIndex", !0),
    id: t.get("fromDatasetId", !0)
  }, Er).models;
}
function nue(t, e) {
  return rue(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e);
}
function rue(t, e, n, r, i, a) {
  var o, s = 5;
  if (Wi(t))
    return pi.Not;
  var l, u;
  if (r) {
    var c = r[a];
    nt(c) ? (l = c.name, u = c.type) : Ve(c) && (l = c);
  }
  if (u != null)
    return u === "ordinal" ? pi.Must : pi.Not;
  if (e === Qi) {
    var f = t;
    if (n === Pm) {
      for (var d = f[a], h = 0; h < (d || []).length && h < s; h++)
        if ((o = O(d[i + h])) != null)
          return o;
    } else
      for (var h = 0; h < f.length && h < s; h++) {
        var p = f[i + h];
        if (p && (o = O(p[a])) != null)
          return o;
      }
  } else if (e === ps) {
    var v = t;
    if (!l)
      return pi.Not;
    for (var h = 0; h < v.length && h < s; h++) {
      var g = v[h];
      if (g && (o = O(g[l])) != null)
        return o;
    }
  } else if (e === Xl) {
    var m = t;
    if (!l)
      return pi.Not;
    var d = m[l];
    if (!d || Wi(d))
      return pi.Not;
    for (var h = 0; h < d.length && h < s; h++)
      if ((o = O(d[h])) != null)
        return o;
  } else if (e === hs)
    for (var y = t, h = 0; h < y.length && h < s; h++) {
      var g = y[h], _ = ym(g);
      if (!Se(_))
        return pi.Not;
      if ((o = O(_[a])) != null)
        return o;
    }
  function O(S) {
    var x = Ve(S);
    if (S != null && Number.isFinite(Number(S)) && S !== "")
      return x ? pi.Might : pi.Not;
    if (x && S !== "-")
      return pi.Must;
  }
  return pi.Not;
}
var Bk = Ze();
function kUe(t, e) {
  at(Bk.get(t) == null && e), Bk.set(t, e);
}
function LUe(t, e, n) {
  var r = Bk.get(e);
  if (!r)
    return n;
  var i = r(t);
  if (!i)
    return n;
  if (process.env.NODE_ENV !== "production")
    for (var a = 0; a < i.length; a++)
      at(Fg(i[a]));
  return n.concat(i);
}
var RG = Ut(), NUe = Ut(), i3 = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getColorFromPalette = function(e, n, r) {
      var i = wn(this.get("color", !0)), a = this.get("colorLayer", !0);
      return iue(this, RG, i, a, e, n, r);
    }, t.prototype.clearColorPalette = function() {
      zUe(this, RG);
    }, t;
  }()
);
function zk(t, e, n, r) {
  var i = wn(t.get(["aria", "decal", "decals"]));
  return iue(t, NUe, i, null, e, n, r);
}
function BUe(t, e) {
  for (var n = t.length, r = 0; r < n; r++)
    if (t[r].length > e)
      return t[r];
  return t[n - 1];
}
function iue(t, e, n, r, i, a, o) {
  a = a || t;
  var s = e(a), l = s.paletteIdx || 0, u = s.paletteNameMap = s.paletteNameMap || {};
  if (u.hasOwnProperty(i))
    return u[i];
  var c = o == null || !r ? n : BUe(r, o);
  if (c = c || n, !(!c || !c.length)) {
    var f = c[l];
    return i && (u[i] = f), s.paletteIdx = (l + 1) % c.length, f;
  }
}
function zUe(t, e) {
  e(t).paletteIdx = 0, e(t).paletteNameMap = {};
}
var OS, I0, kG, hM = "\0_ec_inner", LG = 1, VUe = {
  grid: "GridComponent",
  polar: "PolarComponent",
  geo: "GeoComponent",
  singleAxis: "SingleAxisComponent",
  parallel: "ParallelComponent",
  calendar: "CalendarComponent",
  graphic: "GraphicComponent",
  toolbox: "ToolboxComponent",
  tooltip: "TooltipComponent",
  axisPointer: "AxisPointerComponent",
  brush: "BrushComponent",
  title: "TitleComponent",
  timeline: "TimelineComponent",
  markPoint: "MarkPointComponent",
  markLine: "MarkLineComponent",
  markArea: "MarkAreaComponent",
  legend: "LegendComponent",
  dataZoom: "DataZoomComponent",
  visualMap: "VisualMapComponent",
  // aria: 'AriaComponent',
  // dataset: 'DatasetComponent',
  // Dependencies
  xAxis: "GridComponent",
  yAxis: "GridComponent",
  angleAxis: "PolarComponent",
  radiusAxis: "PolarComponent"
}, FUe = {
  line: "LineChart",
  bar: "BarChart",
  pie: "PieChart",
  scatter: "ScatterChart",
  radar: "RadarChart",
  map: "MapChart",
  tree: "TreeChart",
  treemap: "TreemapChart",
  graph: "GraphChart",
  gauge: "GaugeChart",
  funnel: "FunnelChart",
  parallel: "ParallelChart",
  sankey: "SankeyChart",
  boxplot: "BoxplotChart",
  candlestick: "CandlestickChart",
  effectScatter: "EffectScatterChart",
  lines: "LinesChart",
  heatmap: "HeatmapChart",
  pictorialBar: "PictorialBarChart",
  themeRiver: "ThemeRiverChart",
  sunburst: "SunburstChart",
  custom: "CustomChart"
}, zC = {};
function WUe(t) {
  F(t, function(e, n) {
    if (!At.hasClass(n)) {
      var r = VUe[n];
      r && !zC[r] && ($i("Component " + n + ` is used but not imported.
import { ` + r + ` } from 'echarts/components';
echarts.use([` + r + "]);"), zC[r] = !0);
    }
  });
}
var a3 = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.init = function(n, r, i, a, o, s) {
      a = a || {}, this.option = null, this._theme = new xn(a), this._locale = new xn(o), this._optionManager = s;
    }, e.prototype.setOption = function(n, r, i) {
      process.env.NODE_ENV !== "production" && (at(n != null, "option is null/undefined"), at(n[hM] !== LG, "please use chart.getOption()"));
      var a = zG(r);
      this._optionManager.setOption(n, i, a), this._resetOption(null, a);
    }, e.prototype.resetOption = function(n, r) {
      return this._resetOption(n, zG(r));
    }, e.prototype._resetOption = function(n, r) {
      var i = !1, a = this._optionManager;
      if (!n || n === "recreate") {
        var o = a.mountOption(n === "recreate");
        process.env.NODE_ENV !== "production" && WUe(o), !this.option || n === "recreate" ? kG(this, o) : (this.restoreData(), this._mergeOption(o, r)), i = !0;
      }
      if ((n === "timeline" || n === "media") && this.restoreData(), !n || n === "recreate" || n === "timeline") {
        var s = a.getTimelineOption(this);
        s && (i = !0, this._mergeOption(s, r));
      }
      if (!n || n === "recreate" || n === "media") {
        var l = a.getMediaOption(this);
        l.length && F(l, function(u) {
          i = !0, this._mergeOption(u, r);
        }, this);
      }
      return i;
    }, e.prototype.mergeOption = function(n) {
      this._mergeOption(n, null);
    }, e.prototype._mergeOption = function(n, r) {
      var i = this.option, a = this._componentsMap, o = this._componentsCount, s = [], l = Ze(), u = r && r.replaceMergeMainTypeMap;
      DUe(this), F(n, function(f, d) {
        f != null && (At.hasClass(d) ? d && (s.push(d), l.set(d, !0)) : i[d] = i[d] == null ? ot(f) : mt(i[d], f, !0));
      }), u && u.each(function(f, d) {
        At.hasClass(d) && !l.get(d) && (s.push(d), l.set(d, !0));
      }), At.topologicalTravel(s, At.getAllClassMainTypes(), c, this);
      function c(f) {
        var d = LUe(this, f, wn(n[f])), h = a.get(f), p = (
          // `!oldCmptList` means init. See the comment in `mappingToExists`
          h ? u && u.get(f) ? "replaceMerge" : "normalMerge" : "replaceAll"
        ), v = Nse(h, d, p);
        lje(v, f, At), i[f] = null, a.set(f, null), o.set(f, 0);
        var g = [], m = [], y = 0, _, O;
        F(v, function(S, x) {
          var C = S.existing, P = S.newOption;
          if (!P)
            C && (C.mergeOption({}, this), C.optionUpdated({}, !1));
          else {
            var $ = f === "series", T = At.getClass(
              f,
              S.keyInfo.subType,
              !$
              // Give a more detailed warn later if series don't exists
            );
            if (!T) {
              if (process.env.NODE_ENV !== "production") {
                var E = S.keyInfo.subType, M = FUe[E];
                zC[E] || (zC[E] = !0, $i(M ? "Series " + E + ` is used but not imported.
import { ` + M + ` } from 'echarts/charts';
echarts.use([` + M + "]);" : "Unknown series " + E));
              }
              return;
            }
            if (f === "tooltip") {
              if (_) {
                process.env.NODE_ENV !== "production" && (O || (nr("Currently only one tooltip component is allowed."), O = !0));
                return;
              }
              _ = !0;
            }
            if (C && C.constructor === T)
              C.name = S.keyInfo.name, C.mergeOption(P, this), C.optionUpdated(P, !1);
            else {
              var R = _e({
                componentIndex: x
              }, S.keyInfo);
              C = new T(P, this, this, R), _e(C, R), S.brandNew && (C.__requireNewView = !0), C.init(P, this, this), C.optionUpdated(null, !0);
            }
          }
          C ? (g.push(C.option), m.push(C), y++) : (g.push(void 0), m.push(void 0));
        }, this), i[f] = g, a.set(f, m), o.set(f, y), f === "series" && OS(this);
      }
      this._seriesIndices || OS(this);
    }, e.prototype.getOption = function() {
      var n = ot(this.option);
      return F(n, function(r, i) {
        if (At.hasClass(i)) {
          for (var a = wn(r), o = a.length, s = !1, l = o - 1; l >= 0; l--)
            a[l] && !Fg(a[l]) ? s = !0 : (a[l] = null, !s && o--);
          a.length = o, n[i] = a;
        }
      }), delete n[hM], n;
    }, e.prototype.getTheme = function() {
      return this._theme;
    }, e.prototype.getLocaleModel = function() {
      return this._locale;
    }, e.prototype.setUpdatePayload = function(n) {
      this._payload = n;
    }, e.prototype.getUpdatePayload = function() {
      return this._payload;
    }, e.prototype.getComponent = function(n, r) {
      var i = this._componentsMap.get(n);
      if (i) {
        var a = i[r || 0];
        if (a)
          return a;
        if (r == null) {
          for (var o = 0; o < i.length; o++)
            if (i[o])
              return i[o];
        }
      }
    }, e.prototype.queryComponents = function(n) {
      var r = n.mainType;
      if (!r)
        return [];
      var i = n.index, a = n.id, o = n.name, s = this._componentsMap.get(r);
      if (!s || !s.length)
        return [];
      var l;
      return i != null ? (l = [], F(wn(i), function(u) {
        s[u] && l.push(s[u]);
      })) : a != null ? l = NG("id", a, s) : o != null ? l = NG("name", o, s) : l = yn(s, function(u) {
        return !!u;
      }), BG(l, n);
    }, e.prototype.findComponents = function(n) {
      var r = n.query, i = n.mainType, a = s(r), o = a ? this.queryComponents(a) : yn(this._componentsMap.get(i), function(u) {
        return !!u;
      });
      return l(BG(o, n));
      function s(u) {
        var c = i + "Index", f = i + "Id", d = i + "Name";
        return u && (u[c] != null || u[f] != null || u[d] != null) ? {
          mainType: i,
          // subType will be filtered finally.
          index: u[c],
          id: u[f],
          name: u[d]
        } : null;
      }
      function l(u) {
        return n.filter ? yn(u, n.filter) : u;
      }
    }, e.prototype.eachComponent = function(n, r, i) {
      var a = this._componentsMap;
      if (qe(n)) {
        var o = r, s = n;
        a.each(function(f, d) {
          for (var h = 0; f && h < f.length; h++) {
            var p = f[h];
            p && s.call(o, d, p, p.componentIndex);
          }
        });
      } else
        for (var l = Ve(n) ? a.get(n) : nt(n) ? this.findComponents(n) : null, u = 0; l && u < l.length; u++) {
          var c = l[u];
          c && r.call(i, c, c.componentIndex);
        }
    }, e.prototype.getSeriesByName = function(n) {
      var r = Br(n, null);
      return yn(this._componentsMap.get("series"), function(i) {
        return !!i && r != null && i.name === r;
      });
    }, e.prototype.getSeriesByIndex = function(n) {
      return this._componentsMap.get("series")[n];
    }, e.prototype.getSeriesByType = function(n) {
      return yn(this._componentsMap.get("series"), function(r) {
        return !!r && r.subType === n;
      });
    }, e.prototype.getSeries = function() {
      return yn(this._componentsMap.get("series"), function(n) {
        return !!n;
      });
    }, e.prototype.getSeriesCount = function() {
      return this._componentsCount.get("series");
    }, e.prototype.eachSeries = function(n, r) {
      I0(this), F(this._seriesIndices, function(i) {
        var a = this._componentsMap.get("series")[i];
        n.call(r, a, i);
      }, this);
    }, e.prototype.eachRawSeries = function(n, r) {
      F(this._componentsMap.get("series"), function(i) {
        i && n.call(r, i, i.componentIndex);
      });
    }, e.prototype.eachSeriesByType = function(n, r, i) {
      I0(this), F(this._seriesIndices, function(a) {
        var o = this._componentsMap.get("series")[a];
        o.subType === n && r.call(i, o, a);
      }, this);
    }, e.prototype.eachRawSeriesByType = function(n, r, i) {
      return F(this.getSeriesByType(n), r, i);
    }, e.prototype.isSeriesFiltered = function(n) {
      return I0(this), this._seriesIndicesMap.get(n.componentIndex) == null;
    }, e.prototype.getCurrentSeriesIndices = function() {
      return (this._seriesIndices || []).slice();
    }, e.prototype.filterSeries = function(n, r) {
      I0(this);
      var i = [];
      F(this._seriesIndices, function(a) {
        var o = this._componentsMap.get("series")[a];
        n.call(r, o, a) && i.push(a);
      }, this), this._seriesIndices = i, this._seriesIndicesMap = Ze(i);
    }, e.prototype.restoreData = function(n) {
      OS(this);
      var r = this._componentsMap, i = [];
      r.each(function(a, o) {
        At.hasClass(o) && i.push(o);
      }), At.topologicalTravel(i, At.getAllClassMainTypes(), function(a) {
        F(r.get(a), function(o) {
          o && (a !== "series" || !QUe(o, n)) && o.restoreData();
        });
      });
    }, e.internalField = function() {
      OS = function(n) {
        var r = n._seriesIndices = [];
        F(n._componentsMap.get("series"), function(i) {
          i && r.push(i.componentIndex);
        }), n._seriesIndicesMap = Ze(r);
      }, I0 = function(n) {
        if (process.env.NODE_ENV !== "production" && !n._seriesIndices)
          throw new Error("Option should contains series.");
      }, kG = function(n, r) {
        n.option = {}, n.option[hM] = LG, n._componentsMap = Ze({
          series: []
        }), n._componentsCount = Ze();
        var i = r.aria;
        nt(i) && i.enabled == null && (i.enabled = !0), HUe(r, n._theme.option), mt(r, IUe, !1), n._mergeOption(r, null);
      };
    }(), e;
  }(xn)
);
function QUe(t, e) {
  if (e) {
    var n = e.seriesIndex, r = e.seriesId, i = e.seriesName;
    return n != null && t.componentIndex !== n || r != null && t.id !== r || i != null && t.name !== i;
  }
}
function HUe(t, e) {
  var n = t.color && !t.colorLayer;
  F(e, function(r, i) {
    i === "colorLayer" && n || At.hasClass(i) || (typeof r == "object" ? t[i] = t[i] ? mt(t[i], r, !1) : ot(r) : t[i] == null && (t[i] = r));
  });
}
function NG(t, e, n) {
  if (Se(e)) {
    var r = Ze();
    return F(e, function(a) {
      if (a != null) {
        var o = Br(a, null);
        o != null && r.set(a, !0);
      }
    }), yn(n, function(a) {
      return a && r.get(a[t]);
    });
  } else {
    var i = Br(e, null);
    return yn(n, function(a) {
      return a && i != null && a[t] === i;
    });
  }
}
function BG(t, e) {
  return e.hasOwnProperty("subType") ? yn(t, function(n) {
    return n && n.subType === e.subType;
  }) : t;
}
function zG(t) {
  var e = Ze();
  return t && F(wn(t.replaceMerge), function(n) {
    process.env.NODE_ENV !== "production" && at(At.hasClass(n), '"' + n + '" is not valid component main type in "replaceMerge"'), e.set(n, !0);
  }), {
    replaceMergeMainTypeMap: e
  };
}
vr(a3, i3);
var GUe = [
  "getDom",
  "getZr",
  "getWidth",
  "getHeight",
  "getDevicePixelRatio",
  "dispatchAction",
  "isSSR",
  "isDisposed",
  "on",
  "off",
  "getDataURL",
  "getConnectedDataURL",
  // 'getModel',
  "getOption",
  // 'getViewOfComponentModel',
  // 'getViewOfSeriesModel',
  "getId",
  "updateLabelLayout"
], aue = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e) {
      F(GUe, function(n) {
        this[n] = We(e[n], e);
      }, this);
    }
    return t;
  }()
), pM = {}, gp = (
  /** @class */
  function() {
    function t() {
      this._coordinateSystems = [];
    }
    return t.prototype.create = function(e, n) {
      var r = [];
      F(pM, function(i, a) {
        var o = i.create(e, n);
        r = r.concat(o || []);
      }), this._coordinateSystems = r;
    }, t.prototype.update = function(e, n) {
      F(this._coordinateSystems, function(r) {
        r.update && r.update(e, n);
      });
    }, t.prototype.getCoordinateSystems = function() {
      return this._coordinateSystems.slice();
    }, t.register = function(e, n) {
      pM[e] = n;
    }, t.get = function(e) {
      return pM[e];
    }, t;
  }()
), jUe = /^(min|max)?(.+)$/, ZUe = (
  /** @class */
  function() {
    function t(e) {
      this._timelineOptions = [], this._mediaList = [], this._currentMediaIndices = [], this._api = e;
    }
    return t.prototype.setOption = function(e, n, r) {
      e && (F(wn(e.series), function(o) {
        o && o.data && Wi(o.data) && Vb(o.data);
      }), F(wn(e.dataset), function(o) {
        o && o.source && Wi(o.source) && Vb(o.source);
      })), e = ot(e);
      var i = this._optionBackup, a = UUe(e, n, !i);
      this._newBaseOption = a.baseOption, i ? (a.timelineOptions.length && (i.timelineOptions = a.timelineOptions), a.mediaList.length && (i.mediaList = a.mediaList), a.mediaDefault && (i.mediaDefault = a.mediaDefault)) : this._optionBackup = a;
    }, t.prototype.mountOption = function(e) {
      var n = this._optionBackup;
      return this._timelineOptions = n.timelineOptions, this._mediaList = n.mediaList, this._mediaDefault = n.mediaDefault, this._currentMediaIndices = [], ot(e ? n.baseOption : this._newBaseOption);
    }, t.prototype.getTimelineOption = function(e) {
      var n, r = this._timelineOptions;
      if (r.length) {
        var i = e.getComponent("timeline");
        i && (n = ot(
          // FIXME:TS as TimelineModel or quivlant interface
          r[i.getCurrentIndex()]
        ));
      }
      return n;
    }, t.prototype.getMediaOption = function(e) {
      var n = this._api.getWidth(), r = this._api.getHeight(), i = this._mediaList, a = this._mediaDefault, o = [], s = [];
      if (!i.length && !a)
        return s;
      for (var l = 0, u = i.length; l < u; l++)
        XUe(i[l].query, n, r) && o.push(l);
      return !o.length && a && (o = [-1]), o.length && !qUe(o, this._currentMediaIndices) && (s = Ce(o, function(c) {
        return ot(c === -1 ? a.option : i[c].option);
      })), this._currentMediaIndices = o, s;
    }, t;
  }()
);
function UUe(t, e, n) {
  var r = [], i, a, o = t.baseOption, s = t.timeline, l = t.options, u = t.media, c = !!t.media, f = !!(l || s || o && o.timeline);
  o ? (a = o, a.timeline || (a.timeline = s)) : ((f || c) && (t.options = t.media = null), a = t), c && (Se(u) ? F(u, function(h) {
    process.env.NODE_ENV !== "production" && h && !h.option && nt(h.query) && nt(h.query.option) && $i("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"), h && h.option && (h.query ? r.push(h) : i || (i = h));
  }) : process.env.NODE_ENV !== "production" && $i("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")), d(a), F(l, function(h) {
    return d(h);
  }), F(r, function(h) {
    return d(h.option);
  });
  function d(h) {
    F(e, function(p) {
      p(h, n);
    });
  }
  return {
    baseOption: a,
    timelineOptions: l || [],
    mediaDefault: i,
    mediaList: r
  };
}
function XUe(t, e, n) {
  var r = {
    width: e,
    height: n,
    aspectratio: e / n
    // lower case for convenience.
  }, i = !0;
  return F(t, function(a, o) {
    var s = o.match(jUe);
    if (!(!s || !s[1] || !s[2])) {
      var l = s[1], u = s[2].toLowerCase();
      YUe(r[u], a, l) || (i = !1);
    }
  }), i;
}
function YUe(t, e, n) {
  return n === "min" ? t >= e : n === "max" ? t <= e : t === e;
}
function qUe(t, e) {
  return t.join(",") === e.join(",");
}
var Eo = F, Kb = nt, VG = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"];
function vM(t) {
  var e = t && t.itemStyle;
  if (e)
    for (var n = 0, r = VG.length; n < r; n++) {
      var i = VG[n], a = e.normal, o = e.emphasis;
      a && a[i] && (process.env.NODE_ENV !== "production" && yr("itemStyle.normal." + i, i), t[i] = t[i] || {}, t[i].normal ? mt(t[i].normal, a[i]) : t[i].normal = a[i], a[i] = null), o && o[i] && (process.env.NODE_ENV !== "production" && yr("itemStyle.emphasis." + i, "emphasis." + i), t[i] = t[i] || {}, t[i].emphasis ? mt(t[i].emphasis, o[i]) : t[i].emphasis = o[i], o[i] = null);
    }
}
function Li(t, e, n) {
  if (t && t[e] && (t[e].normal || t[e].emphasis)) {
    var r = t[e].normal, i = t[e].emphasis;
    r && (process.env.NODE_ENV !== "production" && ss("'normal' hierarchy in " + e + " has been removed since 4.0. All style properties are configured in " + e + " directly now."), n ? (t[e].normal = t[e].emphasis = null, it(t[e], r)) : t[e] = r), i && (process.env.NODE_ENV !== "production" && ss(e + ".emphasis has been changed to emphasis." + e + " since 4.0"), t.emphasis = t.emphasis || {}, t.emphasis[e] = i, i.focus && (t.emphasis.focus = i.focus), i.blurScope && (t.emphasis.blurScope = i.blurScope));
  }
}
function _y(t) {
  Li(t, "itemStyle"), Li(t, "lineStyle"), Li(t, "areaStyle"), Li(t, "label"), Li(t, "labelLine"), Li(t, "upperLabel"), Li(t, "edgeLabel");
}
function Tr(t, e) {
  var n = Kb(t) && t[e], r = Kb(n) && n.textStyle;
  if (r) {
    process.env.NODE_ENV !== "production" && ss("textStyle hierarchy in " + e + " has been removed since 4.0. All textStyle properties are configured in " + e + " directly now.");
    for (var i = 0, a = H9.length; i < a; i++) {
      var o = H9[i];
      r.hasOwnProperty(o) && (n[o] = r[o]);
    }
  }
}
function Bo(t) {
  t && (_y(t), Tr(t, "label"), t.emphasis && Tr(t.emphasis, "label"));
}
function KUe(t) {
  if (Kb(t)) {
    vM(t), _y(t), Tr(t, "label"), Tr(t, "upperLabel"), Tr(t, "edgeLabel"), t.emphasis && (Tr(t.emphasis, "label"), Tr(t.emphasis, "upperLabel"), Tr(t.emphasis, "edgeLabel"));
    var e = t.markPoint;
    e && (vM(e), Bo(e));
    var n = t.markLine;
    n && (vM(n), Bo(n));
    var r = t.markArea;
    r && Bo(r);
    var i = t.data;
    if (t.type === "graph") {
      i = i || t.nodes;
      var a = t.links || t.edges;
      if (a && !Wi(a))
        for (var o = 0; o < a.length; o++)
          Bo(a[o]);
      F(t.categories, function(u) {
        _y(u);
      });
    }
    if (i && !Wi(i))
      for (var o = 0; o < i.length; o++)
        Bo(i[o]);
    if (e = t.markPoint, e && e.data)
      for (var s = e.data, o = 0; o < s.length; o++)
        Bo(s[o]);
    if (n = t.markLine, n && n.data)
      for (var l = n.data, o = 0; o < l.length; o++)
        Se(l[o]) ? (Bo(l[o][0]), Bo(l[o][1])) : Bo(l[o]);
    t.type === "gauge" ? (Tr(t, "axisLabel"), Tr(t, "title"), Tr(t, "detail")) : t.type === "treemap" ? (Li(t.breadcrumb, "itemStyle"), F(t.levels, function(u) {
      _y(u);
    })) : t.type === "tree" && _y(t.leaves);
  }
}
function vu(t) {
  return Se(t) ? t : t ? [t] : [];
}
function FG(t) {
  return (Se(t) ? t[0] : t) || {};
}
function JUe(t, e) {
  Eo(vu(t.series), function(r) {
    Kb(r) && KUe(r);
  });
  var n = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
  e && n.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), Eo(n, function(r) {
    Eo(vu(t[r]), function(i) {
      i && (Tr(i, "axisLabel"), Tr(i.axisPointer, "label"));
    });
  }), Eo(vu(t.parallel), function(r) {
    var i = r && r.parallelAxisDefault;
    Tr(i, "axisLabel"), Tr(i && i.axisPointer, "label");
  }), Eo(vu(t.calendar), function(r) {
    Li(r, "itemStyle"), Tr(r, "dayLabel"), Tr(r, "monthLabel"), Tr(r, "yearLabel");
  }), Eo(vu(t.radar), function(r) {
    Tr(r, "name"), r.name && r.axisName == null && (r.axisName = r.name, delete r.name, process.env.NODE_ENV !== "production" && ss("name property in radar component has been changed to axisName")), r.nameGap != null && r.axisNameGap == null && (r.axisNameGap = r.nameGap, delete r.nameGap, process.env.NODE_ENV !== "production" && ss("nameGap property in radar component has been changed to axisNameGap")), process.env.NODE_ENV !== "production" && Eo(r.indicator, function(i) {
      i.text && yr("text", "name", "radar.indicator");
    });
  }), Eo(vu(t.geo), function(r) {
    Kb(r) && (Bo(r), Eo(vu(r.regions), function(i) {
      Bo(i);
    }));
  }), Eo(vu(t.timeline), function(r) {
    Bo(r), Li(r, "label"), Li(r, "itemStyle"), Li(r, "controlStyle", !0);
    var i = r.data;
    Se(i) && F(i, function(a) {
      nt(a) && (Li(a, "label"), Li(a, "itemStyle"));
    });
  }), Eo(vu(t.toolbox), function(r) {
    Li(r, "iconStyle"), Eo(r.feature, function(i) {
      Li(i, "iconStyle");
    });
  }), Tr(FG(t.axisPointer), "label"), Tr(FG(t.tooltip).axisPointer, "label");
}
function eXe(t, e) {
  for (var n = e.split(","), r = t, i = 0; i < n.length && (r = r && r[n[i]], r != null); i++)
    ;
  return r;
}
function tXe(t, e, n, r) {
  for (var i = e.split(","), a = t, o, s = 0; s < i.length - 1; s++)
    o = i[s], a[o] == null && (a[o] = {}), a = a[o];
  a[i[s]] == null && (a[i[s]] = n);
}
function WG(t) {
  t && F(nXe, function(e) {
    e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]]);
  });
}
var nXe = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]], rXe = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"], gM = [["borderRadius", "barBorderRadius"], ["borderColor", "barBorderColor"], ["borderWidth", "barBorderWidth"]];
function D0(t) {
  var e = t && t.itemStyle;
  if (e)
    for (var n = 0; n < gM.length; n++) {
      var r = gM[n][1], i = gM[n][0];
      e[r] != null && (e[i] = e[r], process.env.NODE_ENV !== "production" && yr(r, i));
    }
}
function QG(t) {
  t && t.alignTo === "edge" && t.margin != null && t.edgeDistance == null && (process.env.NODE_ENV !== "production" && yr("label.margin", "label.edgeDistance", "pie"), t.edgeDistance = t.margin);
}
function HG(t) {
  t && t.downplay && !t.blur && (t.blur = t.downplay, process.env.NODE_ENV !== "production" && yr("downplay", "blur", "sunburst"));
}
function iXe(t) {
  t && t.focusNodeAdjacency != null && (t.emphasis = t.emphasis || {}, t.emphasis.focus == null && (process.env.NODE_ENV !== "production" && yr("focusNodeAdjacency", "emphasis: { focus: 'adjacency'}", "graph/sankey"), t.emphasis.focus = "adjacency"));
}
function oue(t, e) {
  if (t)
    for (var n = 0; n < t.length; n++)
      e(t[n]), t[n] && oue(t[n].children, e);
}
function sue(t, e) {
  JUe(t, e), t.series = wn(t.series), F(t.series, function(n) {
    if (nt(n)) {
      var r = n.type;
      if (r === "line")
        n.clipOverflow != null && (n.clip = n.clipOverflow, process.env.NODE_ENV !== "production" && yr("clipOverflow", "clip", "line"));
      else if (r === "pie" || r === "gauge") {
        n.clockWise != null && (n.clockwise = n.clockWise, process.env.NODE_ENV !== "production" && yr("clockWise", "clockwise")), QG(n.label);
        var i = n.data;
        if (i && !Wi(i))
          for (var a = 0; a < i.length; a++)
            QG(i[a]);
        n.hoverOffset != null && (n.emphasis = n.emphasis || {}, (n.emphasis.scaleSize = null) && (process.env.NODE_ENV !== "production" && yr("hoverOffset", "emphasis.scaleSize"), n.emphasis.scaleSize = n.hoverOffset));
      } else if (r === "gauge") {
        var o = eXe(n, "pointer.color");
        o != null && tXe(n, "itemStyle.color", o);
      } else if (r === "bar") {
        D0(n), D0(n.backgroundStyle), D0(n.emphasis);
        var i = n.data;
        if (i && !Wi(i))
          for (var a = 0; a < i.length; a++)
            typeof i[a] == "object" && (D0(i[a]), D0(i[a] && i[a].emphasis));
      } else if (r === "sunburst") {
        var s = n.highlightPolicy;
        s && (n.emphasis = n.emphasis || {}, n.emphasis.focus || (n.emphasis.focus = s, process.env.NODE_ENV !== "production" && yr("highlightPolicy", "emphasis.focus", "sunburst"))), HG(n), oue(n.data, HG);
      } else r === "graph" || r === "sankey" ? iXe(n) : r === "map" && (n.mapType && !n.map && (process.env.NODE_ENV !== "production" && yr("mapType", "map", "map"), n.map = n.mapType), n.mapLocation && (process.env.NODE_ENV !== "production" && ss("`mapLocation` is not used anymore."), it(n, n.mapLocation)));
      n.hoverAnimation != null && (n.emphasis = n.emphasis || {}, n.emphasis && n.emphasis.scale == null && (process.env.NODE_ENV !== "production" && yr("hoverAnimation", "emphasis.scale"), n.emphasis.scale = n.hoverAnimation)), WG(n);
    }
  }), t.dataRange && (t.visualMap = t.dataRange), F(rXe, function(n) {
    var r = t[n];
    r && (Se(r) || (r = [r]), F(r, function(i) {
      WG(i);
    }));
  });
}
function aXe(t) {
  var e = Ze();
  t.eachSeries(function(n) {
    var r = n.get("stack");
    if (r) {
      var i = e.get(r) || e.set(r, []), a = n.getData(), o = {
        // Used for calculate axis extent automatically.
        // TODO: Type getCalculationInfo return more specific type?
        stackResultDimension: a.getCalculationInfo("stackResultDimension"),
        stackedOverDimension: a.getCalculationInfo("stackedOverDimension"),
        stackedDimension: a.getCalculationInfo("stackedDimension"),
        stackedByDimension: a.getCalculationInfo("stackedByDimension"),
        isStackedByIndex: a.getCalculationInfo("isStackedByIndex"),
        data: a,
        seriesModel: n
      };
      if (!o.stackedDimension || !(o.isStackedByIndex || o.stackedByDimension))
        return;
      i.length && a.setCalculationInfo("stackedOnSeries", i[i.length - 1].seriesModel), i.push(o);
    }
  }), e.each(oXe);
}
function oXe(t) {
  F(t, function(e, n) {
    var r = [], i = [NaN, NaN], a = [e.stackResultDimension, e.stackedOverDimension], o = e.data, s = e.isStackedByIndex, l = e.seriesModel.get("stackStrategy") || "samesign";
    o.modify(a, function(u, c, f) {
      var d = o.get(e.stackedDimension, f);
      if (isNaN(d))
        return i;
      var h, p;
      s ? p = o.getRawIndex(f) : h = o.get(e.stackedByDimension, f);
      for (var v = NaN, g = n - 1; g >= 0; g--) {
        var m = t[g];
        if (s || (p = m.data.rawIndexOf(m.stackedByDimension, h)), p >= 0) {
          var y = m.data.getByRawIndex(m.stackResultDimension, p);
          if (l === "all" || l === "positive" && y > 0 || l === "negative" && y < 0 || l === "samesign" && d >= 0 && y > 0 || l === "samesign" && d <= 0 && y < 0) {
            d = XGe(d, y), v = y;
            break;
          }
        }
      }
      return r[0] = d, r[1] = v, r;
    });
  });
}
var IP = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e) {
      this.data = e.data || (e.sourceFormat === Xl ? {} : []), this.sourceFormat = e.sourceFormat || Jle, this.seriesLayoutBy = e.seriesLayoutBy || Nl, this.startIndex = e.startIndex || 0, this.dimensionsDetectedCount = e.dimensionsDetectedCount, this.metaRawOption = e.metaRawOption;
      var n = this.dimensionsDefine = e.dimensionsDefine;
      if (n)
        for (var r = 0; r < n.length; r++) {
          var i = n[r];
          i.type == null && nue(this, r) === pi.Must && (i.type = "ordinal");
        }
    }
    return t;
  }()
);
function o3(t) {
  return t instanceof IP;
}
function Vk(t, e, n) {
  n = n || lue(t);
  var r = e.seriesLayoutBy, i = lXe(t, n, r, e.sourceHeader, e.dimensions), a = new IP({
    data: t,
    sourceFormat: n,
    seriesLayoutBy: r,
    dimensionsDefine: i.dimensionsDefine,
    startIndex: i.startIndex,
    dimensionsDetectedCount: i.dimensionsDetectedCount,
    metaRawOption: ot(e)
  });
  return a;
}
function s3(t) {
  return new IP({
    data: t,
    sourceFormat: Wi(t) ? Mu : hs
  });
}
function sXe(t) {
  return new IP({
    data: t.data,
    sourceFormat: t.sourceFormat,
    seriesLayoutBy: t.seriesLayoutBy,
    dimensionsDefine: ot(t.dimensionsDefine),
    startIndex: t.startIndex,
    dimensionsDetectedCount: t.dimensionsDetectedCount
  });
}
function lue(t) {
  var e = Jle;
  if (Wi(t))
    e = Mu;
  else if (Se(t)) {
    t.length === 0 && (e = Qi);
    for (var n = 0, r = t.length; n < r; n++) {
      var i = t[n];
      if (i != null) {
        if (Se(i) || Wi(i)) {
          e = Qi;
          break;
        } else if (nt(i)) {
          e = ps;
          break;
        }
      }
    }
  } else if (nt(t)) {
    for (var a in t)
      if (Qe(t, a) && Pi(t[a])) {
        e = Xl;
        break;
      }
  }
  return e;
}
function lXe(t, e, n, r, i) {
  var a, o;
  if (!t)
    return {
      dimensionsDefine: GG(i),
      startIndex: o,
      dimensionsDetectedCount: a
    };
  if (e === Qi) {
    var s = t;
    r === "auto" || r == null ? jG(function(u) {
      u != null && u !== "-" && (Ve(u) ? o == null && (o = 1) : o = 0);
    }, n, s, 10) : o = Kt(r) ? r : r ? 1 : 0, !i && o === 1 && (i = [], jG(function(u, c) {
      i[c] = u != null ? u + "" : "";
    }, n, s, 1 / 0)), a = i ? i.length : n === Pm ? s.length : s[0] ? s[0].length : null;
  } else if (e === ps)
    i || (i = uXe(t));
  else if (e === Xl)
    i || (i = [], F(t, function(u, c) {
      i.push(c);
    }));
  else if (e === hs) {
    var l = ym(t[0]);
    a = Se(l) && l.length || 1;
  } else e === Mu && process.env.NODE_ENV !== "production" && at(!!i, "dimensions must be given if data is TypedArray.");
  return {
    startIndex: o,
    dimensionsDefine: GG(i),
    dimensionsDetectedCount: a
  };
}
function uXe(t) {
  for (var e = 0, n; e < t.length && !(n = t[e++]); )
    ;
  if (n)
    return kt(n);
}
function GG(t) {
  if (t) {
    var e = Ze();
    return Ce(t, function(n, r) {
      n = nt(n) ? n : {
        name: n
      };
      var i = {
        name: n.name,
        displayName: n.displayName,
        type: n.type
      };
      if (i.name == null)
        return i;
      i.name += "", i.displayName == null && (i.displayName = i.name);
      var a = e.get(i.name);
      return a ? i.name += "-" + a.count++ : e.set(i.name, {
        count: 1
      }), i;
    });
  }
}
function jG(t, e, n, r) {
  if (e === Pm)
    for (var i = 0; i < n.length && i < r; i++)
      t(n[i] ? n[i][0] : null, i);
  else
    for (var a = n[0] || [], i = 0; i < a.length && i < r; i++)
      t(a[i], i);
}
function uue(t) {
  var e = t.sourceFormat;
  return e === ps || e === Xl;
}
var wd, Cd, Td, ZG, UG, cue = (
  /** @class */
  function() {
    function t(e, n) {
      var r = o3(e) ? e : s3(e);
      this._source = r;
      var i = this._data = r.data;
      if (r.sourceFormat === Mu) {
        if (process.env.NODE_ENV !== "production" && n == null)
          throw new Error("Typed array data must specify dimension size");
        this._offset = 0, this._dimSize = n, this._data = i;
      }
      UG(this, i, r);
    }
    return t.prototype.getSource = function() {
      return this._source;
    }, t.prototype.count = function() {
      return 0;
    }, t.prototype.getItem = function(e, n) {
    }, t.prototype.appendData = function(e) {
    }, t.prototype.clean = function() {
    }, t.protoInitialize = function() {
      var e = t.prototype;
      e.pure = !1, e.persistent = !0;
    }(), t.internalField = function() {
      var e;
      UG = function(o, s, l) {
        var u = l.sourceFormat, c = l.seriesLayoutBy, f = l.startIndex, d = l.dimensionsDefine, h = ZG[l3(u, c)];
        if (process.env.NODE_ENV !== "production" && at(h, "Invalide sourceFormat: " + u), _e(o, h), u === Mu)
          o.getItem = n, o.count = i, o.fillStorage = r;
        else {
          var p = fue(u, c);
          o.getItem = We(p, null, s, f, d);
          var v = due(u, c);
          o.count = We(v, null, s, f, d);
        }
      };
      var n = function(o, s) {
        o = o - this._offset, s = s || [];
        for (var l = this._data, u = this._dimSize, c = u * o, f = 0; f < u; f++)
          s[f] = l[c + f];
        return s;
      }, r = function(o, s, l, u) {
        for (var c = this._data, f = this._dimSize, d = 0; d < f; d++) {
          for (var h = u[d], p = h[0] == null ? 1 / 0 : h[0], v = h[1] == null ? -1 / 0 : h[1], g = s - o, m = l[d], y = 0; y < g; y++) {
            var _ = c[y * f + d];
            m[o + y] = _, _ < p && (p = _), _ > v && (v = _);
          }
          h[0] = p, h[1] = v;
        }
      }, i = function() {
        return this._data ? this._data.length / this._dimSize : 0;
      };
      ZG = (e = {}, e[Qi + "_" + Nl] = {
        pure: !0,
        appendData: a
      }, e[Qi + "_" + Pm] = {
        pure: !0,
        appendData: function() {
          throw new Error('Do not support appendData when set seriesLayoutBy: "row".');
        }
      }, e[ps] = {
        pure: !0,
        appendData: a
      }, e[Xl] = {
        pure: !0,
        appendData: function(o) {
          var s = this._data;
          F(o, function(l, u) {
            for (var c = s[u] || (s[u] = []), f = 0; f < (l || []).length; f++)
              c.push(l[f]);
          });
        }
      }, e[hs] = {
        appendData: a
      }, e[Mu] = {
        persistent: !1,
        pure: !0,
        appendData: function(o) {
          process.env.NODE_ENV !== "production" && at(Wi(o), "Added data must be TypedArray if data in initialization is TypedArray"), this._data = o;
        },
        // Clean self if data is already used.
        clean: function() {
          this._offset += this.count(), this._data = null;
        }
      }, e);
      function a(o) {
        for (var s = 0; s < o.length; s++)
          this._data.push(o[s]);
      }
    }(), t;
  }()
), XG = function(t, e, n, r) {
  return t[r];
}, cXe = (wd = {}, wd[Qi + "_" + Nl] = function(t, e, n, r) {
  return t[r + e];
}, wd[Qi + "_" + Pm] = function(t, e, n, r, i) {
  r += e;
  for (var a = i || [], o = t, s = 0; s < o.length; s++) {
    var l = o[s];
    a[s] = l ? l[r] : null;
  }
  return a;
}, wd[ps] = XG, wd[Xl] = function(t, e, n, r, i) {
  for (var a = i || [], o = 0; o < n.length; o++) {
    var s = n[o].name;
    if (process.env.NODE_ENV !== "production" && s == null)
      throw new Error();
    var l = t[s];
    a[o] = l ? l[r] : null;
  }
  return a;
}, wd[hs] = XG, wd);
function fue(t, e) {
  var n = cXe[l3(t, e)];
  return process.env.NODE_ENV !== "production" && at(n, 'Do not support get item on "' + t + '", "' + e + '".'), n;
}
var YG = function(t, e, n) {
  return t.length;
}, fXe = (Cd = {}, Cd[Qi + "_" + Nl] = function(t, e, n) {
  return Math.max(0, t.length - e);
}, Cd[Qi + "_" + Pm] = function(t, e, n) {
  var r = t[0];
  return r ? Math.max(0, r.length - e) : 0;
}, Cd[ps] = YG, Cd[Xl] = function(t, e, n) {
  var r = n[0].name;
  if (process.env.NODE_ENV !== "production" && r == null)
    throw new Error();
  var i = t[r];
  return i ? i.length : 0;
}, Cd[hs] = YG, Cd);
function due(t, e) {
  var n = fXe[l3(t, e)];
  return process.env.NODE_ENV !== "production" && at(n, 'Do not support count on "' + t + '", "' + e + '".'), n;
}
var mM = function(t, e, n) {
  return t[e];
}, dXe = (Td = {}, Td[Qi] = mM, Td[ps] = function(t, e, n) {
  return t[n];
}, Td[Xl] = mM, Td[hs] = function(t, e, n) {
  var r = ym(t);
  return r instanceof Array ? r[e] : r;
}, Td[Mu] = mM, Td);
function hue(t) {
  var e = dXe[t];
  return process.env.NODE_ENV !== "production" && at(e, 'Do not support get value on "' + t + '".'), e;
}
function l3(t, e) {
  return t === Qi ? t + "_" + e : t;
}
function Hg(t, e, n) {
  if (t) {
    var r = t.getRawDataItem(e);
    if (r != null) {
      var i = t.getStore(), a = i.getSource().sourceFormat;
      if (n != null) {
        var o = t.getDimensionIndex(n), s = i.getDimensionProperty(o);
        return hue(a)(r, o, s);
      } else {
        var l = r;
        return a === hs && (l = ym(r)), l;
      }
    }
  }
}
var hXe = /\{@(.+?)\}/g, DP = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getDataParams = function(e, n) {
      var r = this.getData(n), i = this.getRawValue(e, n), a = r.getRawIndex(e), o = r.getName(e), s = r.getRawDataItem(e), l = r.getItemVisual(e, "style"), u = l && l[r.getItemVisual(e, "drawType") || "fill"], c = l && l.stroke, f = this.mainType, d = f === "series", h = r.userOutput && r.userOutput.get();
      return {
        componentType: f,
        componentSubType: this.subType,
        componentIndex: this.componentIndex,
        seriesType: d ? this.subType : null,
        seriesIndex: this.seriesIndex,
        seriesId: d ? this.id : null,
        seriesName: d ? this.name : null,
        name: o,
        dataIndex: a,
        data: s,
        dataType: n,
        value: i,
        color: u,
        borderColor: c,
        dimensionNames: h ? h.fullDimensions : null,
        encode: h ? h.encode : null,
        // Param name list for mapping `a`, `b`, `c`, `d`, `e`
        $vars: ["seriesName", "name", "value"]
      };
    }, t.prototype.getFormattedLabel = function(e, n, r, i, a, o) {
      n = n || "normal";
      var s = this.getData(r), l = this.getDataParams(e, r);
      if (o && (l.value = o.interpolatedValue), i != null && Se(l.value) && (l.value = l.value[i]), !a) {
        var u = s.getItemModel(e);
        a = u.get(n === "normal" ? ["label", "formatter"] : [n, "label", "formatter"]);
      }
      if (qe(a))
        return l.status = n, l.dimensionIndex = i, a(l);
      if (Ve(a)) {
        var c = e3(a, l);
        return c.replace(hXe, function(f, d) {
          var h = d.length, p = d;
          p.charAt(0) === "[" && p.charAt(h - 1) === "]" && (p = +p.slice(1, h - 1), process.env.NODE_ENV !== "production" && isNaN(p) && $i("Invalide label formatter: @" + d + ", only support @[0], @[1], @[2], ..."));
          var v = Hg(s, e, p);
          if (o && Se(o.interpolatedValue)) {
            var g = s.getDimensionIndex(p);
            g >= 0 && (v = o.interpolatedValue[g]);
          }
          return v != null ? v + "" : "";
        });
      }
    }, t.prototype.getRawValue = function(e, n) {
      return Hg(this.getData(n), e);
    }, t.prototype.formatTooltip = function(e, n, r) {
    }, t;
  }()
);
function qG(t) {
  var e, n;
  return nt(t) ? t.type ? n = t : process.env.NODE_ENV !== "production" && console.warn("The return type of `formatTooltip` is not supported: " + fa(t)) : e = t, {
    text: e,
    // markers: markers || markersExisting,
    frag: n
  };
}
function ob(t) {
  return new pXe(t);
}
var pXe = (
  /** @class */
  function() {
    function t(e) {
      e = e || {}, this._reset = e.reset, this._plan = e.plan, this._count = e.count, this._onDirty = e.onDirty, this._dirty = !0;
    }
    return t.prototype.perform = function(e) {
      var n = this._upstream, r = e && e.skip;
      if (this._dirty && n) {
        var i = this.context;
        i.data = i.outputData = n.context.outputData;
      }
      this.__pipeline && (this.__pipeline.currentTask = this);
      var a;
      this._plan && !r && (a = this._plan(this.context));
      var o = c(this._modBy), s = this._modDataCount || 0, l = c(e && e.modBy), u = e && e.modDataCount || 0;
      (o !== l || s !== u) && (a = "reset");
      function c(y) {
        return !(y >= 1) && (y = 1), y;
      }
      var f;
      (this._dirty || a === "reset") && (this._dirty = !1, f = this._doReset(r)), this._modBy = l, this._modDataCount = u;
      var d = e && e.step;
      if (n ? (process.env.NODE_ENV !== "production" && at(n._outputDueEnd != null), this._dueEnd = n._outputDueEnd) : (process.env.NODE_ENV !== "production" && at(!this._progress || this._count), this._dueEnd = this._count ? this._count(this.context) : 1 / 0), this._progress) {
        var h = this._dueIndex, p = Math.min(d != null ? this._dueIndex + d : 1 / 0, this._dueEnd);
        if (!r && (f || h < p)) {
          var v = this._progress;
          if (Se(v))
            for (var g = 0; g < v.length; g++)
              this._doProgress(v[g], h, p, l, u);
          else
            this._doProgress(v, h, p, l, u);
        }
        this._dueIndex = p;
        var m = this._settedOutputEnd != null ? this._settedOutputEnd : p;
        process.env.NODE_ENV !== "production" && at(m >= this._outputDueEnd), this._outputDueEnd = m;
      } else
        this._dueIndex = this._outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : this._dueEnd;
      return this.unfinished();
    }, t.prototype.dirty = function() {
      this._dirty = !0, this._onDirty && this._onDirty(this.context);
    }, t.prototype._doProgress = function(e, n, r, i, a) {
      KG.reset(n, r, i, a), this._callingProgress = e, this._callingProgress({
        start: n,
        end: r,
        count: r - n,
        next: KG.next
      }, this.context);
    }, t.prototype._doReset = function(e) {
      this._dueIndex = this._outputDueEnd = this._dueEnd = 0, this._settedOutputEnd = null;
      var n, r;
      !e && this._reset && (n = this._reset(this.context), n && n.progress && (r = n.forceFirstProgress, n = n.progress), Se(n) && !n.length && (n = null)), this._progress = n, this._modBy = this._modDataCount = null;
      var i = this._downstream;
      return i && i.dirty(), r;
    }, t.prototype.unfinished = function() {
      return this._progress && this._dueIndex < this._dueEnd;
    }, t.prototype.pipe = function(e) {
      process.env.NODE_ENV !== "production" && at(e && !e._disposed && e !== this), (this._downstream !== e || this._dirty) && (this._downstream = e, e._upstream = this, e.dirty());
    }, t.prototype.dispose = function() {
      this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0);
    }, t.prototype.getUpstream = function() {
      return this._upstream;
    }, t.prototype.getDownstream = function() {
      return this._downstream;
    }, t.prototype.setOutputEnd = function(e) {
      this._outputDueEnd = this._settedOutputEnd = e;
    }, t;
  }()
), KG = /* @__PURE__ */ function() {
  var t, e, n, r, i, a = {
    reset: function(l, u, c, f) {
      e = l, t = u, n = c, r = f, i = Math.ceil(r / n), a.next = n > 1 && r > 0 ? s : o;
    }
  };
  return a;
  function o() {
    return e < t ? e++ : null;
  }
  function s() {
    var l = e % i * n + Math.ceil(e / i), u = e >= t ? null : l < r ? l : e;
    return e++, u;
  }
}();
function sf(t, e) {
  var n = e && e.type;
  return n === "ordinal" ? t : (n === "time" && !Kt(t) && t != null && t !== "-" && (t = +go(t)), t == null || t === "" ? NaN : Number(t));
}
var vXe = Ze({
  number: function(t) {
    return parseFloat(t);
  },
  time: function(t) {
    return +go(t);
  },
  trim: function(t) {
    return Ve(t) ? Zo(t) : t;
  }
});
function pue(t) {
  return vXe.get(t);
}
var vue = {
  lt: function(t, e) {
    return t < e;
  },
  lte: function(t, e) {
    return t <= e;
  },
  gt: function(t, e) {
    return t > e;
  },
  gte: function(t, e) {
    return t >= e;
  }
}, gXe = (
  /** @class */
  function() {
    function t(e, n) {
      if (!Kt(n)) {
        var r = "";
        process.env.NODE_ENV !== "production" && (r = 'rvalue of "<", ">", "<=", ">=" can only be number in filter.'), cn(r);
      }
      this._opFn = vue[e], this._rvalFloat = Gl(n);
    }
    return t.prototype.evaluate = function(e) {
      return Kt(e) ? this._opFn(e, this._rvalFloat) : this._opFn(Gl(e), this._rvalFloat);
    }, t;
  }()
), gue = (
  /** @class */
  function() {
    function t(e, n) {
      var r = e === "desc";
      this._resultLT = r ? 1 : -1, n == null && (n = r ? "min" : "max"), this._incomparable = n === "min" ? -1 / 0 : 1 / 0;
    }
    return t.prototype.evaluate = function(e, n) {
      var r = Kt(e) ? e : Gl(e), i = Kt(n) ? n : Gl(n), a = isNaN(r), o = isNaN(i);
      if (a && (r = this._incomparable), o && (i = this._incomparable), a && o) {
        var s = Ve(e), l = Ve(n);
        s && (r = l ? e : 0), l && (i = s ? n : 0);
      }
      return r < i ? this._resultLT : r > i ? -this._resultLT : 0;
    }, t;
  }()
), mXe = (
  /** @class */
  function() {
    function t(e, n) {
      this._rval = n, this._isEQ = e, this._rvalTypeof = typeof n, this._rvalFloat = Gl(n);
    }
    return t.prototype.evaluate = function(e) {
      var n = e === this._rval;
      if (!n) {
        var r = typeof e;
        r !== this._rvalTypeof && (r === "number" || this._rvalTypeof === "number") && (n = Gl(e) === this._rvalFloat);
      }
      return this._isEQ ? n : !n;
    }, t;
  }()
);
function yXe(t, e) {
  return t === "eq" || t === "ne" ? new mXe(t === "eq", e) : Qe(vue, t) ? new gXe(t, e) : null;
}
var bXe = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getRawData = function() {
      throw new Error("not supported");
    }, t.prototype.getRawDataItem = function(e) {
      throw new Error("not supported");
    }, t.prototype.cloneRawData = function() {
    }, t.prototype.getDimensionInfo = function(e) {
    }, t.prototype.cloneAllDimensionInfo = function() {
    }, t.prototype.count = function() {
    }, t.prototype.retrieveValue = function(e, n) {
    }, t.prototype.retrieveValueFromItem = function(e, n) {
    }, t.prototype.convertValue = function(e, n) {
      return sf(e, n);
    }, t;
  }()
);
function _Xe(t, e) {
  var n = new bXe(), r = t.data, i = n.sourceFormat = t.sourceFormat, a = t.startIndex, o = "";
  t.seriesLayoutBy !== Nl && (process.env.NODE_ENV !== "production" && (o = '`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'), cn(o));
  var s = [], l = {}, u = t.dimensionsDefine;
  if (u)
    F(u, function(v, g) {
      var m = v.name, y = {
        index: g,
        name: m,
        displayName: v.displayName
      };
      if (s.push(y), m != null) {
        var _ = "";
        Qe(l, m) && (process.env.NODE_ENV !== "production" && (_ = 'dimension name "' + m + '" duplicated.'), cn(_)), l[m] = y;
      }
    });
  else
    for (var c = 0; c < t.dimensionsDetectedCount; c++)
      s.push({
        index: c
      });
  var f = fue(i, Nl);
  e.__isBuiltIn && (n.getRawDataItem = function(v) {
    return f(r, a, s, v);
  }, n.getRawData = We(OXe, null, t)), n.cloneRawData = We(SXe, null, t);
  var d = due(i, Nl);
  n.count = We(d, null, r, a, s);
  var h = hue(i);
  n.retrieveValue = function(v, g) {
    var m = f(r, a, s, v);
    return p(m, g);
  };
  var p = n.retrieveValueFromItem = function(v, g) {
    if (v != null) {
      var m = s[g];
      if (m)
        return h(v, g, m.name);
    }
  };
  return n.getDimensionInfo = We(xXe, null, s, l), n.cloneAllDimensionInfo = We(wXe, null, s), n;
}
function OXe(t) {
  var e = t.sourceFormat;
  if (!u3(e)) {
    var n = "";
    process.env.NODE_ENV !== "production" && (n = "`getRawData` is not supported in source format " + e), cn(n);
  }
  return t.data;
}
function SXe(t) {
  var e = t.sourceFormat, n = t.data;
  if (!u3(e)) {
    var r = "";
    process.env.NODE_ENV !== "production" && (r = "`cloneRawData` is not supported in source format " + e), cn(r);
  }
  if (e === Qi) {
    for (var i = [], a = 0, o = n.length; a < o; a++)
      i.push(n[a].slice());
    return i;
  } else if (e === ps) {
    for (var i = [], a = 0, o = n.length; a < o; a++)
      i.push(_e({}, n[a]));
    return i;
  }
}
function xXe(t, e, n) {
  if (n != null) {
    if (Kt(n) || !isNaN(n) && !Qe(e, n))
      return t[n];
    if (Qe(e, n))
      return e[n];
  }
}
function wXe(t) {
  return ot(t);
}
var mue = Ze();
function CXe(t) {
  t = ot(t);
  var e = t.type, n = "";
  e || (process.env.NODE_ENV !== "production" && (n = "Must have a `type` when `registerTransform`."), cn(n));
  var r = e.split(":");
  r.length !== 2 && (process.env.NODE_ENV !== "production" && (n = 'Name must include namespace like "ns:regression".'), cn(n));
  var i = !1;
  r[0] === "echarts" && (e = r[1], i = !0), t.__isBuiltIn = i, mue.set(e, t);
}
function TXe(t, e, n) {
  var r = wn(t), i = r.length, a = "";
  i || (process.env.NODE_ENV !== "production" && (a = "If `transform` declared, it should at least contain one transform."), cn(a));
  for (var o = 0, s = i; o < s; o++) {
    var l = r[o];
    e = PXe(l, e, n, i === 1 ? null : o), o !== s - 1 && (e.length = Math.max(e.length, 1));
  }
  return e;
}
function PXe(t, e, n, r) {
  var i = "";
  e.length || (process.env.NODE_ENV !== "production" && (i = "Must have at least one upstream dataset."), cn(i)), nt(t) || (process.env.NODE_ENV !== "production" && (i = "transform declaration must be an object rather than " + typeof t + "."), cn(i));
  var a = t.type, o = mue.get(a);
  o || (process.env.NODE_ENV !== "production" && (i = 'Can not find transform on type "' + a + '".'), cn(i));
  var s = Ce(e, function(c) {
    return _Xe(c, o);
  }), l = wn(o.transform({
    upstream: s[0],
    upstreamList: s,
    config: ot(t.config)
  }));
  if (process.env.NODE_ENV !== "production" && t.print) {
    var u = Ce(l, function(c) {
      var f = r != null ? " === pipe index: " + r : "";
      return ["=== dataset index: " + n.datasetIndex + f + " ===", "- transform result data:", fa(c.data), "- transform result dimensions:", fa(c.dimensions)].join(`
`);
    }).join(`
`);
    JGe(u);
  }
  return Ce(l, function(c, f) {
    var d = "";
    nt(c) || (process.env.NODE_ENV !== "production" && (d = "A transform should not return some empty results."), cn(d)), c.data || (process.env.NODE_ENV !== "production" && (d = "Transform result data should be not be null or undefined"), cn(d));
    var h = lue(c.data);
    u3(h) || (process.env.NODE_ENV !== "production" && (d = "Transform result data should be array rows or object rows."), cn(d));
    var p, v = e[0];
    if (v && f === 0 && !c.dimensions) {
      var g = v.startIndex;
      g && (c.data = v.data.slice(0, g).concat(c.data)), p = {
        seriesLayoutBy: Nl,
        sourceHeader: g,
        dimensions: v.metaRawOption.dimensions
      };
    } else
      p = {
        seriesLayoutBy: Nl,
        sourceHeader: 0,
        dimensions: c.dimensions
      };
    return Vk(c.data, p, null);
  });
}
function u3(t) {
  return t === Qi || t === ps;
}
var RP = "undefined", $Xe = typeof Uint32Array === RP ? Array : Uint32Array, AXe = typeof Uint16Array === RP ? Array : Uint16Array, yue = typeof Int32Array === RP ? Array : Int32Array, JG = typeof Float64Array === RP ? Array : Float64Array, bue = {
  float: JG,
  int: yue,
  // Ordinal data type can be string or int
  ordinal: Array,
  number: Array,
  time: JG
}, yM;
function R0(t) {
  return t > 65535 ? $Xe : AXe;
}
function ev() {
  return [1 / 0, -1 / 0];
}
function EXe(t) {
  var e = t.constructor;
  return e === Array ? t.slice() : new e(t);
}
function ej(t, e, n, r, i) {
  var a = bue[n || "float"];
  if (i) {
    var o = t[e], s = o && o.length;
    if (s !== r) {
      for (var l = new a(r), u = 0; u < s; u++)
        l[u] = o[u];
      t[e] = l;
    }
  } else
    t[e] = new a(r);
}
var Fk = (
  /** @class */
  function() {
    function t() {
      this._chunks = [], this._rawExtent = [], this._extent = [], this._count = 0, this._rawCount = 0, this._calcDimNameToIdx = Ze();
    }
    return t.prototype.initData = function(e, n, r) {
      process.env.NODE_ENV !== "production" && at(qe(e.getItem) && qe(e.count), "Invalid data provider."), this._provider = e, this._chunks = [], this._indices = null, this.getRawIndex = this._getRawIdxIdentity;
      var i = e.getSource(), a = this.defaultDimValueGetter = yM[i.sourceFormat];
      this._dimValueGetter = r || a, this._rawExtent = [];
      var o = uue(i);
      this._dimensions = Ce(n, function(s) {
        return process.env.NODE_ENV !== "production" && o && at(s.property != null), {
          // Only pick these two props. Not leak other properties like orderMeta.
          type: s.type,
          property: s.property
        };
      }), this._initDataFromProvider(0, e.count());
    }, t.prototype.getProvider = function() {
      return this._provider;
    }, t.prototype.getSource = function() {
      return this._provider.getSource();
    }, t.prototype.ensureCalculationDimension = function(e, n) {
      var r = this._calcDimNameToIdx, i = this._dimensions, a = r.get(e);
      if (a != null) {
        if (i[a].type === n)
          return a;
      } else
        a = i.length;
      return i[a] = {
        type: n
      }, r.set(e, a), this._chunks[a] = new bue[n || "float"](this._rawCount), this._rawExtent[a] = ev(), a;
    }, t.prototype.collectOrdinalMeta = function(e, n) {
      var r = this._chunks[e], i = this._dimensions[e], a = this._rawExtent, o = i.ordinalOffset || 0, s = r.length;
      o === 0 && (a[e] = ev());
      for (var l = a[e], u = o; u < s; u++) {
        var c = r[u] = n.parseAndCollect(r[u]);
        isNaN(c) || (l[0] = Math.min(c, l[0]), l[1] = Math.max(c, l[1]));
      }
      i.ordinalMeta = n, i.ordinalOffset = s, i.type = "ordinal";
    }, t.prototype.getOrdinalMeta = function(e) {
      var n = this._dimensions[e], r = n.ordinalMeta;
      return r;
    }, t.prototype.getDimensionProperty = function(e) {
      var n = this._dimensions[e];
      return n && n.property;
    }, t.prototype.appendData = function(e) {
      process.env.NODE_ENV !== "production" && at(!this._indices, "appendData can only be called on raw data.");
      var n = this._provider, r = this.count();
      n.appendData(e);
      var i = n.count();
      return n.persistent || (i += r), r < i && this._initDataFromProvider(r, i, !0), [r, i];
    }, t.prototype.appendValues = function(e, n) {
      for (var r = this._chunks, i = this._dimensions, a = i.length, o = this._rawExtent, s = this.count(), l = s + Math.max(e.length, n || 0), u = 0; u < a; u++) {
        var c = i[u];
        ej(r, u, c.type, l, !0);
      }
      for (var f = [], d = s; d < l; d++)
        for (var h = d - s, p = 0; p < a; p++) {
          var c = i[p], v = yM.arrayRows.call(this, e[h] || f, c.property, h, p);
          r[p][d] = v;
          var g = o[p];
          v < g[0] && (g[0] = v), v > g[1] && (g[1] = v);
        }
      return this._rawCount = this._count = l, {
        start: s,
        end: l
      };
    }, t.prototype._initDataFromProvider = function(e, n, r) {
      for (var i = this._provider, a = this._chunks, o = this._dimensions, s = o.length, l = this._rawExtent, u = Ce(o, function(y) {
        return y.property;
      }), c = 0; c < s; c++) {
        var f = o[c];
        l[c] || (l[c] = ev()), ej(a, c, f.type, n, r);
      }
      if (i.fillStorage)
        i.fillStorage(e, n, a, l);
      else
        for (var d = [], h = e; h < n; h++) {
          d = i.getItem(h, d);
          for (var p = 0; p < s; p++) {
            var v = a[p], g = this._dimValueGetter(d, u[p], h, p);
            v[h] = g;
            var m = l[p];
            g < m[0] && (m[0] = g), g > m[1] && (m[1] = g);
          }
        }
      !i.persistent && i.clean && i.clean(), this._rawCount = this._count = n, this._extent = [];
    }, t.prototype.count = function() {
      return this._count;
    }, t.prototype.get = function(e, n) {
      if (!(n >= 0 && n < this._count))
        return NaN;
      var r = this._chunks[e];
      return r ? r[this.getRawIndex(n)] : NaN;
    }, t.prototype.getValues = function(e, n) {
      var r = [], i = [];
      if (n == null) {
        n = e, e = [];
        for (var a = 0; a < this._dimensions.length; a++)
          i.push(a);
      } else
        i = e;
      for (var a = 0, o = i.length; a < o; a++)
        r.push(this.get(i[a], n));
      return r;
    }, t.prototype.getByRawIndex = function(e, n) {
      if (!(n >= 0 && n < this._rawCount))
        return NaN;
      var r = this._chunks[e];
      return r ? r[n] : NaN;
    }, t.prototype.getSum = function(e) {
      var n = this._chunks[e], r = 0;
      if (n)
        for (var i = 0, a = this.count(); i < a; i++) {
          var o = this.get(e, i);
          isNaN(o) || (r += o);
        }
      return r;
    }, t.prototype.getMedian = function(e) {
      var n = [];
      this.each([e], function(a) {
        isNaN(a) || n.push(a);
      });
      var r = n.sort(function(a, o) {
        return a - o;
      }), i = this.count();
      return i === 0 ? 0 : i % 2 === 1 ? r[(i - 1) / 2] : (r[i / 2] + r[i / 2 - 1]) / 2;
    }, t.prototype.indexOfRawIndex = function(e) {
      if (e >= this._rawCount || e < 0)
        return -1;
      if (!this._indices)
        return e;
      var n = this._indices, r = n[e];
      if (r != null && r < this._count && r === e)
        return e;
      for (var i = 0, a = this._count - 1; i <= a; ) {
        var o = (i + a) / 2 | 0;
        if (n[o] < e)
          i = o + 1;
        else if (n[o] > e)
          a = o - 1;
        else
          return o;
      }
      return -1;
    }, t.prototype.indicesOfNearest = function(e, n, r) {
      var i = this._chunks, a = i[e], o = [];
      if (!a)
        return o;
      r == null && (r = 1 / 0);
      for (var s = 1 / 0, l = -1, u = 0, c = 0, f = this.count(); c < f; c++) {
        var d = this.getRawIndex(c), h = n - a[d], p = Math.abs(h);
        p <= r && ((p < s || p === s && h >= 0 && l < 0) && (s = p, l = h, u = 0), h === l && (o[u++] = c));
      }
      return o.length = u, o;
    }, t.prototype.getIndices = function() {
      var e, n = this._indices;
      if (n) {
        var r = n.constructor, i = this._count;
        if (r === Array) {
          e = new r(i);
          for (var a = 0; a < i; a++)
            e[a] = n[a];
        } else
          e = new r(n.buffer, 0, i);
      } else {
        var r = R0(this._rawCount);
        e = new r(this.count());
        for (var a = 0; a < e.length; a++)
          e[a] = a;
      }
      return e;
    }, t.prototype.filter = function(e, n) {
      if (!this._count)
        return this;
      for (var r = this.clone(), i = r.count(), a = R0(r._rawCount), o = new a(i), s = [], l = e.length, u = 0, c = e[0], f = r._chunks, d = 0; d < i; d++) {
        var h = void 0, p = r.getRawIndex(d);
        if (l === 0)
          h = n(d);
        else if (l === 1) {
          var v = f[c][p];
          h = n(v, d);
        } else {
          for (var g = 0; g < l; g++)
            s[g] = f[e[g]][p];
          s[g] = d, h = n.apply(null, s);
        }
        h && (o[u++] = p);
      }
      return u < i && (r._indices = o), r._count = u, r._extent = [], r._updateGetRawIdx(), r;
    }, t.prototype.selectRange = function(e) {
      var n = this.clone(), r = n._count;
      if (!r)
        return this;
      var i = kt(e), a = i.length;
      if (!a)
        return this;
      var o = n.count(), s = R0(n._rawCount), l = new s(o), u = 0, c = i[0], f = e[c][0], d = e[c][1], h = n._chunks, p = !1;
      if (!n._indices) {
        var v = 0;
        if (a === 1) {
          for (var g = h[i[0]], m = 0; m < r; m++) {
            var y = g[m];
            (y >= f && y <= d || isNaN(y)) && (l[u++] = v), v++;
          }
          p = !0;
        } else if (a === 2) {
          for (var g = h[i[0]], _ = h[i[1]], O = e[i[1]][0], S = e[i[1]][1], m = 0; m < r; m++) {
            var y = g[m], x = _[m];
            (y >= f && y <= d || isNaN(y)) && (x >= O && x <= S || isNaN(x)) && (l[u++] = v), v++;
          }
          p = !0;
        }
      }
      if (!p)
        if (a === 1)
          for (var m = 0; m < o; m++) {
            var C = n.getRawIndex(m), y = h[i[0]][C];
            (y >= f && y <= d || isNaN(y)) && (l[u++] = C);
          }
        else
          for (var m = 0; m < o; m++) {
            for (var P = !0, C = n.getRawIndex(m), $ = 0; $ < a; $++) {
              var T = i[$], y = h[T][C];
              (y < e[T][0] || y > e[T][1]) && (P = !1);
            }
            P && (l[u++] = n.getRawIndex(m));
          }
      return u < o && (n._indices = l), n._count = u, n._extent = [], n._updateGetRawIdx(), n;
    }, t.prototype.map = function(e, n) {
      var r = this.clone(e);
      return this._updateDims(r, e, n), r;
    }, t.prototype.modify = function(e, n) {
      this._updateDims(this, e, n);
    }, t.prototype._updateDims = function(e, n, r) {
      for (var i = e._chunks, a = [], o = n.length, s = e.count(), l = [], u = e._rawExtent, c = 0; c < n.length; c++)
        u[n[c]] = ev();
      for (var f = 0; f < s; f++) {
        for (var d = e.getRawIndex(f), h = 0; h < o; h++)
          l[h] = i[n[h]][d];
        l[o] = f;
        var p = r && r.apply(null, l);
        if (p != null) {
          typeof p != "object" && (a[0] = p, p = a);
          for (var c = 0; c < p.length; c++) {
            var v = n[c], g = p[c], m = u[v], y = i[v];
            y && (y[d] = g), g < m[0] && (m[0] = g), g > m[1] && (m[1] = g);
          }
        }
      }
    }, t.prototype.lttbDownSample = function(e, n) {
      var r = this.clone([e], !0), i = r._chunks, a = i[e], o = this.count(), s = 0, l = Math.floor(1 / n), u = this.getRawIndex(0), c, f, d, h = new (R0(this._rawCount))(Math.min((Math.ceil(o / l) + 2) * 2, o));
      h[s++] = u;
      for (var p = 1; p < o - 1; p += l) {
        for (var v = Math.min(p + l, o - 1), g = Math.min(p + l * 2, o), m = (g + v) / 2, y = 0, _ = v; _ < g; _++) {
          var O = this.getRawIndex(_), S = a[O];
          isNaN(S) || (y += S);
        }
        y /= g - v;
        var x = p, C = Math.min(p + l, o), P = p - 1, $ = a[u];
        c = -1, d = x;
        for (var T = -1, E = 0, _ = x; _ < C; _++) {
          var O = this.getRawIndex(_), S = a[O];
          if (isNaN(S)) {
            E++, T < 0 && (T = O);
            continue;
          }
          f = Math.abs((P - m) * (S - $) - (P - _) * (y - $)), f > c && (c = f, d = O);
        }
        E > 0 && E < C - x && (h[s++] = Math.min(T, d), d = Math.max(T, d)), h[s++] = d, u = d;
      }
      return h[s++] = this.getRawIndex(o - 1), r._count = s, r._indices = h, r.getRawIndex = this._getRawIdx, r;
    }, t.prototype.downSample = function(e, n, r, i) {
      for (var a = this.clone([e], !0), o = a._chunks, s = [], l = Math.floor(1 / n), u = o[e], c = this.count(), f = a._rawExtent[e] = ev(), d = new (R0(this._rawCount))(Math.ceil(c / l)), h = 0, p = 0; p < c; p += l) {
        l > c - p && (l = c - p, s.length = l);
        for (var v = 0; v < l; v++) {
          var g = this.getRawIndex(p + v);
          s[v] = u[g];
        }
        var m = r(s), y = this.getRawIndex(Math.min(p + i(s, m) || 0, c - 1));
        u[y] = m, m < f[0] && (f[0] = m), m > f[1] && (f[1] = m), d[h++] = y;
      }
      return a._count = h, a._indices = d, a._updateGetRawIdx(), a;
    }, t.prototype.each = function(e, n) {
      if (this._count)
        for (var r = e.length, i = this._chunks, a = 0, o = this.count(); a < o; a++) {
          var s = this.getRawIndex(a);
          switch (r) {
            case 0:
              n(a);
              break;
            case 1:
              n(i[e[0]][s], a);
              break;
            case 2:
              n(i[e[0]][s], i[e[1]][s], a);
              break;
            default:
              for (var l = 0, u = []; l < r; l++)
                u[l] = i[e[l]][s];
              u[l] = a, n.apply(null, u);
          }
        }
    }, t.prototype.getDataExtent = function(e) {
      var n = this._chunks[e], r = ev();
      if (!n)
        return r;
      var i = this.count(), a = !this._indices, o;
      if (a)
        return this._rawExtent[e].slice();
      if (o = this._extent[e], o)
        return o.slice();
      o = r;
      for (var s = o[0], l = o[1], u = 0; u < i; u++) {
        var c = this.getRawIndex(u), f = n[c];
        f < s && (s = f), f > l && (l = f);
      }
      return o = [s, l], this._extent[e] = o, o;
    }, t.prototype.getRawDataItem = function(e) {
      var n = this.getRawIndex(e);
      if (this._provider.persistent)
        return this._provider.getItem(n);
      for (var r = [], i = this._chunks, a = 0; a < i.length; a++)
        r.push(i[a][n]);
      return r;
    }, t.prototype.clone = function(e, n) {
      var r = new t(), i = this._chunks, a = e && os(e, function(s, l) {
        return s[l] = !0, s;
      }, {});
      if (a)
        for (var o = 0; o < i.length; o++)
          r._chunks[o] = a[o] ? EXe(i[o]) : i[o];
      else
        r._chunks = i;
      return this._copyCommonProps(r), n || (r._indices = this._cloneIndices()), r._updateGetRawIdx(), r;
    }, t.prototype._copyCommonProps = function(e) {
      e._count = this._count, e._rawCount = this._rawCount, e._provider = this._provider, e._dimensions = this._dimensions, e._extent = ot(this._extent), e._rawExtent = ot(this._rawExtent);
    }, t.prototype._cloneIndices = function() {
      if (this._indices) {
        var e = this._indices.constructor, n = void 0;
        if (e === Array) {
          var r = this._indices.length;
          n = new e(r);
          for (var i = 0; i < r; i++)
            n[i] = this._indices[i];
        } else
          n = new e(this._indices);
        return n;
      }
      return null;
    }, t.prototype._getRawIdxIdentity = function(e) {
      return e;
    }, t.prototype._getRawIdx = function(e) {
      return e < this._count && e >= 0 ? this._indices[e] : -1;
    }, t.prototype._updateGetRawIdx = function() {
      this.getRawIndex = this._indices ? this._getRawIdx : this._getRawIdxIdentity;
    }, t.internalField = function() {
      function e(n, r, i, a) {
        return sf(n[a], this._dimensions[a]);
      }
      yM = {
        arrayRows: e,
        objectRows: function(n, r, i, a) {
          return sf(n[r], this._dimensions[a]);
        },
        keyedColumns: e,
        original: function(n, r, i, a) {
          var o = n && (n.value == null ? n : n.value);
          return sf(o instanceof Array ? o[a] : o, this._dimensions[a]);
        },
        typedArray: function(n, r, i, a) {
          return n[a];
        }
      };
    }(), t;
  }()
), _ue = (
  /** @class */
  function() {
    function t(e) {
      this._sourceList = [], this._storeList = [], this._upstreamSignList = [], this._versionSignBase = 0, this._dirty = !0, this._sourceHost = e;
    }
    return t.prototype.dirty = function() {
      this._setLocalSource([], []), this._storeList = [], this._dirty = !0;
    }, t.prototype._setLocalSource = function(e, n) {
      this._sourceList = e, this._upstreamSignList = n, this._versionSignBase++, this._versionSignBase > 9e10 && (this._versionSignBase = 0);
    }, t.prototype._getVersionSign = function() {
      return this._sourceHost.uid + "_" + this._versionSignBase;
    }, t.prototype.prepareSource = function() {
      this._isDirty() && (this._createSource(), this._dirty = !1);
    }, t.prototype._createSource = function() {
      this._setLocalSource([], []);
      var e = this._sourceHost, n = this._getUpstreamSourceManagers(), r = !!n.length, i, a;
      if (k0(e)) {
        var o = e, s = void 0, l = void 0, u = void 0;
        if (r) {
          var c = n[0];
          c.prepareSource(), u = c.getSource(), s = u.data, l = u.sourceFormat, a = [c._getVersionSign()];
        } else
          s = o.get("data", !0), l = Wi(s) ? Mu : hs, a = [];
        var f = this._getSourceMetaRawOption() || {}, d = u && u.metaRawOption || {}, h = dt(f.seriesLayoutBy, d.seriesLayoutBy) || null, p = dt(f.sourceHeader, d.sourceHeader), v = dt(f.dimensions, d.dimensions), g = h !== d.seriesLayoutBy || !!p != !!d.sourceHeader || v;
        i = g ? [Vk(s, {
          seriesLayoutBy: h,
          sourceHeader: p,
          dimensions: v
        }, l)] : [];
      } else {
        var m = e;
        if (r) {
          var y = this._applyTransform(n);
          i = y.sourceList, a = y.upstreamSignList;
        } else {
          var _ = m.get("source", !0);
          i = [Vk(_, this._getSourceMetaRawOption(), null)], a = [];
        }
      }
      process.env.NODE_ENV !== "production" && at(i && a), this._setLocalSource(i, a);
    }, t.prototype._applyTransform = function(e) {
      var n = this._sourceHost, r = n.get("transform", !0), i = n.get("fromTransformResult", !0);
      if (process.env.NODE_ENV !== "production" && at(i != null || r != null), i != null) {
        var a = "";
        e.length !== 1 && (process.env.NODE_ENV !== "production" && (a = "When using `fromTransformResult`, there should be only one upstream dataset"), nj(a));
      }
      var o, s = [], l = [];
      return F(e, function(u) {
        u.prepareSource();
        var c = u.getSource(i || 0), f = "";
        i != null && !c && (process.env.NODE_ENV !== "production" && (f = "Can not retrieve result by `fromTransformResult`: " + i), nj(f)), s.push(c), l.push(u._getVersionSign());
      }), r ? o = TXe(r, s, {
        datasetIndex: n.componentIndex
      }) : i != null && (o = [sXe(s[0])]), {
        sourceList: o,
        upstreamSignList: l
      };
    }, t.prototype._isDirty = function() {
      if (this._dirty)
        return !0;
      for (var e = this._getUpstreamSourceManagers(), n = 0; n < e.length; n++) {
        var r = e[n];
        if (
          // Consider the case that there is ancestor diry, call it recursively.
          // The performance is probably not an issue because usually the chain is not long.
          r._isDirty() || this._upstreamSignList[n] !== r._getVersionSign()
        )
          return !0;
      }
    }, t.prototype.getSource = function(e) {
      e = e || 0;
      var n = this._sourceList[e];
      if (!n) {
        var r = this._getUpstreamSourceManagers();
        return r[0] && r[0].getSource(e);
      }
      return n;
    }, t.prototype.getSharedDataStore = function(e) {
      process.env.NODE_ENV !== "production" && at(k0(this._sourceHost), "Can only call getDataStore on series source manager.");
      var n = e.makeStoreSchema();
      return this._innerGetDataStore(n.dimensions, e.source, n.hash);
    }, t.prototype._innerGetDataStore = function(e, n, r) {
      var i = 0, a = this._storeList, o = a[i];
      o || (o = a[i] = {});
      var s = o[r];
      if (!s) {
        var l = this._getUpstreamSourceManagers()[0];
        k0(this._sourceHost) && l ? s = l._innerGetDataStore(e, n, r) : (s = new Fk(), s.initData(new cue(n, e.length), e)), o[r] = s;
      }
      return s;
    }, t.prototype._getUpstreamSourceManagers = function() {
      var e = this._sourceHost;
      if (k0(e)) {
        var n = r3(e);
        return n ? [n.getSourceManager()] : [];
      } else
        return Ce(RUe(e), function(r) {
          return r.getSourceManager();
        });
    }, t.prototype._getSourceMetaRawOption = function() {
      var e = this._sourceHost, n, r, i;
      if (k0(e))
        n = e.get("seriesLayoutBy", !0), r = e.get("sourceHeader", !0), i = e.get("dimensions", !0);
      else if (!this._getUpstreamSourceManagers().length) {
        var a = e;
        n = a.get("seriesLayoutBy", !0), r = a.get("sourceHeader", !0), i = a.get("dimensions", !0);
      }
      return {
        seriesLayoutBy: n,
        sourceHeader: r,
        dimensions: i
      };
    }, t;
  }()
);
function tj(t) {
  var e = t.option.transform;
  e && Vb(t.option.transform);
}
function k0(t) {
  return t.mainType === "series";
}
function nj(t) {
  throw new Error(t);
}
var Oue = "line-height:1";
function Sue(t, e) {
  var n = t.color || "#6e7079", r = t.fontSize || 12, i = t.fontWeight || "400", a = t.color || "#464646", o = t.fontSize || 14, s = t.fontWeight || "900";
  return e === "html" ? {
    // eslint-disable-next-line max-len
    nameStyle: "font-size:" + ea(r + "") + "px;color:" + ea(n) + ";font-weight:" + ea(i + ""),
    // eslint-disable-next-line max-len
    valueStyle: "font-size:" + ea(o + "") + "px;color:" + ea(a) + ";font-weight:" + ea(s + "")
  } : {
    nameStyle: {
      fontSize: r,
      fill: n,
      fontWeight: i
    },
    valueStyle: {
      fontSize: o,
      fill: a,
      fontWeight: s
    }
  };
}
var MXe = [0, 10, 20, 30], IXe = ["", `
`, `

`, `


`];
function ti(t, e) {
  return e.type = t, e;
}
function Wk(t) {
  return t.type === "section";
}
function xue(t) {
  return Wk(t) ? DXe : RXe;
}
function wue(t) {
  if (Wk(t)) {
    var e = 0, n = t.blocks.length, r = n > 1 || n > 0 && !t.noHeader;
    return F(t.blocks, function(i) {
      var a = wue(i);
      a >= e && (e = a + +(r && // 0 always can not be readable gap level.
      (!a || Wk(i) && !i.noHeader)));
    }), e;
  }
  return 0;
}
function DXe(t, e, n, r) {
  var i = e.noHeader, a = kXe(wue(e)), o = [], s = e.blocks || [];
  at(!s || Se(s)), s = s || [];
  var l = t.orderMode;
  if (e.sortBlocks && l) {
    s = s.slice();
    var u = {
      valueAsc: "asc",
      valueDesc: "desc"
    };
    if (Qe(u, l)) {
      var c = new gue(u[l], null);
      s.sort(function(p, v) {
        return c.evaluate(p.sortParam, v.sortParam);
      });
    } else l === "seriesDesc" && s.reverse();
  }
  F(s, function(p, v) {
    var g = e.valueFormatter, m = xue(p)(
      // Inherit valueFormatter
      g ? _e(_e({}, t), {
        valueFormatter: g
      }) : t,
      p,
      v > 0 ? a.html : 0,
      r
    );
    m != null && o.push(m);
  });
  var f = t.renderMode === "richText" ? o.join(a.richText) : Qk(o.join(""), i ? n : a.html);
  if (i)
    return f;
  var d = Lk(e.header, "ordinal", t.useUTC), h = Sue(r, t.renderMode).nameStyle;
  return t.renderMode === "richText" ? Cue(t, d, h) + a.richText + f : Qk('<div style="' + h + ";" + Oue + ';">' + ea(d) + "</div>" + f, n);
}
function RXe(t, e, n, r) {
  var i = t.renderMode, a = e.noName, o = e.noValue, s = !e.markerType, l = e.name, u = t.useUTC, c = e.valueFormatter || t.valueFormatter || function(O) {
    return O = Se(O) ? O : [O], Ce(O, function(S, x) {
      return Lk(S, Se(h) ? h[x] : h, u);
    });
  };
  if (!(a && o)) {
    var f = s ? "" : t.markupStyleCreator.makeTooltipMarker(e.markerType, e.markerColor || "#333", i), d = a ? "" : Lk(l, "ordinal", u), h = e.valueType, p = o ? [] : c(e.value, e.dataIndex), v = !s || !a, g = !s && a, m = Sue(r, i), y = m.nameStyle, _ = m.valueStyle;
    return i === "richText" ? (s ? "" : f) + (a ? "" : Cue(t, d, y)) + (o ? "" : BXe(t, p, v, g, _)) : Qk((s ? "" : f) + (a ? "" : LXe(d, !s, y)) + (o ? "" : NXe(p, v, g, _)), n);
  }
}
function rj(t, e, n, r, i, a) {
  if (t) {
    var o = xue(t), s = {
      useUTC: i,
      renderMode: n,
      orderMode: r,
      markupStyleCreator: e,
      valueFormatter: t.valueFormatter
    };
    return o(s, t, 0, a);
  }
}
function kXe(t) {
  return {
    html: MXe[t],
    richText: IXe[t]
  };
}
function Qk(t, e) {
  var n = '<div style="clear:both"></div>', r = "margin: " + e + "px 0 0";
  return '<div style="' + r + ";" + Oue + ';">' + t + n + "</div>";
}
function LXe(t, e, n) {
  var r = e ? "margin-left:2px" : "";
  return '<span style="' + n + ";" + r + '">' + ea(t) + "</span>";
}
function NXe(t, e, n, r) {
  var i = n ? "10px" : "20px", a = e ? "float:right;margin-left:" + i : "";
  return t = Se(t) ? t : [t], '<span style="' + a + ";" + r + '">' + Ce(t, function(o) {
    return ea(o);
  }).join("&nbsp;&nbsp;") + "</span>";
}
function Cue(t, e, n) {
  return t.markupStyleCreator.wrapRichTextStyle(e, n);
}
function BXe(t, e, n, r, i) {
  var a = [i], o = r ? 10 : 20;
  return n && a.push({
    padding: [0, 0, 0, o],
    align: "right"
  }), t.markupStyleCreator.wrapRichTextStyle(Se(e) ? e.join("  ") : e, a);
}
function Tue(t, e) {
  var n = t.getData().getItemVisual(e, "style"), r = n[t.visualDrawType];
  return Uh(r);
}
function Pue(t, e) {
  var n = t.get("padding");
  return n ?? (e === "richText" ? [8, 10] : 10);
}
var bM = (
  /** @class */
  function() {
    function t() {
      this.richTextStyles = {}, this._nextStyleNameId = Dse();
    }
    return t.prototype._generateStyleName = function() {
      return "__EC_aUTo_" + this._nextStyleNameId++;
    }, t.prototype.makeTooltipMarker = function(e, n, r) {
      var i = r === "richText" ? this._generateStyleName() : null, a = Xle({
        color: n,
        type: e,
        renderMode: r,
        markerId: i
      });
      return Ve(a) ? a : (process.env.NODE_ENV !== "production" && at(i), this.richTextStyles[i] = a.style, a.content);
    }, t.prototype.wrapRichTextStyle = function(e, n) {
      var r = {};
      Se(n) ? F(n, function(a) {
        return _e(r, a);
      }) : _e(r, n);
      var i = this._generateStyleName();
      return this.richTextStyles[i] = r, "{" + i + "|" + e + "}";
    }, t;
  }()
);
function $ue(t) {
  var e = t.series, n = t.dataIndex, r = t.multipleSeries, i = e.getData(), a = i.mapDimensionsAll("defaultedTooltip"), o = a.length, s = e.getRawValue(n), l = Se(s), u = Tue(e, n), c, f, d, h;
  if (o > 1 || l && !o) {
    var p = zXe(s, e, n, a, u);
    c = p.inlineValues, f = p.inlineValueTypes, d = p.blocks, h = p.inlineValues[0];
  } else if (o) {
    var v = i.getDimensionInfo(a[0]);
    h = c = Hg(i, n, a[0]), f = v.type;
  } else
    h = c = l ? s[0] : s;
  var g = A5(e), m = g && e.name || "", y = i.getName(n), _ = r ? m : y;
  return ti("section", {
    header: m,
    // When series name is not specified, do not show a header line with only '-'.
    // This case always happens in tooltip.trigger: 'item'.
    noHeader: r || !g,
    sortParam: h,
    blocks: [ti("nameValue", {
      markerType: "item",
      markerColor: u,
      // Do not mix display seriesName and itemName in one tooltip,
      // which might confuses users.
      name: _,
      // name dimension might be auto assigned, where the name might
      // be not readable. So we check trim here.
      noName: !Zo(_),
      value: c,
      valueType: f,
      dataIndex: n
    })].concat(d || [])
  });
}
function zXe(t, e, n, r, i) {
  var a = e.getData(), o = os(t, function(f, d, h) {
    var p = a.getDimensionInfo(h);
    return f = f || p && p.tooltip !== !1 && p.displayName != null;
  }, !1), s = [], l = [], u = [];
  r.length ? F(r, function(f) {
    c(Hg(a, n, f), f);
  }) : F(t, c);
  function c(f, d) {
    var h = a.getDimensionInfo(d);
    !h || h.otherDims.tooltip === !1 || (o ? u.push(ti("nameValue", {
      markerType: "subItem",
      markerColor: i,
      name: h.displayName,
      value: f,
      valueType: h.type
    })) : (s.push(f), l.push(h.type)));
  }
  return {
    inlineValues: s,
    inlineValueTypes: l,
    blocks: u
  };
}
var Oc = Ut();
function SS(t, e) {
  return t.getName(e) || t.getId(e);
}
var vw = "__universalTransitionEnabled", Cn = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n._selectedDataIndicesMap = {}, n;
    }
    return e.prototype.init = function(n, r, i) {
      this.seriesIndex = this.componentIndex, this.dataTask = ob({
        count: FXe,
        reset: WXe
      }), this.dataTask.context = {
        model: this
      }, this.mergeDefaultAndTheme(n, i);
      var a = Oc(this).sourceManager = new _ue(this);
      a.prepareSource();
      var o = this.getInitialData(n, i);
      aj(o, this), this.dataTask.context.data = o, process.env.NODE_ENV !== "production" && at(o, "getInitialData returned invalid data."), Oc(this).dataBeforeProcessed = o, ij(this), this._initSelectedMapFromData(o);
    }, e.prototype.mergeDefaultAndTheme = function(n, r) {
      var i = qb(this), a = i ? Tm(n) : {}, o = this.subType;
      At.hasClass(o) && (o += "Series"), mt(n, r.getTheme().get(this.subType)), mt(n, this.getDefaultOption()), Hh(n, "label", ["show"]), this.fillDataTextStyle(n.data), i && Of(n, a, i);
    }, e.prototype.mergeOption = function(n, r) {
      n = mt(this.option, n, !0), this.fillDataTextStyle(n.data);
      var i = qb(this);
      i && Of(this.option, n, i);
      var a = Oc(this).sourceManager;
      a.dirty(), a.prepareSource();
      var o = this.getInitialData(n, r);
      aj(o, this), this.dataTask.dirty(), this.dataTask.context.data = o, Oc(this).dataBeforeProcessed = o, ij(this), this._initSelectedMapFromData(o);
    }, e.prototype.fillDataTextStyle = function(n) {
      if (n && !Wi(n))
        for (var r = ["show"], i = 0; i < n.length; i++)
          n[i] && n[i].label && Hh(n[i], "label", r);
    }, e.prototype.getInitialData = function(n, r) {
    }, e.prototype.appendData = function(n) {
      var r = this.getRawData();
      r.appendData(n.data);
    }, e.prototype.getData = function(n) {
      var r = Hk(this);
      if (r) {
        var i = r.context.data;
        return n == null || !i.getLinkedData ? i : i.getLinkedData(n);
      } else
        return Oc(this).data;
    }, e.prototype.getAllData = function() {
      var n = this.getData();
      return n && n.getLinkedDataAll ? n.getLinkedDataAll() : [{
        data: n
      }];
    }, e.prototype.setData = function(n) {
      var r = Hk(this);
      if (r) {
        var i = r.context;
        i.outputData = n, r !== this.dataTask && (i.data = n);
      }
      Oc(this).data = n;
    }, e.prototype.getEncode = function() {
      var n = this.get("encode", !0);
      if (n)
        return Ze(n);
    }, e.prototype.getSourceManager = function() {
      return Oc(this).sourceManager;
    }, e.prototype.getSource = function() {
      return this.getSourceManager().getSource();
    }, e.prototype.getRawData = function() {
      return Oc(this).dataBeforeProcessed;
    }, e.prototype.getColorBy = function() {
      var n = this.get("colorBy");
      return n || "series";
    }, e.prototype.isColorBySeries = function() {
      return this.getColorBy() === "series";
    }, e.prototype.getBaseAxis = function() {
      var n = this.coordinateSystem;
      return n && n.getBaseAxis && n.getBaseAxis();
    }, e.prototype.formatTooltip = function(n, r, i) {
      return $ue({
        series: this,
        dataIndex: n,
        multipleSeries: r
      });
    }, e.prototype.isAnimationEnabled = function() {
      var n = this.ecModel;
      if (Gt.node && !(n && n.ssr))
        return !1;
      var r = this.getShallow("animation");
      return r && this.getData().count() > this.getShallow("animationThreshold") && (r = !1), !!r;
    }, e.prototype.restoreData = function() {
      this.dataTask.dirty();
    }, e.prototype.getColorFromPalette = function(n, r, i) {
      var a = this.ecModel, o = i3.prototype.getColorFromPalette.call(this, n, r, i);
      return o || (o = a.getColorFromPalette(n, r, i)), o;
    }, e.prototype.coordDimToDataDim = function(n) {
      return this.getRawData().mapDimensionsAll(n);
    }, e.prototype.getProgressive = function() {
      return this.get("progressive");
    }, e.prototype.getProgressiveThreshold = function() {
      return this.get("progressiveThreshold");
    }, e.prototype.select = function(n, r) {
      this._innerSelect(this.getData(r), n);
    }, e.prototype.unselect = function(n, r) {
      var i = this.option.selectedMap;
      if (i) {
        var a = this.option.selectedMode, o = this.getData(r);
        if (a === "series" || i === "all") {
          this.option.selectedMap = {}, this._selectedDataIndicesMap = {};
          return;
        }
        for (var s = 0; s < n.length; s++) {
          var l = n[s], u = SS(o, l);
          i[u] = !1, this._selectedDataIndicesMap[u] = -1;
        }
      }
    }, e.prototype.toggleSelect = function(n, r) {
      for (var i = [], a = 0; a < n.length; a++)
        i[0] = n[a], this.isSelected(n[a], r) ? this.unselect(i, r) : this.select(i, r);
    }, e.prototype.getSelectedDataIndices = function() {
      if (this.option.selectedMap === "all")
        return [].slice.call(this.getData().getIndices());
      for (var n = this._selectedDataIndicesMap, r = kt(n), i = [], a = 0; a < r.length; a++) {
        var o = n[r[a]];
        o >= 0 && i.push(o);
      }
      return i;
    }, e.prototype.isSelected = function(n, r) {
      var i = this.option.selectedMap;
      if (!i)
        return !1;
      var a = this.getData(r);
      return (i === "all" || i[SS(a, n)]) && !a.getItemModel(n).get(["select", "disabled"]);
    }, e.prototype.isUniversalTransitionEnabled = function() {
      if (this[vw])
        return !0;
      var n = this.option.universalTransition;
      return n ? n === !0 ? !0 : n && n.enabled : !1;
    }, e.prototype._innerSelect = function(n, r) {
      var i, a, o = this.option, s = o.selectedMode, l = r.length;
      if (!(!s || !l)) {
        if (s === "series")
          o.selectedMap = "all";
        else if (s === "multiple") {
          nt(o.selectedMap) || (o.selectedMap = {});
          for (var u = o.selectedMap, c = 0; c < l; c++) {
            var f = r[c], d = SS(n, f);
            u[d] = !0, this._selectedDataIndicesMap[d] = n.getRawIndex(f);
          }
        } else if (s === "single" || s === !0) {
          var h = r[l - 1], d = SS(n, h);
          o.selectedMap = (i = {}, i[d] = !0, i), this._selectedDataIndicesMap = (a = {}, a[d] = n.getRawIndex(h), a);
        }
      }
    }, e.prototype._initSelectedMapFromData = function(n) {
      if (!this.option.selectedMap) {
        var r = [];
        n.hasItemOption && n.each(function(i) {
          var a = n.getRawDataItem(i);
          a && a.selected && r.push(i);
        }), r.length > 0 && this._innerSelect(n, r);
      }
    }, e.registerClass = function(n) {
      return At.registerClass(n);
    }, e.protoInitialize = function() {
      var n = e.prototype;
      n.type = "series.__base__", n.seriesIndex = 0, n.ignoreStyleOnData = !1, n.hasSymbolVisual = !1, n.defaultSymbol = "circle", n.visualStyleAccessPath = "itemStyle", n.visualDrawType = "fill";
    }(), e;
  }(At)
);
vr(Cn, DP);
vr(Cn, i3);
Wse(Cn, At);
function ij(t) {
  var e = t.name;
  A5(t) || (t.name = VXe(t) || e);
}
function VXe(t) {
  var e = t.getRawData(), n = e.mapDimensionsAll("seriesName"), r = [];
  return F(n, function(i) {
    var a = e.getDimensionInfo(i);
    a.displayName && r.push(a.displayName);
  }), r.join(" ");
}
function FXe(t) {
  return t.model.getRawData().count();
}
function WXe(t) {
  var e = t.model;
  return e.setData(e.getRawData().cloneShallow()), QXe;
}
function QXe(t, e) {
  e.outputData && t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData);
}
function aj(t, e) {
  F(Fb(t.CHANGABLE_METHODS, t.DOWNSAMPLE_METHODS), function(n) {
    t.wrapMethod(n, vt(HXe, e));
  });
}
function HXe(t, e) {
  var n = Hk(t);
  return n && n.setOutputEnd((e || this).count()), e;
}
function Hk(t) {
  var e = (t.ecModel || {}).scheduler, n = e && e.getPipeline(t.uid);
  if (n) {
    var r = n.currentTask;
    if (r) {
      var i = r.agentStubMap;
      i && (r = i.get(t.uid));
    }
    return r;
  }
}
var Ln = (
  /** @class */
  function() {
    function t() {
      this.group = new ct(), this.uid = Cm("viewComponent");
    }
    return t.prototype.init = function(e, n) {
    }, t.prototype.render = function(e, n, r, i) {
    }, t.prototype.dispose = function(e, n) {
    }, t.prototype.updateView = function(e, n, r, i) {
    }, t.prototype.updateLayout = function(e, n, r, i) {
    }, t.prototype.updateVisual = function(e, n, r, i) {
    }, t.prototype.toggleBlurSeries = function(e, n, r) {
    }, t.prototype.eachRendered = function(e) {
      var n = this.group;
      n && n.traverse(e);
    }, t;
  }()
);
M5(Ln);
vP(Ln);
function $m() {
  var t = Ut();
  return function(e) {
    var n = t(e), r = e.pipelineContext, i = !!n.large, a = !!n.progressiveRender, o = n.large = !!(r && r.large), s = n.progressiveRender = !!(r && r.progressiveRender);
    return (i !== o || a !== s) && "reset";
  };
}
var Aue = Ut(), GXe = $m(), _n = (
  /** @class */
  function() {
    function t() {
      this.group = new ct(), this.uid = Cm("viewChart"), this.renderTask = ob({
        plan: jXe,
        reset: ZXe
      }), this.renderTask.context = {
        view: this
      };
    }
    return t.prototype.init = function(e, n) {
    }, t.prototype.render = function(e, n, r, i) {
      if (process.env.NODE_ENV !== "production")
        throw new Error("render method must been implemented");
    }, t.prototype.highlight = function(e, n, r, i) {
      var a = e.getData(i && i.dataType);
      if (!a) {
        process.env.NODE_ENV !== "production" && $i("Unknown dataType " + i.dataType);
        return;
      }
      sj(a, i, "emphasis");
    }, t.prototype.downplay = function(e, n, r, i) {
      var a = e.getData(i && i.dataType);
      if (!a) {
        process.env.NODE_ENV !== "production" && $i("Unknown dataType " + i.dataType);
        return;
      }
      sj(a, i, "normal");
    }, t.prototype.remove = function(e, n) {
      this.group.removeAll();
    }, t.prototype.dispose = function(e, n) {
    }, t.prototype.updateView = function(e, n, r, i) {
      this.render(e, n, r, i);
    }, t.prototype.updateLayout = function(e, n, r, i) {
      this.render(e, n, r, i);
    }, t.prototype.updateVisual = function(e, n, r, i) {
      this.render(e, n, r, i);
    }, t.prototype.eachRendered = function(e) {
      Nf(this.group, e);
    }, t.markUpdateMethod = function(e, n) {
      Aue(e).updateMethod = n;
    }, t.protoInitialize = function() {
      var e = t.prototype;
      e.type = "chart";
    }(), t;
  }()
);
function oj(t, e, n) {
  t && bf(t) && (e === "emphasis" ? Fu : Wu)(t, n);
}
function sj(t, e, n) {
  var r = Gh(t, e), i = e && e.highlightKey != null ? wZe(e.highlightKey) : null;
  r != null ? F(wn(r), function(a) {
    oj(t.getItemGraphicEl(a), n, i);
  }) : t.eachItemGraphicEl(function(a) {
    oj(a, n, i);
  });
}
M5(_n, ["dispose"]);
vP(_n);
function jXe(t) {
  return GXe(t.model);
}
function ZXe(t) {
  var e = t.model, n = t.ecModel, r = t.api, i = t.payload, a = e.pipelineContext.progressiveRender, o = t.view, s = i && Aue(i).updateMethod, l = a ? "incrementalPrepareRender" : s && o[s] ? s : "render";
  return l !== "render" && o[l](e, n, r, i), UXe[l];
}
var UXe = {
  incrementalPrepareRender: {
    progress: function(t, e) {
      e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload);
    }
  },
  render: {
    // Put view.render in `progress` to support appendData. But in this case
    // view.render should not be called in reset, otherwise it will be called
    // twise. Use `forceFirstProgress` to make sure that view.render is called
    // in any cases.
    forceFirstProgress: !0,
    progress: function(t, e) {
      e.view.render(e.model, e.ecModel, e.api, e.payload);
    }
  }
}, VC = "\0__throttleOriginMethod", lj = "\0__throttleRate", uj = "\0__throttleType";
function kP(t, e, n) {
  var r, i = 0, a = 0, o = null, s, l, u, c;
  e = e || 0;
  function f() {
    a = (/* @__PURE__ */ new Date()).getTime(), o = null, t.apply(l, u || []);
  }
  var d = function() {
    for (var h = [], p = 0; p < arguments.length; p++)
      h[p] = arguments[p];
    r = (/* @__PURE__ */ new Date()).getTime(), l = this, u = h;
    var v = c || e, g = c || n;
    c = null, s = r - (g ? i : a) - v, clearTimeout(o), g ? o = setTimeout(f, v) : s >= 0 ? f() : o = setTimeout(f, -s), i = r;
  };
  return d.clear = function() {
    o && (clearTimeout(o), o = null);
  }, d.debounceNextCall = function(h) {
    c = h;
  }, d;
}
function Am(t, e, n, r) {
  var i = t[e];
  if (i) {
    var a = i[VC] || i, o = i[uj], s = i[lj];
    if (s !== n || o !== r) {
      if (n == null || !r)
        return t[e] = a;
      i = t[e] = kP(a, n, r === "debounce"), i[VC] = a, i[uj] = r, i[lj] = n;
    }
    return i;
  }
}
function Jb(t, e) {
  var n = t[e];
  n && n[VC] && (n.clear && n.clear(), t[e] = n[VC]);
}
var cj = Ut(), fj = {
  itemStyle: jh(zle, !0),
  lineStyle: jh(Ble, !0)
}, XXe = {
  lineStyle: "stroke",
  itemStyle: "fill"
};
function Eue(t, e) {
  var n = t.visualStyleMapper || fj[e];
  return n || (console.warn("Unknown style type '" + e + "'."), fj.itemStyle);
}
function Mue(t, e) {
  var n = t.visualDrawType || XXe[e];
  return n || (console.warn("Unknown style type '" + e + "'."), "fill");
}
var YXe = {
  createOnAllSeries: !0,
  performRawSeries: !0,
  reset: function(t, e) {
    var n = t.getData(), r = t.visualStyleAccessPath || "itemStyle", i = t.getModel(r), a = Eue(t, r), o = a(i), s = i.getShallow("decal");
    s && (n.setVisual("decal", s), s.dirty = !0);
    var l = Mue(t, r), u = o[l], c = qe(u) ? u : null, f = o.fill === "auto" || o.stroke === "auto";
    if (!o[l] || c || f) {
      var d = t.getColorFromPalette(
        // TODO series count changed.
        t.name,
        null,
        e.getSeriesCount()
      );
      o[l] || (o[l] = d, n.setVisual("colorFromPalette", !0)), o.fill = o.fill === "auto" || qe(o.fill) ? d : o.fill, o.stroke = o.stroke === "auto" || qe(o.stroke) ? d : o.stroke;
    }
    if (n.setVisual("style", o), n.setVisual("drawType", l), !e.isSeriesFiltered(t) && c)
      return n.setVisual("colorFromPalette", !1), {
        dataEach: function(h, p) {
          var v = t.getDataParams(p), g = _e({}, o);
          g[l] = c(v), h.setItemVisual(p, "style", g);
        }
      };
  }
}, L0 = new xn(), qXe = {
  createOnAllSeries: !0,
  performRawSeries: !0,
  reset: function(t, e) {
    if (!(t.ignoreStyleOnData || e.isSeriesFiltered(t))) {
      var n = t.getData(), r = t.visualStyleAccessPath || "itemStyle", i = Eue(t, r), a = n.getVisual("drawType");
      return {
        dataEach: n.hasItemOption ? function(o, s) {
          var l = o.getRawDataItem(s);
          if (l && l[r]) {
            L0.option = l[r];
            var u = i(L0), c = o.ensureUniqueItemVisual(s, "style");
            _e(c, u), L0.option.decal && (o.setItemVisual(s, "decal", L0.option.decal), L0.option.decal.dirty = !0), a in u && o.setItemVisual(s, "colorFromPalette", !1);
          }
        } : null
      };
    }
  }
}, KXe = {
  performRawSeries: !0,
  overallReset: function(t) {
    var e = Ze();
    t.eachSeries(function(n) {
      var r = n.getColorBy();
      if (!n.isColorBySeries()) {
        var i = n.type + "-" + r, a = e.get(i);
        a || (a = {}, e.set(i, a)), cj(n).scope = a;
      }
    }), t.eachSeries(function(n) {
      if (!(n.isColorBySeries() || t.isSeriesFiltered(n))) {
        var r = n.getRawData(), i = {}, a = n.getData(), o = cj(n).scope, s = n.visualStyleAccessPath || "itemStyle", l = Mue(n, s);
        a.each(function(u) {
          var c = a.getRawIndex(u);
          i[c] = u;
        }), r.each(function(u) {
          var c = i[u], f = a.getItemVisual(c, "colorFromPalette");
          if (f) {
            var d = a.ensureUniqueItemVisual(c, "style"), h = r.getName(u) || u + "", p = r.count();
            d[l] = n.getColorFromPalette(h, o, p);
          }
        });
      }
    });
  }
}, xS = Math.PI;
function JXe(t, e) {
  e = e || {}, it(e, {
    text: "loading",
    textColor: "#000",
    fontSize: 12,
    fontWeight: "normal",
    fontStyle: "normal",
    fontFamily: "sans-serif",
    maskColor: "rgba(255, 255, 255, 0.8)",
    showSpinner: !0,
    color: "#5470c6",
    spinnerRadius: 10,
    lineWidth: 5,
    zlevel: 0
  });
  var n = new ct(), r = new Zt({
    style: {
      fill: e.maskColor
    },
    zlevel: e.zlevel,
    z: 1e4
  });
  n.add(r);
  var i = new jt({
    style: {
      text: e.text,
      fill: e.textColor,
      fontSize: e.fontSize,
      fontWeight: e.fontWeight,
      fontStyle: e.fontStyle,
      fontFamily: e.fontFamily
    },
    zlevel: e.zlevel,
    z: 10001
  }), a = new Zt({
    style: {
      fill: "none"
    },
    textContent: i,
    textConfig: {
      position: "right",
      distance: 10
    },
    zlevel: e.zlevel,
    z: 10001
  });
  n.add(a);
  var o;
  return e.showSpinner && (o = new SP({
    shape: {
      startAngle: -xS / 2,
      endAngle: -xS / 2 + 0.1,
      r: e.spinnerRadius
    },
    style: {
      stroke: e.color,
      lineCap: "round",
      lineWidth: e.lineWidth
    },
    zlevel: e.zlevel,
    z: 10001
  }), o.animateShape(!0).when(1e3, {
    endAngle: xS * 3 / 2
  }).start("circularInOut"), o.animateShape(!0).when(1e3, {
    startAngle: xS * 3 / 2
  }).delay(300).start("circularInOut"), n.add(o)), n.resize = function() {
    var s = i.getBoundingRect().width, l = e.showSpinner ? e.spinnerRadius : 0, u = (t.getWidth() - l * 2 - (e.showSpinner && s ? 10 : 0) - s) / 2 - (e.showSpinner && s ? 0 : 5 + s / 2) + (e.showSpinner ? 0 : s / 2) + (s ? 0 : l), c = t.getHeight() / 2;
    e.showSpinner && o.setShape({
      cx: u,
      cy: c
    }), a.setShape({
      x: u - l,
      y: c - l,
      width: l * 2,
      height: l * 2
    }), r.setShape({
      x: 0,
      y: 0,
      width: t.getWidth(),
      height: t.getHeight()
    });
  }, n.resize(), n;
}
var Iue = (
  /** @class */
  function() {
    function t(e, n, r, i) {
      this._stageTaskMap = Ze(), this.ecInstance = e, this.api = n, r = this._dataProcessorHandlers = r.slice(), i = this._visualHandlers = i.slice(), this._allHandlers = r.concat(i);
    }
    return t.prototype.restoreData = function(e, n) {
      e.restoreData(n), this._stageTaskMap.each(function(r) {
        var i = r.overallTask;
        i && i.dirty();
      });
    }, t.prototype.getPerformArgs = function(e, n) {
      if (e.__pipeline) {
        var r = this._pipelineMap.get(e.__pipeline.id), i = r.context, a = !n && r.progressiveEnabled && (!i || i.progressiveRender) && e.__idxInPipeline > r.blockIndex, o = a ? r.step : null, s = i && i.modDataCount, l = s != null ? Math.ceil(s / o) : null;
        return {
          step: o,
          modBy: l,
          modDataCount: s
        };
      }
    }, t.prototype.getPipeline = function(e) {
      return this._pipelineMap.get(e);
    }, t.prototype.updateStreamModes = function(e, n) {
      var r = this._pipelineMap.get(e.uid), i = e.getData(), a = i.count(), o = r.progressiveEnabled && n.incrementalPrepareRender && a >= r.threshold, s = e.get("large") && a >= e.get("largeThreshold"), l = e.get("progressiveChunkMode") === "mod" ? a : null;
      e.pipelineContext = r.context = {
        progressiveRender: o,
        modDataCount: l,
        large: s
      };
    }, t.prototype.restorePipelines = function(e) {
      var n = this, r = n._pipelineMap = Ze();
      e.eachSeries(function(i) {
        var a = i.getProgressive(), o = i.uid;
        r.set(o, {
          id: o,
          head: null,
          tail: null,
          threshold: i.getProgressiveThreshold(),
          progressiveEnabled: a && !(i.preventIncremental && i.preventIncremental()),
          blockIndex: -1,
          step: Math.round(a || 700),
          count: 0
        }), n._pipe(i, i.dataTask);
      });
    }, t.prototype.prepareStageTasks = function() {
      var e = this._stageTaskMap, n = this.api.getModel(), r = this.api;
      F(this._allHandlers, function(i) {
        var a = e.get(i.uid) || e.set(i.uid, {}), o = "";
        process.env.NODE_ENV !== "production" && (o = '"reset" and "overallReset" must not be both specified.'), at(!(i.reset && i.overallReset), o), i.reset && this._createSeriesStageTask(i, a, n, r), i.overallReset && this._createOverallStageTask(i, a, n, r);
      }, this);
    }, t.prototype.prepareView = function(e, n, r, i) {
      var a = e.renderTask, o = a.context;
      o.model = n, o.ecModel = r, o.api = i, a.__block = !e.incrementalPrepareRender, this._pipe(n, a);
    }, t.prototype.performDataProcessorTasks = function(e, n) {
      this._performStageTasks(this._dataProcessorHandlers, e, n, {
        block: !0
      });
    }, t.prototype.performVisualTasks = function(e, n, r) {
      this._performStageTasks(this._visualHandlers, e, n, r);
    }, t.prototype._performStageTasks = function(e, n, r, i) {
      i = i || {};
      var a = !1, o = this;
      F(e, function(l, u) {
        if (!(i.visualType && i.visualType !== l.visualType)) {
          var c = o._stageTaskMap.get(l.uid), f = c.seriesTaskMap, d = c.overallTask;
          if (d) {
            var h, p = d.agentStubMap;
            p.each(function(g) {
              s(i, g) && (g.dirty(), h = !0);
            }), h && d.dirty(), o.updatePayload(d, r);
            var v = o.getPerformArgs(d, i.block);
            p.each(function(g) {
              g.perform(v);
            }), d.perform(v) && (a = !0);
          } else f && f.each(function(g, m) {
            s(i, g) && g.dirty();
            var y = o.getPerformArgs(g, i.block);
            y.skip = !l.performRawSeries && n.isSeriesFiltered(g.context.model), o.updatePayload(g, r), g.perform(y) && (a = !0);
          });
        }
      });
      function s(l, u) {
        return l.setDirty && (!l.dirtyMap || l.dirtyMap.get(u.__pipeline.id));
      }
      this.unfinished = a || this.unfinished;
    }, t.prototype.performSeriesTasks = function(e) {
      var n;
      e.eachSeries(function(r) {
        n = r.dataTask.perform() || n;
      }), this.unfinished = n || this.unfinished;
    }, t.prototype.plan = function() {
      this._pipelineMap.each(function(e) {
        var n = e.tail;
        do {
          if (n.__block) {
            e.blockIndex = n.__idxInPipeline;
            break;
          }
          n = n.getUpstream();
        } while (n);
      });
    }, t.prototype.updatePayload = function(e, n) {
      n !== "remain" && (e.context.payload = n);
    }, t.prototype._createSeriesStageTask = function(e, n, r, i) {
      var a = this, o = n.seriesTaskMap, s = n.seriesTaskMap = Ze(), l = e.seriesType, u = e.getTargetSeries;
      e.createOnAllSeries ? r.eachRawSeries(c) : l ? r.eachRawSeriesByType(l, c) : u && u(r, i).each(c);
      function c(f) {
        var d = f.uid, h = s.set(d, o && o.get(d) || ob({
          plan: iYe,
          reset: aYe,
          count: sYe
        }));
        h.context = {
          model: f,
          ecModel: r,
          api: i,
          // PENDING: `useClearVisual` not used?
          useClearVisual: e.isVisual && !e.isLayout,
          plan: e.plan,
          reset: e.reset,
          scheduler: a
        }, a._pipe(f, h);
      }
    }, t.prototype._createOverallStageTask = function(e, n, r, i) {
      var a = this, o = n.overallTask = n.overallTask || ob({
        reset: eYe
      });
      o.context = {
        ecModel: r,
        api: i,
        overallReset: e.overallReset,
        scheduler: a
      };
      var s = o.agentStubMap, l = o.agentStubMap = Ze(), u = e.seriesType, c = e.getTargetSeries, f = !0, d = !1, h = "";
      process.env.NODE_ENV !== "production" && (h = '"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'), at(!e.createOnAllSeries, h), u ? r.eachRawSeriesByType(u, p) : c ? c(r, i).each(p) : (f = !1, F(r.getSeries(), p));
      function p(v) {
        var g = v.uid, m = l.set(g, s && s.get(g) || // When the result of `getTargetSeries` changed, the overallTask
        // should be set as dirty and re-performed.
        (d = !0, ob({
          reset: tYe,
          onDirty: rYe
        })));
        m.context = {
          model: v,
          overallProgress: f
          // FIXME:TS never used, so comment it
          // modifyOutputEnd: modifyOutputEnd
        }, m.agent = o, m.__block = f, a._pipe(v, m);
      }
      d && o.dirty();
    }, t.prototype._pipe = function(e, n) {
      var r = e.uid, i = this._pipelineMap.get(r);
      !i.head && (i.head = n), i.tail && i.tail.pipe(n), i.tail = n, n.__idxInPipeline = i.count++, n.__pipeline = i;
    }, t.wrapStageHandler = function(e, n) {
      return qe(e) && (e = {
        overallReset: e,
        seriesType: lYe(e)
      }), e.uid = Cm("stageHandler"), n && (e.visualType = n), e;
    }, t;
  }()
);
function eYe(t) {
  t.overallReset(t.ecModel, t.api, t.payload);
}
function tYe(t) {
  return t.overallProgress && nYe;
}
function nYe() {
  this.agent.dirty(), this.getDownstream().dirty();
}
function rYe() {
  this.agent && this.agent.dirty();
}
function iYe(t) {
  return t.plan ? t.plan(t.model, t.ecModel, t.api, t.payload) : null;
}
function aYe(t) {
  t.useClearVisual && t.data.clearAllVisual();
  var e = t.resetDefines = wn(t.reset(t.model, t.ecModel, t.api, t.payload));
  return e.length > 1 ? Ce(e, function(n, r) {
    return Due(r);
  }) : oYe;
}
var oYe = Due(0);
function Due(t) {
  return function(e, n) {
    var r = n.data, i = n.resetDefines[t];
    if (i && i.dataEach)
      for (var a = e.start; a < e.end; a++)
        i.dataEach(r, a);
    else i && i.progress && i.progress(e, r);
  };
}
function sYe(t) {
  return t.data.count();
}
function lYe(t) {
  FC = null;
  try {
    t(e_, Rue);
  } catch {
  }
  return FC;
}
var e_ = {}, Rue = {}, FC;
kue(e_, a3);
kue(Rue, aue);
e_.eachSeriesByType = e_.eachRawSeriesByType = function(t) {
  FC = t;
};
e_.eachComponent = function(t) {
  t.mainType === "series" && t.subType && (FC = t.subType);
};
function kue(t, e) {
  for (var n in e.prototype)
    t[n] = fr;
}
var dj = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"];
const uYe = {
  color: dj,
  colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], dj]
};
var Yi = "#B9B8CE", hj = "#100C2A", wS = function() {
  return {
    axisLine: {
      lineStyle: {
        color: Yi
      }
    },
    splitLine: {
      lineStyle: {
        color: "#484753"
      }
    },
    splitArea: {
      areaStyle: {
        color: ["rgba(255,255,255,0.02)", "rgba(255,255,255,0.05)"]
      }
    },
    minorSplitLine: {
      lineStyle: {
        color: "#20203B"
      }
    }
  };
}, pj = ["#4992ff", "#7cffb2", "#fddd60", "#ff6e76", "#58d9f9", "#05c091", "#ff8a45", "#8d48e3", "#dd79ff"], Lue = {
  darkMode: !0,
  color: pj,
  backgroundColor: hj,
  axisPointer: {
    lineStyle: {
      color: "#817f91"
    },
    crossStyle: {
      color: "#817f91"
    },
    label: {
      // TODO Contrast of label backgorundColor
      color: "#fff"
    }
  },
  legend: {
    textStyle: {
      color: Yi
    }
  },
  textStyle: {
    color: Yi
  },
  title: {
    textStyle: {
      color: "#EEF1FA"
    },
    subtextStyle: {
      color: "#B9B8CE"
    }
  },
  toolbox: {
    iconStyle: {
      borderColor: Yi
    }
  },
  dataZoom: {
    borderColor: "#71708A",
    textStyle: {
      color: Yi
    },
    brushStyle: {
      color: "rgba(135,163,206,0.3)"
    },
    handleStyle: {
      color: "#353450",
      borderColor: "#C5CBE3"
    },
    moveHandleStyle: {
      color: "#B0B6C3",
      opacity: 0.3
    },
    fillerColor: "rgba(135,163,206,0.2)",
    emphasis: {
      handleStyle: {
        borderColor: "#91B7F2",
        color: "#4D587D"
      },
      moveHandleStyle: {
        color: "#636D9A",
        opacity: 0.7
      }
    },
    dataBackground: {
      lineStyle: {
        color: "#71708A",
        width: 1
      },
      areaStyle: {
        color: "#71708A"
      }
    },
    selectedDataBackground: {
      lineStyle: {
        color: "#87A3CE"
      },
      areaStyle: {
        color: "#87A3CE"
      }
    }
  },
  visualMap: {
    textStyle: {
      color: Yi
    }
  },
  timeline: {
    lineStyle: {
      color: Yi
    },
    label: {
      color: Yi
    },
    controlStyle: {
      color: Yi,
      borderColor: Yi
    }
  },
  calendar: {
    itemStyle: {
      color: hj
    },
    dayLabel: {
      color: Yi
    },
    monthLabel: {
      color: Yi
    },
    yearLabel: {
      color: Yi
    }
  },
  timeAxis: wS(),
  logAxis: wS(),
  valueAxis: wS(),
  categoryAxis: wS(),
  line: {
    symbol: "circle"
  },
  graph: {
    color: pj
  },
  gauge: {
    title: {
      color: Yi
    },
    axisLine: {
      lineStyle: {
        color: [[1, "rgba(207,212,219,0.2)"]]
      }
    },
    axisLabel: {
      color: Yi
    },
    detail: {
      color: "#EEF1FA"
    }
  },
  candlestick: {
    itemStyle: {
      color: "#f64e56",
      color0: "#54ea92",
      borderColor: "#f64e56",
      borderColor0: "#54ea92"
      // borderColor: '#ca2824',
      // borderColor0: '#09a443'
    }
  }
};
Lue.categoryAxis.splitLine.show = !1;
var cYe = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.normalizeQuery = function(e) {
      var n = {}, r = {}, i = {};
      if (Ve(e)) {
        var a = $l(e);
        n.mainType = a.main || null, n.subType = a.sub || null;
      } else {
        var o = ["Index", "Name", "Id"], s = {
          name: 1,
          dataIndex: 1,
          dataType: 1
        };
        F(e, function(l, u) {
          for (var c = !1, f = 0; f < o.length; f++) {
            var d = o[f], h = u.lastIndexOf(d);
            if (h > 0 && h === u.length - d.length) {
              var p = u.slice(0, h);
              p !== "data" && (n.mainType = p, n[d.toLowerCase()] = l, c = !0);
            }
          }
          s.hasOwnProperty(u) && (r[u] = l, c = !0), c || (i[u] = l);
        });
      }
      return {
        cptQuery: n,
        dataQuery: r,
        otherQuery: i
      };
    }, t.prototype.filter = function(e, n) {
      var r = this.eventInfo;
      if (!r)
        return !0;
      var i = r.targetEl, a = r.packedEvent, o = r.model, s = r.view;
      if (!o || !s)
        return !0;
      var l = n.cptQuery, u = n.dataQuery;
      return c(l, o, "mainType") && c(l, o, "subType") && c(l, o, "index", "componentIndex") && c(l, o, "name") && c(l, o, "id") && c(u, a, "name") && c(u, a, "dataIndex") && c(u, a, "dataType") && (!s.filterForExposedEvent || s.filterForExposedEvent(e, n.otherQuery, i, a));
      function c(f, d, h, p) {
        return f[h] == null || d[p || h] === f[h];
      }
    }, t.prototype.afterTrigger = function() {
      this.eventInfo = null;
    }, t;
  }()
), Gk = ["symbol", "symbolSize", "symbolRotate", "symbolOffset"], vj = Gk.concat(["symbolKeepAspect"]), fYe = {
  createOnAllSeries: !0,
  // For legend.
  performRawSeries: !0,
  reset: function(t, e) {
    var n = t.getData();
    if (t.legendIcon && n.setVisual("legendIcon", t.legendIcon), !t.hasSymbolVisual)
      return;
    for (var r = {}, i = {}, a = !1, o = 0; o < Gk.length; o++) {
      var s = Gk[o], l = t.get(s);
      qe(l) ? (a = !0, i[s] = l) : r[s] = l;
    }
    if (r.symbol = r.symbol || t.defaultSymbol, n.setVisual(_e({
      legendIcon: t.legendIcon || r.symbol,
      symbolKeepAspect: t.get("symbolKeepAspect")
    }, r)), e.isSeriesFiltered(t))
      return;
    var u = kt(i);
    function c(f, d) {
      for (var h = t.getRawValue(d), p = t.getDataParams(d), v = 0; v < u.length; v++) {
        var g = u[v];
        f.setItemVisual(d, g, i[g](h, p));
      }
    }
    return {
      dataEach: a ? c : null
    };
  }
}, dYe = {
  createOnAllSeries: !0,
  // For legend.
  performRawSeries: !0,
  reset: function(t, e) {
    if (!t.hasSymbolVisual || e.isSeriesFiltered(t))
      return;
    var n = t.getData();
    function r(i, a) {
      for (var o = i.getItemModel(a), s = 0; s < vj.length; s++) {
        var l = vj[s], u = o.getShallow(l, !0);
        u != null && i.setItemVisual(a, l, u);
      }
    }
    return {
      dataEach: n.hasItemOption ? r : null
    };
  }
};
function c3(t, e, n) {
  switch (n) {
    case "color":
      var r = t.getItemVisual(e, "style");
      return r[t.getVisual("drawType")];
    case "opacity":
      return t.getItemVisual(e, "style").opacity;
    case "symbol":
    case "symbolSize":
    case "liftZ":
      return t.getItemVisual(e, n);
    default:
      process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + n);
  }
}
function v1(t, e) {
  switch (e) {
    case "color":
      var n = t.getVisual("style");
      return n[t.getVisual("drawType")];
    case "opacity":
      return t.getVisual("style").opacity;
    case "symbol":
    case "symbolSize":
    case "liftZ":
      return t.getVisual(e);
    default:
      process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + e);
  }
}
function Nue(t, e, n, r) {
  switch (n) {
    case "color":
      var i = t.ensureUniqueItemVisual(e, "style");
      i[t.getVisual("drawType")] = r, t.setItemVisual(e, "colorFromPalette", !1);
      break;
    case "opacity":
      t.ensureUniqueItemVisual(e, "style").opacity = r;
      break;
    case "symbol":
    case "symbolSize":
    case "liftZ":
      t.setItemVisual(e, n, r);
      break;
    default:
      process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + n);
  }
}
function Bue(t, e) {
  function n(r, i) {
    var a = [];
    return r.eachComponent({
      mainType: "series",
      subType: t,
      query: i
    }, function(o) {
      a.push(o.seriesIndex);
    }), a;
  }
  F([[t + "ToggleSelect", "toggleSelect"], [t + "Select", "select"], [t + "UnSelect", "unselect"]], function(r) {
    e(r[0], function(i, a, o) {
      i = _e({}, i), process.env.NODE_ENV !== "production" && yr(i.type, r[1]), o.dispatchAction(_e(i, {
        type: r[1],
        seriesIndex: n(a, i)
      }));
    });
  });
}
function tv(t, e, n, r, i) {
  var a = t + e;
  n.isSilent(a) || (process.env.NODE_ENV !== "production" && ss("event " + a + " is deprecated."), r.eachComponent({
    mainType: "series",
    subType: "pie"
  }, function(o) {
    for (var s = o.seriesIndex, l = o.option.selectedMap, u = i.selected, c = 0; c < u.length; c++)
      if (u[c].seriesIndex === s) {
        var f = o.getData(), d = Gh(f, i.fromActionPayload);
        n.trigger(a, {
          type: a,
          seriesId: o.id,
          name: Se(d) ? f.getName(d[0]) : f.getName(d),
          selected: Ve(l) ? l : _e({}, l)
        });
      }
  }));
}
function hYe(t, e, n) {
  t.on("selectchanged", function(r) {
    var i = n.getModel();
    r.isFromClick ? (tv("map", "selectchanged", e, i, r), tv("pie", "selectchanged", e, i, r)) : r.fromAction === "select" ? (tv("map", "selected", e, i, r), tv("pie", "selected", e, i, r)) : r.fromAction === "unselect" && (tv("map", "unselected", e, i, r), tv("pie", "unselected", e, i, r));
  });
}
function sh(t, e, n) {
  for (var r; t && !(e(t) && (r = t, n)); )
    t = t.__hostTarget || t.parent;
  return r;
}
var pYe = Math.round(Math.random() * 9), vYe = typeof Object.defineProperty == "function", gYe = function() {
  function t() {
    this._id = "__ec_inner_" + pYe++;
  }
  return t.prototype.get = function(e) {
    return this._guard(e)[this._id];
  }, t.prototype.set = function(e, n) {
    var r = this._guard(e);
    return vYe ? Object.defineProperty(r, this._id, {
      value: n,
      enumerable: !1,
      configurable: !0
    }) : r[this._id] = n, this;
  }, t.prototype.delete = function(e) {
    return this.has(e) ? (delete this._guard(e)[this._id], !0) : !1;
  }, t.prototype.has = function(e) {
    return !!this._guard(e)[this._id];
  }, t.prototype._guard = function(e) {
    if (e !== Object(e))
      throw TypeError("Value of WeakMap is not a non-null object.");
    return e;
  }, t;
}(), mYe = Dt.extend({
  type: "triangle",
  shape: {
    cx: 0,
    cy: 0,
    width: 0,
    height: 0
  },
  buildPath: function(t, e) {
    var n = e.cx, r = e.cy, i = e.width / 2, a = e.height / 2;
    t.moveTo(n, r - a), t.lineTo(n + i, r + a), t.lineTo(n - i, r + a), t.closePath();
  }
}), yYe = Dt.extend({
  type: "diamond",
  shape: {
    cx: 0,
    cy: 0,
    width: 0,
    height: 0
  },
  buildPath: function(t, e) {
    var n = e.cx, r = e.cy, i = e.width / 2, a = e.height / 2;
    t.moveTo(n, r - a), t.lineTo(n + i, r), t.lineTo(n, r + a), t.lineTo(n - i, r), t.closePath();
  }
}), bYe = Dt.extend({
  type: "pin",
  shape: {
    // x, y on the cusp
    x: 0,
    y: 0,
    width: 0,
    height: 0
  },
  buildPath: function(t, e) {
    var n = e.x, r = e.y, i = e.width / 5 * 3, a = Math.max(i, e.height), o = i / 2, s = o * o / (a - o), l = r - a + o + s, u = Math.asin(s / o), c = Math.cos(u) * o, f = Math.sin(u), d = Math.cos(u), h = o * 0.6, p = o * 0.7;
    t.moveTo(n - c, l + s), t.arc(n, l, o, Math.PI - u, Math.PI * 2 + u), t.bezierCurveTo(n + c - f * h, l + s + d * h, n, r - p, n, r), t.bezierCurveTo(n, r - p, n - c + f * h, l + s + d * h, n - c, l + s), t.closePath();
  }
}), _Ye = Dt.extend({
  type: "arrow",
  shape: {
    x: 0,
    y: 0,
    width: 0,
    height: 0
  },
  buildPath: function(t, e) {
    var n = e.height, r = e.width, i = e.x, a = e.y, o = r / 3 * 2;
    t.moveTo(i, a), t.lineTo(i + o, a + n), t.lineTo(i, a + n / 4 * 3), t.lineTo(i - o, a + n), t.lineTo(i, a), t.closePath();
  }
}), OYe = {
  line: Xr,
  rect: Zt,
  roundRect: Zt,
  square: Zt,
  circle: ic,
  diamond: yYe,
  pin: bYe,
  arrow: _Ye,
  triangle: mYe
}, SYe = {
  line: function(t, e, n, r, i) {
    i.x1 = t, i.y1 = e + r / 2, i.x2 = t + n, i.y2 = e + r / 2;
  },
  rect: function(t, e, n, r, i) {
    i.x = t, i.y = e, i.width = n, i.height = r;
  },
  roundRect: function(t, e, n, r, i) {
    i.x = t, i.y = e, i.width = n, i.height = r, i.r = Math.min(n, r) / 4;
  },
  square: function(t, e, n, r, i) {
    var a = Math.min(n, r);
    i.x = t, i.y = e, i.width = a, i.height = a;
  },
  circle: function(t, e, n, r, i) {
    i.cx = t + n / 2, i.cy = e + r / 2, i.r = Math.min(n, r) / 2;
  },
  diamond: function(t, e, n, r, i) {
    i.cx = t + n / 2, i.cy = e + r / 2, i.width = n, i.height = r;
  },
  pin: function(t, e, n, r, i) {
    i.x = t + n / 2, i.y = e + r / 2, i.width = n, i.height = r;
  },
  arrow: function(t, e, n, r, i) {
    i.x = t + n / 2, i.y = e + r / 2, i.width = n, i.height = r;
  },
  triangle: function(t, e, n, r, i) {
    i.cx = t + n / 2, i.cy = e + r / 2, i.width = n, i.height = r;
  }
}, WC = {};
F(OYe, function(t, e) {
  WC[e] = new t();
});
var xYe = Dt.extend({
  type: "symbol",
  shape: {
    symbolType: "",
    x: 0,
    y: 0,
    width: 0,
    height: 0
  },
  calculateTextPosition: function(t, e, n) {
    var r = AC(t, e, n), i = this.shape;
    return i && i.symbolType === "pin" && e.position === "inside" && (r.y = n.y + n.height * 0.4), r;
  },
  buildPath: function(t, e, n) {
    var r = e.symbolType;
    if (r !== "none") {
      var i = WC[r];
      i || (r = "rect", i = WC[r]), SYe[r](e.x, e.y, e.width, e.height, i.shape), i.buildPath(t, i.shape, n);
    }
  }
});
function wYe(t, e) {
  if (this.type !== "image") {
    var n = this.style;
    this.__isEmptyBrush ? (n.stroke = t, n.fill = e || "#fff", n.lineWidth = 2) : this.shape.symbolType === "line" ? n.stroke = t : n.fill = t, this.markRedraw();
  }
}
function Sr(t, e, n, r, i, a, o) {
  var s = t.indexOf("empty") === 0;
  s && (t = t.substr(5, 1).toLowerCase() + t.substr(6));
  var l;
  return t.indexOf("image://") === 0 ? l = W5(t.slice(8), new bt(e, n, r, i), o ? "center" : "cover") : t.indexOf("path://") === 0 ? l = d1(t.slice(7), {}, new bt(e, n, r, i), o ? "center" : "cover") : l = new xYe({
    shape: {
      symbolType: t,
      x: e,
      y: n,
      width: r,
      height: i
    }
  }), l.__isEmptyBrush = s, l.setColor = wYe, a && l.setColor(a), l;
}
function Em(t) {
  return Se(t) || (t = [+t, +t]), [t[0] || 0, t[1] || 0];
}
function mp(t, e) {
  if (t != null)
    return Se(t) || (t = [t, t]), [ze(t[0], e[0]) || 0, ze(dt(t[1], t[0]), e[1]) || 0];
}
function lh(t) {
  return isFinite(t);
}
function CYe(t, e, n) {
  var r = e.x == null ? 0 : e.x, i = e.x2 == null ? 1 : e.x2, a = e.y == null ? 0 : e.y, o = e.y2 == null ? 0 : e.y2;
  e.global || (r = r * n.width + n.x, i = i * n.width + n.x, a = a * n.height + n.y, o = o * n.height + n.y), r = lh(r) ? r : 0, i = lh(i) ? i : 1, a = lh(a) ? a : 0, o = lh(o) ? o : 0;
  var s = t.createLinearGradient(r, a, i, o);
  return s;
}
function TYe(t, e, n) {
  var r = n.width, i = n.height, a = Math.min(r, i), o = e.x == null ? 0.5 : e.x, s = e.y == null ? 0.5 : e.y, l = e.r == null ? 0.5 : e.r;
  e.global || (o = o * r + n.x, s = s * i + n.y, l = l * a), o = lh(o) ? o : 0.5, s = lh(s) ? s : 0.5, l = l >= 0 && lh(l) ? l : 0.5;
  var u = t.createRadialGradient(o, s, 0, o, s, l);
  return u;
}
function jk(t, e, n) {
  for (var r = e.type === "radial" ? TYe(t, e, n) : CYe(t, e, n), i = e.colorStops, a = 0; a < i.length; a++)
    r.addColorStop(i[a].offset, i[a].color);
  return r;
}
function PYe(t, e) {
  if (t === e || !t && !e)
    return !1;
  if (!t || !e || t.length !== e.length)
    return !0;
  for (var n = 0; n < t.length; n++)
    if (t[n] !== e[n])
      return !0;
  return !1;
}
function CS(t) {
  return parseInt(t, 10);
}
function Rv(t, e, n) {
  var r = ["width", "height"][e], i = ["clientWidth", "clientHeight"][e], a = ["paddingLeft", "paddingTop"][e], o = ["paddingRight", "paddingBottom"][e];
  if (n[r] != null && n[r] !== "auto")
    return parseFloat(n[r]);
  var s = document.defaultView.getComputedStyle(t);
  return (t[i] || CS(s[r]) || CS(t.style[r])) - (CS(s[a]) || 0) - (CS(s[o]) || 0) | 0;
}
function $Ye(t, e) {
  return !t || t === "solid" || !(e > 0) ? null : t === "dashed" ? [4 * e, 2 * e] : t === "dotted" ? [e] : Kt(t) ? [t] : Se(t) ? t : null;
}
function f3(t) {
  var e = t.style, n = e.lineDash && e.lineWidth > 0 && $Ye(e.lineDash, e.lineWidth), r = e.lineDashOffset;
  if (n) {
    var i = e.strokeNoScale && t.getLineScale ? t.getLineScale() : 1;
    i && i !== 1 && (n = Ce(n, function(a) {
      return a / i;
    }), r /= i);
  }
  return [n, r];
}
var AYe = new jl(!0);
function QC(t) {
  var e = t.stroke;
  return !(e == null || e === "none" || !(t.lineWidth > 0));
}
function gj(t) {
  return typeof t == "string" && t !== "none";
}
function HC(t) {
  var e = t.fill;
  return e != null && e !== "none";
}
function mj(t, e) {
  if (e.fillOpacity != null && e.fillOpacity !== 1) {
    var n = t.globalAlpha;
    t.globalAlpha = e.fillOpacity * e.opacity, t.fill(), t.globalAlpha = n;
  } else
    t.fill();
}
function yj(t, e) {
  if (e.strokeOpacity != null && e.strokeOpacity !== 1) {
    var n = t.globalAlpha;
    t.globalAlpha = e.strokeOpacity * e.opacity, t.stroke(), t.globalAlpha = n;
  } else
    t.stroke();
}
function Zk(t, e, n) {
  var r = I5(e.image, e.__image, n);
  if (gP(r)) {
    var i = t.createPattern(r, e.repeat || "repeat");
    if (typeof DOMMatrix == "function" && i && i.setTransform) {
      var a = new DOMMatrix();
      a.translateSelf(e.x || 0, e.y || 0), a.rotateSelf(0, 0, (e.rotation || 0) * Uy), a.scaleSelf(e.scaleX || 1, e.scaleY || 1), i.setTransform(a);
    }
    return i;
  }
}
function EYe(t, e, n, r) {
  var i, a = QC(n), o = HC(n), s = n.strokePercent, l = s < 1, u = !e.path;
  (!e.silent || l) && u && e.createPathProxy();
  var c = e.path || AYe, f = e.__dirty;
  if (!r) {
    var d = n.fill, h = n.stroke, p = o && !!d.colorStops, v = a && !!h.colorStops, g = o && !!d.image, m = a && !!h.image, y = void 0, _ = void 0, O = void 0, S = void 0, x = void 0;
    (p || v) && (x = e.getBoundingRect()), p && (y = f ? jk(t, d, x) : e.__canvasFillGradient, e.__canvasFillGradient = y), v && (_ = f ? jk(t, h, x) : e.__canvasStrokeGradient, e.__canvasStrokeGradient = _), g && (O = f || !e.__canvasFillPattern ? Zk(t, d, e) : e.__canvasFillPattern, e.__canvasFillPattern = O), m && (S = f || !e.__canvasStrokePattern ? Zk(t, h, e) : e.__canvasStrokePattern, e.__canvasStrokePattern = O), p ? t.fillStyle = y : g && (O ? t.fillStyle = O : o = !1), v ? t.strokeStyle = _ : m && (S ? t.strokeStyle = S : a = !1);
  }
  var C = e.getGlobalScale();
  c.setScale(C[0], C[1], e.segmentIgnoreThreshold);
  var P, $;
  t.setLineDash && n.lineDash && (i = f3(e), P = i[0], $ = i[1]);
  var T = !0;
  (u || f & _v) && (c.setDPR(t.dpr), l ? c.setContext(null) : (c.setContext(t), T = !1), c.reset(), e.buildPath(c, e.shape, r), c.toStatic(), e.pathUpdated()), T && c.rebuildPath(t, l ? s : 1), P && (t.setLineDash(P), t.lineDashOffset = $), r || (n.strokeFirst ? (a && yj(t, n), o && mj(t, n)) : (o && mj(t, n), a && yj(t, n))), P && t.setLineDash([]);
}
function MYe(t, e, n) {
  var r = e.__image = I5(n.image, e.__image, e, e.onload);
  if (!(!r || !gP(r))) {
    var i = n.x || 0, a = n.y || 0, o = e.getWidth(), s = e.getHeight(), l = r.width / r.height;
    if (o == null && s != null ? o = s * l : s == null && o != null ? s = o / l : o == null && s == null && (o = r.width, s = r.height), n.sWidth && n.sHeight) {
      var u = n.sx || 0, c = n.sy || 0;
      t.drawImage(r, u, c, n.sWidth, n.sHeight, i, a, o, s);
    } else if (n.sx && n.sy) {
      var u = n.sx, c = n.sy, f = o - u, d = s - c;
      t.drawImage(r, u, c, f, d, i, a, o, s);
    } else
      t.drawImage(r, i, a, o, s);
  }
}
function IYe(t, e, n) {
  var r, i = n.text;
  if (i != null && (i += ""), i) {
    t.font = n.font || vf, t.textAlign = n.textAlign, t.textBaseline = n.textBaseline;
    var a = void 0, o = void 0;
    t.setLineDash && n.lineDash && (r = f3(e), a = r[0], o = r[1]), a && (t.setLineDash(a), t.lineDashOffset = o), n.strokeFirst ? (QC(n) && t.strokeText(i, n.x, n.y), HC(n) && t.fillText(i, n.x, n.y)) : (HC(n) && t.fillText(i, n.x, n.y), QC(n) && t.strokeText(i, n.x, n.y)), a && t.setLineDash([]);
  }
}
var bj = ["shadowBlur", "shadowOffsetX", "shadowOffsetY"], _j = [
  ["lineCap", "butt"],
  ["lineJoin", "miter"],
  ["miterLimit", 10]
];
function zue(t, e, n, r, i) {
  var a = !1;
  if (!r && (n = n || {}, e === n))
    return !1;
  if (r || e.opacity !== n.opacity) {
    Ma(t, i), a = !0;
    var o = Math.max(Math.min(e.opacity, 1), 0);
    t.globalAlpha = isNaN(o) ? wh.opacity : o;
  }
  (r || e.blend !== n.blend) && (a || (Ma(t, i), a = !0), t.globalCompositeOperation = e.blend || wh.blend);
  for (var s = 0; s < bj.length; s++) {
    var l = bj[s];
    (r || e[l] !== n[l]) && (a || (Ma(t, i), a = !0), t[l] = t.dpr * (e[l] || 0));
  }
  return (r || e.shadowColor !== n.shadowColor) && (a || (Ma(t, i), a = !0), t.shadowColor = e.shadowColor || wh.shadowColor), a;
}
function Oj(t, e, n, r, i) {
  var a = t_(e, i.inHover), o = r ? null : n && t_(n, i.inHover) || {};
  if (a === o)
    return !1;
  var s = zue(t, a, o, r, i);
  if ((r || a.fill !== o.fill) && (s || (Ma(t, i), s = !0), gj(a.fill) && (t.fillStyle = a.fill)), (r || a.stroke !== o.stroke) && (s || (Ma(t, i), s = !0), gj(a.stroke) && (t.strokeStyle = a.stroke)), (r || a.opacity !== o.opacity) && (s || (Ma(t, i), s = !0), t.globalAlpha = a.opacity == null ? 1 : a.opacity), e.hasStroke()) {
    var l = a.lineWidth, u = l / (a.strokeNoScale && e.getLineScale ? e.getLineScale() : 1);
    t.lineWidth !== u && (s || (Ma(t, i), s = !0), t.lineWidth = u);
  }
  for (var c = 0; c < _j.length; c++) {
    var f = _j[c], d = f[0];
    (r || a[d] !== o[d]) && (s || (Ma(t, i), s = !0), t[d] = a[d] || f[1]);
  }
  return s;
}
function DYe(t, e, n, r, i) {
  return zue(t, t_(e, i.inHover), n && t_(n, i.inHover), r, i);
}
function Vue(t, e) {
  var n = e.transform, r = t.dpr || 1;
  n ? t.setTransform(r * n[0], r * n[1], r * n[2], r * n[3], r * n[4], r * n[5]) : t.setTransform(r, 0, 0, r, 0, 0);
}
function RYe(t, e, n) {
  for (var r = !1, i = 0; i < t.length; i++) {
    var a = t[i];
    r = r || a.isZeroArea(), Vue(e, a), e.beginPath(), a.buildPath(e, a.shape), e.clip();
  }
  n.allClipped = r;
}
function kYe(t, e) {
  return t && e ? t[0] !== e[0] || t[1] !== e[1] || t[2] !== e[2] || t[3] !== e[3] || t[4] !== e[4] || t[5] !== e[5] : !(!t && !e);
}
var Sj = 1, xj = 2, wj = 3, Cj = 4;
function LYe(t) {
  var e = HC(t), n = QC(t);
  return !(t.lineDash || !(+e ^ +n) || e && typeof t.fill != "string" || n && typeof t.stroke != "string" || t.strokePercent < 1 || t.strokeOpacity < 1 || t.fillOpacity < 1);
}
function Ma(t, e) {
  e.batchFill && t.fill(), e.batchStroke && t.stroke(), e.batchFill = "", e.batchStroke = "";
}
function t_(t, e) {
  return e && t.__hoverStyle || t.style;
}
function d3(t, e) {
  uh(t, e, { inHover: !1, viewWidth: 0, viewHeight: 0 }, !0);
}
function uh(t, e, n, r) {
  var i = e.transform;
  if (!e.shouldBePainted(n.viewWidth, n.viewHeight, !1, !1)) {
    e.__dirty &= ~to, e.__isRendered = !1;
    return;
  }
  var a = e.__clipPaths, o = n.prevElClipPaths, s = !1, l = !1;
  if ((!o || PYe(a, o)) && (o && o.length && (Ma(t, n), t.restore(), l = s = !0, n.prevElClipPaths = null, n.allClipped = !1, n.prevEl = null), a && a.length && (Ma(t, n), t.save(), RYe(a, t, n), s = !0), n.prevElClipPaths = a), n.allClipped) {
    e.__isRendered = !1;
    return;
  }
  e.beforeBrush && e.beforeBrush(), e.innerBeforeBrush();
  var u = n.prevEl;
  u || (l = s = !0);
  var c = e instanceof Dt && e.autoBatch && LYe(e.style);
  s || kYe(i, u.transform) ? (Ma(t, n), Vue(t, e)) : c || Ma(t, n);
  var f = t_(e, n.inHover);
  e instanceof Dt ? (n.lastDrawType !== Sj && (l = !0, n.lastDrawType = Sj), Oj(t, e, u, l, n), (!c || !n.batchFill && !n.batchStroke) && t.beginPath(), EYe(t, e, f, c), c && (n.batchFill = f.fill || "", n.batchStroke = f.stroke || "")) : e instanceof Wg ? (n.lastDrawType !== wj && (l = !0, n.lastDrawType = wj), Oj(t, e, u, l, n), IYe(t, e, f)) : e instanceof ci ? (n.lastDrawType !== xj && (l = !0, n.lastDrawType = xj), DYe(t, e, u, l, n), MYe(t, e, f)) : e.getTemporalDisplayables && (n.lastDrawType !== Cj && (l = !0, n.lastDrawType = Cj), NYe(t, e, n)), c && r && Ma(t, n), e.innerAfterBrush(), e.afterBrush && e.afterBrush(), n.prevEl = e, e.__dirty = 0, e.__isRendered = !0;
}
function NYe(t, e, n) {
  var r = e.getDisplayables(), i = e.getTemporalDisplayables();
  t.save();
  var a = {
    prevElClipPaths: null,
    prevEl: null,
    allClipped: !1,
    viewWidth: n.viewWidth,
    viewHeight: n.viewHeight,
    inHover: n.inHover
  }, o, s;
  for (o = e.getCursor(), s = r.length; o < s; o++) {
    var l = r[o];
    l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), uh(t, l, a, o === s - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), a.prevEl = l;
  }
  for (var u = 0, c = i.length; u < c; u++) {
    var l = i[u];
    l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), uh(t, l, a, u === c - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), a.prevEl = l;
  }
  e.clearTemporalDisplayables(), e.notClear = !0, t.restore();
}
var _M = new gYe(), Tj = new a1(100), Pj = ["symbol", "symbolSize", "symbolKeepAspect", "color", "backgroundColor", "dashArrayX", "dashArrayY", "maxTileWidth", "maxTileHeight"];
function Gg(t, e) {
  if (t === "none")
    return null;
  var n = e.getDevicePixelRatio(), r = e.getZr(), i = r.painter.type === "svg";
  t.dirty && _M.delete(t);
  var a = _M.get(t);
  if (a)
    return a;
  var o = it(t, {
    symbol: "rect",
    symbolSize: 1,
    symbolKeepAspect: !0,
    color: "rgba(0, 0, 0, 0.2)",
    backgroundColor: null,
    dashArrayX: 5,
    dashArrayY: 5,
    rotation: 0,
    maxTileWidth: 512,
    maxTileHeight: 512
  });
  o.backgroundColor === "none" && (o.backgroundColor = null);
  var s = {
    repeat: "repeat"
  };
  return l(s), s.rotation = o.rotation, s.scaleX = s.scaleY = i ? 1 : 1 / n, _M.set(t, s), t.dirty = !1, s;
  function l(u) {
    for (var c = [n], f = !0, d = 0; d < Pj.length; ++d) {
      var h = o[Pj[d]];
      if (h != null && !Se(h) && !Ve(h) && !Kt(h) && typeof h != "boolean") {
        f = !1;
        break;
      }
      c.push(h);
    }
    var p;
    if (f) {
      p = c.join(",") + (i ? "-svg" : "");
      var v = Tj.get(p);
      v && (i ? u.svgElement = v : u.image = v);
    }
    var g = Wue(o.dashArrayX), m = BYe(o.dashArrayY), y = Fue(o.symbol), _ = zYe(g), O = Que(m), S = !i && Hs.createCanvas(), x = i && {
      tag: "g",
      attrs: {},
      key: "dcl",
      children: []
    }, C = $(), P;
    S && (S.width = C.width * n, S.height = C.height * n, P = S.getContext("2d")), T(), f && Tj.put(p, S || x), u.image = S, u.svgElement = x, u.svgWidth = C.width, u.svgHeight = C.height;
    function $() {
      for (var E = 1, M = 0, R = _.length; M < R; ++M)
        E = F9(E, _[M]);
      for (var N = 1, M = 0, R = y.length; M < R; ++M)
        N = F9(N, y[M].length);
      E *= N;
      var I = O * _.length * y.length;
      if (process.env.NODE_ENV !== "production") {
        var B = function(Q) {
          console.warn("Calculated decal size is greater than " + Q + " due to decal option settings so " + Q + " is used for the decal size. Please consider changing the decal option to make a smaller decal or set " + Q + " to be larger to avoid incontinuity.");
        };
        E > o.maxTileWidth && B("maxTileWidth"), I > o.maxTileHeight && B("maxTileHeight");
      }
      return {
        width: Math.max(1, Math.min(E, o.maxTileWidth)),
        height: Math.max(1, Math.min(I, o.maxTileHeight))
      };
    }
    function T() {
      P && (P.clearRect(0, 0, S.width, S.height), o.backgroundColor && (P.fillStyle = o.backgroundColor, P.fillRect(0, 0, S.width, S.height)));
      for (var E = 0, M = 0; M < m.length; ++M)
        E += m[M];
      if (E <= 0)
        return;
      for (var R = -O, N = 0, I = 0, B = 0; R < C.height; ) {
        if (N % 2 === 0) {
          for (var Q = I / 2 % y.length, W = 0, H = 0, U = 0; W < C.width * 2; ) {
            for (var j = 0, M = 0; M < g[B].length; ++M)
              j += g[B][M];
            if (j <= 0)
              break;
            if (H % 2 === 0) {
              var Y = (1 - o.symbolSize) * 0.5, ne = W + g[B][H] * Y, fe = R + m[N] * Y, ue = g[B][H] * o.symbolSize, ye = m[N] * o.symbolSize, se = U / 2 % y[Q].length;
              he(ne, fe, ue, ye, y[Q][se]);
            }
            W += g[B][H], ++U, ++H, H === g[B].length && (H = 0);
          }
          ++B, B === g.length && (B = 0);
        }
        R += m[N], ++I, ++N, N === m.length && (N = 0);
      }
      function he(re, q, K, de, xe) {
        var we = i ? 1 : n, He = Sr(xe, re * we, q * we, K * we, de * we, o.color, o.symbolKeepAspect);
        if (i) {
          var je = r.painter.renderOneToVNode(He);
          je && x.children.push(je);
        } else
          d3(P, He);
      }
    }
  }
}
function Fue(t) {
  if (!t || t.length === 0)
    return [["rect"]];
  if (Ve(t))
    return [[t]];
  for (var e = !0, n = 0; n < t.length; ++n)
    if (!Ve(t[n])) {
      e = !1;
      break;
    }
  if (e)
    return Fue([t]);
  for (var r = [], n = 0; n < t.length; ++n)
    Ve(t[n]) ? r.push([t[n]]) : r.push(t[n]);
  return r;
}
function Wue(t) {
  if (!t || t.length === 0)
    return [[0, 0]];
  if (Kt(t)) {
    var e = Math.ceil(t);
    return [[e, e]];
  }
  for (var n = !0, r = 0; r < t.length; ++r)
    if (!Kt(t[r])) {
      n = !1;
      break;
    }
  if (n)
    return Wue([t]);
  for (var i = [], r = 0; r < t.length; ++r)
    if (Kt(t[r])) {
      var e = Math.ceil(t[r]);
      i.push([e, e]);
    } else {
      var e = Ce(t[r], function(s) {
        return Math.ceil(s);
      });
      e.length % 2 === 1 ? i.push(e.concat(e)) : i.push(e);
    }
  return i;
}
function BYe(t) {
  if (!t || typeof t == "object" && t.length === 0)
    return [0, 0];
  if (Kt(t)) {
    var e = Math.ceil(t);
    return [e, e];
  }
  var n = Ce(t, function(r) {
    return Math.ceil(r);
  });
  return t.length % 2 ? n.concat(n) : n;
}
function zYe(t) {
  return Ce(t, function(e) {
    return Que(e);
  });
}
function Que(t) {
  for (var e = 0, n = 0; n < t.length; ++n)
    e += t[n];
  return t.length % 2 === 1 ? e * 2 : e;
}
function VYe(t, e) {
  t.eachRawSeries(function(n) {
    if (!t.isSeriesFiltered(n)) {
      var r = n.getData();
      r.hasItemVisual() && r.each(function(o) {
        var s = r.getItemVisual(o, "decal");
        if (s) {
          var l = r.ensureUniqueItemVisual(o, "style");
          l.decal = Gg(s, e);
        }
      });
      var i = r.getVisual("decal");
      if (i) {
        var a = r.getVisual("style");
        a.decal = Gg(i, e);
      }
    }
  });
}
var Ts = new fs(), GC = {};
function FYe(t, e) {
  process.env.NODE_ENV !== "production" && GC[t] && $i("Already has an implementation of " + t + "."), GC[t] = e;
}
function Hue(t) {
  return process.env.NODE_ENV !== "production" && (GC[t] || $i("Implementation of " + t + " doesn't exists.")), GC[t];
}
var WYe = "5.5.1", QYe = {
  zrender: "5.6.0"
}, HYe = 1, GYe = 800, jYe = 900, ZYe = 1e3, UYe = 2e3, XYe = 5e3, Gue = 1e3, YYe = 1100, h3 = 2e3, jue = 3e3, qYe = 4e3, LP = 4500, KYe = 4600, JYe = 5e3, eqe = 6e3, Zue = 7e3, Uue = {
  PROCESSOR: {
    FILTER: ZYe,
    SERIES_FILTER: GYe,
    STATISTIC: XYe
  },
  VISUAL: {
    LAYOUT: Gue,
    PROGRESSIVE_LAYOUT: YYe,
    GLOBAL: h3,
    CHART: jue,
    POST_CHART_LAYOUT: KYe,
    COMPONENT: qYe,
    BRUSH: JYe,
    CHART_ITEM: LP,
    ARIA: eqe,
    DECAL: Zue
  }
}, Ri = "__flagInMainProcess", Oa = "__pendingUpdate", OM = "__needsUpdateStatus", $j = /^[a-zA-Z0-9_]+$/, SM = "__connectUpdateStatus", Aj = 0, tqe = 1, nqe = 2;
function Xue(t) {
  return function() {
    for (var e = [], n = 0; n < arguments.length; n++)
      e[n] = arguments[n];
    if (this.isDisposed()) {
      Ja(this.id);
      return;
    }
    return que(this, t, e);
  };
}
function Yue(t) {
  return function() {
    for (var e = [], n = 0; n < arguments.length; n++)
      e[n] = arguments[n];
    return que(this, t, e);
  };
}
function que(t, e, n) {
  return n[0] = n[0] && n[0].toLowerCase(), fs.prototype[e].apply(t, n);
}
var Kue = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e;
  }(fs)
), Jue = Kue.prototype;
Jue.on = Yue("on");
Jue.off = Yue("off");
var nv, xM, TS, Sc, wM, CM, TM, N0, B0, Ej, Mj, PM, Ij, PS, Dj, ece, Mo, Rj, jC = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i) {
      var a = t.call(this, new cYe()) || this;
      a._chartsViews = [], a._chartsMap = {}, a._componentsViews = [], a._componentsMap = {}, a._pendingActions = [], i = i || {}, Ve(r) && (r = tce[r]), a._dom = n;
      var o = "canvas", s = "auto", l = !1;
      if (process.env.NODE_ENV !== "production") {
        var u = (
          /* eslint-disable-next-line */
          Gt.hasGlobalWindow ? window : global
        );
        u && (o = dt(u.__ECHARTS__DEFAULT__RENDERER__, o), s = dt(u.__ECHARTS__DEFAULT__COARSE_POINTER, s), l = dt(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__, l));
      }
      i.ssr && Ase(function(h) {
        var p = ft(h), v = p.dataIndex;
        if (v != null) {
          var g = Ze();
          return g.set("series_index", p.seriesIndex), g.set("data_index", v), p.ssrType && g.set("ssr_type", p.ssrType), g;
        }
      });
      var c = a._zr = bk(n, {
        renderer: i.renderer || o,
        devicePixelRatio: i.devicePixelRatio,
        width: i.width,
        height: i.height,
        ssr: i.ssr,
        useDirtyRect: dt(i.useDirtyRect, l),
        useCoarsePointer: dt(i.useCoarsePointer, s),
        pointerSize: i.pointerSize
      });
      a._ssr = i.ssr, a._throttledZrFlush = kP(We(c.flush, c), 17), r = ot(r), r && sue(r, !0), a._theme = r, a._locale = yUe(i.locale || Vle), a._coordSysMgr = new gp();
      var f = a._api = Dj(a);
      function d(h, p) {
        return h.__prio - p.__prio;
      }
      return aw(UC, d), aw(Uk, d), a._scheduler = new Iue(a, f, Uk, UC), a._messageCenter = new Kue(), a._initEvents(), a.resize = We(a.resize, a), c.animation.on("frame", a._onframe, a), Ej(c, a), Mj(c, a), Vb(a), a;
    }
    return e.prototype._onframe = function() {
      if (!this._disposed) {
        Rj(this);
        var n = this._scheduler;
        if (this[Oa]) {
          var r = this[Oa].silent;
          this[Ri] = !0;
          try {
            nv(this), Sc.update.call(this, null, this[Oa].updateParams);
          } catch (l) {
            throw this[Ri] = !1, this[Oa] = null, l;
          }
          this._zr.flush(), this[Ri] = !1, this[Oa] = null, N0.call(this, r), B0.call(this, r);
        } else if (n.unfinished) {
          var i = HYe, a = this._model, o = this._api;
          n.unfinished = !1;
          do {
            var s = +/* @__PURE__ */ new Date();
            n.performSeriesTasks(a), n.performDataProcessorTasks(a), CM(this, a), n.performVisualTasks(a), PS(this, this._model, o, "remain", {}), i -= +/* @__PURE__ */ new Date() - s;
          } while (i > 0 && n.unfinished);
          n.unfinished || this._zr.flush();
        }
      }
    }, e.prototype.getDom = function() {
      return this._dom;
    }, e.prototype.getId = function() {
      return this.id;
    }, e.prototype.getZr = function() {
      return this._zr;
    }, e.prototype.isSSR = function() {
      return this._ssr;
    }, e.prototype.setOption = function(n, r, i) {
      if (this[Ri]) {
        process.env.NODE_ENV !== "production" && $i("`setOption` should not be called during main process.");
        return;
      }
      if (this._disposed) {
        Ja(this.id);
        return;
      }
      var a, o, s;
      if (nt(r) && (i = r.lazyUpdate, a = r.silent, o = r.replaceMerge, s = r.transition, r = r.notMerge), this[Ri] = !0, !this._model || r) {
        var l = new ZUe(this._api), u = this._theme, c = this._model = new a3();
        c.scheduler = this._scheduler, c.ssr = this._ssr, c.init(null, null, null, u, this._locale, l);
      }
      this._model.setOption(n, {
        replaceMerge: o
      }, Xk);
      var f = {
        seriesTransition: s,
        optionChanged: !0
      };
      if (i)
        this[Oa] = {
          silent: a,
          updateParams: f
        }, this[Ri] = !1, this.getZr().wakeUp();
      else {
        try {
          nv(this), Sc.update.call(this, null, f);
        } catch (d) {
          throw this[Oa] = null, this[Ri] = !1, d;
        }
        this._ssr || this._zr.flush(), this[Oa] = null, this[Ri] = !1, N0.call(this, a), B0.call(this, a);
      }
    }, e.prototype.setTheme = function() {
      ss("ECharts#setTheme() is DEPRECATED in ECharts 3.0");
    }, e.prototype.getModel = function() {
      return this._model;
    }, e.prototype.getOption = function() {
      return this._model && this._model.getOption();
    }, e.prototype.getWidth = function() {
      return this._zr.getWidth();
    }, e.prototype.getHeight = function() {
      return this._zr.getHeight();
    }, e.prototype.getDevicePixelRatio = function() {
      return this._zr.painter.dpr || Gt.hasGlobalWindow && window.devicePixelRatio || 1;
    }, e.prototype.getRenderedCanvas = function(n) {
      return process.env.NODE_ENV !== "production" && yr("getRenderedCanvas", "renderToCanvas"), this.renderToCanvas(n);
    }, e.prototype.renderToCanvas = function(n) {
      n = n || {};
      var r = this._zr.painter;
      if (process.env.NODE_ENV !== "production" && r.type !== "canvas")
        throw new Error("renderToCanvas can only be used in the canvas renderer.");
      return r.getRenderedCanvas({
        backgroundColor: n.backgroundColor || this._model.get("backgroundColor"),
        pixelRatio: n.pixelRatio || this.getDevicePixelRatio()
      });
    }, e.prototype.renderToSVGString = function(n) {
      n = n || {};
      var r = this._zr.painter;
      if (process.env.NODE_ENV !== "production" && r.type !== "svg")
        throw new Error("renderToSVGString can only be used in the svg renderer.");
      return r.renderToString({
        useViewBox: n.useViewBox
      });
    }, e.prototype.getSvgDataURL = function() {
      if (Gt.svgSupported) {
        var n = this._zr, r = n.storage.getDisplayList();
        return F(r, function(i) {
          i.stopAnimation(null, !0);
        }), n.painter.toDataURL();
      }
    }, e.prototype.getDataURL = function(n) {
      if (this._disposed) {
        Ja(this.id);
        return;
      }
      n = n || {};
      var r = n.excludeComponents, i = this._model, a = [], o = this;
      F(r, function(l) {
        i.eachComponent({
          mainType: l
        }, function(u) {
          var c = o._componentsMap[u.__viewId];
          c.group.ignore || (a.push(c), c.group.ignore = !0);
        });
      });
      var s = this._zr.painter.getType() === "svg" ? this.getSvgDataURL() : this.renderToCanvas(n).toDataURL("image/" + (n && n.type || "png"));
      return F(a, function(l) {
        l.group.ignore = !1;
      }), s;
    }, e.prototype.getConnectedDataURL = function(n) {
      if (this._disposed) {
        Ja(this.id);
        return;
      }
      var r = n.type === "svg", i = this.group, a = Math.min, o = Math.max, s = 1 / 0;
      if (XC[i]) {
        var l = s, u = s, c = -s, f = -s, d = [], h = n && n.pixelRatio || this.getDevicePixelRatio();
        F(Ph, function(_, O) {
          if (_.group === i) {
            var S = r ? _.getZr().painter.getSvgDom().innerHTML : _.renderToCanvas(ot(n)), x = _.getDom().getBoundingClientRect();
            l = a(x.left, l), u = a(x.top, u), c = o(x.right, c), f = o(x.bottom, f), d.push({
              dom: S,
              left: x.left,
              top: x.top
            });
          }
        }), l *= h, u *= h, c *= h, f *= h;
        var p = c - l, v = f - u, g = Hs.createCanvas(), m = bk(g, {
          renderer: r ? "svg" : "canvas"
        });
        if (m.resize({
          width: p,
          height: v
        }), r) {
          var y = "";
          return F(d, function(_) {
            var O = _.left - l, S = _.top - u;
            y += '<g transform="translate(' + O + "," + S + ')">' + _.dom + "</g>";
          }), m.painter.getSvgRoot().innerHTML = y, n.connectedBackgroundColor && m.painter.setBackgroundColor(n.connectedBackgroundColor), m.refreshImmediately(), m.painter.toDataURL();
        } else
          return n.connectedBackgroundColor && m.add(new Zt({
            shape: {
              x: 0,
              y: 0,
              width: p,
              height: v
            },
            style: {
              fill: n.connectedBackgroundColor
            }
          })), F(d, function(_) {
            var O = new ci({
              style: {
                x: _.left * h - l,
                y: _.top * h - u,
                image: _.dom
              }
            });
            m.add(O);
          }), m.refreshImmediately(), g.toDataURL("image/" + (n && n.type || "png"));
      } else
        return this.getDataURL(n);
    }, e.prototype.convertToPixel = function(n, r) {
      return wM(this, "convertToPixel", n, r);
    }, e.prototype.convertFromPixel = function(n, r) {
      return wM(this, "convertFromPixel", n, r);
    }, e.prototype.containPixel = function(n, r) {
      if (this._disposed) {
        Ja(this.id);
        return;
      }
      var i = this._model, a, o = tb(i, n);
      return F(o, function(s, l) {
        l.indexOf("Models") >= 0 && F(s, function(u) {
          var c = u.coordinateSystem;
          if (c && c.containPoint)
            a = a || !!c.containPoint(r);
          else if (l === "seriesModels") {
            var f = this._chartsMap[u.__viewId];
            f && f.containPoint ? a = a || f.containPoint(r, u) : process.env.NODE_ENV !== "production" && nr(l + ": " + (f ? "The found component do not support containPoint." : "No view mapping to the found component."));
          } else
            process.env.NODE_ENV !== "production" && nr(l + ": containPoint is not supported");
        }, this);
      }, this), !!a;
    }, e.prototype.getVisual = function(n, r) {
      var i = this._model, a = tb(i, n, {
        defaultMainType: "series"
      }), o = a.seriesModel;
      process.env.NODE_ENV !== "production" && (o || nr("There is no specified series model"));
      var s = o.getData(), l = a.hasOwnProperty("dataIndexInside") ? a.dataIndexInside : a.hasOwnProperty("dataIndex") ? s.indexOfRawIndex(a.dataIndex) : null;
      return l != null ? c3(s, l, r) : v1(s, r);
    }, e.prototype.getViewOfComponentModel = function(n) {
      return this._componentsMap[n.__viewId];
    }, e.prototype.getViewOfSeriesModel = function(n) {
      return this._chartsMap[n.__viewId];
    }, e.prototype._initEvents = function() {
      var n = this;
      F(rqe, function(r) {
        var i = function(a) {
          var o = n.getModel(), s = a.target, l, u = r === "globalout";
          if (u ? l = {} : s && sh(s, function(p) {
            var v = ft(p);
            if (v && v.dataIndex != null) {
              var g = v.dataModel || o.getSeriesByIndex(v.seriesIndex);
              return l = g && g.getDataParams(v.dataIndex, v.dataType, s) || {}, !0;
            } else if (v.eventData)
              return l = _e({}, v.eventData), !0;
          }, !0), l) {
            var c = l.componentType, f = l.componentIndex;
            (c === "markLine" || c === "markPoint" || c === "markArea") && (c = "series", f = l.seriesIndex);
            var d = c && f != null && o.getComponent(c, f), h = d && n[d.mainType === "series" ? "_chartsMap" : "_componentsMap"][d.__viewId];
            process.env.NODE_ENV !== "production" && !u && !(d && h) && nr("model or view can not be found by params"), l.event = a, l.type = r, n._$eventProcessor.eventInfo = {
              targetEl: s,
              packedEvent: l,
              model: d,
              view: h
            }, n.trigger(r, l);
          }
        };
        i.zrEventfulCallAtLast = !0, n._zr.on(r, i, n);
      }), F(sb, function(r, i) {
        n._messageCenter.on(i, function(a) {
          this.trigger(i, a);
        }, n);
      }), F(["selectchanged"], function(r) {
        n._messageCenter.on(r, function(i) {
          this.trigger(r, i);
        }, n);
      }), hYe(this._messageCenter, this, this._api);
    }, e.prototype.isDisposed = function() {
      return this._disposed;
    }, e.prototype.clear = function() {
      if (this._disposed) {
        Ja(this.id);
        return;
      }
      this.setOption({
        series: []
      }, !0);
    }, e.prototype.dispose = function() {
      if (this._disposed) {
        Ja(this.id);
        return;
      }
      this._disposed = !0;
      var n = this.getDom();
      n && zse(this.getDom(), v3, "");
      var r = this, i = r._api, a = r._model;
      F(r._componentsViews, function(o) {
        o.dispose(a, i);
      }), F(r._chartsViews, function(o) {
        o.dispose(a, i);
      }), r._zr.dispose(), r._dom = r._model = r._chartsMap = r._componentsMap = r._chartsViews = r._componentsViews = r._scheduler = r._api = r._zr = r._throttledZrFlush = r._theme = r._coordSysMgr = r._messageCenter = null, delete Ph[r.id];
    }, e.prototype.resize = function(n) {
      if (this[Ri]) {
        process.env.NODE_ENV !== "production" && $i("`resize` should not be called during main process.");
        return;
      }
      if (this._disposed) {
        Ja(this.id);
        return;
      }
      this._zr.resize(n);
      var r = this._model;
      if (this._loadingFX && this._loadingFX.resize(), !!r) {
        var i = r.resetOption("media"), a = n && n.silent;
        this[Oa] && (a == null && (a = this[Oa].silent), i = !0, this[Oa] = null), this[Ri] = !0;
        try {
          i && nv(this), Sc.update.call(this, {
            type: "resize",
            animation: _e({
              // Disable animation
              duration: 0
            }, n && n.animation)
          });
        } catch (o) {
          throw this[Ri] = !1, o;
        }
        this[Ri] = !1, N0.call(this, a), B0.call(this, a);
      }
    }, e.prototype.showLoading = function(n, r) {
      if (this._disposed) {
        Ja(this.id);
        return;
      }
      if (nt(n) && (r = n, n = ""), n = n || "default", this.hideLoading(), !Yk[n]) {
        process.env.NODE_ENV !== "production" && nr("Loading effects " + n + " not exists.");
        return;
      }
      var i = Yk[n](this._api, r), a = this._zr;
      this._loadingFX = i, a.add(i);
    }, e.prototype.hideLoading = function() {
      if (this._disposed) {
        Ja(this.id);
        return;
      }
      this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null;
    }, e.prototype.makeActionFromEvent = function(n) {
      var r = _e({}, n);
      return r.type = sb[n.type], r;
    }, e.prototype.dispatchAction = function(n, r) {
      if (this._disposed) {
        Ja(this.id);
        return;
      }
      if (nt(r) || (r = {
        silent: !!r
      }), !!ZC[n.type] && this._model) {
        if (this[Ri]) {
          this._pendingActions.push(n);
          return;
        }
        var i = r.silent;
        TM.call(this, n, i);
        var a = r.flush;
        a ? this._zr.flush() : a !== !1 && Gt.browser.weChat && this._throttledZrFlush(), N0.call(this, i), B0.call(this, i);
      }
    }, e.prototype.updateLabelLayout = function() {
      Ts.trigger("series:layoutlabels", this._model, this._api, {
        // Not adding series labels.
        // TODO
        updatedSeries: []
      });
    }, e.prototype.appendData = function(n) {
      if (this._disposed) {
        Ja(this.id);
        return;
      }
      var r = n.seriesIndex, i = this.getModel(), a = i.getSeriesByIndex(r);
      process.env.NODE_ENV !== "production" && at(n.data && a), a.appendData(n), this._scheduler.unfinished = !0, this.getZr().wakeUp();
    }, e.internalField = function() {
      nv = function(f) {
        var d = f._scheduler;
        d.restorePipelines(f._model), d.prepareStageTasks(), xM(f, !0), xM(f, !1), d.plan();
      }, xM = function(f, d) {
        for (var h = f._model, p = f._scheduler, v = d ? f._componentsViews : f._chartsViews, g = d ? f._componentsMap : f._chartsMap, m = f._zr, y = f._api, _ = 0; _ < v.length; _++)
          v[_].__alive = !1;
        d ? h.eachComponent(function(x, C) {
          x !== "series" && O(C);
        }) : h.eachSeries(O);
        function O(x) {
          var C = x.__requireNewView;
          x.__requireNewView = !1;
          var P = "_ec_" + x.id + "_" + x.type, $ = !C && g[P];
          if (!$) {
            var T = $l(x.type), E = d ? Ln.getClass(T.main, T.sub) : (
              // FIXME:TS
              // (ChartView as ChartViewConstructor).getClass('series', classType.sub)
              // For backward compat, still support a chart type declared as only subType
              // like "liquidfill", but recommend "series.liquidfill"
              // But need a base class to make a type series.
              _n.getClass(T.sub)
            );
            process.env.NODE_ENV !== "production" && at(E, T.sub + " does not exist."), $ = new E(), $.init(h, y), g[P] = $, v.push($), m.add($.group);
          }
          x.__viewId = $.__id = P, $.__alive = !0, $.__model = x, $.group.__ecComponentInfo = {
            mainType: x.mainType,
            index: x.componentIndex
          }, !d && p.prepareView($, x, h, y);
        }
        for (var _ = 0; _ < v.length; ) {
          var S = v[_];
          S.__alive ? _++ : (!d && S.renderTask.dispose(), m.remove(S.group), S.dispose(h, y), v.splice(_, 1), g[S.__id] === S && delete g[S.__id], S.__id = S.group.__ecComponentInfo = null);
        }
      }, TS = function(f, d, h, p, v) {
        var g = f._model;
        if (g.setUpdatePayload(h), !p) {
          F([].concat(f._componentsViews).concat(f._chartsViews), S);
          return;
        }
        var m = {};
        m[p + "Id"] = h[p + "Id"], m[p + "Index"] = h[p + "Index"], m[p + "Name"] = h[p + "Name"];
        var y = {
          mainType: p,
          query: m
        };
        v && (y.subType = v);
        var _ = h.excludeSeriesId, O;
        _ != null && (O = Ze(), F(wn(_), function(x) {
          var C = Br(x, null);
          C != null && O.set(C, !0);
        })), g && g.eachComponent(y, function(x) {
          var C = O && O.get(x.id) != null;
          if (!C)
            if (gG(h))
              if (x instanceof Cn)
                h.type === Ch && !h.notBlur && !x.get(["emphasis", "disabled"]) && gZe(x, h, f._api);
              else {
                var P = B5(x.mainType, x.componentIndex, h.name, f._api), $ = P.focusSelf, T = P.dispatchers;
                h.type === Ch && $ && !h.notBlur && Ak(x.mainType, x.componentIndex, f._api), T && F(T, function(E) {
                  h.type === Ch ? Fu(E) : Wu(E);
                });
              }
            else Mk(h) && x instanceof Cn && (bZe(x, h, f._api), pG(x), Mo(f));
        }, f), g && g.eachComponent(y, function(x) {
          var C = O && O.get(x.id) != null;
          C || S(f[p === "series" ? "_chartsMap" : "_componentsMap"][x.__viewId]);
        }, f);
        function S(x) {
          x && x.__alive && x[d] && x[d](x.__model, g, f._api, h);
        }
      }, Sc = {
        prepareAndUpdate: function(f) {
          nv(this), Sc.update.call(this, f, {
            // Needs to mark option changed if newOption is given.
            // It's from MagicType.
            // TODO If use a separate flag optionChanged in payload?
            optionChanged: f.newOption != null
          });
        },
        update: function(f, d) {
          var h = this._model, p = this._api, v = this._zr, g = this._coordSysMgr, m = this._scheduler;
          if (h) {
            h.setUpdatePayload(f), m.restoreData(h, f), m.performSeriesTasks(h), g.create(h, p), m.performDataProcessorTasks(h, f), CM(this, h), g.update(h, p), n(h), m.performVisualTasks(h, f), PM(this, h, p, f, d);
            var y = h.get("backgroundColor") || "transparent", _ = h.get("darkMode");
            v.setBackgroundColor(y), _ != null && _ !== "auto" && v.setDarkMode(_), Ts.trigger("afterupdate", h, p);
          }
        },
        updateTransform: function(f) {
          var d = this, h = this._model, p = this._api;
          if (h) {
            h.setUpdatePayload(f);
            var v = [];
            h.eachComponent(function(m, y) {
              if (m !== "series") {
                var _ = d.getViewOfComponentModel(y);
                if (_ && _.__alive)
                  if (_.updateTransform) {
                    var O = _.updateTransform(y, h, p, f);
                    O && O.update && v.push(_);
                  } else
                    v.push(_);
              }
            });
            var g = Ze();
            h.eachSeries(function(m) {
              var y = d._chartsMap[m.__viewId];
              if (y.updateTransform) {
                var _ = y.updateTransform(m, h, p, f);
                _ && _.update && g.set(m.uid, 1);
              } else
                g.set(m.uid, 1);
            }), n(h), this._scheduler.performVisualTasks(h, f, {
              setDirty: !0,
              dirtyMap: g
            }), PS(this, h, p, f, {}, g), Ts.trigger("afterupdate", h, p);
          }
        },
        updateView: function(f) {
          var d = this._model;
          d && (d.setUpdatePayload(f), _n.markUpdateMethod(f, "updateView"), n(d), this._scheduler.performVisualTasks(d, f, {
            setDirty: !0
          }), PM(this, d, this._api, f, {}), Ts.trigger("afterupdate", d, this._api));
        },
        updateVisual: function(f) {
          var d = this, h = this._model;
          h && (h.setUpdatePayload(f), h.eachSeries(function(p) {
            p.getData().clearAllVisual();
          }), _n.markUpdateMethod(f, "updateVisual"), n(h), this._scheduler.performVisualTasks(h, f, {
            visualType: "visual",
            setDirty: !0
          }), h.eachComponent(function(p, v) {
            if (p !== "series") {
              var g = d.getViewOfComponentModel(v);
              g && g.__alive && g.updateVisual(v, h, d._api, f);
            }
          }), h.eachSeries(function(p) {
            var v = d._chartsMap[p.__viewId];
            v.updateVisual(p, h, d._api, f);
          }), Ts.trigger("afterupdate", h, this._api));
        },
        updateLayout: function(f) {
          Sc.update.call(this, f);
        }
      }, wM = function(f, d, h, p) {
        if (f._disposed) {
          Ja(f.id);
          return;
        }
        for (var v = f._model, g = f._coordSysMgr.getCoordinateSystems(), m, y = tb(v, h), _ = 0; _ < g.length; _++) {
          var O = g[_];
          if (O[d] && (m = O[d](v, y, p)) != null)
            return m;
        }
        process.env.NODE_ENV !== "production" && nr("No coordinate system that supports " + d + " found by the given finder.");
      }, CM = function(f, d) {
        var h = f._chartsMap, p = f._scheduler;
        d.eachSeries(function(v) {
          p.updateStreamModes(v, h[v.__viewId]);
        });
      }, TM = function(f, d) {
        var h = this, p = this.getModel(), v = f.type, g = f.escapeConnect, m = ZC[v], y = m.actionInfo, _ = (y.update || "update").split(":"), O = _.pop(), S = _[0] != null && $l(_[0]);
        this[Ri] = !0;
        var x = [f], C = !1;
        f.batch && (C = !0, x = Ce(f.batch, function(N) {
          return N = it(_e({}, N), f), N.batch = null, N;
        }));
        var P = [], $, T = Mk(f), E = gG(f);
        if (E && cle(this._api), F(x, function(N) {
          if ($ = m.action(N, h._model, h._api), $ = $ || _e({}, N), $.type = y.event || $.type, P.push($), E) {
            var I = E5(f), B = I.queryOptionMap, Q = I.mainTypeSpecified, W = Q ? B.keys()[0] : "series";
            TS(h, O, N, W), Mo(h);
          } else T ? (TS(h, O, N, "series"), Mo(h)) : S && TS(h, O, N, S.main, S.sub);
        }), O !== "none" && !E && !T && !S)
          try {
            this[Oa] ? (nv(this), Sc.update.call(this, f), this[Oa] = null) : Sc[O].call(this, f);
          } catch (N) {
            throw this[Ri] = !1, N;
          }
        if (C ? $ = {
          type: y.event || v,
          escapeConnect: g,
          batch: P
        } : $ = P[0], this[Ri] = !1, !d) {
          var M = this._messageCenter;
          if (M.trigger($.type, $), T) {
            var R = {
              type: "selectchanged",
              escapeConnect: g,
              selected: _Ze(p),
              isFromClick: f.isFromClick || !1,
              fromAction: f.type,
              fromActionPayload: f
            };
            M.trigger(R.type, R);
          }
        }
      }, N0 = function(f) {
        for (var d = this._pendingActions; d.length; ) {
          var h = d.shift();
          TM.call(this, h, f);
        }
      }, B0 = function(f) {
        !f && this.trigger("updated");
      }, Ej = function(f, d) {
        f.on("rendered", function(h) {
          d.trigger("rendered", h), // Although zr is dirty if initial animation is not finished
          // and this checking is called on frame, we also check
          // animation finished for robustness.
          f.animation.isFinished() && !d[Oa] && !d._scheduler.unfinished && !d._pendingActions.length && d.trigger("finished");
        });
      }, Mj = function(f, d) {
        f.on("mouseover", function(h) {
          var p = h.target, v = sh(p, bf);
          v && (mZe(v, h, d._api), Mo(d));
        }).on("mouseout", function(h) {
          var p = h.target, v = sh(p, bf);
          v && (yZe(v, h, d._api), Mo(d));
        }).on("click", function(h) {
          var p = h.target, v = sh(p, function(y) {
            return ft(y).dataIndex != null;
          }, !0);
          if (v) {
            var g = v.selected ? "unselect" : "select", m = ft(v);
            d._api.dispatchAction({
              type: g,
              dataType: m.dataType,
              dataIndexInside: m.dataIndex,
              seriesIndex: m.seriesIndex,
              isFromClick: !0
            });
          }
        });
      };
      function n(f) {
        f.clearColorPalette(), f.eachSeries(function(d) {
          d.clearColorPalette();
        });
      }
      function r(f) {
        var d = [], h = [], p = !1;
        if (f.eachComponent(function(y, _) {
          var O = _.get("zlevel") || 0, S = _.get("z") || 0, x = _.getZLevelKey();
          p = p || !!x, (y === "series" ? h : d).push({
            zlevel: O,
            z: S,
            idx: _.componentIndex,
            type: y,
            key: x
          });
        }), p) {
          var v = d.concat(h), g, m;
          aw(v, function(y, _) {
            return y.zlevel === _.zlevel ? y.z - _.z : y.zlevel - _.zlevel;
          }), F(v, function(y) {
            var _ = f.getComponent(y.type, y.idx), O = y.zlevel, S = y.key;
            g != null && (O = Math.max(g, O)), S ? (O === g && S !== m && O++, m = S) : m && (O === g && O++, m = ""), g = O, _.setZLevel(O);
          });
        }
      }
      PM = function(f, d, h, p, v) {
        r(d), Ij(f, d, h, p, v), F(f._chartsViews, function(g) {
          g.__alive = !1;
        }), PS(f, d, h, p, v), F(f._chartsViews, function(g) {
          g.__alive || g.remove(d, h);
        });
      }, Ij = function(f, d, h, p, v, g) {
        F(g || f._componentsViews, function(m) {
          var y = m.__model;
          u(y, m), m.render(y, d, h, p), s(y, m), c(y, m);
        });
      }, PS = function(f, d, h, p, v, g) {
        var m = f._scheduler;
        v = _e(v || {}, {
          updatedSeries: d.getSeries()
        }), Ts.trigger("series:beforeupdate", d, h, v);
        var y = !1;
        d.eachSeries(function(_) {
          var O = f._chartsMap[_.__viewId];
          O.__alive = !0;
          var S = O.renderTask;
          m.updatePayload(S, p), u(_, O), g && g.get(_.uid) && S.dirty(), S.perform(m.getPerformArgs(S)) && (y = !0), O.group.silent = !!_.get("silent"), o(_, O), pG(_);
        }), m.unfinished = y || m.unfinished, Ts.trigger("series:layoutlabels", d, h, v), Ts.trigger("series:transition", d, h, v), d.eachSeries(function(_) {
          var O = f._chartsMap[_.__viewId];
          s(_, O), c(_, O);
        }), a(f, d), Ts.trigger("series:afterupdate", d, h, v);
      }, Mo = function(f) {
        f[OM] = !0, f.getZr().wakeUp();
      }, Rj = function(f) {
        f[OM] && (f.getZr().storage.traverse(function(d) {
          qv(d) || i(d);
        }), f[OM] = !1);
      };
      function i(f) {
        for (var d = [], h = f.currentStates, p = 0; p < h.length; p++) {
          var v = h[p];
          v === "emphasis" || v === "blur" || v === "select" || d.push(v);
        }
        f.selected && f.states.select && d.push("select"), f.hoverState === bP && f.states.emphasis ? d.push("emphasis") : f.hoverState === u1 && f.states.blur && d.push("blur"), f.useStates(d);
      }
      function a(f, d) {
        var h = f._zr, p = h.storage, v = 0;
        p.traverse(function(g) {
          g.isGroup || v++;
        }), v > d.get("hoverLayerThreshold") && !Gt.node && !Gt.worker && d.eachSeries(function(g) {
          if (!g.preventUsingHoverLayer) {
            var m = f._chartsMap[g.__viewId];
            m.__alive && m.eachRendered(function(y) {
              y.states.emphasis && (y.states.emphasis.hoverLayer = !0);
            });
          }
        });
      }
      function o(f, d) {
        var h = f.get("blendMode") || null;
        d.eachRendered(function(p) {
          p.isGroup || (p.style.blend = h);
        });
      }
      function s(f, d) {
        if (!f.preventAutoZ) {
          var h = f.get("z") || 0, p = f.get("zlevel") || 0;
          d.eachRendered(function(v) {
            return l(v, h, p, -1 / 0), !0;
          });
        }
      }
      function l(f, d, h, p) {
        var v = f.getTextContent(), g = f.getTextGuideLine(), m = f.isGroup;
        if (m)
          for (var y = f.childrenRef(), _ = 0; _ < y.length; _++)
            p = Math.max(l(y[_], d, h, p), p);
        else
          f.z = d, f.zlevel = h, p = Math.max(f.z2, p);
        if (v && (v.z = d, v.zlevel = h, isFinite(p) && (v.z2 = p + 2)), g) {
          var O = f.textGuideLineConfig;
          g.z = d, g.zlevel = h, isFinite(p) && (g.z2 = p + (O && O.showAbove ? 1 : -1));
        }
        return p;
      }
      function u(f, d) {
        d.eachRendered(function(h) {
          if (!qv(h)) {
            var p = h.getTextContent(), v = h.getTextGuideLine();
            h.stateTransition && (h.stateTransition = null), p && p.stateTransition && (p.stateTransition = null), v && v.stateTransition && (v.stateTransition = null), h.hasState() ? (h.prevStates = h.currentStates, h.clearStates()) : h.prevStates && (h.prevStates = null);
          }
        });
      }
      function c(f, d) {
        var h = f.getModel("stateAnimation"), p = f.isAnimationEnabled(), v = h.get("duration"), g = v > 0 ? {
          duration: v,
          delay: h.get("delay"),
          easing: h.get("easing")
          // additive: stateAnimationModel.get('additive')
        } : null;
        d.eachRendered(function(m) {
          if (m.states && m.states.emphasis) {
            if (qv(m))
              return;
            if (m instanceof Dt && CZe(m), m.__dirty) {
              var y = m.prevStates;
              y && m.useStates(y);
            }
            if (p) {
              m.stateTransition = g;
              var _ = m.getTextContent(), O = m.getTextGuideLine();
              _ && (_.stateTransition = g), O && (O.stateTransition = g);
            }
            m.__dirty && i(m);
          }
        });
      }
      Dj = function(f) {
        return new /** @class */
        (function(d) {
          le(h, d);
          function h() {
            return d !== null && d.apply(this, arguments) || this;
          }
          return h.prototype.getCoordinateSystems = function() {
            return f._coordSysMgr.getCoordinateSystems();
          }, h.prototype.getComponentByElement = function(p) {
            for (; p; ) {
              var v = p.__ecComponentInfo;
              if (v != null)
                return f._model.getComponent(v.mainType, v.index);
              p = p.parent;
            }
          }, h.prototype.enterEmphasis = function(p, v) {
            Fu(p, v), Mo(f);
          }, h.prototype.leaveEmphasis = function(p, v) {
            Wu(p, v), Mo(f);
          }, h.prototype.enterBlur = function(p) {
            ole(p), Mo(f);
          }, h.prototype.leaveBlur = function(p) {
            N5(p), Mo(f);
          }, h.prototype.enterSelect = function(p) {
            sle(p), Mo(f);
          }, h.prototype.leaveSelect = function(p) {
            lle(p), Mo(f);
          }, h.prototype.getModel = function() {
            return f.getModel();
          }, h.prototype.getViewOfComponentModel = function(p) {
            return f.getViewOfComponentModel(p);
          }, h.prototype.getViewOfSeriesModel = function(p) {
            return f.getViewOfSeriesModel(p);
          }, h;
        }(aue))(f);
      }, ece = function(f) {
        function d(h, p) {
          for (var v = 0; v < h.length; v++) {
            var g = h[v];
            g[SM] = p;
          }
        }
        F(sb, function(h, p) {
          f._messageCenter.on(p, function(v) {
            if (XC[f.group] && f[SM] !== Aj) {
              if (v && v.escapeConnect)
                return;
              var g = f.makeActionFromEvent(v), m = [];
              F(Ph, function(y) {
                y !== f && y.group === f.group && m.push(y);
              }), d(m, Aj), F(m, function(y) {
                y[SM] !== tqe && y.dispatchAction(g);
              }), d(m, nqe);
            }
          });
        });
      };
    }(), e;
  }(fs)
), p3 = jC.prototype;
p3.on = Xue("on");
p3.off = Xue("off");
p3.one = function(t, e, n) {
  var r = this;
  ss("ECharts#one is deprecated.");
  function i() {
    for (var a = [], o = 0; o < arguments.length; o++)
      a[o] = arguments[o];
    e && e.apply && e.apply(this, a), r.off(t, i);
  }
  this.on.call(this, t, i, n);
};
var rqe = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
function Ja(t) {
  process.env.NODE_ENV !== "production" && nr("Instance " + t + " has been disposed");
}
var ZC = {}, sb = {}, Uk = [], Xk = [], UC = [], tce = {}, Yk = {}, Ph = {}, XC = {}, iqe = +/* @__PURE__ */ new Date() - 0, aqe = +/* @__PURE__ */ new Date() - 0, v3 = "_echarts_instance_";
function nce(t, e, n) {
  var r = !(n && n.ssr);
  if (r) {
    if (process.env.NODE_ENV !== "production" && !t)
      throw new Error("Initialize failed: invalid dom.");
    var i = g3(t);
    if (i)
      return process.env.NODE_ENV !== "production" && nr("There is a chart instance already initialized on the dom."), i;
    process.env.NODE_ENV !== "production" && gf(t) && t.nodeName.toUpperCase() !== "CANVAS" && (!t.clientWidth && (!n || n.width == null) || !t.clientHeight && (!n || n.height == null)) && nr("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.");
  }
  var a = new jC(t, e, n);
  return a.id = "ec_" + iqe++, Ph[a.id] = a, r && zse(t, v3, a.id), ece(a), Ts.trigger("afterinit", a), a;
}
function oqe(t) {
  if (Se(t)) {
    var e = t;
    t = null, F(e, function(n) {
      n.group != null && (t = n.group);
    }), t = t || "g_" + aqe++, F(e, function(n) {
      n.group = t;
    });
  }
  return XC[t] = !0, t;
}
function rce(t) {
  XC[t] = !1;
}
var sqe = rce;
function lqe(t) {
  Ve(t) ? t = Ph[t] : t instanceof jC || (t = g3(t)), t instanceof jC && !t.isDisposed() && t.dispose();
}
function g3(t) {
  return Ph[hje(t, v3)];
}
function uqe(t) {
  return Ph[t];
}
function m3(t, e) {
  tce[t] = e;
}
function y3(t) {
  St(Xk, t) < 0 && Xk.push(t);
}
function b3(t, e) {
  _3(Uk, t, e, UYe);
}
function ice(t) {
  NP("afterinit", t);
}
function ace(t) {
  NP("afterupdate", t);
}
function NP(t, e) {
  Ts.on(t, e);
}
function Js(t, e, n) {
  qe(e) && (n = e, e = "");
  var r = nt(t) ? t.type : [t, t = {
    event: e
  }][0];
  t.event = (t.event || r).toLowerCase(), e = t.event, !sb[e] && (at($j.test(r) && $j.test(e)), ZC[r] || (ZC[r] = {
    action: n,
    actionInfo: t
  }), sb[e] = r);
}
function oce(t, e) {
  gp.register(t, e);
}
function cqe(t) {
  var e = gp.get(t);
  if (e)
    return e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice();
}
function sce(t, e) {
  _3(UC, t, e, Gue, "layout");
}
function zf(t, e) {
  _3(UC, t, e, jue, "visual");
}
var kj = [];
function _3(t, e, n, r, i) {
  if ((qe(e) || nt(e)) && (n = e, e = r), process.env.NODE_ENV !== "production") {
    if (isNaN(e) || e == null)
      throw new Error("Illegal priority");
    F(t, function(o) {
      at(o.__raw !== n);
    });
  }
  if (!(St(kj, n) >= 0)) {
    kj.push(n);
    var a = Iue.wrapStageHandler(n, i);
    a.__prio = e, a.__raw = n, t.push(a);
  }
}
function O3(t, e) {
  Yk[t] = e;
}
function fqe(t) {
  process.env.NODE_ENV !== "production" && ss("setCanvasCreator is deprecated. Use setPlatformAPI({ createCanvas }) instead."), Goe({
    createCanvas: t
  });
}
function lce(t, e, n) {
  var r = Hue("registerMap");
  r && r(t, e, n);
}
function dqe(t) {
  var e = Hue("getMap");
  return e && e(t);
}
var uce = CXe;
zf(h3, YXe);
zf(LP, qXe);
zf(LP, KXe);
zf(h3, fYe);
zf(LP, dYe);
zf(Zue, VYe);
y3(sue);
b3(jYe, aXe);
O3("default", JXe);
Js({
  type: Ch,
  event: Ch,
  update: Ch
}, fr);
Js({
  type: cw,
  event: cw,
  update: cw
}, fr);
Js({
  type: nb,
  event: nb,
  update: nb
}, fr);
Js({
  type: fw,
  event: fw,
  update: fw
}, fr);
Js({
  type: rb,
  event: rb,
  update: rb
}, fr);
m3("light", uYe);
m3("dark", Lue);
var hqe = {}, Lj = [], pqe = {
  registerPreprocessor: y3,
  registerProcessor: b3,
  registerPostInit: ice,
  registerPostUpdate: ace,
  registerUpdateLifecycle: NP,
  registerAction: Js,
  registerCoordinateSystem: oce,
  registerLayout: sce,
  registerVisual: zf,
  registerTransform: uce,
  registerLoading: O3,
  registerMap: lce,
  registerImpl: FYe,
  PRIORITY: Uue,
  ComponentModel: At,
  ComponentView: Ln,
  SeriesModel: Cn,
  ChartView: _n,
  // TODO Use ComponentModel and SeriesModel instead of Constructor
  registerComponentModel: function(t) {
    At.registerClass(t);
  },
  registerComponentView: function(t) {
    Ln.registerClass(t);
  },
  registerSeriesModel: function(t) {
    Cn.registerClass(t);
  },
  registerChartView: function(t) {
    _n.registerClass(t);
  },
  registerSubTypeDefaulter: function(t, e) {
    At.registerSubTypeDefaulter(t, e);
  },
  registerPainter: function(t, e) {
    Pse(t, e);
  }
};
function Mt(t) {
  if (Se(t)) {
    F(t, function(e) {
      Mt(e);
    });
    return;
  }
  St(Lj, t) >= 0 || (Lj.push(t), qe(t) && (t = {
    install: t
  }), t.install(pqe));
}
function z0(t) {
  return t == null ? 0 : t.length || 1;
}
function Nj(t) {
  return t;
}
var Qu = (
  /** @class */
  function() {
    function t(e, n, r, i, a, o) {
      this._old = e, this._new = n, this._oldKeyGetter = r || Nj, this._newKeyGetter = i || Nj, this.context = a, this._diffModeMultiple = o === "multiple";
    }
    return t.prototype.add = function(e) {
      return this._add = e, this;
    }, t.prototype.update = function(e) {
      return this._update = e, this;
    }, t.prototype.updateManyToOne = function(e) {
      return this._updateManyToOne = e, this;
    }, t.prototype.updateOneToMany = function(e) {
      return this._updateOneToMany = e, this;
    }, t.prototype.updateManyToMany = function(e) {
      return this._updateManyToMany = e, this;
    }, t.prototype.remove = function(e) {
      return this._remove = e, this;
    }, t.prototype.execute = function() {
      this[this._diffModeMultiple ? "_executeMultiple" : "_executeOneToOne"]();
    }, t.prototype._executeOneToOne = function() {
      var e = this._old, n = this._new, r = {}, i = new Array(e.length), a = new Array(n.length);
      this._initIndexMap(e, null, i, "_oldKeyGetter"), this._initIndexMap(n, r, a, "_newKeyGetter");
      for (var o = 0; o < e.length; o++) {
        var s = i[o], l = r[s], u = z0(l);
        if (u > 1) {
          var c = l.shift();
          l.length === 1 && (r[s] = l[0]), this._update && this._update(c, o);
        } else u === 1 ? (r[s] = null, this._update && this._update(l, o)) : this._remove && this._remove(o);
      }
      this._performRestAdd(a, r);
    }, t.prototype._executeMultiple = function() {
      var e = this._old, n = this._new, r = {}, i = {}, a = [], o = [];
      this._initIndexMap(e, r, a, "_oldKeyGetter"), this._initIndexMap(n, i, o, "_newKeyGetter");
      for (var s = 0; s < a.length; s++) {
        var l = a[s], u = r[l], c = i[l], f = z0(u), d = z0(c);
        if (f > 1 && d === 1)
          this._updateManyToOne && this._updateManyToOne(c, u), i[l] = null;
        else if (f === 1 && d > 1)
          this._updateOneToMany && this._updateOneToMany(c, u), i[l] = null;
        else if (f === 1 && d === 1)
          this._update && this._update(c, u), i[l] = null;
        else if (f > 1 && d > 1)
          this._updateManyToMany && this._updateManyToMany(c, u), i[l] = null;
        else if (f > 1)
          for (var h = 0; h < f; h++)
            this._remove && this._remove(u[h]);
        else
          this._remove && this._remove(u);
      }
      this._performRestAdd(o, i);
    }, t.prototype._performRestAdd = function(e, n) {
      for (var r = 0; r < e.length; r++) {
        var i = e[r], a = n[i], o = z0(a);
        if (o > 1)
          for (var s = 0; s < o; s++)
            this._add && this._add(a[s]);
        else o === 1 && this._add && this._add(a);
        n[i] = null;
      }
    }, t.prototype._initIndexMap = function(e, n, r, i) {
      for (var a = this._diffModeMultiple, o = 0; o < e.length; o++) {
        var s = "_ec_" + this[i](e[o], o);
        if (a || (r[o] = s), !!n) {
          var l = n[s], u = z0(l);
          u === 0 ? (n[s] = o, a && r.push(s)) : u === 1 ? n[s] = [l, o] : l.push(o);
        }
      }
    }, t;
  }()
), vqe = (
  /** @class */
  function() {
    function t(e, n) {
      this._encode = e, this._schema = n;
    }
    return t.prototype.get = function() {
      return {
        // Do not generate full dimension name until fist used.
        fullDimensions: this._getFullDimensionNames(),
        encode: this._encode
      };
    }, t.prototype._getFullDimensionNames = function() {
      return this._cachedDimNames || (this._cachedDimNames = this._schema ? this._schema.makeOutputDimensionNames() : []), this._cachedDimNames;
    }, t;
  }()
);
function gqe(t, e) {
  var n = {}, r = n.encode = {}, i = Ze(), a = [], o = [], s = {};
  F(t.dimensions, function(d) {
    var h = t.getDimensionInfo(d), p = h.coordDim;
    if (p) {
      process.env.NODE_ENV !== "production" && at(Nk.get(p) == null);
      var v = h.coordDimIndex;
      $M(r, p)[v] = d, h.isExtraCoord || (i.set(p, 1), mqe(h.type) && (a[0] = d), $M(s, p)[v] = t.getDimensionIndex(h.name)), h.defaultTooltip && o.push(d);
    }
    Nk.each(function(g, m) {
      var y = $M(r, m), _ = h.otherDims[m];
      _ != null && _ !== !1 && (y[_] = h.name);
    });
  });
  var l = [], u = {};
  i.each(function(d, h) {
    var p = r[h];
    u[h] = p[0], l = l.concat(p);
  }), n.dataDimsOnCoord = l, n.dataDimIndicesOnCoord = Ce(l, function(d) {
    return t.getDimensionInfo(d).storeDimIndex;
  }), n.encodeFirstDimNotExtra = u;
  var c = r.label;
  c && c.length && (a = c.slice());
  var f = r.tooltip;
  return f && f.length ? o = f.slice() : o.length || (o = a.slice()), r.defaultedLabel = a, r.defaultedTooltip = o, n.userOutput = new vqe(s, e), n;
}
function $M(t, e) {
  return t.hasOwnProperty(e) || (t[e] = []), t[e];
}
function YC(t) {
  return t === "category" ? "ordinal" : t === "time" ? "time" : "float";
}
function mqe(t) {
  return !(t === "ordinal" || t === "time");
}
var gw = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e) {
      this.otherDims = {}, e != null && _e(this, e);
    }
    return t;
  }()
), yqe = Ut(), bqe = {
  float: "f",
  int: "i",
  ordinal: "o",
  number: "n",
  time: "t"
}, cce = (
  /** @class */
  function() {
    function t(e) {
      this.dimensions = e.dimensions, this._dimOmitted = e.dimensionOmitted, this.source = e.source, this._fullDimCount = e.fullDimensionCount, this._updateDimOmitted(e.dimensionOmitted);
    }
    return t.prototype.isDimensionOmitted = function() {
      return this._dimOmitted;
    }, t.prototype._updateDimOmitted = function(e) {
      this._dimOmitted = e, e && (this._dimNameMap || (this._dimNameMap = hce(this.source)));
    }, t.prototype.getSourceDimensionIndex = function(e) {
      return dt(this._dimNameMap.get(e), -1);
    }, t.prototype.getSourceDimension = function(e) {
      var n = this.source.dimensionsDefine;
      if (n)
        return n[e];
    }, t.prototype.makeStoreSchema = function() {
      for (var e = this._fullDimCount, n = uue(this.source), r = !pce(e), i = "", a = [], o = 0, s = 0; o < e; o++) {
        var l = void 0, u = void 0, c = void 0, f = this.dimensions[s];
        if (f && f.storeDimIndex === o)
          l = n ? f.name : null, u = f.type, c = f.ordinalMeta, s++;
        else {
          var d = this.getSourceDimension(o);
          d && (l = n ? d.name : null, u = d.type);
        }
        a.push({
          property: l,
          type: u,
          ordinalMeta: c
        }), n && l != null && (!f || !f.isCalculationCoord) && (i += r ? l.replace(/\`/g, "`1").replace(/\$/g, "`2") : l), i += "$", i += bqe[u] || "f", c && (i += c.uid), i += "$";
      }
      var h = this.source, p = [h.seriesLayoutBy, h.startIndex, i].join("$$");
      return {
        dimensions: a,
        hash: p
      };
    }, t.prototype.makeOutputDimensionNames = function() {
      for (var e = [], n = 0, r = 0; n < this._fullDimCount; n++) {
        var i = void 0, a = this.dimensions[r];
        if (a && a.storeDimIndex === n)
          a.isCalculationCoord || (i = a.name), r++;
        else {
          var o = this.getSourceDimension(n);
          o && (i = o.name);
        }
        e.push(i);
      }
      return e;
    }, t.prototype.appendCalculationDimension = function(e) {
      this.dimensions.push(e), e.isCalculationCoord = !0, this._fullDimCount++, this._updateDimOmitted(!0);
    }, t;
  }()
);
function fce(t) {
  return t instanceof cce;
}
function dce(t) {
  for (var e = Ze(), n = 0; n < (t || []).length; n++) {
    var r = t[n], i = nt(r) ? r.name : r;
    i != null && e.get(i) == null && e.set(i, n);
  }
  return e;
}
function hce(t) {
  var e = yqe(t);
  return e.dimNameMap || (e.dimNameMap = dce(t.dimensionsDefine));
}
function pce(t) {
  return t > 30;
}
var V0 = nt, xc = Ce, _qe = typeof Int32Array > "u" ? Array : Int32Array, Oqe = "e\0\0", Bj = -1, Sqe = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_dimSummary", "userOutput", "_rawData", "_dimValueGetter", "_nameDimIdx", "_idDimIdx", "_nameRepeatCount"], xqe = ["_approximateExtent"], zj, $S, F0, rv, AM, AS, EM, wqe = (
  /** @class */
  function() {
    function t(e, n) {
      this.type = "list", this._dimOmitted = !1, this._nameList = [], this._idList = [], this._visual = {}, this._layout = {}, this._itemVisuals = [], this._itemLayouts = [], this._graphicEls = [], this._approximateExtent = {}, this._calculationInfo = {}, this.hasItemOption = !1, this.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "lttbDownSample", "map"], this.CHANGABLE_METHODS = ["filterSelf", "selectRange"], this.DOWNSAMPLE_METHODS = ["downSample", "lttbDownSample"];
      var r, i = !1;
      fce(e) ? (r = e.dimensions, this._dimOmitted = e.isDimensionOmitted(), this._schema = e) : (i = !0, r = e), r = r || ["x", "y"];
      for (var a = {}, o = [], s = {}, l = !1, u = {}, c = 0; c < r.length; c++) {
        var f = r[c], d = Ve(f) ? new gw({
          name: f
        }) : f instanceof gw ? f : new gw(f), h = d.name;
        d.type = d.type || "float", d.coordDim || (d.coordDim = h, d.coordDimIndex = 0);
        var p = d.otherDims = d.otherDims || {};
        o.push(h), a[h] = d, u[h] != null && (l = !0), d.createInvertedIndices && (s[h] = []), p.itemName === 0 && (this._nameDimIdx = c), p.itemId === 0 && (this._idDimIdx = c), process.env.NODE_ENV !== "production" && at(i || d.storeDimIndex >= 0), i && (d.storeDimIndex = c);
      }
      if (this.dimensions = o, this._dimInfos = a, this._initGetDimensionInfo(l), this.hostModel = n, this._invertedIndicesMap = s, this._dimOmitted) {
        var v = this._dimIdxToName = Ze();
        F(o, function(g) {
          v.set(a[g].storeDimIndex, g);
        });
      }
    }
    return t.prototype.getDimension = function(e) {
      var n = this._recognizeDimIndex(e);
      if (n == null)
        return e;
      if (n = e, !this._dimOmitted)
        return this.dimensions[n];
      var r = this._dimIdxToName.get(n);
      if (r != null)
        return r;
      var i = this._schema.getSourceDimension(n);
      if (i)
        return i.name;
    }, t.prototype.getDimensionIndex = function(e) {
      var n = this._recognizeDimIndex(e);
      if (n != null)
        return n;
      if (e == null)
        return -1;
      var r = this._getDimInfo(e);
      return r ? r.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(e) : -1;
    }, t.prototype._recognizeDimIndex = function(e) {
      if (Kt(e) || e != null && !isNaN(e) && !this._getDimInfo(e) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(e) < 0))
        return +e;
    }, t.prototype._getStoreDimIndex = function(e) {
      var n = this.getDimensionIndex(e);
      if (process.env.NODE_ENV !== "production" && n == null)
        throw new Error("Unknown dimension " + e);
      return n;
    }, t.prototype.getDimensionInfo = function(e) {
      return this._getDimInfo(this.getDimension(e));
    }, t.prototype._initGetDimensionInfo = function(e) {
      var n = this._dimInfos;
      this._getDimInfo = e ? function(r) {
        return n.hasOwnProperty(r) ? n[r] : void 0;
      } : function(r) {
        return n[r];
      };
    }, t.prototype.getDimensionsOnCoord = function() {
      return this._dimSummary.dataDimsOnCoord.slice();
    }, t.prototype.mapDimension = function(e, n) {
      var r = this._dimSummary;
      if (n == null)
        return r.encodeFirstDimNotExtra[e];
      var i = r.encode[e];
      return i ? i[n] : null;
    }, t.prototype.mapDimensionsAll = function(e) {
      var n = this._dimSummary, r = n.encode[e];
      return (r || []).slice();
    }, t.prototype.getStore = function() {
      return this._store;
    }, t.prototype.initData = function(e, n, r) {
      var i = this, a;
      if (e instanceof Fk && (a = e), !a) {
        var o = this.dimensions, s = o3(e) || Pi(e) ? new cue(e, o.length) : e;
        a = new Fk();
        var l = xc(o, function(u) {
          return {
            type: i._dimInfos[u].type,
            property: u
          };
        });
        a.initData(s, l, r);
      }
      this._store = a, this._nameList = (n || []).slice(), this._idList = [], this._nameRepeatCount = {}, this._doInit(0, a.count()), this._dimSummary = gqe(this, this._schema), this.userOutput = this._dimSummary.userOutput;
    }, t.prototype.appendData = function(e) {
      var n = this._store.appendData(e);
      this._doInit(n[0], n[1]);
    }, t.prototype.appendValues = function(e, n) {
      var r = this._store.appendValues(e, n.length), i = r.start, a = r.end, o = this._shouldMakeIdFromName();
      if (this._updateOrdinalMeta(), n)
        for (var s = i; s < a; s++) {
          var l = s - i;
          this._nameList[s] = n[l], o && EM(this, s);
        }
    }, t.prototype._updateOrdinalMeta = function() {
      for (var e = this._store, n = this.dimensions, r = 0; r < n.length; r++) {
        var i = this._dimInfos[n[r]];
        i.ordinalMeta && e.collectOrdinalMeta(i.storeDimIndex, i.ordinalMeta);
      }
    }, t.prototype._shouldMakeIdFromName = function() {
      var e = this._store.getProvider();
      return this._idDimIdx == null && e.getSource().sourceFormat !== Mu && !e.fillStorage;
    }, t.prototype._doInit = function(e, n) {
      if (!(e >= n)) {
        var r = this._store, i = r.getProvider();
        this._updateOrdinalMeta();
        var a = this._nameList, o = this._idList, s = i.getSource().sourceFormat, l = s === hs;
        if (l && !i.pure)
          for (var u = [], c = e; c < n; c++) {
            var f = i.getItem(c, u);
            if (!this.hasItemOption && eje(f) && (this.hasItemOption = !0), f) {
              var d = f.name;
              a[c] == null && d != null && (a[c] = Br(d, null));
              var h = f.id;
              o[c] == null && h != null && (o[c] = Br(h, null));
            }
          }
        if (this._shouldMakeIdFromName())
          for (var c = e; c < n; c++)
            EM(this, c);
        zj(this);
      }
    }, t.prototype.getApproximateExtent = function(e) {
      return this._approximateExtent[e] || this._store.getDataExtent(this._getStoreDimIndex(e));
    }, t.prototype.setApproximateExtent = function(e, n) {
      n = this.getDimension(n), this._approximateExtent[n] = e.slice();
    }, t.prototype.getCalculationInfo = function(e) {
      return this._calculationInfo[e];
    }, t.prototype.setCalculationInfo = function(e, n) {
      V0(e) ? _e(this._calculationInfo, e) : this._calculationInfo[e] = n;
    }, t.prototype.getName = function(e) {
      var n = this.getRawIndex(e), r = this._nameList[n];
      return r == null && this._nameDimIdx != null && (r = F0(this, this._nameDimIdx, n)), r == null && (r = ""), r;
    }, t.prototype._getCategory = function(e, n) {
      var r = this._store.get(e, n), i = this._store.getOrdinalMeta(e);
      return i ? i.categories[r] : r;
    }, t.prototype.getId = function(e) {
      return $S(this, this.getRawIndex(e));
    }, t.prototype.count = function() {
      return this._store.count();
    }, t.prototype.get = function(e, n) {
      var r = this._store, i = this._dimInfos[e];
      if (i)
        return r.get(i.storeDimIndex, n);
    }, t.prototype.getByRawIndex = function(e, n) {
      var r = this._store, i = this._dimInfos[e];
      if (i)
        return r.getByRawIndex(i.storeDimIndex, n);
    }, t.prototype.getIndices = function() {
      return this._store.getIndices();
    }, t.prototype.getDataExtent = function(e) {
      return this._store.getDataExtent(this._getStoreDimIndex(e));
    }, t.prototype.getSum = function(e) {
      return this._store.getSum(this._getStoreDimIndex(e));
    }, t.prototype.getMedian = function(e) {
      return this._store.getMedian(this._getStoreDimIndex(e));
    }, t.prototype.getValues = function(e, n) {
      var r = this, i = this._store;
      return Se(e) ? i.getValues(xc(e, function(a) {
        return r._getStoreDimIndex(a);
      }), n) : i.getValues(e);
    }, t.prototype.hasValue = function(e) {
      for (var n = this._dimSummary.dataDimIndicesOnCoord, r = 0, i = n.length; r < i; r++)
        if (isNaN(this._store.get(n[r], e)))
          return !1;
      return !0;
    }, t.prototype.indexOfName = function(e) {
      for (var n = 0, r = this._store.count(); n < r; n++)
        if (this.getName(n) === e)
          return n;
      return -1;
    }, t.prototype.getRawIndex = function(e) {
      return this._store.getRawIndex(e);
    }, t.prototype.indexOfRawIndex = function(e) {
      return this._store.indexOfRawIndex(e);
    }, t.prototype.rawIndexOf = function(e, n) {
      var r = e && this._invertedIndicesMap[e];
      if (process.env.NODE_ENV !== "production" && !r)
        throw new Error("Do not supported yet");
      var i = r[n];
      return i == null || isNaN(i) ? Bj : i;
    }, t.prototype.indicesOfNearest = function(e, n, r) {
      return this._store.indicesOfNearest(this._getStoreDimIndex(e), n, r);
    }, t.prototype.each = function(e, n, r) {
      qe(e) && (r = n, n = e, e = []);
      var i = r || this, a = xc(rv(e), this._getStoreDimIndex, this);
      this._store.each(a, i ? We(n, i) : n);
    }, t.prototype.filterSelf = function(e, n, r) {
      qe(e) && (r = n, n = e, e = []);
      var i = r || this, a = xc(rv(e), this._getStoreDimIndex, this);
      return this._store = this._store.filter(a, i ? We(n, i) : n), this;
    }, t.prototype.selectRange = function(e) {
      var n = this, r = {}, i = kt(e);
      return F(i, function(a) {
        var o = n._getStoreDimIndex(a);
        r[o] = e[a];
      }), this._store = this._store.selectRange(r), this;
    }, t.prototype.mapArray = function(e, n, r) {
      qe(e) && (r = n, n = e, e = []), r = r || this;
      var i = [];
      return this.each(e, function() {
        i.push(n && n.apply(this, arguments));
      }, r), i;
    }, t.prototype.map = function(e, n, r, i) {
      var a = r || i || this, o = xc(rv(e), this._getStoreDimIndex, this), s = AS(this);
      return s._store = this._store.map(o, a ? We(n, a) : n), s;
    }, t.prototype.modify = function(e, n, r, i) {
      var a = this, o = r || i || this;
      process.env.NODE_ENV !== "production" && F(rv(e), function(l) {
        var u = a.getDimensionInfo(l);
        u.isCalculationCoord || console.error("Danger: only stack dimension can be modified");
      });
      var s = xc(rv(e), this._getStoreDimIndex, this);
      this._store.modify(s, o ? We(n, o) : n);
    }, t.prototype.downSample = function(e, n, r, i) {
      var a = AS(this);
      return a._store = this._store.downSample(this._getStoreDimIndex(e), n, r, i), a;
    }, t.prototype.lttbDownSample = function(e, n) {
      var r = AS(this);
      return r._store = this._store.lttbDownSample(this._getStoreDimIndex(e), n), r;
    }, t.prototype.getRawDataItem = function(e) {
      return this._store.getRawDataItem(e);
    }, t.prototype.getItemModel = function(e) {
      var n = this.hostModel, r = this.getRawDataItem(e);
      return new xn(r, n, n && n.ecModel);
    }, t.prototype.diff = function(e) {
      var n = this;
      return new Qu(e ? e.getStore().getIndices() : [], this.getStore().getIndices(), function(r) {
        return $S(e, r);
      }, function(r) {
        return $S(n, r);
      });
    }, t.prototype.getVisual = function(e) {
      var n = this._visual;
      return n && n[e];
    }, t.prototype.setVisual = function(e, n) {
      this._visual = this._visual || {}, V0(e) ? _e(this._visual, e) : this._visual[e] = n;
    }, t.prototype.getItemVisual = function(e, n) {
      var r = this._itemVisuals[e], i = r && r[n];
      return i ?? this.getVisual(n);
    }, t.prototype.hasItemVisual = function() {
      return this._itemVisuals.length > 0;
    }, t.prototype.ensureUniqueItemVisual = function(e, n) {
      var r = this._itemVisuals, i = r[e];
      i || (i = r[e] = {});
      var a = i[n];
      return a == null && (a = this.getVisual(n), Se(a) ? a = a.slice() : V0(a) && (a = _e({}, a)), i[n] = a), a;
    }, t.prototype.setItemVisual = function(e, n, r) {
      var i = this._itemVisuals[e] || {};
      this._itemVisuals[e] = i, V0(n) ? _e(i, n) : i[n] = r;
    }, t.prototype.clearAllVisual = function() {
      this._visual = {}, this._itemVisuals = [];
    }, t.prototype.setLayout = function(e, n) {
      V0(e) ? _e(this._layout, e) : this._layout[e] = n;
    }, t.prototype.getLayout = function(e) {
      return this._layout[e];
    }, t.prototype.getItemLayout = function(e) {
      return this._itemLayouts[e];
    }, t.prototype.setItemLayout = function(e, n, r) {
      this._itemLayouts[e] = r ? _e(this._itemLayouts[e] || {}, n) : n;
    }, t.prototype.clearItemLayouts = function() {
      this._itemLayouts.length = 0;
    }, t.prototype.setItemGraphicEl = function(e, n) {
      var r = this.hostModel && this.hostModel.seriesIndex;
      Pk(r, this.dataType, e, n), this._graphicEls[e] = n;
    }, t.prototype.getItemGraphicEl = function(e) {
      return this._graphicEls[e];
    }, t.prototype.eachItemGraphicEl = function(e, n) {
      F(this._graphicEls, function(r, i) {
        r && e && e.call(n, r, i);
      });
    }, t.prototype.cloneShallow = function(e) {
      return e || (e = new t(this._schema ? this._schema : xc(this.dimensions, this._getDimInfo, this), this.hostModel)), AM(e, this), e._store = this._store, e;
    }, t.prototype.wrapMethod = function(e, n) {
      var r = this[e];
      qe(r) && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(e), this[e] = function() {
        var i = r.apply(this, arguments);
        return n.apply(this, [i].concat(oP(arguments)));
      });
    }, t.internalField = function() {
      zj = function(e) {
        var n = e._invertedIndicesMap;
        F(n, function(r, i) {
          var a = e._dimInfos[i], o = a.ordinalMeta, s = e._store;
          if (o) {
            r = n[i] = new _qe(o.categories.length);
            for (var l = 0; l < r.length; l++)
              r[l] = Bj;
            for (var l = 0; l < s.count(); l++)
              r[s.get(a.storeDimIndex, l)] = l;
          }
        });
      }, F0 = function(e, n, r) {
        return Br(e._getCategory(n, r), null);
      }, $S = function(e, n) {
        var r = e._idList[n];
        return r == null && e._idDimIdx != null && (r = F0(e, e._idDimIdx, n)), r == null && (r = Oqe + n), r;
      }, rv = function(e) {
        return Se(e) || (e = e != null ? [e] : []), e;
      }, AS = function(e) {
        var n = new t(e._schema ? e._schema : xc(e.dimensions, e._getDimInfo, e), e.hostModel);
        return AM(n, e), n;
      }, AM = function(e, n) {
        F(Sqe.concat(n.__wrappedMethods || []), function(r) {
          n.hasOwnProperty(r) && (e[r] = n[r]);
        }), e.__wrappedMethods = n.__wrappedMethods, F(xqe, function(r) {
          e[r] = ot(n[r]);
        }), e._calculationInfo = _e({}, n._calculationInfo);
      }, EM = function(e, n) {
        var r = e._nameList, i = e._idList, a = e._nameDimIdx, o = e._idDimIdx, s = r[n], l = i[n];
        if (s == null && a != null && (r[n] = s = F0(e, a, n)), l == null && o != null && (i[n] = l = F0(e, o, n)), l == null && s != null) {
          var u = e._nameRepeatCount, c = u[s] = (u[s] || 0) + 1;
          l = s, c > 1 && (l += "__ec__" + c), i[n] = l;
        }
      };
    }(), t;
  }()
);
const Fi = wqe;
function Cqe(t, e) {
  return Mm(t, e).dimensions;
}
function Mm(t, e) {
  o3(t) || (t = s3(t)), e = e || {};
  var n = e.coordDimensions || [], r = e.dimensionsDefine || t.dimensionsDefine || [], i = Ze(), a = [], o = Pqe(t, n, r, e.dimensionsCount), s = e.canOmitUnusedDimensions && pce(o), l = r === t.dimensionsDefine, u = l ? hce(t) : dce(r), c = e.encodeDefine;
  !c && e.encodeDefaulter && (c = e.encodeDefaulter(t, o));
  for (var f = Ze(c), d = new yue(o), h = 0; h < d.length; h++)
    d[h] = -1;
  function p($) {
    var T = d[$];
    if (T < 0) {
      var E = r[$], M = nt(E) ? E : {
        name: E
      }, R = new gw(), N = M.name;
      N != null && u.get(N) != null && (R.name = R.displayName = N), M.type != null && (R.type = M.type), M.displayName != null && (R.displayName = M.displayName);
      var I = a.length;
      return d[$] = I, R.storeDimIndex = $, a.push(R), R;
    }
    return a[T];
  }
  if (!s)
    for (var h = 0; h < o; h++)
      p(h);
  f.each(function($, T) {
    var E = wn($).slice();
    if (E.length === 1 && !Ve(E[0]) && E[0] < 0) {
      f.set(T, !1);
      return;
    }
    var M = f.set(T, []);
    F(E, function(R, N) {
      var I = Ve(R) ? u.get(R) : R;
      I != null && I < o && (M[N] = I, g(p(I), T, N));
    });
  });
  var v = 0;
  F(n, function($) {
    var T, E, M, R;
    if (Ve($))
      T = $, R = {};
    else {
      R = $, T = R.name;
      var N = R.ordinalMeta;
      R.ordinalMeta = null, R = _e({}, R), R.ordinalMeta = N, E = R.dimsDef, M = R.otherDims, R.name = R.coordDim = R.coordDimIndex = R.dimsDef = R.otherDims = null;
    }
    var I = f.get(T);
    if (I !== !1) {
      if (I = wn(I), !I.length)
        for (var B = 0; B < (E && E.length || 1); B++) {
          for (; v < o && p(v).coordDim != null; )
            v++;
          v < o && I.push(v++);
        }
      F(I, function(Q, W) {
        var H = p(Q);
        if (l && R.type != null && (H.type = R.type), g(it(H, R), T, W), H.name == null && E) {
          var U = E[W];
          !nt(U) && (U = {
            name: U
          }), H.name = H.displayName = U.name, H.defaultTooltip = U.defaultTooltip;
        }
        M && it(H.otherDims, M);
      });
    }
  });
  function g($, T, E) {
    Nk.get(T) != null ? $.otherDims[T] = E : ($.coordDim = T, $.coordDimIndex = E, i.set(T, !0));
  }
  var m = e.generateCoord, y = e.generateCoordCount, _ = y != null;
  y = m ? y || 1 : 0;
  var O = m || "value";
  function S($) {
    $.name == null && ($.name = $.coordDim);
  }
  if (s)
    F(a, function($) {
      S($);
    }), a.sort(function($, T) {
      return $.storeDimIndex - T.storeDimIndex;
    });
  else
    for (var x = 0; x < o; x++) {
      var C = p(x), P = C.coordDim;
      P == null && (C.coordDim = $qe(O, i, _), C.coordDimIndex = 0, (!m || y <= 0) && (C.isExtraCoord = !0), y--), S(C), C.type == null && (nue(t, x) === pi.Must || C.isExtraCoord && (C.otherDims.itemName != null || C.otherDims.seriesName != null)) && (C.type = "ordinal");
    }
  return Tqe(a), new cce({
    source: t,
    dimensions: a,
    fullDimensionCount: o,
    dimensionOmitted: s
  });
}
function Tqe(t) {
  for (var e = Ze(), n = 0; n < t.length; n++) {
    var r = t[n], i = r.name, a = e.get(i) || 0;
    a > 0 && (r.name = i + (a - 1)), a++, e.set(i, a);
  }
}
function Pqe(t, e, n, r) {
  var i = Math.max(t.dimensionsDetectedCount || 1, e.length, n.length, r || 0);
  return F(e, function(a) {
    var o;
    nt(a) && (o = a.dimsDef) && (i = Math.max(i, o.length));
  }), i;
}
function $qe(t, e, n) {
  if (n || e.hasKey(t)) {
    for (var r = 0; e.hasKey(t + r); )
      r++;
    t += r;
  }
  return e.set(t, !0), t;
}
var Aqe = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e) {
      this.coordSysDims = [], this.axisMap = Ze(), this.categoryAxisMap = Ze(), this.coordSysName = e;
    }
    return t;
  }()
);
function Eqe(t) {
  var e = t.get("coordinateSystem"), n = new Aqe(e), r = Mqe[e];
  if (r)
    return r(t, n, n.axisMap, n.categoryAxisMap), n;
}
var Mqe = {
  cartesian2d: function(t, e, n, r) {
    var i = t.getReferringComponents("xAxis", Er).models[0], a = t.getReferringComponents("yAxis", Er).models[0];
    if (process.env.NODE_ENV !== "production") {
      if (!i)
        throw new Error('xAxis "' + br(t.get("xAxisIndex"), t.get("xAxisId"), 0) + '" not found');
      if (!a)
        throw new Error('yAxis "' + br(t.get("xAxisIndex"), t.get("yAxisId"), 0) + '" not found');
    }
    e.coordSysDims = ["x", "y"], n.set("x", i), n.set("y", a), iv(i) && (r.set("x", i), e.firstCategoryDimIndex = 0), iv(a) && (r.set("y", a), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
  },
  singleAxis: function(t, e, n, r) {
    var i = t.getReferringComponents("singleAxis", Er).models[0];
    if (process.env.NODE_ENV !== "production" && !i)
      throw new Error("singleAxis should be specified.");
    e.coordSysDims = ["single"], n.set("single", i), iv(i) && (r.set("single", i), e.firstCategoryDimIndex = 0);
  },
  polar: function(t, e, n, r) {
    var i = t.getReferringComponents("polar", Er).models[0], a = i.findAxisModel("radiusAxis"), o = i.findAxisModel("angleAxis");
    if (process.env.NODE_ENV !== "production") {
      if (!o)
        throw new Error("angleAxis option not found");
      if (!a)
        throw new Error("radiusAxis option not found");
    }
    e.coordSysDims = ["radius", "angle"], n.set("radius", a), n.set("angle", o), iv(a) && (r.set("radius", a), e.firstCategoryDimIndex = 0), iv(o) && (r.set("angle", o), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
  },
  geo: function(t, e, n, r) {
    e.coordSysDims = ["lng", "lat"];
  },
  parallel: function(t, e, n, r) {
    var i = t.ecModel, a = i.getComponent("parallel", t.get("parallelIndex")), o = e.coordSysDims = a.dimensions.slice();
    F(a.parallelAxisIndex, function(s, l) {
      var u = i.getComponent("parallelAxis", s), c = o[l];
      n.set(c, u), iv(u) && (r.set(c, u), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = l));
    });
  }
};
function iv(t) {
  return t.get("type") === "category";
}
function vce(t, e, n) {
  n = n || {};
  var r = n.byIndex, i = n.stackedCoordDimension, a, o, s;
  Iqe(e) ? a = e : (o = e.schema, a = o.dimensions, s = e.store);
  var l = !!(t && t.get("stack")), u, c, f, d;
  if (F(a, function(y, _) {
    Ve(y) && (a[_] = y = {
      name: y
    }), l && !y.isExtraCoord && (!r && !u && y.ordinalMeta && (u = y), !c && y.type !== "ordinal" && y.type !== "time" && (!i || i === y.coordDim) && (c = y));
  }), c && !r && !u && (r = !0), c) {
    f = "__\0ecstackresult_" + t.id, d = "__\0ecstackedover_" + t.id, u && (u.createInvertedIndices = !0);
    var h = c.coordDim, p = c.type, v = 0;
    F(a, function(y) {
      y.coordDim === h && v++;
    });
    var g = {
      name: f,
      coordDim: h,
      coordDimIndex: v,
      type: p,
      isExtraCoord: !0,
      isCalculationCoord: !0,
      storeDimIndex: a.length
    }, m = {
      name: d,
      // This dimension contains stack base (generally, 0), so do not set it as
      // `stackedDimCoordDim` to avoid extent calculation, consider log scale.
      coordDim: d,
      coordDimIndex: v + 1,
      type: p,
      isExtraCoord: !0,
      isCalculationCoord: !0,
      storeDimIndex: a.length + 1
    };
    o ? (s && (g.storeDimIndex = s.ensureCalculationDimension(d, p), m.storeDimIndex = s.ensureCalculationDimension(f, p)), o.appendCalculationDimension(g), o.appendCalculationDimension(m)) : (a.push(g), a.push(m));
  }
  return {
    stackedDimension: c && c.name,
    stackedByDimension: u && u.name,
    isStackedByIndex: r,
    stackedOverDimension: d,
    stackResultDimension: f
  };
}
function Iqe(t) {
  return !fce(t.schema);
}
function Hu(t, e) {
  return !!e && e === t.getCalculationInfo("stackedDimension");
}
function S3(t, e) {
  return Hu(t, e) ? t.getCalculationInfo("stackResultDimension") : e;
}
function Dqe(t, e) {
  var n = t.get("coordinateSystem"), r = gp.get(n), i;
  return e && e.coordSysDims && (i = Ce(e.coordSysDims, function(a) {
    var o = {
      name: a
    }, s = e.axisMap.get(a);
    if (s) {
      var l = s.get("type");
      o.type = YC(l);
    }
    return o;
  })), i || (i = r && (r.getDimensionsInfo ? r.getDimensionsInfo() : r.dimensions.slice()) || ["x", "y"]), i;
}
function Rqe(t, e, n) {
  var r, i;
  return n && F(t, function(a, o) {
    var s = a.coordDim, l = n.categoryAxisMap.get(s);
    l && (r == null && (r = o), a.ordinalMeta = l.getOrdinalMeta(), e && (a.createInvertedIndices = !0)), a.otherDims.itemName != null && (i = !0);
  }), !i && r != null && (t[r].otherDims.itemName = 0), r;
}
function Yl(t, e, n) {
  n = n || {};
  var r = e.getSourceManager(), i, a = !1;
  t ? (a = !0, i = s3(t)) : (i = r.getSource(), a = i.sourceFormat === hs);
  var o = Eqe(e), s = Dqe(e, o), l = n.useEncodeDefaulter, u = qe(l) ? l : l ? vt(tue, s, e) : null, c = {
    coordDimensions: s,
    generateCoord: n.generateCoord,
    encodeDefine: e.getEncode(),
    encodeDefaulter: u,
    canOmitUnusedDimensions: !a
  }, f = Mm(i, c), d = Rqe(f.dimensions, n.createInvertedIndices, o), h = a ? null : r.getSharedDataStore(f), p = vce(e, {
    schema: f,
    store: h
  }), v = new Fi(f, e);
  v.setCalculationInfo(p);
  var g = d != null && kqe(i) ? function(m, y, _, O) {
    return O === d ? _ : this.defaultDimValueGetter(m, y, _, O);
  } : null;
  return v.hasItemOption = !1, v.initData(
    // Try to reuse the data store in sourceManager if using dataset.
    a ? i : h,
    null,
    g
  ), v;
}
function kqe(t) {
  if (t.sourceFormat === hs) {
    var e = Lqe(t.data || []);
    return !Se(ym(e));
  }
}
function Lqe(t) {
  for (var e = 0; e < t.length && t[e] == null; )
    e++;
  return t[e];
}
var ql = (
  /** @class */
  function() {
    function t(e) {
      this._setting = e || {}, this._extent = [1 / 0, -1 / 0];
    }
    return t.prototype.getSetting = function(e) {
      return this._setting[e];
    }, t.prototype.unionExtent = function(e) {
      var n = this._extent;
      e[0] < n[0] && (n[0] = e[0]), e[1] > n[1] && (n[1] = e[1]);
    }, t.prototype.unionExtentFromData = function(e, n) {
      this.unionExtent(e.getApproximateExtent(n));
    }, t.prototype.getExtent = function() {
      return this._extent.slice();
    }, t.prototype.setExtent = function(e, n) {
      var r = this._extent;
      isNaN(e) || (r[0] = e), isNaN(n) || (r[1] = n);
    }, t.prototype.isInExtentRange = function(e) {
      return this._extent[0] <= e && this._extent[1] >= e;
    }, t.prototype.isBlank = function() {
      return this._isBlank;
    }, t.prototype.setBlank = function(e) {
      this._isBlank = e;
    }, t;
  }()
);
vP(ql);
var Nqe = 0, qk = (
  /** @class */
  function() {
    function t(e) {
      this.categories = e.categories || [], this._needCollect = e.needCollect, this._deduplication = e.deduplication, this.uid = ++Nqe;
    }
    return t.createByAxisModel = function(e) {
      var n = e.option, r = n.data, i = r && Ce(r, Bqe);
      return new t({
        categories: i,
        needCollect: !i,
        // deduplication is default in axis.
        deduplication: n.dedplication !== !1
      });
    }, t.prototype.getOrdinal = function(e) {
      return this._getOrCreateMap().get(e);
    }, t.prototype.parseAndCollect = function(e) {
      var n, r = this._needCollect;
      if (!Ve(e) && !r)
        return e;
      if (r && !this._deduplication)
        return n = this.categories.length, this.categories[n] = e, n;
      var i = this._getOrCreateMap();
      return n = i.get(e), n == null && (r ? (n = this.categories.length, this.categories[n] = e, i.set(e, n)) : n = NaN), n;
    }, t.prototype._getOrCreateMap = function() {
      return this._map || (this._map = Ze(this.categories));
    }, t;
  }()
);
function Bqe(t) {
  return nt(t) && t.value != null ? t.value : t + "";
}
function zqe(t) {
  var e = Math.pow(10, s1(Math.abs(t))), n = Math.abs(t / e);
  return n === 0 || n === 1 || n === 2 || n === 3 || n === 5;
}
function Kk(t) {
  return t.type === "interval" || t.type === "log";
}
function Vqe(t, e, n, r) {
  var i = {}, a = t[1] - t[0], o = i.interval = $5(a / e, !0);
  n != null && o < n && (o = i.interval = n), r != null && o > r && (o = i.interval = r);
  var s = i.intervalPrecision = gce(o), l = i.niceTickExtent = [sr(Math.ceil(t[0] / o) * o, s), sr(Math.floor(t[1] / o) * o, s)];
  return Fqe(l, t), i;
}
function MM(t) {
  var e = Math.pow(10, s1(t)), n = t / e;
  return n ? n === 2 ? n = 3 : n === 3 ? n = 5 : n *= 2 : n = 1, sr(n * e);
}
function gce(t) {
  return Ms(t) + 2;
}
function Vj(t, e, n) {
  t[e] = Math.max(Math.min(t[e], n[1]), n[0]);
}
function Fqe(t, e) {
  !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), Vj(t, 0, e), Vj(t, 1, e), t[0] > t[1] && (t[0] = t[1]);
}
function BP(t, e) {
  return t >= e[0] && t <= e[1];
}
function zP(t, e) {
  return e[1] === e[0] ? 0.5 : (t - e[0]) / (e[1] - e[0]);
}
function VP(t, e) {
  return t * (e[1] - e[0]) + e[0];
}
var FP = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      r.type = "ordinal";
      var i = r.getSetting("ordinalMeta");
      return i || (i = new qk({})), Se(i) && (i = new qk({
        categories: Ce(i, function(a) {
          return nt(a) ? a.value : a;
        })
      })), r._ordinalMeta = i, r._extent = r.getSetting("extent") || [0, i.categories.length - 1], r;
    }
    return e.prototype.parse = function(n) {
      return n == null ? NaN : Ve(n) ? this._ordinalMeta.getOrdinal(n) : Math.round(n);
    }, e.prototype.contain = function(n) {
      return n = this.parse(n), BP(n, this._extent) && this._ordinalMeta.categories[n] != null;
    }, e.prototype.normalize = function(n) {
      return n = this._getTickNumber(this.parse(n)), zP(n, this._extent);
    }, e.prototype.scale = function(n) {
      return n = Math.round(VP(n, this._extent)), this.getRawOrdinalNumber(n);
    }, e.prototype.getTicks = function() {
      for (var n = [], r = this._extent, i = r[0]; i <= r[1]; )
        n.push({
          value: i
        }), i++;
      return n;
    }, e.prototype.getMinorTicks = function(n) {
    }, e.prototype.setSortInfo = function(n) {
      if (n == null) {
        this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null;
        return;
      }
      for (var r = n.ordinalNumbers, i = this._ordinalNumbersByTick = [], a = this._ticksByOrdinalNumber = [], o = 0, s = this._ordinalMeta.categories.length, l = Math.min(s, r.length); o < l; ++o) {
        var u = r[o];
        i[o] = u, a[u] = o;
      }
      for (var c = 0; o < s; ++o) {
        for (; a[c] != null; )
          c++;
        i.push(c), a[c] = o;
      }
    }, e.prototype._getTickNumber = function(n) {
      var r = this._ticksByOrdinalNumber;
      return r && n >= 0 && n < r.length ? r[n] : n;
    }, e.prototype.getRawOrdinalNumber = function(n) {
      var r = this._ordinalNumbersByTick;
      return r && n >= 0 && n < r.length ? r[n] : n;
    }, e.prototype.getLabel = function(n) {
      if (!this.isBlank()) {
        var r = this.getRawOrdinalNumber(n.value), i = this._ordinalMeta.categories[r];
        return i == null ? "" : i + "";
      }
    }, e.prototype.count = function() {
      return this._extent[1] - this._extent[0] + 1;
    }, e.prototype.unionExtentFromData = function(n, r) {
      this.unionExtent(n.getApproximateExtent(r));
    }, e.prototype.isInExtentRange = function(n) {
      return n = this._getTickNumber(n), this._extent[0] <= n && this._extent[1] >= n;
    }, e.prototype.getOrdinalMeta = function() {
      return this._ordinalMeta;
    }, e.prototype.calcNiceTicks = function() {
    }, e.prototype.calcNiceExtent = function() {
    }, e.type = "ordinal", e;
  }(ql)
);
ql.registerClass(FP);
var Pd = sr, Gu = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = "interval", n._interval = 0, n._intervalPrecision = 2, n;
    }
    return e.prototype.parse = function(n) {
      return n;
    }, e.prototype.contain = function(n) {
      return BP(n, this._extent);
    }, e.prototype.normalize = function(n) {
      return zP(n, this._extent);
    }, e.prototype.scale = function(n) {
      return VP(n, this._extent);
    }, e.prototype.setExtent = function(n, r) {
      var i = this._extent;
      isNaN(n) || (i[0] = parseFloat(n)), isNaN(r) || (i[1] = parseFloat(r));
    }, e.prototype.unionExtent = function(n) {
      var r = this._extent;
      n[0] < r[0] && (r[0] = n[0]), n[1] > r[1] && (r[1] = n[1]), this.setExtent(r[0], r[1]);
    }, e.prototype.getInterval = function() {
      return this._interval;
    }, e.prototype.setInterval = function(n) {
      this._interval = n, this._niceExtent = this._extent.slice(), this._intervalPrecision = gce(n);
    }, e.prototype.getTicks = function(n) {
      var r = this._interval, i = this._extent, a = this._niceExtent, o = this._intervalPrecision, s = [];
      if (!r)
        return s;
      var l = 1e4;
      i[0] < a[0] && (n ? s.push({
        value: Pd(a[0] - r, o)
      }) : s.push({
        value: i[0]
      }));
      for (var u = a[0]; u <= a[1] && (s.push({
        value: u
      }), u = Pd(u + r, o), u !== s[s.length - 1].value); )
        if (s.length > l)
          return [];
      var c = s.length ? s[s.length - 1].value : a[1];
      return i[1] > c && (n ? s.push({
        value: Pd(c + r, o)
      }) : s.push({
        value: i[1]
      })), s;
    }, e.prototype.getMinorTicks = function(n) {
      for (var r = this.getTicks(!0), i = [], a = this.getExtent(), o = 1; o < r.length; o++) {
        for (var s = r[o], l = r[o - 1], u = 0, c = [], f = s.value - l.value, d = f / n; u < n - 1; ) {
          var h = Pd(l.value + (u + 1) * d);
          h > a[0] && h < a[1] && c.push(h), u++;
        }
        i.push(c);
      }
      return i;
    }, e.prototype.getLabel = function(n, r) {
      if (n == null)
        return "";
      var i = r && r.precision;
      i == null ? i = Ms(n.value) || 0 : i === "auto" && (i = this._intervalPrecision);
      var a = Pd(n.value, i, !0);
      return K5(a);
    }, e.prototype.calcNiceTicks = function(n, r, i) {
      n = n || 5;
      var a = this._extent, o = a[1] - a[0];
      if (isFinite(o)) {
        o < 0 && (o = -o, a.reverse());
        var s = Vqe(a, n, r, i);
        this._intervalPrecision = s.intervalPrecision, this._interval = s.interval, this._niceExtent = s.niceTickExtent;
      }
    }, e.prototype.calcNiceExtent = function(n) {
      var r = this._extent;
      if (r[0] === r[1])
        if (r[0] !== 0) {
          var i = Math.abs(r[0]);
          n.fixMax || (r[1] += i / 2), r[0] -= i / 2;
        } else
          r[1] = 1;
      var a = r[1] - r[0];
      isFinite(a) || (r[0] = 0, r[1] = 1), this.calcNiceTicks(n.splitNumber, n.minInterval, n.maxInterval);
      var o = this._interval;
      n.fixMin || (r[0] = Pd(Math.floor(r[0] / o) * o)), n.fixMax || (r[1] = Pd(Math.ceil(r[1] / o) * o));
    }, e.prototype.setNiceExtent = function(n, r) {
      this._niceExtent = [n, r];
    }, e.type = "interval", e;
  }(ql)
);
ql.registerClass(Gu);
var mce = typeof Float32Array < "u", Wqe = mce ? Float32Array : Array;
function Al(t) {
  return Se(t) ? mce ? new Float32Array(t) : t : new Wqe(t);
}
var Jk = "__ec_stack_";
function x3(t) {
  return t.get("stack") || Jk + t.seriesIndex;
}
function w3(t) {
  return t.dim + t.index;
}
function Qqe(t) {
  var e = [], n = t.axis, r = "axis0";
  if (n.type === "category") {
    for (var i = n.getBandWidth(), a = 0; a < t.count; a++)
      e.push(it({
        bandWidth: i,
        axisKey: r,
        stackId: Jk + a
      }, t));
    for (var o = _ce(e), s = [], a = 0; a < t.count; a++) {
      var l = o[r][Jk + a];
      l.offsetCenter = l.offset + l.width / 2, s.push(l);
    }
    return s;
  }
}
function yce(t, e) {
  var n = [];
  return e.eachSeriesByType(t, function(r) {
    xce(r) && n.push(r);
  }), n;
}
function Hqe(t) {
  var e = {};
  F(t, function(l) {
    var u = l.coordinateSystem, c = u.getBaseAxis();
    if (!(c.type !== "time" && c.type !== "value"))
      for (var f = l.getData(), d = c.dim + "_" + c.index, h = f.getDimensionIndex(f.mapDimension(c.dim)), p = f.getStore(), v = 0, g = p.count(); v < g; ++v) {
        var m = p.get(h, v);
        e[d] ? e[d].push(m) : e[d] = [m];
      }
  });
  var n = {};
  for (var r in e)
    if (e.hasOwnProperty(r)) {
      var i = e[r];
      if (i) {
        i.sort(function(l, u) {
          return l - u;
        });
        for (var a = null, o = 1; o < i.length; ++o) {
          var s = i[o] - i[o - 1];
          s > 0 && (a = a === null ? s : Math.min(a, s));
        }
        n[r] = a;
      }
    }
  return n;
}
function bce(t) {
  var e = Hqe(t), n = [];
  return F(t, function(r) {
    var i = r.coordinateSystem, a = i.getBaseAxis(), o = a.getExtent(), s;
    if (a.type === "category")
      s = a.getBandWidth();
    else if (a.type === "value" || a.type === "time") {
      var l = a.dim + "_" + a.index, u = e[l], c = Math.abs(o[1] - o[0]), f = a.scale.getExtent(), d = Math.abs(f[1] - f[0]);
      s = u ? c / d * u : c;
    } else {
      var h = r.getData();
      s = Math.abs(o[1] - o[0]) / h.count();
    }
    var p = ze(r.get("barWidth"), s), v = ze(r.get("barMaxWidth"), s), g = ze(
      // barMinWidth by default is 0.5 / 1 in cartesian. Because in value axis,
      // the auto-calculated bar width might be less than 0.5 / 1.
      r.get("barMinWidth") || (wce(r) ? 0.5 : 1),
      s
    ), m = r.get("barGap"), y = r.get("barCategoryGap");
    n.push({
      bandWidth: s,
      barWidth: p,
      barMaxWidth: v,
      barMinWidth: g,
      barGap: m,
      barCategoryGap: y,
      axisKey: w3(a),
      stackId: x3(r)
    });
  }), _ce(n);
}
function _ce(t) {
  var e = {};
  F(t, function(r, i) {
    var a = r.axisKey, o = r.bandWidth, s = e[a] || {
      bandWidth: o,
      remainedWidth: o,
      autoWidthCount: 0,
      categoryGap: null,
      gap: "20%",
      stacks: {}
    }, l = s.stacks;
    e[a] = s;
    var u = r.stackId;
    l[u] || s.autoWidthCount++, l[u] = l[u] || {
      width: 0,
      maxWidth: 0
    };
    var c = r.barWidth;
    c && !l[u].width && (l[u].width = c, c = Math.min(s.remainedWidth, c), s.remainedWidth -= c);
    var f = r.barMaxWidth;
    f && (l[u].maxWidth = f);
    var d = r.barMinWidth;
    d && (l[u].minWidth = d);
    var h = r.barGap;
    h != null && (s.gap = h);
    var p = r.barCategoryGap;
    p != null && (s.categoryGap = p);
  });
  var n = {};
  return F(e, function(r, i) {
    n[i] = {};
    var a = r.stacks, o = r.bandWidth, s = r.categoryGap;
    if (s == null) {
      var l = kt(a).length;
      s = Math.max(35 - l * 4, 15) + "%";
    }
    var u = ze(s, o), c = ze(r.gap, 1), f = r.remainedWidth, d = r.autoWidthCount, h = (f - u) / (d + (d - 1) * c);
    h = Math.max(h, 0), F(a, function(m) {
      var y = m.maxWidth, _ = m.minWidth;
      if (m.width) {
        var O = m.width;
        y && (O = Math.min(O, y)), _ && (O = Math.max(O, _)), m.width = O, f -= O + c * O, d--;
      } else {
        var O = h;
        y && y < O && (O = Math.min(y, f)), _ && _ > O && (O = _), O !== h && (m.width = O, f -= O + c * O, d--);
      }
    }), h = (f - u) / (d + (d - 1) * c), h = Math.max(h, 0);
    var p = 0, v;
    F(a, function(m, y) {
      m.width || (m.width = h), v = m, p += m.width * (1 + c);
    }), v && (p -= v.width * c);
    var g = -p / 2;
    F(a, function(m, y) {
      n[i][y] = n[i][y] || {
        bandWidth: o,
        offset: g,
        width: m.width
      }, g += m.width * (1 + c);
    });
  }), n;
}
function Gqe(t, e, n) {
  if (t && e) {
    var r = t[w3(e)];
    return r != null && n != null ? r[x3(n)] : r;
  }
}
function Oce(t, e) {
  var n = yce(t, e), r = bce(n);
  F(n, function(i) {
    var a = i.getData(), o = i.coordinateSystem, s = o.getBaseAxis(), l = x3(i), u = r[w3(s)][l], c = u.offset, f = u.width;
    a.setLayout({
      bandWidth: u.bandWidth,
      offset: c,
      size: f
    });
  });
}
function Sce(t) {
  return {
    seriesType: t,
    plan: $m(),
    reset: function(e) {
      if (xce(e)) {
        var n = e.getData(), r = e.coordinateSystem, i = r.getBaseAxis(), a = r.getOtherAxis(i), o = n.getDimensionIndex(n.mapDimension(a.dim)), s = n.getDimensionIndex(n.mapDimension(i.dim)), l = e.get("showBackground", !0), u = n.mapDimension(a.dim), c = n.getCalculationInfo("stackResultDimension"), f = Hu(n, u) && !!n.getCalculationInfo("stackedOnSeries"), d = a.isHorizontal(), h = jqe(i, a), p = wce(e), v = e.get("barMinHeight") || 0, g = c && n.getDimensionIndex(c), m = n.getLayout("size"), y = n.getLayout("offset");
        return {
          progress: function(_, O) {
            for (var S = _.count, x = p && Al(S * 3), C = p && l && Al(S * 3), P = p && Al(S), $ = r.master.getRect(), T = d ? $.width : $.height, E, M = O.getStore(), R = 0; (E = _.next()) != null; ) {
              var N = M.get(f ? g : o, E), I = M.get(s, E), B = h, Q = void 0;
              f && (Q = +N - M.get(o, E));
              var W = void 0, H = void 0, U = void 0, j = void 0;
              if (d) {
                var Y = r.dataToPoint([N, I]);
                if (f) {
                  var ne = r.dataToPoint([Q, I]);
                  B = ne[0];
                }
                W = B, H = Y[1] + y, U = Y[0] - B, j = m, Math.abs(U) < v && (U = (U < 0 ? -1 : 1) * v);
              } else {
                var Y = r.dataToPoint([I, N]);
                if (f) {
                  var ne = r.dataToPoint([I, Q]);
                  B = ne[1];
                }
                W = Y[0] + y, H = B, U = m, j = Y[1] - B, Math.abs(j) < v && (j = (j <= 0 ? -1 : 1) * v);
              }
              p ? (x[R] = W, x[R + 1] = H, x[R + 2] = d ? U : j, C && (C[R] = d ? $.x : W, C[R + 1] = d ? H : $.y, C[R + 2] = T), P[E] = E) : O.setItemLayout(E, {
                x: W,
                y: H,
                width: U,
                height: j
              }), R += 3;
            }
            p && O.setLayout({
              largePoints: x,
              largeDataIndices: P,
              largeBackgroundPoints: C,
              valueAxisHorizontal: d
            });
          }
        };
      }
    }
  };
}
function xce(t) {
  return t.coordinateSystem && t.coordinateSystem.type === "cartesian2d";
}
function wce(t) {
  return t.pipelineContext && t.pipelineContext.large;
}
function jqe(t, e) {
  var n = e.model.get("startValue");
  return n || (n = 0), e.toGlobalCoord(e.dataToCoord(e.type === "log" ? n > 0 ? n : 1 : n));
}
var Zqe = function(t, e, n, r) {
  for (; n < r; ) {
    var i = n + r >>> 1;
    t[i][1] < e ? n = i + 1 : r = i;
  }
  return n;
}, C3 = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "time", r;
    }
    return e.prototype.getLabel = function(n) {
      var r = this.getSetting("useUTC");
      return p1(n.value, MG[OUe(Jv(this._minLevelUnit))] || MG.second, r, this.getSetting("locale"));
    }, e.prototype.getFormattedLabel = function(n, r, i) {
      var a = this.getSetting("useUTC"), o = this.getSetting("locale");
      return SUe(n, r, i, o, a);
    }, e.prototype.getTicks = function() {
      var n = this._interval, r = this._extent, i = [];
      if (!n)
        return i;
      i.push({
        value: r[0],
        level: 0
      });
      var a = this.getSetting("useUTC"), o = eKe(this._minLevelUnit, this._approxInterval, a, r);
      return i = i.concat(o), i.push({
        value: r[1],
        level: 0
      }), i;
    }, e.prototype.calcNiceExtent = function(n) {
      var r = this._extent;
      if (r[0] === r[1] && (r[0] -= Go, r[1] += Go), r[1] === -1 / 0 && r[0] === 1 / 0) {
        var i = /* @__PURE__ */ new Date();
        r[1] = +new Date(i.getFullYear(), i.getMonth(), i.getDate()), r[0] = r[1] - Go;
      }
      this.calcNiceTicks(n.splitNumber, n.minInterval, n.maxInterval);
    }, e.prototype.calcNiceTicks = function(n, r, i) {
      n = n || 10;
      var a = this._extent, o = a[1] - a[0];
      this._approxInterval = o / n, r != null && this._approxInterval < r && (this._approxInterval = r), i != null && this._approxInterval > i && (this._approxInterval = i);
      var s = ES.length, l = Math.min(Zqe(ES, this._approxInterval, 0, s), s - 1);
      this._interval = ES[l][1], this._minLevelUnit = ES[Math.max(l - 1, 0)][0];
    }, e.prototype.parse = function(n) {
      return Kt(n) ? n : +go(n);
    }, e.prototype.contain = function(n) {
      return BP(this.parse(n), this._extent);
    }, e.prototype.normalize = function(n) {
      return zP(this.parse(n), this._extent);
    }, e.prototype.scale = function(n) {
      return VP(n, this._extent);
    }, e.type = "time", e;
  }(Gu)
), ES = [
  // Format                           interval
  ["second", X5],
  ["minute", Y5],
  ["hour", ab],
  ["quarter-day", ab * 6],
  ["half-day", ab * 12],
  ["day", Go * 1.2],
  ["half-week", Go * 3.5],
  ["week", Go * 7],
  ["month", Go * 31],
  ["quarter", Go * 95],
  ["half-year", EG / 2],
  ["year", EG]
  // 1Y
];
function Uqe(t, e, n, r) {
  var i = go(e), a = go(n), o = function(p) {
    return IG(i, p, r) === IG(a, p, r);
  }, s = function() {
    return o("year");
  }, l = function() {
    return s() && o("month");
  }, u = function() {
    return l() && o("day");
  }, c = function() {
    return u() && o("hour");
  }, f = function() {
    return c() && o("minute");
  }, d = function() {
    return f() && o("second");
  }, h = function() {
    return d() && o("millisecond");
  };
  switch (t) {
    case "year":
      return s();
    case "month":
      return l();
    case "day":
      return u();
    case "hour":
      return c();
    case "minute":
      return f();
    case "second":
      return d();
    case "millisecond":
      return h();
  }
}
function Xqe(t, e) {
  return t /= Go, t > 16 ? 16 : t > 7.5 ? 7 : t > 3.5 ? 4 : t > 1.5 ? 2 : 1;
}
function Yqe(t) {
  var e = 30 * Go;
  return t /= e, t > 6 ? 6 : t > 3 ? 3 : t > 2 ? 2 : 1;
}
function qqe(t) {
  return t /= ab, t > 12 ? 12 : t > 6 ? 6 : t > 3.5 ? 4 : t > 2 ? 2 : 1;
}
function Fj(t, e) {
  return t /= e ? Y5 : X5, t > 30 ? 30 : t > 20 ? 20 : t > 15 ? 15 : t > 10 ? 10 : t > 5 ? 5 : t > 2 ? 2 : 1;
}
function Kqe(t) {
  return $5(t, !0);
}
function Jqe(t, e, n) {
  var r = new Date(t);
  switch (Jv(e)) {
    case "year":
    case "month":
      r[Qle(n)](0);
    case "day":
      r[Hle(n)](1);
    case "hour":
      r[Gle(n)](0);
    case "minute":
      r[jle(n)](0);
    case "second":
      r[Zle(n)](0), r[Ule(n)](0);
  }
  return r.getTime();
}
function eKe(t, e, n, r) {
  var i = 1e4, a = Fle, o = 0;
  function s(T, E, M, R, N, I, B) {
    for (var Q = new Date(E), W = E, H = Q[R](); W < M && W <= r[1]; )
      B.push({
        value: W
      }), H += T, Q[N](H), W = Q.getTime();
    B.push({
      value: W,
      notAdd: !0
    });
  }
  function l(T, E, M) {
    var R = [], N = !E.length;
    if (!Uqe(Jv(T), r[0], r[1], n)) {
      N && (E = [{
        // TODO Optimize. Not include so may ticks.
        value: Jqe(new Date(r[0]), T, n)
      }, {
        value: r[1]
      }]);
      for (var I = 0; I < E.length - 1; I++) {
        var B = E[I].value, Q = E[I + 1].value;
        if (B !== Q) {
          var W = void 0, H = void 0, U = void 0, j = !1;
          switch (T) {
            case "year":
              W = Math.max(1, Math.round(e / Go / 365)), H = q5(n), U = xUe(n);
              break;
            case "half-year":
            case "quarter":
            case "month":
              W = Yqe(e), H = eg(n), U = Qle(n);
              break;
            case "week":
            case "half-week":
            case "day":
              W = Xqe(e), H = PP(n), U = Hle(n), j = !0;
              break;
            case "half-day":
            case "quarter-day":
            case "hour":
              W = qqe(e), H = Yb(n), U = Gle(n);
              break;
            case "minute":
              W = Fj(e, !0), H = $P(n), U = jle(n);
              break;
            case "second":
              W = Fj(e, !1), H = AP(n), U = Zle(n);
              break;
            case "millisecond":
              W = Kqe(e), H = EP(n), U = Ule(n);
              break;
          }
          s(W, B, Q, H, U, j, R), T === "year" && M.length > 1 && I === 0 && M.unshift({
            value: M[0].value - W
          });
        }
      }
      for (var I = 0; I < R.length; I++)
        M.push(R[I]);
      return R;
    }
  }
  for (var u = [], c = [], f = 0, d = 0, h = 0; h < a.length && o++ < i; ++h) {
    var p = Jv(a[h]);
    if (_Ue(a[h])) {
      l(a[h], u[u.length - 1] || [], c);
      var v = a[h + 1] ? Jv(a[h + 1]) : null;
      if (p !== v) {
        if (c.length) {
          d = f, c.sort(function(T, E) {
            return T.value - E.value;
          });
          for (var g = [], m = 0; m < c.length; ++m) {
            var y = c[m].value;
            (m === 0 || c[m - 1].value !== y) && (g.push(c[m]), y >= r[0] && y <= r[1] && f++);
          }
          var _ = (r[1] - r[0]) / e;
          if (f > _ * 1.5 && d > _ / 1.5 || (u.push(g), f > _ || t === a[h]))
            break;
        }
        c = [];
      }
    }
  }
  process.env.NODE_ENV !== "production" && o >= i && nr("Exceed safe limit.");
  for (var O = yn(Ce(u, function(T) {
    return yn(T, function(E) {
      return E.value >= r[0] && E.value <= r[1] && !E.notAdd;
    });
  }), function(T) {
    return T.length > 0;
  }), S = [], x = O.length - 1, h = 0; h < O.length; ++h)
    for (var C = O[h], P = 0; P < C.length; ++P)
      S.push({
        value: C[P].value,
        level: x - h
      });
  S.sort(function(T, E) {
    return T.value - E.value;
  });
  for (var $ = [], h = 0; h < S.length; ++h)
    (h === 0 || S[h].value !== S[h - 1].value) && $.push(S[h]);
  return $;
}
ql.registerClass(C3);
var Wj = ql.prototype, lb = Gu.prototype, tKe = sr, nKe = Math.floor, rKe = Math.ceil, MS = Math.pow, Ss = Math.log, T3 = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = "log", n.base = 10, n._originalScale = new Gu(), n._interval = 0, n;
    }
    return e.prototype.getTicks = function(n) {
      var r = this._originalScale, i = this._extent, a = r.getExtent(), o = lb.getTicks.call(this, n);
      return Ce(o, function(s) {
        var l = s.value, u = sr(MS(this.base, l));
        return u = l === i[0] && this._fixMin ? IS(u, a[0]) : u, u = l === i[1] && this._fixMax ? IS(u, a[1]) : u, {
          value: u
        };
      }, this);
    }, e.prototype.setExtent = function(n, r) {
      var i = Ss(this.base);
      n = Ss(Math.max(0, n)) / i, r = Ss(Math.max(0, r)) / i, lb.setExtent.call(this, n, r);
    }, e.prototype.getExtent = function() {
      var n = this.base, r = Wj.getExtent.call(this);
      r[0] = MS(n, r[0]), r[1] = MS(n, r[1]);
      var i = this._originalScale, a = i.getExtent();
      return this._fixMin && (r[0] = IS(r[0], a[0])), this._fixMax && (r[1] = IS(r[1], a[1])), r;
    }, e.prototype.unionExtent = function(n) {
      this._originalScale.unionExtent(n);
      var r = this.base;
      n[0] = Ss(n[0]) / Ss(r), n[1] = Ss(n[1]) / Ss(r), Wj.unionExtent.call(this, n);
    }, e.prototype.unionExtentFromData = function(n, r) {
      this.unionExtent(n.getApproximateExtent(r));
    }, e.prototype.calcNiceTicks = function(n) {
      n = n || 10;
      var r = this._extent, i = r[1] - r[0];
      if (!(i === 1 / 0 || i <= 0)) {
        var a = Ise(i), o = n / i * a;
        for (o <= 0.5 && (a *= 10); !isNaN(a) && Math.abs(a) < 1 && Math.abs(a) > 0; )
          a *= 10;
        var s = [sr(rKe(r[0] / a) * a), sr(nKe(r[1] / a) * a)];
        this._interval = a, this._niceExtent = s;
      }
    }, e.prototype.calcNiceExtent = function(n) {
      lb.calcNiceExtent.call(this, n), this._fixMin = n.fixMin, this._fixMax = n.fixMax;
    }, e.prototype.parse = function(n) {
      return n;
    }, e.prototype.contain = function(n) {
      return n = Ss(n) / Ss(this.base), BP(n, this._extent);
    }, e.prototype.normalize = function(n) {
      return n = Ss(n) / Ss(this.base), zP(n, this._extent);
    }, e.prototype.scale = function(n) {
      return n = VP(n, this._extent), MS(this.base, n);
    }, e.type = "log", e;
  }(ql)
), Cce = T3.prototype;
Cce.getMinorTicks = lb.getMinorTicks;
Cce.getLabel = lb.getLabel;
function IS(t, e) {
  return tKe(t, Ms(e));
}
ql.registerClass(T3);
var iKe = (
  /** @class */
  function() {
    function t(e, n, r) {
      this._prepareParams(e, n, r);
    }
    return t.prototype._prepareParams = function(e, n, r) {
      r[1] < r[0] && (r = [NaN, NaN]), this._dataMin = r[0], this._dataMax = r[1];
      var i = this._isOrdinal = e.type === "ordinal";
      this._needCrossZero = e.type === "interval" && n.getNeedCrossZero && n.getNeedCrossZero();
      var a = n.get("min", !0);
      a == null && (a = n.get("startValue", !0));
      var o = this._modelMinRaw = a;
      qe(o) ? this._modelMinNum = DS(e, o({
        min: r[0],
        max: r[1]
      })) : o !== "dataMin" && (this._modelMinNum = DS(e, o));
      var s = this._modelMaxRaw = n.get("max", !0);
      if (qe(s) ? this._modelMaxNum = DS(e, s({
        min: r[0],
        max: r[1]
      })) : s !== "dataMax" && (this._modelMaxNum = DS(e, s)), i)
        this._axisDataLen = n.getCategories().length;
      else {
        var l = n.get("boundaryGap"), u = Se(l) ? l : [l || 0, l || 0];
        typeof u[0] == "boolean" || typeof u[1] == "boolean" ? (process.env.NODE_ENV !== "production" && console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'), this._boundaryGapInner = [0, 0]) : this._boundaryGapInner = [js(u[0], 1), js(u[1], 1)];
      }
    }, t.prototype.calculate = function() {
      var e = this._isOrdinal, n = this._dataMin, r = this._dataMax, i = this._axisDataLen, a = this._boundaryGapInner, o = e ? null : r - n || Math.abs(n), s = this._modelMinRaw === "dataMin" ? n : this._modelMinNum, l = this._modelMaxRaw === "dataMax" ? r : this._modelMaxNum, u = s != null, c = l != null;
      s == null && (s = e ? i ? 0 : NaN : n - a[0] * o), l == null && (l = e ? i ? i - 1 : NaN : r + a[1] * o), (s == null || !isFinite(s)) && (s = NaN), (l == null || !isFinite(l)) && (l = NaN);
      var f = mf(s) || mf(l) || e && !i;
      this._needCrossZero && (s > 0 && l > 0 && !u && (s = 0), s < 0 && l < 0 && !c && (l = 0));
      var d = this._determinedMin, h = this._determinedMax;
      return d != null && (s = d, u = !0), h != null && (l = h, c = !0), {
        min: s,
        max: l,
        minFixed: u,
        maxFixed: c,
        isBlank: f
      };
    }, t.prototype.modifyDataMinMax = function(e, n) {
      process.env.NODE_ENV !== "production" && at(!this.frozen), this[oKe[e]] = n;
    }, t.prototype.setDeterminedMinMax = function(e, n) {
      var r = aKe[e];
      process.env.NODE_ENV !== "production" && at(!this.frozen && this[r] == null), this[r] = n;
    }, t.prototype.freeze = function() {
      this.frozen = !0;
    }, t;
  }()
), aKe = {
  min: "_determinedMin",
  max: "_determinedMax"
}, oKe = {
  min: "_dataMin",
  max: "_dataMax"
};
function Tce(t, e, n) {
  var r = t.rawExtentInfo;
  return r || (r = new iKe(t, e, n), t.rawExtentInfo = r, r);
}
function DS(t, e) {
  return e == null ? null : mf(e) ? NaN : t.parse(e);
}
function Pce(t, e) {
  var n = t.type, r = Tce(t, e, t.getExtent()).calculate();
  t.setBlank(r.isBlank);
  var i = r.min, a = r.max, o = e.ecModel;
  if (o && n === "time") {
    var s = yce("bar", o), l = !1;
    if (F(s, function(f) {
      l = l || f.getBaseAxis() === e.axis;
    }), l) {
      var u = bce(s), c = sKe(i, a, e, u);
      i = c.min, a = c.max;
    }
  }
  return {
    extent: [i, a],
    // "fix" means "fixed", the value should not be
    // changed in the subsequent steps.
    fixMin: r.minFixed,
    fixMax: r.maxFixed
  };
}
function sKe(t, e, n, r) {
  var i = n.axis.getExtent(), a = i[1] - i[0], o = Gqe(r, n.axis);
  if (o === void 0)
    return {
      min: t,
      max: e
    };
  var s = 1 / 0;
  F(o, function(h) {
    s = Math.min(h.offset, s);
  });
  var l = -1 / 0;
  F(o, function(h) {
    l = Math.max(h.offset + h.width, l);
  }), s = Math.abs(s), l = Math.abs(l);
  var u = s + l, c = e - t, f = 1 - (s + l) / a, d = c / f - c;
  return e += d * (l / u), t -= d * (s / u), {
    min: t,
    max: e
  };
}
function Xh(t, e) {
  var n = e, r = Pce(t, n), i = r.extent, a = n.get("splitNumber");
  t instanceof T3 && (t.base = n.get("logBase"));
  var o = t.type, s = n.get("interval"), l = o === "interval" || o === "time";
  t.setExtent(i[0], i[1]), t.calcNiceExtent({
    splitNumber: a,
    fixMin: r.fixMin,
    fixMax: r.fixMax,
    minInterval: l ? n.get("minInterval") : null,
    maxInterval: l ? n.get("maxInterval") : null
  }), s != null && t.setInterval && t.setInterval(s);
}
function g1(t, e) {
  if (e = e || t.get("type"), e)
    switch (e) {
      case "category":
        return new FP({
          ordinalMeta: t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(),
          extent: [1 / 0, -1 / 0]
        });
      case "time":
        return new C3({
          locale: t.ecModel.getLocaleModel(),
          useUTC: t.ecModel.get("useUTC")
        });
      default:
        return new (ql.getClass(e) || Gu)();
    }
}
function lKe(t) {
  var e = t.scale.getExtent(), n = e[0], r = e[1];
  return !(n > 0 && r > 0 || n < 0 && r < 0);
}
function Im(t) {
  var e = t.getLabelModel().get("formatter"), n = t.type === "category" ? t.scale.getExtent()[0] : null;
  return t.scale.type === "time" ? /* @__PURE__ */ function(r) {
    return function(i, a) {
      return t.scale.getFormattedLabel(i, a, r);
    };
  }(e) : Ve(e) ? /* @__PURE__ */ function(r) {
    return function(i) {
      var a = t.scale.getLabel(i), o = r.replace("{value}", a ?? "");
      return o;
    };
  }(e) : qe(e) ? /* @__PURE__ */ function(r) {
    return function(i, a) {
      return n != null && (a = i.value - n), r(P3(t, i), a, i.level != null ? {
        level: i.level
      } : null);
    };
  }(e) : function(r) {
    return t.scale.getLabel(r);
  };
}
function P3(t, e) {
  return t.type === "category" ? t.scale.getLabel(e) : e.value;
}
function uKe(t) {
  var e = t.model, n = t.scale;
  if (!(!e.get(["axisLabel", "show"]) || n.isBlank())) {
    var r, i, a = n.getExtent();
    n instanceof FP ? i = n.count() : (r = n.getTicks(), i = r.length);
    var o = t.getLabelModel(), s = Im(t), l, u = 1;
    i > 40 && (u = Math.ceil(i / 40));
    for (var c = 0; c < i; c += u) {
      var f = r ? r[c] : {
        value: a[0] + c
      }, d = s(f, c), h = o.getTextRect(d), p = cKe(h, o.get("rotate") || 0);
      l ? l.union(p) : l = p;
    }
    return l;
  }
}
function cKe(t, e) {
  var n = e * Math.PI / 180, r = t.width, i = t.height, a = r * Math.abs(Math.cos(n)) + Math.abs(i * Math.sin(n)), o = r * Math.abs(Math.sin(n)) + Math.abs(i * Math.cos(n)), s = new bt(t.x, t.y, a, o);
  return s;
}
function $3(t) {
  var e = t.get("interval");
  return e ?? "auto";
}
function $ce(t) {
  return t.type === "category" && $3(t.getLabelModel()) === 0;
}
function qC(t, e) {
  var n = {};
  return F(t.mapDimensionsAll(e), function(r) {
    n[S3(t, r)] = !0;
  }), kt(n);
}
function fKe(t, e, n) {
  e && F(qC(e, n), function(r) {
    var i = e.getApproximateExtent(r);
    i[0] < t[0] && (t[0] = i[0]), i[1] > t[1] && (t[1] = i[1]);
  });
}
var Dm = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getNeedCrossZero = function() {
      var e = this.option;
      return !e.scale;
    }, t.prototype.getCoordSysModel = function() {
    }, t;
  }()
);
function dKe(t) {
  return Yl(null, t);
}
var hKe = {
  isDimensionStacked: Hu,
  enableDataStack: vce,
  getStackedDimension: S3
};
function pKe(t, e) {
  var n = e;
  e instanceof xn || (n = new xn(e));
  var r = g1(n);
  return r.setExtent(t[0], t[1]), Xh(r, n), r;
}
function vKe(t) {
  vr(t, Dm);
}
function gKe(t, e) {
  return e = e || {}, Mn(t, null, null, e.state !== "normal");
}
const mKe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  createDimensions: Cqe,
  createList: dKe,
  createScale: pKe,
  createSymbol: Sr,
  createTextStyle: gKe,
  dataStack: hKe,
  enableHoverEmphasis: af,
  getECData: ft,
  getLayoutRect: Mr,
  mixinAxisModelCommonMethods: vKe
}, Symbol.toStringTag, { value: "Module" }));
var yKe = 1e-8;
function Qj(t, e) {
  return Math.abs(t - e) < yKe;
}
function Gd(t, e, n) {
  var r = 0, i = t[0];
  if (!i)
    return !1;
  for (var a = 1; a < t.length; a++) {
    var o = t[a];
    r += bu(i[0], i[1], o[0], o[1], e, n), i = o;
  }
  var s = t[0];
  return (!Qj(i[0], s[0]) || !Qj(i[1], s[1])) && (r += bu(i[0], i[1], s[0], s[1], e, n)), r !== 0;
}
var bKe = [];
function IM(t, e) {
  for (var n = 0; n < t.length; n++)
    oi(t[n], t[n], e);
}
function Hj(t, e, n, r) {
  for (var i = 0; i < t.length; i++) {
    var a = t[i];
    r && (a = r.project(a)), a && isFinite(a[0]) && isFinite(a[1]) && (Cu(e, e, a), Tu(n, n, a));
  }
}
function _Ke(t) {
  for (var e = 0, n = 0, r = 0, i = t.length, a = t[i - 1][0], o = t[i - 1][1], s = 0; s < i; s++) {
    var l = t[s][0], u = t[s][1], c = a * u - l * o;
    e += c, n += (a + l) * c, r += (o + u) * c, a = l, o = u;
  }
  return e ? [n / e / 3, r / e / 3, e] : [t[0][0] || 0, t[0][1] || 0];
}
var Ace = (
  /** @class */
  function() {
    function t(e) {
      this.name = e;
    }
    return t.prototype.setCenter = function(e) {
      this._center = e;
    }, t.prototype.getCenter = function() {
      var e = this._center;
      return e || (e = this._center = this.calcCenter()), e;
    }, t;
  }()
), Gj = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e, n) {
      this.type = "polygon", this.exterior = e, this.interiors = n;
    }
    return t;
  }()
), jj = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e) {
      this.type = "linestring", this.points = e;
    }
    return t;
  }()
), Ece = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i) {
      var a = t.call(this, n) || this;
      return a.type = "geoJSON", a.geometries = r, a._center = i && [i[0], i[1]], a;
    }
    return e.prototype.calcCenter = function() {
      for (var n = this.geometries, r, i = 0, a = 0; a < n.length; a++) {
        var o = n[a], s = o.exterior, l = s && s.length;
        l > i && (r = o, i = l);
      }
      if (r)
        return _Ke(r.exterior);
      var u = this.getBoundingRect();
      return [u.x + u.width / 2, u.y + u.height / 2];
    }, e.prototype.getBoundingRect = function(n) {
      var r = this._rect;
      if (r && !n)
        return r;
      var i = [1 / 0, 1 / 0], a = [-1 / 0, -1 / 0], o = this.geometries;
      return F(o, function(s) {
        s.type === "polygon" ? Hj(s.exterior, i, a, n) : F(s.points, function(l) {
          Hj(l, i, a, n);
        });
      }), isFinite(i[0]) && isFinite(i[1]) && isFinite(a[0]) && isFinite(a[1]) || (i[0] = i[1] = a[0] = a[1] = 0), r = new bt(i[0], i[1], a[0] - i[0], a[1] - i[1]), n || (this._rect = r), r;
    }, e.prototype.contain = function(n) {
      var r = this.getBoundingRect(), i = this.geometries;
      if (!r.contain(n[0], n[1]))
        return !1;
      e: for (var a = 0, o = i.length; a < o; a++) {
        var s = i[a];
        if (s.type === "polygon") {
          var l = s.exterior, u = s.interiors;
          if (Gd(l, n[0], n[1])) {
            for (var c = 0; c < (u ? u.length : 0); c++)
              if (Gd(u[c], n[0], n[1]))
                continue e;
            return !0;
          }
        }
      }
      return !1;
    }, e.prototype.transformTo = function(n, r, i, a) {
      var o = this.getBoundingRect(), s = o.width / o.height;
      i ? a || (a = i / s) : i = s * a;
      for (var l = new bt(n, r, i, a), u = o.calculateTransform(l), c = this.geometries, f = 0; f < c.length; f++) {
        var d = c[f];
        d.type === "polygon" ? (IM(d.exterior, u), F(d.interiors, function(h) {
          IM(h, u);
        })) : F(d.points, function(h) {
          IM(h, u);
        });
      }
      o = this._rect, o.copy(l), this._center = [o.x + o.width / 2, o.y + o.height / 2];
    }, e.prototype.cloneShallow = function(n) {
      n == null && (n = this.name);
      var r = new e(n, this.geometries, this._center);
      return r._rect = this._rect, r.transformTo = null, r;
    }, e;
  }(Ace)
), OKe = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r) {
      var i = t.call(this, n) || this;
      return i.type = "geoSVG", i._elOnlyForCalculate = r, i;
    }
    return e.prototype.calcCenter = function() {
      for (var n = this._elOnlyForCalculate, r = n.getBoundingRect(), i = [r.x + r.width / 2, r.y + r.height / 2], a = i1(bKe), o = n; o && !o.isGeoSVGGraphicRoot; )
        Ll(a, o.getLocalTransform(), a), o = o.parent;
      return dp(a, a), oi(i, i, a), i;
    }, e;
  }(Ace)
);
function SKe(t) {
  if (!t.UTF8Encoding)
    return t;
  var e = t, n = e.UTF8Scale;
  n == null && (n = 1024);
  var r = e.features;
  return F(r, function(i) {
    var a = i.geometry, o = a.encodeOffsets, s = a.coordinates;
    if (o)
      switch (a.type) {
        case "LineString":
          a.coordinates = Mce(s, o, n);
          break;
        case "Polygon":
          DM(s, o, n);
          break;
        case "MultiLineString":
          DM(s, o, n);
          break;
        case "MultiPolygon":
          F(s, function(l, u) {
            return DM(l, o[u], n);
          });
      }
  }), e.UTF8Encoding = !1, e;
}
function DM(t, e, n) {
  for (var r = 0; r < t.length; r++)
    t[r] = Mce(t[r], e[r], n);
}
function Mce(t, e, n) {
  for (var r = [], i = e[0], a = e[1], o = 0; o < t.length; o += 2) {
    var s = t.charCodeAt(o) - 64, l = t.charCodeAt(o + 1) - 64;
    s = s >> 1 ^ -(s & 1), l = l >> 1 ^ -(l & 1), s += i, l += a, i = s, a = l, r.push([s / n, l / n]);
  }
  return r;
}
function eL(t, e) {
  return t = SKe(t), Ce(yn(t.features, function(n) {
    return n.geometry && n.properties && n.geometry.coordinates.length > 0;
  }), function(n) {
    var r = n.properties, i = n.geometry, a = [];
    switch (i.type) {
      case "Polygon":
        var o = i.coordinates;
        a.push(new Gj(o[0], o.slice(1)));
        break;
      case "MultiPolygon":
        F(i.coordinates, function(l) {
          l[0] && a.push(new Gj(l[0], l.slice(1)));
        });
        break;
      case "LineString":
        a.push(new jj([i.coordinates]));
        break;
      case "MultiLineString":
        a.push(new jj(i.coordinates));
    }
    var s = new Ece(r[e || "name"], a, r.cp);
    return s.properties = r, s;
  });
}
const xKe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  MAX_SAFE_INTEGER: Ok,
  asc: ao,
  getPercentWithPrecision: UGe,
  getPixelPrecision: T5,
  getPrecision: Ms,
  getPrecisionSafe: EC,
  isNumeric: hP,
  isRadianAroundZero: Vg,
  linearMap: gn,
  nice: $5,
  numericToNumber: Gl,
  parseDate: go,
  quantile: uw,
  quantity: Ise,
  quantityExponent: s1,
  reformIntervals: Sk,
  remRadian: P5,
  round: sr
}, Symbol.toStringTag, { value: "Module" })), wKe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  format: p1,
  parse: go
}, Symbol.toStringTag, { value: "Module" })), CKe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Arc: SP,
  BezierCurve: f1,
  BoundingRect: bt,
  Circle: ic,
  CompoundPath: xP,
  Ellipse: OP,
  Group: ct,
  Image: ci,
  IncrementalDisplayable: $le,
  Line: Xr,
  LinearGradient: _m,
  Polygon: pa,
  Polyline: va,
  RadialGradient: V5,
  Rect: Zt,
  Ring: c1,
  Sector: ha,
  Text: jt,
  clipPointsByRect: H5,
  clipRectByRect: Dle,
  createIcon: Sm,
  extendPath: Mle,
  extendShape: Ele,
  getShapeClass: wP,
  getTransform: of,
  initProps: Vn,
  makeImage: W5,
  makePath: d1,
  mergePath: no,
  registerShape: ds,
  resizePath: Q5,
  updateProps: tn
}, Symbol.toStringTag, { value: "Module" })), TKe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  addCommas: K5,
  capitalFirst: PUe,
  encodeHTML: ea,
  formatTime: TUe,
  formatTpl: e3,
  getTextRect: wUe,
  getTooltipMarker: Xle,
  normalizeCssArray: vp,
  toCamelCase: J5,
  truncateText: Qse
}, Symbol.toStringTag, { value: "Module" })), PKe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  bind: We,
  clone: ot,
  curry: vt,
  defaults: it,
  each: F,
  extend: _e,
  filter: yn,
  indexOf: St,
  inherits: m5,
  isArray: Se,
  isFunction: qe,
  isObject: nt,
  isString: Ve,
  map: Ce,
  merge: mt,
  reduce: os
}, Symbol.toStringTag, { value: "Module" }));
var n_ = Ut();
function Ice(t, e) {
  var n = Ce(e, function(r) {
    return t.scale.parse(r);
  });
  return t.type === "time" && n.length > 0 && (n.sort(), n.unshift(n[0]), n.push(n[n.length - 1])), n;
}
function $Ke(t) {
  var e = t.getLabelModel().get("customValues");
  if (e) {
    var n = Im(t);
    return {
      labels: Ice(t, e).map(function(r) {
        var i = {
          value: r
        };
        return {
          formattedLabel: n(i),
          rawLabel: t.scale.getLabel(i),
          tickValue: r
        };
      })
    };
  }
  return t.type === "category" ? EKe(t) : IKe(t);
}
function AKe(t, e) {
  var n = t.getTickModel().get("customValues");
  return n ? {
    ticks: Ice(t, n)
  } : t.type === "category" ? MKe(t, e) : {
    ticks: Ce(t.scale.getTicks(), function(r) {
      return r.value;
    })
  };
}
function EKe(t) {
  var e = t.getLabelModel(), n = Dce(t, e);
  return !e.get("show") || t.scale.isBlank() ? {
    labels: [],
    labelCategoryInterval: n.labelCategoryInterval
  } : n;
}
function Dce(t, e) {
  var n = Rce(t, "labels"), r = $3(e), i = kce(n, r);
  if (i)
    return i;
  var a, o;
  return qe(r) ? a = Bce(t, r) : (o = r === "auto" ? DKe(t) : r, a = Nce(t, o)), Lce(n, r, {
    labels: a,
    labelCategoryInterval: o
  });
}
function MKe(t, e) {
  var n = Rce(t, "ticks"), r = $3(e), i = kce(n, r);
  if (i)
    return i;
  var a, o;
  if ((!e.get("show") || t.scale.isBlank()) && (a = []), qe(r))
    a = Bce(t, r, !0);
  else if (r === "auto") {
    var s = Dce(t, t.getLabelModel());
    o = s.labelCategoryInterval, a = Ce(s.labels, function(l) {
      return l.tickValue;
    });
  } else
    o = r, a = Nce(t, o, !0);
  return Lce(n, r, {
    ticks: a,
    tickCategoryInterval: o
  });
}
function IKe(t) {
  var e = t.scale.getTicks(), n = Im(t);
  return {
    labels: Ce(e, function(r, i) {
      return {
        level: r.level,
        formattedLabel: n(r, i),
        rawLabel: t.scale.getLabel(r),
        tickValue: r.value
      };
    })
  };
}
function Rce(t, e) {
  return n_(t)[e] || (n_(t)[e] = []);
}
function kce(t, e) {
  for (var n = 0; n < t.length; n++)
    if (t[n].key === e)
      return t[n].value;
}
function Lce(t, e, n) {
  return t.push({
    key: e,
    value: n
  }), n;
}
function DKe(t) {
  var e = n_(t).autoInterval;
  return e ?? (n_(t).autoInterval = t.calculateCategoryInterval());
}
function RKe(t) {
  var e = kKe(t), n = Im(t), r = (e.axisRotate - e.labelRotate) / 180 * Math.PI, i = t.scale, a = i.getExtent(), o = i.count();
  if (a[1] - a[0] < 1)
    return 0;
  var s = 1;
  o > 40 && (s = Math.max(1, Math.floor(o / 40)));
  for (var l = a[0], u = t.dataToCoord(l + 1) - t.dataToCoord(l), c = Math.abs(u * Math.cos(r)), f = Math.abs(u * Math.sin(r)), d = 0, h = 0; l <= a[1]; l += s) {
    var p = 0, v = 0, g = o1(n({
      value: l
    }), e.font, "center", "top");
    p = g.width * 1.3, v = g.height * 1.3, d = Math.max(d, p, 7), h = Math.max(h, v, 7);
  }
  var m = d / c, y = h / f;
  isNaN(m) && (m = 1 / 0), isNaN(y) && (y = 1 / 0);
  var _ = Math.max(0, Math.floor(Math.min(m, y))), O = n_(t.model), S = t.getExtent(), x = O.lastAutoInterval, C = O.lastTickCount;
  return x != null && C != null && Math.abs(x - _) <= 1 && Math.abs(C - o) <= 1 && x > _ && O.axisExtent0 === S[0] && O.axisExtent1 === S[1] ? _ = x : (O.lastTickCount = o, O.lastAutoInterval = _, O.axisExtent0 = S[0], O.axisExtent1 = S[1]), _;
}
function kKe(t) {
  var e = t.getLabelModel();
  return {
    axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0,
    labelRotate: e.get("rotate") || 0,
    font: e.getFont()
  };
}
function Nce(t, e, n) {
  var r = Im(t), i = t.scale, a = i.getExtent(), o = t.getLabelModel(), s = [], l = Math.max((e || 0) + 1, 1), u = a[0], c = i.count();
  u !== 0 && l > 1 && c / l > 2 && (u = Math.round(Math.ceil(u / l) * l));
  var f = $ce(t), d = o.get("showMinLabel") || f, h = o.get("showMaxLabel") || f;
  d && u !== a[0] && v(a[0]);
  for (var p = u; p <= a[1]; p += l)
    v(p);
  h && p - l !== a[1] && v(a[1]);
  function v(g) {
    var m = {
      value: g
    };
    s.push(n ? g : {
      formattedLabel: r(m),
      rawLabel: i.getLabel(m),
      tickValue: g
    });
  }
  return s;
}
function Bce(t, e, n) {
  var r = t.scale, i = Im(t), a = [];
  return F(r.getTicks(), function(o) {
    var s = r.getLabel(o), l = o.value;
    e(o.value, s) && a.push(n ? l : {
      formattedLabel: i(o),
      rawLabel: s,
      tickValue: l
    });
  }), a;
}
var Zj = [0, 1], LKe = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.onBand = !1, this.inverse = !1, this.dim = e, this.scale = n, this._extent = r || [0, 0];
    }
    return t.prototype.contain = function(e) {
      var n = this._extent, r = Math.min(n[0], n[1]), i = Math.max(n[0], n[1]);
      return e >= r && e <= i;
    }, t.prototype.containData = function(e) {
      return this.scale.contain(e);
    }, t.prototype.getExtent = function() {
      return this._extent.slice();
    }, t.prototype.getPixelPrecision = function(e) {
      return T5(e || this.scale.getExtent(), this._extent);
    }, t.prototype.setExtent = function(e, n) {
      var r = this._extent;
      r[0] = e, r[1] = n;
    }, t.prototype.dataToCoord = function(e, n) {
      var r = this._extent, i = this.scale;
      return e = i.normalize(e), this.onBand && i.type === "ordinal" && (r = r.slice(), Uj(r, i.count())), gn(e, Zj, r, n);
    }, t.prototype.coordToData = function(e, n) {
      var r = this._extent, i = this.scale;
      this.onBand && i.type === "ordinal" && (r = r.slice(), Uj(r, i.count()));
      var a = gn(e, r, Zj, n);
      return this.scale.scale(a);
    }, t.prototype.pointToData = function(e, n) {
    }, t.prototype.getTicksCoords = function(e) {
      e = e || {};
      var n = e.tickModel || this.getTickModel(), r = AKe(this, n), i = r.ticks, a = Ce(i, function(s) {
        return {
          coord: this.dataToCoord(this.scale.type === "ordinal" ? this.scale.getRawOrdinalNumber(s) : s),
          tickValue: s
        };
      }, this), o = n.get("alignWithLabel");
      return NKe(this, a, o, e.clamp), a;
    }, t.prototype.getMinorTicksCoords = function() {
      if (this.scale.type === "ordinal")
        return [];
      var e = this.model.getModel("minorTick"), n = e.get("splitNumber");
      n > 0 && n < 100 || (n = 5);
      var r = this.scale.getMinorTicks(n), i = Ce(r, function(a) {
        return Ce(a, function(o) {
          return {
            coord: this.dataToCoord(o),
            tickValue: o
          };
        }, this);
      }, this);
      return i;
    }, t.prototype.getViewLabels = function() {
      return $Ke(this).labels;
    }, t.prototype.getLabelModel = function() {
      return this.model.getModel("axisLabel");
    }, t.prototype.getTickModel = function() {
      return this.model.getModel("axisTick");
    }, t.prototype.getBandWidth = function() {
      var e = this._extent, n = this.scale.getExtent(), r = n[1] - n[0] + (this.onBand ? 1 : 0);
      r === 0 && (r = 1);
      var i = Math.abs(e[1] - e[0]);
      return Math.abs(i) / r;
    }, t.prototype.calculateCategoryInterval = function() {
      return RKe(this);
    }, t;
  }()
);
function Uj(t, e) {
  var n = t[1] - t[0], r = e, i = n / r / 2;
  t[0] += i, t[1] -= i;
}
function NKe(t, e, n, r) {
  var i = e.length;
  if (!t.onBand || n || !i)
    return;
  var a = t.getExtent(), o, s;
  if (i === 1)
    e[0].coord = a[0], o = e[1] = {
      coord: a[1]
    };
  else {
    var l = e[i - 1].tickValue - e[0].tickValue, u = (e[i - 1].coord - e[0].coord) / l;
    F(e, function(h) {
      h.coord -= u / 2;
    });
    var c = t.scale.getExtent();
    s = 1 + c[1] - e[i - 1].tickValue, o = {
      coord: e[i - 1].coord + u * s
    }, e.push(o);
  }
  var f = a[0] > a[1];
  d(e[0].coord, a[0]) && (r ? e[0].coord = a[0] : e.shift()), r && d(a[0], e[0].coord) && e.unshift({
    coord: a[0]
  }), d(a[1], o.coord) && (r ? o.coord = a[1] : e.pop()), r && d(o.coord, a[1]) && e.push({
    coord: a[1]
  });
  function d(h, p) {
    return h = sr(h), p = sr(p), f ? h > p : h < p;
  }
}
const vs = LKe;
function BKe(t) {
  var e = At.extend(t);
  return At.registerClass(e), e;
}
function zKe(t) {
  var e = Ln.extend(t);
  return Ln.registerClass(e), e;
}
function VKe(t) {
  var e = Cn.extend(t);
  return Cn.registerClass(e), e;
}
function FKe(t) {
  var e = _n.extend(t);
  return _n.registerClass(e), e;
}
var W0 = Math.PI * 2, $d = jl.CMD, WKe = ["top", "right", "bottom", "left"];
function QKe(t, e, n, r, i) {
  var a = n.width, o = n.height;
  switch (t) {
    case "top":
      r.set(n.x + a / 2, n.y - e), i.set(0, -1);
      break;
    case "bottom":
      r.set(n.x + a / 2, n.y + o + e), i.set(0, 1);
      break;
    case "left":
      r.set(n.x - e, n.y + o / 2), i.set(-1, 0);
      break;
    case "right":
      r.set(n.x + a + e, n.y + o / 2), i.set(1, 0);
      break;
  }
}
function HKe(t, e, n, r, i, a, o, s, l) {
  o -= t, s -= e;
  var u = Math.sqrt(o * o + s * s);
  o /= u, s /= u;
  var c = o * n + t, f = s * n + e;
  if (Math.abs(r - i) % W0 < 1e-4)
    return l[0] = c, l[1] = f, u - n;
  if (a) {
    var d = r;
    r = oo(i), i = oo(d);
  } else
    r = oo(r), i = oo(i);
  r > i && (i += W0);
  var h = Math.atan2(s, o);
  if (h < 0 && (h += W0), h >= r && h <= i || h + W0 >= r && h + W0 <= i)
    return l[0] = c, l[1] = f, u - n;
  var p = n * Math.cos(r) + t, v = n * Math.sin(r) + e, g = n * Math.cos(i) + t, m = n * Math.sin(i) + e, y = (p - o) * (p - o) + (v - s) * (v - s), _ = (g - o) * (g - o) + (m - s) * (m - s);
  return y < _ ? (l[0] = p, l[1] = v, Math.sqrt(y)) : (l[0] = g, l[1] = m, Math.sqrt(_));
}
function KC(t, e, n, r, i, a, o, s) {
  var l = i - t, u = a - e, c = n - t, f = r - e, d = Math.sqrt(c * c + f * f);
  c /= d, f /= d;
  var h = l * c + u * f, p = h / d;
  s && (p = Math.min(Math.max(p, 0), 1)), p *= d;
  var v = o[0] = t + p * c, g = o[1] = e + p * f;
  return Math.sqrt((v - i) * (v - i) + (g - a) * (g - a));
}
function zce(t, e, n, r, i, a, o) {
  n < 0 && (t = t + n, n = -n), r < 0 && (e = e + r, r = -r);
  var s = t + n, l = e + r, u = o[0] = Math.min(Math.max(i, t), s), c = o[1] = Math.min(Math.max(a, e), l);
  return Math.sqrt((u - i) * (u - i) + (c - a) * (c - a));
}
var Ps = [];
function GKe(t, e, n) {
  var r = zce(e.x, e.y, e.width, e.height, t.x, t.y, Ps);
  return n.set(Ps[0], Ps[1]), r;
}
function jKe(t, e, n) {
  for (var r = 0, i = 0, a = 0, o = 0, s, l, u = 1 / 0, c = e.data, f = t.x, d = t.y, h = 0; h < c.length; ) {
    var p = c[h++];
    h === 1 && (r = c[h], i = c[h + 1], a = r, o = i);
    var v = u;
    switch (p) {
      case $d.M:
        a = c[h++], o = c[h++], r = a, i = o;
        break;
      case $d.L:
        v = KC(r, i, c[h], c[h + 1], f, d, Ps, !0), r = c[h++], i = c[h++];
        break;
      case $d.C:
        v = cse(r, i, c[h++], c[h++], c[h++], c[h++], c[h], c[h + 1], f, d, Ps), r = c[h++], i = c[h++];
        break;
      case $d.Q:
        v = dse(r, i, c[h++], c[h++], c[h], c[h + 1], f, d, Ps), r = c[h++], i = c[h++];
        break;
      case $d.A:
        var g = c[h++], m = c[h++], y = c[h++], _ = c[h++], O = c[h++], S = c[h++];
        h += 1;
        var x = !!(1 - c[h++]);
        s = Math.cos(O) * y + g, l = Math.sin(O) * _ + m, h <= 1 && (a = s, o = l);
        var C = (f - g) * _ / y + g;
        v = HKe(g, m, _, O, O + S, x, C, d, Ps), r = Math.cos(O + S) * y + g, i = Math.sin(O + S) * _ + m;
        break;
      case $d.R:
        a = r = c[h++], o = i = c[h++];
        var P = c[h++], $ = c[h++];
        v = zce(a, o, P, $, f, d, Ps);
        break;
      case $d.Z:
        v = KC(r, i, a, o, f, d, Ps, !0), r = a, i = o;
        break;
    }
    v < u && (u = v, n.set(Ps[0], Ps[1]));
  }
  return u;
}
var Is = new yt(), kn = new yt(), mr = new yt(), El = new yt(), wl = new yt();
function Xj(t, e) {
  if (t) {
    var n = t.getTextGuideLine(), r = t.getTextContent();
    if (r && n) {
      var i = t.textGuideLineConfig || {}, a = [[0, 0], [0, 0], [0, 0]], o = i.candidates || WKe, s = r.getBoundingRect().clone();
      s.applyTransform(r.getComputedTransform());
      var l = 1 / 0, u = i.anchor, c = t.getComputedTransform(), f = c && dp([], c), d = e.get("length2") || 0;
      u && mr.copy(u);
      for (var h = 0; h < o.length; h++) {
        var p = o[h];
        QKe(p, 0, s, Is, El), yt.scaleAndAdd(kn, Is, El, d), kn.transform(f);
        var v = t.getBoundingRect(), g = u ? u.distance(kn) : t instanceof Dt ? jKe(kn, t.path, mr) : GKe(kn, v, mr);
        g < l && (l = g, kn.transform(c), mr.transform(c), mr.toArray(a[0]), kn.toArray(a[1]), Is.toArray(a[2]));
      }
      Vce(a, e.get("minTurnAngle")), n.setShape({
        points: a
      });
    }
  }
}
var JC = [], Ji = new yt();
function Vce(t, e) {
  if (e <= 180 && e > 0) {
    e = e / 180 * Math.PI, Is.fromArray(t[0]), kn.fromArray(t[1]), mr.fromArray(t[2]), yt.sub(El, Is, kn), yt.sub(wl, mr, kn);
    var n = El.len(), r = wl.len();
    if (!(n < 1e-3 || r < 1e-3)) {
      El.scale(1 / n), wl.scale(1 / r);
      var i = El.dot(wl), a = Math.cos(e);
      if (a < i) {
        var o = KC(kn.x, kn.y, mr.x, mr.y, Is.x, Is.y, JC, !1);
        Ji.fromArray(JC), Ji.scaleAndAdd(wl, o / Math.tan(Math.PI - e));
        var s = mr.x !== kn.x ? (Ji.x - kn.x) / (mr.x - kn.x) : (Ji.y - kn.y) / (mr.y - kn.y);
        if (isNaN(s))
          return;
        s < 0 ? yt.copy(Ji, kn) : s > 1 && yt.copy(Ji, mr), Ji.toArray(t[1]);
      }
    }
  }
}
function ZKe(t, e, n) {
  if (n <= 180 && n > 0) {
    n = n / 180 * Math.PI, Is.fromArray(t[0]), kn.fromArray(t[1]), mr.fromArray(t[2]), yt.sub(El, kn, Is), yt.sub(wl, mr, kn);
    var r = El.len(), i = wl.len();
    if (!(r < 1e-3 || i < 1e-3)) {
      El.scale(1 / r), wl.scale(1 / i);
      var a = El.dot(e), o = Math.cos(n);
      if (a < o) {
        var s = KC(kn.x, kn.y, mr.x, mr.y, Is.x, Is.y, JC, !1);
        Ji.fromArray(JC);
        var l = Math.PI / 2, u = Math.acos(wl.dot(e)), c = l + u - n;
        if (c >= l)
          yt.copy(Ji, mr);
        else {
          Ji.scaleAndAdd(wl, s / Math.tan(Math.PI / 2 - c));
          var f = mr.x !== kn.x ? (Ji.x - kn.x) / (mr.x - kn.x) : (Ji.y - kn.y) / (mr.y - kn.y);
          if (isNaN(f))
            return;
          f < 0 ? yt.copy(Ji, kn) : f > 1 && yt.copy(Ji, mr);
        }
        Ji.toArray(t[1]);
      }
    }
  }
}
function RM(t, e, n, r) {
  var i = n === "normal", a = i ? t : t.ensureState(n);
  a.ignore = e;
  var o = r.get("smooth");
  o && o === !0 && (o = 0.3), a.shape = a.shape || {}, o > 0 && (a.shape.smooth = o);
  var s = r.getModel("lineStyle").getLineStyle();
  i ? t.useStyle(s) : a.style = s;
}
function UKe(t, e) {
  var n = e.smooth, r = e.points;
  if (r)
    if (t.moveTo(r[0][0], r[0][1]), n > 0 && r.length >= 3) {
      var i = wu(r[0], r[1]), a = wu(r[1], r[2]);
      if (!i || !a) {
        t.lineTo(r[1][0], r[1][1]), t.lineTo(r[2][0], r[2][1]);
        return;
      }
      var o = Math.min(i, a) * n, s = Yy([], r[1], r[0], o / i), l = Yy([], r[1], r[2], o / a), u = Yy([], s, l, 0.5);
      t.bezierCurveTo(s[0], s[1], s[0], s[1], u[0], u[1]), t.bezierCurveTo(l[0], l[1], l[0], l[1], r[2][0], r[2][1]);
    } else
      for (var c = 1; c < r.length; c++)
        t.lineTo(r[c][0], r[c][1]);
}
function A3(t, e, n) {
  var r = t.getTextGuideLine(), i = t.getTextContent();
  if (!i) {
    r && t.removeTextGuideLine();
    return;
  }
  for (var a = e.normal, o = a.get("show"), s = i.ignore, l = 0; l < Ub.length; l++) {
    var u = Ub[l], c = e[u], f = u === "normal";
    if (c) {
      var d = c.get("show"), h = f ? s : dt(i.states[u] && i.states[u].ignore, s);
      if (h || !dt(d, o)) {
        var p = f ? r : r && r.states[u];
        p && (p.ignore = !0), r && RM(r, !0, u, c);
        continue;
      }
      r || (r = new va(), t.setTextGuideLine(r), !f && (s || !o) && RM(r, !0, "normal", e.normal), t.stateProxy && (r.stateProxy = t.stateProxy)), RM(r, !1, u, c);
    }
  }
  if (r) {
    it(r.style, n), r.style.fill = null;
    var v = a.get("showAbove"), g = t.textGuideLineConfig = t.textGuideLineConfig || {};
    g.showAbove = v || !1, r.buildPath = UKe;
  }
}
function E3(t, e) {
  e = e || "labelLine";
  for (var n = {
    normal: t.getModel(e)
  }, r = 0; r < da.length; r++) {
    var i = da[r];
    n[i] = t.getModel([i, e]);
  }
  return n;
}
function Fce(t) {
  for (var e = [], n = 0; n < t.length; n++) {
    var r = t[n];
    if (!r.defaultAttr.ignore) {
      var i = r.label, a = i.getComputedTransform(), o = i.getBoundingRect(), s = !a || a[1] < 1e-5 && a[2] < 1e-5, l = i.style.margin || 0, u = o.clone();
      u.applyTransform(a), u.x -= l / 2, u.y -= l / 2, u.width += l, u.height += l;
      var c = s ? new DC(o, a) : null;
      e.push({
        label: i,
        labelLine: r.labelLine,
        rect: u,
        localRect: o,
        obb: c,
        priority: r.priority,
        defaultAttr: r.defaultAttr,
        layoutOption: r.computedLayoutOption,
        axisAligned: s,
        transform: a
      });
    }
  }
  return e;
}
function Wce(t, e, n, r, i, a) {
  var o = t.length;
  if (o < 2)
    return;
  t.sort(function(P, $) {
    return P.rect[e] - $.rect[e];
  });
  for (var s = 0, l, u = !1, c = 0, f = 0; f < o; f++) {
    var d = t[f], h = d.rect;
    l = h[e] - s, l < 0 && (h[e] -= l, d.label[e] -= l, u = !0);
    var p = Math.max(-l, 0);
    c += p, s = h[e] + h[n];
  }
  c > 0 && a && S(-c / o, 0, o);
  var v = t[0], g = t[o - 1], m, y;
  _(), m < 0 && x(-m, 0.8), y < 0 && x(y, 0.8), _(), O(m, y, 1), O(y, m, -1), _(), m < 0 && C(-m), y < 0 && C(y);
  function _() {
    m = v.rect[e] - r, y = i - g.rect[e] - g.rect[n];
  }
  function O(P, $, T) {
    if (P < 0) {
      var E = Math.min($, -P);
      if (E > 0) {
        S(E * T, 0, o);
        var M = E + P;
        M < 0 && x(-M * T, 1);
      } else
        x(-P * T, 1);
    }
  }
  function S(P, $, T) {
    P !== 0 && (u = !0);
    for (var E = $; E < T; E++) {
      var M = t[E], R = M.rect;
      R[e] += P, M.label[e] += P;
    }
  }
  function x(P, $) {
    for (var T = [], E = 0, M = 1; M < o; M++) {
      var R = t[M - 1].rect, N = Math.max(t[M].rect[e] - R[e] - R[n], 0);
      T.push(N), E += N;
    }
    if (E) {
      var I = Math.min(Math.abs(P) / E, $);
      if (P > 0)
        for (var M = 0; M < o - 1; M++) {
          var B = T[M] * I;
          S(B, 0, M + 1);
        }
      else
        for (var M = o - 1; M > 0; M--) {
          var B = T[M - 1] * I;
          S(-B, M, o);
        }
    }
  }
  function C(P) {
    var $ = P < 0 ? -1 : 1;
    P = Math.abs(P);
    for (var T = Math.ceil(P / (o - 1)), E = 0; E < o - 1; E++)
      if ($ > 0 ? S(T, 0, E + 1) : S(-T, o - E - 1, o), P -= T, P <= 0)
        return;
  }
  return u;
}
function XKe(t, e, n, r) {
  return Wce(t, "x", "width", e, n, r);
}
function Qce(t, e, n, r) {
  return Wce(t, "y", "height", e, n, r);
}
function Hce(t) {
  var e = [];
  t.sort(function(v, g) {
    return g.priority - v.priority;
  });
  var n = new bt(0, 0, 0, 0);
  function r(v) {
    if (!v.ignore) {
      var g = v.ensureState("emphasis");
      g.ignore == null && (g.ignore = !1);
    }
    v.ignore = !0;
  }
  for (var i = 0; i < t.length; i++) {
    var a = t[i], o = a.axisAligned, s = a.localRect, l = a.transform, u = a.label, c = a.labelLine;
    n.copy(a.rect), n.width -= 0.1, n.height -= 0.1, n.x += 0.05, n.y += 0.05;
    for (var f = a.obb, d = !1, h = 0; h < e.length; h++) {
      var p = e[h];
      if (n.intersect(p.rect)) {
        if (o && p.axisAligned) {
          d = !0;
          break;
        }
        if (p.obb || (p.obb = new DC(p.localRect, p.transform)), f || (f = new DC(s, l)), f.intersect(p.obb)) {
          d = !0;
          break;
        }
      }
    }
    d ? (r(u), c && r(c)) : (u.attr("ignore", a.defaultAttr.ignore), c && c.attr("ignore", a.defaultAttr.labelGuideIgnore), e.push(a));
  }
}
function YKe(t) {
  if (t) {
    for (var e = [], n = 0; n < t.length; n++)
      e.push(t[n].slice());
    return e;
  }
}
function qKe(t, e) {
  var n = t.label, r = e && e.getTextGuideLine();
  return {
    dataIndex: t.dataIndex,
    dataType: t.dataType,
    seriesIndex: t.seriesModel.seriesIndex,
    text: t.label.style.text,
    rect: t.hostRect,
    labelRect: t.rect,
    // x: labelAttr.x,
    // y: labelAttr.y,
    align: n.style.align,
    verticalAlign: n.style.verticalAlign,
    labelLinePoints: YKe(r && r.shape.points)
  };
}
var Yj = ["align", "verticalAlign", "width", "height", "fontSize"], Xi = new Pu(), kM = Ut(), KKe = Ut();
function RS(t, e, n) {
  for (var r = 0; r < n.length; r++) {
    var i = n[r];
    e[i] != null && (t[i] = e[i]);
  }
}
var kS = ["x", "y", "rotation"], JKe = (
  /** @class */
  function() {
    function t() {
      this._labelList = [], this._chartViewList = [];
    }
    return t.prototype.clearLabels = function() {
      this._labelList = [], this._chartViewList = [];
    }, t.prototype._addLabel = function(e, n, r, i, a) {
      var o = i.style, s = i.__hostTarget, l = s.textConfig || {}, u = i.getComputedTransform(), c = i.getBoundingRect().plain();
      bt.applyTransform(c, c, u), u ? Xi.setLocalTransform(u) : (Xi.x = Xi.y = Xi.rotation = Xi.originX = Xi.originY = 0, Xi.scaleX = Xi.scaleY = 1), Xi.rotation = oo(Xi.rotation);
      var f = i.__hostTarget, d;
      if (f) {
        d = f.getBoundingRect().plain();
        var h = f.getComputedTransform();
        bt.applyTransform(d, d, h);
      }
      var p = d && f.getTextGuideLine();
      this._labelList.push({
        label: i,
        labelLine: p,
        seriesModel: r,
        dataIndex: e,
        dataType: n,
        layoutOption: a,
        computedLayoutOption: null,
        rect: c,
        hostRect: d,
        // Label with lower priority will be hidden when overlapped
        // Use rect size as default priority
        priority: d ? d.width * d.height : 0,
        // Save default label attributes.
        // For restore if developers want get back to default value in callback.
        defaultAttr: {
          ignore: i.ignore,
          labelGuideIgnore: p && p.ignore,
          x: Xi.x,
          y: Xi.y,
          scaleX: Xi.scaleX,
          scaleY: Xi.scaleY,
          rotation: Xi.rotation,
          style: {
            x: o.x,
            y: o.y,
            align: o.align,
            verticalAlign: o.verticalAlign,
            width: o.width,
            height: o.height,
            fontSize: o.fontSize
          },
          cursor: i.cursor,
          attachedPos: l.position,
          attachedRot: l.rotation
        }
      });
    }, t.prototype.addLabelsOfSeries = function(e) {
      var n = this;
      this._chartViewList.push(e);
      var r = e.__model, i = r.get("labelLayout");
      (qe(i) || kt(i).length) && e.group.traverse(function(a) {
        if (a.ignore)
          return !0;
        var o = a.getTextContent(), s = ft(a);
        o && !o.disableLabelLayout && n._addLabel(s.dataIndex, s.dataType, r, o, i);
      });
    }, t.prototype.updateLayoutConfig = function(e) {
      var n = e.getWidth(), r = e.getHeight();
      function i(_, O) {
        return function() {
          Xj(_, O);
        };
      }
      for (var a = 0; a < this._labelList.length; a++) {
        var o = this._labelList[a], s = o.label, l = s.__hostTarget, u = o.defaultAttr, c = void 0;
        qe(o.layoutOption) ? c = o.layoutOption(qKe(o, l)) : c = o.layoutOption, c = c || {}, o.computedLayoutOption = c;
        var f = Math.PI / 180;
        l && l.setTextConfig({
          // Force to set local false.
          local: !1,
          // Ignore position and rotation config on the host el if x or y is changed.
          position: c.x != null || c.y != null ? null : u.attachedPos,
          // Ignore rotation config on the host el if rotation is changed.
          rotation: c.rotate != null ? c.rotate * f : u.attachedRot,
          offset: [c.dx || 0, c.dy || 0]
        });
        var d = !1;
        if (c.x != null ? (s.x = ze(c.x, n), s.setStyle("x", 0), d = !0) : (s.x = u.x, s.setStyle("x", u.style.x)), c.y != null ? (s.y = ze(c.y, r), s.setStyle("y", 0), d = !0) : (s.y = u.y, s.setStyle("y", u.style.y)), c.labelLinePoints) {
          var h = l.getTextGuideLine();
          h && (h.setShape({
            points: c.labelLinePoints
          }), d = !1);
        }
        var p = kM(s);
        p.needsUpdateLabelLine = d, s.rotation = c.rotate != null ? c.rotate * f : u.rotation, s.scaleX = u.scaleX, s.scaleY = u.scaleY;
        for (var v = 0; v < Yj.length; v++) {
          var g = Yj[v];
          s.setStyle(g, c[g] != null ? c[g] : u.style[g]);
        }
        if (c.draggable) {
          if (s.draggable = !0, s.cursor = "move", l) {
            var m = o.seriesModel;
            if (o.dataIndex != null) {
              var y = o.seriesModel.getData(o.dataType);
              m = y.getItemModel(o.dataIndex);
            }
            s.on("drag", i(l, m.getModel("labelLine")));
          }
        } else
          s.off("drag"), s.cursor = u.cursor;
      }
    }, t.prototype.layout = function(e) {
      var n = e.getWidth(), r = e.getHeight(), i = Fce(this._labelList), a = yn(i, function(l) {
        return l.layoutOption.moveOverlap === "shiftX";
      }), o = yn(i, function(l) {
        return l.layoutOption.moveOverlap === "shiftY";
      });
      XKe(a, 0, n), Qce(o, 0, r);
      var s = yn(i, function(l) {
        return l.layoutOption.hideOverlap;
      });
      Hce(s);
    }, t.prototype.processLabelsOverall = function() {
      var e = this;
      F(this._chartViewList, function(n) {
        var r = n.__model, i = n.ignoreLabelLineUpdate, a = r.isAnimationEnabled();
        n.group.traverse(function(o) {
          if (o.ignore && !o.forceLabelAnimation)
            return !0;
          var s = !i, l = o.getTextContent();
          !s && l && (s = kM(l).needsUpdateLabelLine), s && e._updateLabelLine(o, r), a && e._animateLabels(o, r);
        });
      });
    }, t.prototype._updateLabelLine = function(e, n) {
      var r = e.getTextContent(), i = ft(e), a = i.dataIndex;
      if (r && a != null) {
        var o = n.getData(i.dataType), s = o.getItemModel(a), l = {}, u = o.getItemVisual(a, "style");
        if (u) {
          var c = o.getVisual("drawType");
          l.stroke = u[c];
        }
        var f = s.getModel("labelLine");
        A3(e, E3(s), l), Xj(e, f);
      }
    }, t.prototype._animateLabels = function(e, n) {
      var r = e.getTextContent(), i = e.getTextGuideLine();
      if (r && (e.forceLabelAnimation || !r.ignore && !r.invisible && !e.disableLabelAnimation && !qv(e))) {
        var a = kM(r), o = a.oldLayout, s = ft(e), l = s.dataIndex, u = {
          x: r.x,
          y: r.y,
          rotation: r.rotation
        }, c = n.getData(s.dataType);
        if (o) {
          r.attr(o);
          var d = e.prevStates;
          d && (St(d, "select") >= 0 && r.attr(a.oldLayoutSelect), St(d, "emphasis") >= 0 && r.attr(a.oldLayoutEmphasis)), tn(r, u, n, l);
        } else if (r.attr(u), !wm(r).valueAnimation) {
          var f = dt(r.style.opacity, 1);
          r.style.opacity = 0, Vn(r, {
            style: {
              opacity: f
            }
          }, n, l);
        }
        if (a.oldLayout = u, r.states.select) {
          var h = a.oldLayoutSelect = {};
          RS(h, u, kS), RS(h, r.states.select, kS);
        }
        if (r.states.emphasis) {
          var p = a.oldLayoutEmphasis = {};
          RS(p, u, kS), RS(p, r.states.emphasis, kS);
        }
        Nle(r, l, c, n, n);
      }
      if (i && !i.ignore && !i.invisible) {
        var a = KKe(i), o = a.oldLayout, v = {
          points: i.shape.points
        };
        o ? (i.attr({
          shape: o
        }), tn(i, {
          shape: v
        }, n)) : (i.setShape(v), i.style.strokePercent = 0, Vn(i, {
          style: {
            strokePercent: 1
          }
        }, n)), a.oldLayout = v;
      }
    }, t;
  }()
), LM = Ut();
function eJe(t) {
  t.registerUpdateLifecycle("series:beforeupdate", function(e, n, r) {
    var i = LM(n).labelManager;
    i || (i = LM(n).labelManager = new JKe()), i.clearLabels();
  }), t.registerUpdateLifecycle("series:layoutlabels", function(e, n, r) {
    var i = LM(n).labelManager;
    r.updatedSeries.forEach(function(a) {
      i.addLabelsOfSeries(n.getViewOfSeriesModel(a));
    }), i.updateLayoutConfig(n), i.layout(n), i.processLabelsOverall();
  });
}
var NM = Math.sin, BM = Math.cos, Gce = Math.PI, Ad = Math.PI * 2, tJe = 180 / Gce, jce = function() {
  function t() {
  }
  return t.prototype.reset = function(e) {
    this._start = !0, this._d = [], this._str = "", this._p = Math.pow(10, e || 4);
  }, t.prototype.moveTo = function(e, n) {
    this._add("M", e, n);
  }, t.prototype.lineTo = function(e, n) {
    this._add("L", e, n);
  }, t.prototype.bezierCurveTo = function(e, n, r, i, a, o) {
    this._add("C", e, n, r, i, a, o);
  }, t.prototype.quadraticCurveTo = function(e, n, r, i) {
    this._add("Q", e, n, r, i);
  }, t.prototype.arc = function(e, n, r, i, a, o) {
    this.ellipse(e, n, r, r, 0, i, a, o);
  }, t.prototype.ellipse = function(e, n, r, i, a, o, s, l) {
    var u = s - o, c = !l, f = Math.abs(u), d = Gc(f - Ad) || (c ? u >= Ad : -u >= Ad), h = u > 0 ? u % Ad : u % Ad + Ad, p = !1;
    d ? p = !0 : Gc(f) ? p = !1 : p = h >= Gce == !!c;
    var v = e + r * BM(o), g = n + i * NM(o);
    this._start && this._add("M", v, g);
    var m = Math.round(a * tJe);
    if (d) {
      var y = 1 / this._p, _ = (c ? 1 : -1) * (Ad - y);
      this._add("A", r, i, m, 1, +c, e + r * BM(o + _), n + i * NM(o + _)), y > 0.01 && this._add("A", r, i, m, 0, +c, v, g);
    } else {
      var O = e + r * BM(s), S = n + i * NM(s);
      this._add("A", r, i, m, +p, +c, O, S);
    }
  }, t.prototype.rect = function(e, n, r, i) {
    this._add("M", e, n), this._add("l", r, 0), this._add("l", 0, i), this._add("l", -r, 0), this._add("Z");
  }, t.prototype.closePath = function() {
    this._d.length > 0 && this._add("Z");
  }, t.prototype._add = function(e, n, r, i, a, o, s, l, u) {
    for (var c = [], f = this._p, d = 1; d < arguments.length; d++) {
      var h = arguments[d];
      if (isNaN(h)) {
        this._invalid = !0;
        return;
      }
      c.push(Math.round(h * f) / f);
    }
    this._d.push(e + c.join(" ")), this._start = e === "Z";
  }, t.prototype.generateStr = function() {
    this._str = this._invalid ? "" : this._d.join(""), this._d = [];
  }, t.prototype.getStr = function() {
    return this._str;
  }, t;
}(), M3 = "none", nJe = Math.round;
function rJe(t) {
  var e = t.fill;
  return e != null && e !== M3;
}
function iJe(t) {
  var e = t.stroke;
  return e != null && e !== M3;
}
var tL = ["lineCap", "miterLimit", "lineJoin"], aJe = Ce(tL, function(t) {
  return "stroke-" + t.toLowerCase();
});
function oJe(t, e, n, r) {
  var i = e.opacity == null ? 1 : e.opacity;
  if (n instanceof ci) {
    t("opacity", i);
    return;
  }
  if (rJe(e)) {
    var a = Zb(e.fill);
    t("fill", a.color);
    var o = e.fillOpacity != null ? e.fillOpacity * a.opacity * i : a.opacity * i;
    o < 1 && t("fill-opacity", o);
  } else
    t("fill", M3);
  if (iJe(e)) {
    var s = Zb(e.stroke);
    t("stroke", s.color);
    var l = e.strokeNoScale ? n.getLineScale() : 1, u = l ? (e.lineWidth || 0) / l : 0, c = e.strokeOpacity != null ? e.strokeOpacity * s.opacity * i : s.opacity * i, f = e.strokeFirst;
    if (u !== 1 && t("stroke-width", u), f && t("paint-order", f ? "stroke" : "fill"), c < 1 && t("stroke-opacity", c), e.lineDash) {
      var d = f3(n), h = d[0], p = d[1];
      h && (p = nJe(p || 0), t("stroke-dasharray", h.join(",")), (p || r) && t("stroke-dashoffset", p));
    }
    for (var v = 0; v < tL.length; v++) {
      var g = tL[v];
      if (e[g] !== MC[g]) {
        var m = e[g] || MC[g];
        m && t(aJe[v], m);
      }
    }
  }
}
var Zce = "http://www.w3.org/2000/svg", Uce = "http://www.w3.org/1999/xlink", sJe = "http://www.w3.org/2000/xmlns/", lJe = "http://www.w3.org/XML/1998/namespace", qj = "ecmeta_";
function Xce(t) {
  return document.createElementNS(Zce, t);
}
function Yr(t, e, n, r, i) {
  return {
    tag: t,
    attrs: n || {},
    children: r,
    text: i,
    key: e
  };
}
function uJe(t, e) {
  var n = [];
  if (e)
    for (var r in e) {
      var i = e[r], a = r;
      i !== !1 && (i !== !0 && i != null && (a += '="' + i + '"'), n.push(a));
    }
  return "<" + t + " " + n.join(" ") + ">";
}
function cJe(t) {
  return "</" + t + ">";
}
function I3(t, e) {
  e = e || {};
  var n = e.newline ? `
` : "";
  function r(i) {
    var a = i.children, o = i.tag, s = i.attrs, l = i.text;
    return uJe(o, s) + (o !== "style" ? ea(l) : l || "") + (a ? "" + n + Ce(a, function(u) {
      return r(u);
    }).join(n) + n : "") + cJe(o);
  }
  return r(t);
}
function fJe(t, e, n) {
  n = n || {};
  var r = n.newline ? `
` : "", i = " {" + r, a = r + "}", o = Ce(kt(t), function(l) {
    return l + i + Ce(kt(t[l]), function(u) {
      return u + ":" + t[l][u] + ";";
    }).join(r) + a;
  }).join(r), s = Ce(kt(e), function(l) {
    return "@keyframes " + l + i + Ce(kt(e[l]), function(u) {
      return u + i + Ce(kt(e[l][u]), function(c) {
        var f = e[l][u][c];
        return c === "d" && (f = 'path("' + f + '")'), c + ":" + f + ";";
      }).join(r) + a;
    }).join(r) + a;
  }).join(r);
  return !o && !s ? "" : ["<![CDATA[", o, s, "]]>"].join(r);
}
function nL(t) {
  return {
    zrId: t,
    shadowCache: {},
    patternCache: {},
    gradientCache: {},
    clipPathCache: {},
    defs: {},
    cssNodes: {},
    cssAnims: {},
    cssStyleCache: {},
    cssAnimIdx: 0,
    shadowIdx: 0,
    gradientIdx: 0,
    patternIdx: 0,
    clipPathIdx: 0
  };
}
function Kj(t, e, n, r) {
  return Yr("svg", "root", {
    width: t,
    height: e,
    xmlns: Zce,
    "xmlns:xlink": Uce,
    version: "1.1",
    baseProfile: "full",
    viewBox: r ? "0 0 " + t + " " + e : !1
  }, n);
}
var dJe = 0;
function Yce() {
  return dJe++;
}
var Jj = {
  cubicIn: "0.32,0,0.67,0",
  cubicOut: "0.33,1,0.68,1",
  cubicInOut: "0.65,0,0.35,1",
  quadraticIn: "0.11,0,0.5,0",
  quadraticOut: "0.5,1,0.89,1",
  quadraticInOut: "0.45,0,0.55,1",
  quarticIn: "0.5,0,0.75,0",
  quarticOut: "0.25,1,0.5,1",
  quarticInOut: "0.76,0,0.24,1",
  quinticIn: "0.64,0,0.78,0",
  quinticOut: "0.22,1,0.36,1",
  quinticInOut: "0.83,0,0.17,1",
  sinusoidalIn: "0.12,0,0.39,0",
  sinusoidalOut: "0.61,1,0.88,1",
  sinusoidalInOut: "0.37,0,0.63,1",
  exponentialIn: "0.7,0,0.84,0",
  exponentialOut: "0.16,1,0.3,1",
  exponentialInOut: "0.87,0,0.13,1",
  circularIn: "0.55,0,1,0.45",
  circularOut: "0,0.55,0.45,1",
  circularInOut: "0.85,0,0.15,1"
}, kd = "transform-origin";
function hJe(t, e, n) {
  var r = _e({}, t.shape);
  _e(r, e), t.buildPath(n, r);
  var i = new jce();
  return i.reset(bse(t)), n.rebuildPath(i, 1), i.generateStr(), i.getStr();
}
function pJe(t, e) {
  var n = e.originX, r = e.originY;
  (n || r) && (t[kd] = n + "px " + r + "px");
}
var vJe = {
  fill: "fill",
  opacity: "opacity",
  lineWidth: "stroke-width",
  lineDashOffset: "stroke-dashoffset"
};
function qce(t, e) {
  var n = e.zrId + "-ani-" + e.cssAnimIdx++;
  return e.cssAnims[n] = t, n;
}
function gJe(t, e, n) {
  var r = t.shape.paths, i = {}, a, o;
  if (F(r, function(l) {
    var u = nL(n.zrId);
    u.animation = !0, WP(l, {}, u, !0);
    var c = u.cssAnims, f = u.cssNodes, d = kt(c), h = d.length;
    if (h) {
      o = d[h - 1];
      var p = c[o];
      for (var v in p) {
        var g = p[v];
        i[v] = i[v] || { d: "" }, i[v].d += g.d || "";
      }
      for (var m in f) {
        var y = f[m].animation;
        y.indexOf(o) >= 0 && (a = y);
      }
    }
  }), !!a) {
    e.d = !1;
    var s = qce(i, n);
    return a.replace(o, s);
  }
}
function eZ(t) {
  return Ve(t) ? Jj[t] ? "cubic-bezier(" + Jj[t] + ")" : S5(t) ? t : "" : "";
}
function WP(t, e, n, r) {
  var i = t.animators, a = i.length, o = [];
  if (t instanceof xP) {
    var s = gJe(t, e, n);
    if (s)
      o.push(s);
    else if (!a)
      return;
  } else if (!a)
    return;
  for (var l = {}, u = 0; u < a; u++) {
    var c = i[u], f = [c.getMaxTime() / 1e3 + "s"], d = eZ(c.getClip().easing), h = c.getDelay();
    d ? f.push(d) : f.push("linear"), h && f.push(h / 1e3 + "s"), c.getLoop() && f.push("infinite");
    var p = f.join(" ");
    l[p] = l[p] || [p, []], l[p][1].push(c);
  }
  function v(y) {
    var _ = y[1], O = _.length, S = {}, x = {}, C = {}, P = "animation-timing-function";
    function $(he, re, q) {
      for (var K = he.getTracks(), de = he.getMaxTime(), xe = 0; xe < K.length; xe++) {
        var we = K[xe];
        if (we.needsAnimate()) {
          var He = we.keyframes, je = we.propName;
          if (q && (je = q(je)), je)
            for (var Be = 0; Be < He.length; Be++) {
              var Le = He[Be], Pe = Math.round(Le.time / de * 100) + "%", Fe = eZ(Le.easing), Ye = Le.rawValue;
              (Ve(Ye) || Kt(Ye)) && (re[Pe] = re[Pe] || {}, re[Pe][je] = Le.rawValue, Fe && (re[Pe][P] = Fe));
            }
        }
      }
    }
    for (var T = 0; T < O; T++) {
      var E = _[T], M = E.targetName;
      M ? M === "shape" && $(E, x) : !r && $(E, S);
    }
    for (var R in S) {
      var N = {};
      wse(N, t), _e(N, S[R]);
      var I = _se(N), B = S[R][P];
      C[R] = I ? {
        transform: I
      } : {}, pJe(C[R], N), B && (C[R][P] = B);
    }
    var Q, W = !0;
    for (var R in x) {
      C[R] = C[R] || {};
      var H = !Q, B = x[R][P];
      H && (Q = new jl());
      var U = Q.len();
      Q.reset(), C[R].d = hJe(t, x[R], Q);
      var j = Q.len();
      if (!H && U !== j) {
        W = !1;
        break;
      }
      B && (C[R][P] = B);
    }
    if (!W)
      for (var R in C)
        delete C[R].d;
    if (!r)
      for (var T = 0; T < O; T++) {
        var E = _[T], M = E.targetName;
        M === "style" && $(E, C, function(K) {
          return vJe[K];
        });
      }
    for (var Y = kt(C), ne = !0, fe, T = 1; T < Y.length; T++) {
      var ue = Y[T - 1], ye = Y[T];
      if (C[ue][kd] !== C[ye][kd]) {
        ne = !1;
        break;
      }
      fe = C[ue][kd];
    }
    if (ne && fe) {
      for (var R in C)
        C[R][kd] && delete C[R][kd];
      e[kd] = fe;
    }
    if (yn(Y, function(he) {
      return kt(C[he]).length > 0;
    }).length) {
      var se = qce(C, n);
      return se + " " + y[0] + " both";
    }
  }
  for (var g in l) {
    var s = v(l[g]);
    s && o.push(s);
  }
  if (o.length) {
    var m = n.zrId + "-cls-" + Yce();
    n.cssNodes["." + m] = {
      animation: o.join(",")
    }, e.class = m;
  }
}
function mJe(t, e, n) {
  if (!t.ignore)
    if (t.isSilent()) {
      var r = {
        "pointer-events": "none"
      };
      tZ(r, e, n);
    } else {
      var i = t.states.emphasis && t.states.emphasis.style ? t.states.emphasis.style : {}, a = i.fill;
      if (!a) {
        var o = t.style && t.style.fill, s = t.states.select && t.states.select.style && t.states.select.style.fill, l = t.currentStates.indexOf("select") >= 0 && s || o;
        l && (a = TC(l));
      }
      var u = i.lineWidth;
      if (u) {
        var c = !i.strokeNoScale && t.transform ? t.transform[0] : 1;
        u = u / c;
      }
      var r = {
        cursor: "pointer"
      };
      a && (r.fill = a), i.stroke && (r.stroke = i.stroke), u && (r["stroke-width"] = u), tZ(r, e, n);
    }
}
function tZ(t, e, n, r) {
  var i = JSON.stringify(t), a = n.cssStyleCache[i];
  a || (a = n.zrId + "-cls-" + Yce(), n.cssStyleCache[i] = a, n.cssNodes["." + a + ":hover"] = t), e.class = e.class ? e.class + " " + a : a;
}
var r_ = Math.round;
function Kce(t) {
  return t && Ve(t.src);
}
function Jce(t) {
  return t && qe(t.toDataURL);
}
function D3(t, e, n, r) {
  oJe(function(i, a) {
    var o = i === "fill" || i === "stroke";
    o && yse(a) ? tfe(e, t, i, r) : o && w5(a) ? nfe(n, t, i, r) : o && a === "none" ? t[i] = "transparent" : t[i] = a;
  }, e, n, !1), wJe(n, t, r);
}
function R3(t, e) {
  var n = $se(e);
  n && (n.each(function(r, i) {
    r != null && (t[(qj + i).toLowerCase()] = r + "");
  }), e.isSilent() && (t[qj + "silent"] = "true"));
}
function nZ(t) {
  return Gc(t[0] - 1) && Gc(t[1]) && Gc(t[2]) && Gc(t[3] - 1);
}
function yJe(t) {
  return Gc(t[4]) && Gc(t[5]);
}
function k3(t, e, n) {
  if (e && !(yJe(e) && nZ(e))) {
    var r = 1e4;
    t.transform = nZ(e) ? "translate(" + r_(e[4] * r) / r + " " + r_(e[5] * r) / r + ")" : fGe(e);
  }
}
function rZ(t, e, n) {
  for (var r = t.points, i = [], a = 0; a < r.length; a++)
    i.push(r_(r[a][0] * n) / n), i.push(r_(r[a][1] * n) / n);
  e.points = i.join(" ");
}
function iZ(t) {
  return !t.smooth;
}
function bJe(t) {
  var e = Ce(t, function(n) {
    return typeof n == "string" ? [n, n] : n;
  });
  return function(n, r, i) {
    for (var a = 0; a < e.length; a++) {
      var o = e[a], s = n[o[0]];
      s != null && (r[o[1]] = r_(s * i) / i);
    }
  };
}
var _Je = {
  circle: [bJe(["cx", "cy", "r"])],
  polyline: [rZ, iZ],
  polygon: [rZ, iZ]
};
function OJe(t) {
  for (var e = t.animators, n = 0; n < e.length; n++)
    if (e[n].targetName === "shape")
      return !0;
  return !1;
}
function efe(t, e) {
  var n = t.style, r = t.shape, i = _Je[t.type], a = {}, o = e.animation, s = "path", l = t.style.strokePercent, u = e.compress && bse(t) || 4;
  if (i && !e.willUpdate && !(i[1] && !i[1](r)) && !(o && OJe(t)) && !(l < 1)) {
    s = t.type;
    var c = Math.pow(10, u);
    i[0](r, a, c);
  } else {
    var f = !t.path || t.shapeChanged();
    t.path || t.createPathProxy();
    var d = t.path;
    f && (d.beginPath(), t.buildPath(d, t.shape), t.pathUpdated());
    var h = d.getVersion(), p = t, v = p.__svgPathBuilder;
    (p.__svgPathVersion !== h || !v || l !== p.__svgPathStrokePercent) && (v || (v = p.__svgPathBuilder = new jce()), v.reset(u), d.rebuildPath(v, l), v.generateStr(), p.__svgPathVersion = h, p.__svgPathStrokePercent = l), a.d = v.getStr();
  }
  return k3(a, t.transform), D3(a, n, t, e), R3(a, t), e.animation && WP(t, a, e), e.emphasis && mJe(t, a, e), Yr(s, t.id + "", a);
}
function SJe(t, e) {
  var n = t.style, r = n.image;
  if (r && !Ve(r) && (Kce(r) ? r = r.src : Jce(r) && (r = r.toDataURL())), !!r) {
    var i = n.x || 0, a = n.y || 0, o = n.width, s = n.height, l = {
      href: r,
      width: o,
      height: s
    };
    return i && (l.x = i), a && (l.y = a), k3(l, t.transform), D3(l, n, t, e), R3(l, t), e.animation && WP(t, l, e), Yr("image", t.id + "", l);
  }
}
function xJe(t, e) {
  var n = t.style, r = n.text;
  if (r != null && (r += ""), !(!r || isNaN(n.x) || isNaN(n.y))) {
    var i = n.font || vf, a = n.x || 0, o = hGe(n.y || 0, fP(i), n.textBaseline), s = dGe[n.textAlign] || n.textAlign, l = {
      "dominant-baseline": "central",
      "text-anchor": s
    };
    if (tle(n)) {
      var u = "", c = n.fontStyle, f = ele(n.fontSize);
      if (!parseFloat(f))
        return;
      var d = n.fontFamily || Hoe, h = n.fontWeight;
      u += "font-size:" + f + ";font-family:" + d + ";", c && c !== "normal" && (u += "font-style:" + c + ";"), h && h !== "normal" && (u += "font-weight:" + h + ";"), l.style = u;
    } else
      l.style = "font: " + i;
    return r.match(/\s/) && (l["xml:space"] = "preserve"), a && (l.x = a), o && (l.y = o), k3(l, t.transform), D3(l, n, t, e), R3(l, t), e.animation && WP(t, l, e), Yr("text", t.id + "", l, void 0, r);
  }
}
function aZ(t, e) {
  if (t instanceof Dt)
    return efe(t, e);
  if (t instanceof ci)
    return SJe(t, e);
  if (t instanceof Wg)
    return xJe(t, e);
}
function wJe(t, e, n) {
  var r = t.style;
  if (pGe(r)) {
    var i = vGe(t), a = n.shadowCache, o = a[i];
    if (!o) {
      var s = t.getGlobalScale(), l = s[0], u = s[1];
      if (!l || !u)
        return;
      var c = r.shadowOffsetX || 0, f = r.shadowOffsetY || 0, d = r.shadowBlur, h = Zb(r.shadowColor), p = h.opacity, v = h.color, g = d / 2 / l, m = d / 2 / u, y = g + " " + m;
      o = n.zrId + "-s" + n.shadowIdx++, n.defs[o] = Yr("filter", o, {
        id: o,
        x: "-100%",
        y: "-100%",
        width: "300%",
        height: "300%"
      }, [
        Yr("feDropShadow", "", {
          dx: c / l,
          dy: f / u,
          stdDeviation: y,
          "flood-color": v,
          "flood-opacity": p
        })
      ]), a[i] = o;
    }
    e.filter = cP(o);
  }
}
function tfe(t, e, n, r) {
  var i = t[n], a, o = {
    gradientUnits: i.global ? "userSpaceOnUse" : "objectBoundingBox"
  };
  if (gse(i))
    a = "linearGradient", o.x1 = i.x, o.y1 = i.y, o.x2 = i.x2, o.y2 = i.y2;
  else if (mse(i))
    a = "radialGradient", o.cx = dt(i.x, 0.5), o.cy = dt(i.y, 0.5), o.r = dt(i.r, 0.5);
  else {
    process.env.NODE_ENV !== "production" && qo("Illegal gradient type.");
    return;
  }
  for (var s = i.colorStops, l = [], u = 0, c = s.length; u < c; ++u) {
    var f = ck(s[u].offset) * 100 + "%", d = s[u].color, h = Zb(d), p = h.color, v = h.opacity, g = {
      offset: f
    };
    g["stop-color"] = p, v < 1 && (g["stop-opacity"] = v), l.push(Yr("stop", u + "", g));
  }
  var m = Yr(a, "", o, l), y = I3(m), _ = r.gradientCache, O = _[y];
  O || (O = r.zrId + "-g" + r.gradientIdx++, _[y] = O, o.id = O, r.defs[O] = Yr(a, O, o, l)), e[n] = cP(O);
}
function nfe(t, e, n, r) {
  var i = t.style[n], a = t.getBoundingRect(), o = {}, s = i.repeat, l = s === "no-repeat", u = s === "repeat-x", c = s === "repeat-y", f;
  if (vse(i)) {
    var d = i.imageWidth, h = i.imageHeight, p = void 0, v = i.image;
    if (Ve(v) ? p = v : Kce(v) ? p = v.src : Jce(v) && (p = v.toDataURL()), typeof Image > "u") {
      var g = "Image width/height must been given explictly in svg-ssr renderer.";
      at(d, g), at(h, g);
    } else if (d == null || h == null) {
      var m = function(T, E) {
        if (T) {
          var M = T.elm, R = d || E.width, N = h || E.height;
          T.tag === "pattern" && (u ? (N = 1, R /= a.width) : c && (R = 1, N /= a.height)), T.attrs.width = R, T.attrs.height = N, M && (M.setAttribute("width", R), M.setAttribute("height", N));
        }
      }, y = I5(p, null, t, function(T) {
        l || m(x, T), m(f, T);
      });
      y && y.width && y.height && (d = d || y.width, h = h || y.height);
    }
    f = Yr("image", "img", {
      href: p,
      width: d,
      height: h
    }), o.width = d, o.height = h;
  } else i.svgElement && (f = ot(i.svgElement), o.width = i.svgWidth, o.height = i.svgHeight);
  if (f) {
    var _, O;
    l ? _ = O = 1 : u ? (O = 1, _ = o.width / a.width) : c ? (_ = 1, O = o.height / a.height) : o.patternUnits = "userSpaceOnUse", _ != null && !isNaN(_) && (o.width = _), O != null && !isNaN(O) && (o.height = O);
    var S = _se(i);
    S && (o.patternTransform = S);
    var x = Yr("pattern", "", o, [f]), C = I3(x), P = r.patternCache, $ = P[C];
    $ || ($ = r.zrId + "-p" + r.patternIdx++, P[C] = $, o.id = $, x = r.defs[$] = Yr("pattern", $, o, [f])), e[n] = cP($);
  }
}
function CJe(t, e, n) {
  var r = n.clipPathCache, i = n.defs, a = r[t.id];
  if (!a) {
    a = n.zrId + "-c" + n.clipPathIdx++;
    var o = {
      id: a
    };
    r[t.id] = a, i[a] = Yr("clipPath", a, o, [efe(t, n)]);
  }
  e["clip-path"] = cP(a);
}
function oZ(t) {
  return document.createTextNode(t);
}
function jd(t, e, n) {
  t.insertBefore(e, n);
}
function sZ(t, e) {
  t.removeChild(e);
}
function lZ(t, e) {
  t.appendChild(e);
}
function rfe(t) {
  return t.parentNode;
}
function ife(t) {
  return t.nextSibling;
}
function zM(t, e) {
  t.textContent = e;
}
var uZ = 58, TJe = 120, PJe = Yr("", "");
function rL(t) {
  return t === void 0;
}
function Ol(t) {
  return t !== void 0;
}
function $Je(t, e, n) {
  for (var r = {}, i = e; i <= n; ++i) {
    var a = t[i].key;
    a !== void 0 && (process.env.NODE_ENV !== "production" && r[a] != null && console.error("Duplicate key " + a), r[a] = i);
  }
  return r;
}
function Oy(t, e) {
  var n = t.key === e.key, r = t.tag === e.tag;
  return r && n;
}
function i_(t) {
  var e, n = t.children, r = t.tag;
  if (Ol(r)) {
    var i = t.elm = Xce(r);
    if (L3(PJe, t), Se(n))
      for (e = 0; e < n.length; ++e) {
        var a = n[e];
        a != null && lZ(i, i_(a));
      }
    else Ol(t.text) && !nt(t.text) && lZ(i, oZ(t.text));
  } else
    t.elm = oZ(t.text);
  return t.elm;
}
function afe(t, e, n, r, i) {
  for (; r <= i; ++r) {
    var a = n[r];
    a != null && jd(t, i_(a), e);
  }
}
function eT(t, e, n, r) {
  for (; n <= r; ++n) {
    var i = e[n];
    if (i != null)
      if (Ol(i.tag)) {
        var a = rfe(i.elm);
        sZ(a, i.elm);
      } else
        sZ(t, i.elm);
  }
}
function L3(t, e) {
  var n, r = e.elm, i = t && t.attrs || {}, a = e.attrs || {};
  if (i !== a) {
    for (n in a) {
      var o = a[n], s = i[n];
      s !== o && (o === !0 ? r.setAttribute(n, "") : o === !1 ? r.removeAttribute(n) : n === "style" ? r.style.cssText = o : n.charCodeAt(0) !== TJe ? r.setAttribute(n, o) : n === "xmlns:xlink" || n === "xmlns" ? r.setAttributeNS(sJe, n, o) : n.charCodeAt(3) === uZ ? r.setAttributeNS(lJe, n, o) : n.charCodeAt(5) === uZ ? r.setAttributeNS(Uce, n, o) : r.setAttribute(n, o));
    }
    for (n in i)
      n in a || r.removeAttribute(n);
  }
}
function AJe(t, e, n) {
  for (var r = 0, i = 0, a = e.length - 1, o = e[0], s = e[a], l = n.length - 1, u = n[0], c = n[l], f, d, h, p; r <= a && i <= l; )
    o == null ? o = e[++r] : s == null ? s = e[--a] : u == null ? u = n[++i] : c == null ? c = n[--l] : Oy(o, u) ? (Sv(o, u), o = e[++r], u = n[++i]) : Oy(s, c) ? (Sv(s, c), s = e[--a], c = n[--l]) : Oy(o, c) ? (Sv(o, c), jd(t, o.elm, ife(s.elm)), o = e[++r], c = n[--l]) : Oy(s, u) ? (Sv(s, u), jd(t, s.elm, o.elm), s = e[--a], u = n[++i]) : (rL(f) && (f = $Je(e, r, a)), d = f[u.key], rL(d) ? jd(t, i_(u), o.elm) : (h = e[d], h.tag !== u.tag ? jd(t, i_(u), o.elm) : (Sv(h, u), e[d] = void 0, jd(t, h.elm, o.elm))), u = n[++i]);
  (r <= a || i <= l) && (r > a ? (p = n[l + 1] == null ? null : n[l + 1].elm, afe(t, p, n, i, l)) : eT(t, e, r, a));
}
function Sv(t, e) {
  var n = e.elm = t.elm, r = t.children, i = e.children;
  t !== e && (L3(t, e), rL(e.text) ? Ol(r) && Ol(i) ? r !== i && AJe(n, r, i) : Ol(i) ? (Ol(t.text) && zM(n, ""), afe(n, null, i, 0, i.length - 1)) : Ol(r) ? eT(n, r, 0, r.length - 1) : Ol(t.text) && zM(n, "") : t.text !== e.text && (Ol(r) && eT(n, r, 0, r.length - 1), zM(n, e.text)));
}
function EJe(t, e) {
  if (Oy(t, e))
    Sv(t, e);
  else {
    var n = t.elm, r = rfe(n);
    i_(e), r !== null && (jd(r, e.elm, ife(n)), eT(r, [t], 0, 0));
  }
  return e;
}
var MJe = 0, IJe = function() {
  function t(e, n, r) {
    if (this.type = "svg", this.refreshHover = cZ("refreshHover"), this.configLayer = cZ("configLayer"), this.storage = n, this._opts = r = _e({}, r), this.root = e, this._id = "zr" + MJe++, this._oldVNode = Kj(r.width, r.height), e && !r.ssr) {
      var i = this._viewport = document.createElement("div");
      i.style.cssText = "position:relative;overflow:hidden";
      var a = this._svgDom = this._oldVNode.elm = Xce("svg");
      L3(null, this._oldVNode), i.appendChild(a), e.appendChild(i);
    }
    this.resize(r.width, r.height);
  }
  return t.prototype.getType = function() {
    return this.type;
  }, t.prototype.getViewportRoot = function() {
    return this._viewport;
  }, t.prototype.getViewportRootOffset = function() {
    var e = this.getViewportRoot();
    if (e)
      return {
        offsetLeft: e.offsetLeft || 0,
        offsetTop: e.offsetTop || 0
      };
  }, t.prototype.getSvgDom = function() {
    return this._svgDom;
  }, t.prototype.refresh = function() {
    if (this.root) {
      var e = this.renderToVNode({
        willUpdate: !0
      });
      e.attrs.style = "position:absolute;left:0;top:0;user-select:none", EJe(this._oldVNode, e), this._oldVNode = e;
    }
  }, t.prototype.renderOneToVNode = function(e) {
    return aZ(e, nL(this._id));
  }, t.prototype.renderToVNode = function(e) {
    e = e || {};
    var n = this.storage.getDisplayList(!0), r = this._width, i = this._height, a = nL(this._id);
    a.animation = e.animation, a.willUpdate = e.willUpdate, a.compress = e.compress, a.emphasis = e.emphasis;
    var o = [], s = this._bgVNode = DJe(r, i, this._backgroundColor, a);
    s && o.push(s);
    var l = e.compress ? null : this._mainVNode = Yr("g", "main", {}, []);
    this._paintList(n, a, l ? l.children : o), l && o.push(l);
    var u = Ce(kt(a.defs), function(d) {
      return a.defs[d];
    });
    if (u.length && o.push(Yr("defs", "defs", {}, u)), e.animation) {
      var c = fJe(a.cssNodes, a.cssAnims, { newline: !0 });
      if (c) {
        var f = Yr("style", "stl", {}, [], c);
        o.push(f);
      }
    }
    return Kj(r, i, o, e.useViewBox);
  }, t.prototype.renderToString = function(e) {
    return e = e || {}, I3(this.renderToVNode({
      animation: dt(e.cssAnimation, !0),
      emphasis: dt(e.cssEmphasis, !0),
      willUpdate: !1,
      compress: !0,
      useViewBox: dt(e.useViewBox, !0)
    }), { newline: !0 });
  }, t.prototype.setBackgroundColor = function(e) {
    this._backgroundColor = e;
  }, t.prototype.getSvgRoot = function() {
    return this._mainVNode && this._mainVNode.elm;
  }, t.prototype._paintList = function(e, n, r) {
    for (var i = e.length, a = [], o = 0, s, l, u = 0, c = 0; c < i; c++) {
      var f = e[c];
      if (!f.invisible) {
        var d = f.__clipPaths, h = d && d.length || 0, p = l && l.length || 0, v = void 0;
        for (v = Math.max(h - 1, p - 1); v >= 0 && !(d && l && d[v] === l[v]); v--)
          ;
        for (var g = p - 1; g > v; g--)
          o--, s = a[o - 1];
        for (var m = v + 1; m < h; m++) {
          var y = {};
          CJe(d[m], y, n);
          var _ = Yr("g", "clip-g-" + u++, y, []);
          (s ? s.children : r).push(_), a[o++] = _, s = _;
        }
        l = d;
        var O = aZ(f, n);
        O && (s ? s.children : r).push(O);
      }
    }
  }, t.prototype.resize = function(e, n) {
    var r = this._opts, i = this.root, a = this._viewport;
    if (e != null && (r.width = e), n != null && (r.height = n), i && a && (a.style.display = "none", e = Rv(i, 0, r), n = Rv(i, 1, r), a.style.display = ""), this._width !== e || this._height !== n) {
      if (this._width = e, this._height = n, a) {
        var o = a.style;
        o.width = e + "px", o.height = n + "px";
      }
      if (w5(this._backgroundColor))
        this.refresh();
      else {
        var s = this._svgDom;
        s && (s.setAttribute("width", e), s.setAttribute("height", n));
        var l = this._bgVNode && this._bgVNode.elm;
        l && (l.setAttribute("width", e), l.setAttribute("height", n));
      }
    }
  }, t.prototype.getWidth = function() {
    return this._width;
  }, t.prototype.getHeight = function() {
    return this._height;
  }, t.prototype.dispose = function() {
    this.root && (this.root.innerHTML = ""), this._svgDom = this._viewport = this.storage = this._oldVNode = this._bgVNode = this._mainVNode = null;
  }, t.prototype.clear = function() {
    this._svgDom && (this._svgDom.innerHTML = null), this._oldVNode = null;
  }, t.prototype.toDataURL = function(e) {
    var n = this.renderToString(), r = "data:image/svg+xml;";
    return e ? (n = mGe(n), n && r + "base64," + n) : r + "charset=UTF-8," + encodeURIComponent(n);
  }, t;
}();
function cZ(t) {
  return function() {
    process.env.NODE_ENV !== "production" && qo('In SVG mode painter not support method "' + t + '"');
  };
}
function DJe(t, e, n, r) {
  var i;
  if (n && n !== "none")
    if (i = Yr("rect", "bg", {
      width: t,
      height: e,
      x: "0",
      y: "0"
    }), yse(n))
      tfe({ fill: n }, i.attrs, "fill", r);
    else if (w5(n))
      nfe({
        style: {
          fill: n
        },
        dirty: fr,
        getBoundingRect: function() {
          return { width: t, height: e };
        }
      }, i.attrs, "fill", r);
    else {
      var a = Zb(n), o = a.color, s = a.opacity;
      i.attrs.fill = o, s < 1 && (i.attrs["fill-opacity"] = s);
    }
  return i;
}
function RJe(t) {
  t.registerPainter("svg", IJe);
}
function fZ(t, e, n) {
  var r = Hs.createCanvas(), i = e.getWidth(), a = e.getHeight(), o = r.style;
  return o && (o.position = "absolute", o.left = "0", o.top = "0", o.width = i + "px", o.height = a + "px", r.setAttribute("data-zr-dom-id", t)), r.width = i * n, r.height = a * n, r;
}
var VM = function(t) {
  le(e, t);
  function e(n, r, i) {
    var a = t.call(this) || this;
    a.motionBlur = !1, a.lastFrameAlpha = 0.7, a.dpr = 1, a.virtual = !1, a.config = {}, a.incremental = !1, a.zlevel = 0, a.maxRepaintRectCount = 5, a.__dirty = !0, a.__firstTimePaint = !0, a.__used = !1, a.__drawIndex = 0, a.__startIndex = 0, a.__endIndex = 0, a.__prevStartIndex = null, a.__prevEndIndex = null;
    var o;
    i = i || $C, typeof n == "string" ? o = fZ(n, r, i) : nt(n) && (o = n, n = o.id), a.id = n, a.dom = o;
    var s = o.style;
    return s && (b5(o), o.onselectstart = function() {
      return !1;
    }, s.padding = "0", s.margin = "0", s.borderWidth = "0"), a.painter = r, a.dpr = i, a;
  }
  return e.prototype.getElementCount = function() {
    return this.__endIndex - this.__startIndex;
  }, e.prototype.afterBrush = function() {
    this.__prevStartIndex = this.__startIndex, this.__prevEndIndex = this.__endIndex;
  }, e.prototype.initContext = function() {
    this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr;
  }, e.prototype.setUnpainted = function() {
    this.__firstTimePaint = !0;
  }, e.prototype.createBackBuffer = function() {
    var n = this.dpr;
    this.domBack = fZ("back-" + this.id, this.painter, n), this.ctxBack = this.domBack.getContext("2d"), n !== 1 && this.ctxBack.scale(n, n);
  }, e.prototype.createRepaintRects = function(n, r, i, a) {
    if (this.__firstTimePaint)
      return this.__firstTimePaint = !1, null;
    var o = [], s = this.maxRepaintRectCount, l = !1, u = new bt(0, 0, 0, 0);
    function c(y) {
      if (!(!y.isFinite() || y.isZero()))
        if (o.length === 0) {
          var _ = new bt(0, 0, 0, 0);
          _.copy(y), o.push(_);
        } else {
          for (var O = !1, S = 1 / 0, x = 0, C = 0; C < o.length; ++C) {
            var P = o[C];
            if (P.intersect(y)) {
              var $ = new bt(0, 0, 0, 0);
              $.copy(P), $.union(y), o[C] = $, O = !0;
              break;
            } else if (l) {
              u.copy(y), u.union(P);
              var T = y.width * y.height, E = P.width * P.height, M = u.width * u.height, R = M - T - E;
              R < S && (S = R, x = C);
            }
          }
          if (l && (o[x].union(y), O = !0), !O) {
            var _ = new bt(0, 0, 0, 0);
            _.copy(y), o.push(_);
          }
          l || (l = o.length >= s);
        }
    }
    for (var f = this.__startIndex; f < this.__endIndex; ++f) {
      var d = n[f];
      if (d) {
        var h = d.shouldBePainted(i, a, !0, !0), p = d.__isRendered && (d.__dirty & to || !h) ? d.getPrevPaintRect() : null;
        p && c(p);
        var v = h && (d.__dirty & to || !d.__isRendered) ? d.getPaintRect() : null;
        v && c(v);
      }
    }
    for (var f = this.__prevStartIndex; f < this.__prevEndIndex; ++f) {
      var d = r[f], h = d && d.shouldBePainted(i, a, !0, !0);
      if (d && (!h || !d.__zr) && d.__isRendered) {
        var p = d.getPrevPaintRect();
        p && c(p);
      }
    }
    var g;
    do {
      g = !1;
      for (var f = 0; f < o.length; ) {
        if (o[f].isZero()) {
          o.splice(f, 1);
          continue;
        }
        for (var m = f + 1; m < o.length; )
          o[f].intersect(o[m]) ? (g = !0, o[f].union(o[m]), o.splice(m, 1)) : m++;
        f++;
      }
    } while (g);
    return this._paintRects = o, o;
  }, e.prototype.debugGetPaintRects = function() {
    return (this._paintRects || []).slice();
  }, e.prototype.resize = function(n, r) {
    var i = this.dpr, a = this.dom, o = a.style, s = this.domBack;
    o && (o.width = n + "px", o.height = r + "px"), a.width = n * i, a.height = r * i, s && (s.width = n * i, s.height = r * i, i !== 1 && this.ctxBack.scale(i, i));
  }, e.prototype.clear = function(n, r, i) {
    var a = this.dom, o = this.ctx, s = a.width, l = a.height;
    r = r || this.clearColor;
    var u = this.motionBlur && !n, c = this.lastFrameAlpha, f = this.dpr, d = this;
    u && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(a, 0, 0, s / f, l / f));
    var h = this.domBack;
    function p(v, g, m, y) {
      if (o.clearRect(v, g, m, y), r && r !== "transparent") {
        var _ = void 0;
        if (n1(r)) {
          var O = r.global || r.__width === m && r.__height === y;
          _ = O && r.__canvasGradient || jk(o, r, {
            x: 0,
            y: 0,
            width: m,
            height: y
          }), r.__canvasGradient = _, r.__width = m, r.__height = y;
        } else Xoe(r) && (r.scaleX = r.scaleX || f, r.scaleY = r.scaleY || f, _ = Zk(o, r, {
          dirty: function() {
            d.setUnpainted(), d.painter.refresh();
          }
        }));
        o.save(), o.fillStyle = _ || r, o.fillRect(v, g, m, y), o.restore();
      }
      u && (o.save(), o.globalAlpha = c, o.drawImage(h, v, g, m, y), o.restore());
    }
    !i || u ? p(0, 0, s, l) : i.length && F(i, function(v) {
      p(v.x * f, v.y * f, v.width * f, v.height * f);
    });
  }, e;
}(fs), dZ = 1e5, Ed = 314159, LS = 0.01, kJe = 1e-3;
function LJe(t) {
  return t ? t.__builtin__ ? !0 : !(typeof t.resize != "function" || typeof t.refresh != "function") : !1;
}
function NJe(t, e) {
  var n = document.createElement("div");
  return n.style.cssText = [
    "position:relative",
    "width:" + t + "px",
    "height:" + e + "px",
    "padding:0",
    "margin:0",
    "border-width:0"
  ].join(";") + ";", n;
}
var BJe = function() {
  function t(e, n, r, i) {
    this.type = "canvas", this._zlevelList = [], this._prevDisplayList = [], this._layers = {}, this._layerConfig = {}, this._needsManuallyCompositing = !1, this.type = "canvas";
    var a = !e.nodeName || e.nodeName.toUpperCase() === "CANVAS";
    this._opts = r = _e({}, r || {}), this.dpr = r.devicePixelRatio || $C, this._singleCanvas = a, this.root = e;
    var o = e.style;
    o && (b5(e), e.innerHTML = ""), this.storage = n;
    var s = this._zlevelList;
    this._prevDisplayList = [];
    var l = this._layers;
    if (a) {
      var c = e, f = c.width, d = c.height;
      r.width != null && (f = r.width), r.height != null && (d = r.height), this.dpr = r.devicePixelRatio || 1, c.width = f * this.dpr, c.height = d * this.dpr, this._width = f, this._height = d;
      var h = new VM(c, this, this.dpr);
      h.__builtin__ = !0, h.initContext(), l[Ed] = h, h.zlevel = Ed, s.push(Ed), this._domRoot = e;
    } else {
      this._width = Rv(e, 0, r), this._height = Rv(e, 1, r);
      var u = this._domRoot = NJe(this._width, this._height);
      e.appendChild(u);
    }
  }
  return t.prototype.getType = function() {
    return "canvas";
  }, t.prototype.isSingleCanvas = function() {
    return this._singleCanvas;
  }, t.prototype.getViewportRoot = function() {
    return this._domRoot;
  }, t.prototype.getViewportRootOffset = function() {
    var e = this.getViewportRoot();
    if (e)
      return {
        offsetLeft: e.offsetLeft || 0,
        offsetTop: e.offsetTop || 0
      };
  }, t.prototype.refresh = function(e) {
    var n = this.storage.getDisplayList(!0), r = this._prevDisplayList, i = this._zlevelList;
    this._redrawId = Math.random(), this._paintList(n, r, e, this._redrawId);
    for (var a = 0; a < i.length; a++) {
      var o = i[a], s = this._layers[o];
      if (!s.__builtin__ && s.refresh) {
        var l = a === 0 ? this._backgroundColor : null;
        s.refresh(l);
      }
    }
    return this._opts.useDirtyRect && (this._prevDisplayList = n.slice()), this;
  }, t.prototype.refreshHover = function() {
    this._paintHoverList(this.storage.getDisplayList(!1));
  }, t.prototype._paintHoverList = function(e) {
    var n = e.length, r = this._hoverlayer;
    if (r && r.clear(), !!n) {
      for (var i = {
        inHover: !0,
        viewWidth: this._width,
        viewHeight: this._height
      }, a, o = 0; o < n; o++) {
        var s = e[o];
        s.__inHover && (r || (r = this._hoverlayer = this.getLayer(dZ)), a || (a = r.ctx, a.save()), uh(a, s, i, o === n - 1));
      }
      a && a.restore();
    }
  }, t.prototype.getHoverLayer = function() {
    return this.getLayer(dZ);
  }, t.prototype.paintOne = function(e, n) {
    d3(e, n);
  }, t.prototype._paintList = function(e, n, r, i) {
    if (this._redrawId === i) {
      r = r || !1, this._updateLayerStatus(e);
      var a = this._doPaintList(e, n, r), o = a.finished, s = a.needsRefreshHover;
      if (this._needsManuallyCompositing && this._compositeManually(), s && this._paintHoverList(e), o)
        this.eachLayer(function(u) {
          u.afterBrush && u.afterBrush();
        });
      else {
        var l = this;
        SC(function() {
          l._paintList(e, n, r, i);
        });
      }
    }
  }, t.prototype._compositeManually = function() {
    var e = this.getLayer(Ed).ctx, n = this._domRoot.width, r = this._domRoot.height;
    e.clearRect(0, 0, n, r), this.eachBuiltinLayer(function(i) {
      i.virtual && e.drawImage(i.dom, 0, 0, n, r);
    });
  }, t.prototype._doPaintList = function(e, n, r) {
    for (var i = this, a = [], o = this._opts.useDirtyRect, s = 0; s < this._zlevelList.length; s++) {
      var l = this._zlevelList[s], u = this._layers[l];
      u.__builtin__ && u !== this._hoverlayer && (u.__dirty || r) && a.push(u);
    }
    for (var c = !0, f = !1, d = function(v) {
      var g = a[v], m = g.ctx, y = o && g.createRepaintRects(e, n, h._width, h._height), _ = r ? g.__startIndex : g.__drawIndex, O = !r && g.incremental && Date.now, S = O && Date.now(), x = g.zlevel === h._zlevelList[0] ? h._backgroundColor : null;
      if (g.__startIndex === g.__endIndex)
        g.clear(!1, x, y);
      else if (_ === g.__startIndex) {
        var C = e[_];
        (!C.incremental || !C.notClear || r) && g.clear(!1, x, y);
      }
      _ === -1 && (console.error("For some unknown reason. drawIndex is -1"), _ = g.__startIndex);
      var P, $ = function(R) {
        var N = {
          inHover: !1,
          allClipped: !1,
          prevEl: null,
          viewWidth: i._width,
          viewHeight: i._height
        };
        for (P = _; P < g.__endIndex; P++) {
          var I = e[P];
          if (I.__inHover && (f = !0), i._doPaintEl(I, g, o, R, N, P === g.__endIndex - 1), O) {
            var B = Date.now() - S;
            if (B > 15)
              break;
          }
        }
        N.prevElClipPaths && m.restore();
      };
      if (y)
        if (y.length === 0)
          P = g.__endIndex;
        else
          for (var T = h.dpr, E = 0; E < y.length; ++E) {
            var M = y[E];
            m.save(), m.beginPath(), m.rect(M.x * T, M.y * T, M.width * T, M.height * T), m.clip(), $(M), m.restore();
          }
      else
        m.save(), $(), m.restore();
      g.__drawIndex = P, g.__drawIndex < g.__endIndex && (c = !1);
    }, h = this, p = 0; p < a.length; p++)
      d(p);
    return Gt.wxa && F(this._layers, function(v) {
      v && v.ctx && v.ctx.draw && v.ctx.draw();
    }), {
      finished: c,
      needsRefreshHover: f
    };
  }, t.prototype._doPaintEl = function(e, n, r, i, a, o) {
    var s = n.ctx;
    if (r) {
      var l = e.getPaintRect();
      (!i || l && l.intersect(i)) && (uh(s, e, a, o), e.setPrevPaintRect(l));
    } else
      uh(s, e, a, o);
  }, t.prototype.getLayer = function(e, n) {
    this._singleCanvas && !this._needsManuallyCompositing && (e = Ed);
    var r = this._layers[e];
    return r || (r = new VM("zr_" + e, this, this.dpr), r.zlevel = e, r.__builtin__ = !0, this._layerConfig[e] ? mt(r, this._layerConfig[e], !0) : this._layerConfig[e - LS] && mt(r, this._layerConfig[e - LS], !0), n && (r.virtual = n), this.insertLayer(e, r), r.initContext()), r;
  }, t.prototype.insertLayer = function(e, n) {
    var r = this._layers, i = this._zlevelList, a = i.length, o = this._domRoot, s = null, l = -1;
    if (r[e]) {
      process.env.NODE_ENV !== "production" && qo("ZLevel " + e + " has been used already");
      return;
    }
    if (!LJe(n)) {
      process.env.NODE_ENV !== "production" && qo("Layer of zlevel " + e + " is not valid");
      return;
    }
    if (a > 0 && e > i[0]) {
      for (l = 0; l < a - 1 && !(i[l] < e && i[l + 1] > e); l++)
        ;
      s = r[i[l]];
    }
    if (i.splice(l + 1, 0, e), r[e] = n, !n.virtual)
      if (s) {
        var u = s.dom;
        u.nextSibling ? o.insertBefore(n.dom, u.nextSibling) : o.appendChild(n.dom);
      } else
        o.firstChild ? o.insertBefore(n.dom, o.firstChild) : o.appendChild(n.dom);
    n.painter || (n.painter = this);
  }, t.prototype.eachLayer = function(e, n) {
    for (var r = this._zlevelList, i = 0; i < r.length; i++) {
      var a = r[i];
      e.call(n, this._layers[a], a);
    }
  }, t.prototype.eachBuiltinLayer = function(e, n) {
    for (var r = this._zlevelList, i = 0; i < r.length; i++) {
      var a = r[i], o = this._layers[a];
      o.__builtin__ && e.call(n, o, a);
    }
  }, t.prototype.eachOtherLayer = function(e, n) {
    for (var r = this._zlevelList, i = 0; i < r.length; i++) {
      var a = r[i], o = this._layers[a];
      o.__builtin__ || e.call(n, o, a);
    }
  }, t.prototype.getLayers = function() {
    return this._layers;
  }, t.prototype._updateLayerStatus = function(e) {
    this.eachBuiltinLayer(function(f, d) {
      f.__dirty = f.__used = !1;
    });
    function n(f) {
      a && (a.__endIndex !== f && (a.__dirty = !0), a.__endIndex = f);
    }
    if (this._singleCanvas)
      for (var r = 1; r < e.length; r++) {
        var i = e[r];
        if (i.zlevel !== e[r - 1].zlevel || i.incremental) {
          this._needsManuallyCompositing = !0;
          break;
        }
      }
    var a = null, o = 0, s, l;
    for (l = 0; l < e.length; l++) {
      var i = e[l], u = i.zlevel, c = void 0;
      s !== u && (s = u, o = 0), i.incremental ? (c = this.getLayer(u + kJe, this._needsManuallyCompositing), c.incremental = !0, o = 1) : c = this.getLayer(u + (o > 0 ? LS : 0), this._needsManuallyCompositing), c.__builtin__ || qo("ZLevel " + u + " has been used by unkown layer " + c.id), c !== a && (c.__used = !0, c.__startIndex !== l && (c.__dirty = !0), c.__startIndex = l, c.incremental ? c.__drawIndex = -1 : c.__drawIndex = l, n(l), a = c), i.__dirty & to && !i.__inHover && (c.__dirty = !0, c.incremental && c.__drawIndex < 0 && (c.__drawIndex = l));
    }
    n(l), this.eachBuiltinLayer(function(f, d) {
      !f.__used && f.getElementCount() > 0 && (f.__dirty = !0, f.__startIndex = f.__endIndex = f.__drawIndex = 0), f.__dirty && f.__drawIndex < 0 && (f.__drawIndex = f.__startIndex);
    });
  }, t.prototype.clear = function() {
    return this.eachBuiltinLayer(this._clearLayer), this;
  }, t.prototype._clearLayer = function(e) {
    e.clear();
  }, t.prototype.setBackgroundColor = function(e) {
    this._backgroundColor = e, F(this._layers, function(n) {
      n.setUnpainted();
    });
  }, t.prototype.configLayer = function(e, n) {
    if (n) {
      var r = this._layerConfig;
      r[e] ? mt(r[e], n, !0) : r[e] = n;
      for (var i = 0; i < this._zlevelList.length; i++) {
        var a = this._zlevelList[i];
        if (a === e || a === e + LS) {
          var o = this._layers[a];
          mt(o, r[e], !0);
        }
      }
    }
  }, t.prototype.delLayer = function(e) {
    var n = this._layers, r = this._zlevelList, i = n[e];
    i && (i.dom.parentNode.removeChild(i.dom), delete n[e], r.splice(St(r, e), 1));
  }, t.prototype.resize = function(e, n) {
    if (this._domRoot.style) {
      var r = this._domRoot;
      r.style.display = "none";
      var i = this._opts, a = this.root;
      if (e != null && (i.width = e), n != null && (i.height = n), e = Rv(a, 0, i), n = Rv(a, 1, i), r.style.display = "", this._width !== e || n !== this._height) {
        r.style.width = e + "px", r.style.height = n + "px";
        for (var o in this._layers)
          this._layers.hasOwnProperty(o) && this._layers[o].resize(e, n);
        this.refresh(!0);
      }
      this._width = e, this._height = n;
    } else {
      if (e == null || n == null)
        return;
      this._width = e, this._height = n, this.getLayer(Ed).resize(e, n);
    }
    return this;
  }, t.prototype.clearLayer = function(e) {
    var n = this._layers[e];
    n && n.clear();
  }, t.prototype.dispose = function() {
    this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null;
  }, t.prototype.getRenderedCanvas = function(e) {
    if (e = e || {}, this._singleCanvas && !this._compositeManually)
      return this._layers[Ed].dom;
    var n = new VM("image", this, e.pixelRatio || this.dpr);
    n.initContext(), n.clear(!1, e.backgroundColor || this._backgroundColor);
    var r = n.ctx;
    if (e.pixelRatio <= this.dpr) {
      this.refresh();
      var i = n.dom.width, a = n.dom.height;
      this.eachLayer(function(f) {
        f.__builtin__ ? r.drawImage(f.dom, 0, 0, i, a) : f.renderToCanvas && (r.save(), f.renderToCanvas(r), r.restore());
      });
    } else
      for (var o = {
        inHover: !1,
        viewWidth: this._width,
        viewHeight: this._height
      }, s = this.storage.getDisplayList(!0), l = 0, u = s.length; l < u; l++) {
        var c = s[l];
        uh(r, c, o, l === u - 1);
      }
    return n.dom;
  }, t.prototype.getWidth = function() {
    return this._width;
  }, t.prototype.getHeight = function() {
    return this._height;
  }, t;
}();
function zJe(t) {
  t.registerPainter("canvas", BJe);
}
var VJe = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.hasSymbolVisual = !0, n;
    }
    return e.prototype.getInitialData = function(n) {
      if (process.env.NODE_ENV !== "production") {
        var r = n.coordinateSystem;
        if (r !== "polar" && r !== "cartesian2d")
          throw new Error("Line not support coordinateSystem besides cartesian and polar");
      }
      return Yl(null, this, {
        useEncodeDefaulter: !0
      });
    }, e.prototype.getLegendIcon = function(n) {
      var r = new ct(), i = Sr("line", 0, n.itemHeight / 2, n.itemWidth, 0, n.lineStyle.stroke, !1);
      r.add(i), i.setStyle(n.lineStyle);
      var a = this.getData().getVisual("symbol"), o = this.getData().getVisual("symbolRotate"), s = a === "none" ? "circle" : a, l = n.itemHeight * 0.8, u = Sr(s, (n.itemWidth - l) / 2, (n.itemHeight - l) / 2, l, l, n.itemStyle.fill);
      r.add(u), u.setStyle(n.itemStyle);
      var c = n.iconRotate === "inherit" ? o : n.iconRotate || 0;
      return u.rotation = c * Math.PI / 180, u.setOrigin([n.itemWidth / 2, n.itemHeight / 2]), s.indexOf("empty") > -1 && (u.style.stroke = u.style.fill, u.style.fill = "#fff", u.style.lineWidth = 2), r;
    }, e.type = "series.line", e.dependencies = ["grid", "polar"], e.defaultOption = {
      // zlevel: 0,
      z: 3,
      coordinateSystem: "cartesian2d",
      legendHoverLink: !0,
      clip: !0,
      label: {
        position: "top"
      },
      // itemStyle: {
      // },
      endLabel: {
        show: !1,
        valueAnimation: !0,
        distance: 8
      },
      lineStyle: {
        width: 2,
        type: "solid"
      },
      emphasis: {
        scale: !0
      },
      // areaStyle: {
      // origin of areaStyle. Valid values:
      // `'auto'/null/undefined`: from axisLine to data
      // `'start'`: from min to data
      // `'end'`: from data to max
      // origin: 'auto'
      // },
      // false, 'start', 'end', 'middle'
      step: !1,
      // Disabled if step is true
      smooth: !1,
      smoothMonotone: null,
      symbol: "emptyCircle",
      symbolSize: 4,
      symbolRotate: null,
      showSymbol: !0,
      // `false`: follow the label interval strategy.
      // `true`: show all symbols.
      // `'auto'`: If possible, show all symbols, otherwise
      //           follow the label interval strategy.
      showAllSymbol: "auto",
      // Whether to connect break point.
      connectNulls: !1,
      // Sampling for large data. Can be: 'average', 'max', 'min', 'sum', 'lttb'.
      sampling: "none",
      animationEasing: "linear",
      // Disable progressive
      progressive: 0,
      hoverLayerThreshold: 1 / 0,
      universalTransition: {
        divideShape: "clone"
      },
      triggerLineEvent: !1
    }, e;
  }(Cn)
);
function jg(t, e) {
  var n = t.mapDimensionsAll("defaultedLabel"), r = n.length;
  if (r === 1) {
    var i = Hg(t, e, n[0]);
    return i != null ? i + "" : null;
  } else if (r) {
    for (var a = [], o = 0; o < n.length; o++)
      a.push(Hg(t, e, n[o]));
    return a.join(" ");
  }
}
function ofe(t, e) {
  var n = t.mapDimensionsAll("defaultedLabel");
  if (!Se(e))
    return e + "";
  for (var r = [], i = 0; i < n.length; i++) {
    var a = t.getDimensionIndex(n[i]);
    a >= 0 && r.push(e[a]);
  }
  return r.join(" ");
}
var m1 = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i, a) {
      var o = t.call(this) || this;
      return o.updateData(n, r, i, a), o;
    }
    return e.prototype._createSymbol = function(n, r, i, a, o) {
      this.removeAll();
      var s = Sr(n, -1, -1, 2, 2, null, o);
      s.attr({
        z2: 100,
        culling: !0,
        scaleX: a[0] / 2,
        scaleY: a[1] / 2
      }), s.drift = FJe, this._symbolType = n, this.add(s);
    }, e.prototype.stopSymbolAnimation = function(n) {
      this.childAt(0).stopAnimation(null, n);
    }, e.prototype.getSymbolType = function() {
      return this._symbolType;
    }, e.prototype.getSymbolPath = function() {
      return this.childAt(0);
    }, e.prototype.highlight = function() {
      Fu(this.childAt(0));
    }, e.prototype.downplay = function() {
      Wu(this.childAt(0));
    }, e.prototype.setZ = function(n, r) {
      var i = this.childAt(0);
      i.zlevel = n, i.z = r;
    }, e.prototype.setDraggable = function(n, r) {
      var i = this.childAt(0);
      i.draggable = n, i.cursor = !r && n ? "move" : i.cursor;
    }, e.prototype.updateData = function(n, r, i, a) {
      this.silent = !1;
      var o = n.getItemVisual(r, "symbol") || "circle", s = n.hostModel, l = e.getSymbolSize(n, r), u = o !== this._symbolType, c = a && a.disableAnimation;
      if (u) {
        var f = n.getItemVisual(r, "symbolKeepAspect");
        this._createSymbol(o, n, r, l, f);
      } else {
        var d = this.childAt(0);
        d.silent = !1;
        var h = {
          scaleX: l[0] / 2,
          scaleY: l[1] / 2
        };
        c ? d.attr(h) : tn(d, h, s, r), Zs(d);
      }
      if (this._updateCommon(n, r, l, i, a), u) {
        var d = this.childAt(0);
        if (!c) {
          var h = {
            scaleX: this._sizeX,
            scaleY: this._sizeY,
            style: {
              // Always fadeIn. Because it has fadeOut animation when symbol is removed..
              opacity: d.style.opacity
            }
          };
          d.scaleX = d.scaleY = 0, d.style.opacity = 0, Vn(d, h, s, r);
        }
      }
      c && this.childAt(0).stopAnimation("leave");
    }, e.prototype._updateCommon = function(n, r, i, a, o) {
      var s = this.childAt(0), l = n.hostModel, u, c, f, d, h, p, v, g, m;
      if (a && (u = a.emphasisItemStyle, c = a.blurItemStyle, f = a.selectItemStyle, d = a.focus, h = a.blurScope, v = a.labelStatesModels, g = a.hoverScale, m = a.cursorStyle, p = a.emphasisDisabled), !a || n.hasItemOption) {
        var y = a && a.itemModel ? a.itemModel : n.getItemModel(r), _ = y.getModel("emphasis");
        u = _.getModel("itemStyle").getItemStyle(), f = y.getModel(["select", "itemStyle"]).getItemStyle(), c = y.getModel(["blur", "itemStyle"]).getItemStyle(), d = _.get("focus"), h = _.get("blurScope"), p = _.get("disabled"), v = ei(y), g = _.getShallow("scale"), m = y.getShallow("cursor");
      }
      var O = n.getItemVisual(r, "symbolRotate");
      s.attr("rotation", (O || 0) * Math.PI / 180 || 0);
      var S = mp(n.getItemVisual(r, "symbolOffset"), i);
      S && (s.x = S[0], s.y = S[1]), m && s.attr("cursor", m);
      var x = n.getItemVisual(r, "style"), C = x.fill;
      if (s instanceof ci) {
        var P = s.style;
        s.useStyle(_e({
          // TODO other properties like x, y ?
          image: P.image,
          x: P.x,
          y: P.y,
          width: P.width,
          height: P.height
        }, x));
      } else
        s.__isEmptyBrush ? s.useStyle(_e({}, x)) : s.useStyle(x), s.style.decal = null, s.setColor(C, o && o.symbolInnerColor), s.style.strokeNoScale = !0;
      var $ = n.getItemVisual(r, "liftZ"), T = this._z2;
      $ != null ? T == null && (this._z2 = s.z2, s.z2 += $) : T != null && (s.z2 = T, this._z2 = null);
      var E = o && o.useNameLabel;
      Ei(s, v, {
        labelFetcher: l,
        labelDataIndex: r,
        defaultText: M,
        inheritColor: C,
        defaultOpacity: x.opacity
      });
      function M(I) {
        return E ? n.getName(I) : jg(n, I);
      }
      this._sizeX = i[0] / 2, this._sizeY = i[1] / 2;
      var R = s.ensureState("emphasis");
      R.style = u, s.ensureState("select").style = f, s.ensureState("blur").style = c;
      var N = g == null || g === !0 ? Math.max(1.1, 3 / this._sizeY) : isFinite(g) && g > 0 ? +g : 1;
      R.scaleX = this._sizeX * N, R.scaleY = this._sizeY * N, this.setSymbolScale(1), ur(this, d, h, p);
    }, e.prototype.setSymbolScale = function(n) {
      this.scaleX = this.scaleY = n;
    }, e.prototype.fadeOut = function(n, r, i) {
      var a = this.childAt(0), o = ft(this).dataIndex, s = i && i.animation;
      if (this.silent = a.silent = !0, i && i.fadeLabel) {
        var l = a.getTextContent();
        l && _f(l, {
          style: {
            opacity: 0
          }
        }, r, {
          dataIndex: o,
          removeOpt: s,
          cb: function() {
            a.removeTextContent();
          }
        });
      } else
        a.removeTextContent();
      _f(a, {
        style: {
          opacity: 0
        },
        scaleX: 0,
        scaleY: 0
      }, r, {
        dataIndex: o,
        cb: n,
        removeOpt: s
      });
    }, e.getSymbolSize = function(n, r) {
      return Em(n.getItemVisual(r, "symbolSize"));
    }, e;
  }(ct)
);
function FJe(t, e) {
  this.parent.drift(t, e);
}
function FM(t, e, n, r) {
  return e && !isNaN(e[0]) && !isNaN(e[1]) && !(r.isIgnore && r.isIgnore(n)) && !(r.clipShape && !r.clipShape.contain(e[0], e[1])) && t.getItemVisual(n, "symbol") !== "none";
}
function hZ(t) {
  return t != null && !nt(t) && (t = {
    isIgnore: t
  }), t || {};
}
function pZ(t) {
  var e = t.hostModel, n = e.getModel("emphasis");
  return {
    emphasisItemStyle: n.getModel("itemStyle").getItemStyle(),
    blurItemStyle: e.getModel(["blur", "itemStyle"]).getItemStyle(),
    selectItemStyle: e.getModel(["select", "itemStyle"]).getItemStyle(),
    focus: n.get("focus"),
    blurScope: n.get("blurScope"),
    emphasisDisabled: n.get("disabled"),
    hoverScale: n.get("scale"),
    labelStatesModels: ei(e),
    cursorStyle: e.get("cursor")
  };
}
var y1 = (
  /** @class */
  function() {
    function t(e) {
      this.group = new ct(), this._SymbolCtor = e || m1;
    }
    return t.prototype.updateData = function(e, n) {
      this._progressiveEls = null, n = hZ(n);
      var r = this.group, i = e.hostModel, a = this._data, o = this._SymbolCtor, s = n.disableAnimation, l = pZ(e), u = {
        disableAnimation: s
      }, c = n.getSymbolPoint || function(f) {
        return e.getItemLayout(f);
      };
      a || r.removeAll(), e.diff(a).add(function(f) {
        var d = c(f);
        if (FM(e, d, f, n)) {
          var h = new o(e, f, l, u);
          h.setPosition(d), e.setItemGraphicEl(f, h), r.add(h);
        }
      }).update(function(f, d) {
        var h = a.getItemGraphicEl(d), p = c(f);
        if (!FM(e, p, f, n)) {
          r.remove(h);
          return;
        }
        var v = e.getItemVisual(f, "symbol") || "circle", g = h && h.getSymbolType && h.getSymbolType();
        if (!h || g && g !== v)
          r.remove(h), h = new o(e, f, l, u), h.setPosition(p);
        else {
          h.updateData(e, f, l, u);
          var m = {
            x: p[0],
            y: p[1]
          };
          s ? h.attr(m) : tn(h, m, i);
        }
        r.add(h), e.setItemGraphicEl(f, h);
      }).remove(function(f) {
        var d = a.getItemGraphicEl(f);
        d && d.fadeOut(function() {
          r.remove(d);
        }, i);
      }).execute(), this._getSymbolPoint = c, this._data = e;
    }, t.prototype.updateLayout = function() {
      var e = this, n = this._data;
      n && n.eachItemGraphicEl(function(r, i) {
        var a = e._getSymbolPoint(i);
        r.setPosition(a), r.markRedraw();
      });
    }, t.prototype.incrementalPrepareUpdate = function(e) {
      this._seriesScope = pZ(e), this._data = null, this.group.removeAll();
    }, t.prototype.incrementalUpdate = function(e, n, r) {
      this._progressiveEls = [], r = hZ(r);
      function i(l) {
        l.isGroup || (l.incremental = !0, l.ensureState("emphasis").hoverLayer = !0);
      }
      for (var a = e.start; a < e.end; a++) {
        var o = n.getItemLayout(a);
        if (FM(n, o, a, r)) {
          var s = new this._SymbolCtor(n, a, this._seriesScope);
          s.traverse(i), s.setPosition(o), this.group.add(s), n.setItemGraphicEl(a, s), this._progressiveEls.push(s);
        }
      }
    }, t.prototype.eachRendered = function(e) {
      Nf(this._progressiveEls || this.group, e);
    }, t.prototype.remove = function(e) {
      var n = this.group, r = this._data;
      r && e ? r.eachItemGraphicEl(function(i) {
        i.fadeOut(function() {
          n.remove(i);
        }, r.hostModel);
      }) : n.removeAll();
    }, t;
  }()
);
function sfe(t, e, n) {
  var r = t.getBaseAxis(), i = t.getOtherAxis(r), a = WJe(i, n), o = r.dim, s = i.dim, l = e.mapDimension(s), u = e.mapDimension(o), c = s === "x" || s === "radius" ? 1 : 0, f = Ce(t.dimensions, function(p) {
    return e.mapDimension(p);
  }), d = !1, h = e.getCalculationInfo("stackResultDimension");
  return Hu(
    e,
    f[0]
    /* , dims[1] */
  ) && (d = !0, f[0] = h), Hu(
    e,
    f[1]
    /* , dims[0] */
  ) && (d = !0, f[1] = h), {
    dataDimsForPoint: f,
    valueStart: a,
    valueAxisDim: s,
    baseAxisDim: o,
    stacked: !!d,
    valueDim: l,
    baseDim: u,
    baseDataOffset: c,
    stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
  };
}
function WJe(t, e) {
  var n = 0, r = t.scale.getExtent();
  return e === "start" ? n = r[0] : e === "end" ? n = r[1] : Kt(e) && !isNaN(e) ? n = e : r[0] > 0 ? n = r[0] : r[1] < 0 && (n = r[1]), n;
}
function lfe(t, e, n, r) {
  var i = NaN;
  t.stacked && (i = n.get(n.getCalculationInfo("stackedOverDimension"), r)), isNaN(i) && (i = t.valueStart);
  var a = t.baseDataOffset, o = [];
  return o[a] = n.get(t.baseDim, r), o[1 - a] = i, e.dataToPoint(o);
}
function QJe(t, e) {
  var n = [];
  return e.diff(t).add(function(r) {
    n.push({
      cmd: "+",
      idx: r
    });
  }).update(function(r, i) {
    n.push({
      cmd: "=",
      idx: i,
      idx1: r
    });
  }).remove(function(r) {
    n.push({
      cmd: "-",
      idx: r
    });
  }).execute(), n;
}
function HJe(t, e, n, r, i, a, o, s) {
  for (var l = QJe(t, e), u = [], c = [], f = [], d = [], h = [], p = [], v = [], g = sfe(i, e, o), m = t.getLayout("points") || [], y = e.getLayout("points") || [], _ = 0; _ < l.length; _++) {
    var O = l[_], S = !0, x = void 0, C = void 0;
    switch (O.cmd) {
      case "=":
        x = O.idx * 2, C = O.idx1 * 2;
        var P = m[x], $ = m[x + 1], T = y[C], E = y[C + 1];
        (isNaN(P) || isNaN($)) && (P = T, $ = E), u.push(P, $), c.push(T, E), f.push(n[x], n[x + 1]), d.push(r[C], r[C + 1]), v.push(e.getRawIndex(O.idx1));
        break;
      case "+":
        var M = O.idx, R = g.dataDimsForPoint, N = i.dataToPoint([e.get(R[0], M), e.get(R[1], M)]);
        C = M * 2, u.push(N[0], N[1]), c.push(y[C], y[C + 1]);
        var I = lfe(g, i, e, M);
        f.push(I[0], I[1]), d.push(r[C], r[C + 1]), v.push(e.getRawIndex(M));
        break;
      case "-":
        S = !1;
    }
    S && (h.push(O), p.push(p.length));
  }
  p.sort(function(ue, ye) {
    return v[ue] - v[ye];
  });
  for (var B = u.length, Q = Al(B), W = Al(B), H = Al(B), U = Al(B), j = [], _ = 0; _ < p.length; _++) {
    var Y = p[_], ne = _ * 2, fe = Y * 2;
    Q[ne] = u[fe], Q[ne + 1] = u[fe + 1], W[ne] = c[fe], W[ne + 1] = c[fe + 1], H[ne] = f[fe], H[ne + 1] = f[fe + 1], U[ne] = d[fe], U[ne + 1] = d[fe + 1], j[_] = h[Y];
  }
  return {
    current: Q,
    next: W,
    stackedOnCurrent: H,
    stackedOnNext: U,
    status: j
  };
}
var wc = Math.min, Cc = Math.max;
function $h(t, e) {
  return isNaN(t) || isNaN(e);
}
function iL(t, e, n, r, i, a, o, s, l) {
  for (var u, c, f, d, h, p, v = n, g = 0; g < r; g++) {
    var m = e[v * 2], y = e[v * 2 + 1];
    if (v >= i || v < 0)
      break;
    if ($h(m, y)) {
      if (l) {
        v += a;
        continue;
      }
      break;
    }
    if (v === n)
      t[a > 0 ? "moveTo" : "lineTo"](m, y), f = m, d = y;
    else {
      var _ = m - u, O = y - c;
      if (_ * _ + O * O < 0.5) {
        v += a;
        continue;
      }
      if (o > 0) {
        for (var S = v + a, x = e[S * 2], C = e[S * 2 + 1]; x === m && C === y && g < r; )
          g++, S += a, v += a, x = e[S * 2], C = e[S * 2 + 1], m = e[v * 2], y = e[v * 2 + 1], _ = m - u, O = y - c;
        var P = g + 1;
        if (l)
          for (; $h(x, C) && P < r; )
            P++, S += a, x = e[S * 2], C = e[S * 2 + 1];
        var $ = 0.5, T = 0, E = 0, M = void 0, R = void 0;
        if (P >= r || $h(x, C))
          h = m, p = y;
        else {
          T = x - u, E = C - c;
          var N = m - u, I = x - m, B = y - c, Q = C - y, W = void 0, H = void 0;
          if (s === "x") {
            W = Math.abs(N), H = Math.abs(I);
            var U = T > 0 ? 1 : -1;
            h = m - U * W * o, p = y, M = m + U * H * o, R = y;
          } else if (s === "y") {
            W = Math.abs(B), H = Math.abs(Q);
            var j = E > 0 ? 1 : -1;
            h = m, p = y - j * W * o, M = m, R = y + j * H * o;
          } else
            W = Math.sqrt(N * N + B * B), H = Math.sqrt(I * I + Q * Q), $ = H / (H + W), h = m - T * o * (1 - $), p = y - E * o * (1 - $), M = m + T * o * $, R = y + E * o * $, M = wc(M, Cc(x, m)), R = wc(R, Cc(C, y)), M = Cc(M, wc(x, m)), R = Cc(R, wc(C, y)), T = M - m, E = R - y, h = m - T * W / H, p = y - E * W / H, h = wc(h, Cc(u, m)), p = wc(p, Cc(c, y)), h = Cc(h, wc(u, m)), p = Cc(p, wc(c, y)), T = m - h, E = y - p, M = m + T * H / W, R = y + E * H / W;
        }
        t.bezierCurveTo(f, d, h, p, m, y), f = M, d = R;
      } else
        t.lineTo(m, y);
    }
    u = m, c = y, v += a;
  }
  return g;
}
var ufe = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
      this.smooth = 0, this.smoothConstraint = !0;
    }
    return t;
  }()
), GJe = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "ec-polyline", r;
    }
    return e.prototype.getDefaultStyle = function() {
      return {
        stroke: "#000",
        fill: null
      };
    }, e.prototype.getDefaultShape = function() {
      return new ufe();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.points, a = 0, o = i.length / 2;
      if (r.connectNulls) {
        for (; o > 0 && $h(i[o * 2 - 2], i[o * 2 - 1]); o--)
          ;
        for (; a < o && $h(i[a * 2], i[a * 2 + 1]); a++)
          ;
      }
      for (; a < o; )
        a += iL(n, i, a, o, o, 1, r.smooth, r.smoothMonotone, r.connectNulls) + 1;
    }, e.prototype.getPointOn = function(n, r) {
      this.path || (this.createPathProxy(), this.buildPath(this.path, this.shape));
      for (var i = this.path, a = i.data, o = jl.CMD, s, l, u = r === "x", c = [], f = 0; f < a.length; ) {
        var d = a[f++], h = void 0, p = void 0, v = void 0, g = void 0, m = void 0, y = void 0, _ = void 0;
        switch (d) {
          case o.M:
            s = a[f++], l = a[f++];
            break;
          case o.L:
            if (h = a[f++], p = a[f++], _ = u ? (n - s) / (h - s) : (n - l) / (p - l), _ <= 1 && _ >= 0) {
              var O = u ? (p - l) * _ + l : (h - s) * _ + s;
              return u ? [n, O] : [O, n];
            }
            s = h, l = p;
            break;
          case o.C:
            h = a[f++], p = a[f++], v = a[f++], g = a[f++], m = a[f++], y = a[f++];
            var S = u ? wC(s, h, v, m, n, c) : wC(l, p, g, y, n, c);
            if (S > 0)
              for (var x = 0; x < S; x++) {
                var C = c[x];
                if (C <= 1 && C >= 0) {
                  var O = u ? jr(l, p, g, y, C) : jr(s, h, v, m, C);
                  return u ? [n, O] : [O, n];
                }
              }
            s = m, l = y;
            break;
        }
      }
    }, e;
  }(Dt)
), jJe = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e;
  }(ufe)
), cfe = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "ec-polygon", r;
    }
    return e.prototype.getDefaultShape = function() {
      return new jJe();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.points, a = r.stackedOnPoints, o = 0, s = i.length / 2, l = r.smoothMonotone;
      if (r.connectNulls) {
        for (; s > 0 && $h(i[s * 2 - 2], i[s * 2 - 1]); s--)
          ;
        for (; o < s && $h(i[o * 2], i[o * 2 + 1]); o++)
          ;
      }
      for (; o < s; ) {
        var u = iL(n, i, o, s, s, 1, r.smooth, l, r.connectNulls);
        iL(n, a, o + u - 1, u, s, -1, r.stackedOnSmooth, l, r.connectNulls), o += u + 1, n.closePath();
      }
    }, e;
  }(Dt)
);
function ffe(t, e, n, r, i) {
  var a = t.getArea(), o = a.x, s = a.y, l = a.width, u = a.height, c = n.get(["lineStyle", "width"]) || 2;
  o -= c / 2, s -= c / 2, l += c, u += c, l = Math.ceil(l), o !== Math.floor(o) && (o = Math.floor(o), l++);
  var f = new Zt({
    shape: {
      x: o,
      y: s,
      width: l,
      height: u
    }
  });
  if (e) {
    var d = t.getBaseAxis(), h = d.isHorizontal(), p = d.inverse;
    h ? (p && (f.shape.x += l), f.shape.width = 0) : (p || (f.shape.y += u), f.shape.height = 0);
    var v = qe(i) ? function(g) {
      i(g, f);
    } : null;
    Vn(f, {
      shape: {
        width: l,
        height: u,
        x: o,
        y: s
      }
    }, n, null, r, v);
  }
  return f;
}
function dfe(t, e, n) {
  var r = t.getArea(), i = sr(r.r0, 1), a = sr(r.r, 1), o = new ha({
    shape: {
      cx: sr(t.cx, 1),
      cy: sr(t.cy, 1),
      r0: i,
      r: a,
      startAngle: r.startAngle,
      endAngle: r.endAngle,
      clockwise: r.clockwise
    }
  });
  if (e) {
    var s = t.getBaseAxis().dim === "angle";
    s ? o.shape.endAngle = r.startAngle : o.shape.r = i, Vn(o, {
      shape: {
        endAngle: r.endAngle,
        r: a
      }
    }, n);
  }
  return o;
}
function b1(t, e, n, r, i) {
  if (t) {
    if (t.type === "polar")
      return dfe(t, e, n);
    if (t.type === "cartesian2d")
      return ffe(t, e, n, r, i);
  } else return null;
  return null;
}
function yp(t, e) {
  return t.type === e;
}
function vZ(t, e) {
  if (t.length === e.length) {
    for (var n = 0; n < t.length; n++)
      if (t[n] !== e[n])
        return;
    return !0;
  }
}
function gZ(t) {
  for (var e = 1 / 0, n = 1 / 0, r = -1 / 0, i = -1 / 0, a = 0; a < t.length; ) {
    var o = t[a++], s = t[a++];
    isNaN(o) || (e = Math.min(o, e), r = Math.max(o, r)), isNaN(s) || (n = Math.min(s, n), i = Math.max(s, i));
  }
  return [[e, n], [r, i]];
}
function mZ(t, e) {
  var n = gZ(t), r = n[0], i = n[1], a = gZ(e), o = a[0], s = a[1];
  return Math.max(Math.abs(r[0] - o[0]), Math.abs(r[1] - o[1]), Math.abs(i[0] - s[0]), Math.abs(i[1] - s[1]));
}
function yZ(t) {
  return Kt(t) ? t : t ? 0.5 : 0;
}
function ZJe(t, e, n) {
  if (!n.valueDim)
    return [];
  for (var r = e.count(), i = Al(r * 2), a = 0; a < r; a++) {
    var o = lfe(n, t, e, a);
    i[a * 2] = o[0], i[a * 2 + 1] = o[1];
  }
  return i;
}
function Tc(t, e, n, r) {
  var i = e.getBaseAxis(), a = i.dim === "x" || i.dim === "radius" ? 0 : 1, o = [], s = 0, l = [], u = [], c = [], f = [];
  if (r) {
    for (s = 0; s < t.length; s += 2)
      !isNaN(t[s]) && !isNaN(t[s + 1]) && f.push(t[s], t[s + 1]);
    t = f;
  }
  for (s = 0; s < t.length - 2; s += 2)
    switch (c[0] = t[s + 2], c[1] = t[s + 3], u[0] = t[s], u[1] = t[s + 1], o.push(u[0], u[1]), n) {
      case "end":
        l[a] = c[a], l[1 - a] = u[1 - a], o.push(l[0], l[1]);
        break;
      case "middle":
        var d = (u[a] + c[a]) / 2, h = [];
        l[a] = h[a] = d, l[1 - a] = u[1 - a], h[1 - a] = c[1 - a], o.push(l[0], l[1]), o.push(h[0], h[1]);
        break;
      default:
        l[a] = u[a], l[1 - a] = c[1 - a], o.push(l[0], l[1]);
    }
  return o.push(t[s++], t[s++]), o;
}
function UJe(t, e) {
  var n = [], r = t.length, i, a;
  function o(c, f, d) {
    var h = c.coord, p = (d - h) / (f.coord - h), v = x5(p, [c.color, f.color]);
    return {
      coord: d,
      color: v
    };
  }
  for (var s = 0; s < r; s++) {
    var l = t[s], u = l.coord;
    if (u < 0)
      i = l;
    else if (u > e) {
      a ? n.push(o(a, l, e)) : i && n.push(o(i, l, 0), o(i, l, e));
      break;
    } else
      i && (n.push(o(i, l, 0)), i = null), n.push(l), a = l;
  }
  return n;
}
function XJe(t, e, n) {
  var r = t.getVisual("visualMeta");
  if (!(!r || !r.length || !t.count())) {
    if (e.type !== "cartesian2d") {
      process.env.NODE_ENV !== "production" && console.warn("Visual map on line style is only supported on cartesian2d.");
      return;
    }
    for (var i, a, o = r.length - 1; o >= 0; o--) {
      var s = t.getDimensionInfo(r[o].dimension);
      if (i = s && s.coordDim, i === "x" || i === "y") {
        a = r[o];
        break;
      }
    }
    if (!a) {
      process.env.NODE_ENV !== "production" && console.warn("Visual map on line style only support x or y dimension.");
      return;
    }
    var l = e.getAxis(i), u = Ce(a.stops, function(_) {
      return {
        coord: l.toGlobalCoord(l.dataToCoord(_.value)),
        color: _.color
      };
    }), c = u.length, f = a.outerColors.slice();
    c && u[0].coord > u[c - 1].coord && (u.reverse(), f.reverse());
    var d = UJe(u, i === "x" ? n.getWidth() : n.getHeight()), h = d.length;
    if (!h && c)
      return u[0].coord < 0 ? f[1] ? f[1] : u[c - 1].color : f[0] ? f[0] : u[0].color;
    var p = 10, v = d[0].coord - p, g = d[h - 1].coord + p, m = g - v;
    if (m < 1e-3)
      return "transparent";
    F(d, function(_) {
      _.offset = (_.coord - v) / m;
    }), d.push({
      // NOTE: inRangeStopLen may still be 0 if stoplen is zero.
      offset: h ? d[h - 1].offset : 0.5,
      color: f[1] || "transparent"
    }), d.unshift({
      offset: h ? d[0].offset : 0.5,
      color: f[0] || "transparent"
    });
    var y = new _m(0, 0, 0, 0, d, !0);
    return y[i] = v, y[i + "2"] = g, y;
  }
}
function YJe(t, e, n) {
  var r = t.get("showAllSymbol"), i = r === "auto";
  if (!(r && !i)) {
    var a = n.getAxesByScale("ordinal")[0];
    if (a && !(i && qJe(a, e))) {
      var o = e.mapDimension(a.dim), s = {};
      return F(a.getViewLabels(), function(l) {
        var u = a.scale.getRawOrdinalNumber(l.tickValue);
        s[u] = 1;
      }), function(l) {
        return !s.hasOwnProperty(e.get(o, l));
      };
    }
  }
}
function qJe(t, e) {
  var n = t.getExtent(), r = Math.abs(n[1] - n[0]) / t.scale.count();
  isNaN(r) && (r = 0);
  for (var i = e.count(), a = Math.max(1, Math.round(i / 5)), o = 0; o < i; o += a)
    if (m1.getSymbolSize(
      e,
      o
      // Only for cartesian, where `isHorizontal` exists.
    )[t.isHorizontal() ? 1 : 0] * 1.5 > r)
      return !1;
  return !0;
}
function KJe(t, e) {
  return isNaN(t) || isNaN(e);
}
function JJe(t) {
  for (var e = t.length / 2; e > 0 && KJe(t[e * 2 - 2], t[e * 2 - 1]); e--)
    ;
  return e - 1;
}
function bZ(t, e) {
  return [t[e * 2], t[e * 2 + 1]];
}
function eet(t, e, n) {
  for (var r = t.length / 2, i = n === "x" ? 0 : 1, a, o, s = 0, l = -1, u = 0; u < r; u++)
    if (o = t[u * 2 + i], !(isNaN(o) || isNaN(t[u * 2 + 1 - i]))) {
      if (u === 0) {
        a = o;
        continue;
      }
      if (a <= e && o >= e || a >= e && o <= e) {
        l = u;
        break;
      }
      s = u, a = o;
    }
  return {
    range: [s, l],
    t: (e - a) / (o - a)
  };
}
function hfe(t) {
  if (t.get(["endLabel", "show"]))
    return !0;
  for (var e = 0; e < da.length; e++)
    if (t.get([da[e], "endLabel", "show"]))
      return !0;
  return !1;
}
function WM(t, e, n, r) {
  if (yp(e, "cartesian2d")) {
    var i = r.getModel("endLabel"), a = i.get("valueAnimation"), o = r.getData(), s = {
      lastFrameIndex: 0
    }, l = hfe(r) ? function(h, p) {
      t._endLabelOnDuring(h, p, o, s, a, i, e);
    } : null, u = e.getBaseAxis().isHorizontal(), c = ffe(e, n, r, function() {
      var h = t._endLabel;
      h && n && s.originalX != null && h.attr({
        x: s.originalX,
        y: s.originalY
      });
    }, l);
    if (!r.get("clip", !0)) {
      var f = c.shape, d = Math.max(f.width, f.height);
      u ? (f.y -= d, f.height += d * 2) : (f.x -= d, f.width += d * 2);
    }
    return l && l(1, c), c;
  } else
    return process.env.NODE_ENV !== "production" && r.get(["endLabel", "show"]) && console.warn("endLabel is not supported for lines in polar systems."), dfe(e, n, r);
}
function tet(t, e) {
  var n = e.getBaseAxis(), r = n.isHorizontal(), i = n.inverse, a = r ? i ? "right" : "left" : "center", o = r ? "middle" : i ? "top" : "bottom";
  return {
    normal: {
      align: t.get("align") || a,
      verticalAlign: t.get("verticalAlign") || o
    }
  };
}
var net = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.init = function() {
      var n = new ct(), r = new y1();
      this.group.add(r.group), this._symbolDraw = r, this._lineGroup = n;
    }, e.prototype.render = function(n, r, i) {
      var a = this, o = n.coordinateSystem, s = this.group, l = n.getData(), u = n.getModel("lineStyle"), c = n.getModel("areaStyle"), f = l.getLayout("points") || [], d = o.type === "polar", h = this._coordSys, p = this._symbolDraw, v = this._polyline, g = this._polygon, m = this._lineGroup, y = !r.ssr && n.get("animation"), _ = !c.isEmpty(), O = c.get("origin"), S = sfe(o, l, O), x = _ && ZJe(o, l, S), C = n.get("showSymbol"), P = n.get("connectNulls"), $ = C && !d && YJe(n, l, o), T = this._data;
      T && T.eachItemGraphicEl(function(ye, se) {
        ye.__temp && (s.remove(ye), T.setItemGraphicEl(se, null));
      }), C || p.remove(), s.add(m);
      var E = d ? !1 : n.get("step"), M;
      o && o.getArea && n.get("clip", !0) && (M = o.getArea(), M.width != null ? (M.x -= 0.1, M.y -= 0.1, M.width += 0.2, M.height += 0.2) : M.r0 && (M.r0 -= 0.5, M.r += 0.5)), this._clipShapeForSymbol = M;
      var R = XJe(l, o, i) || l.getVisual("style")[l.getVisual("drawType")];
      if (!(v && h.type === o.type && E === this._step))
        C && p.updateData(l, {
          isIgnore: $,
          clipShape: M,
          disableAnimation: !0,
          getSymbolPoint: function(ye) {
            return [f[ye * 2], f[ye * 2 + 1]];
          }
        }), y && this._initSymbolLabelAnimation(l, o, M), E && (f = Tc(f, o, E, P), x && (x = Tc(x, o, E, P))), v = this._newPolyline(f), _ ? g = this._newPolygon(f, x) : g && (m.remove(g), g = this._polygon = null), d || this._initOrUpdateEndLabel(n, o, Uh(R)), m.setClipPath(WM(this, o, !0, n));
      else {
        _ && !g ? g = this._newPolygon(f, x) : g && !_ && (m.remove(g), g = this._polygon = null), d || this._initOrUpdateEndLabel(n, o, Uh(R));
        var N = m.getClipPath();
        if (N) {
          var I = WM(this, o, !1, n);
          Vn(N, {
            shape: I.shape
          }, n);
        } else
          m.setClipPath(WM(this, o, !0, n));
        C && p.updateData(l, {
          isIgnore: $,
          clipShape: M,
          disableAnimation: !0,
          getSymbolPoint: function(ye) {
            return [f[ye * 2], f[ye * 2 + 1]];
          }
        }), (!vZ(this._stackedOnPoints, x) || !vZ(this._points, f)) && (y ? this._doUpdateAnimation(l, x, o, i, E, O, P) : (E && (f = Tc(f, o, E, P), x && (x = Tc(x, o, E, P))), v.setShape({
          points: f
        }), g && g.setShape({
          points: f,
          stackedOnPoints: x
        })));
      }
      var B = n.getModel("emphasis"), Q = B.get("focus"), W = B.get("blurScope"), H = B.get("disabled");
      if (v.useStyle(it(
        // Use color in lineStyle first
        u.getLineStyle(),
        {
          fill: "none",
          stroke: R,
          lineJoin: "bevel"
        }
      )), Ai(v, n, "lineStyle"), v.style.lineWidth > 0 && n.get(["emphasis", "lineStyle", "width"]) === "bolder") {
        var U = v.getState("emphasis").style;
        U.lineWidth = +v.style.lineWidth + 1;
      }
      ft(v).seriesIndex = n.seriesIndex, ur(v, Q, W, H);
      var j = yZ(n.get("smooth")), Y = n.get("smoothMonotone");
      if (v.setShape({
        smooth: j,
        smoothMonotone: Y,
        connectNulls: P
      }), g) {
        var ne = l.getCalculationInfo("stackedOnSeries"), fe = 0;
        g.useStyle(it(c.getAreaStyle(), {
          fill: R,
          opacity: 0.7,
          lineJoin: "bevel",
          decal: l.getVisual("style").decal
        })), ne && (fe = yZ(ne.get("smooth"))), g.setShape({
          smooth: j,
          stackedOnSmooth: fe,
          smoothMonotone: Y,
          connectNulls: P
        }), Ai(g, n, "areaStyle"), ft(g).seriesIndex = n.seriesIndex, ur(g, Q, W, H);
      }
      var ue = function(ye) {
        a._changePolyState(ye);
      };
      l.eachItemGraphicEl(function(ye) {
        ye && (ye.onHoverStateChange = ue);
      }), this._polyline.onHoverStateChange = ue, this._data = l, this._coordSys = o, this._stackedOnPoints = x, this._points = f, this._step = E, this._valueOrigin = O, n.get("triggerLineEvent") && (this.packEventData(n, v), g && this.packEventData(n, g));
    }, e.prototype.packEventData = function(n, r) {
      ft(r).eventData = {
        componentType: "series",
        componentSubType: "line",
        componentIndex: n.componentIndex,
        seriesIndex: n.seriesIndex,
        seriesName: n.name,
        seriesType: "line"
      };
    }, e.prototype.highlight = function(n, r, i, a) {
      var o = n.getData(), s = Gh(o, a);
      if (this._changePolyState("emphasis"), !(s instanceof Array) && s != null && s >= 0) {
        var l = o.getLayout("points"), u = o.getItemGraphicEl(s);
        if (!u) {
          var c = l[s * 2], f = l[s * 2 + 1];
          if (isNaN(c) || isNaN(f) || this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(c, f))
            return;
          var d = n.get("zlevel") || 0, h = n.get("z") || 0;
          u = new m1(o, s), u.x = c, u.y = f, u.setZ(d, h);
          var p = u.getSymbolPath().getTextContent();
          p && (p.zlevel = d, p.z = h, p.z2 = this._polyline.z2 + 1), u.__temp = !0, o.setItemGraphicEl(s, u), u.stopSymbolAnimation(!0), this.group.add(u);
        }
        u.highlight();
      } else
        _n.prototype.highlight.call(this, n, r, i, a);
    }, e.prototype.downplay = function(n, r, i, a) {
      var o = n.getData(), s = Gh(o, a);
      if (this._changePolyState("normal"), s != null && s >= 0) {
        var l = o.getItemGraphicEl(s);
        l && (l.__temp ? (o.setItemGraphicEl(s, null), this.group.remove(l)) : l.downplay());
      } else
        _n.prototype.downplay.call(this, n, r, i, a);
    }, e.prototype._changePolyState = function(n) {
      var r = this._polygon;
      IC(this._polyline, n), r && IC(r, n);
    }, e.prototype._newPolyline = function(n) {
      var r = this._polyline;
      return r && this._lineGroup.remove(r), r = new GJe({
        shape: {
          points: n
        },
        segmentIgnoreThreshold: 2,
        z2: 10
      }), this._lineGroup.add(r), this._polyline = r, r;
    }, e.prototype._newPolygon = function(n, r) {
      var i = this._polygon;
      return i && this._lineGroup.remove(i), i = new cfe({
        shape: {
          points: n,
          stackedOnPoints: r
        },
        segmentIgnoreThreshold: 2
      }), this._lineGroup.add(i), this._polygon = i, i;
    }, e.prototype._initSymbolLabelAnimation = function(n, r, i) {
      var a, o, s = r.getBaseAxis(), l = s.inverse;
      r.type === "cartesian2d" ? (a = s.isHorizontal(), o = !1) : r.type === "polar" && (a = s.dim === "angle", o = !0);
      var u = n.hostModel, c = u.get("animationDuration");
      qe(c) && (c = c(null));
      var f = u.get("animationDelay") || 0, d = qe(f) ? f(null) : f;
      n.eachItemGraphicEl(function(h, p) {
        var v = h;
        if (v) {
          var g = [h.x, h.y], m = void 0, y = void 0, _ = void 0;
          if (i)
            if (o) {
              var O = i, S = r.pointToCoord(g);
              a ? (m = O.startAngle, y = O.endAngle, _ = -S[1] / 180 * Math.PI) : (m = O.r0, y = O.r, _ = S[0]);
            } else {
              var x = i;
              a ? (m = x.x, y = x.x + x.width, _ = h.x) : (m = x.y + x.height, y = x.y, _ = h.y);
            }
          var C = y === m ? 0 : (_ - m) / (y - m);
          l && (C = 1 - C);
          var P = qe(f) ? f(p) : c * C + d, $ = v.getSymbolPath(), T = $.getTextContent();
          v.attr({
            scaleX: 0,
            scaleY: 0
          }), v.animateTo({
            scaleX: 1,
            scaleY: 1
          }, {
            duration: 200,
            setToFinal: !0,
            delay: P
          }), T && T.animateFrom({
            style: {
              opacity: 0
            }
          }, {
            duration: 300,
            delay: P
          }), $.disableLabelAnimation = !0;
        }
      });
    }, e.prototype._initOrUpdateEndLabel = function(n, r, i) {
      var a = n.getModel("endLabel");
      if (hfe(n)) {
        var o = n.getData(), s = this._polyline, l = o.getLayout("points");
        if (!l) {
          s.removeTextContent(), this._endLabel = null;
          return;
        }
        var u = this._endLabel;
        u || (u = this._endLabel = new jt({
          z2: 200
          // should be higher than item symbol
        }), u.ignoreClip = !0, s.setTextContent(this._endLabel), s.disableLabelAnimation = !0);
        var c = JJe(l);
        c >= 0 && (Ei(s, ei(n, "endLabel"), {
          inheritColor: i,
          labelFetcher: n,
          labelDataIndex: c,
          defaultText: function(f, d, h) {
            return h != null ? ofe(o, h) : jg(o, f);
          },
          enableTextSetter: !0
        }, tet(a, r)), s.textConfig.position = null);
      } else this._endLabel && (this._polyline.removeTextContent(), this._endLabel = null);
    }, e.prototype._endLabelOnDuring = function(n, r, i, a, o, s, l) {
      var u = this._endLabel, c = this._polyline;
      if (u) {
        n < 1 && a.originalX == null && (a.originalX = u.x, a.originalY = u.y);
        var f = i.getLayout("points"), d = i.hostModel, h = d.get("connectNulls"), p = s.get("precision"), v = s.get("distance") || 0, g = l.getBaseAxis(), m = g.isHorizontal(), y = g.inverse, _ = r.shape, O = y ? m ? _.x : _.y + _.height : m ? _.x + _.width : _.y, S = (m ? v : 0) * (y ? -1 : 1), x = (m ? 0 : -v) * (y ? -1 : 1), C = m ? "x" : "y", P = eet(f, O, C), $ = P.range, T = $[1] - $[0], E = void 0;
        if (T >= 1) {
          if (T > 1 && !h) {
            var M = bZ(f, $[0]);
            u.attr({
              x: M[0] + S,
              y: M[1] + x
            }), o && (E = d.getRawValue($[0]));
          } else {
            var M = c.getPointOn(O, C);
            M && u.attr({
              x: M[0] + S,
              y: M[1] + x
            });
            var R = d.getRawValue($[0]), N = d.getRawValue($[1]);
            o && (E = Vse(i, p, R, N, P.t));
          }
          a.lastFrameIndex = $[0];
        } else {
          var I = n === 1 || a.lastFrameIndex > 0 ? $[0] : 0, M = bZ(f, I);
          o && (E = d.getRawValue(I)), u.attr({
            x: M[0] + S,
            y: M[1] + x
          });
        }
        if (o) {
          var B = wm(u);
          typeof B.setLabelText == "function" && B.setLabelText(E);
        }
      }
    }, e.prototype._doUpdateAnimation = function(n, r, i, a, o, s, l) {
      var u = this._polyline, c = this._polygon, f = n.hostModel, d = HJe(this._data, n, this._stackedOnPoints, r, this._coordSys, i, this._valueOrigin), h = d.current, p = d.stackedOnCurrent, v = d.next, g = d.stackedOnNext;
      if (o && (h = Tc(d.current, i, o, l), p = Tc(d.stackedOnCurrent, i, o, l), v = Tc(d.next, i, o, l), g = Tc(d.stackedOnNext, i, o, l)), mZ(h, v) > 3e3 || c && mZ(p, g) > 3e3) {
        u.stopAnimation(), u.setShape({
          points: v
        }), c && (c.stopAnimation(), c.setShape({
          points: v,
          stackedOnPoints: g
        }));
        return;
      }
      u.shape.__points = d.current, u.shape.points = h;
      var m = {
        shape: {
          points: v
        }
      };
      d.current !== h && (m.shape.__points = d.next), u.stopAnimation(), tn(u, m, f), c && (c.setShape({
        // Reuse the points with polyline.
        points: h,
        stackedOnPoints: p
      }), c.stopAnimation(), tn(c, {
        shape: {
          stackedOnPoints: g
        }
      }, f), u.shape.points !== c.shape.points && (c.shape.points = u.shape.points));
      for (var y = [], _ = d.status, O = 0; O < _.length; O++) {
        var S = _[O].cmd;
        if (S === "=") {
          var x = n.getItemGraphicEl(_[O].idx1);
          x && y.push({
            el: x,
            ptIdx: O
            // Index of points
          });
        }
      }
      u.animators && u.animators.length && u.animators[0].during(function() {
        c && c.dirtyShape();
        for (var C = u.shape.__points, P = 0; P < y.length; P++) {
          var $ = y[P].el, T = y[P].ptIdx * 2;
          $.x = C[T], $.y = C[T + 1], $.markRedraw();
        }
      });
    }, e.prototype.remove = function(n) {
      var r = this.group, i = this._data;
      this._lineGroup.removeAll(), this._symbolDraw.remove(!0), i && i.eachItemGraphicEl(function(a, o) {
        a.__temp && (r.remove(a), i.setItemGraphicEl(o, null));
      }), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null;
    }, e.type = "line", e;
  }(_n)
);
function _1(t, e) {
  return {
    seriesType: t,
    plan: $m(),
    reset: function(n) {
      var r = n.getData(), i = n.coordinateSystem, a = n.pipelineContext, o = e || a.large;
      if (i) {
        var s = Ce(i.dimensions, function(h) {
          return r.mapDimension(h);
        }).slice(0, 2), l = s.length, u = r.getCalculationInfo("stackResultDimension");
        Hu(r, s[0]) && (s[0] = u), Hu(r, s[1]) && (s[1] = u);
        var c = r.getStore(), f = r.getDimensionIndex(s[0]), d = r.getDimensionIndex(s[1]);
        return l && {
          progress: function(h, p) {
            for (var v = h.end - h.start, g = o && Al(v * l), m = [], y = [], _ = h.start, O = 0; _ < h.end; _++) {
              var S = void 0;
              if (l === 1) {
                var x = c.get(f, _);
                S = i.dataToPoint(x, null, y);
              } else
                m[0] = c.get(f, _), m[1] = c.get(d, _), S = i.dataToPoint(m, null, y);
              o ? (g[O++] = S[0], g[O++] = S[1]) : p.setItemLayout(_, S.slice());
            }
            o && p.setLayout("points", g);
          }
        };
      }
    }
  };
}
var ret = {
  average: function(t) {
    for (var e = 0, n = 0, r = 0; r < t.length; r++)
      isNaN(t[r]) || (e += t[r], n++);
    return n === 0 ? NaN : e / n;
  },
  sum: function(t) {
    for (var e = 0, n = 0; n < t.length; n++)
      e += t[n] || 0;
    return e;
  },
  max: function(t) {
    for (var e = -1 / 0, n = 0; n < t.length; n++)
      t[n] > e && (e = t[n]);
    return isFinite(e) ? e : NaN;
  },
  min: function(t) {
    for (var e = 1 / 0, n = 0; n < t.length; n++)
      t[n] < e && (e = t[n]);
    return isFinite(e) ? e : NaN;
  },
  minmax: function(t) {
    for (var e = -1 / 0, n = -1 / 0, r = 0; r < t.length; r++) {
      var i = t[r], a = Math.abs(i);
      a > e && (e = a, n = i);
    }
    return isFinite(n) ? n : NaN;
  },
  // TODO
  // Median
  nearest: function(t) {
    return t[0];
  }
}, iet = function(t) {
  return Math.round(t.length / 2);
};
function pfe(t) {
  return {
    seriesType: t,
    // FIXME:TS never used, so comment it
    // modifyOutputEnd: true,
    reset: function(e, n, r) {
      var i = e.getData(), a = e.get("sampling"), o = e.coordinateSystem, s = i.count();
      if (s > 10 && o.type === "cartesian2d" && a) {
        var l = o.getBaseAxis(), u = o.getOtherAxis(l), c = l.getExtent(), f = r.getDevicePixelRatio(), d = Math.abs(c[1] - c[0]) * (f || 1), h = Math.round(s / d);
        if (isFinite(h) && h > 1) {
          a === "lttb" && e.setData(i.lttbDownSample(i.mapDimension(u.dim), 1 / h));
          var p = void 0;
          Ve(a) ? p = ret[a] : qe(a) && (p = a), p && e.setData(i.downSample(i.mapDimension(u.dim), 1 / h, p, iet));
        }
      }
    }
  };
}
function aet(t) {
  t.registerChartView(net), t.registerSeriesModel(VJe), t.registerLayout(_1("line", !0)), t.registerVisual({
    seriesType: "line",
    reset: function(e) {
      var n = e.getData(), r = e.getModel("lineStyle").getLineStyle();
      r && !r.stroke && (r.stroke = n.getVisual("style").fill), n.setVisual("legendLineStyle", r);
    }
  }), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, pfe("line"));
}
var a_ = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.getInitialData = function(n, r) {
      return Yl(null, this, {
        useEncodeDefaulter: !0
      });
    }, e.prototype.getMarkerPosition = function(n, r, i) {
      var a = this.coordinateSystem;
      if (a && a.clampData) {
        var o = a.clampData(n), s = a.dataToPoint(o);
        if (i)
          F(a.getAxes(), function(d, h) {
            if (d.type === "category" && r != null) {
              var p = d.getTicksCoords(), v = d.getTickModel().get("alignWithLabel"), g = o[h], m = r[h] === "x1" || r[h] === "y1";
              if (m && !v && (g += 1), p.length < 2)
                return;
              if (p.length === 2) {
                s[h] = d.toGlobalCoord(d.getExtent()[m ? 1 : 0]);
                return;
              }
              for (var y = void 0, _ = void 0, O = 1, S = 0; S < p.length; S++) {
                var x = p[S].coord, C = S === p.length - 1 ? p[S - 1].tickValue + O : p[S].tickValue;
                if (C === g) {
                  _ = x;
                  break;
                } else if (C < g)
                  y = x;
                else if (y != null && C > g) {
                  _ = (x + y) / 2;
                  break;
                }
                S === 1 && (O = C - p[0].tickValue);
              }
              _ == null && (y ? y && (_ = p[p.length - 1].coord) : _ = p[0].coord), s[h] = d.toGlobalCoord(_);
            }
          });
        else {
          var l = this.getData(), u = l.getLayout("offset"), c = l.getLayout("size"), f = a.getBaseAxis().isHorizontal() ? 0 : 1;
          s[f] += u + c / 2;
        }
        return s;
      }
      return [NaN, NaN];
    }, e.type = "series.__base_bar__", e.defaultOption = {
      // zlevel: 0,
      z: 2,
      coordinateSystem: "cartesian2d",
      legendHoverLink: !0,
      // stack: null
      // Cartesian coordinate system
      // xAxisIndex: 0,
      // yAxisIndex: 0,
      barMinHeight: 0,
      barMinAngle: 0,
      // cursor: null,
      large: !1,
      largeThreshold: 400,
      progressive: 3e3,
      progressiveChunkMode: "mod"
    }, e;
  }(Cn)
);
Cn.registerClass(a_);
var oet = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.getInitialData = function() {
      return Yl(null, this, {
        useEncodeDefaulter: !0,
        createInvertedIndices: !!this.get("realtimeSort", !0) || null
      });
    }, e.prototype.getProgressive = function() {
      return this.get("large") ? this.get("progressive") : !1;
    }, e.prototype.getProgressiveThreshold = function() {
      var n = this.get("progressiveThreshold"), r = this.get("largeThreshold");
      return r > n && (n = r), n;
    }, e.prototype.brushSelector = function(n, r, i) {
      return i.rect(r.getItemLayout(n));
    }, e.type = "series.bar", e.dependencies = ["grid", "polar"], e.defaultOption = Bf(a_.defaultOption, {
      // If clipped
      // Only available on cartesian2d
      clip: !0,
      roundCap: !1,
      showBackground: !1,
      backgroundStyle: {
        color: "rgba(180, 180, 180, 0.2)",
        borderColor: null,
        borderWidth: 0,
        borderType: "solid",
        borderRadius: 0,
        shadowBlur: 0,
        shadowColor: null,
        shadowOffsetX: 0,
        shadowOffsetY: 0,
        opacity: 1
      },
      select: {
        itemStyle: {
          borderColor: "#212121"
        }
      },
      realtimeSort: !1
    }), e;
  }(a_)
), set = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
      this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
    }
    return t;
  }()
), tT = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "sausage", r;
    }
    return e.prototype.getDefaultShape = function() {
      return new set();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.cx, a = r.cy, o = Math.max(r.r0 || 0, 0), s = Math.max(r.r, 0), l = (s - o) * 0.5, u = o + l, c = r.startAngle, f = r.endAngle, d = r.clockwise, h = Math.PI * 2, p = d ? f - c < h : c - f < h;
      p || (c = f - (d ? h : -h));
      var v = Math.cos(c), g = Math.sin(c), m = Math.cos(f), y = Math.sin(f);
      p ? (n.moveTo(v * o + i, g * o + a), n.arc(v * u + i, g * u + a, l, -Math.PI + c, c, !d)) : n.moveTo(v * s + i, g * s + a), n.arc(i, a, s, c, f, !d), n.arc(m * u + i, y * u + a, l, f - Math.PI * 2, f - Math.PI, !d), o !== 0 && n.arc(i, a, o, f, c, d);
    }, e;
  }(Dt)
);
function uet(t, e) {
  e = e || {};
  var n = e.isRoundCap;
  return function(r, i, a) {
    var o = i.position;
    if (!o || o instanceof Array)
      return AC(r, i, a);
    var s = t(o), l = i.distance != null ? i.distance : 5, u = this.shape, c = u.cx, f = u.cy, d = u.r, h = u.r0, p = (d + h) / 2, v = u.startAngle, g = u.endAngle, m = (v + g) / 2, y = n ? Math.abs(d - h) / 2 : 0, _ = Math.cos, O = Math.sin, S = c + d * _(v), x = f + d * O(v), C = "left", P = "top";
    switch (s) {
      case "startArc":
        S = c + (h - l) * _(m), x = f + (h - l) * O(m), C = "center", P = "top";
        break;
      case "insideStartArc":
        S = c + (h + l) * _(m), x = f + (h + l) * O(m), C = "center", P = "bottom";
        break;
      case "startAngle":
        S = c + p * _(v) + NS(v, l + y, !1), x = f + p * O(v) + BS(v, l + y, !1), C = "right", P = "middle";
        break;
      case "insideStartAngle":
        S = c + p * _(v) + NS(v, -l + y, !1), x = f + p * O(v) + BS(v, -l + y, !1), C = "left", P = "middle";
        break;
      case "middle":
        S = c + p * _(m), x = f + p * O(m), C = "center", P = "middle";
        break;
      case "endArc":
        S = c + (d + l) * _(m), x = f + (d + l) * O(m), C = "center", P = "bottom";
        break;
      case "insideEndArc":
        S = c + (d - l) * _(m), x = f + (d - l) * O(m), C = "center", P = "top";
        break;
      case "endAngle":
        S = c + p * _(g) + NS(g, l + y, !0), x = f + p * O(g) + BS(g, l + y, !0), C = "left", P = "middle";
        break;
      case "insideEndAngle":
        S = c + p * _(g) + NS(g, -l + y, !0), x = f + p * O(g) + BS(g, -l + y, !0), C = "right", P = "middle";
        break;
      default:
        return AC(r, i, a);
    }
    return r = r || {}, r.x = S, r.y = x, r.align = C, r.verticalAlign = P, r;
  };
}
function cet(t, e, n, r) {
  if (Kt(r)) {
    t.setTextConfig({
      rotation: r
    });
    return;
  } else if (Se(e)) {
    t.setTextConfig({
      rotation: 0
    });
    return;
  }
  var i = t.shape, a = i.clockwise ? i.startAngle : i.endAngle, o = i.clockwise ? i.endAngle : i.startAngle, s = (a + o) / 2, l, u = n(e);
  switch (u) {
    case "startArc":
    case "insideStartArc":
    case "middle":
    case "insideEndArc":
    case "endArc":
      l = s;
      break;
    case "startAngle":
    case "insideStartAngle":
      l = a;
      break;
    case "endAngle":
    case "insideEndAngle":
      l = o;
      break;
    default:
      t.setTextConfig({
        rotation: 0
      });
      return;
  }
  var c = Math.PI * 1.5 - l;
  u === "middle" && c > Math.PI / 2 && c < Math.PI * 1.5 && (c -= Math.PI), t.setTextConfig({
    rotation: c
  });
}
function NS(t, e, n) {
  return e * Math.sin(t) * (n ? -1 : 1);
}
function BS(t, e, n) {
  return e * Math.cos(t) * (n ? 1 : -1);
}
function ch(t, e, n) {
  var r = t.get("borderRadius");
  if (r == null)
    return n ? {
      cornerRadius: 0
    } : null;
  Se(r) || (r = [r, r, r, r]);
  var i = Math.abs(e.r || 0 - e.r0 || 0);
  return {
    cornerRadius: Ce(r, function(a) {
      return js(a, i);
    })
  };
}
var QM = Math.max, HM = Math.min;
function fet(t, e) {
  var n = t.getArea && t.getArea();
  if (yp(t, "cartesian2d")) {
    var r = t.getBaseAxis();
    if (r.type !== "category" || !r.onBand) {
      var i = e.getLayout("bandWidth");
      r.isHorizontal() ? (n.x -= i, n.width += i * 2) : (n.y -= i, n.height += i * 2);
    }
  }
  return n;
}
var det = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t.call(this) || this;
      return n.type = e.type, n._isFirstFrame = !0, n;
    }
    return e.prototype.render = function(n, r, i, a) {
      this._model = n, this._removeOnRenderedListener(i), this._updateDrawMode(n);
      var o = n.get("coordinateSystem");
      o === "cartesian2d" || o === "polar" ? (this._progressiveEls = null, this._isLargeDraw ? this._renderLarge(n, r, i) : this._renderNormal(n, r, i, a)) : process.env.NODE_ENV !== "production" && nr("Only cartesian2d and polar supported for bar.");
    }, e.prototype.incrementalPrepareRender = function(n) {
      this._clear(), this._updateDrawMode(n), this._updateLargeClip(n);
    }, e.prototype.incrementalRender = function(n, r) {
      this._progressiveEls = [], this._incrementalRenderLarge(n, r);
    }, e.prototype.eachRendered = function(n) {
      Nf(this._progressiveEls || this.group, n);
    }, e.prototype._updateDrawMode = function(n) {
      var r = n.pipelineContext.large;
      (this._isLargeDraw == null || r !== this._isLargeDraw) && (this._isLargeDraw = r, this._clear());
    }, e.prototype._renderNormal = function(n, r, i, a) {
      var o = this.group, s = n.getData(), l = this._data, u = n.coordinateSystem, c = u.getBaseAxis(), f;
      u.type === "cartesian2d" ? f = c.isHorizontal() : u.type === "polar" && (f = c.dim === "angle");
      var d = n.isAnimationEnabled() ? n : null, h = het(n, u);
      h && this._enableRealtimeSort(h, s, i);
      var p = n.get("clip", !0) || h, v = fet(u, s);
      o.removeClipPath();
      var g = n.get("roundCap", !0), m = n.get("showBackground", !0), y = n.getModel("backgroundStyle"), _ = y.get("borderRadius") || 0, O = [], S = this._backgroundEls, x = a && a.isInitSort, C = a && a.type === "changeAxisOrder";
      function P(E) {
        var M = zS[u.type](s, E), R = _et(u, f, M);
        return R.useStyle(y.getItemStyle()), u.type === "cartesian2d" ? R.setShape("r", _) : R.setShape("cornerRadius", _), O[E] = R, R;
      }
      s.diff(l).add(function(E) {
        var M = s.getItemModel(E), R = zS[u.type](s, E, M);
        if (m && P(E), !(!s.hasValue(E) || !wZ[u.type](R))) {
          var N = !1;
          p && (N = _Z[u.type](v, R));
          var I = OZ[u.type](n, s, E, R, f, d, c.model, !1, g);
          h && (I.forceLabelAnimation = !0), CZ(I, s, E, M, R, n, f, u.type === "polar"), x ? I.attr({
            shape: R
          }) : h ? SZ(h, d, I, R, E, f, !1, !1) : Vn(I, {
            shape: R
          }, n, E), s.setItemGraphicEl(E, I), o.add(I), I.ignore = N;
        }
      }).update(function(E, M) {
        var R = s.getItemModel(E), N = zS[u.type](s, E, R);
        if (m) {
          var I = void 0;
          S.length === 0 ? I = P(M) : (I = S[M], I.useStyle(y.getItemStyle()), u.type === "cartesian2d" ? I.setShape("r", _) : I.setShape("cornerRadius", _), O[E] = I);
          var B = zS[u.type](s, E), Q = gfe(f, B, u);
          tn(I, {
            shape: Q
          }, d, E);
        }
        var W = l.getItemGraphicEl(M);
        if (!s.hasValue(E) || !wZ[u.type](N)) {
          o.remove(W);
          return;
        }
        var H = !1;
        if (p && (H = _Z[u.type](v, N), H && o.remove(W)), W ? Zs(W) : W = OZ[u.type](n, s, E, N, f, d, c.model, !!W, g), h && (W.forceLabelAnimation = !0), C) {
          var U = W.getTextContent();
          if (U) {
            var j = wm(U);
            j.prevValue != null && (j.prevValue = j.value);
          }
        } else
          CZ(W, s, E, R, N, n, f, u.type === "polar");
        x ? W.attr({
          shape: N
        }) : h ? SZ(h, d, W, N, E, f, !0, C) : tn(W, {
          shape: N
        }, n, E, null), s.setItemGraphicEl(E, W), W.ignore = H, o.add(W);
      }).remove(function(E) {
        var M = l.getItemGraphicEl(E);
        M && Xb(M, n, E);
      }).execute();
      var $ = this._backgroundGroup || (this._backgroundGroup = new ct());
      $.removeAll();
      for (var T = 0; T < O.length; ++T)
        $.add(O[T]);
      o.add($), this._backgroundEls = O, this._data = s;
    }, e.prototype._renderLarge = function(n, r, i) {
      this._clear(), PZ(n, this.group), this._updateLargeClip(n);
    }, e.prototype._incrementalRenderLarge = function(n, r) {
      this._removeBackground(), PZ(r, this.group, this._progressiveEls, !0);
    }, e.prototype._updateLargeClip = function(n) {
      var r = n.get("clip", !0) && b1(n.coordinateSystem, !1, n), i = this.group;
      r ? i.setClipPath(r) : i.removeClipPath();
    }, e.prototype._enableRealtimeSort = function(n, r, i) {
      var a = this;
      if (r.count()) {
        var o = n.baseAxis;
        if (this._isFirstFrame)
          this._dispatchInitSort(r, n, i), this._isFirstFrame = !1;
        else {
          var s = function(l) {
            var u = r.getItemGraphicEl(l), c = u && u.shape;
            return c && // The result should be consistent with the initial sort by data value.
            // Do not support the case that both positive and negative exist.
            Math.abs(o.isHorizontal() ? c.height : c.width) || 0;
          };
          this._onRendered = function() {
            a._updateSortWithinSameData(r, s, o, i);
          }, i.getZr().on("rendered", this._onRendered);
        }
      }
    }, e.prototype._dataSort = function(n, r, i) {
      var a = [];
      return n.each(n.mapDimension(r.dim), function(o, s) {
        var l = i(s);
        l = l ?? NaN, a.push({
          dataIndex: s,
          mappedValue: l,
          ordinalNumber: o
        });
      }), a.sort(function(o, s) {
        return s.mappedValue - o.mappedValue;
      }), {
        ordinalNumbers: Ce(a, function(o) {
          return o.ordinalNumber;
        })
      };
    }, e.prototype._isOrderChangedWithinSameData = function(n, r, i) {
      for (var a = i.scale, o = n.mapDimension(i.dim), s = Number.MAX_VALUE, l = 0, u = a.getOrdinalMeta().categories.length; l < u; ++l) {
        var c = n.rawIndexOf(o, a.getRawOrdinalNumber(l)), f = c < 0 ? Number.MIN_VALUE : r(n.indexOfRawIndex(c));
        if (f > s)
          return !0;
        s = f;
      }
      return !1;
    }, e.prototype._isOrderDifferentInView = function(n, r) {
      for (var i = r.scale, a = i.getExtent(), o = Math.max(0, a[0]), s = Math.min(a[1], i.getOrdinalMeta().categories.length - 1); o <= s; ++o)
        if (n.ordinalNumbers[o] !== i.getRawOrdinalNumber(o))
          return !0;
    }, e.prototype._updateSortWithinSameData = function(n, r, i, a) {
      if (this._isOrderChangedWithinSameData(n, r, i)) {
        var o = this._dataSort(n, i, r);
        this._isOrderDifferentInView(o, i) && (this._removeOnRenderedListener(a), a.dispatchAction({
          type: "changeAxisOrder",
          componentType: i.dim + "Axis",
          axisId: i.index,
          sortInfo: o
        }));
      }
    }, e.prototype._dispatchInitSort = function(n, r, i) {
      var a = r.baseAxis, o = this._dataSort(n, a, function(s) {
        return n.get(n.mapDimension(r.otherAxis.dim), s);
      });
      i.dispatchAction({
        type: "changeAxisOrder",
        componentType: a.dim + "Axis",
        isInitSort: !0,
        axisId: a.index,
        sortInfo: o
      });
    }, e.prototype.remove = function(n, r) {
      this._clear(this._model), this._removeOnRenderedListener(r);
    }, e.prototype.dispose = function(n, r) {
      this._removeOnRenderedListener(r);
    }, e.prototype._removeOnRenderedListener = function(n) {
      this._onRendered && (n.getZr().off("rendered", this._onRendered), this._onRendered = null);
    }, e.prototype._clear = function(n) {
      var r = this.group, i = this._data;
      n && n.isAnimationEnabled() && i && !this._isLargeDraw ? (this._removeBackground(), this._backgroundEls = [], i.eachItemGraphicEl(function(a) {
        Xb(a, n, ft(a).dataIndex);
      })) : r.removeAll(), this._data = null, this._isFirstFrame = !0;
    }, e.prototype._removeBackground = function() {
      this.group.remove(this._backgroundGroup), this._backgroundGroup = null;
    }, e.type = "bar", e;
  }(_n)
), _Z = {
  cartesian2d: function(t, e) {
    var n = e.width < 0 ? -1 : 1, r = e.height < 0 ? -1 : 1;
    n < 0 && (e.x += e.width, e.width = -e.width), r < 0 && (e.y += e.height, e.height = -e.height);
    var i = t.x + t.width, a = t.y + t.height, o = QM(e.x, t.x), s = HM(e.x + e.width, i), l = QM(e.y, t.y), u = HM(e.y + e.height, a), c = s < o, f = u < l;
    return e.x = c && o > i ? s : o, e.y = f && l > a ? u : l, e.width = c ? 0 : s - o, e.height = f ? 0 : u - l, n < 0 && (e.x += e.width, e.width = -e.width), r < 0 && (e.y += e.height, e.height = -e.height), c || f;
  },
  polar: function(t, e) {
    var n = e.r0 <= e.r ? 1 : -1;
    if (n < 0) {
      var r = e.r;
      e.r = e.r0, e.r0 = r;
    }
    var i = HM(e.r, t.r), a = QM(e.r0, t.r0);
    e.r = i, e.r0 = a;
    var o = i - a < 0;
    if (n < 0) {
      var r = e.r;
      e.r = e.r0, e.r0 = r;
    }
    return o;
  }
}, OZ = {
  cartesian2d: function(t, e, n, r, i, a, o, s, l) {
    var u = new Zt({
      shape: _e({}, r),
      z2: 1
    });
    if (u.__dataIndex = n, u.name = "item", a) {
      var c = u.shape, f = i ? "height" : "width";
      c[f] = 0;
    }
    return u;
  },
  polar: function(t, e, n, r, i, a, o, s, l) {
    var u = !i && l ? tT : ha, c = new u({
      shape: r,
      z2: 1
    });
    c.name = "item";
    var f = vfe(i);
    if (c.calculateTextPosition = uet(f, {
      isRoundCap: u === tT
    }), a) {
      var d = c.shape, h = i ? "r" : "endAngle", p = {};
      d[h] = i ? r.r0 : r.startAngle, p[h] = r[h], (s ? tn : Vn)(c, {
        shape: p
        // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue
      }, a);
    }
    return c;
  }
};
function het(t, e) {
  var n = t.get("realtimeSort", !0), r = e.getBaseAxis();
  if (process.env.NODE_ENV !== "production" && n && (r.type !== "category" && nr("`realtimeSort` will not work because this bar series is not based on a category axis."), e.type !== "cartesian2d" && nr("`realtimeSort` will not work because this bar series is not on cartesian2d.")), n && r.type === "category" && e.type === "cartesian2d")
    return {
      baseAxis: r,
      otherAxis: e.getOtherAxis(r)
    };
}
function SZ(t, e, n, r, i, a, o, s) {
  var l, u;
  a ? (u = {
    x: r.x,
    width: r.width
  }, l = {
    y: r.y,
    height: r.height
  }) : (u = {
    y: r.y,
    height: r.height
  }, l = {
    x: r.x,
    width: r.width
  }), s || (o ? tn : Vn)(n, {
    shape: l
  }, e, i, null);
  var c = e ? t.baseAxis.model : null;
  (o ? tn : Vn)(n, {
    shape: u
  }, c, i);
}
function xZ(t, e) {
  for (var n = 0; n < e.length; n++)
    if (!isFinite(t[e[n]]))
      return !0;
  return !1;
}
var pet = ["x", "y", "width", "height"], vet = ["cx", "cy", "r", "startAngle", "endAngle"], wZ = {
  cartesian2d: function(t) {
    return !xZ(t, pet);
  },
  polar: function(t) {
    return !xZ(t, vet);
  }
}, zS = {
  // itemModel is only used to get borderWidth, which is not needed
  // when calculating bar background layout.
  cartesian2d: function(t, e, n) {
    var r = t.getItemLayout(e), i = n ? met(n, r) : 0, a = r.width > 0 ? 1 : -1, o = r.height > 0 ? 1 : -1;
    return {
      x: r.x + a * i / 2,
      y: r.y + o * i / 2,
      width: r.width - a * i,
      height: r.height - o * i
    };
  },
  polar: function(t, e, n) {
    var r = t.getItemLayout(e);
    return {
      cx: r.cx,
      cy: r.cy,
      r0: r.r0,
      r: r.r,
      startAngle: r.startAngle,
      endAngle: r.endAngle,
      clockwise: r.clockwise
    };
  }
};
function get(t) {
  return t.startAngle != null && t.endAngle != null && t.startAngle === t.endAngle;
}
function vfe(t) {
  return /* @__PURE__ */ function(e) {
    var n = e ? "Arc" : "Angle";
    return function(r) {
      switch (r) {
        case "start":
        case "insideStart":
        case "end":
        case "insideEnd":
          return r + n;
        default:
          return r;
      }
    };
  }(t);
}
function CZ(t, e, n, r, i, a, o, s) {
  var l = e.getItemVisual(n, "style");
  if (s) {
    if (!a.get("roundCap")) {
      var c = t.shape, f = ch(r.getModel("itemStyle"), c, !0);
      _e(c, f), t.setShape(c);
    }
  } else {
    var u = r.get(["itemStyle", "borderRadius"]) || 0;
    t.setShape("r", u);
  }
  t.useStyle(l);
  var d = r.getShallow("cursor");
  d && t.attr("cursor", d);
  var h = s ? o ? i.r >= i.r0 ? "endArc" : "startArc" : i.endAngle >= i.startAngle ? "endAngle" : "startAngle" : o ? i.height >= 0 ? "bottom" : "top" : i.width >= 0 ? "right" : "left", p = ei(r);
  Ei(t, p, {
    labelFetcher: a,
    labelDataIndex: n,
    defaultText: jg(a.getData(), n),
    inheritColor: l.fill,
    defaultOpacity: l.opacity,
    defaultOutsidePosition: h
  });
  var v = t.getTextContent();
  if (s && v) {
    var g = r.get(["label", "position"]);
    t.textConfig.inside = g === "middle" ? !0 : null, cet(t, g === "outside" ? h : g, vfe(o), r.get(["label", "rotate"]));
  }
  Lle(v, p, a.getRawValue(n), function(y) {
    return ofe(e, y);
  });
  var m = r.getModel(["emphasis"]);
  ur(t, m.get("focus"), m.get("blurScope"), m.get("disabled")), Ai(t, r), get(i) && (t.style.fill = "none", t.style.stroke = "none", F(t.states, function(y) {
    y.style && (y.style.fill = y.style.stroke = "none");
  }));
}
function met(t, e) {
  var n = t.get(["itemStyle", "borderColor"]);
  if (!n || n === "none")
    return 0;
  var r = t.get(["itemStyle", "borderWidth"]) || 0, i = isNaN(e.width) ? Number.MAX_VALUE : Math.abs(e.width), a = isNaN(e.height) ? Number.MAX_VALUE : Math.abs(e.height);
  return Math.min(r, i, a);
}
var yet = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
    }
    return t;
  }()
), TZ = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "largeBar", r;
    }
    return e.prototype.getDefaultShape = function() {
      return new yet();
    }, e.prototype.buildPath = function(n, r) {
      for (var i = r.points, a = this.baseDimIdx, o = 1 - this.baseDimIdx, s = [], l = [], u = this.barWidth, c = 0; c < i.length; c += 3)
        l[a] = u, l[o] = i[c + 2], s[a] = i[c + a], s[o] = i[c + o], n.rect(s[0], s[1], l[0], l[1]);
    }, e;
  }(Dt)
);
function PZ(t, e, n, r) {
  var i = t.getData(), a = i.getLayout("valueAxisHorizontal") ? 1 : 0, o = i.getLayout("largeDataIndices"), s = i.getLayout("size"), l = t.getModel("backgroundStyle"), u = i.getLayout("largeBackgroundPoints");
  if (u) {
    var c = new TZ({
      shape: {
        points: u
      },
      incremental: !!r,
      silent: !0,
      z2: 0
    });
    c.baseDimIdx = a, c.largeDataIndices = o, c.barWidth = s, c.useStyle(l.getItemStyle()), e.add(c), n && n.push(c);
  }
  var f = new TZ({
    shape: {
      points: i.getLayout("largePoints")
    },
    incremental: !!r,
    ignoreCoarsePointer: !0,
    z2: 1
  });
  f.baseDimIdx = a, f.largeDataIndices = o, f.barWidth = s, e.add(f), f.useStyle(i.getVisual("style")), ft(f).seriesIndex = t.seriesIndex, t.get("silent") || (f.on("mousedown", $Z), f.on("mousemove", $Z)), n && n.push(f);
}
var $Z = kP(function(t) {
  var e = this, n = bet(e, t.offsetX, t.offsetY);
  ft(e).dataIndex = n >= 0 ? n : null;
}, 30, !1);
function bet(t, e, n) {
  for (var r = t.baseDimIdx, i = 1 - r, a = t.shape.points, o = t.largeDataIndices, s = [], l = [], u = t.barWidth, c = 0, f = a.length / 3; c < f; c++) {
    var d = c * 3;
    if (l[r] = u, l[i] = a[d + 2], s[r] = a[d + r], s[i] = a[d + i], l[i] < 0 && (s[i] += l[i], l[i] = -l[i]), e >= s[0] && e <= s[0] + l[0] && n >= s[1] && n <= s[1] + l[1])
      return o[c];
  }
  return -1;
}
function gfe(t, e, n) {
  if (yp(n, "cartesian2d")) {
    var r = e, i = n.getArea();
    return {
      x: t ? r.x : i.x,
      y: t ? i.y : r.y,
      width: t ? r.width : i.width,
      height: t ? i.height : r.height
    };
  } else {
    var i = n.getArea(), a = e;
    return {
      cx: i.cx,
      cy: i.cy,
      r0: t ? i.r0 : a.r0,
      r: t ? i.r : a.r,
      startAngle: t ? a.startAngle : 0,
      endAngle: t ? a.endAngle : Math.PI * 2
    };
  }
}
function _et(t, e, n) {
  var r = t.type === "polar" ? ha : Zt;
  return new r({
    shape: gfe(e, n, t),
    silent: !0,
    z2: 0
  });
}
function Oet(t) {
  t.registerChartView(det), t.registerSeriesModel(oet), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, vt(Oce, "bar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Sce("bar")), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, pfe("bar")), t.registerAction({
    type: "changeAxisOrder",
    event: "changeAxisOrder",
    update: "update"
  }, function(e, n) {
    var r = e.componentType || "series";
    n.eachComponent({
      mainType: r,
      query: e
    }, function(i) {
      e.sortInfo && i.axis.setCategorySortInfo(e.sortInfo);
    });
  });
}
var AZ = Math.PI * 2, VS = Math.PI / 180;
function mfe(t, e) {
  return Mr(t.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function yfe(t, e) {
  var n = mfe(t, e), r = t.get("center"), i = t.get("radius");
  Se(i) || (i = [0, i]);
  var a = ze(n.width, e.getWidth()), o = ze(n.height, e.getHeight()), s = Math.min(a, o), l = ze(i[0], s / 2), u = ze(i[1], s / 2), c, f, d = t.coordinateSystem;
  if (d) {
    var h = d.dataToPoint(r);
    c = h[0] || 0, f = h[1] || 0;
  } else
    Se(r) || (r = [r, r]), c = ze(r[0], a) + n.x, f = ze(r[1], o) + n.y;
  return {
    cx: c,
    cy: f,
    r0: l,
    r: u
  };
}
function xet(t, e, n) {
  e.eachSeriesByType(t, function(r) {
    var i = r.getData(), a = i.mapDimension("value"), o = mfe(r, n), s = yfe(r, n), l = s.cx, u = s.cy, c = s.r, f = s.r0, d = -r.get("startAngle") * VS, h = r.get("endAngle"), p = r.get("padAngle") * VS;
    h = h === "auto" ? d - AZ : -h * VS;
    var v = r.get("minAngle") * VS, g = v + p, m = 0;
    i.each(a, function(Q) {
      !isNaN(Q) && m++;
    });
    var y = i.getSum(a), _ = Math.PI / (y || m) * 2, O = r.get("clockwise"), S = r.get("roseType"), x = r.get("stillShowZeroSum"), C = i.getDataExtent(a);
    C[0] = 0;
    var P = O ? 1 : -1, $ = [d, h], T = P * p / 2;
    D5($, !O), d = $[0], h = $[1];
    var E = bfe(r);
    E.startAngle = d, E.endAngle = h, E.clockwise = O;
    var M = Math.abs(h - d), R = M, N = 0, I = d;
    if (i.setLayout({
      viewRect: o,
      r: c
    }), i.each(a, function(Q, W) {
      var H;
      if (isNaN(Q)) {
        i.setItemLayout(W, {
          angle: NaN,
          startAngle: NaN,
          endAngle: NaN,
          clockwise: O,
          cx: l,
          cy: u,
          r0: f,
          r: S ? NaN : c
        });
        return;
      }
      S !== "area" ? H = y === 0 && x ? _ : Q * _ : H = M / m, H < g ? (H = g, R -= g) : N += Q;
      var U = I + P * H, j = 0, Y = 0;
      p > H ? (j = I + P * H / 2, Y = j) : (j = I + T, Y = U - T), i.setItemLayout(W, {
        angle: H,
        startAngle: j,
        endAngle: Y,
        clockwise: O,
        cx: l,
        cy: u,
        r0: f,
        r: S ? gn(Q, C, [f, c]) : c
      }), I = U;
    }), R < AZ && m)
      if (R <= 1e-3) {
        var B = M / m;
        i.each(a, function(Q, W) {
          if (!isNaN(Q)) {
            var H = i.getItemLayout(W);
            H.angle = B;
            var U = 0, j = 0;
            B < p ? (U = d + P * (W + 1 / 2) * B, j = U) : (U = d + P * W * B + T, j = d + P * (W + 1) * B - T), H.startAngle = U, H.endAngle = j;
          }
        });
      } else
        _ = R / N, I = d, i.each(a, function(Q, W) {
          if (!isNaN(Q)) {
            var H = i.getItemLayout(W), U = H.angle === g ? g : Q * _, j = 0, Y = 0;
            U < p ? (j = I + P * U / 2, Y = j) : (j = I + T, Y = I + P * U - T), H.startAngle = j, H.endAngle = Y, I += P * U;
          }
        });
  });
}
var bfe = Ut();
function O1(t) {
  return {
    seriesType: t,
    reset: function(e, n) {
      var r = n.findComponents({
        mainType: "legend"
      });
      if (!(!r || !r.length)) {
        var i = e.getData();
        i.filterSelf(function(a) {
          for (var o = i.getName(a), s = 0; s < r.length; s++)
            if (!r[s].isSelected(o))
              return !1;
          return !0;
        });
      }
    }
  };
}
var wet = Math.PI / 180;
function EZ(t, e, n, r, i, a, o, s, l, u) {
  if (t.length < 2)
    return;
  function c(v) {
    for (var g = v.rB, m = g * g, y = 0; y < v.list.length; y++) {
      var _ = v.list[y], O = Math.abs(_.label.y - n), S = r + _.len, x = S * S, C = Math.sqrt((1 - Math.abs(O * O / m)) * x), P = e + (C + _.len2) * i, $ = P - _.label.x, T = _.targetTextWidth - $ * i;
      _fe(_, T, !0), _.label.x = P;
    }
  }
  function f(v) {
    for (var g = {
      list: [],
      maxY: 0
    }, m = {
      list: [],
      maxY: 0
    }, y = 0; y < v.length; y++)
      if (v[y].labelAlignTo === "none") {
        var _ = v[y], O = _.label.y > n ? m : g, S = Math.abs(_.label.y - n);
        if (S >= O.maxY) {
          var x = _.label.x - e - _.len2 * i, C = r + _.len, P = Math.abs(x) < C ? Math.sqrt(S * S / (1 - x * x / C / C)) : C;
          O.rB = P, O.maxY = S;
        }
        O.list.push(_);
      }
    c(g), c(m);
  }
  for (var d = t.length, h = 0; h < d; h++)
    if (t[h].position === "outer" && t[h].labelAlignTo === "labelLine") {
      var p = t[h].label.x - u;
      t[h].linePoints[1][0] += p, t[h].label.x = u;
    }
  Qce(t, l, l + o) && f(t);
}
function Cet(t, e, n, r, i, a, o, s) {
  for (var l = [], u = [], c = Number.MAX_VALUE, f = -Number.MAX_VALUE, d = 0; d < t.length; d++) {
    var h = t[d].label;
    GM(t[d]) || (h.x < e ? (c = Math.min(c, h.x), l.push(t[d])) : (f = Math.max(f, h.x), u.push(t[d])));
  }
  for (var d = 0; d < t.length; d++) {
    var p = t[d];
    if (!GM(p) && p.linePoints) {
      if (p.labelStyleWidth != null)
        continue;
      var h = p.label, v = p.linePoints, g = void 0;
      p.labelAlignTo === "edge" ? h.x < e ? g = v[2][0] - p.labelDistance - o - p.edgeDistance : g = o + i - p.edgeDistance - v[2][0] - p.labelDistance : p.labelAlignTo === "labelLine" ? h.x < e ? g = c - o - p.bleedMargin : g = o + i - f - p.bleedMargin : h.x < e ? g = h.x - o - p.bleedMargin : g = o + i - h.x - p.bleedMargin, p.targetTextWidth = g, _fe(p, g);
    }
  }
  EZ(u, e, n, r, 1, i, a, o, s, f), EZ(l, e, n, r, -1, i, a, o, s, c);
  for (var d = 0; d < t.length; d++) {
    var p = t[d];
    if (!GM(p) && p.linePoints) {
      var h = p.label, v = p.linePoints, m = p.labelAlignTo === "edge", y = h.style.padding, _ = y ? y[1] + y[3] : 0, O = h.style.backgroundColor ? 0 : _, S = p.rect.width + O, x = v[1][0] - v[2][0];
      m ? h.x < e ? v[2][0] = o + p.edgeDistance + S + p.labelDistance : v[2][0] = o + i - p.edgeDistance - S - p.labelDistance : (h.x < e ? v[2][0] = h.x + p.labelDistance : v[2][0] = h.x - p.labelDistance, v[1][0] = v[2][0] + x), v[1][1] = v[2][1] = h.y;
    }
  }
}
function _fe(t, e, n) {
  if (n === void 0 && (n = !1), t.labelStyleWidth == null) {
    var r = t.label, i = r.style, a = t.rect, o = i.backgroundColor, s = i.padding, l = s ? s[1] + s[3] : 0, u = i.overflow, c = a.width + (o ? 0 : l);
    if (e < c || n) {
      var f = a.height;
      if (u && u.match("break")) {
        r.setStyle("backgroundColor", null), r.setStyle("width", e - l);
        var d = r.getBoundingRect();
        r.setStyle("width", Math.ceil(d.width)), r.setStyle("backgroundColor", o);
      } else {
        var h = e - l, p = e < c ? h : (
          // Current available width is enough, but the text may have
          // already been wrapped with a smaller available width.
          n ? h > t.unconstrainedWidth ? null : h : null
        );
        r.setStyle("width", p);
      }
      var v = r.getBoundingRect();
      a.width = v.width;
      var g = (r.style.margin || 0) + 2.1;
      a.height = v.height + g, a.y -= (a.height - f) / 2;
    }
  }
}
function GM(t) {
  return t.position === "center";
}
function Tet(t) {
  var e = t.getData(), n = [], r, i, a = !1, o = (t.get("minShowLabelAngle") || 0) * wet, s = e.getLayout("viewRect"), l = e.getLayout("r"), u = s.width, c = s.x, f = s.y, d = s.height;
  function h(x) {
    x.ignore = !0;
  }
  function p(x) {
    if (!x.ignore)
      return !0;
    for (var C in x.states)
      if (x.states[C].ignore === !1)
        return !0;
    return !1;
  }
  e.each(function(x) {
    var C = e.getItemGraphicEl(x), P = C.shape, $ = C.getTextContent(), T = C.getTextGuideLine(), E = e.getItemModel(x), M = E.getModel("label"), R = M.get("position") || E.get(["emphasis", "label", "position"]), N = M.get("distanceToLabelLine"), I = M.get("alignTo"), B = ze(M.get("edgeDistance"), u), Q = M.get("bleedMargin"), W = E.getModel("labelLine"), H = W.get("length");
    H = ze(H, u);
    var U = W.get("length2");
    if (U = ze(U, u), Math.abs(P.endAngle - P.startAngle) < o) {
      F($.states, h), $.ignore = !0, T && (F(T.states, h), T.ignore = !0);
      return;
    }
    if (p($)) {
      var j = (P.startAngle + P.endAngle) / 2, Y = Math.cos(j), ne = Math.sin(j), fe, ue, ye, se;
      r = P.cx, i = P.cy;
      var he = R === "inside" || R === "inner";
      if (R === "center")
        fe = P.cx, ue = P.cy, se = "center";
      else {
        var re = (he ? (P.r + P.r0) / 2 * Y : P.r * Y) + r, q = (he ? (P.r + P.r0) / 2 * ne : P.r * ne) + i;
        if (fe = re + Y * 3, ue = q + ne * 3, !he) {
          var K = re + Y * (H + l - P.r), de = q + ne * (H + l - P.r), xe = K + (Y < 0 ? -1 : 1) * U, we = de;
          I === "edge" ? fe = Y < 0 ? c + B : c + u - B : fe = xe + (Y < 0 ? -N : N), ue = we, ye = [[re, q], [K, de], [xe, we]];
        }
        se = he ? "center" : I === "edge" ? Y > 0 ? "right" : "left" : Y > 0 ? "left" : "right";
      }
      var He = Math.PI, je = 0, Be = M.get("rotate");
      if (Kt(Be))
        je = Be * (He / 180);
      else if (R === "center")
        je = 0;
      else if (Be === "radial" || Be === !0) {
        var Le = Y < 0 ? -j + He : -j;
        je = Le;
      } else if (Be === "tangential" && R !== "outside" && R !== "outer") {
        var Pe = Math.atan2(Y, ne);
        Pe < 0 && (Pe = He * 2 + Pe);
        var Fe = ne > 0;
        Fe && (Pe = He + Pe), je = Pe - He;
      }
      if (a = !!je, $.x = fe, $.y = ue, $.rotation = je, $.setStyle({
        verticalAlign: "middle"
      }), he) {
        $.setStyle({
          align: se
        });
        var It = $.states.select;
        It && (It.x += $.x, It.y += $.y);
      } else {
        var Ye = $.getBoundingRect().clone();
        Ye.applyTransform($.getComputedTransform());
        var xt = ($.style.margin || 0) + 2.1;
        Ye.y -= xt / 2, Ye.height += xt, n.push({
          label: $,
          labelLine: T,
          position: R,
          len: H,
          len2: U,
          minTurnAngle: W.get("minTurnAngle"),
          maxSurfaceAngle: W.get("maxSurfaceAngle"),
          surfaceNormal: new yt(Y, ne),
          linePoints: ye,
          textAlign: se,
          labelDistance: N,
          labelAlignTo: I,
          edgeDistance: B,
          bleedMargin: Q,
          rect: Ye,
          unconstrainedWidth: Ye.width,
          labelStyleWidth: $.style.width
        });
      }
      C.setTextConfig({
        inside: he
      });
    }
  }), !a && t.get("avoidLabelOverlap") && Cet(n, r, i, l, u, d, c, f);
  for (var v = 0; v < n.length; v++) {
    var g = n[v], m = g.label, y = g.labelLine, _ = isNaN(m.x) || isNaN(m.y);
    if (m) {
      m.setStyle({
        align: g.textAlign
      }), _ && (F(m.states, h), m.ignore = !0);
      var O = m.states.select;
      O && (O.x += m.x, O.y += m.y);
    }
    if (y) {
      var S = g.linePoints;
      _ || !S ? (F(y.states, h), y.ignore = !0) : (Vce(S, g.minTurnAngle), ZKe(S, g.surfaceNormal, g.maxSurfaceAngle), y.setShape({
        points: S
      }), m.__hostTarget.textGuideLineConfig = {
        anchor: new yt(S[0][0], S[0][1])
      });
    }
  }
}
var Pet = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i) {
      var a = t.call(this) || this;
      a.z2 = 2;
      var o = new jt();
      return a.setTextContent(o), a.updateData(n, r, i, !0), a;
    }
    return e.prototype.updateData = function(n, r, i, a) {
      var o = this, s = n.hostModel, l = n.getItemModel(r), u = l.getModel("emphasis"), c = n.getItemLayout(r), f = _e(ch(l.getModel("itemStyle"), c, !0), c);
      if (isNaN(f.startAngle)) {
        o.setShape(f);
        return;
      }
      if (a) {
        o.setShape(f);
        var d = s.getShallow("animationType");
        s.ecModel.ssr ? (Vn(o, {
          scaleX: 0,
          scaleY: 0
        }, s, {
          dataIndex: r,
          isFrom: !0
        }), o.originX = f.cx, o.originY = f.cy) : d === "scale" ? (o.shape.r = c.r0, Vn(o, {
          shape: {
            r: c.r
          }
        }, s, r)) : i != null ? (o.setShape({
          startAngle: i,
          endAngle: i
        }), Vn(o, {
          shape: {
            startAngle: c.startAngle,
            endAngle: c.endAngle
          }
        }, s, r)) : (o.shape.endAngle = c.startAngle, tn(o, {
          shape: {
            endAngle: c.endAngle
          }
        }, s, r));
      } else
        Zs(o), tn(o, {
          shape: f
        }, s, r);
      o.useStyle(n.getItemVisual(r, "style")), Ai(o, l);
      var h = (c.startAngle + c.endAngle) / 2, p = s.get("selectedOffset"), v = Math.cos(h) * p, g = Math.sin(h) * p, m = l.getShallow("cursor");
      m && o.attr("cursor", m), this._updateLabel(s, n, r), o.ensureState("emphasis").shape = _e({
        r: c.r + (u.get("scale") && u.get("scaleSize") || 0)
      }, ch(u.getModel("itemStyle"), c)), _e(o.ensureState("select"), {
        x: v,
        y: g,
        shape: ch(l.getModel(["select", "itemStyle"]), c)
      }), _e(o.ensureState("blur"), {
        shape: ch(l.getModel(["blur", "itemStyle"]), c)
      });
      var y = o.getTextGuideLine(), _ = o.getTextContent();
      y && _e(y.ensureState("select"), {
        x: v,
        y: g
      }), _e(_.ensureState("select"), {
        x: v,
        y: g
      }), ur(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
    }, e.prototype._updateLabel = function(n, r, i) {
      var a = this, o = r.getItemModel(i), s = o.getModel("labelLine"), l = r.getItemVisual(i, "style"), u = l && l.fill, c = l && l.opacity;
      Ei(a, ei(o), {
        labelFetcher: r.hostModel,
        labelDataIndex: i,
        inheritColor: u,
        defaultOpacity: c,
        defaultText: n.getFormattedLabel(i, "normal") || r.getName(i)
      });
      var f = a.getTextContent();
      a.setTextConfig({
        // reset position, rotation
        position: null,
        rotation: null
      }), f.attr({
        z2: 10
      });
      var d = n.get(["label", "position"]);
      if (d !== "outside" && d !== "outer")
        a.removeTextGuideLine();
      else {
        var h = this.getTextGuideLine();
        h || (h = new va(), this.setTextGuideLine(h)), A3(this, E3(o), {
          stroke: u,
          opacity: co(s.get(["lineStyle", "opacity"]), c, 1)
        });
      }
    }, e;
  }(ha)
), $et = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.ignoreLabelLineUpdate = !0, n;
    }
    return e.prototype.render = function(n, r, i, a) {
      var o = n.getData(), s = this._data, l = this.group, u;
      if (!s && o.count() > 0) {
        for (var c = o.getItemLayout(0), f = 1; isNaN(c && c.startAngle) && f < o.count(); ++f)
          c = o.getItemLayout(f);
        c && (u = c.startAngle);
      }
      if (this._emptyCircleSector && l.remove(this._emptyCircleSector), o.count() === 0 && n.get("showEmptyCircle")) {
        var d = bfe(n), h = new ha({
          shape: _e(yfe(n, i), d)
        });
        h.useStyle(n.getModel("emptyCircleStyle").getItemStyle()), this._emptyCircleSector = h, l.add(h);
      }
      o.diff(s).add(function(p) {
        var v = new Pet(o, p, u);
        o.setItemGraphicEl(p, v), l.add(v);
      }).update(function(p, v) {
        var g = s.getItemGraphicEl(v);
        g.updateData(o, p, u), g.off("click"), l.add(g), o.setItemGraphicEl(p, g);
      }).remove(function(p) {
        var v = s.getItemGraphicEl(p);
        Xb(v, n, p);
      }).execute(), Tet(n), n.get("animationTypeUpdate") !== "expansion" && (this._data = o);
    }, e.prototype.dispose = function() {
    }, e.prototype.containPoint = function(n, r) {
      var i = r.getData(), a = i.getItemLayout(0);
      if (a) {
        var o = n[0] - a.cx, s = n[1] - a.cy, l = Math.sqrt(o * o + s * s);
        return l <= a.r && l >= a.r0;
      }
    }, e.type = "pie", e;
  }(_n)
);
function Rm(t, e, n) {
  e = Se(e) && {
    coordDimensions: e
  } || _e({
    encodeDefine: t.getEncode()
  }, e);
  var r = t.getSource(), i = Mm(r, e).dimensions, a = new Fi(i, t);
  return a.initData(r, n), a;
}
var S1 = (
  /** @class */
  function() {
    function t(e, n) {
      this._getDataWithEncodedVisual = e, this._getRawData = n;
    }
    return t.prototype.getAllNames = function() {
      var e = this._getRawData();
      return e.mapArray(e.getName);
    }, t.prototype.containName = function(e) {
      var n = this._getRawData();
      return n.indexOfName(e) >= 0;
    }, t.prototype.indexOfName = function(e) {
      var n = this._getDataWithEncodedVisual();
      return n.indexOfName(e);
    }, t.prototype.getItemVisual = function(e, n) {
      var r = this._getDataWithEncodedVisual();
      return r.getItemVisual(e, n);
    }, t;
  }()
), Aet = Ut(), Eet = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.init = function(n) {
      t.prototype.init.apply(this, arguments), this.legendVisualProvider = new S1(We(this.getData, this), We(this.getRawData, this)), this._defaultLabelLine(n);
    }, e.prototype.mergeOption = function() {
      t.prototype.mergeOption.apply(this, arguments);
    }, e.prototype.getInitialData = function() {
      return Rm(this, {
        coordDimensions: ["value"],
        encodeDefaulter: vt(n3, this)
      });
    }, e.prototype.getDataParams = function(n) {
      var r = this.getData(), i = Aet(r), a = i.seats;
      if (!a) {
        var o = [];
        r.each(r.mapDimension("value"), function(l) {
          o.push(l);
        }), a = i.seats = Mse(o, r.hostModel.get("percentPrecision"));
      }
      var s = t.prototype.getDataParams.call(this, n);
      return s.percent = a[n] || 0, s.$vars.push("percent"), s;
    }, e.prototype._defaultLabelLine = function(n) {
      Hh(n, "labelLine", ["show"]);
      var r = n.labelLine, i = n.emphasis.labelLine;
      r.show = r.show && n.label.show, i.show = i.show && n.emphasis.label.show;
    }, e.type = "series.pie", e.defaultOption = {
      // zlevel: 0,
      z: 2,
      legendHoverLink: !0,
      colorBy: "data",
      // 默认全局居中
      center: ["50%", "50%"],
      radius: [0, "75%"],
      // 默认顺时针
      clockwise: !0,
      startAngle: 90,
      endAngle: "auto",
      padAngle: 0,
      // 最小角度改为0
      minAngle: 0,
      // If the angle of a sector less than `minShowLabelAngle`,
      // the label will not be displayed.
      minShowLabelAngle: 0,
      // 选中时扇区偏移量
      selectedOffset: 10,
      // 选择模式，默认关闭，可选single，multiple
      // selectedMode: false,
      // 南丁格尔玫瑰图模式，'radius'（半径） | 'area'（面积）
      // roseType: null,
      percentPrecision: 2,
      // If still show when all data zero.
      stillShowZeroSum: !0,
      // cursor: null,
      left: 0,
      top: 0,
      right: 0,
      bottom: 0,
      width: null,
      height: null,
      label: {
        // color: 'inherit',
        // If rotate around circle
        rotate: 0,
        show: !0,
        overflow: "truncate",
        // 'outer', 'inside', 'center'
        position: "outer",
        // 'none', 'labelLine', 'edge'. Works only when position is 'outer'
        alignTo: "none",
        // Closest distance between label and chart edge.
        // Works only position is 'outer' and alignTo is 'edge'.
        edgeDistance: "25%",
        // Works only position is 'outer' and alignTo is not 'edge'.
        bleedMargin: 10,
        // Distance between text and label line.
        distanceToLabelLine: 5
        // formatter: 标签文本格式器，同 tooltip.formatter，不支持异步回调
        // 默认使用全局文本样式，详见 textStyle
        // distance: 当position为inner时有效，为label位置到圆心的距离与圆半径(环状图为内外半径和)的比例系数
      },
      // Enabled when label.normal.position is 'outer'
      labelLine: {
        show: !0,
        // 引导线两段中的第一段长度
        length: 15,
        // 引导线两段中的第二段长度
        length2: 15,
        smooth: !1,
        minTurnAngle: 90,
        maxSurfaceAngle: 90,
        lineStyle: {
          // color: 各异,
          width: 1,
          type: "solid"
        }
      },
      itemStyle: {
        borderWidth: 1,
        borderJoin: "round"
      },
      showEmptyCircle: !0,
      emptyCircleStyle: {
        color: "lightgray",
        opacity: 1
      },
      labelLayout: {
        // Hide the overlapped label.
        hideOverlap: !0
      },
      emphasis: {
        scale: !0,
        scaleSize: 5
      },
      // If use strategy to avoid label overlapping
      avoidLabelOverlap: !0,
      // Animation type. Valid values: expansion, scale
      animationType: "expansion",
      animationDuration: 1e3,
      // Animation type when update. Valid values: transition, expansion
      animationTypeUpdate: "transition",
      animationEasingUpdate: "cubicInOut",
      animationDurationUpdate: 500,
      animationEasing: "cubicInOut"
    }, e;
  }(Cn)
);
function Met(t) {
  return {
    seriesType: t,
    reset: function(e, n) {
      var r = e.getData();
      r.filterSelf(function(i) {
        var a = r.mapDimension("value"), o = r.get(a, i);
        return !(Kt(o) && !isNaN(o) && o < 0);
      });
    }
  };
}
function Iet(t) {
  t.registerChartView($et), t.registerSeriesModel(Eet), Bue("pie", t.registerAction), t.registerLayout(vt(xet, "pie")), t.registerProcessor(O1("pie")), t.registerProcessor(Met("pie"));
}
var Det = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.hasSymbolVisual = !0, n;
    }
    return e.prototype.getInitialData = function(n, r) {
      return Yl(null, this, {
        useEncodeDefaulter: !0
      });
    }, e.prototype.getProgressive = function() {
      var n = this.option.progressive;
      return n ?? (this.option.large ? 5e3 : this.get("progressive"));
    }, e.prototype.getProgressiveThreshold = function() {
      var n = this.option.progressiveThreshold;
      return n ?? (this.option.large ? 1e4 : this.get("progressiveThreshold"));
    }, e.prototype.brushSelector = function(n, r, i) {
      return i.point(r.getItemLayout(n));
    }, e.prototype.getZLevelKey = function() {
      return this.getData().count() > this.getProgressiveThreshold() ? this.id : "";
    }, e.type = "series.scatter", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
      coordinateSystem: "cartesian2d",
      // zlevel: 0,
      z: 2,
      legendHoverLink: !0,
      symbolSize: 10,
      // symbolRotate: null,  // 图形旋转控制
      large: !1,
      // Available when large is true
      largeThreshold: 2e3,
      // cursor: null,
      itemStyle: {
        opacity: 0.8
        // color: 各异
      },
      emphasis: {
        scale: !0
      },
      // If clip the overflow graphics
      // Works on cartesian / polar series
      clip: !0,
      select: {
        itemStyle: {
          borderColor: "#212121"
        }
      },
      universalTransition: {
        divideShape: "clone"
      }
      // progressive: null
    }, e;
  }(Cn)
), Ofe = 4, Ret = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
    }
    return t;
  }()
), ket = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r._off = 0, r.hoverDataIdx = -1, r;
    }
    return e.prototype.getDefaultShape = function() {
      return new Ret();
    }, e.prototype.reset = function() {
      this.notClear = !1, this._off = 0;
    }, e.prototype.buildPath = function(n, r) {
      var i = r.points, a = r.size, o = this.symbolProxy, s = o.shape, l = n.getContext ? n.getContext() : n, u = l && a[0] < Ofe, c = this.softClipShape, f;
      if (u) {
        this._ctx = l;
        return;
      }
      for (this._ctx = null, f = this._off; f < i.length; ) {
        var d = i[f++], h = i[f++];
        isNaN(d) || isNaN(h) || c && !c.contain(d, h) || (s.x = d - a[0] / 2, s.y = h - a[1] / 2, s.width = a[0], s.height = a[1], o.buildPath(n, s, !0));
      }
      this.incremental && (this._off = f, this.notClear = !0);
    }, e.prototype.afterBrush = function() {
      var n = this.shape, r = n.points, i = n.size, a = this._ctx, o = this.softClipShape, s;
      if (a) {
        for (s = this._off; s < r.length; ) {
          var l = r[s++], u = r[s++];
          isNaN(l) || isNaN(u) || o && !o.contain(l, u) || a.fillRect(l - i[0] / 2, u - i[1] / 2, i[0], i[1]);
        }
        this.incremental && (this._off = s, this.notClear = !0);
      }
    }, e.prototype.findDataIndex = function(n, r) {
      for (var i = this.shape, a = i.points, o = i.size, s = Math.max(o[0], 4), l = Math.max(o[1], 4), u = a.length / 2 - 1; u >= 0; u--) {
        var c = u * 2, f = a[c] - s / 2, d = a[c + 1] - l / 2;
        if (n >= f && r >= d && n <= f + s && r <= d + l)
          return u;
      }
      return -1;
    }, e.prototype.contain = function(n, r) {
      var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
      if (n = i[0], r = i[1], a.contain(n, r)) {
        var o = this.hoverDataIdx = this.findDataIndex(n, r);
        return o >= 0;
      }
      return this.hoverDataIdx = -1, !1;
    }, e.prototype.getBoundingRect = function() {
      var n = this._rect;
      if (!n) {
        for (var r = this.shape, i = r.points, a = r.size, o = a[0], s = a[1], l = 1 / 0, u = 1 / 0, c = -1 / 0, f = -1 / 0, d = 0; d < i.length; ) {
          var h = i[d++], p = i[d++];
          l = Math.min(h, l), c = Math.max(h, c), u = Math.min(p, u), f = Math.max(p, f);
        }
        n = this._rect = new bt(l - o / 2, u - s / 2, c - l + o, f - u + s);
      }
      return n;
    }, e;
  }(Dt)
), Let = (
  /** @class */
  function() {
    function t() {
      this.group = new ct();
    }
    return t.prototype.updateData = function(e, n) {
      this._clear();
      var r = this._create();
      r.setShape({
        points: e.getLayout("points")
      }), this._setCommon(r, e, n);
    }, t.prototype.updateLayout = function(e) {
      var n = e.getLayout("points");
      this.group.eachChild(function(r) {
        if (r.startIndex != null) {
          var i = (r.endIndex - r.startIndex) * 2, a = r.startIndex * 4 * 2;
          n = new Float32Array(n.buffer, a, i);
        }
        r.setShape("points", n), r.reset();
      });
    }, t.prototype.incrementalPrepareUpdate = function(e) {
      this._clear();
    }, t.prototype.incrementalUpdate = function(e, n, r) {
      var i = this._newAdded[0], a = n.getLayout("points"), o = i && i.shape.points;
      if (o && o.length < 2e4) {
        var s = o.length, l = new Float32Array(s + a.length);
        l.set(o), l.set(a, s), i.endIndex = e.end, i.setShape({
          points: l
        });
      } else {
        this._newAdded = [];
        var u = this._create();
        u.startIndex = e.start, u.endIndex = e.end, u.incremental = !0, u.setShape({
          points: a
        }), this._setCommon(u, n, r);
      }
    }, t.prototype.eachRendered = function(e) {
      this._newAdded[0] && e(this._newAdded[0]);
    }, t.prototype._create = function() {
      var e = new ket({
        cursor: "default"
      });
      return e.ignoreCoarsePointer = !0, this.group.add(e), this._newAdded.push(e), e;
    }, t.prototype._setCommon = function(e, n, r) {
      var i = n.hostModel;
      r = r || {};
      var a = n.getVisual("symbolSize");
      e.setShape("size", a instanceof Array ? a : [a, a]), e.softClipShape = r.clipShape || null, e.symbolProxy = Sr(n.getVisual("symbol"), 0, 0, 0, 0), e.setColor = e.symbolProxy.setColor;
      var o = e.shape.size[0] < Ofe;
      e.useStyle(
        // Draw shadow when doing fillRect is extremely slow.
        i.getModel("itemStyle").getItemStyle(o ? ["color", "shadowBlur", "shadowColor"] : ["color"])
      );
      var s = n.getVisual("style"), l = s && s.fill;
      l && e.setColor(l);
      var u = ft(e);
      u.seriesIndex = i.seriesIndex, e.on("mousemove", function(c) {
        u.dataIndex = null;
        var f = e.hoverDataIdx;
        f >= 0 && (u.dataIndex = f + (e.startIndex || 0));
      });
    }, t.prototype.remove = function() {
      this._clear();
    }, t.prototype._clear = function() {
      this._newAdded = [], this.group.removeAll();
    }, t;
  }()
), Net = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = n.getData(), o = this._updateSymbolDraw(a, n);
      o.updateData(a, {
        // TODO
        // If this parameter should be a shape or a bounding volume
        // shape will be more general.
        // But bounding volume like bounding rect will be much faster in the contain calculation
        clipShape: this._getClipShape(n)
      }), this._finished = !0;
    }, e.prototype.incrementalPrepareRender = function(n, r, i) {
      var a = n.getData(), o = this._updateSymbolDraw(a, n);
      o.incrementalPrepareUpdate(a), this._finished = !1;
    }, e.prototype.incrementalRender = function(n, r, i) {
      this._symbolDraw.incrementalUpdate(n, r.getData(), {
        clipShape: this._getClipShape(r)
      }), this._finished = n.end === r.getData().count();
    }, e.prototype.updateTransform = function(n, r, i) {
      var a = n.getData();
      if (this.group.dirty(), !this._finished || a.count() > 1e4)
        return {
          update: !0
        };
      var o = _1("").reset(n, r, i);
      o.progress && o.progress({
        start: 0,
        end: a.count(),
        count: a.count()
      }, a), this._symbolDraw.updateLayout(a);
    }, e.prototype.eachRendered = function(n) {
      this._symbolDraw && this._symbolDraw.eachRendered(n);
    }, e.prototype._getClipShape = function(n) {
      if (n.get("clip", !0)) {
        var r = n.coordinateSystem;
        return r && r.getArea && r.getArea(0.1);
      }
    }, e.prototype._updateSymbolDraw = function(n, r) {
      var i = this._symbolDraw, a = r.pipelineContext, o = a.large;
      return (!i || o !== this._isLargeDraw) && (i && i.remove(), i = this._symbolDraw = o ? new Let() : new y1(), this._isLargeDraw = o, this.group.removeAll()), this.group.add(i.group), i;
    }, e.prototype.remove = function(n, r) {
      this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null;
    }, e.prototype.dispose = function() {
    }, e.type = "scatter", e;
  }(_n)
), Bet = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.type = "grid", e.dependencies = ["xAxis", "yAxis"], e.layoutMode = "box", e.defaultOption = {
      show: !1,
      // zlevel: 0,
      z: 0,
      left: "10%",
      top: 60,
      right: "10%",
      bottom: 70,
      // If grid size contain label
      containLabel: !1,
      // width: {totalWidth} - left - right,
      // height: {totalHeight} - top - bottom,
      backgroundColor: "rgba(0,0,0,0)",
      borderWidth: 1,
      borderColor: "#ccc"
    }, e;
  }(At)
), aL = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.getCoordSysModel = function() {
      return this.getReferringComponents("grid", Er).models[0];
    }, e.type = "cartesian2dAxis", e;
  }(At)
);
vr(aL, Dm);
var Sfe = {
  show: !0,
  // zlevel: 0,
  z: 0,
  // Inverse the axis.
  inverse: !1,
  // Axis name displayed.
  name: "",
  // 'start' | 'middle' | 'end'
  nameLocation: "end",
  // By degree. By default auto rotate by nameLocation.
  nameRotate: null,
  nameTruncate: {
    maxWidth: null,
    ellipsis: "...",
    placeholder: "."
  },
  // Use global text style by default.
  nameTextStyle: {},
  // The gap between axisName and axisLine.
  nameGap: 15,
  // Default `false` to support tooltip.
  silent: !1,
  // Default `false` to avoid legacy user event listener fail.
  triggerEvent: !1,
  tooltip: {
    show: !1
  },
  axisPointer: {},
  axisLine: {
    show: !0,
    onZero: !0,
    onZeroAxisIndex: null,
    lineStyle: {
      color: "#6E7079",
      width: 1,
      type: "solid"
    },
    // The arrow at both ends the the axis.
    symbol: ["none", "none"],
    symbolSize: [10, 15]
  },
  axisTick: {
    show: !0,
    // Whether axisTick is inside the grid or outside the grid.
    inside: !1,
    // The length of axisTick.
    length: 5,
    lineStyle: {
      width: 1
    }
  },
  axisLabel: {
    show: !0,
    // Whether axisLabel is inside the grid or outside the grid.
    inside: !1,
    rotate: 0,
    // true | false | null/undefined (auto)
    showMinLabel: null,
    // true | false | null/undefined (auto)
    showMaxLabel: null,
    margin: 8,
    // formatter: null,
    fontSize: 12
  },
  splitLine: {
    show: !0,
    lineStyle: {
      color: ["#E0E6F1"],
      width: 1,
      type: "solid"
    }
  },
  splitArea: {
    show: !1,
    areaStyle: {
      color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
    }
  }
}, zet = mt({
  // The gap at both ends of the axis. For categoryAxis, boolean.
  boundaryGap: !0,
  // Set false to faster category collection.
  deduplication: null,
  // splitArea: {
  // show: false
  // },
  splitLine: {
    show: !1
  },
  axisTick: {
    // If tick is align with label when boundaryGap is true
    alignWithLabel: !1,
    interval: "auto"
  },
  axisLabel: {
    interval: "auto"
  }
}, Sfe), N3 = mt({
  boundaryGap: [0, 0],
  axisLine: {
    // Not shown when other axis is categoryAxis in cartesian
    show: "auto"
  },
  axisTick: {
    // Not shown when other axis is categoryAxis in cartesian
    show: "auto"
  },
  // TODO
  // min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60]
  splitNumber: 5,
  minorTick: {
    // Minor tick, not available for cateogry axis.
    show: !1,
    // Split number of minor ticks. The value should be in range of (0, 100)
    splitNumber: 5,
    // Length of minor tick
    length: 3,
    // Line style
    lineStyle: {
      // Default to be same with axisTick
    }
  },
  minorSplitLine: {
    show: !1,
    lineStyle: {
      color: "#F4F7FD",
      width: 1
    }
  }
}, Sfe), Vet = mt({
  splitNumber: 6,
  axisLabel: {
    // To eliminate labels that are not nice
    showMinLabel: !1,
    showMaxLabel: !1,
    rich: {
      primary: {
        fontWeight: "bold"
      }
    }
  },
  splitLine: {
    show: !1
  }
}, N3), Fet = it({
  logBase: 10
}, N3);
const xfe = {
  category: zet,
  value: N3,
  time: Vet,
  log: Fet
};
var Wet = {
  value: 1,
  category: 1,
  time: 1,
  log: 1
};
function Zg(t, e, n, r) {
  F(Wet, function(i, a) {
    var o = mt(mt({}, xfe[a], !0), r, !0), s = (
      /** @class */
      function(l) {
        le(u, l);
        function u() {
          var c = l !== null && l.apply(this, arguments) || this;
          return c.type = e + "Axis." + a, c;
        }
        return u.prototype.mergeDefaultAndTheme = function(c, f) {
          var d = qb(this), h = d ? Tm(c) : {}, p = f.getTheme();
          mt(c, p.get(a + "Axis")), mt(c, this.getDefaultOption()), c.type = MZ(c), d && Of(c, h, d);
        }, u.prototype.optionUpdated = function() {
          var c = this.option;
          c.type === "category" && (this.__ordinalMeta = qk.createByAxisModel(this));
        }, u.prototype.getCategories = function(c) {
          var f = this.option;
          if (f.type === "category")
            return c ? f.data : this.__ordinalMeta.categories;
        }, u.prototype.getOrdinalMeta = function() {
          return this.__ordinalMeta;
        }, u.type = e + "Axis." + a, u.defaultOption = o, u;
      }(n)
    );
    t.registerComponentModel(s);
  }), t.registerSubTypeDefaulter(e + "Axis", MZ);
}
function MZ(t) {
  return t.type || (t.data ? "category" : "value");
}
var Qet = (
  /** @class */
  function() {
    function t(e) {
      this.type = "cartesian", this._dimList = [], this._axes = {}, this.name = e || "";
    }
    return t.prototype.getAxis = function(e) {
      return this._axes[e];
    }, t.prototype.getAxes = function() {
      return Ce(this._dimList, function(e) {
        return this._axes[e];
      }, this);
    }, t.prototype.getAxesByScale = function(e) {
      return e = e.toLowerCase(), yn(this.getAxes(), function(n) {
        return n.scale.type === e;
      });
    }, t.prototype.addAxis = function(e) {
      var n = e.dim;
      this._axes[n] = e, this._dimList.push(n);
    }, t;
  }()
), oL = ["x", "y"];
function IZ(t) {
  return t.type === "interval" || t.type === "time";
}
var Het = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = "cartesian2d", n.dimensions = oL, n;
    }
    return e.prototype.calcAffineTransform = function() {
      this._transform = this._invTransform = null;
      var n = this.getAxis("x").scale, r = this.getAxis("y").scale;
      if (!(!IZ(n) || !IZ(r))) {
        var i = n.getExtent(), a = r.getExtent(), o = this.dataToPoint([i[0], a[0]]), s = this.dataToPoint([i[1], a[1]]), l = i[1] - i[0], u = a[1] - a[0];
        if (!(!l || !u)) {
          var c = (s[0] - o[0]) / l, f = (s[1] - o[1]) / u, d = o[0] - i[0] * c, h = o[1] - a[0] * f, p = this._transform = [c, 0, 0, f, d, h];
          this._invTransform = dp([], p);
        }
      }
    }, e.prototype.getBaseAxis = function() {
      return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x");
    }, e.prototype.containPoint = function(n) {
      var r = this.getAxis("x"), i = this.getAxis("y");
      return r.contain(r.toLocalCoord(n[0])) && i.contain(i.toLocalCoord(n[1]));
    }, e.prototype.containData = function(n) {
      return this.getAxis("x").containData(n[0]) && this.getAxis("y").containData(n[1]);
    }, e.prototype.containZone = function(n, r) {
      var i = this.dataToPoint(n), a = this.dataToPoint(r), o = this.getArea(), s = new bt(i[0], i[1], a[0] - i[0], a[1] - i[1]);
      return o.intersect(s);
    }, e.prototype.dataToPoint = function(n, r, i) {
      i = i || [];
      var a = n[0], o = n[1];
      if (this._transform && a != null && isFinite(a) && o != null && isFinite(o))
        return oi(i, n, this._transform);
      var s = this.getAxis("x"), l = this.getAxis("y");
      return i[0] = s.toGlobalCoord(s.dataToCoord(a, r)), i[1] = l.toGlobalCoord(l.dataToCoord(o, r)), i;
    }, e.prototype.clampData = function(n, r) {
      var i = this.getAxis("x").scale, a = this.getAxis("y").scale, o = i.getExtent(), s = a.getExtent(), l = i.parse(n[0]), u = a.parse(n[1]);
      return r = r || [], r[0] = Math.min(Math.max(Math.min(o[0], o[1]), l), Math.max(o[0], o[1])), r[1] = Math.min(Math.max(Math.min(s[0], s[1]), u), Math.max(s[0], s[1])), r;
    }, e.prototype.pointToData = function(n, r) {
      var i = [];
      if (this._invTransform)
        return oi(i, n, this._invTransform);
      var a = this.getAxis("x"), o = this.getAxis("y");
      return i[0] = a.coordToData(a.toLocalCoord(n[0]), r), i[1] = o.coordToData(o.toLocalCoord(n[1]), r), i;
    }, e.prototype.getOtherAxis = function(n) {
      return this.getAxis(n.dim === "x" ? "y" : "x");
    }, e.prototype.getArea = function(n) {
      n = n || 0;
      var r = this.getAxis("x").getGlobalExtent(), i = this.getAxis("y").getGlobalExtent(), a = Math.min(r[0], r[1]) - n, o = Math.min(i[0], i[1]) - n, s = Math.max(r[0], r[1]) - a + n, l = Math.max(i[0], i[1]) - o + n;
      return new bt(a, o, s, l);
    }, e;
  }(Qet)
), Get = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i, a, o) {
      var s = t.call(this, n, r, i) || this;
      return s.index = 0, s.type = a || "value", s.position = o || "bottom", s;
    }
    return e.prototype.isHorizontal = function() {
      var n = this.position;
      return n === "top" || n === "bottom";
    }, e.prototype.getGlobalExtent = function(n) {
      var r = this.getExtent();
      return r[0] = this.toGlobalCoord(r[0]), r[1] = this.toGlobalCoord(r[1]), n && r[0] > r[1] && r.reverse(), r;
    }, e.prototype.pointToData = function(n, r) {
      return this.coordToData(this.toLocalCoord(n[this.dim === "x" ? 0 : 1]), r);
    }, e.prototype.setCategorySortInfo = function(n) {
      if (this.type !== "category")
        return !1;
      this.model.option.categorySortInfo = n, this.scale.setSortInfo(n);
    }, e;
  }(vs)
);
function sL(t, e, n) {
  n = n || {};
  var r = t.coordinateSystem, i = e.axis, a = {}, o = i.getAxesOnZeroOf()[0], s = i.position, l = o ? "onZero" : s, u = i.dim, c = r.getRect(), f = [c.x, c.x + c.width, c.y, c.y + c.height], d = {
    left: 0,
    right: 1,
    top: 0,
    bottom: 1,
    onZero: 2
  }, h = e.get("offset") || 0, p = u === "x" ? [f[2] - h, f[3] + h] : [f[0] - h, f[1] + h];
  if (o) {
    var v = o.toGlobalCoord(o.dataToCoord(0));
    p[d.onZero] = Math.max(Math.min(v, p[1]), p[0]);
  }
  a.position = [u === "y" ? p[d[l]] : f[0], u === "x" ? p[d[l]] : f[3]], a.rotation = Math.PI / 2 * (u === "x" ? 0 : 1);
  var g = {
    top: -1,
    bottom: 1,
    left: -1,
    right: 1
  };
  a.labelDirection = a.tickDirection = a.nameDirection = g[s], a.labelOffset = o ? p[d[s]] - p[d.onZero] : 0, e.get(["axisTick", "inside"]) && (a.tickDirection = -a.tickDirection), br(n.labelInside, e.get(["axisLabel", "inside"])) && (a.labelDirection = -a.labelDirection);
  var m = e.get(["axisLabel", "rotate"]);
  return a.labelRotate = l === "top" ? -m : m, a.z2 = 1, a;
}
function DZ(t) {
  return t.get("coordinateSystem") === "cartesian2d";
}
function RZ(t) {
  var e = {
    xAxisModel: null,
    yAxisModel: null
  };
  return F(e, function(n, r) {
    var i = r.replace(/Model$/, ""), a = t.getReferringComponents(i, Er).models[0];
    if (process.env.NODE_ENV !== "production" && !a)
      throw new Error(i + ' "' + co(t.get(i + "Index"), t.get(i + "Id"), 0) + '" not found');
    e[r] = a;
  }), e;
}
var jM = Math.log;
function wfe(t, e, n) {
  var r = Gu.prototype, i = r.getTicks.call(n), a = r.getTicks.call(n, !0), o = i.length - 1, s = r.getInterval.call(n), l = Pce(t, e), u = l.extent, c = l.fixMin, f = l.fixMax;
  if (t.type === "log") {
    var d = jM(t.base);
    u = [jM(u[0]) / d, jM(u[1]) / d];
  }
  t.setExtent(u[0], u[1]), t.calcNiceExtent({
    splitNumber: o,
    fixMin: c,
    fixMax: f
  });
  var h = r.getExtent.call(t);
  c && (u[0] = h[0]), f && (u[1] = h[1]);
  var p = r.getInterval.call(t), v = u[0], g = u[1];
  if (c && f)
    p = (g - v) / o;
  else if (c)
    for (g = u[0] + p * o; g < u[1] && isFinite(g) && isFinite(u[1]); )
      p = MM(p), g = u[0] + p * o;
  else if (f)
    for (v = u[1] - p * o; v > u[0] && isFinite(v) && isFinite(u[0]); )
      p = MM(p), v = u[1] - p * o;
  else {
    var m = t.getTicks().length - 1;
    m > o && (p = MM(p));
    var y = p * o;
    g = Math.ceil(u[1] / p) * p, v = sr(g - y), v < 0 && u[0] >= 0 ? (v = 0, g = sr(y)) : g > 0 && u[1] <= 0 && (g = 0, v = -sr(y));
  }
  var _ = (i[0].value - a[0].value) / s, O = (i[o].value - a[o].value) / s;
  if (r.setExtent.call(t, v + p * _, g + p * O), r.setInterval.call(t, p), (_ || O) && r.setNiceExtent.call(t, v + p, g - p), process.env.NODE_ENV !== "production") {
    var S = r.getTicks.call(t);
    S[1] && (!zqe(p) || EC(S[1].value) > EC(p)) && nr(
      // eslint-disable-next-line
      "The ticks may be not readable when set min: " + e.get("min") + ", max: " + e.get("max") + " and alignTicks: true"
    );
  }
}
var jet = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.type = "grid", this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this.axisPointerEnabled = !0, this.dimensions = oL, this._initCartesian(e, n, r), this.model = e;
    }
    return t.prototype.getRect = function() {
      return this._rect;
    }, t.prototype.update = function(e, n) {
      var r = this._axesMap;
      this._updateScale(e, this.model);
      function i(o) {
        var s, l = kt(o), u = l.length;
        if (u) {
          for (var c = [], f = u - 1; f >= 0; f--) {
            var d = +l[f], h = o[d], p = h.model, v = h.scale;
            // Only value and log axis without interval support alignTicks.
            Kk(v) && p.get("alignTicks") && p.get("interval") == null ? c.push(h) : (Xh(v, p), Kk(v) && (s = h));
          }
          c.length && (s || (s = c.pop(), Xh(s.scale, s.model)), F(c, function(g) {
            wfe(g.scale, g.model, s.scale);
          }));
        }
      }
      i(r.x), i(r.y);
      var a = {};
      F(r.x, function(o) {
        kZ(r, "y", o, a);
      }), F(r.y, function(o) {
        kZ(r, "x", o, a);
      }), this.resize(this.model, n);
    }, t.prototype.resize = function(e, n, r) {
      var i = e.getBoxLayoutParams(), a = !r && e.get("containLabel"), o = Mr(i, {
        width: n.getWidth(),
        height: n.getHeight()
      });
      this._rect = o;
      var s = this._axesList;
      l(), a && (F(s, function(u) {
        if (!u.model.get(["axisLabel", "inside"])) {
          var c = uKe(u);
          if (c) {
            var f = u.isHorizontal() ? "height" : "width", d = u.model.get(["axisLabel", "margin"]);
            o[f] -= c[f] + d, u.position === "top" ? o.y += c.height + d : u.position === "left" && (o.x += c.width + d);
          }
        }
      }), l()), F(this._coordsList, function(u) {
        u.calcAffineTransform();
      });
      function l() {
        F(s, function(u) {
          var c = u.isHorizontal(), f = c ? [0, o.width] : [0, o.height], d = u.inverse ? 1 : 0;
          u.setExtent(f[d], f[1 - d]), Zet(u, c ? o.x : o.y);
        });
      }
    }, t.prototype.getAxis = function(e, n) {
      var r = this._axesMap[e];
      if (r != null)
        return r[n || 0];
    }, t.prototype.getAxes = function() {
      return this._axesList.slice();
    }, t.prototype.getCartesian = function(e, n) {
      if (e != null && n != null) {
        var r = "x" + e + "y" + n;
        return this._coordsMap[r];
      }
      nt(e) && (n = e.yAxisIndex, e = e.xAxisIndex);
      for (var i = 0, a = this._coordsList; i < a.length; i++)
        if (a[i].getAxis("x").index === e || a[i].getAxis("y").index === n)
          return a[i];
    }, t.prototype.getCartesians = function() {
      return this._coordsList.slice();
    }, t.prototype.convertToPixel = function(e, n, r) {
      var i = this._findConvertTarget(n);
      return i.cartesian ? i.cartesian.dataToPoint(r) : i.axis ? i.axis.toGlobalCoord(i.axis.dataToCoord(r)) : null;
    }, t.prototype.convertFromPixel = function(e, n, r) {
      var i = this._findConvertTarget(n);
      return i.cartesian ? i.cartesian.pointToData(r) : i.axis ? i.axis.coordToData(i.axis.toLocalCoord(r)) : null;
    }, t.prototype._findConvertTarget = function(e) {
      var n = e.seriesModel, r = e.xAxisModel || n && n.getReferringComponents("xAxis", Er).models[0], i = e.yAxisModel || n && n.getReferringComponents("yAxis", Er).models[0], a = e.gridModel, o = this._coordsList, s, l;
      if (n)
        s = n.coordinateSystem, St(o, s) < 0 && (s = null);
      else if (r && i)
        s = this.getCartesian(r.componentIndex, i.componentIndex);
      else if (r)
        l = this.getAxis("x", r.componentIndex);
      else if (i)
        l = this.getAxis("y", i.componentIndex);
      else if (a) {
        var u = a.coordinateSystem;
        u === this && (s = this._coordsList[0]);
      }
      return {
        cartesian: s,
        axis: l
      };
    }, t.prototype.containPoint = function(e) {
      var n = this._coordsList[0];
      if (n)
        return n.containPoint(e);
    }, t.prototype._initCartesian = function(e, n, r) {
      var i = this, a = this, o = {
        left: !1,
        right: !1,
        top: !1,
        bottom: !1
      }, s = {
        x: {},
        y: {}
      }, l = {
        x: 0,
        y: 0
      };
      if (n.eachComponent("xAxis", u("x"), this), n.eachComponent("yAxis", u("y"), this), !l.x || !l.y) {
        this._axesMap = {}, this._axesList = [];
        return;
      }
      this._axesMap = s, F(s.x, function(c, f) {
        F(s.y, function(d, h) {
          var p = "x" + f + "y" + h, v = new Het(p);
          v.master = i, v.model = e, i._coordsMap[p] = v, i._coordsList.push(v), v.addAxis(c), v.addAxis(d);
        });
      });
      function u(c) {
        return function(f, d) {
          if (ZM(f, e)) {
            var h = f.get("position");
            c === "x" ? h !== "top" && h !== "bottom" && (h = o.bottom ? "top" : "bottom") : h !== "left" && h !== "right" && (h = o.left ? "right" : "left"), o[h] = !0;
            var p = new Get(c, g1(f), [0, 0], f.get("type"), h), v = p.type === "category";
            p.onBand = v && f.get("boundaryGap"), p.inverse = f.get("inverse"), f.axis = p, p.model = f, p.grid = a, p.index = d, a._axesList.push(p), s[c][d] = p, l[c]++;
          }
        };
      }
    }, t.prototype._updateScale = function(e, n) {
      F(this._axesList, function(i) {
        if (i.scale.setExtent(1 / 0, -1 / 0), i.type === "category") {
          var a = i.model.get("categorySortInfo");
          i.scale.setSortInfo(a);
        }
      }), e.eachSeries(function(i) {
        if (DZ(i)) {
          var a = RZ(i), o = a.xAxisModel, s = a.yAxisModel;
          if (!ZM(o, n) || !ZM(s, n))
            return;
          var l = this.getCartesian(o.componentIndex, s.componentIndex), u = i.getData(), c = l.getAxis("x"), f = l.getAxis("y");
          r(u, c), r(u, f);
        }
      }, this);
      function r(i, a) {
        F(qC(i, a.dim), function(o) {
          a.scale.unionExtentFromData(i, o);
        });
      }
    }, t.prototype.getTooltipAxes = function(e) {
      var n = [], r = [];
      return F(this.getCartesians(), function(i) {
        var a = e != null && e !== "auto" ? i.getAxis(e) : i.getBaseAxis(), o = i.getOtherAxis(a);
        St(n, a) < 0 && n.push(a), St(r, o) < 0 && r.push(o);
      }), {
        baseAxes: n,
        otherAxes: r
      };
    }, t.create = function(e, n) {
      var r = [];
      return e.eachComponent("grid", function(i, a) {
        var o = new t(i, e, n);
        o.name = "grid_" + a, o.resize(i, n, !0), i.coordinateSystem = o, r.push(o);
      }), e.eachSeries(function(i) {
        if (DZ(i)) {
          var a = RZ(i), o = a.xAxisModel, s = a.yAxisModel, l = o.getCoordSysModel();
          if (process.env.NODE_ENV !== "production") {
            if (!l)
              throw new Error('Grid "' + co(o.get("gridIndex"), o.get("gridId"), 0) + '" not found');
            if (o.getCoordSysModel() !== s.getCoordSysModel())
              throw new Error("xAxis and yAxis must use the same grid");
          }
          var u = l.coordinateSystem;
          i.coordinateSystem = u.getCartesian(o.componentIndex, s.componentIndex);
        }
      }), r;
    }, t.dimensions = oL, t;
  }()
);
function ZM(t, e) {
  return t.getCoordSysModel() === e;
}
function kZ(t, e, n, r) {
  n.getAxesOnZeroOf = function() {
    return a ? [a] : [];
  };
  var i = t[e], a, o = n.model, s = o.get(["axisLine", "onZero"]), l = o.get(["axisLine", "onZeroAxisIndex"]);
  if (!s)
    return;
  if (l != null)
    LZ(i[l]) && (a = i[l]);
  else
    for (var u in i)
      if (i.hasOwnProperty(u) && LZ(i[u]) && !r[c(i[u])]) {
        a = i[u];
        break;
      }
  a && (r[c(a)] = !0);
  function c(f) {
    return f.dim + "_" + f.index;
  }
}
function LZ(t) {
  return t && t.type !== "category" && t.type !== "time" && lKe(t);
}
function Zet(t, e) {
  var n = t.getExtent(), r = n[0] + n[1];
  t.toGlobalCoord = t.dim === "x" ? function(i) {
    return i + e;
  } : function(i) {
    return r - i + e;
  }, t.toLocalCoord = t.dim === "x" ? function(i) {
    return i - e;
  } : function(i) {
    return r - i + e;
  };
}
var jc = Math.PI, sa = (
  /** @class */
  function() {
    function t(e, n) {
      this.group = new ct(), this.opt = n, this.axisModel = e, it(n, {
        labelOffset: 0,
        nameDirection: 1,
        tickDirection: 1,
        labelDirection: 1,
        silent: !0,
        handleAutoShown: function() {
          return !0;
        }
      });
      var r = new ct({
        x: n.position[0],
        y: n.position[1],
        rotation: n.rotation
      });
      r.updateTransform(), this._transformGroup = r;
    }
    return t.prototype.hasBuilder = function(e) {
      return !!NZ[e];
    }, t.prototype.add = function(e) {
      NZ[e](this.opt, this.axisModel, this.group, this._transformGroup);
    }, t.prototype.getGroup = function() {
      return this.group;
    }, t.innerTextLayout = function(e, n, r) {
      var i = P5(n - e), a, o;
      return Vg(i) ? (o = r > 0 ? "top" : "bottom", a = "center") : Vg(i - jc) ? (o = r > 0 ? "bottom" : "top", a = "center") : (o = "middle", i > 0 && i < jc ? a = r > 0 ? "right" : "left" : a = r > 0 ? "left" : "right"), {
        rotation: i,
        textAlign: a,
        textVerticalAlign: o
      };
    }, t.makeAxisEventDataBase = function(e) {
      var n = {
        componentType: e.mainType,
        componentIndex: e.componentIndex
      };
      return n[e.mainType + "Index"] = e.componentIndex, n;
    }, t.isLabelSilent = function(e) {
      var n = e.get("tooltip");
      return e.get("silent") || !(e.get("triggerEvent") || n && n.show);
    }, t;
  }()
), NZ = {
  axisLine: function(t, e, n, r) {
    var i = e.get(["axisLine", "show"]);
    if (i === "auto" && t.handleAutoShown && (i = t.handleAutoShown("axisLine")), !!i) {
      var a = e.axis.getExtent(), o = r.transform, s = [a[0], 0], l = [a[1], 0], u = s[0] > l[0];
      o && (oi(s, s, o), oi(l, l, o));
      var c = _e({
        lineCap: "round"
      }, e.getModel(["axisLine", "lineStyle"]).getLineStyle()), f = new Xr({
        shape: {
          x1: s[0],
          y1: s[1],
          x2: l[0],
          y2: l[1]
        },
        style: c,
        strokeContainThreshold: t.strokeContainThreshold || 5,
        silent: !0,
        z2: 1
      });
      Qg(f.shape, f.style.lineWidth), f.anid = "line", n.add(f);
      var d = e.get(["axisLine", "symbol"]);
      if (d != null) {
        var h = e.get(["axisLine", "symbolSize"]);
        Ve(d) && (d = [d, d]), (Ve(h) || Kt(h)) && (h = [h, h]);
        var p = mp(e.get(["axisLine", "symbolOffset"]) || 0, h), v = h[0], g = h[1];
        F([{
          rotate: t.rotation + Math.PI / 2,
          offset: p[0],
          r: 0
        }, {
          rotate: t.rotation - Math.PI / 2,
          offset: p[1],
          r: Math.sqrt((s[0] - l[0]) * (s[0] - l[0]) + (s[1] - l[1]) * (s[1] - l[1]))
        }], function(m, y) {
          if (d[y] !== "none" && d[y] != null) {
            var _ = Sr(d[y], -v / 2, -g / 2, v, g, c.stroke, !0), O = m.r + m.offset, S = u ? l : s;
            _.attr({
              rotation: m.rotate,
              x: S[0] + O * Math.cos(t.rotation),
              y: S[1] - O * Math.sin(t.rotation),
              silent: !0,
              z2: 11
            }), n.add(_);
          }
        });
      }
    }
  },
  axisTickLabel: function(t, e, n, r) {
    var i = Yet(n, r, e, t), a = Ket(n, r, e, t);
    if (Xet(e, a, i), qet(n, r, e, t.tickDirection), e.get(["axisLabel", "hideOverlap"])) {
      var o = Fce(Ce(a, function(s) {
        return {
          label: s,
          priority: s.z2,
          defaultAttr: {
            ignore: s.ignore
          }
        };
      }));
      Hce(o);
    }
  },
  axisName: function(t, e, n, r) {
    var i = br(t.axisName, e.get("name"));
    if (i) {
      var a = e.get("nameLocation"), o = t.nameDirection, s = e.getModel("nameTextStyle"), l = e.get("nameGap") || 0, u = e.axis.getExtent(), c = u[0] > u[1] ? -1 : 1, f = [
        a === "start" ? u[0] - c * l : a === "end" ? u[1] + c * l : (u[0] + u[1]) / 2,
        // Reuse labelOffset.
        zZ(a) ? t.labelOffset + o * l : 0
      ], d, h = e.get("nameRotate");
      h != null && (h = h * jc / 180);
      var p;
      zZ(a) ? d = sa.innerTextLayout(
        t.rotation,
        h ?? t.rotation,
        // Adapt to axis.
        o
      ) : (d = Uet(t.rotation, a, h || 0, u), p = t.axisNameAvailableWidth, p != null && (p = Math.abs(p / Math.sin(d.rotation)), !isFinite(p) && (p = null)));
      var v = s.getFont(), g = e.get("nameTruncate", !0) || {}, m = g.ellipsis, y = br(t.nameTruncateMaxWidth, g.maxWidth, p), _ = new jt({
        x: f[0],
        y: f[1],
        rotation: d.rotation,
        silent: sa.isLabelSilent(e),
        style: Mn(s, {
          text: i,
          font: v,
          overflow: "truncate",
          width: y,
          ellipsis: m,
          fill: s.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
          align: s.get("align") || d.textAlign,
          verticalAlign: s.get("verticalAlign") || d.textVerticalAlign
        }),
        z2: 1
      });
      if (xm({
        el: _,
        componentModel: e,
        itemName: i
      }), _.__fullText = i, _.anid = "name", e.get("triggerEvent")) {
        var O = sa.makeAxisEventDataBase(e);
        O.targetType = "axisName", O.name = i, ft(_).eventData = O;
      }
      r.add(_), _.updateTransform(), n.add(_), _.decomposeTransform();
    }
  }
};
function Uet(t, e, n, r) {
  var i = P5(n - t), a, o, s = r[0] > r[1], l = e === "start" && !s || e !== "start" && s;
  return Vg(i - jc / 2) ? (o = l ? "bottom" : "top", a = "center") : Vg(i - jc * 1.5) ? (o = l ? "top" : "bottom", a = "center") : (o = "middle", i < jc * 1.5 && i > jc / 2 ? a = l ? "left" : "right" : a = l ? "right" : "left"), {
    rotation: i,
    textAlign: a,
    textVerticalAlign: o
  };
}
function Xet(t, e, n) {
  if (!$ce(t.axis)) {
    var r = t.get(["axisLabel", "showMinLabel"]), i = t.get(["axisLabel", "showMaxLabel"]);
    e = e || [], n = n || [];
    var a = e[0], o = e[1], s = e[e.length - 1], l = e[e.length - 2], u = n[0], c = n[1], f = n[n.length - 1], d = n[n.length - 2];
    r === !1 ? (Io(a), Io(u)) : BZ(a, o) && (r ? (Io(o), Io(c)) : (Io(a), Io(u))), i === !1 ? (Io(s), Io(f)) : BZ(l, s) && (i ? (Io(l), Io(d)) : (Io(s), Io(f)));
  }
}
function Io(t) {
  t && (t.ignore = !0);
}
function BZ(t, e) {
  var n = t && t.getBoundingRect().clone(), r = e && e.getBoundingRect().clone();
  if (!(!n || !r)) {
    var i = i1([]);
    return Lf(i, i, -t.rotation), n.applyTransform(Ll([], i, t.getLocalTransform())), r.applyTransform(Ll([], i, e.getLocalTransform())), n.intersect(r);
  }
}
function zZ(t) {
  return t === "middle" || t === "center";
}
function Cfe(t, e, n, r, i) {
  for (var a = [], o = [], s = [], l = 0; l < t.length; l++) {
    var u = t[l].coord;
    o[0] = u, o[1] = 0, s[0] = u, s[1] = n, e && (oi(o, o, e), oi(s, s, e));
    var c = new Xr({
      shape: {
        x1: o[0],
        y1: o[1],
        x2: s[0],
        y2: s[1]
      },
      style: r,
      z2: 2,
      autoBatch: !0,
      silent: !0
    });
    Qg(c.shape, c.style.lineWidth), c.anid = i + "_" + t[l].tickValue, a.push(c);
  }
  return a;
}
function Yet(t, e, n, r) {
  var i = n.axis, a = n.getModel("axisTick"), o = a.get("show");
  if (o === "auto" && r.handleAutoShown && (o = r.handleAutoShown("axisTick")), !(!o || i.scale.isBlank())) {
    for (var s = a.getModel("lineStyle"), l = r.tickDirection * a.get("length"), u = i.getTicksCoords(), c = Cfe(u, e.transform, l, it(s.getLineStyle(), {
      stroke: n.get(["axisLine", "lineStyle", "color"])
    }), "ticks"), f = 0; f < c.length; f++)
      t.add(c[f]);
    return c;
  }
}
function qet(t, e, n, r) {
  var i = n.axis, a = n.getModel("minorTick");
  if (!(!a.get("show") || i.scale.isBlank())) {
    var o = i.getMinorTicksCoords();
    if (o.length)
      for (var s = a.getModel("lineStyle"), l = r * a.get("length"), u = it(s.getLineStyle(), it(n.getModel("axisTick").getLineStyle(), {
        stroke: n.get(["axisLine", "lineStyle", "color"])
      })), c = 0; c < o.length; c++)
        for (var f = Cfe(o[c], e.transform, l, u, "minorticks_" + c), d = 0; d < f.length; d++)
          t.add(f[d]);
  }
}
function Ket(t, e, n, r) {
  var i = n.axis, a = br(r.axisLabelShow, n.get(["axisLabel", "show"]));
  if (!(!a || i.scale.isBlank())) {
    var o = n.getModel("axisLabel"), s = o.get("margin"), l = i.getViewLabels(), u = (br(r.labelRotate, o.get("rotate")) || 0) * jc / 180, c = sa.innerTextLayout(r.rotation, u, r.labelDirection), f = n.getCategories && n.getCategories(!0), d = [], h = sa.isLabelSilent(n), p = n.get("triggerEvent");
    return F(l, function(v, g) {
      var m = i.scale.type === "ordinal" ? i.scale.getRawOrdinalNumber(v.tickValue) : v.tickValue, y = v.formattedLabel, _ = v.rawLabel, O = o;
      if (f && f[m]) {
        var S = f[m];
        nt(S) && S.textStyle && (O = new xn(S.textStyle, o, n.ecModel));
      }
      var x = O.getTextColor() || n.get(["axisLine", "lineStyle", "color"]), C = i.dataToCoord(m), P = O.getShallow("align", !0) || c.textAlign, $ = dt(O.getShallow("alignMinLabel", !0), P), T = dt(O.getShallow("alignMaxLabel", !0), P), E = O.getShallow("verticalAlign", !0) || O.getShallow("baseline", !0) || c.textVerticalAlign, M = dt(O.getShallow("verticalAlignMinLabel", !0), E), R = dt(O.getShallow("verticalAlignMaxLabel", !0), E), N = new jt({
        x: C,
        y: r.labelOffset + r.labelDirection * s,
        rotation: c.rotation,
        silent: h,
        z2: 10 + (v.level || 0),
        style: Mn(O, {
          text: y,
          align: g === 0 ? $ : g === l.length - 1 ? T : P,
          verticalAlign: g === 0 ? M : g === l.length - 1 ? R : E,
          fill: qe(x) ? x(
            // (1) In category axis with data zoom, tick is not the original
            // index of axis.data. So tick should not be exposed to user
            // in category axis.
            // (2) Compatible with previous version, which always use formatted label as
            // input. But in interval scale the formatted label is like '223,445', which
            // maked user replace ','. So we modify it to return original val but remain
            // it as 'string' to avoid error in replacing.
            i.type === "category" ? _ : i.type === "value" ? m + "" : m,
            g
          ) : x
        })
      });
      if (N.anid = "label_" + m, p) {
        var I = sa.makeAxisEventDataBase(n);
        I.targetType = "axisLabel", I.value = _, I.tickIndex = g, i.type === "category" && (I.dataIndex = m), ft(N).eventData = I;
      }
      e.add(N), N.updateTransform(), d.push(N), t.add(N), N.decomposeTransform();
    }), d;
  }
}
function Jet(t, e) {
  var n = {
    /**
     * key: makeKey(axis.model)
     * value: {
     *      axis,
     *      coordSys,
     *      axisPointerModel,
     *      triggerTooltip,
     *      triggerEmphasis,
     *      involveSeries,
     *      snap,
     *      seriesModels,
     *      seriesDataCount
     * }
     */
    axesInfo: {},
    seriesInvolved: !1,
    /**
     * key: makeKey(coordSys.model)
     * value: Object: key makeKey(axis.model), value: axisInfo
     */
    coordSysAxesInfo: {},
    coordSysMap: {}
  };
  return ett(n, t, e), n.seriesInvolved && ntt(n, t), n;
}
function ett(t, e, n) {
  var r = e.getComponent("tooltip"), i = e.getComponent("axisPointer"), a = i.get("link", !0) || [], o = [];
  F(n.getCoordinateSystems(), function(s) {
    if (!s.axisPointerEnabled)
      return;
    var l = o_(s.model), u = t.coordSysAxesInfo[l] = {};
    t.coordSysMap[l] = s;
    var c = s.model, f = c.getModel("tooltip", r);
    if (F(s.getAxes(), vt(v, !1, null)), s.getTooltipAxes && r && f.get("show")) {
      var d = f.get("trigger") === "axis", h = f.get(["axisPointer", "type"]) === "cross", p = s.getTooltipAxes(f.get(["axisPointer", "axis"]));
      (d || h) && F(p.baseAxes, vt(v, h ? "cross" : !0, d)), h && F(p.otherAxes, vt(v, "cross", !1));
    }
    function v(g, m, y) {
      var _ = y.model.getModel("axisPointer", i), O = _.get("show");
      if (!(!O || O === "auto" && !g && !lL(_))) {
        m == null && (m = _.get("triggerTooltip")), _ = g ? ttt(y, f, i, e, g, m) : _;
        var S = _.get("snap"), x = _.get("triggerEmphasis"), C = o_(y.model), P = m || S || y.type === "category", $ = t.axesInfo[C] = {
          key: C,
          axis: y,
          coordSys: s,
          axisPointerModel: _,
          triggerTooltip: m,
          triggerEmphasis: x,
          involveSeries: P,
          snap: S,
          useHandle: lL(_),
          seriesModels: [],
          linkGroup: null
        };
        u[C] = $, t.seriesInvolved = t.seriesInvolved || P;
        var T = rtt(a, y);
        if (T != null) {
          var E = o[T] || (o[T] = {
            axesInfo: {}
          });
          E.axesInfo[C] = $, E.mapper = a[T].mapper, $.linkGroup = E;
        }
      }
    }
  });
}
function ttt(t, e, n, r, i, a) {
  var o = e.getModel("axisPointer"), s = ["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], l = {};
  F(s, function(d) {
    l[d] = ot(o.get(d));
  }), l.snap = t.type !== "category" && !!a, o.get("type") === "cross" && (l.type = "line");
  var u = l.label || (l.label = {});
  if (u.show == null && (u.show = !1), i === "cross") {
    var c = o.get(["label", "show"]);
    if (u.show = c ?? !0, !a) {
      var f = l.lineStyle = o.get("crossStyle");
      f && it(u, f.textStyle);
    }
  }
  return t.model.getModel("axisPointer", new xn(l, n, r));
}
function ntt(t, e) {
  e.eachSeries(function(n) {
    var r = n.coordinateSystem, i = n.get(["tooltip", "trigger"], !0), a = n.get(["tooltip", "show"], !0);
    !r || i === "none" || i === !1 || i === "item" || a === !1 || n.get(["axisPointer", "show"], !0) === !1 || F(t.coordSysAxesInfo[o_(r.model)], function(o) {
      var s = o.axis;
      r.getAxis(s.dim) === s && (o.seriesModels.push(n), o.seriesDataCount == null && (o.seriesDataCount = 0), o.seriesDataCount += n.getData().count());
    });
  });
}
function rtt(t, e) {
  for (var n = e.model, r = e.dim, i = 0; i < t.length; i++) {
    var a = t[i] || {};
    if (UM(a[r + "AxisId"], n.id) || UM(a[r + "AxisIndex"], n.componentIndex) || UM(a[r + "AxisName"], n.name))
      return i;
  }
}
function UM(t, e) {
  return t === "all" || Se(t) && St(t, e) >= 0 || t === e;
}
function itt(t) {
  var e = B3(t);
  if (e) {
    var n = e.axisPointerModel, r = e.axis.scale, i = n.option, a = n.get("status"), o = n.get("value");
    o != null && (o = r.parse(o));
    var s = lL(n);
    a == null && (i.status = s ? "show" : "hide");
    var l = r.getExtent().slice();
    l[0] > l[1] && l.reverse(), // Pick a value on axis when initializing.
    (o == null || o > l[1]) && (o = l[1]), o < l[0] && (o = l[0]), i.value = o, s && (i.status = e.axis.scale.isBlank() ? "hide" : "show");
  }
}
function B3(t) {
  var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
  return e && e.axesInfo[o_(t)];
}
function att(t) {
  var e = B3(t);
  return e && e.axisPointerModel;
}
function lL(t) {
  return !!t.get(["handle", "show"]);
}
function o_(t) {
  return t.type + "||" + t.id;
}
var XM = {}, bp = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i, a) {
      this.axisPointerClass && itt(n), t.prototype.render.apply(this, arguments), this._doUpdateAxisPointerClass(n, i, !0);
    }, e.prototype.updateAxisPointer = function(n, r, i, a) {
      this._doUpdateAxisPointerClass(n, i, !1);
    }, e.prototype.remove = function(n, r) {
      var i = this._axisPointer;
      i && i.remove(r);
    }, e.prototype.dispose = function(n, r) {
      this._disposeAxisPointer(r), t.prototype.dispose.apply(this, arguments);
    }, e.prototype._doUpdateAxisPointerClass = function(n, r, i) {
      var a = e.getAxisPointerClass(this.axisPointerClass);
      if (a) {
        var o = att(n);
        o ? (this._axisPointer || (this._axisPointer = new a())).render(n, o, r, i) : this._disposeAxisPointer(r);
      }
    }, e.prototype._disposeAxisPointer = function(n) {
      this._axisPointer && this._axisPointer.dispose(n), this._axisPointer = null;
    }, e.registerAxisPointerClass = function(n, r) {
      if (process.env.NODE_ENV !== "production" && XM[n])
        throw new Error("axisPointer " + n + " exists");
      XM[n] = r;
    }, e.getAxisPointerClass = function(n) {
      return n && XM[n];
    }, e.type = "axis", e;
  }(Ln)
), uL = Ut();
function Tfe(t, e, n, r) {
  var i = n.axis;
  if (!i.scale.isBlank()) {
    var a = n.getModel("splitArea"), o = a.getModel("areaStyle"), s = o.get("color"), l = r.coordinateSystem.getRect(), u = i.getTicksCoords({
      tickModel: a,
      clamp: !0
    });
    if (u.length) {
      var c = s.length, f = uL(t).splitAreaColors, d = Ze(), h = 0;
      if (f)
        for (var p = 0; p < u.length; p++) {
          var v = f.get(u[p].tickValue);
          if (v != null) {
            h = (v + (c - 1) * p) % c;
            break;
          }
        }
      var g = i.toGlobalCoord(u[0].coord), m = o.getAreaStyle();
      s = Se(s) ? s : [s];
      for (var p = 1; p < u.length; p++) {
        var y = i.toGlobalCoord(u[p].coord), _ = void 0, O = void 0, S = void 0, x = void 0;
        i.isHorizontal() ? (_ = g, O = l.y, S = y - _, x = l.height, g = _ + S) : (_ = l.x, O = g, S = l.width, x = y - O, g = O + x);
        var C = u[p - 1].tickValue;
        C != null && d.set(C, h), e.add(new Zt({
          anid: C != null ? "area_" + C : null,
          shape: {
            x: _,
            y: O,
            width: S,
            height: x
          },
          style: it({
            fill: s[h]
          }, m),
          autoBatch: !0,
          silent: !0
        })), h = (h + 1) % c;
      }
      uL(t).splitAreaColors = d;
    }
  }
}
function Pfe(t) {
  uL(t).splitAreaColors = null;
}
var ott = ["axisLine", "axisTickLabel", "axisName"], stt = ["splitArea", "splitLine", "minorSplitLine"], $fe = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.axisPointerClass = "CartesianAxisPointer", n;
    }
    return e.prototype.render = function(n, r, i, a) {
      this.group.removeAll();
      var o = this._axisGroup;
      if (this._axisGroup = new ct(), this.group.add(this._axisGroup), !!n.get("show")) {
        var s = n.getCoordSysModel(), l = sL(s, n), u = new sa(n, _e({
          handleAutoShown: function(f) {
            for (var d = s.coordinateSystem.getCartesians(), h = 0; h < d.length; h++)
              if (Kk(d[h].getOtherAxis(n.axis).scale))
                return !0;
            return !1;
          }
        }, l));
        F(ott, u.add, u), this._axisGroup.add(u.getGroup()), F(stt, function(f) {
          n.get([f, "show"]) && ltt[f](this, this._axisGroup, n, s);
        }, this);
        var c = a && a.type === "changeAxisOrder" && a.isInitSort;
        c || h1(o, this._axisGroup, n), t.prototype.render.call(this, n, r, i, a);
      }
    }, e.prototype.remove = function() {
      Pfe(this);
    }, e.type = "cartesianAxis", e;
  }(bp)
), ltt = {
  splitLine: function(t, e, n, r) {
    var i = n.axis;
    if (!i.scale.isBlank()) {
      var a = n.getModel("splitLine"), o = a.getModel("lineStyle"), s = o.get("color");
      s = Se(s) ? s : [s];
      for (var l = r.coordinateSystem.getRect(), u = i.isHorizontal(), c = 0, f = i.getTicksCoords({
        tickModel: a
      }), d = [], h = [], p = o.getLineStyle(), v = 0; v < f.length; v++) {
        var g = i.toGlobalCoord(f[v].coord);
        u ? (d[0] = g, d[1] = l.y, h[0] = g, h[1] = l.y + l.height) : (d[0] = l.x, d[1] = g, h[0] = l.x + l.width, h[1] = g);
        var m = c++ % s.length, y = f[v].tickValue, _ = new Xr({
          anid: y != null ? "line_" + f[v].tickValue : null,
          autoBatch: !0,
          shape: {
            x1: d[0],
            y1: d[1],
            x2: h[0],
            y2: h[1]
          },
          style: it({
            stroke: s[m]
          }, p),
          silent: !0
        });
        Qg(_.shape, p.lineWidth), e.add(_);
      }
    }
  },
  minorSplitLine: function(t, e, n, r) {
    var i = n.axis, a = n.getModel("minorSplitLine"), o = a.getModel("lineStyle"), s = r.coordinateSystem.getRect(), l = i.isHorizontal(), u = i.getMinorTicksCoords();
    if (u.length)
      for (var c = [], f = [], d = o.getLineStyle(), h = 0; h < u.length; h++)
        for (var p = 0; p < u[h].length; p++) {
          var v = i.toGlobalCoord(u[h][p].coord);
          l ? (c[0] = v, c[1] = s.y, f[0] = v, f[1] = s.y + s.height) : (c[0] = s.x, c[1] = v, f[0] = s.x + s.width, f[1] = v);
          var g = new Xr({
            anid: "minor_line_" + u[h][p].tickValue,
            autoBatch: !0,
            shape: {
              x1: c[0],
              y1: c[1],
              x2: f[0],
              y2: f[1]
            },
            style: d,
            silent: !0
          });
          Qg(g.shape, d.lineWidth), e.add(g);
        }
  },
  splitArea: function(t, e, n, r) {
    Tfe(t, e, n, r);
  }
}, Afe = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "xAxis", e;
  }($fe)
), utt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = Afe.type, n;
    }
    return e.type = "yAxis", e;
  }($fe)
), ctt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = "grid", n;
    }
    return e.prototype.render = function(n, r) {
      this.group.removeAll(), n.get("show") && this.group.add(new Zt({
        shape: n.coordinateSystem.getRect(),
        style: it({
          fill: n.get("backgroundColor")
        }, n.getItemStyle()),
        silent: !0,
        z2: -1
      }));
    }, e.type = "grid", e;
  }(Ln)
), VZ = {
  // gridIndex: 0,
  // gridId: '',
  offset: 0
};
function Efe(t) {
  t.registerComponentView(ctt), t.registerComponentModel(Bet), t.registerCoordinateSystem("cartesian2d", jet), Zg(t, "x", aL, VZ), Zg(t, "y", aL, VZ), t.registerComponentView(Afe), t.registerComponentView(utt), t.registerPreprocessor(function(e) {
    e.xAxis && e.yAxis && !e.grid && (e.grid = {});
  });
}
function ftt(t) {
  Mt(Efe), t.registerSeriesModel(Det), t.registerChartView(Net), t.registerLayout(_1("scatter"));
}
function dtt(t) {
  t.eachSeriesByType("radar", function(e) {
    var n = e.getData(), r = [], i = e.coordinateSystem;
    if (i) {
      var a = i.getIndicatorAxes();
      F(a, function(o, s) {
        n.each(n.mapDimension(a[s].dim), function(l, u) {
          r[u] = r[u] || [];
          var c = i.dataToPoint(l, s);
          r[u][s] = FZ(c) ? c : WZ(i);
        });
      }), n.each(function(o) {
        var s = Uoe(r[o], function(l) {
          return FZ(l);
        }) || WZ(i);
        r[o].push(s.slice()), n.setItemLayout(o, r[o]);
      });
    }
  });
}
function FZ(t) {
  return !isNaN(t[0]) && !isNaN(t[1]);
}
function WZ(t) {
  return [t.cx, t.cy];
}
function htt(t) {
  var e = t.polar;
  if (e) {
    Se(e) || (e = [e]);
    var n = [];
    F(e, function(r, i) {
      r.indicator ? (r.type && !r.shape && (r.shape = r.type), t.radar = t.radar || [], Se(t.radar) || (t.radar = [t.radar]), t.radar.push(r)) : n.push(r);
    }), t.polar = n;
  }
  F(t.series, function(r) {
    r && r.type === "radar" && r.polarIndex && (r.radarIndex = r.polarIndex);
  });
}
var ptt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = n.coordinateSystem, o = this.group, s = n.getData(), l = this._data;
      function u(d, h) {
        var p = d.getItemVisual(h, "symbol") || "circle";
        if (p !== "none") {
          var v = Em(d.getItemVisual(h, "symbolSize")), g = Sr(p, -1, -1, 2, 2), m = d.getItemVisual(h, "symbolRotate") || 0;
          return g.attr({
            style: {
              strokeNoScale: !0
            },
            z2: 100,
            scaleX: v[0] / 2,
            scaleY: v[1] / 2,
            rotation: m * Math.PI / 180 || 0
          }), g;
        }
      }
      function c(d, h, p, v, g, m) {
        p.removeAll();
        for (var y = 0; y < h.length - 1; y++) {
          var _ = u(v, g);
          _ && (_.__dimIdx = y, d[y] ? (_.setPosition(d[y]), hp[m ? "initProps" : "updateProps"](_, {
            x: h[y][0],
            y: h[y][1]
          }, n, g)) : _.setPosition(h[y]), p.add(_));
        }
      }
      function f(d) {
        return Ce(d, function(h) {
          return [a.cx, a.cy];
        });
      }
      s.diff(l).add(function(d) {
        var h = s.getItemLayout(d);
        if (h) {
          var p = new pa(), v = new va(), g = {
            shape: {
              points: h
            }
          };
          p.shape.points = f(h), v.shape.points = f(h), Vn(p, g, n, d), Vn(v, g, n, d);
          var m = new ct(), y = new ct();
          m.add(v), m.add(p), m.add(y), c(v.shape.points, h, y, s, d, !0), s.setItemGraphicEl(d, m);
        }
      }).update(function(d, h) {
        var p = l.getItemGraphicEl(h), v = p.childAt(0), g = p.childAt(1), m = p.childAt(2), y = {
          shape: {
            points: s.getItemLayout(d)
          }
        };
        y.shape.points && (c(v.shape.points, y.shape.points, m, s, d, !1), Zs(g), Zs(v), tn(v, y, n), tn(g, y, n), s.setItemGraphicEl(d, p));
      }).remove(function(d) {
        o.remove(l.getItemGraphicEl(d));
      }).execute(), s.eachItemGraphicEl(function(d, h) {
        var p = s.getItemModel(h), v = d.childAt(0), g = d.childAt(1), m = d.childAt(2), y = s.getItemVisual(h, "style"), _ = y.fill;
        o.add(d), v.useStyle(it(p.getModel("lineStyle").getLineStyle(), {
          fill: "none",
          stroke: _
        })), Ai(v, p, "lineStyle"), Ai(g, p, "areaStyle");
        var O = p.getModel("areaStyle"), S = O.isEmpty() && O.parentModel.isEmpty();
        g.ignore = S, F(["emphasis", "select", "blur"], function(P) {
          var $ = p.getModel([P, "areaStyle"]), T = $.isEmpty() && $.parentModel.isEmpty();
          g.ensureState(P).ignore = T && S;
        }), g.useStyle(it(O.getAreaStyle(), {
          fill: _,
          opacity: 0.7,
          decal: y.decal
        }));
        var x = p.getModel("emphasis"), C = x.getModel("itemStyle").getItemStyle();
        m.eachChild(function(P) {
          if (P instanceof ci) {
            var $ = P.style;
            P.useStyle(_e({
              // TODO other properties like x, y ?
              image: $.image,
              x: $.x,
              y: $.y,
              width: $.width,
              height: $.height
            }, y));
          } else
            P.useStyle(y), P.setColor(_), P.style.strokeNoScale = !0;
          var T = P.ensureState("emphasis");
          T.style = ot(C);
          var E = s.getStore().get(s.getDimensionIndex(P.__dimIdx), h);
          (E == null || isNaN(E)) && (E = ""), Ei(P, ei(p), {
            labelFetcher: s.hostModel,
            labelDataIndex: h,
            labelDimIndex: P.__dimIdx,
            defaultText: E,
            inheritColor: _,
            defaultOpacity: y.opacity
          });
        }), ur(d, x.get("focus"), x.get("blurScope"), x.get("disabled"));
      }), this._data = s;
    }, e.prototype.remove = function() {
      this.group.removeAll(), this._data = null;
    }, e.type = "radar", e;
  }(_n)
), vtt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.hasSymbolVisual = !0, n;
    }
    return e.prototype.init = function(n) {
      t.prototype.init.apply(this, arguments), this.legendVisualProvider = new S1(We(this.getData, this), We(this.getRawData, this));
    }, e.prototype.getInitialData = function(n, r) {
      return Rm(this, {
        generateCoord: "indicator_",
        generateCoordCount: 1 / 0
      });
    }, e.prototype.formatTooltip = function(n, r, i) {
      var a = this.getData(), o = this.coordinateSystem, s = o.getIndicatorAxes(), l = this.getData().getName(n), u = l === "" ? this.name : l, c = Tue(this, n);
      return ti("section", {
        header: u,
        sortBlocks: !0,
        blocks: Ce(s, function(f) {
          var d = a.get(a.mapDimension(f.dim), n);
          return ti("nameValue", {
            markerType: "subItem",
            markerColor: c,
            name: f.name,
            value: d,
            sortParam: d
          });
        })
      });
    }, e.prototype.getTooltipPosition = function(n) {
      if (n != null) {
        for (var r = this.getData(), i = this.coordinateSystem, a = r.getValues(Ce(i.dimensions, function(u) {
          return r.mapDimension(u);
        }), n), o = 0, s = a.length; o < s; o++)
          if (!isNaN(a[o])) {
            var l = i.getIndicatorAxes();
            return i.coordToPoint(l[o].dataToCoord(a[o]), o);
          }
      }
    }, e.type = "series.radar", e.dependencies = ["radar"], e.defaultOption = {
      // zlevel: 0,
      z: 2,
      colorBy: "data",
      coordinateSystem: "radar",
      legendHoverLink: !0,
      radarIndex: 0,
      lineStyle: {
        width: 2,
        type: "solid",
        join: "round"
      },
      label: {
        position: "top"
      },
      // areaStyle: {
      // },
      // itemStyle: {}
      symbolSize: 8
      // symbolRotate: null
    }, e;
  }(Cn)
), Q0 = xfe.value;
function FS(t, e) {
  return it({
    show: e
  }, t);
}
var gtt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.optionUpdated = function() {
      var n = this.get("boundaryGap"), r = this.get("splitNumber"), i = this.get("scale"), a = this.get("axisLine"), o = this.get("axisTick"), s = this.get("axisLabel"), l = this.get("axisName"), u = this.get(["axisName", "show"]), c = this.get(["axisName", "formatter"]), f = this.get("axisNameGap"), d = this.get("triggerEvent"), h = Ce(this.get("indicator") || [], function(p) {
        p.max != null && p.max > 0 && !p.min ? p.min = 0 : p.min != null && p.min < 0 && !p.max && (p.max = 0);
        var v = l;
        p.color != null && (v = it({
          color: p.color
        }, l));
        var g = mt(ot(p), {
          boundaryGap: n,
          splitNumber: r,
          scale: i,
          axisLine: a,
          axisTick: o,
          // axisType: axisType,
          axisLabel: s,
          // Compatible with 2 and use text
          name: p.text,
          showName: u,
          nameLocation: "end",
          nameGap: f,
          // min: 0,
          nameTextStyle: v,
          triggerEvent: d
        }, !1);
        if (Ve(c)) {
          var m = g.name;
          g.name = c.replace("{value}", m ?? "");
        } else qe(c) && (g.name = c(g.name, g));
        var y = new xn(g, null, this.ecModel);
        return vr(y, Dm.prototype), y.mainType = "radar", y.componentIndex = this.componentIndex, y;
      }, this);
      this._indicatorModels = h;
    }, e.prototype.getIndicatorModels = function() {
      return this._indicatorModels;
    }, e.type = "radar", e.defaultOption = {
      // zlevel: 0,
      z: 0,
      center: ["50%", "50%"],
      radius: "75%",
      startAngle: 90,
      axisName: {
        show: !0
        // formatter: null
        // textStyle: {}
      },
      boundaryGap: [0, 0],
      splitNumber: 5,
      axisNameGap: 15,
      scale: !1,
      // Polygon or circle
      shape: "polygon",
      axisLine: mt({
        lineStyle: {
          color: "#bbb"
        }
      }, Q0.axisLine),
      axisLabel: FS(Q0.axisLabel, !1),
      axisTick: FS(Q0.axisTick, !1),
      // axisType: 'value',
      splitLine: FS(Q0.splitLine, !0),
      splitArea: FS(Q0.splitArea, !0),
      // {text, min, max}
      indicator: []
    }, e;
  }(At)
), mtt = ["axisLine", "axisTickLabel", "axisName"], ytt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = this.group;
      a.removeAll(), this._buildAxes(n), this._buildSplitLineAndArea(n);
    }, e.prototype._buildAxes = function(n) {
      var r = n.coordinateSystem, i = r.getIndicatorAxes(), a = Ce(i, function(o) {
        var s = o.model.get("showName") ? o.name : "", l = new sa(o.model, {
          axisName: s,
          position: [r.cx, r.cy],
          rotation: o.angle,
          labelDirection: -1,
          tickDirection: -1,
          nameDirection: 1
        });
        return l;
      });
      F(a, function(o) {
        F(mtt, o.add, o), this.group.add(o.getGroup());
      }, this);
    }, e.prototype._buildSplitLineAndArea = function(n) {
      var r = n.coordinateSystem, i = r.getIndicatorAxes();
      if (!i.length)
        return;
      var a = n.get("shape"), o = n.getModel("splitLine"), s = n.getModel("splitArea"), l = o.getModel("lineStyle"), u = s.getModel("areaStyle"), c = o.get("show"), f = s.get("show"), d = l.get("color"), h = u.get("color"), p = Se(d) ? d : [d], v = Se(h) ? h : [h], g = [], m = [];
      function y(I, B, Q) {
        var W = Q % B.length;
        return I[W] = I[W] || [], W;
      }
      if (a === "circle")
        for (var _ = i[0].getTicksCoords(), O = r.cx, S = r.cy, x = 0; x < _.length; x++) {
          if (c) {
            var C = y(g, p, x);
            g[C].push(new ic({
              shape: {
                cx: O,
                cy: S,
                r: _[x].coord
              }
            }));
          }
          if (f && x < _.length - 1) {
            var C = y(m, v, x);
            m[C].push(new c1({
              shape: {
                cx: O,
                cy: S,
                r0: _[x].coord,
                r: _[x + 1].coord
              }
            }));
          }
        }
      else
        for (var P, $ = Ce(i, function(I, B) {
          var Q = I.getTicksCoords();
          return P = P == null ? Q.length - 1 : Math.min(Q.length - 1, P), Ce(Q, function(W) {
            return r.coordToPoint(W.coord, B);
          });
        }), T = [], x = 0; x <= P; x++) {
          for (var E = [], M = 0; M < i.length; M++)
            E.push($[M][x]);
          if (E[0] ? E.push(E[0].slice()) : process.env.NODE_ENV !== "production" && console.error("Can't draw value axis " + x), c) {
            var C = y(g, p, x);
            g[C].push(new va({
              shape: {
                points: E
              }
            }));
          }
          if (f && T) {
            var C = y(m, v, x - 1);
            m[C].push(new pa({
              shape: {
                points: E.concat(T)
              }
            }));
          }
          T = E.slice().reverse();
        }
      var R = l.getLineStyle(), N = u.getAreaStyle();
      F(m, function(I, B) {
        this.group.add(no(I, {
          style: it({
            stroke: "none",
            fill: v[B % v.length]
          }, N),
          silent: !0
        }));
      }, this), F(g, function(I, B) {
        this.group.add(no(I, {
          style: it({
            fill: "none",
            stroke: p[B % p.length]
          }, R),
          silent: !0
        }));
      }, this);
    }, e.type = "radar", e;
  }(Ln)
), btt = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i) {
      var a = t.call(this, n, r, i) || this;
      return a.type = "value", a.angle = 0, a.name = "", a;
    }
    return e;
  }(vs)
), _tt = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.dimensions = [], this._model = e, this._indicatorAxes = Ce(e.getIndicatorModels(), function(i, a) {
        var o = "indicator_" + a, s = new btt(
          o,
          new Gu()
          // (indicatorModel.get('axisType') === 'log') ? new LogScale() : new IntervalScale()
        );
        return s.name = i.get("name"), s.model = i, i.axis = s, this.dimensions.push(o), s;
      }, this), this.resize(e, r);
    }
    return t.prototype.getIndicatorAxes = function() {
      return this._indicatorAxes;
    }, t.prototype.dataToPoint = function(e, n) {
      var r = this._indicatorAxes[n];
      return this.coordToPoint(r.dataToCoord(e), n);
    }, t.prototype.coordToPoint = function(e, n) {
      var r = this._indicatorAxes[n], i = r.angle, a = this.cx + e * Math.cos(i), o = this.cy - e * Math.sin(i);
      return [a, o];
    }, t.prototype.pointToData = function(e) {
      var n = e[0] - this.cx, r = e[1] - this.cy, i = Math.sqrt(n * n + r * r);
      n /= i, r /= i;
      for (var a = Math.atan2(-r, n), o = 1 / 0, s, l = -1, u = 0; u < this._indicatorAxes.length; u++) {
        var c = this._indicatorAxes[u], f = Math.abs(a - c.angle);
        f < o && (s = c, l = u, o = f);
      }
      return [l, +(s && s.coordToData(i))];
    }, t.prototype.resize = function(e, n) {
      var r = e.get("center"), i = n.getWidth(), a = n.getHeight(), o = Math.min(i, a) / 2;
      this.cx = ze(r[0], i), this.cy = ze(r[1], a), this.startAngle = e.get("startAngle") * Math.PI / 180;
      var s = e.get("radius");
      (Ve(s) || Kt(s)) && (s = [0, s]), this.r0 = ze(s[0], o), this.r = ze(s[1], o), F(this._indicatorAxes, function(l, u) {
        l.setExtent(this.r0, this.r);
        var c = this.startAngle + u * Math.PI * 2 / this._indicatorAxes.length;
        c = Math.atan2(Math.sin(c), Math.cos(c)), l.angle = c;
      }, this);
    }, t.prototype.update = function(e, n) {
      var r = this._indicatorAxes, i = this._model;
      F(r, function(s) {
        s.scale.setExtent(1 / 0, -1 / 0);
      }), e.eachSeriesByType("radar", function(s, l) {
        if (!(s.get("coordinateSystem") !== "radar" || e.getComponent("radar", s.get("radarIndex")) !== i)) {
          var u = s.getData();
          F(r, function(c) {
            c.scale.unionExtentFromData(u, u.mapDimension(c.dim));
          });
        }
      }, this);
      var a = i.get("splitNumber"), o = new Gu();
      o.setExtent(0, a), o.setInterval(1), F(r, function(s, l) {
        wfe(s.scale, s.model, o);
      });
    }, t.prototype.convertToPixel = function(e, n, r) {
      return console.warn("Not implemented."), null;
    }, t.prototype.convertFromPixel = function(e, n, r) {
      return console.warn("Not implemented."), null;
    }, t.prototype.containPoint = function(e) {
      return console.warn("Not implemented."), !1;
    }, t.create = function(e, n) {
      var r = [];
      return e.eachComponent("radar", function(i) {
        var a = new t(i, e, n);
        r.push(a), i.coordinateSystem = a;
      }), e.eachSeriesByType("radar", function(i) {
        i.get("coordinateSystem") === "radar" && (i.coordinateSystem = r[i.get("radarIndex") || 0]);
      }), r;
    }, t.dimensions = [], t;
  }()
);
function Ott(t) {
  t.registerCoordinateSystem("radar", _tt), t.registerComponentModel(gtt), t.registerComponentView(ytt), t.registerVisual({
    seriesType: "radar",
    reset: function(e) {
      var n = e.getData();
      n.each(function(r) {
        n.setItemVisual(r, "legendIcon", "roundRect");
      }), n.setVisual("legendIcon", "roundRect");
    }
  });
}
function Stt(t) {
  Mt(Ott), t.registerChartView(ptt), t.registerSeriesModel(vtt), t.registerLayout(dtt), t.registerProcessor(O1("radar")), t.registerPreprocessor(htt);
}
var QZ = "\0_ec_interaction_mutex";
function xtt(t, e, n) {
  var r = z3(t);
  r[e] = n;
}
function wtt(t, e, n) {
  var r = z3(t), i = r[e];
  i === n && (r[e] = null);
}
function HZ(t, e) {
  return !!z3(t)[e];
}
function z3(t) {
  return t[QZ] || (t[QZ] = {});
}
Js({
  type: "takeGlobalCursor",
  event: "globalCursorTaken",
  update: "update"
}, fr);
var x1 = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this) || this;
      r._zr = n;
      var i = We(r._mousedownHandler, r), a = We(r._mousemoveHandler, r), o = We(r._mouseupHandler, r), s = We(r._mousewheelHandler, r), l = We(r._pinchHandler, r);
      return r.enable = function(u, c) {
        this.disable(), this._opt = it(ot(c) || {}, {
          zoomOnMouseWheel: !0,
          moveOnMouseMove: !0,
          // By default, wheel do not trigger move.
          moveOnMouseWheel: !1,
          preventDefaultMouseMove: !0
        }), u == null && (u = !0), (u === !0 || u === "move" || u === "pan") && (n.on("mousedown", i), n.on("mousemove", a), n.on("mouseup", o)), (u === !0 || u === "scale" || u === "zoom") && (n.on("mousewheel", s), n.on("pinch", l));
      }, r.disable = function() {
        n.off("mousedown", i), n.off("mousemove", a), n.off("mouseup", o), n.off("mousewheel", s), n.off("pinch", l);
      }, r;
    }
    return e.prototype.isDragging = function() {
      return this._dragging;
    }, e.prototype.isPinching = function() {
      return this._pinching;
    }, e.prototype.setPointerChecker = function(n) {
      this.pointerChecker = n;
    }, e.prototype.dispose = function() {
      this.disable();
    }, e.prototype._mousedownHandler = function(n) {
      if (!y9(n)) {
        for (var r = n.target; r; ) {
          if (r.draggable)
            return;
          r = r.__hostTarget || r.parent;
        }
        var i = n.offsetX, a = n.offsetY;
        this.pointerChecker && this.pointerChecker(n, i, a) && (this._x = i, this._y = a, this._dragging = !0);
      }
    }, e.prototype._mousemoveHandler = function(n) {
      if (!(!this._dragging || !mw("moveOnMouseMove", n, this._opt) || n.gestureEvent === "pinch" || HZ(this._zr, "globalPan"))) {
        var r = n.offsetX, i = n.offsetY, a = this._x, o = this._y, s = r - a, l = i - o;
        this._x = r, this._y = i, this._opt.preventDefaultMouseMove && Vu(n.event), Mfe(this, "pan", "moveOnMouseMove", n, {
          dx: s,
          dy: l,
          oldX: a,
          oldY: o,
          newX: r,
          newY: i,
          isAvailableBehavior: null
        });
      }
    }, e.prototype._mouseupHandler = function(n) {
      y9(n) || (this._dragging = !1);
    }, e.prototype._mousewheelHandler = function(n) {
      var r = mw("zoomOnMouseWheel", n, this._opt), i = mw("moveOnMouseWheel", n, this._opt), a = n.wheelDelta, o = Math.abs(a), s = n.offsetX, l = n.offsetY;
      if (!(a === 0 || !r && !i)) {
        if (r) {
          var u = o > 3 ? 1.4 : o > 1 ? 1.2 : 1.1, c = a > 0 ? u : 1 / u;
          YM(this, "zoom", "zoomOnMouseWheel", n, {
            scale: c,
            originX: s,
            originY: l,
            isAvailableBehavior: null
          });
        }
        if (i) {
          var f = Math.abs(a), d = (a > 0 ? 1 : -1) * (f > 3 ? 0.4 : f > 1 ? 0.15 : 0.05);
          YM(this, "scrollMove", "moveOnMouseWheel", n, {
            scrollDelta: d,
            originX: s,
            originY: l,
            isAvailableBehavior: null
          });
        }
      }
    }, e.prototype._pinchHandler = function(n) {
      if (!HZ(this._zr, "globalPan")) {
        var r = n.pinchScale > 1 ? 1.1 : 1 / 1.1;
        YM(this, "zoom", null, n, {
          scale: r,
          originX: n.pinchX,
          originY: n.pinchY,
          isAvailableBehavior: null
        });
      }
    }, e;
  }(fs)
);
function YM(t, e, n, r, i) {
  t.pointerChecker && t.pointerChecker(r, i.originX, i.originY) && (Vu(r.event), Mfe(t, e, n, r, i));
}
function Mfe(t, e, n, r, i) {
  i.isAvailableBehavior = We(mw, null, n, r), t.trigger(e, i);
}
function mw(t, e, n) {
  var r = n[t];
  return !t || r && (!Ve(r) || e.event[r + "Key"]);
}
function V3(t, e, n) {
  var r = t.target;
  r.x += e, r.y += n, r.dirty();
}
function F3(t, e, n, r) {
  var i = t.target, a = t.zoomLimit, o = t.zoom = t.zoom || 1;
  if (o *= e, a) {
    var s = a.min || 0, l = a.max || 1 / 0;
    o = Math.max(Math.min(l, o), s);
  }
  var u = o / t.zoom;
  t.zoom = o, i.x -= (n - i.x) * (u - 1), i.y -= (r - i.y) * (u - 1), i.scaleX *= u, i.scaleY *= u, i.dirty();
}
var Ctt = {
  axisPointer: 1,
  tooltip: 1,
  brush: 1
};
function QP(t, e, n) {
  var r = e.getComponentByElement(t.topTarget), i = r && r.coordinateSystem;
  return r && r !== n && !Ctt.hasOwnProperty(r.mainType) && i && i.model !== n;
}
function Ife(t) {
  if (Ve(t)) {
    var e = new DOMParser();
    t = e.parseFromString(t, "text/xml");
  }
  var n = t;
  for (n.nodeType === 9 && (n = n.firstChild); n.nodeName.toLowerCase() !== "svg" || n.nodeType !== 1; )
    n = n.nextSibling;
  return n;
}
var qM, nT = {
  fill: "fill",
  stroke: "stroke",
  "stroke-width": "lineWidth",
  opacity: "opacity",
  "fill-opacity": "fillOpacity",
  "stroke-opacity": "strokeOpacity",
  "stroke-dasharray": "lineDash",
  "stroke-dashoffset": "lineDashOffset",
  "stroke-linecap": "lineCap",
  "stroke-linejoin": "lineJoin",
  "stroke-miterlimit": "miterLimit",
  "font-family": "fontFamily",
  "font-size": "fontSize",
  "font-style": "fontStyle",
  "font-weight": "fontWeight",
  "text-anchor": "textAlign",
  visibility: "visibility",
  display: "display"
}, GZ = kt(nT), rT = {
  "alignment-baseline": "textBaseline",
  "stop-color": "stopColor"
}, jZ = kt(rT), Ttt = function() {
  function t() {
    this._defs = {}, this._root = null;
  }
  return t.prototype.parse = function(e, n) {
    n = n || {};
    var r = Ife(e);
    if (process.env.NODE_ENV !== "production" && !r)
      throw new Error("Illegal svg");
    this._defsUsePending = [];
    var i = new ct();
    this._root = i;
    var a = [], o = r.getAttribute("viewBox") || "", s = parseFloat(r.getAttribute("width") || n.width), l = parseFloat(r.getAttribute("height") || n.height);
    isNaN(s) && (s = null), isNaN(l) && (l = null), Xa(r, i, null, !0, !1);
    for (var u = r.firstChild; u; )
      this._parseNode(u, i, a, null, !1, !1), u = u.nextSibling;
    Att(this._defs, this._defsUsePending), this._defsUsePending = [];
    var c, f;
    if (o) {
      var d = HP(o);
      d.length >= 4 && (c = {
        x: parseFloat(d[0] || 0),
        y: parseFloat(d[1] || 0),
        width: parseFloat(d[2]),
        height: parseFloat(d[3])
      });
    }
    if (c && s != null && l != null && (f = Rfe(c, { x: 0, y: 0, width: s, height: l }), !n.ignoreViewBox)) {
      var h = i;
      i = new ct(), i.add(h), h.scaleX = h.scaleY = f.scale, h.x = f.x, h.y = f.y;
    }
    return !n.ignoreRootClip && s != null && l != null && i.setClipPath(new Zt({
      shape: { x: 0, y: 0, width: s, height: l }
    })), {
      root: i,
      width: s,
      height: l,
      viewBoxRect: c,
      viewBoxTransform: f,
      named: a
    };
  }, t.prototype._parseNode = function(e, n, r, i, a, o) {
    var s = e.nodeName.toLowerCase(), l, u = i;
    if (s === "defs" && (a = !0), s === "text" && (o = !0), s === "defs" || s === "switch")
      l = n;
    else {
      if (!a) {
        var c = qM[s];
        if (c && Qe(qM, s)) {
          l = c.call(this, e, n);
          var f = e.getAttribute("name");
          if (f) {
            var d = {
              name: f,
              namedFrom: null,
              svgNodeTagLower: s,
              el: l
            };
            r.push(d), s === "g" && (u = d);
          } else i && r.push({
            name: i.name,
            namedFrom: i,
            svgNodeTagLower: s,
            el: l
          });
          n.add(l);
        }
      }
      var h = ZZ[s];
      if (h && Qe(ZZ, s)) {
        var p = h.call(this, e), v = e.getAttribute("id");
        v && (this._defs[v] = p);
      }
    }
    if (l && l.isGroup)
      for (var g = e.firstChild; g; )
        g.nodeType === 1 ? this._parseNode(g, l, r, u, a, o) : g.nodeType === 3 && o && this._parseText(g, l), g = g.nextSibling;
  }, t.prototype._parseText = function(e, n) {
    var r = new Wg({
      style: {
        text: e.textContent
      },
      silent: !0,
      x: this._textX || 0,
      y: this._textY || 0
    });
    Do(n, r), Xa(e, r, this._defsUsePending, !1, !1), Ptt(r, n);
    var i = r.style, a = i.fontSize;
    a && a < 9 && (i.fontSize = 9, r.scaleX *= a / 9, r.scaleY *= a / 9);
    var o = (i.fontSize || i.fontFamily) && [
      i.fontStyle,
      i.fontWeight,
      (i.fontSize || 12) + "px",
      i.fontFamily || "sans-serif"
    ].join(" ");
    i.font = o;
    var s = r.getBoundingRect();
    return this._textX += s.width, n.add(r), r;
  }, t.internalField = function() {
    qM = {
      g: function(e, n) {
        var r = new ct();
        return Do(n, r), Xa(e, r, this._defsUsePending, !1, !1), r;
      },
      rect: function(e, n) {
        var r = new Zt();
        return Do(n, r), Xa(e, r, this._defsUsePending, !1, !1), r.setShape({
          x: parseFloat(e.getAttribute("x") || "0"),
          y: parseFloat(e.getAttribute("y") || "0"),
          width: parseFloat(e.getAttribute("width") || "0"),
          height: parseFloat(e.getAttribute("height") || "0")
        }), r.silent = !0, r;
      },
      circle: function(e, n) {
        var r = new ic();
        return Do(n, r), Xa(e, r, this._defsUsePending, !1, !1), r.setShape({
          cx: parseFloat(e.getAttribute("cx") || "0"),
          cy: parseFloat(e.getAttribute("cy") || "0"),
          r: parseFloat(e.getAttribute("r") || "0")
        }), r.silent = !0, r;
      },
      line: function(e, n) {
        var r = new Xr();
        return Do(n, r), Xa(e, r, this._defsUsePending, !1, !1), r.setShape({
          x1: parseFloat(e.getAttribute("x1") || "0"),
          y1: parseFloat(e.getAttribute("y1") || "0"),
          x2: parseFloat(e.getAttribute("x2") || "0"),
          y2: parseFloat(e.getAttribute("y2") || "0")
        }), r.silent = !0, r;
      },
      ellipse: function(e, n) {
        var r = new OP();
        return Do(n, r), Xa(e, r, this._defsUsePending, !1, !1), r.setShape({
          cx: parseFloat(e.getAttribute("cx") || "0"),
          cy: parseFloat(e.getAttribute("cy") || "0"),
          rx: parseFloat(e.getAttribute("rx") || "0"),
          ry: parseFloat(e.getAttribute("ry") || "0")
        }), r.silent = !0, r;
      },
      polygon: function(e, n) {
        var r = e.getAttribute("points"), i;
        r && (i = YZ(r));
        var a = new pa({
          shape: {
            points: i || []
          },
          silent: !0
        });
        return Do(n, a), Xa(e, a, this._defsUsePending, !1, !1), a;
      },
      polyline: function(e, n) {
        var r = e.getAttribute("points"), i;
        r && (i = YZ(r));
        var a = new va({
          shape: {
            points: i || []
          },
          silent: !0
        });
        return Do(n, a), Xa(e, a, this._defsUsePending, !1, !1), a;
      },
      image: function(e, n) {
        var r = new ci();
        return Do(n, r), Xa(e, r, this._defsUsePending, !1, !1), r.setStyle({
          image: e.getAttribute("xlink:href") || e.getAttribute("href"),
          x: +e.getAttribute("x"),
          y: +e.getAttribute("y"),
          width: +e.getAttribute("width"),
          height: +e.getAttribute("height")
        }), r.silent = !0, r;
      },
      text: function(e, n) {
        var r = e.getAttribute("x") || "0", i = e.getAttribute("y") || "0", a = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0";
        this._textX = parseFloat(r) + parseFloat(a), this._textY = parseFloat(i) + parseFloat(o);
        var s = new ct();
        return Do(n, s), Xa(e, s, this._defsUsePending, !1, !0), s;
      },
      tspan: function(e, n) {
        var r = e.getAttribute("x"), i = e.getAttribute("y");
        r != null && (this._textX = parseFloat(r)), i != null && (this._textY = parseFloat(i));
        var a = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0", s = new ct();
        return Do(n, s), Xa(e, s, this._defsUsePending, !1, !0), this._textX += parseFloat(a), this._textY += parseFloat(o), s;
      },
      path: function(e, n) {
        var r = e.getAttribute("d") || "", i = vle(r);
        return Do(n, i), Xa(e, i, this._defsUsePending, !1, !1), i.silent = !0, i;
      }
    };
  }(), t;
}(), ZZ = {
  lineargradient: function(t) {
    var e = parseInt(t.getAttribute("x1") || "0", 10), n = parseInt(t.getAttribute("y1") || "0", 10), r = parseInt(t.getAttribute("x2") || "10", 10), i = parseInt(t.getAttribute("y2") || "0", 10), a = new _m(e, n, r, i);
    return UZ(t, a), XZ(t, a), a;
  },
  radialgradient: function(t) {
    var e = parseInt(t.getAttribute("cx") || "0", 10), n = parseInt(t.getAttribute("cy") || "0", 10), r = parseInt(t.getAttribute("r") || "0", 10), i = new V5(e, n, r);
    return UZ(t, i), XZ(t, i), i;
  }
};
function UZ(t, e) {
  var n = t.getAttribute("gradientUnits");
  n === "userSpaceOnUse" && (e.global = !0);
}
function XZ(t, e) {
  for (var n = t.firstChild; n; ) {
    if (n.nodeType === 1 && n.nodeName.toLocaleLowerCase() === "stop") {
      var r = n.getAttribute("offset"), i = void 0;
      r && r.indexOf("%") > 0 ? i = parseInt(r, 10) / 100 : r ? i = parseFloat(r) : i = 0;
      var a = {};
      Dfe(n, a, a);
      var o = a.stopColor || n.getAttribute("stop-color") || "#000000";
      e.colorStops.push({
        offset: i,
        color: o
      });
    }
    n = n.nextSibling;
  }
}
function Do(t, e) {
  t && t.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), it(e.__inheritedStyle, t.__inheritedStyle));
}
function YZ(t) {
  for (var e = HP(t), n = [], r = 0; r < e.length; r += 2) {
    var i = parseFloat(e[r]), a = parseFloat(e[r + 1]);
    n.push([i, a]);
  }
  return n;
}
function Xa(t, e, n, r, i) {
  var a = e, o = a.__inheritedStyle = a.__inheritedStyle || {}, s = {};
  t.nodeType === 1 && (Itt(t, e), Dfe(t, o, s), r || Dtt(t, o, s)), a.style = a.style || {}, o.fill != null && (a.style.fill = qZ(a, "fill", o.fill, n)), o.stroke != null && (a.style.stroke = qZ(a, "stroke", o.stroke, n)), F([
    "lineWidth",
    "opacity",
    "fillOpacity",
    "strokeOpacity",
    "miterLimit",
    "fontSize"
  ], function(l) {
    o[l] != null && (a.style[l] = parseFloat(o[l]));
  }), F([
    "lineDashOffset",
    "lineCap",
    "lineJoin",
    "fontWeight",
    "fontFamily",
    "fontStyle",
    "textAlign"
  ], function(l) {
    o[l] != null && (a.style[l] = o[l]);
  }), i && (a.__selfStyle = s), o.lineDash && (a.style.lineDash = Ce(HP(o.lineDash), function(l) {
    return parseFloat(l);
  })), (o.visibility === "hidden" || o.visibility === "collapse") && (a.invisible = !0), o.display === "none" && (a.ignore = !0);
}
function Ptt(t, e) {
  var n = e.__selfStyle;
  if (n) {
    var r = n.textBaseline, i = r;
    !r || r === "auto" || r === "baseline" ? i = "alphabetic" : r === "before-edge" || r === "text-before-edge" ? i = "top" : r === "after-edge" || r === "text-after-edge" ? i = "bottom" : (r === "central" || r === "mathematical") && (i = "middle"), t.style.textBaseline = i;
  }
  var a = e.__inheritedStyle;
  if (a) {
    var o = a.textAlign, s = o;
    o && (o === "middle" && (s = "center"), t.style.textAlign = s);
  }
}
var $tt = /^url\(\s*#(.*?)\)/;
function qZ(t, e, n, r) {
  var i = n && n.match($tt);
  if (i) {
    var a = Zo(i[1]);
    r.push([t, e, a]);
    return;
  }
  return n === "none" && (n = null), n;
}
function Att(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    r[0].style[r[1]] = t[r[2]];
  }
}
var Ett = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
function HP(t) {
  return t.match(Ett) || [];
}
var Mtt = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g, KM = Math.PI / 180;
function Itt(t, e) {
  var n = t.getAttribute("transform");
  if (n) {
    n = n.replace(/,/g, " ");
    var r = [], i = null;
    n.replace(Mtt, function(f, d, h) {
      return r.push(d, h), "";
    });
    for (var a = r.length - 1; a > 0; a -= 2) {
      var o = r[a], s = r[a - 1], l = HP(o);
      switch (i = i || Na(), s) {
        case "translate":
          Gs(i, i, [parseFloat(l[0]), parseFloat(l[1] || "0")]);
          break;
        case "scale":
          uP(i, i, [parseFloat(l[0]), parseFloat(l[1] || l[0])]);
          break;
        case "rotate":
          Lf(i, i, -parseFloat(l[0]) * KM, [
            parseFloat(l[1] || "0"),
            parseFloat(l[2] || "0")
          ]);
          break;
        case "skewX":
          var u = Math.tan(parseFloat(l[0]) * KM);
          Ll(i, [1, 0, u, 1, 0, 0], i);
          break;
        case "skewY":
          var c = Math.tan(parseFloat(l[0]) * KM);
          Ll(i, [1, c, 0, 1, 0, 0], i);
          break;
        case "matrix":
          i[0] = parseFloat(l[0]), i[1] = parseFloat(l[1]), i[2] = parseFloat(l[2]), i[3] = parseFloat(l[3]), i[4] = parseFloat(l[4]), i[5] = parseFloat(l[5]);
          break;
      }
    }
    e.setLocalTransform(i);
  }
}
var KZ = /([^\s:;]+)\s*:\s*([^:;]+)/g;
function Dfe(t, e, n) {
  var r = t.getAttribute("style");
  if (r) {
    KZ.lastIndex = 0;
    for (var i; (i = KZ.exec(r)) != null; ) {
      var a = i[1], o = Qe(nT, a) ? nT[a] : null;
      o && (e[o] = i[2]);
      var s = Qe(rT, a) ? rT[a] : null;
      s && (n[s] = i[2]);
    }
  }
}
function Dtt(t, e, n) {
  for (var r = 0; r < GZ.length; r++) {
    var i = GZ[r], a = t.getAttribute(i);
    a != null && (e[nT[i]] = a);
  }
  for (var r = 0; r < jZ.length; r++) {
    var i = jZ[r], a = t.getAttribute(i);
    a != null && (n[rT[i]] = a);
  }
}
function Rfe(t, e) {
  var n = e.width / t.width, r = e.height / t.height, i = Math.min(n, r);
  return {
    scale: i,
    x: -(t.x + t.width / 2) * i + (e.x + e.width / 2),
    y: -(t.y + t.height / 2) * i + (e.y + e.height / 2)
  };
}
function Rtt(t, e) {
  var n = new Ttt();
  return n.parse(t, e);
}
var ktt = Ze([
  "rect",
  "circle",
  "line",
  "ellipse",
  "polygon",
  "polyline",
  "path",
  // <text> <tspan> are also enabled because some SVG might paint text itself,
  // but still need to trigger events or tooltip.
  "text",
  "tspan",
  // <g> is also enabled because this case: if multiple tags share one name
  // and need label displayed, every tags will display the name, which is not
  // expected. So we can put them into a <g name="xxx">. Thereby only one label
  // displayed and located based on the bounding rect of the <g>.
  "g"
]), Ltt = (
  /** @class */
  function() {
    function t(e, n) {
      this.type = "geoSVG", this._usedGraphicMap = Ze(), this._freedGraphics = [], this._mapName = e, this._parsedXML = Ife(n);
    }
    return t.prototype.load = function() {
      var e = this._firstGraphic;
      if (!e) {
        e = this._firstGraphic = this._buildGraphic(this._parsedXML), this._freedGraphics.push(e), this._boundingRect = this._firstGraphic.boundingRect.clone();
        var n = Btt(e.named), r = n.regions, i = n.regionsMap;
        this._regions = r, this._regionsMap = i;
      }
      return {
        boundingRect: this._boundingRect,
        regions: this._regions,
        regionsMap: this._regionsMap
      };
    }, t.prototype._buildGraphic = function(e) {
      var n, r;
      try {
        n = e && Rtt(e, {
          ignoreViewBox: !0,
          ignoreRootClip: !0
        }) || {}, r = n.root, at(r != null);
      } catch (g) {
        throw new Error(`Invalid svg format
` + g.message);
      }
      var i = new ct();
      i.add(r), i.isGeoSVGGraphicRoot = !0;
      var a = n.width, o = n.height, s = n.viewBoxRect, l = this._boundingRect;
      if (!l) {
        var u = void 0, c = void 0, f = void 0, d = void 0;
        if (a != null ? (u = 0, f = a) : s && (u = s.x, f = s.width), o != null ? (c = 0, d = o) : s && (c = s.y, d = s.height), u == null || c == null) {
          var h = r.getBoundingRect();
          u == null && (u = h.x, f = h.width), c == null && (c = h.y, d = h.height);
        }
        l = this._boundingRect = new bt(u, c, f, d);
      }
      if (s) {
        var p = Rfe(s, l);
        r.scaleX = r.scaleY = p.scale, r.x = p.x, r.y = p.y;
      }
      i.setClipPath(new Zt({
        shape: l.plain()
      }));
      var v = [];
      return F(n.named, function(g) {
        ktt.get(g.svgNodeTagLower) != null && (v.push(g), Ntt(g.el));
      }), {
        root: i,
        boundingRect: l,
        named: v
      };
    }, t.prototype.useGraphic = function(e) {
      var n = this._usedGraphicMap, r = n.get(e);
      return r || (r = this._freedGraphics.pop() || this._buildGraphic(this._parsedXML), n.set(e, r), r);
    }, t.prototype.freeGraphic = function(e) {
      var n = this._usedGraphicMap, r = n.get(e);
      r && (n.removeKey(e), this._freedGraphics.push(r));
    }, t;
  }()
);
function Ntt(t) {
  t.silent = !1, t.isGroup && t.traverse(function(e) {
    e.silent = !1;
  });
}
function Btt(t) {
  var e = [], n = Ze();
  return F(t, function(r) {
    if (r.namedFrom == null) {
      var i = new OKe(r.name, r.el);
      e.push(i), n.set(r.name, i);
    }
  }), {
    regions: e,
    regionsMap: n
  };
}
var cL = [126, 25], JZ = "南海诸岛", Ld = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, 0.7], [52, 0.7], [56, 7.7], [59, 0.7], [64, 0.7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]];
for (var Md = 0; Md < Ld.length; Md++)
  for (var av = 0; av < Ld[Md].length; av++)
    Ld[Md][av][0] /= 10.5, Ld[Md][av][1] /= -10.5 / 0.75, Ld[Md][av][0] += cL[0], Ld[Md][av][1] += cL[1];
function ztt(t, e) {
  if (t === "china") {
    for (var n = 0; n < e.length; n++)
      if (e[n].name === JZ)
        return;
    e.push(new Ece(JZ, Ce(Ld, function(r) {
      return {
        type: "polygon",
        exterior: r
      };
    }), cL));
  }
}
var Vtt = {
  南海诸岛: [32, 80],
  // 全国
  广东: [0, -10],
  香港: [10, 5],
  澳门: [-10, 10],
  // '北京': [-10, 0],
  天津: [5, 5]
};
function Ftt(t, e) {
  if (t === "china") {
    var n = Vtt[e.name];
    if (n) {
      var r = e.getCenter();
      r[0] += n[0] / 10.5, r[1] += -n[1] / (10.5 / 0.75), e.setCenter(r);
    }
  }
}
var Wtt = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];
function Qtt(t, e) {
  t === "china" && e.name === "台湾" && e.geometries.push({
    type: "polygon",
    exterior: Wtt[0]
  });
}
var Htt = "name", Gtt = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.type = "geoJSON", this._parsedMap = Ze(), this._mapName = e, this._specialAreas = r, this._geoJSON = Ztt(n);
    }
    return t.prototype.load = function(e, n) {
      n = n || Htt;
      var r = this._parsedMap.get(n);
      if (!r) {
        var i = this._parseToRegions(n);
        r = this._parsedMap.set(n, {
          regions: i,
          boundingRect: jtt(i)
        });
      }
      var a = Ze(), o = [];
      return F(r.regions, function(s) {
        var l = s.name;
        e && Qe(e, l) && (s = s.cloneShallow(l = e[l])), o.push(s), a.set(l, s);
      }), {
        regions: o,
        boundingRect: r.boundingRect || new bt(0, 0, 0, 0),
        regionsMap: a
      };
    }, t.prototype._parseToRegions = function(e) {
      var n = this._mapName, r = this._geoJSON, i;
      try {
        i = r ? eL(r, e) : [];
      } catch (a) {
        throw new Error(`Invalid geoJson format
` + a.message);
      }
      return ztt(n, i), F(i, function(a) {
        var o = a.name;
        Ftt(n, a), Qtt(n, a);
        var s = this._specialAreas && this._specialAreas[o];
        s && a.transformTo(s.left, s.top, s.width, s.height);
      }, this), i;
    }, t.prototype.getMapForUser = function() {
      return {
        // For backward compatibility, use geoJson
        // PENDING: it has been returning them without clone.
        // do we need to avoid outsite modification?
        geoJson: this._geoJSON,
        geoJSON: this._geoJSON,
        specialAreas: this._specialAreas
      };
    }, t;
  }()
);
function jtt(t) {
  for (var e, n = 0; n < t.length; n++) {
    var r = t[n].getBoundingRect();
    e = e || r.clone(), e.union(r);
  }
  return e;
}
function Ztt(t) {
  return Ve(t) ? typeof JSON < "u" && JSON.parse ? JSON.parse(t) : new Function("return (" + t + ");")() : t;
}
var H0 = Ze();
const ju = {
  /**
   * Compatible with previous `echarts.registerMap`.
   *
   * @usage
   * ```js
   *
   * echarts.registerMap('USA', geoJson, specialAreas);
   *
   * echarts.registerMap('USA', {
   *     geoJson: geoJson,
   *     specialAreas: {...}
   * });
   * echarts.registerMap('USA', {
   *     geoJSON: geoJson,
   *     specialAreas: {...}
   * });
   *
   * echarts.registerMap('airport', {
   *     svg: svg
   * }
   * ```
   *
   * Note:
   * Do not support that register multiple geoJSON or SVG
   * one map name. Because different geoJSON and SVG have
   * different unit. It's not easy to make sure how those
   * units are mapping/normalize.
   * If intending to use multiple geoJSON or SVG, we can
   * use multiple geo coordinate system.
   */
  registerMap: function(t, e, n) {
    if (e.svg) {
      var r = new Ltt(t, e.svg);
      H0.set(t, r);
    } else {
      var i = e.geoJson || e.geoJSON;
      i && !e.features ? n = e.specialAreas : i = e;
      var r = new Gtt(t, i, n);
      H0.set(t, r);
    }
  },
  getGeoResource: function(t) {
    return H0.get(t);
  },
  /**
   * Only for exporting to users.
   * **MUST NOT** used internally.
   */
  getMapForUser: function(t) {
    var e = H0.get(t);
    return e && e.type === "geoJSON" && e.getMapForUser();
  },
  load: function(t, e, n) {
    var r = H0.get(t);
    if (!r) {
      process.env.NODE_ENV !== "production" && console.error("Map " + t + " not exists. The GeoJSON of the map must be provided.");
      return;
    }
    return r.load(e, n);
  }
};
var W3 = ["rect", "circle", "line", "ellipse", "polygon", "polyline", "path"], Utt = Ze(W3), Xtt = Ze(W3.concat(["g"])), Ytt = Ze(W3.concat(["g"])), kfe = Ut();
function WS(t) {
  var e = t.getItemStyle(), n = t.get("areaColor");
  return n != null && (e.fill = n), e;
}
function eU(t) {
  var e = t.style;
  e && (e.stroke = e.stroke || e.fill, e.fill = null);
}
var Lfe = (
  /** @class */
  function() {
    function t(e) {
      var n = new ct();
      this.uid = Cm("ec_map_draw"), this._controller = new x1(e.getZr()), this._controllerHost = {
        target: n
      }, this.group = n, n.add(this._regionsGroup = new ct()), n.add(this._svgGroup = new ct());
    }
    return t.prototype.draw = function(e, n, r, i, a) {
      var o = e.mainType === "geo", s = e.getData && e.getData();
      o && n.eachComponent({
        mainType: "series",
        subType: "map"
      }, function(m) {
        !s && m.getHostGeoModel() === e && (s = m.getData());
      });
      var l = e.coordinateSystem, u = this._regionsGroup, c = this.group, f = l.getTransformInfo(), d = f.raw, h = f.roam, p = !u.childAt(0) || a;
      p ? (c.x = h.x, c.y = h.y, c.scaleX = h.scaleX, c.scaleY = h.scaleY, c.dirty()) : tn(c, h, e);
      var v = s && s.getVisual("visualMeta") && s.getVisual("visualMeta").length > 0, g = {
        api: r,
        geo: l,
        mapOrGeoModel: e,
        data: s,
        isVisualEncodedByVisualMap: v,
        isGeo: o,
        transformInfoRaw: d
      };
      l.resourceType === "geoJSON" ? this._buildGeoJSON(g) : l.resourceType === "geoSVG" && this._buildSVG(g), this._updateController(e, n, r), this._updateMapSelectHandler(e, u, r, i);
    }, t.prototype._buildGeoJSON = function(e) {
      var n = this._regionsGroupByName = Ze(), r = Ze(), i = this._regionsGroup, a = e.transformInfoRaw, o = e.mapOrGeoModel, s = e.data, l = e.geo.projection, u = l && l.stream;
      function c(h, p) {
        return p && (h = p(h)), h && [h[0] * a.scaleX + a.x, h[1] * a.scaleY + a.y];
      }
      function f(h) {
        for (var p = [], v = !u && l && l.project, g = 0; g < h.length; ++g) {
          var m = c(h[g], v);
          m && p.push(m);
        }
        return p;
      }
      function d(h) {
        return {
          shape: {
            points: f(h)
          }
        };
      }
      i.removeAll(), F(e.geo.regions, function(h) {
        var p = h.name, v = n.get(p), g = r.get(p) || {}, m = g.dataIdx, y = g.regionModel;
        v || (v = n.set(p, new ct()), i.add(v), m = s ? s.indexOfName(p) : null, y = e.isGeo ? o.getRegionModel(p) : s ? s.getItemModel(m) : null, r.set(p, {
          dataIdx: m,
          regionModel: y
        }));
        var _ = [], O = [];
        F(h.geometries, function(C) {
          if (C.type === "polygon") {
            var P = [C.exterior].concat(C.interiors || []);
            u && (P = oU(P, u)), F(P, function(T) {
              _.push(new pa(d(T)));
            });
          } else {
            var $ = C.points;
            u && ($ = oU($, u, !0)), F($, function(T) {
              O.push(new va(d(T)));
            });
          }
        });
        var S = c(h.getCenter(), l && l.project);
        function x(C, P) {
          if (C.length) {
            var $ = new xP({
              culling: !0,
              segmentIgnoreThreshold: 1,
              shape: {
                paths: C
              }
            });
            v.add($), tU(e, $, m, y), nU(e, $, p, y, o, m, S), P && (eU($), F($.states, eU));
          }
        }
        x(_), x(O, !0);
      }), n.each(function(h, p) {
        var v = r.get(p), g = v.dataIdx, m = v.regionModel;
        rU(e, h, p, m, o, g), iU(e, h, p, m, o), aU(e, h, p, m, o);
      }, this);
    }, t.prototype._buildSVG = function(e) {
      var n = e.geo.map, r = e.transformInfoRaw;
      this._svgGroup.x = r.x, this._svgGroup.y = r.y, this._svgGroup.scaleX = r.scaleX, this._svgGroup.scaleY = r.scaleY, this._svgResourceChanged(n) && (this._freeSVG(), this._useSVG(n));
      var i = this._svgDispatcherMap = Ze(), a = !1;
      F(this._svgGraphicRecord.named, function(o) {
        var s = o.name, l = e.mapOrGeoModel, u = e.data, c = o.svgNodeTagLower, f = o.el, d = u ? u.indexOfName(s) : null, h = l.getRegionModel(s);
        if (Utt.get(c) != null && f instanceof ls && tU(e, f, d, h), f instanceof ls && (f.culling = !0), f.z2EmphasisLift = 0, !o.namedFrom && (Ytt.get(c) != null && nU(e, f, s, h, l, d, null), rU(e, f, s, h, l, d), iU(e, f, s, h, l), Xtt.get(c) != null)) {
          var p = aU(e, f, s, h, l);
          p === "self" && (a = !0);
          var v = i.get(s) || i.set(s, []);
          v.push(f);
        }
      }, this), this._enableBlurEntireSVG(a, e);
    }, t.prototype._enableBlurEntireSVG = function(e, n) {
      if (e && n.isGeo) {
        var r = n.mapOrGeoModel.getModel(["blur", "itemStyle"]).getItemStyle(), i = r.opacity;
        this._svgGraphicRecord.root.traverse(function(a) {
          if (!a.isGroup) {
            Zh(a);
            var o = a.ensureState("blur").style || {};
            o.opacity == null && i != null && (o.opacity = i), a.ensureState("emphasis");
          }
        });
      }
    }, t.prototype.remove = function() {
      this._regionsGroup.removeAll(), this._regionsGroupByName = null, this._svgGroup.removeAll(), this._freeSVG(), this._controller.dispose(), this._controllerHost = null;
    }, t.prototype.findHighDownDispatchers = function(e, n) {
      if (e == null)
        return [];
      var r = n.coordinateSystem;
      if (r.resourceType === "geoJSON") {
        var i = this._regionsGroupByName;
        if (i) {
          var a = i.get(e);
          return a ? [a] : [];
        }
      } else if (r.resourceType === "geoSVG")
        return this._svgDispatcherMap && this._svgDispatcherMap.get(e) || [];
    }, t.prototype._svgResourceChanged = function(e) {
      return this._svgMapName !== e;
    }, t.prototype._useSVG = function(e) {
      var n = ju.getGeoResource(e);
      if (n && n.type === "geoSVG") {
        var r = n.useGraphic(this.uid);
        this._svgGroup.add(r.root), this._svgGraphicRecord = r, this._svgMapName = e;
      }
    }, t.prototype._freeSVG = function() {
      var e = this._svgMapName;
      if (e != null) {
        var n = ju.getGeoResource(e);
        n && n.type === "geoSVG" && n.freeGraphic(this.uid), this._svgGraphicRecord = null, this._svgDispatcherMap = null, this._svgGroup.removeAll(), this._svgMapName = null;
      }
    }, t.prototype._updateController = function(e, n, r) {
      var i = e.coordinateSystem, a = this._controller, o = this._controllerHost;
      o.zoomLimit = e.get("scaleLimit"), o.zoom = i.getZoom(), a.enable(e.get("roam") || !1);
      var s = e.mainType;
      function l() {
        var u = {
          type: "geoRoam",
          componentType: s
        };
        return u[s + "Id"] = e.id, u;
      }
      a.off("pan").on("pan", function(u) {
        this._mouseDownFlag = !1, V3(o, u.dx, u.dy), r.dispatchAction(_e(l(), {
          dx: u.dx,
          dy: u.dy,
          animation: {
            duration: 0
          }
        }));
      }, this), a.off("zoom").on("zoom", function(u) {
        this._mouseDownFlag = !1, F3(o, u.scale, u.originX, u.originY), r.dispatchAction(_e(l(), {
          totalZoom: o.zoom,
          zoom: u.scale,
          originX: u.originX,
          originY: u.originY,
          animation: {
            duration: 0
          }
        }));
      }, this), a.setPointerChecker(function(u, c, f) {
        return i.containPoint([c, f]) && !QP(u, r, e);
      });
    }, t.prototype.resetForLabelLayout = function() {
      this.group.traverse(function(e) {
        var n = e.getTextContent();
        n && (n.ignore = kfe(n).ignore);
      });
    }, t.prototype._updateMapSelectHandler = function(e, n, r, i) {
      var a = this;
      n.off("mousedown"), n.off("click"), e.get("selectedMode") && (n.on("mousedown", function() {
        a._mouseDownFlag = !0;
      }), n.on("click", function(o) {
        a._mouseDownFlag && (a._mouseDownFlag = !1);
      }));
    }, t;
  }()
);
function tU(t, e, n, r) {
  var i = r.getModel("itemStyle"), a = r.getModel(["emphasis", "itemStyle"]), o = r.getModel(["blur", "itemStyle"]), s = r.getModel(["select", "itemStyle"]), l = WS(i), u = WS(a), c = WS(s), f = WS(o), d = t.data;
  if (d) {
    var h = d.getItemVisual(n, "style"), p = d.getItemVisual(n, "decal");
    t.isVisualEncodedByVisualMap && h.fill && (l.fill = h.fill), p && (l.decal = Gg(p, t.api));
  }
  e.setStyle(l), e.style.strokeNoScale = !0, e.ensureState("emphasis").style = u, e.ensureState("select").style = c, e.ensureState("blur").style = f, Zh(e);
}
function nU(t, e, n, r, i, a, o) {
  var s = t.data, l = t.isGeo, u = s && isNaN(s.get(s.mapDimension("value"), a)), c = s && s.getItemLayout(a);
  if (l || u || c && c.showLabel) {
    var f = l ? n : a, d = void 0;
    (!s || a >= 0) && (d = i);
    var h = o ? {
      normal: {
        align: "center",
        verticalAlign: "middle"
      }
    } : null;
    Ei(e, ei(r), {
      labelFetcher: d,
      labelDataIndex: f,
      defaultText: n
    }, h);
    var p = e.getTextContent();
    if (p && (kfe(p).ignore = p.ignore, e.textConfig && o)) {
      var v = e.getBoundingRect().clone();
      e.textConfig.layoutRect = v, e.textConfig.position = [(o[0] - v.x) / v.width * 100 + "%", (o[1] - v.y) / v.height * 100 + "%"];
    }
    e.disableLabelAnimation = !0;
  } else
    e.removeTextContent(), e.removeTextConfig(), e.disableLabelAnimation = null;
}
function rU(t, e, n, r, i, a) {
  t.data ? t.data.setItemGraphicEl(a, e) : ft(e).eventData = {
    componentType: "geo",
    componentIndex: i.componentIndex,
    geoIndex: i.componentIndex,
    name: n,
    region: r && r.option || {}
  };
}
function iU(t, e, n, r, i) {
  t.data || xm({
    el: e,
    componentModel: i,
    itemName: n,
    // @ts-ignore FIXME:TS fix the "compatible with each other"?
    itemTooltipOption: r.get("tooltip")
  });
}
function aU(t, e, n, r, i) {
  e.highDownSilentOnTouch = !!i.get("selectedMode");
  var a = r.getModel("emphasis"), o = a.get("focus");
  return ur(e, o, a.get("blurScope"), a.get("disabled")), t.isGeo && xZe(e, i, n), o;
}
function oU(t, e, n) {
  var r = [], i;
  function a() {
    i = [];
  }
  function o() {
    i.length && (r.push(i), i = []);
  }
  var s = e({
    polygonStart: a,
    polygonEnd: o,
    lineStart: a,
    lineEnd: o,
    point: function(l, u) {
      isFinite(l) && isFinite(u) && i.push([l, u]);
    },
    sphere: function() {
    }
  });
  return !n && s.polygonStart(), F(t, function(l) {
    s.lineStart();
    for (var u = 0; u < l.length; u++)
      s.point(l[u][0], l[u][1]);
    s.lineEnd();
  }), !n && s.polygonEnd(), r;
}
var qtt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i, a) {
      if (!(a && a.type === "mapToggleSelect" && a.from === this.uid)) {
        var o = this.group;
        if (o.removeAll(), !n.getHostGeoModel()) {
          if (this._mapDraw && a && a.type === "geoRoam" && this._mapDraw.resetForLabelLayout(), a && a.type === "geoRoam" && a.componentType === "series" && a.seriesId === n.id) {
            var s = this._mapDraw;
            s && o.add(s.group);
          } else if (n.needsDrawMap) {
            var s = this._mapDraw || new Lfe(i);
            o.add(s.group), s.draw(n, r, i, this, a), this._mapDraw = s;
          } else
            this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
          n.get("showLegendSymbol") && r.getComponent("legend") && this._renderSymbols(n, r, i);
        }
      }
    }, e.prototype.remove = function() {
      this._mapDraw && this._mapDraw.remove(), this._mapDraw = null, this.group.removeAll();
    }, e.prototype.dispose = function() {
      this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
    }, e.prototype._renderSymbols = function(n, r, i) {
      var a = n.originalData, o = this.group;
      a.each(a.mapDimension("value"), function(s, l) {
        if (!isNaN(s)) {
          var u = a.getItemLayout(l);
          if (!(!u || !u.point)) {
            var c = u.point, f = u.offset, d = new ic({
              style: {
                // Because the special of map draw.
                // Which needs statistic of multiple series and draw on one map.
                // And each series also need a symbol with legend color
                //
                // Layout and visual are put one the different data
                // TODO
                fill: n.getData().getVisual("style").fill
              },
              shape: {
                cx: c[0] + f * 9,
                cy: c[1],
                r: 3
              },
              silent: !0,
              // Do not overlap the first series, on which labels are displayed.
              z2: 8 + (f ? 0 : bm + 1)
            });
            if (!f) {
              var h = n.mainSeries.getData(), p = a.getName(l), v = h.indexOfName(p), g = a.getItemModel(l), m = g.getModel("label"), y = h.getItemGraphicEl(v);
              Ei(d, ei(g), {
                labelFetcher: {
                  getFormattedLabel: function(_, O) {
                    return n.getFormattedLabel(v, O);
                  }
                },
                defaultText: p
              }), d.disableLabelAnimation = !0, m.get("position") || d.setTextConfig({
                position: "bottom"
              }), y.onHoverStateChange = function(_) {
                IC(d, _);
              };
            }
            o.add(d);
          }
        }
      });
    }, e.type = "map", e;
  }(_n)
), Ktt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.needsDrawMap = !1, n.seriesGroup = [], n.getTooltipPosition = function(r) {
        if (r != null) {
          var i = this.getData().getName(r), a = this.coordinateSystem, o = a.getRegion(i);
          return o && a.dataToPoint(o.getCenter());
        }
      }, n;
    }
    return e.prototype.getInitialData = function(n) {
      for (var r = Rm(this, {
        coordDimensions: ["value"],
        encodeDefaulter: vt(n3, this)
      }), i = Ze(), a = [], o = 0, s = r.count(); o < s; o++) {
        var l = r.getName(o);
        i.set(l, !0);
      }
      var u = ju.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);
      return F(u.regions, function(c) {
        var f = c.name;
        i.get(f) || a.push(f);
      }), r.appendValues([], a), r;
    }, e.prototype.getHostGeoModel = function() {
      var n = this.option.geoIndex;
      return n != null ? this.ecModel.getComponent("geo", n) : null;
    }, e.prototype.getMapType = function() {
      return (this.getHostGeoModel() || this).option.map;
    }, e.prototype.getRawValue = function(n) {
      var r = this.getData();
      return r.get(r.mapDimension("value"), n);
    }, e.prototype.getRegionModel = function(n) {
      var r = this.getData();
      return r.getItemModel(r.indexOfName(n));
    }, e.prototype.formatTooltip = function(n, r, i) {
      for (var a = this.getData(), o = this.getRawValue(n), s = a.getName(n), l = this.seriesGroup, u = [], c = 0; c < l.length; c++) {
        var f = l[c].originalData.indexOfName(s), d = a.mapDimension("value");
        isNaN(l[c].originalData.get(d, f)) || u.push(l[c].name);
      }
      return ti("section", {
        header: u.join(", "),
        noHeader: !u.length,
        blocks: [ti("nameValue", {
          name: s,
          value: o
        })]
      });
    }, e.prototype.setZoom = function(n) {
      this.option.zoom = n;
    }, e.prototype.setCenter = function(n) {
      this.option.center = n;
    }, e.prototype.getLegendIcon = function(n) {
      var r = n.icon || "roundRect", i = Sr(r, 0, 0, n.itemWidth, n.itemHeight, n.itemStyle.fill);
      return i.setStyle(n.itemStyle), i.style.stroke = "none", r.indexOf("empty") > -1 && (i.style.stroke = i.style.fill, i.style.fill = "#fff", i.style.lineWidth = 2), i;
    }, e.type = "series.map", e.dependencies = ["geo"], e.layoutMode = "box", e.defaultOption = {
      // 一级层叠
      // zlevel: 0,
      // 二级层叠
      z: 2,
      coordinateSystem: "geo",
      // map should be explicitly specified since ec3.
      map: "",
      // If `geoIndex` is not specified, a exclusive geo will be
      // created. Otherwise use the specified geo component, and
      // `map` and `mapType` are ignored.
      // geoIndex: 0,
      // 'center' | 'left' | 'right' | 'x%' | {number}
      left: "center",
      // 'center' | 'top' | 'bottom' | 'x%' | {number}
      top: "center",
      // right
      // bottom
      // width:
      // height
      // Aspect is width / height. Inited to be geoJson bbox aspect
      // This parameter is used for scale this aspect
      // Default value:
      // for geoSVG source: 1,
      // for geoJSON source: 0.75.
      aspectScale: null,
      // Layout with center and size
      // If you want to put map in a fixed size box with right aspect ratio
      // This two properties may be more convenient.
      // layoutCenter: [50%, 50%]
      // layoutSize: 100
      showLegendSymbol: !0,
      // Define left-top, right-bottom coords to control view
      // For example, [ [180, 90], [-180, -90] ],
      // higher priority than center and zoom
      boundingCoords: null,
      // Default on center of map
      center: null,
      zoom: 1,
      scaleLimit: null,
      selectedMode: !0,
      label: {
        show: !1,
        color: "#000"
      },
      // scaleLimit: null,
      itemStyle: {
        borderWidth: 0.5,
        borderColor: "#444",
        areaColor: "#eee"
      },
      emphasis: {
        label: {
          show: !0,
          color: "rgb(100,0,0)"
        },
        itemStyle: {
          areaColor: "rgba(255,215,0,0.8)"
        }
      },
      select: {
        label: {
          show: !0,
          color: "rgb(100,0,0)"
        },
        itemStyle: {
          color: "rgba(255,215,0,0.8)"
        }
      },
      nameProperty: "name"
    }, e;
  }(Cn)
);
function Jtt(t, e) {
  var n = {};
  return F(t, function(r) {
    r.each(r.mapDimension("value"), function(i, a) {
      var o = "ec-" + r.getName(a);
      n[o] = n[o] || [], isNaN(i) || n[o].push(i);
    });
  }), t[0].map(t[0].mapDimension("value"), function(r, i) {
    for (var a = "ec-" + t[0].getName(i), o = 0, s = 1 / 0, l = -1 / 0, u = n[a].length, c = 0; c < u; c++)
      s = Math.min(s, n[a][c]), l = Math.max(l, n[a][c]), o += n[a][c];
    var f;
    return e === "min" ? f = s : e === "max" ? f = l : e === "average" ? f = o / u : f = o, u === 0 ? NaN : f;
  });
}
function ent(t) {
  var e = {};
  t.eachSeriesByType("map", function(n) {
    var r = n.getHostGeoModel(), i = r ? "o" + r.id : "i" + n.getMapType();
    (e[i] = e[i] || []).push(n);
  }), F(e, function(n, r) {
    for (var i = Jtt(Ce(n, function(o) {
      return o.getData();
    }), n[0].get("mapValueCalculation")), a = 0; a < n.length; a++)
      n[a].originalData = n[a].getData();
    for (var a = 0; a < n.length; a++)
      n[a].seriesGroup = n, n[a].needsDrawMap = a === 0 && !n[a].getHostGeoModel(), n[a].setData(i.cloneShallow()), n[a].mainSeries = n[0];
  });
}
function tnt(t) {
  var e = {};
  t.eachSeriesByType("map", function(n) {
    var r = n.getMapType();
    if (!(n.getHostGeoModel() || e[r])) {
      var i = {};
      F(n.seriesGroup, function(o) {
        var s = o.coordinateSystem, l = o.originalData;
        o.get("showLegendSymbol") && t.getComponent("legend") && l.each(l.mapDimension("value"), function(u, c) {
          var f = l.getName(c), d = s.getRegion(f);
          if (!(!d || isNaN(u))) {
            var h = i[f] || 0, p = s.dataToPoint(d.getCenter());
            i[f] = h + 1, l.setItemLayout(c, {
              point: p,
              offset: h
            });
          }
        });
      });
      var a = n.getData();
      a.each(function(o) {
        var s = a.getName(o), l = a.getItemLayout(o) || {};
        l.showLabel = !i[s], a.setItemLayout(o, l);
      }), e[r] = !0;
    }
  });
}
var sU = oi, w1 = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this) || this;
      return r.type = "view", r.dimensions = ["x", "y"], r._roamTransformable = new Pu(), r._rawTransformable = new Pu(), r.name = n, r;
    }
    return e.prototype.setBoundingRect = function(n, r, i, a) {
      return this._rect = new bt(n, r, i, a), this._rect;
    }, e.prototype.getBoundingRect = function() {
      return this._rect;
    }, e.prototype.setViewRect = function(n, r, i, a) {
      this._transformTo(n, r, i, a), this._viewRect = new bt(n, r, i, a);
    }, e.prototype._transformTo = function(n, r, i, a) {
      var o = this.getBoundingRect(), s = this._rawTransformable;
      s.transform = o.calculateTransform(new bt(n, r, i, a));
      var l = s.parent;
      s.parent = null, s.decomposeTransform(), s.parent = l, this._updateTransform();
    }, e.prototype.setCenter = function(n, r) {
      n && (this._center = [ze(n[0], r.getWidth()), ze(n[1], r.getHeight())], this._updateCenterAndZoom());
    }, e.prototype.setZoom = function(n) {
      n = n || 1;
      var r = this.zoomLimit;
      r && (r.max != null && (n = Math.min(r.max, n)), r.min != null && (n = Math.max(r.min, n))), this._zoom = n, this._updateCenterAndZoom();
    }, e.prototype.getDefaultCenter = function() {
      var n = this.getBoundingRect(), r = n.x + n.width / 2, i = n.y + n.height / 2;
      return [r, i];
    }, e.prototype.getCenter = function() {
      return this._center || this.getDefaultCenter();
    }, e.prototype.getZoom = function() {
      return this._zoom || 1;
    }, e.prototype.getRoamTransform = function() {
      return this._roamTransformable.getLocalTransform();
    }, e.prototype._updateCenterAndZoom = function() {
      var n = this._rawTransformable.getLocalTransform(), r = this._roamTransformable, i = this.getDefaultCenter(), a = this.getCenter(), o = this.getZoom();
      a = oi([], a, n), i = oi([], i, n), r.originX = a[0], r.originY = a[1], r.x = i[0] - a[0], r.y = i[1] - a[1], r.scaleX = r.scaleY = o, this._updateTransform();
    }, e.prototype._updateTransform = function() {
      var n = this._roamTransformable, r = this._rawTransformable;
      r.parent = n, n.updateTransform(), r.updateTransform(), lP(this.transform || (this.transform = []), r.transform || Na()), this._rawTransform = r.getLocalTransform(), this.invTransform = this.invTransform || [], dp(this.invTransform, this.transform), this.decomposeTransform();
    }, e.prototype.getTransformInfo = function() {
      var n = this._rawTransformable, r = this._roamTransformable, i = new Pu();
      return i.transform = r.transform, i.decomposeTransform(), {
        roam: {
          x: i.x,
          y: i.y,
          scaleX: i.scaleX,
          scaleY: i.scaleY
        },
        raw: {
          x: n.x,
          y: n.y,
          scaleX: n.scaleX,
          scaleY: n.scaleY
        }
      };
    }, e.prototype.getViewRect = function() {
      return this._viewRect;
    }, e.prototype.getViewRectAfterRoam = function() {
      var n = this.getBoundingRect().clone();
      return n.applyTransform(this.transform), n;
    }, e.prototype.dataToPoint = function(n, r, i) {
      var a = r ? this._rawTransform : this.transform;
      return i = i || [], a ? sU(i, n, a) : ki(i, n);
    }, e.prototype.pointToData = function(n) {
      var r = this.invTransform;
      return r ? sU([], n, r) : [n[0], n[1]];
    }, e.prototype.convertToPixel = function(n, r, i) {
      var a = lU(r);
      return a === this ? a.dataToPoint(i) : null;
    }, e.prototype.convertFromPixel = function(n, r, i) {
      var a = lU(r);
      return a === this ? a.pointToData(i) : null;
    }, e.prototype.containPoint = function(n) {
      return this.getViewRectAfterRoam().contain(n[0], n[1]);
    }, e.dimensions = ["x", "y"], e;
  }(Pu)
);
function lU(t) {
  var e = t.seriesModel;
  return e ? e.coordinateSystem : null;
}
var nnt = {
  geoJSON: {
    aspectScale: 0.75,
    invertLongitute: !0
  },
  geoSVG: {
    aspectScale: 1,
    invertLongitute: !1
  }
}, Nfe = ["lng", "lat"], Bfe = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i) {
      var a = t.call(this, n) || this;
      a.dimensions = Nfe, a.type = "geo", a._nameCoordMap = Ze(), a.map = r;
      var o = i.projection, s = ju.load(r, i.nameMap, i.nameProperty), l = ju.getGeoResource(r), u = a.resourceType = l ? l.type : null, c = a.regions = s.regions, f = nnt[l.type];
      a._regionsMap = s.regionsMap, a.regions = s.regions, process.env.NODE_ENV !== "production" && o && (u === "geoSVG" && (process.env.NODE_ENV !== "production" && nr("Map " + r + " with SVG source can't use projection. Only GeoJSON source supports projection."), o = null), o.project && o.unproject || (process.env.NODE_ENV !== "production" && nr("project and unproject must be both provided in the projeciton."), o = null)), a.projection = o;
      var d;
      if (o)
        for (var h = 0; h < c.length; h++) {
          var p = c[h].getBoundingRect(o);
          d = d || p.clone(), d.union(p);
        }
      else
        d = s.boundingRect;
      return a.setBoundingRect(d.x, d.y, d.width, d.height), a.aspectScale = o ? 1 : dt(i.aspectScale, f.aspectScale), a._invertLongitute = o ? !1 : f.invertLongitute, a;
    }
    return e.prototype._transformTo = function(n, r, i, a) {
      var o = this.getBoundingRect(), s = this._invertLongitute;
      o = o.clone(), s && (o.y = -o.y - o.height);
      var l = this._rawTransformable;
      l.transform = o.calculateTransform(new bt(n, r, i, a));
      var u = l.parent;
      l.parent = null, l.decomposeTransform(), l.parent = u, s && (l.scaleY = -l.scaleY), this._updateTransform();
    }, e.prototype.getRegion = function(n) {
      return this._regionsMap.get(n);
    }, e.prototype.getRegionByCoord = function(n) {
      for (var r = this.regions, i = 0; i < r.length; i++) {
        var a = r[i];
        if (a.type === "geoJSON" && a.contain(n))
          return r[i];
      }
    }, e.prototype.addGeoCoord = function(n, r) {
      this._nameCoordMap.set(n, r);
    }, e.prototype.getGeoCoord = function(n) {
      var r = this._regionsMap.get(n);
      return this._nameCoordMap.get(n) || r && r.getCenter();
    }, e.prototype.dataToPoint = function(n, r, i) {
      if (Ve(n) && (n = this.getGeoCoord(n)), n) {
        var a = this.projection;
        return a && (n = a.project(n)), n && this.projectedToPoint(n, r, i);
      }
    }, e.prototype.pointToData = function(n) {
      var r = this.projection;
      return r && (n = r.unproject(n)), n && this.pointToProjected(n);
    }, e.prototype.pointToProjected = function(n) {
      return t.prototype.pointToData.call(this, n);
    }, e.prototype.projectedToPoint = function(n, r, i) {
      return t.prototype.dataToPoint.call(this, n, r, i);
    }, e.prototype.convertToPixel = function(n, r, i) {
      var a = uU(r);
      return a === this ? a.dataToPoint(i) : null;
    }, e.prototype.convertFromPixel = function(n, r, i) {
      var a = uU(r);
      return a === this ? a.pointToData(i) : null;
    }, e;
  }(w1)
);
vr(Bfe, w1);
function uU(t) {
  var e = t.geoModel, n = t.seriesModel;
  return e ? e.coordinateSystem : n ? n.coordinateSystem || (n.getReferringComponents("geo", Er).models[0] || {}).coordinateSystem : null;
}
const cU = Bfe;
function fU(t, e) {
  var n = t.get("boundingCoords");
  if (n != null) {
    var r = n[0], i = n[1];
    if (!(isFinite(r[0]) && isFinite(r[1]) && isFinite(i[0]) && isFinite(i[1])))
      process.env.NODE_ENV !== "production" && console.error("Invalid boundingCoords");
    else {
      var a = this.projection;
      if (a) {
        var o = r[0], s = r[1], l = i[0], u = i[1];
        r = [1 / 0, 1 / 0], i = [-1 / 0, -1 / 0];
        var c = function(x, C, P, $) {
          for (var T = P - x, E = $ - C, M = 0; M <= 100; M++) {
            var R = M / 100, N = a.project([x + T * R, C + E * R]);
            Cu(r, r, N), Tu(i, i, N);
          }
        };
        c(o, s, l, s), c(l, s, l, u), c(l, u, o, u), c(o, u, l, s);
      }
      this.setBoundingRect(r[0], r[1], i[0] - r[0], i[1] - r[1]);
    }
  }
  var f = this.getBoundingRect(), d = t.get("layoutCenter"), h = t.get("layoutSize"), p = e.getWidth(), v = e.getHeight(), g = f.width / f.height * this.aspectScale, m = !1, y, _;
  d && h && (y = [ze(d[0], p), ze(d[1], v)], _ = ze(h, Math.min(p, v)), !isNaN(y[0]) && !isNaN(y[1]) && !isNaN(_) ? m = !0 : process.env.NODE_ENV !== "production" && console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));
  var O;
  if (m)
    O = {}, g > 1 ? (O.width = _, O.height = _ / g) : (O.height = _, O.width = _ * g), O.y = y[1] - O.height / 2, O.x = y[0] - O.width / 2;
  else {
    var S = t.getBoxLayoutParams();
    S.aspect = g, O = Mr(S, {
      width: p,
      height: v
    });
  }
  this.setViewRect(O.x, O.y, O.width, O.height), this.setCenter(t.get("center"), e), this.setZoom(t.get("zoom"));
}
function rnt(t, e) {
  F(e.get("geoCoord"), function(n, r) {
    t.addGeoCoord(r, n);
  });
}
var int = (
  /** @class */
  function() {
    function t() {
      this.dimensions = Nfe;
    }
    return t.prototype.create = function(e, n) {
      var r = [];
      function i(o) {
        return {
          nameProperty: o.get("nameProperty"),
          aspectScale: o.get("aspectScale"),
          projection: o.get("projection")
        };
      }
      e.eachComponent("geo", function(o, s) {
        var l = o.get("map"), u = new cU(l + s, l, _e({
          nameMap: o.get("nameMap")
        }, i(o)));
        u.zoomLimit = o.get("scaleLimit"), r.push(u), o.coordinateSystem = u, u.model = o, u.resize = fU, u.resize(o, n);
      }), e.eachSeries(function(o) {
        var s = o.get("coordinateSystem");
        if (s === "geo") {
          var l = o.get("geoIndex") || 0;
          o.coordinateSystem = r[l];
        }
      });
      var a = {};
      return e.eachSeriesByType("map", function(o) {
        if (!o.getHostGeoModel()) {
          var s = o.getMapType();
          a[s] = a[s] || [], a[s].push(o);
        }
      }), F(a, function(o, s) {
        var l = Ce(o, function(c) {
          return c.get("nameMap");
        }), u = new cU(s, s, _e({
          nameMap: aP(l)
        }, i(o[0])));
        u.zoomLimit = br.apply(null, Ce(o, function(c) {
          return c.get("scaleLimit");
        })), r.push(u), u.resize = fU, u.resize(o[0], n), F(o, function(c) {
          c.coordinateSystem = u, rnt(u, c);
        });
      }), r;
    }, t.prototype.getFilledRegions = function(e, n, r, i) {
      for (var a = (e || []).slice(), o = Ze(), s = 0; s < a.length; s++)
        o.set(a[s].name, a[s]);
      var l = ju.load(n, r, i);
      return F(l.regions, function(u) {
        var c = u.name;
        !o.get(c) && a.push({
          name: c
        });
      }), a;
    }, t;
  }()
), zfe = new int(), ant = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n, r, i) {
      var a = ju.getGeoResource(n.map);
      if (a && a.type === "geoJSON") {
        var o = n.itemStyle = n.itemStyle || {};
        "color" in o || (o.color = "#eee");
      }
      this.mergeDefaultAndTheme(n, i), Hh(n, "label", ["show"]);
    }, e.prototype.optionUpdated = function() {
      var n = this, r = this.option;
      r.regions = zfe.getFilledRegions(r.regions, r.map, r.nameMap, r.nameProperty);
      var i = {};
      this._optionModelMap = os(r.regions || [], function(a, o) {
        var s = o.name;
        return s && (a.set(s, new xn(o, n, n.ecModel)), o.selected && (i[s] = !0)), a;
      }, Ze()), r.selectedMap || (r.selectedMap = i);
    }, e.prototype.getRegionModel = function(n) {
      return this._optionModelMap.get(n) || new xn(null, this, this.ecModel);
    }, e.prototype.getFormattedLabel = function(n, r) {
      var i = this.getRegionModel(n), a = r === "normal" ? i.get(["label", "formatter"]) : i.get(["emphasis", "label", "formatter"]), o = {
        name: n
      };
      if (qe(a))
        return o.status = r, a(o);
      if (Ve(a))
        return a.replace("{a}", n ?? "");
    }, e.prototype.setZoom = function(n) {
      this.option.zoom = n;
    }, e.prototype.setCenter = function(n) {
      this.option.center = n;
    }, e.prototype.select = function(n) {
      var r = this.option, i = r.selectedMode;
      if (i) {
        i !== "multiple" && (r.selectedMap = null);
        var a = r.selectedMap || (r.selectedMap = {});
        a[n] = !0;
      }
    }, e.prototype.unSelect = function(n) {
      var r = this.option.selectedMap;
      r && (r[n] = !1);
    }, e.prototype.toggleSelected = function(n) {
      this[this.isSelected(n) ? "unSelect" : "select"](n);
    }, e.prototype.isSelected = function(n) {
      var r = this.option.selectedMap;
      return !!(r && r[n]);
    }, e.type = "geo", e.layoutMode = "box", e.defaultOption = {
      // zlevel: 0,
      z: 0,
      show: !0,
      left: "center",
      top: "center",
      // Default value:
      // for geoSVG source: 1,
      // for geoJSON source: 0.75.
      aspectScale: null,
      // /// Layout with center and size
      // If you want to put map in a fixed size box with right aspect ratio
      // This two properties may be more convenient
      // layoutCenter: [50%, 50%]
      // layoutSize: 100
      silent: !1,
      // Map type
      map: "",
      // Define left-top, right-bottom coords to control view
      // For example, [ [180, 90], [-180, -90] ]
      boundingCoords: null,
      // Default on center of map
      center: null,
      zoom: 1,
      scaleLimit: null,
      // selectedMode: false
      label: {
        show: !1,
        color: "#000"
      },
      itemStyle: {
        borderWidth: 0.5,
        borderColor: "#444"
        // Default color:
        // + geoJSON: #eee
        // + geoSVG: null (use SVG original `fill`)
        // color: '#eee'
      },
      emphasis: {
        label: {
          show: !0,
          color: "rgb(100,0,0)"
        },
        itemStyle: {
          color: "rgba(255,215,0,0.8)"
        }
      },
      select: {
        label: {
          show: !0,
          color: "rgb(100,0,0)"
        },
        itemStyle: {
          color: "rgba(255,215,0,0.8)"
        }
      },
      regions: []
      // tooltip: {
      //     show: false
      // }
    }, e;
  }(At)
);
function dU(t, e) {
  return t.pointToProjected ? t.pointToProjected(e) : t.pointToData(e);
}
function Q3(t, e, n, r) {
  var i = t.getZoom(), a = t.getCenter(), o = e.zoom, s = t.projectedToPoint ? t.projectedToPoint(a) : t.dataToPoint(a);
  if (e.dx != null && e.dy != null && (s[0] -= e.dx, s[1] -= e.dy, t.setCenter(dU(t, s), r)), o != null) {
    if (n) {
      var l = n.min || 0, u = n.max || 1 / 0;
      o = Math.max(Math.min(i * o, u), l) / i;
    }
    t.scaleX *= o, t.scaleY *= o;
    var c = (e.originX - t.x) * (o - 1), f = (e.originY - t.y) * (o - 1);
    t.x -= c, t.y -= f, t.updateTransform(), t.setCenter(dU(t, s), r), t.setZoom(o * i);
  }
  return {
    center: t.getCenter(),
    zoom: t.getZoom()
  };
}
var ont = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.focusBlurEnabled = !0, n;
    }
    return e.prototype.init = function(n, r) {
      this._api = r;
    }, e.prototype.render = function(n, r, i, a) {
      if (this._model = n, !n.get("show")) {
        this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
        return;
      }
      this._mapDraw || (this._mapDraw = new Lfe(i));
      var o = this._mapDraw;
      o.draw(n, r, i, this, a), o.group.on("click", this._handleRegionClick, this), o.group.silent = n.get("silent"), this.group.add(o.group), this.updateSelectStatus(n, r, i);
    }, e.prototype._handleRegionClick = function(n) {
      var r;
      sh(n.target, function(i) {
        return (r = ft(i).eventData) != null;
      }, !0), r && this._api.dispatchAction({
        type: "geoToggleSelect",
        geoId: this._model.id,
        name: r.name
      });
    }, e.prototype.updateSelectStatus = function(n, r, i) {
      var a = this;
      this._mapDraw.group.traverse(function(o) {
        var s = ft(o).eventData;
        if (s)
          return a._model.isSelected(s.name) ? i.enterSelect(o) : i.leaveSelect(o), !0;
      });
    }, e.prototype.findHighDownDispatchers = function(n) {
      return this._mapDraw && this._mapDraw.findHighDownDispatchers(n, this._model);
    }, e.prototype.dispose = function() {
      this._mapDraw && this._mapDraw.remove();
    }, e.type = "geo", e;
  }(Ln)
);
function snt(t, e, n) {
  ju.registerMap(t, e, n);
}
function Vfe(t) {
  t.registerCoordinateSystem("geo", zfe), t.registerComponentModel(ant), t.registerComponentView(ont), t.registerImpl("registerMap", snt), t.registerImpl("getMap", function(n) {
    return ju.getMapForUser(n);
  });
  function e(n, r) {
    r.update = "geo:updateSelectStatus", t.registerAction(r, function(i, a) {
      var o = {}, s = [];
      return a.eachComponent({
        mainType: "geo",
        query: i
      }, function(l) {
        l[n](i.name);
        var u = l.coordinateSystem;
        F(u.regions, function(f) {
          o[f.name] = l.isSelected(f.name) || !1;
        });
        var c = [];
        F(o, function(f, d) {
          o[d] && c.push(d);
        }), s.push({
          geoIndex: l.componentIndex,
          // Use singular, the same naming convention as the event `selectchanged`.
          name: c
        });
      }), {
        selected: o,
        allSelected: s,
        name: i.name
      };
    });
  }
  e("toggleSelected", {
    type: "geoToggleSelect",
    event: "geoselectchanged"
  }), e("select", {
    type: "geoSelect",
    event: "geoselected"
  }), e("unSelect", {
    type: "geoUnSelect",
    event: "geounselected"
  }), t.registerAction({
    type: "geoRoam",
    event: "geoRoam",
    update: "updateTransform"
  }, function(n, r, i) {
    var a = n.componentType || "series";
    r.eachComponent({
      mainType: a,
      query: n
    }, function(o) {
      var s = o.coordinateSystem;
      if (s.type === "geo") {
        var l = Q3(s, n, o.get("scaleLimit"), i);
        o.setCenter && o.setCenter(l.center), o.setZoom && o.setZoom(l.zoom), a === "series" && F(o.seriesGroup, function(u) {
          u.setCenter(l.center), u.setZoom(l.zoom);
        });
      }
    });
  });
}
function lnt(t) {
  Mt(Vfe), t.registerChartView(qtt), t.registerSeriesModel(Ktt), t.registerLayout(tnt), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, ent), Bue("map", t.registerAction);
}
function unt(t) {
  var e = t;
  e.hierNode = {
    defaultAncestor: null,
    ancestor: e,
    prelim: 0,
    modifier: 0,
    change: 0,
    shift: 0,
    i: 0,
    thread: null
  };
  for (var n = [e], r, i; r = n.pop(); )
    if (i = r.children, r.isExpand && i.length)
      for (var a = i.length, o = a - 1; o >= 0; o--) {
        var s = i[o];
        s.hierNode = {
          defaultAncestor: null,
          ancestor: s,
          prelim: 0,
          modifier: 0,
          change: 0,
          shift: 0,
          i: o,
          thread: null
        }, n.push(s);
      }
}
function cnt(t, e) {
  var n = t.isExpand ? t.children : [], r = t.parentNode.children, i = t.hierNode.i ? r[t.hierNode.i - 1] : null;
  if (n.length) {
    hnt(t);
    var a = (n[0].hierNode.prelim + n[n.length - 1].hierNode.prelim) / 2;
    i ? (t.hierNode.prelim = i.hierNode.prelim + e(t, i), t.hierNode.modifier = t.hierNode.prelim - a) : t.hierNode.prelim = a;
  } else i && (t.hierNode.prelim = i.hierNode.prelim + e(t, i));
  t.parentNode.hierNode.defaultAncestor = pnt(t, i, t.parentNode.hierNode.defaultAncestor || r[0], e);
}
function fnt(t) {
  var e = t.hierNode.prelim + t.parentNode.hierNode.modifier;
  t.setLayout({
    x: e
  }, !0), t.hierNode.modifier += t.parentNode.hierNode.modifier;
}
function hU(t) {
  return arguments.length ? t : mnt;
}
function Sy(t, e) {
  return t -= Math.PI / 2, {
    x: e * Math.cos(t),
    y: e * Math.sin(t)
  };
}
function dnt(t, e) {
  return Mr(t.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function hnt(t) {
  for (var e = t.children, n = e.length, r = 0, i = 0; --n >= 0; ) {
    var a = e[n];
    a.hierNode.prelim += r, a.hierNode.modifier += r, i += a.hierNode.change, r += a.hierNode.shift + i;
  }
}
function pnt(t, e, n, r) {
  if (e) {
    for (var i = t, a = t, o = a.parentNode.children[0], s = e, l = i.hierNode.modifier, u = a.hierNode.modifier, c = o.hierNode.modifier, f = s.hierNode.modifier; s = JM(s), a = eI(a), s && a; ) {
      i = JM(i), o = eI(o), i.hierNode.ancestor = t;
      var d = s.hierNode.prelim + f - a.hierNode.prelim - u + r(s, a);
      d > 0 && (gnt(vnt(s, t, n), t, d), u += d, l += d), f += s.hierNode.modifier, u += a.hierNode.modifier, l += i.hierNode.modifier, c += o.hierNode.modifier;
    }
    s && !JM(i) && (i.hierNode.thread = s, i.hierNode.modifier += f - l), a && !eI(o) && (o.hierNode.thread = a, o.hierNode.modifier += u - c, n = t);
  }
  return n;
}
function JM(t) {
  var e = t.children;
  return e.length && t.isExpand ? e[e.length - 1] : t.hierNode.thread;
}
function eI(t) {
  var e = t.children;
  return e.length && t.isExpand ? e[0] : t.hierNode.thread;
}
function vnt(t, e, n) {
  return t.hierNode.ancestor.parentNode === e.parentNode ? t.hierNode.ancestor : n;
}
function gnt(t, e, n) {
  var r = n / (e.hierNode.i - t.hierNode.i);
  e.hierNode.change -= r, e.hierNode.shift += n, e.hierNode.modifier += n, e.hierNode.prelim += n, t.hierNode.change += r;
}
function mnt(t, e) {
  return t.parentNode === e.parentNode ? 1 : 2;
}
var ynt = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
      this.parentPoint = [], this.childPoints = [];
    }
    return t;
  }()
), bnt = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      return t.call(this, n) || this;
    }
    return e.prototype.getDefaultStyle = function() {
      return {
        stroke: "#000",
        fill: null
      };
    }, e.prototype.getDefaultShape = function() {
      return new ynt();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.childPoints, a = i.length, o = r.parentPoint, s = i[0], l = i[a - 1];
      if (a === 1) {
        n.moveTo(o[0], o[1]), n.lineTo(s[0], s[1]);
        return;
      }
      var u = r.orient, c = u === "TB" || u === "BT" ? 0 : 1, f = 1 - c, d = ze(r.forkPosition, 1), h = [];
      h[c] = o[c], h[f] = o[f] + (l[f] - o[f]) * d, n.moveTo(o[0], o[1]), n.lineTo(h[0], h[1]), n.moveTo(s[0], s[1]), h[c] = s[c], n.lineTo(h[0], h[1]), h[c] = l[c], n.lineTo(h[0], h[1]), n.lineTo(l[0], l[1]);
      for (var p = 1; p < a - 1; p++) {
        var v = i[p];
        n.moveTo(v[0], v[1]), h[c] = v[c], n.lineTo(h[0], h[1]);
      }
    }, e;
  }(Dt)
), _nt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._mainGroup = new ct(), n;
    }
    return e.prototype.init = function(n, r) {
      this._controller = new x1(r.getZr()), this._controllerHost = {
        target: this.group
      }, this.group.add(this._mainGroup);
    }, e.prototype.render = function(n, r, i) {
      var a = n.getData(), o = n.layoutInfo, s = this._mainGroup, l = n.get("layout");
      l === "radial" ? (s.x = o.x + o.width / 2, s.y = o.y + o.height / 2) : (s.x = o.x, s.y = o.y), this._updateViewCoordSys(n, i), this._updateController(n, r, i);
      var u = this._data;
      a.diff(u).add(function(c) {
        pU(a, c) && vU(a, c, null, s, n);
      }).update(function(c, f) {
        var d = u.getItemGraphicEl(f);
        if (!pU(a, c)) {
          d && mU(u, f, d, s, n);
          return;
        }
        vU(a, c, d, s, n);
      }).remove(function(c) {
        var f = u.getItemGraphicEl(c);
        f && mU(u, c, f, s, n);
      }).execute(), this._nodeScaleRatio = n.get("nodeScaleRatio"), this._updateNodeAndLinkScale(n), n.get("expandAndCollapse") === !0 && a.eachItemGraphicEl(function(c, f) {
        c.off("click").on("click", function() {
          i.dispatchAction({
            type: "treeExpandAndCollapse",
            seriesId: n.id,
            dataIndex: f
          });
        });
      }), this._data = a;
    }, e.prototype._updateViewCoordSys = function(n, r) {
      var i = n.getData(), a = [];
      i.each(function(f) {
        var d = i.getItemLayout(f);
        d && !isNaN(d.x) && !isNaN(d.y) && a.push([+d.x, +d.y]);
      });
      var o = [], s = [];
      yP(a, o, s);
      var l = this._min, u = this._max;
      s[0] - o[0] === 0 && (o[0] = l ? l[0] : o[0] - 1, s[0] = u ? u[0] : s[0] + 1), s[1] - o[1] === 0 && (o[1] = l ? l[1] : o[1] - 1, s[1] = u ? u[1] : s[1] + 1);
      var c = n.coordinateSystem = new w1();
      c.zoomLimit = n.get("scaleLimit"), c.setBoundingRect(o[0], o[1], s[0] - o[0], s[1] - o[1]), c.setCenter(n.get("center"), r), c.setZoom(n.get("zoom")), this.group.attr({
        x: c.x,
        y: c.y,
        scaleX: c.scaleX,
        scaleY: c.scaleY
      }), this._min = o, this._max = s;
    }, e.prototype._updateController = function(n, r, i) {
      var a = this, o = this._controller, s = this._controllerHost, l = this.group;
      o.setPointerChecker(function(u, c, f) {
        var d = l.getBoundingRect();
        return d.applyTransform(l.transform), d.contain(c, f) && !QP(u, i, n);
      }), o.enable(n.get("roam")), s.zoomLimit = n.get("scaleLimit"), s.zoom = n.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
        V3(s, u.dx, u.dy), i.dispatchAction({
          seriesId: n.id,
          type: "treeRoam",
          dx: u.dx,
          dy: u.dy
        });
      }).on("zoom", function(u) {
        F3(s, u.scale, u.originX, u.originY), i.dispatchAction({
          seriesId: n.id,
          type: "treeRoam",
          zoom: u.scale,
          originX: u.originX,
          originY: u.originY
        }), a._updateNodeAndLinkScale(n), i.updateLabelLayout();
      });
    }, e.prototype._updateNodeAndLinkScale = function(n) {
      var r = n.getData(), i = this._getNodeGlobalScale(n);
      r.eachItemGraphicEl(function(a, o) {
        a.setSymbolScale(i);
      });
    }, e.prototype._getNodeGlobalScale = function(n) {
      var r = n.coordinateSystem;
      if (r.type !== "view")
        return 1;
      var i = this._nodeScaleRatio, a = r.scaleX || 1, o = r.getZoom(), s = (o - 1) * i + 1;
      return s / a;
    }, e.prototype.dispose = function() {
      this._controller && this._controller.dispose(), this._controllerHost = null;
    }, e.prototype.remove = function() {
      this._mainGroup.removeAll(), this._data = null;
    }, e.type = "tree", e;
  }(_n)
);
function pU(t, e) {
  var n = t.getItemLayout(e);
  return n && !isNaN(n.x) && !isNaN(n.y);
}
function vU(t, e, n, r, i) {
  var a = !n, o = t.tree.getNodeByDataIndex(e), s = o.getModel(), l = o.getVisual("style").fill, u = o.isExpand === !1 && o.children.length !== 0 ? l : "#fff", c = t.tree.root, f = o.parentNode === c ? o : o.parentNode || o, d = t.getItemGraphicEl(f.dataIndex), h = f.getLayout(), p = d ? {
    x: d.__oldX,
    y: d.__oldY,
    rawX: d.__radialOldRawX,
    rawY: d.__radialOldRawY
  } : h, v = o.getLayout();
  a ? (n = new m1(t, e, null, {
    symbolInnerColor: u,
    useNameLabel: !0
  }), n.x = p.x, n.y = p.y) : n.updateData(t, e, null, {
    symbolInnerColor: u,
    useNameLabel: !0
  }), n.__radialOldRawX = n.__radialRawX, n.__radialOldRawY = n.__radialRawY, n.__radialRawX = v.rawX, n.__radialRawY = v.rawY, r.add(n), t.setItemGraphicEl(e, n), n.__oldX = n.x, n.__oldY = n.y, tn(n, {
    x: v.x,
    y: v.y
  }, i);
  var g = n.getSymbolPath();
  if (i.get("layout") === "radial") {
    var m = c.children[0], y = m.getLayout(), _ = m.children.length, O = void 0, S = void 0;
    if (v.x === y.x && o.isExpand === !0 && m.children.length) {
      var x = {
        x: (m.children[0].getLayout().x + m.children[_ - 1].getLayout().x) / 2,
        y: (m.children[0].getLayout().y + m.children[_ - 1].getLayout().y) / 2
      };
      O = Math.atan2(x.y - y.y, x.x - y.x), O < 0 && (O = Math.PI * 2 + O), S = x.x < y.x, S && (O = O - Math.PI);
    } else
      O = Math.atan2(v.y - y.y, v.x - y.x), O < 0 && (O = Math.PI * 2 + O), o.children.length === 0 || o.children.length !== 0 && o.isExpand === !1 ? (S = v.x < y.x, S && (O = O - Math.PI)) : (S = v.x > y.x, S || (O = O - Math.PI));
    var C = S ? "left" : "right", P = s.getModel("label"), $ = P.get("rotate"), T = $ * (Math.PI / 180), E = g.getTextContent();
    E && (g.setTextConfig({
      position: P.get("position") || C,
      rotation: $ == null ? -O : T,
      origin: "center"
    }), E.setStyle("verticalAlign", "middle"));
  }
  var M = s.get(["emphasis", "focus"]), R = M === "relative" ? Fb(o.getAncestorsIndices(), o.getDescendantIndices()) : M === "ancestor" ? o.getAncestorsIndices() : M === "descendant" ? o.getDescendantIndices() : null;
  R && (ft(n).focus = R), Ont(i, o, c, n, p, h, v, r), n.__edge && (n.onHoverStateChange = function(N) {
    if (N !== "blur") {
      var I = o.parentNode && t.getItemGraphicEl(o.parentNode.dataIndex);
      I && I.hoverState === u1 || IC(n.__edge, N);
    }
  });
}
function Ont(t, e, n, r, i, a, o, s) {
  var l = e.getModel(), u = t.get("edgeShape"), c = t.get("layout"), f = t.getOrient(), d = t.get(["lineStyle", "curveness"]), h = t.get("edgeForkPosition"), p = l.getModel("lineStyle").getLineStyle(), v = r.__edge;
  if (u === "curve")
    e.parentNode && e.parentNode !== n && (v || (v = r.__edge = new f1({
      shape: fL(c, f, d, i, i)
    })), tn(v, {
      shape: fL(c, f, d, a, o)
    }, t));
  else if (u === "polyline") {
    if (c === "orthogonal") {
      if (e !== n && e.children && e.children.length !== 0 && e.isExpand === !0) {
        for (var g = e.children, m = [], y = 0; y < g.length; y++) {
          var _ = g[y].getLayout();
          m.push([_.x, _.y]);
        }
        v || (v = r.__edge = new bnt({
          shape: {
            parentPoint: [o.x, o.y],
            childPoints: [[o.x, o.y]],
            orient: f,
            forkPosition: h
          }
        })), tn(v, {
          shape: {
            parentPoint: [o.x, o.y],
            childPoints: m
          }
        }, t);
      }
    } else if (process.env.NODE_ENV !== "production")
      throw new Error("The polyline edgeShape can only be used in orthogonal layout");
  }
  v && !(u === "polyline" && !e.isExpand) && (v.useStyle(it({
    strokeNoScale: !0,
    fill: null
  }, p)), Ai(v, l, "lineStyle"), Zh(v), s.add(v));
}
function gU(t, e, n, r, i) {
  var a = e.tree.root, o = Ffe(a, t), s = o.source, l = o.sourceLayout, u = e.getItemGraphicEl(t.dataIndex);
  if (u) {
    var c = e.getItemGraphicEl(s.dataIndex), f = c.__edge, d = u.__edge || (s.isExpand === !1 || s.children.length === 1 ? f : void 0), h = r.get("edgeShape"), p = r.get("layout"), v = r.get("orient"), g = r.get(["lineStyle", "curveness"]);
    d && (h === "curve" ? _f(d, {
      shape: fL(p, v, g, l, l),
      style: {
        opacity: 0
      }
    }, r, {
      cb: function() {
        n.remove(d);
      },
      removeOpt: i
    }) : h === "polyline" && r.get("layout") === "orthogonal" && _f(d, {
      shape: {
        parentPoint: [l.x, l.y],
        childPoints: [[l.x, l.y]]
      },
      style: {
        opacity: 0
      }
    }, r, {
      cb: function() {
        n.remove(d);
      },
      removeOpt: i
    }));
  }
}
function Ffe(t, e) {
  for (var n = e.parentNode === t ? e : e.parentNode || e, r; r = n.getLayout(), r == null; )
    n = n.parentNode === t ? n : n.parentNode || n;
  return {
    source: n,
    sourceLayout: r
  };
}
function mU(t, e, n, r, i) {
  var a = t.tree.getNodeByDataIndex(e), o = t.tree.root, s = Ffe(o, a).sourceLayout, l = {
    duration: i.get("animationDurationUpdate"),
    easing: i.get("animationEasingUpdate")
  };
  _f(n, {
    x: s.x + 1,
    y: s.y + 1
  }, i, {
    cb: function() {
      r.remove(n), t.setItemGraphicEl(e, null);
    },
    removeOpt: l
  }), n.fadeOut(null, t.hostModel, {
    fadeLabel: !0,
    animation: l
  }), a.children.forEach(function(u) {
    gU(u, t, r, i, l);
  }), gU(a, t, r, i, l);
}
function fL(t, e, n, r, i) {
  var a, o, s, l, u, c, f, d;
  if (t === "radial") {
    u = r.rawX, f = r.rawY, c = i.rawX, d = i.rawY;
    var h = Sy(u, f), p = Sy(u, f + (d - f) * n), v = Sy(c, d + (f - d) * n), g = Sy(c, d);
    return {
      x1: h.x || 0,
      y1: h.y || 0,
      x2: g.x || 0,
      y2: g.y || 0,
      cpx1: p.x || 0,
      cpy1: p.y || 0,
      cpx2: v.x || 0,
      cpy2: v.y || 0
    };
  } else
    u = r.x, f = r.y, c = i.x, d = i.y, (e === "LR" || e === "RL") && (a = u + (c - u) * n, o = f, s = c + (u - c) * n, l = d), (e === "TB" || e === "BT") && (a = u, o = f + (d - f) * n, s = c, l = d + (f - d) * n);
  return {
    x1: u,
    y1: f,
    x2: c,
    y2: d,
    cpx1: a,
    cpy1: o,
    cpx2: s,
    cpy2: l
  };
}
var Ko = Ut();
function Wfe(t) {
  var e = t.mainData, n = t.datas;
  n || (n = {
    main: e
  }, t.datasAttr = {
    main: "data"
  }), t.datas = t.mainData = null, Qfe(e, n, t), F(n, function(r) {
    F(e.TRANSFERABLE_METHODS, function(i) {
      r.wrapMethod(i, vt(Snt, t));
    });
  }), e.wrapMethod("cloneShallow", vt(wnt, t)), F(e.CHANGABLE_METHODS, function(r) {
    e.wrapMethod(r, vt(xnt, t));
  }), at(n[e.dataType] === e);
}
function Snt(t, e) {
  if (Pnt(this)) {
    var n = _e({}, Ko(this).datas);
    n[this.dataType] = e, Qfe(e, n, t);
  } else
    H3(e, this.dataType, Ko(this).mainData, t);
  return e;
}
function xnt(t, e) {
  return t.struct && t.struct.update(), e;
}
function wnt(t, e) {
  return F(Ko(e).datas, function(n, r) {
    n !== e && H3(n.cloneShallow(), r, e, t);
  }), e;
}
function Cnt(t) {
  var e = Ko(this).mainData;
  return t == null || e == null ? e : Ko(e).datas[t];
}
function Tnt() {
  var t = Ko(this).mainData;
  return t == null ? [{
    data: t
  }] : Ce(kt(Ko(t).datas), function(e) {
    return {
      type: e,
      data: Ko(t).datas[e]
    };
  });
}
function Pnt(t) {
  return Ko(t).mainData === t;
}
function Qfe(t, e, n) {
  Ko(t).datas = {}, F(e, function(r, i) {
    H3(r, i, t, n);
  });
}
function H3(t, e, n, r) {
  Ko(n).datas[e] = t, Ko(t).mainData = n, t.dataType = e, r.struct && (t[r.structAttr] = r.struct, r.struct[r.datasAttr[e]] = t), t.getLinkedData = Cnt, t.getLinkedDataAll = Tnt;
}
var $nt = (
  /** @class */
  function() {
    function t(e, n) {
      this.depth = 0, this.height = 0, this.dataIndex = -1, this.children = [], this.viewChildren = [], this.isExpand = !1, this.name = e || "", this.hostTree = n;
    }
    return t.prototype.isRemoved = function() {
      return this.dataIndex < 0;
    }, t.prototype.eachNode = function(e, n, r) {
      qe(e) && (r = n, n = e, e = null), e = e || {}, Ve(e) && (e = {
        order: e
      });
      var i = e.order || "preorder", a = this[e.attr || "children"], o;
      i === "preorder" && (o = n.call(r, this));
      for (var s = 0; !o && s < a.length; s++)
        a[s].eachNode(e, n, r);
      i === "postorder" && n.call(r, this);
    }, t.prototype.updateDepthAndHeight = function(e) {
      var n = 0;
      this.depth = e;
      for (var r = 0; r < this.children.length; r++) {
        var i = this.children[r];
        i.updateDepthAndHeight(e + 1), i.height > n && (n = i.height);
      }
      this.height = n + 1;
    }, t.prototype.getNodeById = function(e) {
      if (this.getId() === e)
        return this;
      for (var n = 0, r = this.children, i = r.length; n < i; n++) {
        var a = r[n].getNodeById(e);
        if (a)
          return a;
      }
    }, t.prototype.contains = function(e) {
      if (e === this)
        return !0;
      for (var n = 0, r = this.children, i = r.length; n < i; n++) {
        var a = r[n].contains(e);
        if (a)
          return a;
      }
    }, t.prototype.getAncestors = function(e) {
      for (var n = [], r = e ? this : this.parentNode; r; )
        n.push(r), r = r.parentNode;
      return n.reverse(), n;
    }, t.prototype.getAncestorsIndices = function() {
      for (var e = [], n = this; n; )
        e.push(n.dataIndex), n = n.parentNode;
      return e.reverse(), e;
    }, t.prototype.getDescendantIndices = function() {
      var e = [];
      return this.eachNode(function(n) {
        e.push(n.dataIndex);
      }), e;
    }, t.prototype.getValue = function(e) {
      var n = this.hostTree.data;
      return n.getStore().get(n.getDimensionIndex(e || "value"), this.dataIndex);
    }, t.prototype.setLayout = function(e, n) {
      this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, e, n);
    }, t.prototype.getLayout = function() {
      return this.hostTree.data.getItemLayout(this.dataIndex);
    }, t.prototype.getModel = function(e) {
      if (!(this.dataIndex < 0)) {
        var n = this.hostTree, r = n.data.getItemModel(this.dataIndex);
        return r.getModel(e);
      }
    }, t.prototype.getLevelModel = function() {
      return (this.hostTree.levelModels || [])[this.depth];
    }, t.prototype.setVisual = function(e, n) {
      this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, e, n);
    }, t.prototype.getVisual = function(e) {
      return this.hostTree.data.getItemVisual(this.dataIndex, e);
    }, t.prototype.getRawIndex = function() {
      return this.hostTree.data.getRawIndex(this.dataIndex);
    }, t.prototype.getId = function() {
      return this.hostTree.data.getId(this.dataIndex);
    }, t.prototype.getChildIndex = function() {
      if (this.parentNode) {
        for (var e = this.parentNode.children, n = 0; n < e.length; ++n)
          if (e[n] === this)
            return n;
        return -1;
      }
      return -1;
    }, t.prototype.isAncestorOf = function(e) {
      for (var n = e.parentNode; n; ) {
        if (n === this)
          return !0;
        n = n.parentNode;
      }
      return !1;
    }, t.prototype.isDescendantOf = function(e) {
      return e !== this && e.isAncestorOf(this);
    }, t;
  }()
), G3 = (
  /** @class */
  function() {
    function t(e) {
      this.type = "tree", this._nodes = [], this.hostModel = e;
    }
    return t.prototype.eachNode = function(e, n, r) {
      this.root.eachNode(e, n, r);
    }, t.prototype.getNodeByDataIndex = function(e) {
      var n = this.data.getRawIndex(e);
      return this._nodes[n];
    }, t.prototype.getNodeById = function(e) {
      return this.root.getNodeById(e);
    }, t.prototype.update = function() {
      for (var e = this.data, n = this._nodes, r = 0, i = n.length; r < i; r++)
        n[r].dataIndex = -1;
      for (var r = 0, i = e.count(); r < i; r++)
        n[e.getRawIndex(r)].dataIndex = r;
    }, t.prototype.clearLayouts = function() {
      this.data.clearItemLayouts();
    }, t.createTree = function(e, n, r) {
      var i = new t(n), a = [], o = 1;
      s(e);
      function s(c, f) {
        var d = c.value;
        o = Math.max(o, Se(d) ? d.length : 1), a.push(c);
        var h = new $nt(Br(c.name, ""), i);
        f ? Ant(h, f) : i.root = h, i._nodes.push(h);
        var p = c.children;
        if (p)
          for (var v = 0; v < p.length; v++)
            s(p[v], h);
      }
      i.root.updateDepthAndHeight(0);
      var l = Mm(a, {
        coordDimensions: ["value"],
        dimensionsCount: o
      }).dimensions, u = new Fi(l, n);
      return u.initData(a), r && r(u), Wfe({
        mainData: u,
        struct: i,
        structAttr: "tree"
      }), i.update(), i;
    }, t;
  }()
);
function Ant(t, e) {
  var n = e.children;
  t.parentNode !== e && (n.push(t), t.parentNode = e);
}
function s_(t, e, n) {
  if (t && St(e, t.type) >= 0) {
    var r = n.getData().tree.root, i = t.targetNode;
    if (Ve(i) && (i = r.getNodeById(i)), i && r.contains(i))
      return {
        node: i
      };
    var a = t.targetNodeId;
    if (a != null && (i = r.getNodeById(a)))
      return {
        node: i
      };
  }
}
function Hfe(t) {
  for (var e = []; t; )
    t = t.parentNode, t && e.push(t);
  return e.reverse();
}
function j3(t, e) {
  var n = Hfe(t);
  return St(n, e) >= 0;
}
function GP(t, e) {
  for (var n = []; t; ) {
    var r = t.dataIndex;
    n.push({
      name: t.name,
      dataIndex: r,
      value: e.getRawValue(r)
    }), t = t.parentNode;
  }
  return n.reverse(), n;
}
var Ent = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.hasSymbolVisual = !0, n.ignoreStyleOnData = !0, n;
    }
    return e.prototype.getInitialData = function(n) {
      var r = {
        name: n.name,
        children: n.data
      }, i = n.leaves || {}, a = new xn(i, this, this.ecModel), o = G3.createTree(r, this, s);
      function s(f) {
        f.wrapMethod("getItemModel", function(d, h) {
          var p = o.getNodeByDataIndex(h);
          return p && p.children.length && p.isExpand || (d.parentModel = a), d;
        });
      }
      var l = 0;
      o.eachNode("preorder", function(f) {
        f.depth > l && (l = f.depth);
      });
      var u = n.expandAndCollapse, c = u && n.initialTreeDepth >= 0 ? n.initialTreeDepth : l;
      return o.root.eachNode("preorder", function(f) {
        var d = f.hostTree.data.getRawDataItem(f.dataIndex);
        f.isExpand = d && d.collapsed != null ? !d.collapsed : f.depth <= c;
      }), o.data;
    }, e.prototype.getOrient = function() {
      var n = this.get("orient");
      return n === "horizontal" ? n = "LR" : n === "vertical" && (n = "TB"), n;
    }, e.prototype.setZoom = function(n) {
      this.option.zoom = n;
    }, e.prototype.setCenter = function(n) {
      this.option.center = n;
    }, e.prototype.formatTooltip = function(n, r, i) {
      for (var a = this.getData().tree, o = a.root.children[0], s = a.getNodeByDataIndex(n), l = s.getValue(), u = s.name; s && s !== o; )
        u = s.parentNode.name + "." + u, s = s.parentNode;
      return ti("nameValue", {
        name: u,
        value: l,
        noValue: isNaN(l) || l == null
      });
    }, e.prototype.getDataParams = function(n) {
      var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
      return r.treeAncestors = GP(i, this), r.collapsed = !i.isExpand, r;
    }, e.type = "series.tree", e.layoutMode = "box", e.defaultOption = {
      // zlevel: 0,
      z: 2,
      coordinateSystem: "view",
      // the position of the whole view
      left: "12%",
      top: "12%",
      right: "12%",
      bottom: "12%",
      // the layout of the tree, two value can be selected, 'orthogonal' or 'radial'
      layout: "orthogonal",
      // value can be 'polyline'
      edgeShape: "curve",
      edgeForkPosition: "50%",
      // true | false | 'move' | 'scale', see module:component/helper/RoamController.
      roam: !1,
      // Symbol size scale ratio in roam
      nodeScaleRatio: 0.4,
      // Default on center of graph
      center: null,
      zoom: 1,
      orient: "LR",
      symbol: "emptyCircle",
      symbolSize: 7,
      expandAndCollapse: !0,
      initialTreeDepth: 2,
      lineStyle: {
        color: "#ccc",
        width: 1.5,
        curveness: 0.5
      },
      itemStyle: {
        color: "lightsteelblue",
        // borderColor: '#c23531',
        borderWidth: 1.5
      },
      label: {
        show: !0
      },
      animationEasing: "linear",
      animationDuration: 700,
      animationDurationUpdate: 500
    }, e;
  }(Cn)
);
function Mnt(t, e, n) {
  for (var r = [t], i = [], a; a = r.pop(); )
    if (i.push(a), a.isExpand) {
      var o = a.children;
      if (o.length)
        for (var s = 0; s < o.length; s++)
          r.push(o[s]);
    }
  for (; a = i.pop(); )
    e(a, n);
}
function G0(t, e) {
  for (var n = [t], r; r = n.pop(); )
    if (e(r), r.isExpand) {
      var i = r.children;
      if (i.length)
        for (var a = i.length - 1; a >= 0; a--)
          n.push(i[a]);
    }
}
function Int(t, e) {
  t.eachSeriesByType("tree", function(n) {
    Dnt(n, e);
  });
}
function Dnt(t, e) {
  var n = dnt(t, e);
  t.layoutInfo = n;
  var r = t.get("layout"), i = 0, a = 0, o = null;
  r === "radial" ? (i = 2 * Math.PI, a = Math.min(n.height, n.width) / 2, o = hU(function(_, O) {
    return (_.parentNode === O.parentNode ? 1 : 2) / _.depth;
  })) : (i = n.width, a = n.height, o = hU());
  var s = t.getData().tree.root, l = s.children[0];
  if (l) {
    unt(s), Mnt(l, cnt, o), s.hierNode.modifier = -l.hierNode.prelim, G0(l, fnt);
    var u = l, c = l, f = l;
    G0(l, function(_) {
      var O = _.getLayout().x;
      O < u.getLayout().x && (u = _), O > c.getLayout().x && (c = _), _.depth > f.depth && (f = _);
    });
    var d = u === c ? 1 : o(u, c) / 2, h = d - u.getLayout().x, p = 0, v = 0, g = 0, m = 0;
    if (r === "radial")
      p = i / (c.getLayout().x + d + h), v = a / (f.depth - 1 || 1), G0(l, function(_) {
        g = (_.getLayout().x + h) * p, m = (_.depth - 1) * v;
        var O = Sy(g, m);
        _.setLayout({
          x: O.x,
          y: O.y,
          rawX: g,
          rawY: m
        }, !0);
      });
    else {
      var y = t.getOrient();
      y === "RL" || y === "LR" ? (v = a / (c.getLayout().x + d + h), p = i / (f.depth - 1 || 1), G0(l, function(_) {
        m = (_.getLayout().x + h) * v, g = y === "LR" ? (_.depth - 1) * p : i - (_.depth - 1) * p, _.setLayout({
          x: g,
          y: m
        }, !0);
      })) : (y === "TB" || y === "BT") && (p = i / (c.getLayout().x + d + h), v = a / (f.depth - 1 || 1), G0(l, function(_) {
        g = (_.getLayout().x + h) * p, m = y === "TB" ? (_.depth - 1) * v : a - (_.depth - 1) * v, _.setLayout({
          x: g,
          y: m
        }, !0);
      }));
    }
  }
}
function Rnt(t) {
  t.eachSeriesByType("tree", function(e) {
    var n = e.getData(), r = n.tree;
    r.eachNode(function(i) {
      var a = i.getModel(), o = a.getModel("itemStyle").getItemStyle(), s = n.ensureUniqueItemVisual(i.dataIndex, "style");
      _e(s, o);
    });
  });
}
function knt(t) {
  t.registerAction({
    type: "treeExpandAndCollapse",
    event: "treeExpandAndCollapse",
    update: "update"
  }, function(e, n) {
    n.eachComponent({
      mainType: "series",
      subType: "tree",
      query: e
    }, function(r) {
      var i = e.dataIndex, a = r.getData().tree, o = a.getNodeByDataIndex(i);
      o.isExpand = !o.isExpand;
    });
  }), t.registerAction({
    type: "treeRoam",
    event: "treeRoam",
    // Here we set 'none' instead of 'update', because roam action
    // just need to update the transform matrix without having to recalculate
    // the layout. So don't need to go through the whole update process, such
    // as 'dataPrcocess', 'coordSystemUpdate', 'layout' and so on.
    update: "none"
  }, function(e, n, r) {
    n.eachComponent({
      mainType: "series",
      subType: "tree",
      query: e
    }, function(i) {
      var a = i.coordinateSystem, o = Q3(a, e, void 0, r);
      i.setCenter && i.setCenter(o.center), i.setZoom && i.setZoom(o.zoom);
    });
  });
}
function Lnt(t) {
  t.registerChartView(_nt), t.registerSeriesModel(Ent), t.registerLayout(Int), t.registerVisual(Rnt), knt(t);
}
var yU = ["treemapZoomToNode", "treemapRender", "treemapMove"];
function Nnt(t) {
  for (var e = 0; e < yU.length; e++)
    t.registerAction({
      type: yU[e],
      update: "updateView"
    }, fr);
  t.registerAction({
    type: "treemapRootToNode",
    update: "updateView"
  }, function(n, r) {
    r.eachComponent({
      mainType: "series",
      subType: "treemap",
      query: n
    }, i);
    function i(a, o) {
      var s = ["treemapZoomToNode", "treemapRootToNode"], l = s_(n, s, a);
      if (l) {
        var u = a.getViewRoot();
        u && (n.direction = j3(u, l.node) ? "rollUp" : "drillDown"), a.resetViewRoot(l.node);
      }
    }
  });
}
function Gfe(t) {
  var e = t.getData(), n = e.tree, r = {};
  n.eachNode(function(i) {
    for (var a = i; a && a.depth > 1; )
      a = a.parentNode;
    var o = zk(t.ecModel, a.name || a.dataIndex + "", r);
    i.setVisual("decal", o);
  });
}
var Bnt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.preventUsingHoverLayer = !0, n;
    }
    return e.prototype.getInitialData = function(n, r) {
      var i = {
        name: n.name,
        children: n.data
      };
      jfe(i);
      var a = n.levels || [], o = this.designatedVisualItemStyle = {}, s = new xn({
        itemStyle: o
      }, this, r);
      a = n.levels = znt(a, r);
      var l = Ce(a || [], function(f) {
        return new xn(f, s, r);
      }, this), u = G3.createTree(i, this, c);
      function c(f) {
        f.wrapMethod("getItemModel", function(d, h) {
          var p = u.getNodeByDataIndex(h), v = p ? l[p.depth] : null;
          return d.parentModel = v || s, d;
        });
      }
      return u.data;
    }, e.prototype.optionUpdated = function() {
      this.resetViewRoot();
    }, e.prototype.formatTooltip = function(n, r, i) {
      var a = this.getData(), o = this.getRawValue(n), s = a.getName(n);
      return ti("nameValue", {
        name: s,
        value: o
      });
    }, e.prototype.getDataParams = function(n) {
      var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
      return r.treeAncestors = GP(i, this), r.treePathInfo = r.treeAncestors, r;
    }, e.prototype.setLayoutInfo = function(n) {
      this.layoutInfo = this.layoutInfo || {}, _e(this.layoutInfo, n);
    }, e.prototype.mapIdToIndex = function(n) {
      var r = this._idIndexMap;
      r || (r = this._idIndexMap = Ze(), this._idIndexMapCount = 0);
      var i = r.get(n);
      return i == null && r.set(n, i = this._idIndexMapCount++), i;
    }, e.prototype.getViewRoot = function() {
      return this._viewRoot;
    }, e.prototype.resetViewRoot = function(n) {
      n ? this._viewRoot = n : n = this._viewRoot;
      var r = this.getRawData().tree.root;
      (!n || n !== r && !r.contains(n)) && (this._viewRoot = r);
    }, e.prototype.enableAriaDecal = function() {
      Gfe(this);
    }, e.type = "series.treemap", e.layoutMode = "box", e.defaultOption = {
      // Disable progressive rendering
      progressive: 0,
      // size: ['80%', '80%'],            // deprecated, compatible with ec2.
      left: "center",
      top: "middle",
      width: "80%",
      height: "80%",
      sort: !0,
      clipWindow: "origin",
      squareRatio: 0.5 * (1 + Math.sqrt(5)),
      leafDepth: null,
      drillDownIcon: "▶",
      // to align specialized icon. ▷▶❒❐▼✚
      zoomToNodeRatio: 0.32 * 0.32,
      scaleLimit: null,
      roam: !0,
      nodeClick: "zoomToNode",
      animation: !0,
      animationDurationUpdate: 900,
      animationEasing: "quinticInOut",
      breadcrumb: {
        show: !0,
        height: 22,
        left: "center",
        top: "bottom",
        // right
        // bottom
        emptyItemWidth: 25,
        itemStyle: {
          color: "rgba(0,0,0,0.7)",
          textStyle: {
            color: "#fff"
          }
        },
        emphasis: {
          itemStyle: {
            color: "rgba(0,0,0,0.9)"
            // '#5793f3',
          }
        }
      },
      label: {
        show: !0,
        // Do not use textDistance, for ellipsis rect just the same as treemap node rect.
        distance: 0,
        padding: 5,
        position: "inside",
        // formatter: null,
        color: "#fff",
        overflow: "truncate"
        // align
        // verticalAlign
      },
      upperLabel: {
        show: !1,
        position: [0, "50%"],
        height: 20,
        // formatter: null,
        // color: '#fff',
        overflow: "truncate",
        // align: null,
        verticalAlign: "middle"
      },
      itemStyle: {
        color: null,
        colorAlpha: null,
        colorSaturation: null,
        borderWidth: 0,
        gapWidth: 0,
        borderColor: "#fff",
        borderColorSaturation: null
        // If specified, borderColor will be ineffective, and the
        // border color is evaluated by color of current node and
        // borderColorSaturation.
      },
      emphasis: {
        upperLabel: {
          show: !0,
          position: [0, "50%"],
          overflow: "truncate",
          verticalAlign: "middle"
        }
      },
      visualDimension: 0,
      visualMin: null,
      visualMax: null,
      color: [],
      // level[n].color (if necessary).
      // + Specify color list of each level. level[0].color would be global
      // color list if not specified. (see method `setDefault`).
      // + But set as a empty array to forbid fetch color from global palette
      // when using nodeModel.get('color'), otherwise nodes on deep level
      // will always has color palette set and are not able to inherit color
      // from parent node.
      // + TreemapSeries.color can not be set as 'none', otherwise effect
      // legend color fetching (see seriesColor.js).
      colorAlpha: null,
      colorSaturation: null,
      colorMappingBy: "index",
      visibleMin: 10,
      // be rendered. Only works when sort is 'asc' or 'desc'.
      childrenVisibleMin: null,
      // grandchildren will not show.
      // Why grandchildren? If not grandchildren but children,
      // some siblings show children and some not,
      // the appearance may be mess and not consistent,
      levels: []
      // Each item: {
      //     visibleMin, itemStyle, visualDimension, label
      // }
    }, e;
  }(Cn)
);
function jfe(t) {
  var e = 0;
  F(t.children, function(r) {
    jfe(r);
    var i = r.value;
    Se(i) && (i = i[0]), e += i;
  });
  var n = t.value;
  Se(n) && (n = n[0]), (n == null || isNaN(n)) && (n = e), n < 0 && (n = 0), Se(t.value) ? t.value[0] = n : t.value = n;
}
function znt(t, e) {
  var n = wn(e.get("color")), r = wn(e.get(["aria", "decal", "decals"]));
  if (n) {
    t = t || [];
    var i, a;
    F(t, function(s) {
      var l = new xn(s), u = l.get("color"), c = l.get("decal");
      (l.get(["itemStyle", "color"]) || u && u !== "none") && (i = !0), (l.get(["itemStyle", "decal"]) || c && c !== "none") && (a = !0);
    });
    var o = t[0] || (t[0] = {});
    return i || (o.color = n.slice()), !a && r && (o.decal = r.slice()), t;
  }
}
var Vnt = 8, bU = 8, tI = 5, Fnt = (
  /** @class */
  function() {
    function t(e) {
      this.group = new ct(), e.add(this.group);
    }
    return t.prototype.render = function(e, n, r, i) {
      var a = e.getModel("breadcrumb"), o = this.group;
      if (o.removeAll(), !(!a.get("show") || !r)) {
        var s = a.getModel("itemStyle"), l = a.getModel("emphasis"), u = s.getModel("textStyle"), c = l.getModel(["itemStyle", "textStyle"]), f = {
          pos: {
            left: a.get("left"),
            right: a.get("right"),
            top: a.get("top"),
            bottom: a.get("bottom")
          },
          box: {
            width: n.getWidth(),
            height: n.getHeight()
          },
          emptyItemWidth: a.get("emptyItemWidth"),
          totalWidth: 0,
          renderList: []
        };
        this._prepare(r, f, u), this._renderContent(e, f, s, l, u, c, i), MP(o, f.pos, f.box);
      }
    }, t.prototype._prepare = function(e, n, r) {
      for (var i = e; i; i = i.parentNode) {
        var a = Br(i.getModel().get("name"), ""), o = r.getTextRect(a), s = Math.max(o.width + Vnt * 2, n.emptyItemWidth);
        n.totalWidth += s + bU, n.renderList.push({
          node: i,
          text: a,
          width: s
        });
      }
    }, t.prototype._renderContent = function(e, n, r, i, a, o, s) {
      for (var l = 0, u = n.emptyItemWidth, c = e.get(["breadcrumb", "height"]), f = $Ue(n.pos, n.box), d = n.totalWidth, h = n.renderList, p = i.getModel("itemStyle").getItemStyle(), v = h.length - 1; v >= 0; v--) {
        var g = h[v], m = g.node, y = g.width, _ = g.text;
        d > f.width && (d -= y - u, y = u, _ = null);
        var O = new pa({
          shape: {
            points: Wnt(l, 0, y, c, v === h.length - 1, v === 0)
          },
          style: it(r.getItemStyle(), {
            lineJoin: "bevel"
          }),
          textContent: new jt({
            style: Mn(a, {
              text: _
            })
          }),
          textConfig: {
            position: "inside"
          },
          z2: bm * 1e4,
          onclick: vt(s, m)
        });
        O.disableLabelAnimation = !0, O.getTextContent().ensureState("emphasis").style = Mn(o, {
          text: _
        }), O.ensureState("emphasis").style = p, ur(O, i.get("focus"), i.get("blurScope"), i.get("disabled")), this.group.add(O), Qnt(O, e, m), l += y + bU;
      }
    }, t.prototype.remove = function() {
      this.group.removeAll();
    }, t;
  }()
);
function Wnt(t, e, n, r, i, a) {
  var o = [[i ? t : t - tI, e], [t + n, e], [t + n, e + r], [i ? t : t - tI, e + r]];
  return !a && o.splice(2, 0, [t + n + tI, e + r / 2]), !i && o.push([t, e + r / 2]), o;
}
function Qnt(t, e, n) {
  ft(t).eventData = {
    componentType: "series",
    componentSubType: "treemap",
    componentIndex: e.componentIndex,
    seriesIndex: e.seriesIndex,
    seriesName: e.name,
    seriesType: "treemap",
    selfType: "breadcrumb",
    nodeData: {
      dataIndex: n && n.dataIndex,
      name: n && n.name
    },
    treePathInfo: n && GP(n, e)
  };
}
var Hnt = (
  /** @class */
  function() {
    function t() {
      this._storage = [], this._elExistsMap = {};
    }
    return t.prototype.add = function(e, n, r, i, a) {
      return this._elExistsMap[e.id] ? !1 : (this._elExistsMap[e.id] = !0, this._storage.push({
        el: e,
        target: n,
        duration: r,
        delay: i,
        easing: a
      }), !0);
    }, t.prototype.finished = function(e) {
      return this._finishedCallback = e, this;
    }, t.prototype.start = function() {
      for (var e = this, n = this._storage.length, r = function() {
        n--, n <= 0 && (e._storage.length = 0, e._elExistsMap = {}, e._finishedCallback && e._finishedCallback());
      }, i = 0, a = this._storage.length; i < a; i++) {
        var o = this._storage[i];
        o.el.animateTo(o.target, {
          duration: o.duration,
          delay: o.delay,
          easing: o.easing,
          setToFinal: !0,
          done: r,
          aborted: r
        });
      }
      return this;
    }, t;
  }()
);
function Gnt() {
  return new Hnt();
}
var dL = ct, _U = Zt, OU = 3, SU = "label", xU = "upperLabel", jnt = bm * 10, Znt = bm * 2, Unt = bm * 3, Nd = jh([
  ["fill", "color"],
  // `borderColor` and `borderWidth` has been occupied,
  // so use `stroke` to indicate the stroke of the rect.
  ["stroke", "strokeColor"],
  ["lineWidth", "strokeWidth"],
  ["shadowBlur"],
  ["shadowOffsetX"],
  ["shadowOffsetY"],
  ["shadowColor"]
  // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  // So do not transfer decal directly.
]), wU = function(t) {
  var e = Nd(t);
  return e.stroke = e.fill = e.lineWidth = null, e;
}, iT = Ut(), Xnt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._state = "ready", n._storage = j0(), n;
    }
    return e.prototype.render = function(n, r, i, a) {
      var o = r.findComponents({
        mainType: "series",
        subType: "treemap",
        query: a
      });
      if (!(St(o, n) < 0)) {
        this.seriesModel = n, this.api = i, this.ecModel = r;
        var s = ["treemapZoomToNode", "treemapRootToNode"], l = s_(a, s, n), u = a && a.type, c = n.layoutInfo, f = !this._oldTree, d = this._storage, h = u === "treemapRootToNode" && l && d ? {
          rootNodeGroup: d.nodeGroup[l.node.getRawIndex()],
          direction: a.direction
        } : null, p = this._giveContainerGroup(c), v = n.get("animation"), g = this._doRender(p, n, h);
        v && !f && (!u || u === "treemapZoomToNode" || u === "treemapRootToNode") ? this._doAnimation(p, g, n, h) : g.renderFinally(), this._resetController(i), this._renderBreadcrumb(n, i, l);
      }
    }, e.prototype._giveContainerGroup = function(n) {
      var r = this._containerGroup;
      return r || (r = this._containerGroup = new dL(), this._initEvents(r), this.group.add(r)), r.x = n.x, r.y = n.y, r;
    }, e.prototype._doRender = function(n, r, i) {
      var a = r.getData().tree, o = this._oldTree, s = j0(), l = j0(), u = this._storage, c = [];
      function f(y, _, O, S) {
        return Ynt(r, l, u, i, s, c, y, _, O, S);
      }
      v(a.root ? [a.root] : [], o && o.root ? [o.root] : [], n, a === o || !o, 0);
      var d = g(u);
      if (this._oldTree = a, this._storage = l, this._controllerHost) {
        var h = this.seriesModel.layoutInfo, p = a.root.getLayout();
        p.width === h.width && p.height === h.height && (this._controllerHost.zoom = 1);
      }
      return {
        lastsForAnimation: s,
        willDeleteEls: d,
        renderFinally: m
      };
      function v(y, _, O, S, x) {
        S ? (_ = y, F(y, function($, T) {
          !$.isRemoved() && P(T, T);
        })) : new Qu(_, y, C, C).add(P).update(P).remove(vt(P, null)).execute();
        function C($) {
          return $.getId();
        }
        function P($, T) {
          var E = $ != null ? y[$] : null, M = T != null ? _[T] : null, R = f(E, M, O, x);
          R && v(E && E.viewChildren || [], M && M.viewChildren || [], R, S, x + 1);
        }
      }
      function g(y) {
        var _ = j0();
        return y && F(y, function(O, S) {
          var x = _[S];
          F(O, function(C) {
            C && (x.push(C), iT(C).willDelete = !0);
          });
        }), _;
      }
      function m() {
        F(d, function(y) {
          F(y, function(_) {
            _.parent && _.parent.remove(_);
          });
        }), F(c, function(y) {
          y.invisible = !0, y.dirty();
        });
      }
    }, e.prototype._doAnimation = function(n, r, i, a) {
      var o = i.get("animationDurationUpdate"), s = i.get("animationEasing"), l = (qe(o) ? 0 : o) || 0, u = (qe(s) ? null : s) || "cubicOut", c = Gnt();
      F(r.willDeleteEls, function(f, d) {
        F(f, function(h, p) {
          if (!h.invisible) {
            var v = h.parent, g, m = iT(v);
            if (a && a.direction === "drillDown")
              g = v === a.rootNodeGroup ? {
                shape: {
                  x: 0,
                  y: 0,
                  width: m.nodeWidth,
                  height: m.nodeHeight
                },
                style: {
                  opacity: 0
                }
              } : {
                style: {
                  opacity: 0
                }
              };
            else {
              var y = 0, _ = 0;
              m.willDelete || (y = m.nodeWidth / 2, _ = m.nodeHeight / 2), g = d === "nodeGroup" ? {
                x: y,
                y: _,
                style: {
                  opacity: 0
                }
              } : {
                shape: {
                  x: y,
                  y: _,
                  width: 0,
                  height: 0
                },
                style: {
                  opacity: 0
                }
              };
            }
            g && c.add(h, g, l, 0, u);
          }
        });
      }), F(this._storage, function(f, d) {
        F(f, function(h, p) {
          var v = r.lastsForAnimation[d][p], g = {};
          v && (h instanceof ct ? v.oldX != null && (g.x = h.x, g.y = h.y, h.x = v.oldX, h.y = v.oldY) : (v.oldShape && (g.shape = _e({}, h.shape), h.setShape(v.oldShape)), v.fadein ? (h.setStyle("opacity", 0), g.style = {
            opacity: 1
          }) : h.style.opacity !== 1 && (g.style = {
            opacity: 1
          })), c.add(h, g, l, 0, u));
        });
      }, this), this._state = "animating", c.finished(We(function() {
        this._state = "ready", r.renderFinally();
      }, this)).start();
    }, e.prototype._resetController = function(n) {
      var r = this._controller, i = this._controllerHost;
      i || (this._controllerHost = {
        target: this.group
      }, i = this._controllerHost), r || (r = this._controller = new x1(n.getZr()), r.enable(this.seriesModel.get("roam")), i.zoomLimit = this.seriesModel.get("scaleLimit"), i.zoom = this.seriesModel.get("zoom"), r.on("pan", We(this._onPan, this)), r.on("zoom", We(this._onZoom, this)));
      var a = new bt(0, 0, n.getWidth(), n.getHeight());
      r.setPointerChecker(function(o, s, l) {
        return a.contain(s, l);
      });
    }, e.prototype._clearController = function() {
      var n = this._controller;
      this._controllerHost = null, n && (n.dispose(), n = null);
    }, e.prototype._onPan = function(n) {
      if (this._state !== "animating" && (Math.abs(n.dx) > OU || Math.abs(n.dy) > OU)) {
        var r = this.seriesModel.getData().tree.root;
        if (!r)
          return;
        var i = r.getLayout();
        if (!i)
          return;
        this.api.dispatchAction({
          type: "treemapMove",
          from: this.uid,
          seriesId: this.seriesModel.id,
          rootRect: {
            x: i.x + n.dx,
            y: i.y + n.dy,
            width: i.width,
            height: i.height
          }
        });
      }
    }, e.prototype._onZoom = function(n) {
      var r = n.originX, i = n.originY, a = n.scale;
      if (this._state !== "animating") {
        var o = this.seriesModel.getData().tree.root;
        if (!o)
          return;
        var s = o.getLayout();
        if (!s)
          return;
        var l = new bt(s.x, s.y, s.width, s.height), u = null, c = this._controllerHost;
        u = c.zoomLimit;
        var f = c.zoom = c.zoom || 1;
        if (f *= a, u) {
          var d = u.min || 0, h = u.max || 1 / 0;
          f = Math.max(Math.min(h, f), d);
        }
        var p = f / c.zoom;
        c.zoom = f;
        var v = this.seriesModel.layoutInfo;
        r -= v.x, i -= v.y;
        var g = Na();
        Gs(g, g, [-r, -i]), uP(g, g, [p, p]), Gs(g, g, [r, i]), l.applyTransform(g), this.api.dispatchAction({
          type: "treemapRender",
          from: this.uid,
          seriesId: this.seriesModel.id,
          rootRect: {
            x: l.x,
            y: l.y,
            width: l.width,
            height: l.height
          }
        });
      }
    }, e.prototype._initEvents = function(n) {
      var r = this;
      n.on("click", function(i) {
        if (r._state === "ready") {
          var a = r.seriesModel.get("nodeClick", !0);
          if (a) {
            var o = r.findTarget(i.offsetX, i.offsetY);
            if (o) {
              var s = o.node;
              if (s.getLayout().isLeafRoot)
                r._rootToNode(o);
              else if (a === "zoomToNode")
                r._zoomToNode(o);
              else if (a === "link") {
                var l = s.hostTree.data.getItemModel(s.dataIndex), u = l.get("link", !0), c = l.get("target", !0) || "blank";
                u && BC(u, c);
              }
            }
          }
        }
      }, this);
    }, e.prototype._renderBreadcrumb = function(n, r, i) {
      var a = this;
      i || (i = n.get("leafDepth", !0) != null ? {
        node: n.getViewRoot()
      } : this.findTarget(r.getWidth() / 2, r.getHeight() / 2), i || (i = {
        node: n.getData().tree.root
      })), (this._breadcrumb || (this._breadcrumb = new Fnt(this.group))).render(n, r, i.node, function(o) {
        a._state !== "animating" && (j3(n.getViewRoot(), o) ? a._rootToNode({
          node: o
        }) : a._zoomToNode({
          node: o
        }));
      });
    }, e.prototype.remove = function() {
      this._clearController(), this._containerGroup && this._containerGroup.removeAll(), this._storage = j0(), this._state = "ready", this._breadcrumb && this._breadcrumb.remove();
    }, e.prototype.dispose = function() {
      this._clearController();
    }, e.prototype._zoomToNode = function(n) {
      this.api.dispatchAction({
        type: "treemapZoomToNode",
        from: this.uid,
        seriesId: this.seriesModel.id,
        targetNode: n.node
      });
    }, e.prototype._rootToNode = function(n) {
      this.api.dispatchAction({
        type: "treemapRootToNode",
        from: this.uid,
        seriesId: this.seriesModel.id,
        targetNode: n.node
      });
    }, e.prototype.findTarget = function(n, r) {
      var i, a = this.seriesModel.getViewRoot();
      return a.eachNode({
        attr: "viewChildren",
        order: "preorder"
      }, function(o) {
        var s = this._storage.background[o.getRawIndex()];
        if (s) {
          var l = s.transformCoordToLocal(n, r), u = s.shape;
          if (u.x <= l[0] && l[0] <= u.x + u.width && u.y <= l[1] && l[1] <= u.y + u.height)
            i = {
              node: o,
              offsetX: l[0],
              offsetY: l[1]
            };
          else
            return !1;
        }
      }, this), i;
    }, e.type = "treemap", e;
  }(_n)
);
function j0() {
  return {
    nodeGroup: [],
    background: [],
    content: []
  };
}
function Ynt(t, e, n, r, i, a, o, s, l, u) {
  if (!o)
    return;
  var c = o.getLayout(), f = t.getData(), d = o.getModel();
  if (f.setItemGraphicEl(o.dataIndex, null), !c || !c.isInView)
    return;
  var h = c.width, p = c.height, v = c.borderWidth, g = c.invisible, m = o.getRawIndex(), y = s && s.getRawIndex(), _ = o.viewChildren, O = c.upperHeight, S = _ && _.length, x = d.getModel("itemStyle"), C = d.getModel(["emphasis", "itemStyle"]), P = d.getModel(["blur", "itemStyle"]), $ = d.getModel(["select", "itemStyle"]), T = x.get("borderRadius") || 0, E = fe("nodeGroup", dL);
  if (!E)
    return;
  if (l.add(E), E.x = c.x || 0, E.y = c.y || 0, E.markRedraw(), iT(E).nodeWidth = h, iT(E).nodeHeight = p, c.isAboveViewRoot)
    return E;
  var M = fe("background", _U, u, Znt);
  M && H(E, M, S && c.upperLabelHeight);
  var R = d.getModel("emphasis"), N = R.get("focus"), I = R.get("blurScope"), B = R.get("disabled"), Q = N === "ancestor" ? o.getAncestorsIndices() : N === "descendant" ? o.getDescendantIndices() : N;
  if (S)
    bf(E) && ah(E, !1), M && (ah(M, !B), f.setItemGraphicEl(o.dataIndex, M), Ek(M, Q, I));
  else {
    var W = fe("content", _U, u, Unt);
    W && U(E, W), M.disableMorphing = !0, M && bf(M) && ah(M, !1), ah(E, !B), f.setItemGraphicEl(o.dataIndex, E), Ek(E, Q, I);
  }
  return E;
  function H(se, he, re) {
    var q = ft(he);
    if (q.dataIndex = o.dataIndex, q.seriesIndex = t.seriesIndex, he.setShape({
      x: 0,
      y: 0,
      width: h,
      height: p,
      r: T
    }), g)
      j(he);
    else {
      he.invisible = !1;
      var K = o.getVisual("style"), de = K.stroke, xe = wU(x);
      xe.fill = de;
      var we = Nd(C);
      we.fill = C.get("borderColor");
      var He = Nd(P);
      He.fill = P.get("borderColor");
      var je = Nd($);
      if (je.fill = $.get("borderColor"), re) {
        var Be = h - 2 * v;
        Y(
          // PENDING: convert ZRColor to ColorString for text.
          he,
          de,
          K.opacity,
          {
            x: v,
            y: 0,
            width: Be,
            height: O
          }
        );
      } else
        he.removeTextContent();
      he.setStyle(xe), he.ensureState("emphasis").style = we, he.ensureState("blur").style = He, he.ensureState("select").style = je, Zh(he);
    }
    se.add(he);
  }
  function U(se, he) {
    var re = ft(he);
    re.dataIndex = o.dataIndex, re.seriesIndex = t.seriesIndex;
    var q = Math.max(h - 2 * v, 0), K = Math.max(p - 2 * v, 0);
    if (he.culling = !0, he.setShape({
      x: v,
      y: v,
      width: q,
      height: K,
      r: T
    }), g)
      j(he);
    else {
      he.invisible = !1;
      var de = o.getVisual("style"), xe = de.fill, we = wU(x);
      we.fill = xe, we.decal = de.decal;
      var He = Nd(C), je = Nd(P), Be = Nd($);
      Y(he, xe, de.opacity, null), he.setStyle(we), he.ensureState("emphasis").style = He, he.ensureState("blur").style = je, he.ensureState("select").style = Be, Zh(he);
    }
    se.add(he);
  }
  function j(se) {
    !se.invisible && a.push(se);
  }
  function Y(se, he, re, q) {
    var K = d.getModel(q ? xU : SU), de = Br(d.get("name"), null), xe = K.getShallow("show");
    Ei(se, ei(d, q ? xU : SU), {
      defaultText: xe ? de : null,
      inheritColor: he,
      defaultOpacity: re,
      labelFetcher: t,
      labelDataIndex: o.dataIndex
    });
    var we = se.getTextContent();
    if (we) {
      var He = we.style, je = sP(He.padding || 0);
      q && (se.setTextConfig({
        layoutRect: q
      }), we.disableLabelLayout = !0), we.beforeUpdate = function() {
        var Le = Math.max((q ? q.width : se.shape.width) - je[1] - je[3], 0), Pe = Math.max((q ? q.height : se.shape.height) - je[0] - je[2], 0);
        (He.width !== Le || He.height !== Pe) && we.setStyle({
          width: Le,
          height: Pe
        });
      }, He.truncateMinChar = 2, He.lineOverflow = "truncate", ne(He, q, c);
      var Be = we.getState("emphasis");
      ne(Be ? Be.style : null, q, c);
    }
  }
  function ne(se, he, re) {
    var q = se ? se.text : null;
    if (!he && re.isLeafRoot && q != null) {
      var K = t.get("drillDownIcon", !0);
      se.text = K ? K + " " + q : q;
    }
  }
  function fe(se, he, re, q) {
    var K = y != null && n[se][y], de = i[se];
    return K ? (n[se][y] = null, ue(de, K)) : g || (K = new he(), K instanceof ls && (K.z2 = qnt(re, q)), ye(de, K)), e[se][m] = K;
  }
  function ue(se, he) {
    var re = se[m] = {};
    he instanceof dL ? (re.oldX = he.x, re.oldY = he.y) : re.oldShape = _e({}, he.shape);
  }
  function ye(se, he) {
    var re = se[m] = {}, q = o.parentNode, K = he instanceof ct;
    if (q && (!r || r.direction === "drillDown")) {
      var de = 0, xe = 0, we = i.background[q.getRawIndex()];
      !r && we && we.oldShape && (de = we.oldShape.width, xe = we.oldShape.height), K ? (re.oldX = 0, re.oldY = xe) : re.oldShape = {
        x: de,
        y: xe,
        width: 0,
        height: 0
      };
    }
    re.fadein = !K;
  }
}
function qnt(t, e) {
  return t * jnt + e;
}
var l_ = F, Knt = nt, aT = -1, Kr = (
  /** @class */
  function() {
    function t(e) {
      var n = e.mappingMethod, r = e.type, i = this.option = ot(e);
      this.type = r, this.mappingMethod = n, this._normalizeData = trt[n];
      var a = t.visualHandlers[r];
      this.applyVisual = a.applyVisual, this.getColorMapper = a.getColorMapper, this._normalizedToVisual = a._normalizedToVisual[n], n === "piecewise" ? (nI(i), Jnt(i)) : n === "category" ? i.categories ? ert(i) : nI(i, !0) : (at(n !== "linear" || i.dataExtent), nI(i));
    }
    return t.prototype.mapValueToVisual = function(e) {
      var n = this._normalizeData(e);
      return this._normalizedToVisual(n, e);
    }, t.prototype.getNormalizer = function() {
      return We(this._normalizeData, this);
    }, t.listVisualTypes = function() {
      return kt(t.visualHandlers);
    }, t.isValidType = function(e) {
      return t.visualHandlers.hasOwnProperty(e);
    }, t.eachVisual = function(e, n, r) {
      nt(e) ? F(e, n, r) : n.call(r, e);
    }, t.mapVisual = function(e, n, r) {
      var i, a = Se(e) ? [] : nt(e) ? {} : (i = !0, null);
      return t.eachVisual(e, function(o, s) {
        var l = n.call(r, o, s);
        i ? a = l : a[s] = l;
      }), a;
    }, t.retrieveVisuals = function(e) {
      var n = {}, r;
      return e && l_(t.visualHandlers, function(i, a) {
        e.hasOwnProperty(a) && (n[a] = e[a], r = !0);
      }), r ? n : null;
    }, t.prepareVisualTypes = function(e) {
      if (Se(e))
        e = e.slice();
      else if (Knt(e)) {
        var n = [];
        l_(e, function(r, i) {
          n.push(i);
        }), e = n;
      } else
        return [];
      return e.sort(function(r, i) {
        return i === "color" && r !== "color" && r.indexOf("color") === 0 ? 1 : -1;
      }), e;
    }, t.dependsOn = function(e, n) {
      return n === "color" ? !!(e && e.indexOf(n) === 0) : e === n;
    }, t.findPieceIndex = function(e, n, r) {
      for (var i, a = 1 / 0, o = 0, s = n.length; o < s; o++) {
        var l = n[o].value;
        if (l != null) {
          if (l === e || Ve(l) && l === e + "")
            return o;
          r && d(l, o);
        }
      }
      for (var o = 0, s = n.length; o < s; o++) {
        var u = n[o], c = u.interval, f = u.close;
        if (c) {
          if (c[0] === -1 / 0) {
            if (HS(f[1], e, c[1]))
              return o;
          } else if (c[1] === 1 / 0) {
            if (HS(f[0], c[0], e))
              return o;
          } else if (HS(f[0], c[0], e) && HS(f[1], e, c[1]))
            return o;
          r && d(c[0], o), r && d(c[1], o);
        }
      }
      if (r)
        return e === 1 / 0 ? n.length - 1 : e === -1 / 0 ? 0 : i;
      function d(h, p) {
        var v = Math.abs(h - e);
        v < a && (a = v, i = p);
      }
    }, t.visualHandlers = {
      color: {
        applyVisual: Z0("color"),
        getColorMapper: function() {
          var e = this.option;
          return We(e.mappingMethod === "category" ? function(n, r) {
            return !r && (n = this._normalizeData(n)), xy.call(this, n);
          } : function(n, r, i) {
            var a = !!i;
            return !r && (n = this._normalizeData(n)), i = Ky(n, e.parsedVisual, i), a ? i : Bs(i, "rgba");
          }, this);
        },
        _normalizedToVisual: {
          linear: function(e) {
            return Bs(Ky(e, this.option.parsedVisual), "rgba");
          },
          category: xy,
          piecewise: function(e, n) {
            var r = pL.call(this, n);
            return r == null && (r = Bs(Ky(e, this.option.parsedVisual), "rgba")), r;
          },
          fixed: Bd
        }
      },
      colorHue: QS(function(e, n) {
        return Yv(e, n);
      }),
      colorSaturation: QS(function(e, n) {
        return Yv(e, null, n);
      }),
      colorLightness: QS(function(e, n) {
        return Yv(e, null, null, n);
      }),
      colorAlpha: QS(function(e, n) {
        return Gb(e, n);
      }),
      decal: {
        applyVisual: Z0("decal"),
        _normalizedToVisual: {
          linear: null,
          category: xy,
          piecewise: null,
          fixed: null
        }
      },
      opacity: {
        applyVisual: Z0("opacity"),
        _normalizedToVisual: hL([0, 1])
      },
      liftZ: {
        applyVisual: Z0("liftZ"),
        _normalizedToVisual: {
          linear: Bd,
          category: Bd,
          piecewise: Bd,
          fixed: Bd
        }
      },
      symbol: {
        applyVisual: function(e, n, r) {
          var i = this.mapValueToVisual(e);
          r("symbol", i);
        },
        _normalizedToVisual: {
          linear: CU,
          category: xy,
          piecewise: function(e, n) {
            var r = pL.call(this, n);
            return r == null && (r = CU.call(this, e)), r;
          },
          fixed: Bd
        }
      },
      symbolSize: {
        applyVisual: Z0("symbolSize"),
        _normalizedToVisual: hL([0, 1])
      }
    }, t;
  }()
);
function Jnt(t) {
  var e = t.pieceList;
  t.hasSpecialVisual = !1, F(e, function(n, r) {
    n.originIndex = r, n.visual != null && (t.hasSpecialVisual = !0);
  });
}
function ert(t) {
  var e = t.categories, n = t.categoryMap = {}, r = t.visual;
  if (l_(e, function(o, s) {
    n[o] = s;
  }), !Se(r)) {
    var i = [];
    nt(r) ? l_(r, function(o, s) {
      var l = n[s];
      i[l ?? aT] = o;
    }) : i[aT] = r, r = Zfe(t, i);
  }
  for (var a = e.length - 1; a >= 0; a--)
    r[a] == null && (delete n[e[a]], e.pop());
}
function nI(t, e) {
  var n = t.visual, r = [];
  nt(n) ? l_(n, function(a) {
    r.push(a);
  }) : n != null && r.push(n);
  var i = {
    color: 1,
    symbol: 1
  };
  !e && r.length === 1 && !i.hasOwnProperty(t.type) && (r[1] = r[0]), Zfe(t, r);
}
function QS(t) {
  return {
    applyVisual: function(e, n, r) {
      var i = this.mapValueToVisual(e);
      r("color", t(n("color"), i));
    },
    _normalizedToVisual: hL([0, 1])
  };
}
function CU(t) {
  var e = this.option.visual;
  return e[Math.round(gn(t, [0, 1], [0, e.length - 1], !0))] || {};
}
function Z0(t) {
  return function(e, n, r) {
    r(t, this.mapValueToVisual(e));
  };
}
function xy(t) {
  var e = this.option.visual;
  return e[this.option.loop && t !== aT ? t % e.length : t];
}
function Bd() {
  return this.option.visual[0];
}
function hL(t) {
  return {
    linear: function(e) {
      return gn(e, t, this.option.visual, !0);
    },
    category: xy,
    piecewise: function(e, n) {
      var r = pL.call(this, n);
      return r == null && (r = gn(e, t, this.option.visual, !0)), r;
    },
    fixed: Bd
  };
}
function pL(t) {
  var e = this.option, n = e.pieceList;
  if (e.hasSpecialVisual) {
    var r = Kr.findPieceIndex(t, n), i = n[r];
    if (i && i.visual)
      return i.visual[this.type];
  }
}
function Zfe(t, e) {
  return t.visual = e, t.type === "color" && (t.parsedVisual = Ce(e, function(n) {
    var r = oa(n);
    return !r && process.env.NODE_ENV !== "production" && nr("'" + n + "' is an illegal color, fallback to '#000000'", !0), r || [0, 0, 0, 1];
  })), e;
}
var trt = {
  linear: function(t) {
    return gn(t, this.option.dataExtent, [0, 1], !0);
  },
  piecewise: function(t) {
    var e = this.option.pieceList, n = Kr.findPieceIndex(t, e, !0);
    if (n != null)
      return gn(n, [0, e.length - 1], [0, 1], !0);
  },
  category: function(t) {
    var e = this.option.categories ? this.option.categoryMap[t] : t;
    return e ?? aT;
  },
  fixed: fr
};
function HS(t, e, n) {
  return t ? e <= n : e < n;
}
var nrt = "itemStyle", Ufe = Ut();
const rrt = {
  seriesType: "treemap",
  reset: function(t) {
    var e = t.getData().tree, n = e.root;
    n.isRemoved() || Xfe(
      n,
      // Visual should calculate from tree root but not view root.
      {},
      t.getViewRoot().getAncestors(),
      t
    );
  }
};
function Xfe(t, e, n, r) {
  var i = t.getModel(), a = t.getLayout(), o = t.hostTree.data;
  if (!(!a || a.invisible || !a.isInView)) {
    var s = i.getModel(nrt), l = irt(s, e, r), u = o.ensureUniqueItemVisual(t.dataIndex, "style"), c = s.get("borderColor"), f = s.get("borderColorSaturation"), d;
    f != null && (d = TU(l), c = art(f, d)), u.stroke = c;
    var h = t.viewChildren;
    if (!h || !h.length)
      d = TU(l), u.fill = d;
    else {
      var p = ort(t, i, a, s, l, h);
      F(h, function(v, g) {
        if (v.depth >= n.length || v === n[v.depth]) {
          var m = srt(i, l, v, g, p, r);
          Xfe(v, m, n, r);
        }
      });
    }
  }
}
function irt(t, e, n) {
  var r = _e({}, e), i = n.designatedVisualItemStyle;
  return F(["color", "colorAlpha", "colorSaturation"], function(a) {
    i[a] = e[a];
    var o = t.get(a);
    i[a] = null, o != null && (r[a] = o);
  }), r;
}
function TU(t) {
  var e = rI(t, "color");
  if (e) {
    var n = rI(t, "colorAlpha"), r = rI(t, "colorSaturation");
    return r && (e = Yv(e, null, null, r)), n && (e = Gb(e, n)), e;
  }
}
function art(t, e) {
  return e != null ? Yv(e, null, null, t) : null;
}
function rI(t, e) {
  var n = t[e];
  if (n != null && n !== "none")
    return n;
}
function ort(t, e, n, r, i, a) {
  if (!(!a || !a.length)) {
    var o = iI(e, "color") || i.color != null && i.color !== "none" && (iI(e, "colorAlpha") || iI(e, "colorSaturation"));
    if (o) {
      var s = e.get("visualMin"), l = e.get("visualMax"), u = n.dataExtent.slice();
      s != null && s < u[0] && (u[0] = s), l != null && l > u[1] && (u[1] = l);
      var c = e.get("colorMappingBy"), f = {
        type: o.name,
        dataExtent: u,
        visual: o.range
      };
      f.type === "color" && (c === "index" || c === "id") ? (f.mappingMethod = "category", f.loop = !0) : f.mappingMethod = "linear";
      var d = new Kr(f);
      return Ufe(d).drColorMappingBy = c, d;
    }
  }
}
function iI(t, e) {
  var n = t.get(e);
  return Se(n) && n.length ? {
    name: e,
    range: n
  } : null;
}
function srt(t, e, n, r, i, a) {
  var o = _e({}, e);
  if (i) {
    var s = i.type, l = s === "color" && Ufe(i).drColorMappingBy, u = l === "index" ? r : l === "id" ? a.mapIdToIndex(n.getId()) : n.getValue(t.get("visualDimension"));
    o[s] = i.mapValueToVisual(u);
  }
  return o;
}
var u_ = Math.max, oT = Math.min, PU = br, Z3 = F, Yfe = ["itemStyle", "borderWidth"], lrt = ["itemStyle", "gapWidth"], urt = ["upperLabel", "show"], crt = ["upperLabel", "height"];
const frt = {
  seriesType: "treemap",
  reset: function(t, e, n, r) {
    var i = n.getWidth(), a = n.getHeight(), o = t.option, s = Mr(t.getBoxLayoutParams(), {
      width: n.getWidth(),
      height: n.getHeight()
    }), l = o.size || [], u = ze(PU(s.width, l[0]), i), c = ze(PU(s.height, l[1]), a), f = r && r.type, d = ["treemapZoomToNode", "treemapRootToNode"], h = s_(r, d, t), p = f === "treemapRender" || f === "treemapMove" ? r.rootRect : null, v = t.getViewRoot(), g = Hfe(v);
    if (f !== "treemapMove") {
      var m = f === "treemapZoomToNode" ? mrt(t, h, v, u, c) : p ? [p.width, p.height] : [u, c], y = o.sort;
      y && y !== "asc" && y !== "desc" && (y = "desc");
      var _ = {
        squareRatio: o.squareRatio,
        sort: y,
        leafDepth: o.leafDepth
      };
      v.hostTree.clearLayouts();
      var O = {
        x: 0,
        y: 0,
        width: m[0],
        height: m[1],
        area: m[0] * m[1]
      };
      v.setLayout(O), qfe(v, _, !1, 0), O = v.getLayout(), Z3(g, function(x, C) {
        var P = (g[C + 1] || v).getValue();
        x.setLayout(_e({
          dataExtent: [P, P],
          borderWidth: 0,
          upperHeight: 0
        }, O));
      });
    }
    var S = t.getData().tree.root;
    S.setLayout(yrt(s, p, h), !0), t.setLayoutInfo(s), Kfe(
      S,
      // Transform to base element coordinate system.
      new bt(-s.x, -s.y, i, a),
      g,
      v,
      0
    );
  }
};
function qfe(t, e, n, r) {
  var i, a;
  if (!t.isRemoved()) {
    var o = t.getLayout();
    i = o.width, a = o.height;
    var s = t.getModel(), l = s.get(Yfe), u = s.get(lrt) / 2, c = Jfe(s), f = Math.max(l, c), d = l - u, h = f - u;
    t.setLayout({
      borderWidth: l,
      upperHeight: f,
      upperLabelHeight: c
    }, !0), i = u_(i - 2 * d, 0), a = u_(a - d - h, 0);
    var p = i * a, v = drt(t, s, p, e, n, r);
    if (v.length) {
      var g = {
        x: d,
        y: h,
        width: i,
        height: a
      }, m = oT(i, a), y = 1 / 0, _ = [];
      _.area = 0;
      for (var O = 0, S = v.length; O < S; ) {
        var x = v[O];
        _.push(x), _.area += x.getLayout().area;
        var C = grt(_, m, e.squareRatio);
        C <= y ? (O++, y = C) : (_.area -= _.pop().getLayout().area, $U(_, m, g, u, !1), m = oT(g.width, g.height), _.length = _.area = 0, y = 1 / 0);
      }
      if (_.length && $U(_, m, g, u, !0), !n) {
        var P = s.get("childrenVisibleMin");
        P != null && p < P && (n = !0);
      }
      for (var O = 0, S = v.length; O < S; O++)
        qfe(v[O], e, n, r + 1);
    }
  }
}
function drt(t, e, n, r, i, a) {
  var o = t.children || [], s = r.sort;
  s !== "asc" && s !== "desc" && (s = null);
  var l = r.leafDepth != null && r.leafDepth <= a;
  if (i && !l)
    return t.viewChildren = [];
  o = yn(o, function(h) {
    return !h.isRemoved();
  }), prt(o, s);
  var u = vrt(e, o, s);
  if (u.sum === 0)
    return t.viewChildren = [];
  if (u.sum = hrt(e, n, u.sum, s, o), u.sum === 0)
    return t.viewChildren = [];
  for (var c = 0, f = o.length; c < f; c++) {
    var d = o[c].getValue() / u.sum * n;
    o[c].setLayout({
      area: d
    });
  }
  return l && (o.length && t.setLayout({
    isLeafRoot: !0
  }, !0), o.length = 0), t.viewChildren = o, t.setLayout({
    dataExtent: u.dataExtent
  }, !0), o;
}
function hrt(t, e, n, r, i) {
  if (!r)
    return n;
  for (var a = t.get("visibleMin"), o = i.length, s = o, l = o - 1; l >= 0; l--) {
    var u = i[r === "asc" ? o - l - 1 : l].getValue();
    u / n * e < a && (s = l, n -= u);
  }
  return r === "asc" ? i.splice(0, o - s) : i.splice(s, o - s), n;
}
function prt(t, e) {
  return e && t.sort(function(n, r) {
    var i = e === "asc" ? n.getValue() - r.getValue() : r.getValue() - n.getValue();
    return i === 0 ? e === "asc" ? n.dataIndex - r.dataIndex : r.dataIndex - n.dataIndex : i;
  }), t;
}
function vrt(t, e, n) {
  for (var r = 0, i = 0, a = e.length; i < a; i++)
    r += e[i].getValue();
  var o = t.get("visualDimension"), s;
  return !e || !e.length ? s = [NaN, NaN] : o === "value" && n ? (s = [e[e.length - 1].getValue(), e[0].getValue()], n === "asc" && s.reverse()) : (s = [1 / 0, -1 / 0], Z3(e, function(l) {
    var u = l.getValue(o);
    u < s[0] && (s[0] = u), u > s[1] && (s[1] = u);
  })), {
    sum: r,
    dataExtent: s
  };
}
function grt(t, e, n) {
  for (var r = 0, i = 1 / 0, a = 0, o = void 0, s = t.length; a < s; a++)
    o = t[a].getLayout().area, o && (o < i && (i = o), o > r && (r = o));
  var l = t.area * t.area, u = e * e * n;
  return l ? u_(u * r / l, l / (u * i)) : 1 / 0;
}
function $U(t, e, n, r, i) {
  var a = e === n.width ? 0 : 1, o = 1 - a, s = ["x", "y"], l = ["width", "height"], u = n[s[a]], c = e ? t.area / e : 0;
  (i || c > n[l[o]]) && (c = n[l[o]]);
  for (var f = 0, d = t.length; f < d; f++) {
    var h = t[f], p = {}, v = c ? h.getLayout().area / c : 0, g = p[l[o]] = u_(c - 2 * r, 0), m = n[s[a]] + n[l[a]] - u, y = f === d - 1 || m < v ? m : v, _ = p[l[a]] = u_(y - 2 * r, 0);
    p[s[o]] = n[s[o]] + oT(r, g / 2), p[s[a]] = u + oT(r, _ / 2), u += y, h.setLayout(p, !0);
  }
  n[s[o]] += c, n[l[o]] -= c;
}
function mrt(t, e, n, r, i) {
  var a = (e || {}).node, o = [r, i];
  if (!a || a === n)
    return o;
  for (var s, l = r * i, u = l * t.option.zoomToNodeRatio; s = a.parentNode; ) {
    for (var c = 0, f = s.children, d = 0, h = f.length; d < h; d++)
      c += f[d].getValue();
    var p = a.getValue();
    if (p === 0)
      return o;
    u *= c / p;
    var v = s.getModel(), g = v.get(Yfe), m = Math.max(g, Jfe(v));
    u += 4 * g * g + (3 * g + m) * Math.pow(u, 0.5), u > Ok && (u = Ok), a = s;
  }
  u < l && (u = l);
  var y = Math.pow(u / l, 0.5);
  return [r * y, i * y];
}
function yrt(t, e, n) {
  if (e)
    return {
      x: e.x,
      y: e.y
    };
  var r = {
    x: 0,
    y: 0
  };
  if (!n)
    return r;
  var i = n.node, a = i.getLayout();
  if (!a)
    return r;
  for (var o = [a.width / 2, a.height / 2], s = i; s; ) {
    var l = s.getLayout();
    o[0] += l.x, o[1] += l.y, s = s.parentNode;
  }
  return {
    x: t.width / 2 - o[0],
    y: t.height / 2 - o[1]
  };
}
function Kfe(t, e, n, r, i) {
  var a = t.getLayout(), o = n[i], s = o && o === t;
  if (!(o && !s || i === n.length && t !== r)) {
    t.setLayout({
      // isInView means: viewRoot sub tree + viewAbovePath
      isInView: !0,
      // invisible only means: outside view clip so that the node can not
      // see but still layout for animation preparation but not render.
      invisible: !s && !e.intersect(a),
      isAboveViewRoot: s
    }, !0);
    var l = new bt(e.x - a.x, e.y - a.y, e.width, e.height);
    Z3(t.viewChildren || [], function(u) {
      Kfe(u, l, n, r, i + 1);
    });
  }
}
function Jfe(t) {
  return t.get(urt) ? t.get(crt) : 0;
}
function brt(t) {
  t.registerSeriesModel(Bnt), t.registerChartView(Xnt), t.registerVisual(rrt), t.registerLayout(frt), Nnt(t);
}
function _rt(t) {
  var e = t.findComponents({
    mainType: "legend"
  });
  !e || !e.length || t.eachSeriesByType("graph", function(n) {
    var r = n.getCategoriesData(), i = n.getGraph(), a = i.data, o = r.mapArray(r.getName);
    a.filterSelf(function(s) {
      var l = a.getItemModel(s), u = l.getShallow("category");
      if (u != null) {
        Kt(u) && (u = o[u]);
        for (var c = 0; c < e.length; c++)
          if (!e[c].isSelected(u))
            return !1;
      }
      return !0;
    });
  });
}
function Ort(t) {
  var e = {};
  t.eachSeriesByType("graph", function(n) {
    var r = n.getCategoriesData(), i = n.getData(), a = {};
    r.each(function(o) {
      var s = r.getName(o);
      a["ec-" + s] = o;
      var l = r.getItemModel(o), u = l.getModel("itemStyle").getItemStyle();
      u.fill || (u.fill = n.getColorFromPalette(s, e)), r.setItemVisual(o, "style", u);
      for (var c = ["symbol", "symbolSize", "symbolKeepAspect"], f = 0; f < c.length; f++) {
        var d = l.getShallow(c[f], !0);
        d != null && r.setItemVisual(o, c[f], d);
      }
    }), r.count() && i.each(function(o) {
      var s = i.getItemModel(o), l = s.getShallow("category");
      if (l != null) {
        Ve(l) && (l = a["ec-" + l]);
        var u = r.getItemVisual(l, "style"), c = i.ensureUniqueItemVisual(o, "style");
        _e(c, u);
        for (var f = ["symbol", "symbolSize", "symbolKeepAspect"], d = 0; d < f.length; d++)
          i.setItemVisual(o, f[d], r.getItemVisual(l, f[d]));
      }
    });
  });
}
function GS(t) {
  return t instanceof Array || (t = [t, t]), t;
}
function Srt(t) {
  t.eachSeriesByType("graph", function(e) {
    var n = e.getGraph(), r = e.getEdgeData(), i = GS(e.get("edgeSymbol")), a = GS(e.get("edgeSymbolSize"));
    r.setVisual("fromSymbol", i && i[0]), r.setVisual("toSymbol", i && i[1]), r.setVisual("fromSymbolSize", a && a[0]), r.setVisual("toSymbolSize", a && a[1]), r.setVisual("style", e.getModel("lineStyle").getLineStyle()), r.each(function(o) {
      var s = r.getItemModel(o), l = n.getEdgeByIndex(o), u = GS(s.getShallow("symbol", !0)), c = GS(s.getShallow("symbolSize", !0)), f = s.getModel("lineStyle").getLineStyle(), d = r.ensureUniqueItemVisual(o, "style");
      switch (_e(d, f), d.stroke) {
        case "source": {
          var h = l.node1.getVisual("style");
          d.stroke = h && h.fill;
          break;
        }
        case "target": {
          var h = l.node2.getVisual("style");
          d.stroke = h && h.fill;
          break;
        }
      }
      u[0] && l.setVisual("fromSymbol", u[0]), u[1] && l.setVisual("toSymbol", u[1]), c[0] && l.setVisual("fromSymbolSize", c[0]), c[1] && l.setVisual("toSymbolSize", c[1]);
    });
  });
}
var vL = "-->", jP = function(t) {
  return t.get("autoCurveness") || null;
}, ede = function(t, e) {
  var n = jP(t), r = 20, i = [];
  if (Kt(n))
    r = n;
  else if (Se(n)) {
    t.__curvenessList = n;
    return;
  }
  e > r && (r = e);
  var a = r % 2 ? r + 2 : r + 3;
  i = [];
  for (var o = 0; o < a; o++)
    i.push((o % 2 ? o + 1 : o) / 10 * (o % 2 ? -1 : 1));
  t.__curvenessList = i;
}, c_ = function(t, e, n) {
  var r = [t.id, t.dataIndex].join("."), i = [e.id, e.dataIndex].join(".");
  return [n.uid, r, i].join(vL);
}, tde = function(t) {
  var e = t.split(vL);
  return [e[0], e[2], e[1]].join(vL);
}, xrt = function(t, e) {
  var n = c_(t.node1, t.node2, e);
  return e.__edgeMap[n];
}, wrt = function(t, e) {
  var n = gL(c_(t.node1, t.node2, e), e), r = gL(c_(t.node2, t.node1, e), e);
  return n + r;
}, gL = function(t, e) {
  var n = e.__edgeMap;
  return n[t] ? n[t].length : 0;
};
function Crt(t) {
  jP(t) && (t.__curvenessList = [], t.__edgeMap = {}, ede(t));
}
function Trt(t, e, n, r) {
  if (jP(n)) {
    var i = c_(t, e, n), a = n.__edgeMap, o = a[tde(i)];
    a[i] && !o ? a[i].isForward = !0 : o && a[i] && (o.isForward = !0, a[i].isForward = !1), a[i] = a[i] || [], a[i].push(r);
  }
}
function U3(t, e, n, r) {
  var i = jP(e), a = Se(i);
  if (!i)
    return null;
  var o = xrt(t, e);
  if (!o)
    return null;
  for (var s = -1, l = 0; l < o.length; l++)
    if (o[l] === n) {
      s = l;
      break;
    }
  var u = wrt(t, e);
  ede(e, u), t.lineStyle = t.lineStyle || {};
  var c = c_(t.node1, t.node2, e), f = e.__curvenessList, d = a || u % 2 ? 0 : 1;
  if (o.isForward)
    return f[d + s];
  var h = tde(c), p = gL(h, e), v = f[s + p + d];
  return r ? a ? i && i[0] === 0 ? (p + d) % 2 ? v : -v : ((p % 2 ? 0 : 1) + d) % 2 ? v : -v : (p + d) % 2 ? v : -v : f[s + p + d];
}
function nde(t) {
  var e = t.coordinateSystem;
  if (!(e && e.type !== "view")) {
    var n = t.getGraph();
    n.eachNode(function(r) {
      var i = r.getModel();
      r.setLayout([+i.get("x"), +i.get("y")]);
    }), X3(n, t);
  }
}
function X3(t, e) {
  t.eachEdge(function(n, r) {
    var i = co(n.getModel().get(["lineStyle", "curveness"]), -U3(n, e, r, !0), 0), a = kl(n.node1.getLayout()), o = kl(n.node2.getLayout()), s = [a, o];
    +i && s.push([(a[0] + o[0]) / 2 - (a[1] - o[1]) * i, (a[1] + o[1]) / 2 - (o[0] - a[0]) * i]), n.setLayout(s);
  });
}
function Prt(t, e) {
  t.eachSeriesByType("graph", function(n) {
    var r = n.get("layout"), i = n.coordinateSystem;
    if (i && i.type !== "view") {
      var a = n.getData(), o = [];
      F(i.dimensions, function(d) {
        o = o.concat(a.mapDimensionsAll(d));
      });
      for (var s = 0; s < a.count(); s++) {
        for (var l = [], u = !1, c = 0; c < o.length; c++) {
          var f = a.get(o[c], s);
          isNaN(f) || (u = !0), l.push(f);
        }
        u ? a.setItemLayout(s, i.dataToPoint(l)) : a.setItemLayout(s, [NaN, NaN]);
      }
      X3(a.graph, n);
    } else (!r || r === "none") && nde(n);
  });
}
function wy(t) {
  var e = t.coordinateSystem;
  if (e.type !== "view")
    return 1;
  var n = t.option.nodeScaleRatio, r = e.scaleX, i = e.getZoom(), a = (i - 1) * n + 1;
  return a / r;
}
function Cy(t) {
  var e = t.getVisual("symbolSize");
  return e instanceof Array && (e = (e[0] + e[1]) / 2), +e;
}
var AU = Math.PI, aI = [];
function Y3(t, e, n, r) {
  var i = t.coordinateSystem;
  if (!(i && i.type !== "view")) {
    var a = i.getBoundingRect(), o = t.getData(), s = o.graph, l = a.width / 2 + a.x, u = a.height / 2 + a.y, c = Math.min(a.width, a.height) / 2, f = o.count();
    if (o.setLayout({
      cx: l,
      cy: u
    }), !!f) {
      if (n) {
        var d = i.pointToData(r), h = d[0], p = d[1], v = [h - l, p - u];
        fp(v, v), Xy(v, v, c), n.setLayout([l + v[0], u + v[1]], !0);
        var g = t.get(["circular", "rotateLabel"]);
        rde(n, g, l, u);
      }
      $rt[e](t, s, o, c, l, u, f), s.eachEdge(function(m, y) {
        var _ = co(m.getModel().get(["lineStyle", "curveness"]), U3(m, t, y), 0), O = kl(m.node1.getLayout()), S = kl(m.node2.getLayout()), x, C = (O[0] + S[0]) / 2, P = (O[1] + S[1]) / 2;
        +_ && (_ *= 3, x = [l * _ + C * (1 - _), u * _ + P * (1 - _)]), m.setLayout([O, S, x]);
      });
    }
  }
}
var $rt = {
  value: function(t, e, n, r, i, a, o) {
    var s = 0, l = n.getSum("value"), u = Math.PI * 2 / (l || o);
    e.eachNode(function(c) {
      var f = c.getValue("value"), d = u * (l ? f : 1) / 2;
      s += d, c.setLayout([r * Math.cos(s) + i, r * Math.sin(s) + a]), s += d;
    });
  },
  symbolSize: function(t, e, n, r, i, a, o) {
    var s = 0;
    aI.length = o;
    var l = wy(t);
    e.eachNode(function(f) {
      var d = Cy(f);
      isNaN(d) && (d = 2), d < 0 && (d = 0), d *= l;
      var h = Math.asin(d / 2 / r);
      isNaN(h) && (h = AU / 2), aI[f.dataIndex] = h, s += h * 2;
    });
    var u = (2 * AU - s) / o / 2, c = 0;
    e.eachNode(function(f) {
      var d = u + aI[f.dataIndex];
      c += d, (!f.getLayout() || !f.getLayout().fixed) && f.setLayout([r * Math.cos(c) + i, r * Math.sin(c) + a]), c += d;
    });
  }
};
function rde(t, e, n, r) {
  var i = t.getGraphicEl();
  if (i) {
    var a = t.getModel(), o = a.get(["label", "rotate"]) || 0, s = i.getSymbolPath();
    if (e) {
      var l = t.getLayout(), u = Math.atan2(l[1] - r, l[0] - n);
      u < 0 && (u = Math.PI * 2 + u);
      var c = l[0] < n;
      c && (u = u - Math.PI);
      var f = c ? "left" : "right";
      s.setTextConfig({
        rotation: -u,
        position: f,
        origin: "center"
      });
      var d = s.ensureState("emphasis");
      _e(d.textConfig || (d.textConfig = {}), {
        position: f
      });
    } else
      s.setTextConfig({
        rotation: o *= Math.PI / 180
      });
  }
}
function Art(t) {
  t.eachSeriesByType("graph", function(e) {
    e.get("layout") === "circular" && Y3(e, "symbolSize");
  });
}
var ov = _C;
function Ert(t, e, n) {
  for (var r = t, i = e, a = n.rect, o = a.width, s = a.height, l = [a.x + o / 2, a.y + s / 2], u = n.gravity == null ? 0.1 : n.gravity, c = 0; c < r.length; c++) {
    var f = r[c];
    f.p || (f.p = kf(o * (Math.random() - 0.5) + l[0], s * (Math.random() - 0.5) + l[1])), f.pp = kl(f.p), f.edges = null;
  }
  var d = n.friction == null ? 0.6 : n.friction, h = d, p, v;
  return {
    warmUp: function() {
      h = d * 0.8;
    },
    setFixed: function(g) {
      r[g].fixed = !0;
    },
    setUnfixed: function(g) {
      r[g].fixed = !1;
    },
    /**
     * Before step hook
     */
    beforeStep: function(g) {
      p = g;
    },
    /**
     * After step hook
     */
    afterStep: function(g) {
      v = g;
    },
    /**
     * Some formulas were originally copied from "d3.js"
     * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js
     * with some modifications made for this project.
     * See the license statement at the head of this file.
     */
    step: function(g) {
      p && p(r, i);
      for (var m = [], y = r.length, _ = 0; _ < i.length; _++) {
        var O = i[_];
        if (!O.ignoreForceLayout) {
          var S = O.n1, x = O.n2;
          Wc(m, x.p, S.p);
          var C = Wb(m) - O.d, P = x.w / (S.w + x.w);
          isNaN(P) && (P = 0), fp(m, m), !S.fixed && ov(S.p, S.p, m, P * C * h), !x.fixed && ov(x.p, x.p, m, -(1 - P) * C * h);
        }
      }
      for (var _ = 0; _ < y; _++) {
        var $ = r[_];
        $.fixed || (Wc(m, l, $.p), ov($.p, $.p, m, u * h));
      }
      for (var _ = 0; _ < y; _++)
        for (var S = r[_], T = _ + 1; T < y; T++) {
          var x = r[T];
          Wc(m, x.p, S.p);
          var C = Wb(m);
          C === 0 && (Joe(m, Math.random() - 0.5, Math.random() - 0.5), C = 1);
          var E = (S.rep + x.rep) / C / C;
          !S.fixed && ov(S.pp, S.pp, m, E), !x.fixed && ov(x.pp, x.pp, m, -E);
        }
      for (var M = [], _ = 0; _ < y; _++) {
        var $ = r[_];
        $.fixed || (Wc(M, $.p, $.pp), ov($.p, $.p, M, h), ki($.pp, $.p));
      }
      h = h * 0.992;
      var R = h < 0.01;
      v && v(r, i, R), g && g(R);
    }
  };
}
function Mrt(t) {
  t.eachSeriesByType("graph", function(e) {
    var n = e.coordinateSystem;
    if (!(n && n.type !== "view"))
      if (e.get("layout") === "force") {
        var r = e.preservedPoints || {}, i = e.getGraph(), a = i.data, o = i.edgeData, s = e.getModel("force"), l = s.get("initLayout");
        e.preservedPoints ? a.each(function(_) {
          var O = a.getId(_);
          a.setItemLayout(_, r[O] || [NaN, NaN]);
        }) : !l || l === "none" ? nde(e) : l === "circular" && Y3(e, "value");
        var u = a.getDataExtent("value"), c = o.getDataExtent("value"), f = s.get("repulsion"), d = s.get("edgeLength"), h = Se(f) ? f : [f, f], p = Se(d) ? d : [d, d];
        p = [p[1], p[0]];
        var v = a.mapArray("value", function(_, O) {
          var S = a.getItemLayout(O), x = gn(_, u, h);
          return isNaN(x) && (x = (h[0] + h[1]) / 2), {
            w: x,
            rep: x,
            fixed: a.getItemModel(O).get("fixed"),
            p: !S || isNaN(S[0]) || isNaN(S[1]) ? null : S
          };
        }), g = o.mapArray("value", function(_, O) {
          var S = i.getEdgeByIndex(O), x = gn(_, c, p);
          isNaN(x) && (x = (p[0] + p[1]) / 2);
          var C = S.getModel(), P = co(S.getModel().get(["lineStyle", "curveness"]), -U3(S, e, O, !0), 0);
          return {
            n1: v[S.node1.dataIndex],
            n2: v[S.node2.dataIndex],
            d: x,
            curveness: P,
            ignoreForceLayout: C.get("ignoreForceLayout")
          };
        }), m = n.getBoundingRect(), y = Ert(v, g, {
          rect: m,
          gravity: s.get("gravity"),
          friction: s.get("friction")
        });
        y.beforeStep(function(_, O) {
          for (var S = 0, x = _.length; S < x; S++)
            _[S].fixed && ki(_[S].p, i.getNodeByIndex(S).getLayout());
        }), y.afterStep(function(_, O, S) {
          for (var x = 0, C = _.length; x < C; x++)
            _[x].fixed || i.getNodeByIndex(x).setLayout(_[x].p), r[a.getId(x)] = _[x].p;
          for (var x = 0, C = O.length; x < C; x++) {
            var P = O[x], $ = i.getEdgeByIndex(x), T = P.n1.p, E = P.n2.p, M = $.getLayout();
            M = M ? M.slice() : [], M[0] = M[0] || [], M[1] = M[1] || [], ki(M[0], T), ki(M[1], E), +P.curveness && (M[2] = [(T[0] + E[0]) / 2 - (T[1] - E[1]) * P.curveness, (T[1] + E[1]) / 2 - (E[0] - T[0]) * P.curveness]), $.setLayout(M);
          }
        }), e.forceLayout = y, e.preservedPoints = r, y.step();
      } else
        e.forceLayout = null;
  });
}
function Irt(t, e, n) {
  var r = _e(t.getBoxLayoutParams(), {
    aspect: n
  });
  return Mr(r, {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function Drt(t, e) {
  var n = [];
  return t.eachSeriesByType("graph", function(r) {
    var i = r.get("coordinateSystem");
    if (!i || i === "view") {
      var a = r.getData(), o = a.mapArray(function(g) {
        var m = a.getItemModel(g);
        return [+m.get("x"), +m.get("y")];
      }), s = [], l = [];
      yP(o, s, l), l[0] - s[0] === 0 && (l[0] += 1, s[0] -= 1), l[1] - s[1] === 0 && (l[1] += 1, s[1] -= 1);
      var u = (l[0] - s[0]) / (l[1] - s[1]), c = Irt(r, e, u);
      isNaN(u) && (s = [c.x, c.y], l = [c.x + c.width, c.y + c.height]);
      var f = l[0] - s[0], d = l[1] - s[1], h = c.width, p = c.height, v = r.coordinateSystem = new w1();
      v.zoomLimit = r.get("scaleLimit"), v.setBoundingRect(s[0], s[1], f, d), v.setViewRect(c.x, c.y, h, p), v.setCenter(r.get("center"), e), v.setZoom(r.get("zoom")), n.push(v);
    }
  }), n;
}
var EU = Xr.prototype, oI = f1.prototype, ide = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
      this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
    }
    return t;
  }()
);
(function(t) {
  le(e, t);
  function e() {
    return t !== null && t.apply(this, arguments) || this;
  }
  return e;
})(ide);
function sI(t) {
  return isNaN(+t.cpx1) || isNaN(+t.cpy1);
}
var Rrt = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "ec-line", r;
    }
    return e.prototype.getDefaultStyle = function() {
      return {
        stroke: "#000",
        fill: null
      };
    }, e.prototype.getDefaultShape = function() {
      return new ide();
    }, e.prototype.buildPath = function(n, r) {
      sI(r) ? EU.buildPath.call(this, n, r) : oI.buildPath.call(this, n, r);
    }, e.prototype.pointAt = function(n) {
      return sI(this.shape) ? EU.pointAt.call(this, n) : oI.pointAt.call(this, n);
    }, e.prototype.tangentAt = function(n) {
      var r = this.shape, i = sI(r) ? [r.x2 - r.x1, r.y2 - r.y1] : oI.tangentAt.call(this, n);
      return fp(i, i);
    }, e;
  }(Dt)
), lI = ["fromSymbol", "toSymbol"];
function MU(t) {
  return "_" + t + "Type";
}
function IU(t, e, n) {
  var r = e.getItemVisual(n, t);
  if (!r || r === "none")
    return r;
  var i = e.getItemVisual(n, t + "Size"), a = e.getItemVisual(n, t + "Rotate"), o = e.getItemVisual(n, t + "Offset"), s = e.getItemVisual(n, t + "KeepAspect"), l = Em(i), u = mp(o || 0, l);
  return r + l + u + (a || "") + (s || "");
}
function DU(t, e, n) {
  var r = e.getItemVisual(n, t);
  if (!(!r || r === "none")) {
    var i = e.getItemVisual(n, t + "Size"), a = e.getItemVisual(n, t + "Rotate"), o = e.getItemVisual(n, t + "Offset"), s = e.getItemVisual(n, t + "KeepAspect"), l = Em(i), u = mp(o || 0, l), c = Sr(r, -l[0] / 2 + u[0], -l[1] / 2 + u[1], l[0], l[1], null, s);
    return c.__specifiedRotation = a == null || isNaN(a) ? void 0 : +a * Math.PI / 180 || 0, c.name = t, c;
  }
}
function krt(t) {
  var e = new Rrt({
    name: "line",
    subPixelOptimize: !0
  });
  return mL(e.shape, t), e;
}
function mL(t, e) {
  t.x1 = e[0][0], t.y1 = e[0][1], t.x2 = e[1][0], t.y2 = e[1][1], t.percent = 1;
  var n = e[2];
  n ? (t.cpx1 = n[0], t.cpy1 = n[1]) : (t.cpx1 = NaN, t.cpy1 = NaN);
}
var q3 = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i) {
      var a = t.call(this) || this;
      return a._createLine(n, r, i), a;
    }
    return e.prototype._createLine = function(n, r, i) {
      var a = n.hostModel, o = n.getItemLayout(r), s = krt(o);
      s.shape.percent = 0, Vn(s, {
        shape: {
          percent: 1
        }
      }, a, r), this.add(s), F(lI, function(l) {
        var u = DU(l, n, r);
        this.add(u), this[MU(l)] = IU(l, n, r);
      }, this), this._updateCommonStl(n, r, i);
    }, e.prototype.updateData = function(n, r, i) {
      var a = n.hostModel, o = this.childOfName("line"), s = n.getItemLayout(r), l = {
        shape: {}
      };
      mL(l.shape, s), tn(o, l, a, r), F(lI, function(u) {
        var c = IU(u, n, r), f = MU(u);
        if (this[f] !== c) {
          this.remove(this.childOfName(u));
          var d = DU(u, n, r);
          this.add(d);
        }
        this[f] = c;
      }, this), this._updateCommonStl(n, r, i);
    }, e.prototype.getLinePath = function() {
      return this.childAt(0);
    }, e.prototype._updateCommonStl = function(n, r, i) {
      var a = n.hostModel, o = this.childOfName("line"), s = i && i.emphasisLineStyle, l = i && i.blurLineStyle, u = i && i.selectLineStyle, c = i && i.labelStatesModels, f = i && i.emphasisDisabled, d = i && i.focus, h = i && i.blurScope;
      if (!i || n.hasItemOption) {
        var p = n.getItemModel(r), v = p.getModel("emphasis");
        s = v.getModel("lineStyle").getLineStyle(), l = p.getModel(["blur", "lineStyle"]).getLineStyle(), u = p.getModel(["select", "lineStyle"]).getLineStyle(), f = v.get("disabled"), d = v.get("focus"), h = v.get("blurScope"), c = ei(p);
      }
      var g = n.getItemVisual(r, "style"), m = g.stroke;
      o.useStyle(g), o.style.fill = null, o.style.strokeNoScale = !0, o.ensureState("emphasis").style = s, o.ensureState("blur").style = l, o.ensureState("select").style = u, F(lI, function(x) {
        var C = this.childOfName(x);
        if (C) {
          C.setColor(m), C.style.opacity = g.opacity;
          for (var P = 0; P < da.length; P++) {
            var $ = da[P], T = o.getState($);
            if (T) {
              var E = T.style || {}, M = C.ensureState($), R = M.style || (M.style = {});
              E.stroke != null && (R[C.__isEmptyBrush ? "stroke" : "fill"] = E.stroke), E.opacity != null && (R.opacity = E.opacity);
            }
          }
          C.markRedraw();
        }
      }, this);
      var y = a.getRawValue(r);
      Ei(this, c, {
        labelDataIndex: r,
        labelFetcher: {
          getFormattedLabel: function(x, C) {
            return a.getFormattedLabel(x, C, n.dataType);
          }
        },
        inheritColor: m || "#000",
        defaultOpacity: g.opacity,
        defaultText: (y == null ? n.getName(r) : isFinite(y) ? sr(y) : y) + ""
      });
      var _ = this.getTextContent();
      if (_) {
        var O = c.normal;
        _.__align = _.style.align, _.__verticalAlign = _.style.verticalAlign, _.__position = O.get("position") || "middle";
        var S = O.get("distance");
        Se(S) || (S = [S, S]), _.__labelDistance = S;
      }
      this.setTextConfig({
        position: null,
        local: !0,
        inside: !1
        // Can't be inside for stroke element.
      }), ur(this, d, h, f);
    }, e.prototype.highlight = function() {
      Fu(this);
    }, e.prototype.downplay = function() {
      Wu(this);
    }, e.prototype.updateLayout = function(n, r) {
      this.setLinePoints(n.getItemLayout(r));
    }, e.prototype.setLinePoints = function(n) {
      var r = this.childOfName("line");
      mL(r.shape, n), r.dirty();
    }, e.prototype.beforeUpdate = function() {
      var n = this, r = n.childOfName("fromSymbol"), i = n.childOfName("toSymbol"), a = n.getTextContent();
      if (!r && !i && (!a || a.ignore))
        return;
      for (var o = 1, s = this.parent; s; )
        s.scaleX && (o /= s.scaleX), s = s.parent;
      var l = n.childOfName("line");
      if (!this.__dirty && !l.__dirty)
        return;
      var u = l.shape.percent, c = l.pointAt(0), f = l.pointAt(u), d = Wc([], f, c);
      fp(d, d);
      function h(T, E) {
        var M = T.__specifiedRotation;
        if (M == null) {
          var R = l.tangentAt(E);
          T.attr("rotation", (E === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(R[1], R[0]));
        } else
          T.attr("rotation", M);
      }
      if (r && (r.setPosition(c), h(r, 0), r.scaleX = r.scaleY = o * u, r.markRedraw()), i && (i.setPosition(f), h(i, 1), i.scaleX = i.scaleY = o * u, i.markRedraw()), a && !a.ignore) {
        a.x = a.y = 0, a.originX = a.originY = 0;
        var p = void 0, v = void 0, g = a.__labelDistance, m = g[0] * o, y = g[1] * o, _ = u / 2, O = l.tangentAt(_), S = [O[1], -O[0]], x = l.pointAt(_);
        S[1] > 0 && (S[0] = -S[0], S[1] = -S[1]);
        var C = O[0] < 0 ? -1 : 1;
        if (a.__position !== "start" && a.__position !== "end") {
          var P = -Math.atan2(O[1], O[0]);
          f[0] < c[0] && (P = Math.PI + P), a.rotation = P;
        }
        var $ = void 0;
        switch (a.__position) {
          case "insideStartTop":
          case "insideMiddleTop":
          case "insideEndTop":
          case "middle":
            $ = -y, v = "bottom";
            break;
          case "insideStartBottom":
          case "insideMiddleBottom":
          case "insideEndBottom":
            $ = y, v = "top";
            break;
          default:
            $ = 0, v = "middle";
        }
        switch (a.__position) {
          case "end":
            a.x = d[0] * m + f[0], a.y = d[1] * y + f[1], p = d[0] > 0.8 ? "left" : d[0] < -0.8 ? "right" : "center", v = d[1] > 0.8 ? "top" : d[1] < -0.8 ? "bottom" : "middle";
            break;
          case "start":
            a.x = -d[0] * m + c[0], a.y = -d[1] * y + c[1], p = d[0] > 0.8 ? "right" : d[0] < -0.8 ? "left" : "center", v = d[1] > 0.8 ? "bottom" : d[1] < -0.8 ? "top" : "middle";
            break;
          case "insideStartTop":
          case "insideStart":
          case "insideStartBottom":
            a.x = m * C + c[0], a.y = c[1] + $, p = O[0] < 0 ? "right" : "left", a.originX = -m * C, a.originY = -$;
            break;
          case "insideMiddleTop":
          case "insideMiddle":
          case "insideMiddleBottom":
          case "middle":
            a.x = x[0], a.y = x[1] + $, p = "center", a.originY = -$;
            break;
          case "insideEndTop":
          case "insideEnd":
          case "insideEndBottom":
            a.x = -m * C + f[0], a.y = f[1] + $, p = O[0] >= 0 ? "right" : "left", a.originX = m * C, a.originY = -$;
            break;
        }
        a.scaleX = a.scaleY = o, a.setStyle({
          // Use the user specified text align and baseline first
          verticalAlign: a.__verticalAlign || v,
          align: a.__align || p
        });
      }
    }, e;
  }(ct)
), K3 = (
  /** @class */
  function() {
    function t(e) {
      this.group = new ct(), this._LineCtor = e || q3;
    }
    return t.prototype.updateData = function(e) {
      var n = this;
      this._progressiveEls = null;
      var r = this, i = r.group, a = r._lineData;
      r._lineData = e, a || i.removeAll();
      var o = RU(e);
      e.diff(a).add(function(s) {
        n._doAdd(e, s, o);
      }).update(function(s, l) {
        n._doUpdate(a, e, l, s, o);
      }).remove(function(s) {
        i.remove(a.getItemGraphicEl(s));
      }).execute();
    }, t.prototype.updateLayout = function() {
      var e = this._lineData;
      e && e.eachItemGraphicEl(function(n, r) {
        n.updateLayout(e, r);
      }, this);
    }, t.prototype.incrementalPrepareUpdate = function(e) {
      this._seriesScope = RU(e), this._lineData = null, this.group.removeAll();
    }, t.prototype.incrementalUpdate = function(e, n) {
      this._progressiveEls = [];
      function r(s) {
        !s.isGroup && !Lrt(s) && (s.incremental = !0, s.ensureState("emphasis").hoverLayer = !0);
      }
      for (var i = e.start; i < e.end; i++) {
        var a = n.getItemLayout(i);
        if (uI(a)) {
          var o = new this._LineCtor(n, i, this._seriesScope);
          o.traverse(r), this.group.add(o), n.setItemGraphicEl(i, o), this._progressiveEls.push(o);
        }
      }
    }, t.prototype.remove = function() {
      this.group.removeAll();
    }, t.prototype.eachRendered = function(e) {
      Nf(this._progressiveEls || this.group, e);
    }, t.prototype._doAdd = function(e, n, r) {
      var i = e.getItemLayout(n);
      if (uI(i)) {
        var a = new this._LineCtor(e, n, r);
        e.setItemGraphicEl(n, a), this.group.add(a);
      }
    }, t.prototype._doUpdate = function(e, n, r, i, a) {
      var o = e.getItemGraphicEl(r);
      if (!uI(n.getItemLayout(i))) {
        this.group.remove(o);
        return;
      }
      o ? o.updateData(n, i, a) : o = new this._LineCtor(n, i, a), n.setItemGraphicEl(i, o), this.group.add(o);
    }, t;
  }()
);
function Lrt(t) {
  return t.animators && t.animators.length > 0;
}
function RU(t) {
  var e = t.hostModel, n = e.getModel("emphasis");
  return {
    lineStyle: e.getModel("lineStyle").getLineStyle(),
    emphasisLineStyle: n.getModel(["lineStyle"]).getLineStyle(),
    blurLineStyle: e.getModel(["blur", "lineStyle"]).getLineStyle(),
    selectLineStyle: e.getModel(["select", "lineStyle"]).getLineStyle(),
    emphasisDisabled: n.get("disabled"),
    blurScope: n.get("blurScope"),
    focus: n.get("focus"),
    labelStatesModels: ei(e)
  };
}
function kU(t) {
  return isNaN(t[0]) || isNaN(t[1]);
}
function uI(t) {
  return t && !kU(t[0]) && !kU(t[1]);
}
var cI = [], fI = [], dI = [], sv = ii, hI = nf, LU = Math.abs;
function NU(t, e, n) {
  for (var r = t[0], i = t[1], a = t[2], o = 1 / 0, s, l = n * n, u = 0.1, c = 0.1; c <= 0.9; c += 0.1) {
    cI[0] = sv(r[0], i[0], a[0], c), cI[1] = sv(r[1], i[1], a[1], c);
    var f = LU(hI(cI, e) - l);
    f < o && (o = f, s = c);
  }
  for (var d = 0; d < 32; d++) {
    var h = s + u;
    fI[0] = sv(r[0], i[0], a[0], s), fI[1] = sv(r[1], i[1], a[1], s), dI[0] = sv(r[0], i[0], a[0], h), dI[1] = sv(r[1], i[1], a[1], h);
    var f = hI(fI, e) - l;
    if (LU(f) < 0.01)
      break;
    var p = hI(dI, e) - l;
    u /= 2, f < 0 ? p >= 0 ? s = s + u : s = s - u : p >= 0 ? s = s - u : s = s + u;
  }
  return s;
}
function pI(t, e) {
  var n = [], r = Qb, i = [[], [], []], a = [[], []], o = [];
  e /= 2, t.eachEdge(function(s, l) {
    var u = s.getLayout(), c = s.getVisual("fromSymbol"), f = s.getVisual("toSymbol");
    u.__original || (u.__original = [kl(u[0]), kl(u[1])], u[2] && u.__original.push(kl(u[2])));
    var d = u.__original;
    if (u[2] != null) {
      if (ki(i[0], d[0]), ki(i[1], d[2]), ki(i[2], d[1]), c && c !== "none") {
        var h = Cy(s.node1), p = NU(i, d[0], h * e);
        r(i[0][0], i[1][0], i[2][0], p, n), i[0][0] = n[3], i[1][0] = n[4], r(i[0][1], i[1][1], i[2][1], p, n), i[0][1] = n[3], i[1][1] = n[4];
      }
      if (f && f !== "none") {
        var h = Cy(s.node2), p = NU(i, d[1], h * e);
        r(i[0][0], i[1][0], i[2][0], p, n), i[1][0] = n[1], i[2][0] = n[2], r(i[0][1], i[1][1], i[2][1], p, n), i[1][1] = n[1], i[2][1] = n[2];
      }
      ki(u[0], i[0]), ki(u[1], i[2]), ki(u[2], i[1]);
    } else {
      if (ki(a[0], d[0]), ki(a[1], d[1]), Wc(o, a[1], a[0]), fp(o, o), c && c !== "none") {
        var h = Cy(s.node1);
        _C(a[0], a[0], o, h * e);
      }
      if (f && f !== "none") {
        var h = Cy(s.node2);
        _C(a[1], a[1], o, -h * e);
      }
      ki(u[0], a[0]), ki(u[1], a[1]);
    }
  });
}
function BU(t) {
  return t.type === "view";
}
var Nrt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n, r) {
      var i = new y1(), a = new K3(), o = this.group;
      this._controller = new x1(r.getZr()), this._controllerHost = {
        target: o
      }, o.add(i.group), o.add(a.group), this._symbolDraw = i, this._lineDraw = a, this._firstRender = !0;
    }, e.prototype.render = function(n, r, i) {
      var a = this, o = n.coordinateSystem;
      this._model = n;
      var s = this._symbolDraw, l = this._lineDraw, u = this.group;
      if (BU(o)) {
        var c = {
          x: o.x,
          y: o.y,
          scaleX: o.scaleX,
          scaleY: o.scaleY
        };
        this._firstRender ? u.attr(c) : tn(u, c, n);
      }
      pI(n.getGraph(), wy(n));
      var f = n.getData();
      s.updateData(f);
      var d = n.getEdgeData();
      l.updateData(d), this._updateNodeAndLinkScale(), this._updateController(n, r, i), clearTimeout(this._layoutTimeout);
      var h = n.forceLayout, p = n.get(["force", "layoutAnimation"]);
      h && this._startForceLayoutIteration(h, p);
      var v = n.get("layout");
      f.graph.eachNode(function(_) {
        var O = _.dataIndex, S = _.getGraphicEl(), x = _.getModel();
        if (S) {
          S.off("drag").off("dragend");
          var C = x.get("draggable");
          C && S.on("drag", function($) {
            switch (v) {
              case "force":
                h.warmUp(), !a._layouting && a._startForceLayoutIteration(h, p), h.setFixed(O), f.setItemLayout(O, [S.x, S.y]);
                break;
              case "circular":
                f.setItemLayout(O, [S.x, S.y]), _.setLayout({
                  fixed: !0
                }, !0), Y3(n, "symbolSize", _, [$.offsetX, $.offsetY]), a.updateLayout(n);
                break;
              case "none":
              default:
                f.setItemLayout(O, [S.x, S.y]), X3(n.getGraph(), n), a.updateLayout(n);
                break;
            }
          }).on("dragend", function() {
            h && h.setUnfixed(O);
          }), S.setDraggable(C, !!x.get("cursor"));
          var P = x.get(["emphasis", "focus"]);
          P === "adjacency" && (ft(S).focus = _.getAdjacentDataIndices());
        }
      }), f.graph.eachEdge(function(_) {
        var O = _.getGraphicEl(), S = _.getModel().get(["emphasis", "focus"]);
        O && S === "adjacency" && (ft(O).focus = {
          edge: [_.dataIndex],
          node: [_.node1.dataIndex, _.node2.dataIndex]
        });
      });
      var g = n.get("layout") === "circular" && n.get(["circular", "rotateLabel"]), m = f.getLayout("cx"), y = f.getLayout("cy");
      f.graph.eachNode(function(_) {
        rde(_, g, m, y);
      }), this._firstRender = !1;
    }, e.prototype.dispose = function() {
      this.remove(), this._controller && this._controller.dispose(), this._controllerHost = null;
    }, e.prototype._startForceLayoutIteration = function(n, r) {
      var i = this;
      (function a() {
        n.step(function(o) {
          i.updateLayout(i._model), (i._layouting = !o) && (r ? i._layoutTimeout = setTimeout(a, 16) : a());
        });
      })();
    }, e.prototype._updateController = function(n, r, i) {
      var a = this, o = this._controller, s = this._controllerHost, l = this.group;
      if (o.setPointerChecker(function(u, c, f) {
        var d = l.getBoundingRect();
        return d.applyTransform(l.transform), d.contain(c, f) && !QP(u, i, n);
      }), !BU(n.coordinateSystem)) {
        o.disable();
        return;
      }
      o.enable(n.get("roam")), s.zoomLimit = n.get("scaleLimit"), s.zoom = n.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
        V3(s, u.dx, u.dy), i.dispatchAction({
          seriesId: n.id,
          type: "graphRoam",
          dx: u.dx,
          dy: u.dy
        });
      }).on("zoom", function(u) {
        F3(s, u.scale, u.originX, u.originY), i.dispatchAction({
          seriesId: n.id,
          type: "graphRoam",
          zoom: u.scale,
          originX: u.originX,
          originY: u.originY
        }), a._updateNodeAndLinkScale(), pI(n.getGraph(), wy(n)), a._lineDraw.updateLayout(), i.updateLabelLayout();
      });
    }, e.prototype._updateNodeAndLinkScale = function() {
      var n = this._model, r = n.getData(), i = wy(n);
      r.eachItemGraphicEl(function(a, o) {
        a && a.setSymbolScale(i);
      });
    }, e.prototype.updateLayout = function(n) {
      pI(n.getGraph(), wy(n)), this._symbolDraw.updateLayout(), this._lineDraw.updateLayout();
    }, e.prototype.remove = function() {
      clearTimeout(this._layoutTimeout), this._layouting = !1, this._layoutTimeout = null, this._symbolDraw && this._symbolDraw.remove(), this._lineDraw && this._lineDraw.remove();
    }, e.type = "graph", e;
  }(_n)
);
function lv(t) {
  return "_EC_" + t;
}
var Brt = (
  /** @class */
  function() {
    function t(e) {
      this.type = "graph", this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this._directed = e || !1;
    }
    return t.prototype.isDirected = function() {
      return this._directed;
    }, t.prototype.addNode = function(e, n) {
      e = e == null ? "" + n : "" + e;
      var r = this._nodesMap;
      if (r[lv(e)]) {
        process.env.NODE_ENV !== "production" && console.error("Graph nodes have duplicate name or id");
        return;
      }
      var i = new zd(e, n);
      return i.hostGraph = this, this.nodes.push(i), r[lv(e)] = i, i;
    }, t.prototype.getNodeByIndex = function(e) {
      var n = this.data.getRawIndex(e);
      return this.nodes[n];
    }, t.prototype.getNodeById = function(e) {
      return this._nodesMap[lv(e)];
    }, t.prototype.addEdge = function(e, n, r) {
      var i = this._nodesMap, a = this._edgesMap;
      if (Kt(e) && (e = this.nodes[e]), Kt(n) && (n = this.nodes[n]), e instanceof zd || (e = i[lv(e)]), n instanceof zd || (n = i[lv(n)]), !(!e || !n)) {
        var o = e.id + "-" + n.id, s = new ade(e, n, r);
        return s.hostGraph = this, this._directed && (e.outEdges.push(s), n.inEdges.push(s)), e.edges.push(s), e !== n && n.edges.push(s), this.edges.push(s), a[o] = s, s;
      }
    }, t.prototype.getEdgeByIndex = function(e) {
      var n = this.edgeData.getRawIndex(e);
      return this.edges[n];
    }, t.prototype.getEdge = function(e, n) {
      e instanceof zd && (e = e.id), n instanceof zd && (n = n.id);
      var r = this._edgesMap;
      return this._directed ? r[e + "-" + n] : r[e + "-" + n] || r[n + "-" + e];
    }, t.prototype.eachNode = function(e, n) {
      for (var r = this.nodes, i = r.length, a = 0; a < i; a++)
        r[a].dataIndex >= 0 && e.call(n, r[a], a);
    }, t.prototype.eachEdge = function(e, n) {
      for (var r = this.edges, i = r.length, a = 0; a < i; a++)
        r[a].dataIndex >= 0 && r[a].node1.dataIndex >= 0 && r[a].node2.dataIndex >= 0 && e.call(n, r[a], a);
    }, t.prototype.breadthFirstTraverse = function(e, n, r, i) {
      if (n instanceof zd || (n = this._nodesMap[lv(n)]), !!n) {
        for (var a = r === "out" ? "outEdges" : r === "in" ? "inEdges" : "edges", o = 0; o < this.nodes.length; o++)
          this.nodes[o].__visited = !1;
        if (!e.call(i, n, null))
          for (var s = [n]; s.length; )
            for (var l = s.shift(), u = l[a], o = 0; o < u.length; o++) {
              var c = u[o], f = c.node1 === l ? c.node2 : c.node1;
              if (!f.__visited) {
                if (e.call(i, f, l))
                  return;
                s.push(f), f.__visited = !0;
              }
            }
      }
    }, t.prototype.update = function() {
      for (var e = this.data, n = this.edgeData, r = this.nodes, i = this.edges, a = 0, o = r.length; a < o; a++)
        r[a].dataIndex = -1;
      for (var a = 0, o = e.count(); a < o; a++)
        r[e.getRawIndex(a)].dataIndex = a;
      n.filterSelf(function(s) {
        var l = i[n.getRawIndex(s)];
        return l.node1.dataIndex >= 0 && l.node2.dataIndex >= 0;
      });
      for (var a = 0, o = i.length; a < o; a++)
        i[a].dataIndex = -1;
      for (var a = 0, o = n.count(); a < o; a++)
        i[n.getRawIndex(a)].dataIndex = a;
    }, t.prototype.clone = function() {
      for (var e = new t(this._directed), n = this.nodes, r = this.edges, i = 0; i < n.length; i++)
        e.addNode(n[i].id, n[i].dataIndex);
      for (var i = 0; i < r.length; i++) {
        var a = r[i];
        e.addEdge(a.node1.id, a.node2.id, a.dataIndex);
      }
      return e;
    }, t;
  }()
), zd = (
  /** @class */
  function() {
    function t(e, n) {
      this.inEdges = [], this.outEdges = [], this.edges = [], this.dataIndex = -1, this.id = e ?? "", this.dataIndex = n ?? -1;
    }
    return t.prototype.degree = function() {
      return this.edges.length;
    }, t.prototype.inDegree = function() {
      return this.inEdges.length;
    }, t.prototype.outDegree = function() {
      return this.outEdges.length;
    }, t.prototype.getModel = function(e) {
      if (!(this.dataIndex < 0)) {
        var n = this.hostGraph, r = n.data.getItemModel(this.dataIndex);
        return r.getModel(e);
      }
    }, t.prototype.getAdjacentDataIndices = function() {
      for (var e = {
        edge: [],
        node: []
      }, n = 0; n < this.edges.length; n++) {
        var r = this.edges[n];
        r.dataIndex < 0 || (e.edge.push(r.dataIndex), e.node.push(r.node1.dataIndex, r.node2.dataIndex));
      }
      return e;
    }, t.prototype.getTrajectoryDataIndices = function() {
      for (var e = Ze(), n = Ze(), r = 0; r < this.edges.length; r++) {
        var i = this.edges[r];
        if (!(i.dataIndex < 0)) {
          e.set(i.dataIndex, !0);
          for (var a = [i.node1], o = [i.node2], s = 0; s < a.length; ) {
            var l = a[s];
            s++, n.set(l.dataIndex, !0);
            for (var u = 0; u < l.inEdges.length; u++)
              e.set(l.inEdges[u].dataIndex, !0), a.push(l.inEdges[u].node1);
          }
          for (s = 0; s < o.length; ) {
            var c = o[s];
            s++, n.set(c.dataIndex, !0);
            for (var u = 0; u < c.outEdges.length; u++)
              e.set(c.outEdges[u].dataIndex, !0), o.push(c.outEdges[u].node2);
          }
        }
      }
      return {
        edge: e.keys(),
        node: n.keys()
      };
    }, t;
  }()
), ade = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.dataIndex = -1, this.node1 = e, this.node2 = n, this.dataIndex = r ?? -1;
    }
    return t.prototype.getModel = function(e) {
      if (!(this.dataIndex < 0)) {
        var n = this.hostGraph, r = n.edgeData.getItemModel(this.dataIndex);
        return r.getModel(e);
      }
    }, t.prototype.getAdjacentDataIndices = function() {
      return {
        edge: [this.dataIndex],
        node: [this.node1.dataIndex, this.node2.dataIndex]
      };
    }, t.prototype.getTrajectoryDataIndices = function() {
      var e = Ze(), n = Ze();
      e.set(this.dataIndex, !0);
      for (var r = [this.node1], i = [this.node2], a = 0; a < r.length; ) {
        var o = r[a];
        a++, n.set(o.dataIndex, !0);
        for (var s = 0; s < o.inEdges.length; s++)
          e.set(o.inEdges[s].dataIndex, !0), r.push(o.inEdges[s].node1);
      }
      for (a = 0; a < i.length; ) {
        var l = i[a];
        a++, n.set(l.dataIndex, !0);
        for (var s = 0; s < l.outEdges.length; s++)
          e.set(l.outEdges[s].dataIndex, !0), i.push(l.outEdges[s].node2);
      }
      return {
        edge: e.keys(),
        node: n.keys()
      };
    }, t;
  }()
);
function ode(t, e) {
  return {
    /**
     * @param Default 'value'. can be 'a', 'b', 'c', 'd', 'e'.
     */
    getValue: function(n) {
      var r = this[t][e];
      return r.getStore().get(r.getDimensionIndex(n || "value"), this.dataIndex);
    },
    // TODO: TYPE stricter type.
    setVisual: function(n, r) {
      this.dataIndex >= 0 && this[t][e].setItemVisual(this.dataIndex, n, r);
    },
    getVisual: function(n) {
      return this[t][e].getItemVisual(this.dataIndex, n);
    },
    setLayout: function(n, r) {
      this.dataIndex >= 0 && this[t][e].setItemLayout(this.dataIndex, n, r);
    },
    getLayout: function() {
      return this[t][e].getItemLayout(this.dataIndex);
    },
    getGraphicEl: function() {
      return this[t][e].getItemGraphicEl(this.dataIndex);
    },
    getRawIndex: function() {
      return this[t][e].getRawIndex(this.dataIndex);
    }
  };
}
vr(zd, ode("hostGraph", "data"));
vr(ade, ode("hostGraph", "edgeData"));
function sde(t, e, n, r, i) {
  for (var a = new Brt(r), o = 0; o < t.length; o++)
    a.addNode(br(
      // Id, name, dataIndex
      t[o].id,
      t[o].name,
      o
    ), o);
  for (var s = [], l = [], u = 0, o = 0; o < e.length; o++) {
    var c = e[o], f = c.source, d = c.target;
    a.addEdge(f, d, u) && (l.push(c), s.push(br(Br(c.id, null), f + " > " + d)), u++);
  }
  var h = n.get("coordinateSystem"), p;
  if (h === "cartesian2d" || h === "polar")
    p = Yl(t, n);
  else {
    var v = gp.get(h), g = v ? v.dimensions || [] : [];
    St(g, "value") < 0 && g.concat(["value"]);
    var m = Mm(t, {
      coordDimensions: g,
      encodeDefine: n.getEncode()
    }).dimensions;
    p = new Fi(m, n), p.initData(t);
  }
  var y = new Fi(["value"], n);
  return y.initData(l, s), i && i(p, y), Wfe({
    mainData: p,
    struct: a,
    structAttr: "graph",
    datas: {
      node: p,
      edge: y
    },
    datasAttr: {
      node: "data",
      edge: "edgeData"
    }
  }), a.update(), a;
}
var zrt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.hasSymbolVisual = !0, n;
    }
    return e.prototype.init = function(n) {
      t.prototype.init.apply(this, arguments);
      var r = this;
      function i() {
        return r._categoriesData;
      }
      this.legendVisualProvider = new S1(i, i), this.fillDataTextStyle(n.edges || n.links), this._updateCategoriesData();
    }, e.prototype.mergeOption = function(n) {
      t.prototype.mergeOption.apply(this, arguments), this.fillDataTextStyle(n.edges || n.links), this._updateCategoriesData();
    }, e.prototype.mergeDefaultAndTheme = function(n) {
      t.prototype.mergeDefaultAndTheme.apply(this, arguments), Hh(n, "edgeLabel", ["show"]);
    }, e.prototype.getInitialData = function(n, r) {
      var i = n.edges || n.links || [], a = n.data || n.nodes || [], o = this;
      if (a && i) {
        Crt(this);
        var s = sde(a, i, this, !0, l);
        return F(s.edges, function(u) {
          Trt(u.node1, u.node2, this, u.dataIndex);
        }, this), s.data;
      }
      function l(u, c) {
        u.wrapMethod("getItemModel", function(p) {
          var v = o._categoriesModels, g = p.getShallow("category"), m = v[g];
          return m && (m.parentModel = p.parentModel, p.parentModel = m), p;
        });
        var f = xn.prototype.getModel;
        function d(p, v) {
          var g = f.call(this, p, v);
          return g.resolveParentPath = h, g;
        }
        c.wrapMethod("getItemModel", function(p) {
          return p.resolveParentPath = h, p.getModel = d, p;
        });
        function h(p) {
          if (p && (p[0] === "label" || p[1] === "label")) {
            var v = p.slice();
            return p[0] === "label" ? v[0] = "edgeLabel" : p[1] === "label" && (v[1] = "edgeLabel"), v;
          }
          return p;
        }
      }
    }, e.prototype.getGraph = function() {
      return this.getData().graph;
    }, e.prototype.getEdgeData = function() {
      return this.getGraph().edgeData;
    }, e.prototype.getCategoriesData = function() {
      return this._categoriesData;
    }, e.prototype.formatTooltip = function(n, r, i) {
      if (i === "edge") {
        var a = this.getData(), o = this.getDataParams(n, i), s = a.graph.getEdgeByIndex(n), l = a.getName(s.node1.dataIndex), u = a.getName(s.node2.dataIndex), c = [];
        return l != null && c.push(l), u != null && c.push(u), ti("nameValue", {
          name: c.join(" > "),
          value: o.value,
          noValue: o.value == null
        });
      }
      var f = $ue({
        series: this,
        dataIndex: n,
        multipleSeries: r
      });
      return f;
    }, e.prototype._updateCategoriesData = function() {
      var n = Ce(this.option.categories || [], function(i) {
        return i.value != null ? i : _e({
          value: 0
        }, i);
      }), r = new Fi(["value"], this);
      r.initData(n), this._categoriesData = r, this._categoriesModels = r.mapArray(function(i) {
        return r.getItemModel(i);
      });
    }, e.prototype.setZoom = function(n) {
      this.option.zoom = n;
    }, e.prototype.setCenter = function(n) {
      this.option.center = n;
    }, e.prototype.isAnimationEnabled = function() {
      return t.prototype.isAnimationEnabled.call(this) && !(this.get("layout") === "force" && this.get(["force", "layoutAnimation"]));
    }, e.type = "series.graph", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
      // zlevel: 0,
      z: 2,
      coordinateSystem: "view",
      // Default option for all coordinate systems
      // xAxisIndex: 0,
      // yAxisIndex: 0,
      // polarIndex: 0,
      // geoIndex: 0,
      legendHoverLink: !0,
      layout: null,
      // Configuration of circular layout
      circular: {
        rotateLabel: !1
      },
      // Configuration of force directed layout
      force: {
        initLayout: null,
        // Node repulsion. Can be an array to represent range.
        repulsion: [0, 50],
        gravity: 0.1,
        // Initial friction
        friction: 0.6,
        // Edge length. Can be an array to represent range.
        edgeLength: 30,
        layoutAnimation: !0
      },
      left: "center",
      top: "center",
      // right: null,
      // bottom: null,
      // width: '80%',
      // height: '80%',
      symbol: "circle",
      symbolSize: 10,
      edgeSymbol: ["none", "none"],
      edgeSymbolSize: 10,
      edgeLabel: {
        position: "middle",
        distance: 5
      },
      draggable: !1,
      roam: !1,
      // Default on center of graph
      center: null,
      zoom: 1,
      // Symbol size scale ratio in roam
      nodeScaleRatio: 0.6,
      // cursor: null,
      // categories: [],
      // data: []
      // Or
      // nodes: []
      //
      // links: []
      // Or
      // edges: []
      label: {
        show: !1,
        formatter: "{b}"
      },
      itemStyle: {},
      lineStyle: {
        color: "#aaa",
        width: 1,
        opacity: 0.5
      },
      emphasis: {
        scale: !0,
        label: {
          show: !0
        }
      },
      select: {
        itemStyle: {
          borderColor: "#212121"
        }
      }
    }, e;
  }(Cn)
), Vrt = {
  type: "graphRoam",
  event: "graphRoam",
  update: "none"
};
function Frt(t) {
  t.registerChartView(Nrt), t.registerSeriesModel(zrt), t.registerProcessor(_rt), t.registerVisual(Ort), t.registerVisual(Srt), t.registerLayout(Prt), t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT, Art), t.registerLayout(Mrt), t.registerCoordinateSystem("graphView", {
    dimensions: w1.dimensions,
    create: Drt
  }), t.registerAction({
    type: "focusNodeAdjacency",
    event: "focusNodeAdjacency",
    update: "series:focusNodeAdjacency"
  }, fr), t.registerAction({
    type: "unfocusNodeAdjacency",
    event: "unfocusNodeAdjacency",
    update: "series:unfocusNodeAdjacency"
  }, fr), t.registerAction(Vrt, function(e, n, r) {
    n.eachComponent({
      mainType: "series",
      query: e
    }, function(i) {
      var a = i.coordinateSystem, o = Q3(a, e, void 0, r);
      i.setCenter && i.setCenter(o.center), i.setZoom && i.setZoom(o.zoom);
    });
  });
}
var Wrt = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
      this.angle = 0, this.width = 10, this.r = 10, this.x = 0, this.y = 0;
    }
    return t;
  }()
), Qrt = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "pointer", r;
    }
    return e.prototype.getDefaultShape = function() {
      return new Wrt();
    }, e.prototype.buildPath = function(n, r) {
      var i = Math.cos, a = Math.sin, o = r.r, s = r.width, l = r.angle, u = r.x - i(l) * s * (s >= o / 3 ? 1 : 2), c = r.y - a(l) * s * (s >= o / 3 ? 1 : 2);
      l = r.angle - Math.PI / 2, n.moveTo(u, c), n.lineTo(r.x + i(l) * s, r.y + a(l) * s), n.lineTo(r.x + i(r.angle) * o, r.y + a(r.angle) * o), n.lineTo(r.x - i(l) * s, r.y - a(l) * s), n.lineTo(u, c);
    }, e;
  }(Dt)
);
function Hrt(t, e) {
  var n = t.get("center"), r = e.getWidth(), i = e.getHeight(), a = Math.min(r, i), o = ze(n[0], e.getWidth()), s = ze(n[1], e.getHeight()), l = ze(t.get("radius"), a / 2);
  return {
    cx: o,
    cy: s,
    r: l
  };
}
function jS(t, e) {
  var n = t == null ? "" : t + "";
  return e && (Ve(e) ? n = e.replace("{value}", n) : qe(e) && (n = e(t))), n;
}
var Grt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      this.group.removeAll();
      var a = n.get(["axisLine", "lineStyle", "color"]), o = Hrt(n, i);
      this._renderMain(n, r, i, a, o), this._data = n.getData();
    }, e.prototype.dispose = function() {
    }, e.prototype._renderMain = function(n, r, i, a, o) {
      var s = this.group, l = n.get("clockwise"), u = -n.get("startAngle") / 180 * Math.PI, c = -n.get("endAngle") / 180 * Math.PI, f = n.getModel("axisLine"), d = f.get("roundCap"), h = d ? tT : ha, p = f.get("show"), v = f.getModel("lineStyle"), g = v.get("width"), m = [u, c];
      D5(m, !l), u = m[0], c = m[1];
      for (var y = c - u, _ = u, O = [], S = 0; p && S < a.length; S++) {
        var x = Math.min(Math.max(a[S][0], 0), 1);
        c = u + y * x;
        var C = new h({
          shape: {
            startAngle: _,
            endAngle: c,
            cx: o.cx,
            cy: o.cy,
            clockwise: l,
            r0: o.r - g,
            r: o.r
          },
          silent: !0
        });
        C.setStyle({
          fill: a[S][1]
        }), C.setStyle(v.getLineStyle(
          // Because we use sector to simulate arc
          // so the properties for stroking are useless
          ["color", "width"]
        )), O.push(C), _ = c;
      }
      O.reverse(), F(O, function($) {
        return s.add($);
      });
      var P = function($) {
        if ($ <= 0)
          return a[0][1];
        var T;
        for (T = 0; T < a.length; T++)
          if (a[T][0] >= $ && (T === 0 ? 0 : a[T - 1][0]) < $)
            return a[T][1];
        return a[T - 1][1];
      };
      this._renderTicks(n, r, i, P, o, u, c, l, g), this._renderTitleAndDetail(n, r, i, P, o), this._renderAnchor(n, o), this._renderPointer(n, r, i, P, o, u, c, l, g);
    }, e.prototype._renderTicks = function(n, r, i, a, o, s, l, u, c) {
      for (var f = this.group, d = o.cx, h = o.cy, p = o.r, v = +n.get("min"), g = +n.get("max"), m = n.getModel("splitLine"), y = n.getModel("axisTick"), _ = n.getModel("axisLabel"), O = n.get("splitNumber"), S = y.get("splitNumber"), x = ze(m.get("length"), p), C = ze(y.get("length"), p), P = s, $ = (l - s) / O, T = $ / S, E = m.getModel("lineStyle").getLineStyle(), M = y.getModel("lineStyle").getLineStyle(), R = m.get("distance"), N, I, B = 0; B <= O; B++) {
        if (N = Math.cos(P), I = Math.sin(P), m.get("show")) {
          var Q = R ? R + c : c, W = new Xr({
            shape: {
              x1: N * (p - Q) + d,
              y1: I * (p - Q) + h,
              x2: N * (p - x - Q) + d,
              y2: I * (p - x - Q) + h
            },
            style: E,
            silent: !0
          });
          E.stroke === "auto" && W.setStyle({
            stroke: a(B / O)
          }), f.add(W);
        }
        if (_.get("show")) {
          var Q = _.get("distance") + R, H = jS(sr(B / O * (g - v) + v), _.get("formatter")), U = a(B / O), j = N * (p - x - Q) + d, Y = I * (p - x - Q) + h, ne = _.get("rotate"), fe = 0;
          ne === "radial" ? (fe = -P + 2 * Math.PI, fe > Math.PI / 2 && (fe += Math.PI)) : ne === "tangential" ? fe = -P - Math.PI / 2 : Kt(ne) && (fe = ne * Math.PI / 180), fe === 0 ? f.add(new jt({
            style: Mn(_, {
              text: H,
              x: j,
              y: Y,
              verticalAlign: I < -0.8 ? "top" : I > 0.8 ? "bottom" : "middle",
              align: N < -0.4 ? "left" : N > 0.4 ? "right" : "center"
            }, {
              inheritColor: U
            }),
            silent: !0
          })) : f.add(new jt({
            style: Mn(_, {
              text: H,
              x: j,
              y: Y,
              verticalAlign: "middle",
              align: "center"
            }, {
              inheritColor: U
            }),
            silent: !0,
            originX: j,
            originY: Y,
            rotation: fe
          }));
        }
        if (y.get("show") && B !== O) {
          var Q = y.get("distance");
          Q = Q ? Q + c : c;
          for (var ue = 0; ue <= S; ue++) {
            N = Math.cos(P), I = Math.sin(P);
            var ye = new Xr({
              shape: {
                x1: N * (p - Q) + d,
                y1: I * (p - Q) + h,
                x2: N * (p - C - Q) + d,
                y2: I * (p - C - Q) + h
              },
              silent: !0,
              style: M
            });
            M.stroke === "auto" && ye.setStyle({
              stroke: a((B + ue / S) / O)
            }), f.add(ye), P += T;
          }
          P -= T;
        } else
          P += $;
      }
    }, e.prototype._renderPointer = function(n, r, i, a, o, s, l, u, c) {
      var f = this.group, d = this._data, h = this._progressEls, p = [], v = n.get(["pointer", "show"]), g = n.getModel("progress"), m = g.get("show"), y = n.getData(), _ = y.mapDimension("value"), O = +n.get("min"), S = +n.get("max"), x = [O, S], C = [s, l];
      function P(T, E) {
        var M = y.getItemModel(T), R = M.getModel("pointer"), N = ze(R.get("width"), o.r), I = ze(R.get("length"), o.r), B = n.get(["pointer", "icon"]), Q = R.get("offsetCenter"), W = ze(Q[0], o.r), H = ze(Q[1], o.r), U = R.get("keepAspect"), j;
        return B ? j = Sr(B, W - N / 2, H - I, N, I, null, U) : j = new Qrt({
          shape: {
            angle: -Math.PI / 2,
            width: N,
            r: I,
            x: W,
            y: H
          }
        }), j.rotation = -(E + Math.PI / 2), j.x = o.cx, j.y = o.cy, j;
      }
      function $(T, E) {
        var M = g.get("roundCap"), R = M ? tT : ha, N = g.get("overlap"), I = N ? g.get("width") : c / y.count(), B = N ? o.r - I : o.r - (T + 1) * I, Q = N ? o.r : o.r - T * I, W = new R({
          shape: {
            startAngle: s,
            endAngle: E,
            cx: o.cx,
            cy: o.cy,
            clockwise: u,
            r0: B,
            r: Q
          }
        });
        return N && (W.z2 = S - y.get(_, T) % S), W;
      }
      (m || v) && (y.diff(d).add(function(T) {
        var E = y.get(_, T);
        if (v) {
          var M = P(T, s);
          Vn(M, {
            rotation: -((isNaN(+E) ? C[0] : gn(E, x, C, !0)) + Math.PI / 2)
          }, n), f.add(M), y.setItemGraphicEl(T, M);
        }
        if (m) {
          var R = $(T, s), N = g.get("clip");
          Vn(R, {
            shape: {
              endAngle: gn(E, x, C, N)
            }
          }, n), f.add(R), Pk(n.seriesIndex, y.dataType, T, R), p[T] = R;
        }
      }).update(function(T, E) {
        var M = y.get(_, T);
        if (v) {
          var R = d.getItemGraphicEl(E), N = R ? R.rotation : s, I = P(T, N);
          I.rotation = N, tn(I, {
            rotation: -((isNaN(+M) ? C[0] : gn(M, x, C, !0)) + Math.PI / 2)
          }, n), f.add(I), y.setItemGraphicEl(T, I);
        }
        if (m) {
          var B = h[E], Q = B ? B.shape.endAngle : s, W = $(T, Q), H = g.get("clip");
          tn(W, {
            shape: {
              endAngle: gn(M, x, C, H)
            }
          }, n), f.add(W), Pk(n.seriesIndex, y.dataType, T, W), p[T] = W;
        }
      }).execute(), y.each(function(T) {
        var E = y.getItemModel(T), M = E.getModel("emphasis"), R = M.get("focus"), N = M.get("blurScope"), I = M.get("disabled");
        if (v) {
          var B = y.getItemGraphicEl(T), Q = y.getItemVisual(T, "style"), W = Q.fill;
          if (B instanceof ci) {
            var H = B.style;
            B.useStyle(_e({
              image: H.image,
              x: H.x,
              y: H.y,
              width: H.width,
              height: H.height
            }, Q));
          } else
            B.useStyle(Q), B.type !== "pointer" && B.setColor(W);
          B.setStyle(E.getModel(["pointer", "itemStyle"]).getItemStyle()), B.style.fill === "auto" && B.setStyle("fill", a(gn(y.get(_, T), x, [0, 1], !0))), B.z2EmphasisLift = 0, Ai(B, E), ur(B, R, N, I);
        }
        if (m) {
          var U = p[T];
          U.useStyle(y.getItemVisual(T, "style")), U.setStyle(E.getModel(["progress", "itemStyle"]).getItemStyle()), U.z2EmphasisLift = 0, Ai(U, E), ur(U, R, N, I);
        }
      }), this._progressEls = p);
    }, e.prototype._renderAnchor = function(n, r) {
      var i = n.getModel("anchor"), a = i.get("show");
      if (a) {
        var o = i.get("size"), s = i.get("icon"), l = i.get("offsetCenter"), u = i.get("keepAspect"), c = Sr(s, r.cx - o / 2 + ze(l[0], r.r), r.cy - o / 2 + ze(l[1], r.r), o, o, null, u);
        c.z2 = i.get("showAbove") ? 1 : 0, c.setStyle(i.getModel("itemStyle").getItemStyle()), this.group.add(c);
      }
    }, e.prototype._renderTitleAndDetail = function(n, r, i, a, o) {
      var s = this, l = n.getData(), u = l.mapDimension("value"), c = +n.get("min"), f = +n.get("max"), d = new ct(), h = [], p = [], v = n.isAnimationEnabled(), g = n.get(["pointer", "showAbove"]);
      l.diff(this._data).add(function(m) {
        h[m] = new jt({
          silent: !0
        }), p[m] = new jt({
          silent: !0
        });
      }).update(function(m, y) {
        h[m] = s._titleEls[y], p[m] = s._detailEls[y];
      }).execute(), l.each(function(m) {
        var y = l.getItemModel(m), _ = l.get(u, m), O = new ct(), S = a(gn(_, [c, f], [0, 1], !0)), x = y.getModel("title");
        if (x.get("show")) {
          var C = x.get("offsetCenter"), P = o.cx + ze(C[0], o.r), $ = o.cy + ze(C[1], o.r), T = h[m];
          T.attr({
            z2: g ? 0 : 2,
            style: Mn(x, {
              x: P,
              y: $,
              text: l.getName(m),
              align: "center",
              verticalAlign: "middle"
            }, {
              inheritColor: S
            })
          }), O.add(T);
        }
        var E = y.getModel("detail");
        if (E.get("show")) {
          var M = E.get("offsetCenter"), R = o.cx + ze(M[0], o.r), N = o.cy + ze(M[1], o.r), I = ze(E.get("width"), o.r), B = ze(E.get("height"), o.r), Q = n.get(["progress", "show"]) ? l.getItemVisual(m, "style").fill : S, T = p[m], W = E.get("formatter");
          T.attr({
            z2: g ? 0 : 2,
            style: Mn(E, {
              x: R,
              y: N,
              text: jS(_, W),
              width: isNaN(I) ? null : I,
              height: isNaN(B) ? null : B,
              align: "center",
              verticalAlign: "middle"
            }, {
              inheritColor: Q
            })
          }), Lle(T, {
            normal: E
          }, _, function(U) {
            return jS(U, W);
          }), v && Nle(T, m, l, n, {
            getFormattedLabel: function(U, j, Y, ne, fe, ue) {
              return jS(ue ? ue.interpolatedValue : _, W);
            }
          }), O.add(T);
        }
        d.add(O);
      }), this.group.add(d), this._titleEls = h, this._detailEls = p;
    }, e.type = "gauge", e;
  }(_n)
), jrt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.visualStyleAccessPath = "itemStyle", n;
    }
    return e.prototype.getInitialData = function(n, r) {
      return Rm(this, ["value"]);
    }, e.type = "series.gauge", e.defaultOption = {
      // zlevel: 0,
      z: 2,
      colorBy: "data",
      // 默认全局居中
      center: ["50%", "50%"],
      legendHoverLink: !0,
      radius: "75%",
      startAngle: 225,
      endAngle: -45,
      clockwise: !0,
      // 最小值
      min: 0,
      // 最大值
      max: 100,
      // 分割段数，默认为10
      splitNumber: 10,
      // 坐标轴线
      axisLine: {
        // 默认显示，属性show控制显示与否
        show: !0,
        roundCap: !1,
        lineStyle: {
          color: [[1, "#E6EBF8"]],
          width: 10
        }
      },
      // 坐标轴线
      progress: {
        // 默认显示，属性show控制显示与否
        show: !1,
        overlap: !0,
        width: 10,
        roundCap: !1,
        clip: !0
      },
      // 分隔线
      splitLine: {
        // 默认显示，属性show控制显示与否
        show: !0,
        // 属性length控制线长
        length: 10,
        distance: 10,
        // 属性lineStyle（详见lineStyle）控制线条样式
        lineStyle: {
          color: "#63677A",
          width: 3,
          type: "solid"
        }
      },
      // 坐标轴小标记
      axisTick: {
        // 属性show控制显示与否，默认不显示
        show: !0,
        // 每份split细分多少段
        splitNumber: 5,
        // 属性length控制线长
        length: 6,
        distance: 10,
        // 属性lineStyle控制线条样式
        lineStyle: {
          color: "#63677A",
          width: 1,
          type: "solid"
        }
      },
      axisLabel: {
        show: !0,
        distance: 15,
        // formatter: null,
        color: "#464646",
        fontSize: 12,
        rotate: 0
      },
      pointer: {
        icon: null,
        offsetCenter: [0, 0],
        show: !0,
        showAbove: !0,
        length: "60%",
        width: 6,
        keepAspect: !1
      },
      anchor: {
        show: !1,
        showAbove: !1,
        size: 6,
        icon: "circle",
        offsetCenter: [0, 0],
        keepAspect: !1,
        itemStyle: {
          color: "#fff",
          borderWidth: 0,
          borderColor: "#5470c6"
        }
      },
      title: {
        show: !0,
        // x, y，单位px
        offsetCenter: [0, "20%"],
        // 其余属性默认使用全局文本样式，详见TEXTSTYLE
        color: "#464646",
        fontSize: 16,
        valueAnimation: !1
      },
      detail: {
        show: !0,
        backgroundColor: "rgba(0,0,0,0)",
        borderWidth: 0,
        borderColor: "#ccc",
        width: 100,
        height: null,
        padding: [5, 10],
        // x, y，单位px
        offsetCenter: [0, "40%"],
        // formatter: null,
        // 其余属性默认使用全局文本样式，详见TEXTSTYLE
        color: "#464646",
        fontSize: 30,
        fontWeight: "bold",
        lineHeight: 30,
        valueAnimation: !1
      }
    }, e;
  }(Cn)
);
function Zrt(t) {
  t.registerChartView(Grt), t.registerSeriesModel(jrt);
}
var Urt = ["itemStyle", "opacity"], Xrt = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r) {
      var i = t.call(this) || this, a = i, o = new va(), s = new jt();
      return a.setTextContent(s), i.setTextGuideLine(o), i.updateData(n, r, !0), i;
    }
    return e.prototype.updateData = function(n, r, i) {
      var a = this, o = n.hostModel, s = n.getItemModel(r), l = n.getItemLayout(r), u = s.getModel("emphasis"), c = s.get(Urt);
      c = c ?? 1, i || Zs(a), a.useStyle(n.getItemVisual(r, "style")), a.style.lineJoin = "round", i ? (a.setShape({
        points: l.points
      }), a.style.opacity = 0, Vn(a, {
        style: {
          opacity: c
        }
      }, o, r)) : tn(a, {
        style: {
          opacity: c
        },
        shape: {
          points: l.points
        }
      }, o, r), Ai(a, s), this._updateLabel(n, r), ur(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
    }, e.prototype._updateLabel = function(n, r) {
      var i = this, a = this.getTextGuideLine(), o = i.getTextContent(), s = n.hostModel, l = n.getItemModel(r), u = n.getItemLayout(r), c = u.label, f = n.getItemVisual(r, "style"), d = f.fill;
      Ei(
        // position will not be used in setLabelStyle
        o,
        ei(l),
        {
          labelFetcher: n.hostModel,
          labelDataIndex: r,
          defaultOpacity: f.opacity,
          defaultText: n.getName(r)
        },
        {
          normal: {
            align: c.textAlign,
            verticalAlign: c.verticalAlign
          }
        }
      ), i.setTextConfig({
        local: !0,
        inside: !!c.inside,
        insideStroke: d,
        // insideFill: 'auto',
        outsideFill: d
      });
      var h = c.linePoints;
      a.setShape({
        points: h
      }), i.textGuideLineConfig = {
        anchor: h ? new yt(h[0][0], h[0][1]) : null
      }, tn(o, {
        style: {
          x: c.x,
          y: c.y
        }
      }, s, r), o.attr({
        rotation: c.rotation,
        originX: c.x,
        originY: c.y,
        z2: 10
      }), A3(i, E3(l), {
        // Default use item visual color
        stroke: d
      });
    }, e;
  }(pa)
), Yrt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.ignoreLabelLineUpdate = !0, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = n.getData(), o = this._data, s = this.group;
      a.diff(o).add(function(l) {
        var u = new Xrt(a, l);
        a.setItemGraphicEl(l, u), s.add(u);
      }).update(function(l, u) {
        var c = o.getItemGraphicEl(u);
        c.updateData(a, l), s.add(c), a.setItemGraphicEl(l, c);
      }).remove(function(l) {
        var u = o.getItemGraphicEl(l);
        Xb(u, n, l);
      }).execute(), this._data = a;
    }, e.prototype.remove = function() {
      this.group.removeAll(), this._data = null;
    }, e.prototype.dispose = function() {
    }, e.type = "funnel", e;
  }(_n)
), qrt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n) {
      t.prototype.init.apply(this, arguments), this.legendVisualProvider = new S1(We(this.getData, this), We(this.getRawData, this)), this._defaultLabelLine(n);
    }, e.prototype.getInitialData = function(n, r) {
      return Rm(this, {
        coordDimensions: ["value"],
        encodeDefaulter: vt(n3, this)
      });
    }, e.prototype._defaultLabelLine = function(n) {
      Hh(n, "labelLine", ["show"]);
      var r = n.labelLine, i = n.emphasis.labelLine;
      r.show = r.show && n.label.show, i.show = i.show && n.emphasis.label.show;
    }, e.prototype.getDataParams = function(n) {
      var r = this.getData(), i = t.prototype.getDataParams.call(this, n), a = r.mapDimension("value"), o = r.getSum(a);
      return i.percent = o ? +(r.get(a, n) / o * 100).toFixed(2) : 0, i.$vars.push("percent"), i;
    }, e.type = "series.funnel", e.defaultOption = {
      // zlevel: 0,                  // 一级层叠
      z: 2,
      legendHoverLink: !0,
      colorBy: "data",
      left: 80,
      top: 60,
      right: 80,
      bottom: 60,
      // width: {totalWidth} - left - right,
      // height: {totalHeight} - top - bottom,
      // 默认取数据最小最大值
      // min: 0,
      // max: 100,
      minSize: "0%",
      maxSize: "100%",
      sort: "descending",
      orient: "vertical",
      gap: 0,
      funnelAlign: "center",
      label: {
        show: !0,
        position: "outer"
        // formatter: 标签文本格式器，同Tooltip.formatter，不支持异步回调
      },
      labelLine: {
        show: !0,
        length: 20,
        lineStyle: {
          // color: 各异,
          width: 1
        }
      },
      itemStyle: {
        // color: 各异,
        borderColor: "#fff",
        borderWidth: 1
      },
      emphasis: {
        label: {
          show: !0
        }
      },
      select: {
        itemStyle: {
          borderColor: "#212121"
        }
      }
    }, e;
  }(Cn)
);
function Krt(t, e) {
  return Mr(t.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function Jrt(t, e) {
  for (var n = t.mapDimension("value"), r = t.mapArray(n, function(l) {
    return l;
  }), i = [], a = e === "ascending", o = 0, s = t.count(); o < s; o++)
    i[o] = o;
  return qe(e) ? i.sort(e) : e !== "none" && i.sort(function(l, u) {
    return a ? r[l] - r[u] : r[u] - r[l];
  }), i;
}
function eit(t) {
  var e = t.hostModel, n = e.get("orient");
  t.each(function(r) {
    var i = t.getItemModel(r), a = i.getModel("label"), o = a.get("position"), s = i.getModel("labelLine"), l = t.getItemLayout(r), u = l.points, c = o === "inner" || o === "inside" || o === "center" || o === "insideLeft" || o === "insideRight", f, d, h, p;
    if (c)
      o === "insideLeft" ? (d = (u[0][0] + u[3][0]) / 2 + 5, h = (u[0][1] + u[3][1]) / 2, f = "left") : o === "insideRight" ? (d = (u[1][0] + u[2][0]) / 2 - 5, h = (u[1][1] + u[2][1]) / 2, f = "right") : (d = (u[0][0] + u[1][0] + u[2][0] + u[3][0]) / 4, h = (u[0][1] + u[1][1] + u[2][1] + u[3][1]) / 4, f = "center"), p = [[d, h], [d, h]];
    else {
      var v = void 0, g = void 0, m = void 0, y = void 0, _ = s.get("length");
      process.env.NODE_ENV !== "production" && (n === "vertical" && ["top", "bottom"].indexOf(o) > -1 && (o = "left", console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")), n === "horizontal" && ["left", "right"].indexOf(o) > -1 && (o = "bottom", console.warn("Position error: Funnel chart on horizontal orient dose not support left and right."))), o === "left" ? (v = (u[3][0] + u[0][0]) / 2, g = (u[3][1] + u[0][1]) / 2, m = v - _, d = m - 5, f = "right") : o === "right" ? (v = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, m = v + _, d = m + 5, f = "left") : o === "top" ? (v = (u[3][0] + u[0][0]) / 2, g = (u[3][1] + u[0][1]) / 2, y = g - _, h = y - 5, f = "center") : o === "bottom" ? (v = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, y = g + _, h = y + 5, f = "center") : o === "rightTop" ? (v = n === "horizontal" ? u[3][0] : u[1][0], g = n === "horizontal" ? u[3][1] : u[1][1], n === "horizontal" ? (y = g - _, h = y - 5, f = "center") : (m = v + _, d = m + 5, f = "top")) : o === "rightBottom" ? (v = u[2][0], g = u[2][1], n === "horizontal" ? (y = g + _, h = y + 5, f = "center") : (m = v + _, d = m + 5, f = "bottom")) : o === "leftTop" ? (v = u[0][0], g = n === "horizontal" ? u[0][1] : u[1][1], n === "horizontal" ? (y = g - _, h = y - 5, f = "center") : (m = v - _, d = m - 5, f = "right")) : o === "leftBottom" ? (v = n === "horizontal" ? u[1][0] : u[3][0], g = n === "horizontal" ? u[1][1] : u[2][1], n === "horizontal" ? (y = g + _, h = y + 5, f = "center") : (m = v - _, d = m - 5, f = "right")) : (v = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, n === "horizontal" ? (y = g + _, h = y + 5, f = "center") : (m = v + _, d = m + 5, f = "left")), n === "horizontal" ? (m = v, d = m) : (y = g, h = y), p = [[v, g], [m, y]];
    }
    l.label = {
      linePoints: p,
      x: d,
      y: h,
      verticalAlign: "middle",
      textAlign: f,
      inside: c
    };
  });
}
function tit(t, e) {
  t.eachSeriesByType("funnel", function(n) {
    var r = n.getData(), i = r.mapDimension("value"), a = n.get("sort"), o = Krt(n, e), s = n.get("orient"), l = o.width, u = o.height, c = Jrt(r, a), f = o.x, d = o.y, h = s === "horizontal" ? [ze(n.get("minSize"), u), ze(n.get("maxSize"), u)] : [ze(n.get("minSize"), l), ze(n.get("maxSize"), l)], p = r.getDataExtent(i), v = n.get("min"), g = n.get("max");
    v == null && (v = Math.min(p[0], 0)), g == null && (g = p[1]);
    var m = n.get("funnelAlign"), y = n.get("gap"), _ = s === "horizontal" ? l : u, O = (_ - y * (r.count() - 1)) / r.count(), S = function(N, I) {
      if (s === "horizontal") {
        var B = r.get(i, N) || 0, Q = gn(B, [v, g], h, !0), W = void 0;
        switch (m) {
          case "top":
            W = d;
            break;
          case "center":
            W = d + (u - Q) / 2;
            break;
          case "bottom":
            W = d + (u - Q);
            break;
        }
        return [[I, W], [I, W + Q]];
      }
      var H = r.get(i, N) || 0, U = gn(H, [v, g], h, !0), j;
      switch (m) {
        case "left":
          j = f;
          break;
        case "center":
          j = f + (l - U) / 2;
          break;
        case "right":
          j = f + l - U;
          break;
      }
      return [[j, I], [j + U, I]];
    };
    a === "ascending" && (O = -O, y = -y, s === "horizontal" ? f += l : d += u, c = c.reverse());
    for (var x = 0; x < c.length; x++) {
      var C = c[x], P = c[x + 1], $ = r.getItemModel(C);
      if (s === "horizontal") {
        var T = $.get(["itemStyle", "width"]);
        T == null ? T = O : (T = ze(T, l), a === "ascending" && (T = -T));
        var E = S(C, f), M = S(P, f + T);
        f += T + y, r.setItemLayout(C, {
          points: E.concat(M.slice().reverse())
        });
      } else {
        var R = $.get(["itemStyle", "height"]);
        R == null ? R = O : (R = ze(R, u), a === "ascending" && (R = -R));
        var E = S(C, d), M = S(P, d + R);
        d += R + y, r.setItemLayout(C, {
          points: E.concat(M.slice().reverse())
        });
      }
    }
    eit(r);
  });
}
function nit(t) {
  t.registerChartView(Yrt), t.registerSeriesModel(qrt), t.registerLayout(tit), t.registerProcessor(O1("funnel"));
}
var rit = 0.3, iit = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._dataGroup = new ct(), n._initialized = !1, n;
    }
    return e.prototype.init = function() {
      this.group.add(this._dataGroup);
    }, e.prototype.render = function(n, r, i, a) {
      this._progressiveEls = null;
      var o = this._dataGroup, s = n.getData(), l = this._data, u = n.coordinateSystem, c = u.dimensions, f = VU(n);
      s.diff(l).add(d).update(h).remove(p).execute();
      function d(g) {
        var m = zU(s, o, g, c, u);
        vI(m, s, g, f);
      }
      function h(g, m) {
        var y = l.getItemGraphicEl(m), _ = lde(s, g, c, u);
        s.setItemGraphicEl(g, y), tn(y, {
          shape: {
            points: _
          }
        }, n, g), Zs(y), vI(y, s, g, f);
      }
      function p(g) {
        var m = l.getItemGraphicEl(g);
        o.remove(m);
      }
      if (!this._initialized) {
        this._initialized = !0;
        var v = ait(u, n, function() {
          setTimeout(function() {
            o.removeClipPath();
          });
        });
        o.setClipPath(v);
      }
      this._data = s;
    }, e.prototype.incrementalPrepareRender = function(n, r, i) {
      this._initialized = !0, this._data = null, this._dataGroup.removeAll();
    }, e.prototype.incrementalRender = function(n, r, i) {
      for (var a = r.getData(), o = r.coordinateSystem, s = o.dimensions, l = VU(r), u = this._progressiveEls = [], c = n.start; c < n.end; c++) {
        var f = zU(a, this._dataGroup, c, s, o);
        f.incremental = !0, vI(f, a, c, l), u.push(f);
      }
    }, e.prototype.remove = function() {
      this._dataGroup && this._dataGroup.removeAll(), this._data = null;
    }, e.type = "parallel", e;
  }(_n)
);
function ait(t, e, n) {
  var r = t.model, i = t.getRect(), a = new Zt({
    shape: {
      x: i.x,
      y: i.y,
      width: i.width,
      height: i.height
    }
  }), o = r.get("layout") === "horizontal" ? "width" : "height";
  return a.setShape(o, 0), Vn(a, {
    shape: {
      width: i.width,
      height: i.height
    }
  }, e, n), a;
}
function lde(t, e, n, r) {
  for (var i = [], a = 0; a < n.length; a++) {
    var o = n[a], s = t.get(t.mapDimension(o), e);
    oit(s, r.getAxis(o).type) || i.push(r.dataToPoint(s, o));
  }
  return i;
}
function zU(t, e, n, r, i) {
  var a = lde(t, n, r, i), o = new va({
    shape: {
      points: a
    },
    // silent: true,
    z2: 10
  });
  return e.add(o), t.setItemGraphicEl(n, o), o;
}
function VU(t) {
  var e = t.get("smooth", !0);
  return e === !0 && (e = rit), e = Gl(e), mf(e) && (e = 0), {
    smooth: e
  };
}
function vI(t, e, n, r) {
  t.useStyle(e.getItemVisual(n, "style")), t.style.fill = null, t.setShape("smooth", r.smooth);
  var i = e.getItemModel(n), a = i.getModel("emphasis");
  Ai(t, i, "lineStyle"), ur(t, a.get("focus"), a.get("blurScope"), a.get("disabled"));
}
function oit(t, e) {
  return e === "category" ? t == null : t == null || isNaN(t);
}
var sit = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n;
    }
    return e.prototype.getInitialData = function(n, r) {
      return Yl(null, this, {
        useEncodeDefaulter: We(lit, null, this)
      });
    }, e.prototype.getRawIndicesByActiveState = function(n) {
      var r = this.coordinateSystem, i = this.getData(), a = [];
      return r.eachActiveState(i, function(o, s) {
        n === o && a.push(i.getRawIndex(s));
      }), a;
    }, e.type = "series.parallel", e.dependencies = ["parallel"], e.defaultOption = {
      // zlevel: 0,
      z: 2,
      coordinateSystem: "parallel",
      parallelIndex: 0,
      label: {
        show: !1
      },
      inactiveOpacity: 0.05,
      activeOpacity: 1,
      lineStyle: {
        width: 1,
        opacity: 0.45,
        type: "solid"
      },
      emphasis: {
        label: {
          show: !1
        }
      },
      progressive: 500,
      smooth: !1,
      animationEasing: "linear"
    }, e;
  }(Cn)
);
function lit(t) {
  var e = t.ecModel.getComponent("parallel", t.get("parallelIndex"));
  if (e) {
    var n = {};
    return F(e.dimensions, function(r) {
      var i = uit(r);
      n[r] = i;
    }), n;
  }
}
function uit(t) {
  return +t.replace("dim", "");
}
var cit = ["lineStyle", "opacity"], fit = {
  seriesType: "parallel",
  reset: function(t, e) {
    var n = t.coordinateSystem, r = {
      normal: t.get(["lineStyle", "opacity"]),
      active: t.get("activeOpacity"),
      inactive: t.get("inactiveOpacity")
    };
    return {
      progress: function(i, a) {
        n.eachActiveState(a, function(o, s) {
          var l = r[o];
          if (o === "normal" && a.hasItemOption) {
            var u = a.getItemModel(s).get(cit, !0);
            u != null && (l = u);
          }
          var c = a.ensureUniqueItemVisual(s, "style");
          c.opacity = l;
        }, i.start, i.end);
      }
    };
  }
};
function dit(t) {
  hit(t), pit(t);
}
function hit(t) {
  if (!t.parallel) {
    var e = !1;
    F(t.series, function(n) {
      n && n.type === "parallel" && (e = !0);
    }), e && (t.parallel = [{}]);
  }
}
function pit(t) {
  var e = wn(t.parallelAxis);
  F(e, function(n) {
    if (nt(n)) {
      var r = n.parallelIndex || 0, i = wn(t.parallel)[r];
      i && i.parallelAxisDefault && mt(n, i.parallelAxisDefault, !1);
    }
  });
}
var vit = 5, git = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      this._model = n, this._api = i, this._handlers || (this._handlers = {}, F(mit, function(a, o) {
        i.getZr().on(o, this._handlers[o] = We(a, this));
      }, this)), Am(this, "_throttledDispatchExpand", n.get("axisExpandRate"), "fixRate");
    }, e.prototype.dispose = function(n, r) {
      Jb(this, "_throttledDispatchExpand"), F(this._handlers, function(i, a) {
        r.getZr().off(a, i);
      }), this._handlers = null;
    }, e.prototype._throttledDispatchExpand = function(n) {
      this._dispatchExpand(n);
    }, e.prototype._dispatchExpand = function(n) {
      n && this._api.dispatchAction(_e({
        type: "parallelAxisExpand"
      }, n));
    }, e.type = "parallel", e;
  }(Ln)
), mit = {
  mousedown: function(t) {
    gI(this, "click") && (this._mouseDownPoint = [t.offsetX, t.offsetY]);
  },
  mouseup: function(t) {
    var e = this._mouseDownPoint;
    if (gI(this, "click") && e) {
      var n = [t.offsetX, t.offsetY], r = Math.pow(e[0] - n[0], 2) + Math.pow(e[1] - n[1], 2);
      if (r > vit)
        return;
      var i = this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]);
      i.behavior !== "none" && this._dispatchExpand({
        axisExpandWindow: i.axisExpandWindow
      });
    }
    this._mouseDownPoint = null;
  },
  mousemove: function(t) {
    if (!(this._mouseDownPoint || !gI(this, "mousemove"))) {
      var e = this._model, n = e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]), r = n.behavior;
      r === "jump" && this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")), this._throttledDispatchExpand(r === "none" ? null : {
        axisExpandWindow: n.axisExpandWindow,
        // Jumping uses animation, and sliding suppresses animation.
        animation: r === "jump" ? null : {
          duration: 0
          // Disable animation.
        }
      });
    }
  }
};
function gI(t, e) {
  var n = t._model;
  return n.get("axisExpandable") && n.get("axisExpandTriggerOn") === e;
}
var yit = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function() {
      t.prototype.init.apply(this, arguments), this.mergeOption({});
    }, e.prototype.mergeOption = function(n) {
      var r = this.option;
      n && mt(r, n, !0), this._initDimensions();
    }, e.prototype.contains = function(n, r) {
      var i = n.get("parallelIndex");
      return i != null && r.getComponent("parallel", i) === this;
    }, e.prototype.setAxisExpand = function(n) {
      F(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], function(r) {
        n.hasOwnProperty(r) && (this.option[r] = n[r]);
      }, this);
    }, e.prototype._initDimensions = function() {
      var n = this.dimensions = [], r = this.parallelAxisIndex = [], i = yn(this.ecModel.queryComponents({
        mainType: "parallelAxis"
      }), function(a) {
        return (a.get("parallelIndex") || 0) === this.componentIndex;
      }, this);
      F(i, function(a) {
        n.push("dim" + a.get("dim")), r.push(a.componentIndex);
      });
    }, e.type = "parallel", e.dependencies = ["parallelAxis"], e.layoutMode = "box", e.defaultOption = {
      // zlevel: 0,
      z: 0,
      left: 80,
      top: 60,
      right: 80,
      bottom: 60,
      // width: {totalWidth} - left - right,
      // height: {totalHeight} - top - bottom,
      layout: "horizontal",
      // FIXME
      // naming?
      axisExpandable: !1,
      axisExpandCenter: null,
      axisExpandCount: 0,
      axisExpandWidth: 50,
      axisExpandRate: 17,
      axisExpandDebounce: 50,
      // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full.
      // Do not doc to user until necessary.
      axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4],
      axisExpandTriggerOn: "click",
      parallelAxisDefault: null
    }, e;
  }(At)
), bit = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i, a, o) {
      var s = t.call(this, n, r, i) || this;
      return s.type = a || "value", s.axisIndex = o, s;
    }
    return e.prototype.isHorizontal = function() {
      return this.coordinateSystem.getModel().get("layout") !== "horizontal";
    }, e;
  }(vs)
);
function _p(t, e, n, r, i, a) {
  t = t || 0;
  var o = n[1] - n[0];
  if (i != null && (i = uv(i, [0, o])), a != null && (a = Math.max(a, i ?? 0)), r === "all") {
    var s = Math.abs(e[1] - e[0]);
    s = uv(s, [0, o]), i = a = uv(s, [i, a]), r = 0;
  }
  e[0] = uv(e[0], n), e[1] = uv(e[1], n);
  var l = mI(e, r);
  e[r] += t;
  var u = i || 0, c = n.slice();
  l.sign < 0 ? c[0] += u : c[1] -= u, e[r] = uv(e[r], c);
  var f;
  return f = mI(e, r), i != null && (f.sign !== l.sign || f.span < i) && (e[1 - r] = e[r] + l.sign * i), f = mI(e, r), a != null && f.span > a && (e[1 - r] = e[r] + f.sign * a), e;
}
function mI(t, e) {
  var n = t[e] - t[1 - e];
  return {
    span: Math.abs(n),
    sign: n > 0 ? -1 : n < 0 ? 1 : e ? -1 : 1
  };
}
function uv(t, e) {
  return Math.min(e[1] != null ? e[1] : 1 / 0, Math.max(e[0] != null ? e[0] : -1 / 0, t));
}
var yI = F, ude = Math.min, cde = Math.max, FU = Math.floor, _it = Math.ceil, WU = sr, Oit = Math.PI, Sit = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.type = "parallel", this._axesMap = Ze(), this._axesLayout = {}, this.dimensions = e.dimensions, this._model = e, this._init(e, n, r);
    }
    return t.prototype._init = function(e, n, r) {
      var i = e.dimensions, a = e.parallelAxisIndex;
      yI(i, function(o, s) {
        var l = a[s], u = n.getComponent("parallelAxis", l), c = this._axesMap.set(o, new bit(o, g1(u), [0, 0], u.get("type"), l)), f = c.type === "category";
        c.onBand = f && u.get("boundaryGap"), c.inverse = u.get("inverse"), u.axis = c, c.model = u, c.coordinateSystem = u.coordinateSystem = this;
      }, this);
    }, t.prototype.update = function(e, n) {
      this._updateAxesFromSeries(this._model, e);
    }, t.prototype.containPoint = function(e) {
      var n = this._makeLayoutInfo(), r = n.axisBase, i = n.layoutBase, a = n.pixelDimIndex, o = e[1 - a], s = e[a];
      return o >= r && o <= r + n.axisLength && s >= i && s <= i + n.layoutLength;
    }, t.prototype.getModel = function() {
      return this._model;
    }, t.prototype._updateAxesFromSeries = function(e, n) {
      n.eachSeries(function(r) {
        if (e.contains(r, n)) {
          var i = r.getData();
          yI(this.dimensions, function(a) {
            var o = this._axesMap.get(a);
            o.scale.unionExtentFromData(i, i.mapDimension(a)), Xh(o.scale, o.model);
          }, this);
        }
      }, this);
    }, t.prototype.resize = function(e, n) {
      this._rect = Mr(e.getBoxLayoutParams(), {
        width: n.getWidth(),
        height: n.getHeight()
      }), this._layoutAxes();
    }, t.prototype.getRect = function() {
      return this._rect;
    }, t.prototype._makeLayoutInfo = function() {
      var e = this._model, n = this._rect, r = ["x", "y"], i = ["width", "height"], a = e.get("layout"), o = a === "horizontal" ? 0 : 1, s = n[i[o]], l = [0, s], u = this.dimensions.length, c = ZS(e.get("axisExpandWidth"), l), f = ZS(e.get("axisExpandCount") || 0, [0, u]), d = e.get("axisExpandable") && u > 3 && u > f && f > 1 && c > 0 && s > 0, h = e.get("axisExpandWindow"), p;
      if (h)
        p = ZS(h[1] - h[0], l), h[1] = h[0] + p;
      else {
        p = ZS(c * (f - 1), l);
        var v = e.get("axisExpandCenter") || FU(u / 2);
        h = [c * v - p / 2], h[1] = h[0] + p;
      }
      var g = (s - p) / (u - f);
      g < 3 && (g = 0);
      var m = [FU(WU(h[0] / c, 1)) + 1, _it(WU(h[1] / c, 1)) - 1], y = g / c * h[0];
      return {
        layout: a,
        pixelDimIndex: o,
        layoutBase: n[r[o]],
        layoutLength: s,
        axisBase: n[r[1 - o]],
        axisLength: n[i[1 - o]],
        axisExpandable: d,
        axisExpandWidth: c,
        axisCollapseWidth: g,
        axisExpandWindow: h,
        axisCount: u,
        winInnerIndices: m,
        axisExpandWindow0Pos: y
      };
    }, t.prototype._layoutAxes = function() {
      var e = this._rect, n = this._axesMap, r = this.dimensions, i = this._makeLayoutInfo(), a = i.layout;
      n.each(function(o) {
        var s = [0, i.axisLength], l = o.inverse ? 1 : 0;
        o.setExtent(s[l], s[1 - l]);
      }), yI(r, function(o, s) {
        var l = (i.axisExpandable ? wit : xit)(s, i), u = {
          horizontal: {
            x: l.position,
            y: i.axisLength
          },
          vertical: {
            x: 0,
            y: l.position
          }
        }, c = {
          horizontal: Oit / 2,
          vertical: 0
        }, f = [u[a].x + e.x, u[a].y + e.y], d = c[a], h = Na();
        Lf(h, h, d), Gs(h, h, f), this._axesLayout[o] = {
          position: f,
          rotation: d,
          transform: h,
          axisNameAvailableWidth: l.axisNameAvailableWidth,
          axisLabelShow: l.axisLabelShow,
          nameTruncateMaxWidth: l.nameTruncateMaxWidth,
          tickDirection: 1,
          labelDirection: 1
        };
      }, this);
    }, t.prototype.getAxis = function(e) {
      return this._axesMap.get(e);
    }, t.prototype.dataToPoint = function(e, n) {
      return this.axisCoordToPoint(this._axesMap.get(n).dataToCoord(e), n);
    }, t.prototype.eachActiveState = function(e, n, r, i) {
      r == null && (r = 0), i == null && (i = e.count());
      var a = this._axesMap, o = this.dimensions, s = [], l = [];
      F(o, function(g) {
        s.push(e.mapDimension(g)), l.push(a.get(g).model);
      });
      for (var u = this.hasAxisBrushed(), c = r; c < i; c++) {
        var f = void 0;
        if (!u)
          f = "normal";
        else {
          f = "active";
          for (var d = e.getValues(s, c), h = 0, p = o.length; h < p; h++) {
            var v = l[h].getActiveState(d[h]);
            if (v === "inactive") {
              f = "inactive";
              break;
            }
          }
        }
        n(f, c);
      }
    }, t.prototype.hasAxisBrushed = function() {
      for (var e = this.dimensions, n = this._axesMap, r = !1, i = 0, a = e.length; i < a; i++)
        n.get(e[i]).model.getActiveState() !== "normal" && (r = !0);
      return r;
    }, t.prototype.axisCoordToPoint = function(e, n) {
      var r = this._axesLayout[n];
      return zs([e, 0], r.transform);
    }, t.prototype.getAxisLayout = function(e) {
      return ot(this._axesLayout[e]);
    }, t.prototype.getSlidedAxisExpandWindow = function(e) {
      var n = this._makeLayoutInfo(), r = n.pixelDimIndex, i = n.axisExpandWindow.slice(), a = i[1] - i[0], o = [0, n.axisExpandWidth * (n.axisCount - 1)];
      if (!this.containPoint(e))
        return {
          behavior: "none",
          axisExpandWindow: i
        };
      var s = e[r] - n.layoutBase - n.axisExpandWindow0Pos, l, u = "slide", c = n.axisCollapseWidth, f = this._model.get("axisExpandSlideTriggerArea"), d = f[0] != null;
      if (c)
        d && c && s < a * f[0] ? (u = "jump", l = s - a * f[2]) : d && c && s > a * (1 - f[0]) ? (u = "jump", l = s - a * (1 - f[2])) : (l = s - a * f[1]) >= 0 && (l = s - a * (1 - f[1])) <= 0 && (l = 0), l *= n.axisExpandWidth / c, l ? _p(l, i, o, "all") : u = "none";
      else {
        var h = i[1] - i[0], p = o[1] * s / h;
        i = [cde(0, p - h / 2)], i[1] = ude(o[1], i[0] + h), i[0] = i[1] - h;
      }
      return {
        axisExpandWindow: i,
        behavior: u
      };
    }, t;
  }()
);
function ZS(t, e) {
  return ude(cde(t, e[0]), e[1]);
}
function xit(t, e) {
  var n = e.layoutLength / (e.axisCount - 1);
  return {
    position: n * t,
    axisNameAvailableWidth: n,
    axisLabelShow: !0
  };
}
function wit(t, e) {
  var n = e.layoutLength, r = e.axisExpandWidth, i = e.axisCount, a = e.axisCollapseWidth, o = e.winInnerIndices, s, l = a, u = !1, c;
  return t < o[0] ? (s = t * a, c = a) : t <= o[1] ? (s = e.axisExpandWindow0Pos + t * r - e.axisExpandWindow[0], l = r, u = !0) : (s = n - (i - 1 - t) * a, c = a), {
    position: s,
    axisNameAvailableWidth: l,
    axisLabelShow: u,
    nameTruncateMaxWidth: c
  };
}
function Cit(t, e) {
  var n = [];
  return t.eachComponent("parallel", function(r, i) {
    var a = new Sit(r, t, e);
    a.name = "parallel_" + i, a.resize(r, e), r.coordinateSystem = a, a.model = r, n.push(a);
  }), t.eachSeries(function(r) {
    if (r.get("coordinateSystem") === "parallel") {
      var i = r.getReferringComponents("parallel", Er).models[0];
      r.coordinateSystem = i.coordinateSystem;
    }
  }), n;
}
var Tit = {
  create: Cit
}, yL = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.activeIntervals = [], n;
    }
    return e.prototype.getAreaSelectStyle = function() {
      return jh([
        ["fill", "color"],
        ["lineWidth", "borderWidth"],
        ["stroke", "borderColor"],
        ["width", "width"],
        ["opacity", "opacity"]
        // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
        // So do not transfer decal directly.
      ])(this.getModel("areaSelectStyle"));
    }, e.prototype.setActiveIntervals = function(n) {
      var r = this.activeIntervals = ot(n);
      if (r)
        for (var i = r.length - 1; i >= 0; i--)
          ao(r[i]);
    }, e.prototype.getActiveState = function(n) {
      var r = this.activeIntervals;
      if (!r.length)
        return "normal";
      if (n == null || isNaN(+n))
        return "inactive";
      if (r.length === 1) {
        var i = r[0];
        if (i[0] <= n && n <= i[1])
          return "active";
      } else
        for (var a = 0, o = r.length; a < o; a++)
          if (r[a][0] <= n && n <= r[a][1])
            return "active";
      return "inactive";
    }, e;
  }(At)
);
vr(yL, Dm);
var Yh = !0, f_ = Math.min, Ug = Math.max, Pit = Math.pow, $it = 1e4, Ait = 6, Eit = 6, QU = "globalPan", Mit = {
  w: [0, 0],
  e: [0, 1],
  n: [1, 0],
  s: [1, 1]
}, Iit = {
  w: "ew",
  e: "ew",
  n: "ns",
  s: "ns",
  ne: "nesw",
  sw: "nesw",
  nw: "nwse",
  se: "nwse"
}, HU = {
  brushStyle: {
    lineWidth: 2,
    stroke: "rgba(210,219,238,0.3)",
    fill: "#D2DBEE"
  },
  transformable: !0,
  brushMode: "single",
  removeOnClick: !1
}, Dit = 0, J3 = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this) || this;
      return r._track = [], r._covers = [], r._handlers = {}, process.env.NODE_ENV !== "production" && at(n), r._zr = n, r.group = new ct(), r._uid = "brushController_" + Dit++, F(Vit, function(i, a) {
        this._handlers[a] = We(i, this);
      }, r), r;
    }
    return e.prototype.enableBrush = function(n) {
      return process.env.NODE_ENV !== "production" && at(this._mounted), this._brushType && this._doDisableBrush(), n.brushType && this._doEnableBrush(n), this;
    }, e.prototype._doEnableBrush = function(n) {
      var r = this._zr;
      this._enableGlobalPan || xtt(r, QU, this._uid), F(this._handlers, function(i, a) {
        r.on(a, i);
      }), this._brushType = n.brushType, this._brushOption = mt(ot(HU), n, !0);
    }, e.prototype._doDisableBrush = function() {
      var n = this._zr;
      wtt(n, QU, this._uid), F(this._handlers, function(r, i) {
        n.off(i, r);
      }), this._brushType = this._brushOption = null;
    }, e.prototype.setPanels = function(n) {
      if (n && n.length) {
        var r = this._panels = {};
        F(n, function(i) {
          r[i.panelId] = ot(i);
        });
      } else
        this._panels = null;
      return this;
    }, e.prototype.mount = function(n) {
      n = n || {}, process.env.NODE_ENV !== "production" && (this._mounted = !0), this._enableGlobalPan = n.enableGlobalPan;
      var r = this.group;
      return this._zr.add(r), r.attr({
        x: n.x || 0,
        y: n.y || 0,
        rotation: n.rotation || 0,
        scaleX: n.scaleX || 1,
        scaleY: n.scaleY || 1
      }), this._transform = r.getLocalTransform(), this;
    }, e.prototype.updateCovers = function(n) {
      process.env.NODE_ENV !== "production" && at(this._mounted), n = Ce(n, function(d) {
        return mt(ot(HU), d, !0);
      });
      var r = "\0-brush-index-", i = this._covers, a = this._covers = [], o = this, s = this._creatingCover;
      return new Qu(i, n, u, l).add(c).update(c).remove(f).execute(), this;
      function l(d, h) {
        return (d.id != null ? d.id : r + h) + "-" + d.brushType;
      }
      function u(d, h) {
        return l(d.__brushOption, h);
      }
      function c(d, h) {
        var p = n[d];
        if (h != null && i[h] === s)
          a[d] = i[h];
        else {
          var v = a[d] = h != null ? (i[h].__brushOption = p, i[h]) : dde(o, fde(o, p));
          e6(o, v);
        }
      }
      function f(d) {
        i[d] !== s && o.group.remove(i[d]);
      }
    }, e.prototype.unmount = function() {
      if (!(process.env.NODE_ENV !== "production" && !this._mounted))
        return this.enableBrush(!1), bL(this), this._zr.remove(this.group), process.env.NODE_ENV !== "production" && (this._mounted = !1), this;
    }, e.prototype.dispose = function() {
      this.unmount(), this.off();
    }, e;
  }(fs)
);
function fde(t, e) {
  var n = ZP[e.brushType].createCover(t, e);
  return n.__brushOption = e, pde(n, e), t.group.add(n), n;
}
function dde(t, e) {
  var n = t6(e);
  return n.endCreating && (n.endCreating(t, e), pde(e, e.__brushOption)), e;
}
function hde(t, e) {
  var n = e.__brushOption;
  t6(e).updateCoverShape(t, e, n.range, n);
}
function pde(t, e) {
  var n = e.z;
  n == null && (n = $it), t.traverse(function(r) {
    r.z = n, r.z2 = n;
  });
}
function e6(t, e) {
  t6(e).updateCommon(t, e), hde(t, e);
}
function t6(t) {
  return ZP[t.__brushOption.brushType];
}
function n6(t, e, n) {
  var r = t._panels;
  if (!r)
    return Yh;
  var i, a = t._transform;
  return F(r, function(o) {
    o.isTargetByCursor(e, n, a) && (i = o);
  }), i;
}
function vde(t, e) {
  var n = t._panels;
  if (!n)
    return Yh;
  var r = e.__brushOption.panelId;
  return r != null ? n[r] : Yh;
}
function bL(t) {
  var e = t._covers, n = e.length;
  return F(e, function(r) {
    t.group.remove(r);
  }, t), e.length = 0, !!n;
}
function qh(t, e) {
  var n = Ce(t._covers, function(r) {
    var i = r.__brushOption, a = ot(i.range);
    return {
      brushType: i.brushType,
      panelId: i.panelId,
      range: a
    };
  });
  t.trigger("brush", {
    areas: n,
    isEnd: !!e.isEnd,
    removeOnClick: !!e.removeOnClick
  });
}
function Rit(t) {
  var e = t._track;
  if (!e.length)
    return !1;
  var n = e[e.length - 1], r = e[0], i = n[0] - r[0], a = n[1] - r[1], o = Pit(i * i + a * a, 0.5);
  return o > Ait;
}
function gde(t) {
  var e = t.length - 1;
  return e < 0 && (e = 0), [t[0], t[e]];
}
function mde(t, e, n, r) {
  var i = new ct();
  return i.add(new Zt({
    name: "main",
    style: r6(n),
    silent: !0,
    draggable: !0,
    cursor: "move",
    drift: vt(GU, t, e, i, ["n", "s", "w", "e"]),
    ondragend: vt(qh, e, {
      isEnd: !0
    })
  })), F(r, function(a) {
    i.add(new Zt({
      name: a.join(""),
      style: {
        opacity: 0
      },
      draggable: !0,
      silent: !0,
      invisible: !0,
      drift: vt(GU, t, e, i, a),
      ondragend: vt(qh, e, {
        isEnd: !0
      })
    }));
  }), i;
}
function yde(t, e, n, r) {
  var i = r.brushStyle.lineWidth || 0, a = Ug(i, Eit), o = n[0][0], s = n[1][0], l = o - i / 2, u = s - i / 2, c = n[0][1], f = n[1][1], d = c - a + i / 2, h = f - a + i / 2, p = c - o, v = f - s, g = p + i, m = v + i;
  gu(t, e, "main", o, s, p, v), r.transformable && (gu(t, e, "w", l, u, a, m), gu(t, e, "e", d, u, a, m), gu(t, e, "n", l, u, g, a), gu(t, e, "s", l, h, g, a), gu(t, e, "nw", l, u, a, a), gu(t, e, "ne", d, u, a, a), gu(t, e, "sw", l, h, a, a), gu(t, e, "se", d, h, a, a));
}
function _L(t, e) {
  var n = e.__brushOption, r = n.transformable, i = e.childAt(0);
  i.useStyle(r6(n)), i.attr({
    silent: !r,
    cursor: r ? "move" : "default"
  }), F([["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]], function(a) {
    var o = e.childOfName(a.join("")), s = a.length === 1 ? OL(t, a[0]) : Lit(t, a);
    o && o.attr({
      silent: !r,
      invisible: !r,
      cursor: r ? Iit[s] + "-resize" : null
    });
  });
}
function gu(t, e, n, r, i, a, o) {
  var s = e.childOfName(n);
  s && s.setShape(Bit(i6(t, e, [[r, i], [r + a, i + o]])));
}
function r6(t) {
  return it({
    strokeNoScale: !0
  }, t.brushStyle);
}
function bde(t, e, n, r) {
  var i = [f_(t, n), f_(e, r)], a = [Ug(t, n), Ug(e, r)];
  return [
    [i[0], a[0]],
    [i[1], a[1]]
    // y range
  ];
}
function kit(t) {
  return of(t.group);
}
function OL(t, e) {
  var n = {
    w: "left",
    e: "right",
    n: "top",
    s: "bottom"
  }, r = {
    left: "w",
    right: "e",
    top: "n",
    bottom: "s"
  }, i = CP(n[e], kit(t));
  return r[i];
}
function Lit(t, e) {
  var n = [OL(t, e[0]), OL(t, e[1])];
  return (n[0] === "e" || n[0] === "w") && n.reverse(), n.join("");
}
function GU(t, e, n, r, i, a) {
  var o = n.__brushOption, s = t.toRectRange(o.range), l = _de(e, i, a);
  F(r, function(u) {
    var c = Mit[u];
    s[c[0]][c[1]] += l[c[0]];
  }), o.range = t.fromRectRange(bde(s[0][0], s[1][0], s[0][1], s[1][1])), e6(e, n), qh(e, {
    isEnd: !1
  });
}
function Nit(t, e, n, r) {
  var i = e.__brushOption.range, a = _de(t, n, r);
  F(i, function(o) {
    o[0] += a[0], o[1] += a[1];
  }), e6(t, e), qh(t, {
    isEnd: !1
  });
}
function _de(t, e, n) {
  var r = t.group, i = r.transformCoordToLocal(e, n), a = r.transformCoordToLocal(0, 0);
  return [i[0] - a[0], i[1] - a[1]];
}
function i6(t, e, n) {
  var r = vde(t, e);
  return r && r !== Yh ? r.clipPath(n, t._transform) : ot(n);
}
function Bit(t) {
  var e = f_(t[0][0], t[1][0]), n = f_(t[0][1], t[1][1]), r = Ug(t[0][0], t[1][0]), i = Ug(t[0][1], t[1][1]);
  return {
    x: e,
    y: n,
    width: r - e,
    height: i - n
  };
}
function zit(t, e, n) {
  if (
    // Check active
    !(!t._brushType || Fit(t, e.offsetX, e.offsetY))
  ) {
    var r = t._zr, i = t._covers, a = n6(t, e, n);
    if (!t._dragging)
      for (var o = 0; o < i.length; o++) {
        var s = i[o].__brushOption;
        if (a && (a === Yh || s.panelId === a.panelId) && ZP[s.brushType].contain(i[o], n[0], n[1]))
          return;
      }
    a && r.setCursorStyle("crosshair");
  }
}
function SL(t) {
  var e = t.event;
  e.preventDefault && e.preventDefault();
}
function xL(t, e, n) {
  return t.childOfName("main").contain(e, n);
}
function Ode(t, e, n, r) {
  var i = t._creatingCover, a = t._creatingPanel, o = t._brushOption, s;
  if (t._track.push(n.slice()), Rit(t) || i) {
    if (a && !i) {
      o.brushMode === "single" && bL(t);
      var l = ot(o);
      l.brushType = jU(l.brushType, a), l.panelId = a === Yh ? null : a.panelId, i = t._creatingCover = fde(t, l), t._covers.push(i);
    }
    if (i) {
      var u = ZP[jU(t._brushType, a)], c = i.__brushOption;
      c.range = u.getCreatingRange(i6(t, i, t._track)), r && (dde(t, i), u.updateCommon(t, i)), hde(t, i), s = {
        isEnd: r
      };
    }
  } else r && o.brushMode === "single" && o.removeOnClick && n6(t, e, n) && bL(t) && (s = {
    isEnd: r,
    removeOnClick: !0
  });
  return s;
}
function jU(t, e) {
  return t === "auto" ? (process.env.NODE_ENV !== "production" && at(e && e.defaultBrushType, 'MUST have defaultBrushType when brushType is "atuo"'), e.defaultBrushType) : t;
}
var Vit = {
  mousedown: function(t) {
    if (this._dragging)
      ZU(this, t);
    else if (!t.target || !t.target.draggable) {
      SL(t);
      var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY);
      this._creatingCover = null;
      var n = this._creatingPanel = n6(this, t, e);
      n && (this._dragging = !0, this._track = [e.slice()]);
    }
  },
  mousemove: function(t) {
    var e = t.offsetX, n = t.offsetY, r = this.group.transformCoordToLocal(e, n);
    if (zit(this, t, r), this._dragging) {
      SL(t);
      var i = Ode(this, t, r, !1);
      i && qh(this, i);
    }
  },
  mouseup: function(t) {
    ZU(this, t);
  }
};
function ZU(t, e) {
  if (t._dragging) {
    SL(e);
    var n = e.offsetX, r = e.offsetY, i = t.group.transformCoordToLocal(n, r), a = Ode(t, e, i, !0);
    t._dragging = !1, t._track = [], t._creatingCover = null, a && qh(t, a);
  }
}
function Fit(t, e, n) {
  var r = t._zr;
  return e < 0 || e > r.getWidth() || n < 0 || n > r.getHeight();
}
var ZP = {
  lineX: UU(0),
  lineY: UU(1),
  rect: {
    createCover: function(t, e) {
      function n(r) {
        return r;
      }
      return mde({
        toRectRange: n,
        fromRectRange: n
      }, t, e, [["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]]);
    },
    getCreatingRange: function(t) {
      var e = gde(t);
      return bde(e[1][0], e[1][1], e[0][0], e[0][1]);
    },
    updateCoverShape: function(t, e, n, r) {
      yde(t, e, n, r);
    },
    updateCommon: _L,
    contain: xL
  },
  polygon: {
    createCover: function(t, e) {
      var n = new ct();
      return n.add(new va({
        name: "main",
        style: r6(e),
        silent: !0
      })), n;
    },
    getCreatingRange: function(t) {
      return t;
    },
    endCreating: function(t, e) {
      e.remove(e.childAt(0)), e.add(new pa({
        name: "main",
        draggable: !0,
        drift: vt(Nit, t, e),
        ondragend: vt(qh, t, {
          isEnd: !0
        })
      }));
    },
    updateCoverShape: function(t, e, n, r) {
      e.childAt(0).setShape({
        points: i6(t, e, n)
      });
    },
    updateCommon: _L,
    contain: xL
  }
};
function UU(t) {
  return {
    createCover: function(e, n) {
      return mde({
        toRectRange: function(r) {
          var i = [r, [0, 100]];
          return t && i.reverse(), i;
        },
        fromRectRange: function(r) {
          return r[t];
        }
      }, e, n, [[["w"], ["e"]], [["n"], ["s"]]][t]);
    },
    getCreatingRange: function(e) {
      var n = gde(e), r = f_(n[0][t], n[1][t]), i = Ug(n[0][t], n[1][t]);
      return [r, i];
    },
    updateCoverShape: function(e, n, r, i) {
      var a, o = vde(e, n);
      if (o !== Yh && o.getLinearBrushOtherExtent)
        a = o.getLinearBrushOtherExtent(t);
      else {
        var s = e._zr;
        a = [0, [s.getWidth(), s.getHeight()][1 - t]];
      }
      var l = [r, a];
      t && l.reverse(), yde(e, n, l, i);
    },
    updateCommon: _L,
    contain: xL
  };
}
function Sde(t) {
  return t = a6(t), function(e) {
    return H5(e, t);
  };
}
function xde(t, e) {
  return t = a6(t), function(n) {
    var r = e ?? n, i = r ? t.width : t.height, a = r ? t.x : t.y;
    return [a, a + (i || 0)];
  };
}
function wde(t, e, n) {
  var r = a6(t);
  return function(i, a) {
    return r.contain(a[0], a[1]) && !QP(i, e, n);
  };
}
function a6(t) {
  return bt.create(t);
}
var Wit = ["axisLine", "axisTickLabel", "axisName"], Qit = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n, r) {
      t.prototype.init.apply(this, arguments), (this._brushController = new J3(r.getZr())).on("brush", We(this._onBrush, this));
    }, e.prototype.render = function(n, r, i, a) {
      if (!Hit(n, r, a)) {
        this.axisModel = n, this.api = i, this.group.removeAll();
        var o = this._axisGroup;
        if (this._axisGroup = new ct(), this.group.add(this._axisGroup), !!n.get("show")) {
          var s = jit(n, r), l = s.coordinateSystem, u = n.getAreaSelectStyle(), c = u.width, f = n.axis.dim, d = l.getAxisLayout(f), h = _e({
            strokeContainThreshold: c
          }, d), p = new sa(n, h);
          F(Wit, p.add, p), this._axisGroup.add(p.getGroup()), this._refreshBrushController(h, u, n, s, c, i), h1(o, this._axisGroup, n);
        }
      }
    }, e.prototype._refreshBrushController = function(n, r, i, a, o, s) {
      var l = i.axis.getExtent(), u = l[1] - l[0], c = Math.min(30, Math.abs(u) * 0.1), f = bt.create({
        x: l[0],
        y: -o / 2,
        width: u,
        height: o
      });
      f.x -= c, f.width += 2 * c, this._brushController.mount({
        enableGlobalPan: !0,
        rotation: n.rotation,
        x: n.position[0],
        y: n.position[1]
      }).setPanels([{
        panelId: "pl",
        clipPath: Sde(f),
        isTargetByCursor: wde(f, s, a),
        getLinearBrushOtherExtent: xde(f, 0)
      }]).enableBrush({
        brushType: "lineX",
        brushStyle: r,
        removeOnClick: !0
      }).updateCovers(Git(i));
    }, e.prototype._onBrush = function(n) {
      var r = n.areas, i = this.axisModel, a = i.axis, o = Ce(r, function(s) {
        return [a.coordToData(s.range[0], !0), a.coordToData(s.range[1], !0)];
      });
      (!i.option.realtime === n.isEnd || n.removeOnClick) && this.api.dispatchAction({
        type: "axisAreaSelect",
        parallelAxisId: i.id,
        intervals: o
      });
    }, e.prototype.dispose = function() {
      this._brushController.dispose();
    }, e.type = "parallelAxis", e;
  }(Ln)
);
function Hit(t, e, n) {
  return n && n.type === "axisAreaSelect" && e.findComponents({
    mainType: "parallelAxis",
    query: n
  })[0] === t;
}
function Git(t) {
  var e = t.axis;
  return Ce(t.activeIntervals, function(n) {
    return {
      brushType: "lineX",
      panelId: "pl",
      range: [e.dataToCoord(n[0], !0), e.dataToCoord(n[1], !0)]
    };
  });
}
function jit(t, e) {
  return e.getComponent("parallel", t.get("parallelIndex"));
}
var Zit = {
  type: "axisAreaSelect",
  event: "axisAreaSelected"
  // update: 'updateVisual'
};
function Uit(t) {
  t.registerAction(Zit, function(e, n) {
    n.eachComponent({
      mainType: "parallelAxis",
      query: e
    }, function(r) {
      r.axis.model.setActiveIntervals(e.intervals);
    });
  }), t.registerAction("parallelAxisExpand", function(e, n) {
    n.eachComponent({
      mainType: "parallel",
      query: e
    }, function(r) {
      r.setAxisExpand(e);
    });
  });
}
var Xit = {
  type: "value",
  areaSelectStyle: {
    width: 20,
    borderWidth: 1,
    borderColor: "rgba(160,197,232)",
    color: "rgba(160,197,232)",
    opacity: 0.3
  },
  realtime: !0,
  z: 10
};
function Cde(t) {
  t.registerComponentView(git), t.registerComponentModel(yit), t.registerCoordinateSystem("parallel", Tit), t.registerPreprocessor(dit), t.registerComponentModel(yL), t.registerComponentView(Qit), Zg(t, "parallel", yL, Xit), Uit(t);
}
function Yit(t) {
  Mt(Cde), t.registerChartView(iit), t.registerSeriesModel(sit), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, fit);
}
var qit = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
      this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.cpx2 = 0, this.cpy2 = 0, this.extent = 0;
    }
    return t;
  }()
), Kit = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      return t.call(this, n) || this;
    }
    return e.prototype.getDefaultShape = function() {
      return new qit();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.extent;
      n.moveTo(r.x1, r.y1), n.bezierCurveTo(r.cpx1, r.cpy1, r.cpx2, r.cpy2, r.x2, r.y2), r.orient === "vertical" ? (n.lineTo(r.x2 + i, r.y2), n.bezierCurveTo(r.cpx2 + i, r.cpy2, r.cpx1 + i, r.cpy1, r.x1 + i, r.y1)) : (n.lineTo(r.x2, r.y2 + i), n.bezierCurveTo(r.cpx2, r.cpy2 + i, r.cpx1, r.cpy1 + i, r.x1, r.y1 + i)), n.closePath();
    }, e.prototype.highlight = function() {
      Fu(this);
    }, e.prototype.downplay = function() {
      Wu(this);
    }, e;
  }(Dt)
), Jit = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._focusAdjacencyDisabled = !1, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = this, o = n.getGraph(), s = this.group, l = n.layoutInfo, u = l.width, c = l.height, f = n.getData(), d = n.getData("edge"), h = n.get("orient");
      this._model = n, s.removeAll(), s.x = l.x, s.y = l.y, o.eachEdge(function(p) {
        var v = new Kit(), g = ft(v);
        g.dataIndex = p.dataIndex, g.seriesIndex = n.seriesIndex, g.dataType = "edge";
        var m = p.getModel(), y = m.getModel("lineStyle"), _ = y.get("curveness"), O = p.node1.getLayout(), S = p.node1.getModel(), x = S.get("localX"), C = S.get("localY"), P = p.node2.getLayout(), $ = p.node2.getModel(), T = $.get("localX"), E = $.get("localY"), M = p.getLayout(), R, N, I, B, Q, W, H, U;
        v.shape.extent = Math.max(1, M.dy), v.shape.orient = h, h === "vertical" ? (R = (x != null ? x * u : O.x) + M.sy, N = (C != null ? C * c : O.y) + O.dy, I = (T != null ? T * u : P.x) + M.ty, B = E != null ? E * c : P.y, Q = R, W = N * (1 - _) + B * _, H = I, U = N * _ + B * (1 - _)) : (R = (x != null ? x * u : O.x) + O.dx, N = (C != null ? C * c : O.y) + M.sy, I = T != null ? T * u : P.x, B = (E != null ? E * c : P.y) + M.ty, Q = R * (1 - _) + I * _, W = N, H = R * _ + I * (1 - _), U = B), v.setShape({
          x1: R,
          y1: N,
          x2: I,
          y2: B,
          cpx1: Q,
          cpy1: W,
          cpx2: H,
          cpy2: U
        }), v.useStyle(y.getItemStyle()), XU(v.style, h, p);
        var j = "" + m.get("value"), Y = ei(m, "edgeLabel");
        Ei(v, Y, {
          labelFetcher: {
            getFormattedLabel: function(ue, ye, se, he, re, q) {
              return n.getFormattedLabel(
                ue,
                ye,
                "edge",
                he,
                // ensure edgeLabel formatter is provided
                // to prevent the inheritance from `label.formatter` of the series
                co(re, Y.normal && Y.normal.get("formatter"), j),
                q
              );
            }
          },
          labelDataIndex: p.dataIndex,
          defaultText: j
        }), v.setTextConfig({
          position: "inside"
        });
        var ne = m.getModel("emphasis");
        Ai(v, m, "lineStyle", function(ue) {
          var ye = ue.getItemStyle();
          return XU(ye, h, p), ye;
        }), s.add(v), d.setItemGraphicEl(p.dataIndex, v);
        var fe = ne.get("focus");
        ur(v, fe === "adjacency" ? p.getAdjacentDataIndices() : fe === "trajectory" ? p.getTrajectoryDataIndices() : fe, ne.get("blurScope"), ne.get("disabled"));
      }), o.eachNode(function(p) {
        var v = p.getLayout(), g = p.getModel(), m = g.get("localX"), y = g.get("localY"), _ = g.getModel("emphasis"), O = g.get(["itemStyle", "borderRadius"]) || 0, S = new Zt({
          shape: {
            x: m != null ? m * u : v.x,
            y: y != null ? y * c : v.y,
            width: v.dx,
            height: v.dy,
            r: O
          },
          style: g.getModel("itemStyle").getItemStyle(),
          z2: 10
        });
        Ei(S, ei(g), {
          labelFetcher: {
            getFormattedLabel: function(C, P) {
              return n.getFormattedLabel(C, P, "node");
            }
          },
          labelDataIndex: p.dataIndex,
          defaultText: p.id
        }), S.disableLabelAnimation = !0, S.setStyle("fill", p.getVisual("color")), S.setStyle("decal", p.getVisual("style").decal), Ai(S, g), s.add(S), f.setItemGraphicEl(p.dataIndex, S), ft(S).dataType = "node";
        var x = _.get("focus");
        ur(S, x === "adjacency" ? p.getAdjacentDataIndices() : x === "trajectory" ? p.getTrajectoryDataIndices() : x, _.get("blurScope"), _.get("disabled"));
      }), f.eachItemGraphicEl(function(p, v) {
        var g = f.getItemModel(v);
        g.get("draggable") && (p.drift = function(m, y) {
          a._focusAdjacencyDisabled = !0, this.shape.x += m, this.shape.y += y, this.dirty(), i.dispatchAction({
            type: "dragNode",
            seriesId: n.id,
            dataIndex: f.getRawIndex(v),
            localX: this.shape.x / u,
            localY: this.shape.y / c
          });
        }, p.ondragend = function() {
          a._focusAdjacencyDisabled = !1;
        }, p.draggable = !0, p.cursor = "move");
      }), !this._data && n.isAnimationEnabled() && s.setClipPath(eat(s.getBoundingRect(), n, function() {
        s.removeClipPath();
      })), this._data = n.getData();
    }, e.prototype.dispose = function() {
    }, e.type = "sankey", e;
  }(_n)
);
function XU(t, e, n) {
  switch (t.fill) {
    case "source":
      t.fill = n.node1.getVisual("color"), t.decal = n.node1.getVisual("style").decal;
      break;
    case "target":
      t.fill = n.node2.getVisual("color"), t.decal = n.node2.getVisual("style").decal;
      break;
    case "gradient":
      var r = n.node1.getVisual("color"), i = n.node2.getVisual("color");
      Ve(r) && Ve(i) && (t.fill = new _m(0, 0, +(e === "horizontal"), +(e === "vertical"), [{
        color: r,
        offset: 0
      }, {
        color: i,
        offset: 1
      }]));
  }
}
function eat(t, e, n) {
  var r = new Zt({
    shape: {
      x: t.x - 10,
      y: t.y - 10,
      width: 0,
      height: t.height + 20
    }
  });
  return Vn(r, {
    shape: {
      width: t.width + 20
    }
  }, e, n), r;
}
var tat = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.getInitialData = function(n, r) {
      var i = n.edges || n.links, a = n.data || n.nodes, o = n.levels;
      this.levelModels = [];
      for (var s = this.levelModels, l = 0; l < o.length; l++)
        if (o[l].depth != null && o[l].depth >= 0)
          s[o[l].depth] = new xn(o[l], this, r);
        else if (process.env.NODE_ENV !== "production")
          throw new Error("levels[i].depth is mandatory and should be natural number");
      if (a && i) {
        var u = sde(a, i, this, !0, c);
        return u.data;
      }
      function c(f, d) {
        f.wrapMethod("getItemModel", function(h, p) {
          var v = h.parentModel, g = v.getData().getItemLayout(p);
          if (g) {
            var m = g.depth, y = v.levelModels[m];
            y && (h.parentModel = y);
          }
          return h;
        }), d.wrapMethod("getItemModel", function(h, p) {
          var v = h.parentModel, g = v.getGraph().getEdgeByIndex(p), m = g.node1.getLayout();
          if (m) {
            var y = m.depth, _ = v.levelModels[y];
            _ && (h.parentModel = _);
          }
          return h;
        });
      }
    }, e.prototype.setNodePosition = function(n, r) {
      var i = this.option.data || this.option.nodes, a = i[n];
      a.localX = r[0], a.localY = r[1];
    }, e.prototype.getGraph = function() {
      return this.getData().graph;
    }, e.prototype.getEdgeData = function() {
      return this.getGraph().edgeData;
    }, e.prototype.formatTooltip = function(n, r, i) {
      function a(h) {
        return isNaN(h) || h == null;
      }
      if (i === "edge") {
        var o = this.getDataParams(n, i), s = o.data, l = o.value, u = s.source + " -- " + s.target;
        return ti("nameValue", {
          name: u,
          value: l,
          noValue: a(l)
        });
      } else {
        var c = this.getGraph().getNodeByIndex(n), f = c.getLayout().value, d = this.getDataParams(n, i).data.name;
        return ti("nameValue", {
          name: d != null ? d + "" : null,
          value: f,
          noValue: a(f)
        });
      }
    }, e.prototype.optionUpdated = function() {
    }, e.prototype.getDataParams = function(n, r) {
      var i = t.prototype.getDataParams.call(this, n, r);
      if (i.value == null && r === "node") {
        var a = this.getGraph().getNodeByIndex(n), o = a.getLayout().value;
        i.value = o;
      }
      return i;
    }, e.type = "series.sankey", e.defaultOption = {
      // zlevel: 0,
      z: 2,
      coordinateSystem: "view",
      left: "5%",
      top: "5%",
      right: "20%",
      bottom: "5%",
      orient: "horizontal",
      nodeWidth: 20,
      nodeGap: 8,
      draggable: !0,
      layoutIterations: 32,
      label: {
        show: !0,
        position: "right",
        fontSize: 12
      },
      edgeLabel: {
        show: !1,
        fontSize: 12
      },
      levels: [],
      nodeAlign: "justify",
      lineStyle: {
        color: "#314656",
        opacity: 0.2,
        curveness: 0.5
      },
      emphasis: {
        label: {
          show: !0
        },
        lineStyle: {
          opacity: 0.5
        }
      },
      select: {
        itemStyle: {
          borderColor: "#212121"
        }
      },
      animationEasing: "linear",
      animationDuration: 1e3
    }, e;
  }(Cn)
);
function nat(t, e) {
  t.eachSeriesByType("sankey", function(n) {
    var r = n.get("nodeWidth"), i = n.get("nodeGap"), a = rat(n, e);
    n.layoutInfo = a;
    var o = a.width, s = a.height, l = n.getGraph(), u = l.nodes, c = l.edges;
    aat(u);
    var f = yn(u, function(v) {
      return v.getLayout().value === 0;
    }), d = f.length !== 0 ? 0 : n.get("layoutIterations"), h = n.get("orient"), p = n.get("nodeAlign");
    iat(u, c, r, i, o, s, d, h, p);
  });
}
function rat(t, e) {
  return Mr(t.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function iat(t, e, n, r, i, a, o, s, l) {
  oat(t, e, n, i, a, s, l), cat(t, e, a, i, r, o, s), bat(t, s);
}
function aat(t) {
  F(t, function(e) {
    var n = lf(e.outEdges, sT), r = lf(e.inEdges, sT), i = e.getValue() || 0, a = Math.max(n, r, i);
    e.setLayout({
      value: a
    }, !0);
  });
}
function oat(t, e, n, r, i, a, o) {
  for (var s = [], l = [], u = [], c = [], f = 0, d = 0; d < e.length; d++)
    s[d] = 1;
  for (var d = 0; d < t.length; d++)
    l[d] = t[d].inEdges.length, l[d] === 0 && u.push(t[d]);
  for (var h = -1; u.length; ) {
    for (var p = 0; p < u.length; p++) {
      var v = u[p], g = v.hostGraph.data.getRawDataItem(v.dataIndex), m = g.depth != null && g.depth >= 0;
      m && g.depth > h && (h = g.depth), v.setLayout({
        depth: m ? g.depth : f
      }, !0), a === "vertical" ? v.setLayout({
        dy: n
      }, !0) : v.setLayout({
        dx: n
      }, !0);
      for (var y = 0; y < v.outEdges.length; y++) {
        var _ = v.outEdges[y], O = e.indexOf(_);
        s[O] = 0;
        var S = _.node2, x = t.indexOf(S);
        --l[x] === 0 && c.indexOf(S) < 0 && c.push(S);
      }
    }
    ++f, u = c, c = [];
  }
  for (var d = 0; d < s.length; d++)
    if (s[d] === 1)
      throw new Error("Sankey is a DAG, the original data has cycle!");
  var C = h > f - 1 ? h : f - 1;
  o && o !== "left" && sat(t, o, a, C);
  var P = a === "vertical" ? (i - n) / C : (r - n) / C;
  uat(t, P, a);
}
function Tde(t) {
  var e = t.hostGraph.data.getRawDataItem(t.dataIndex);
  return e.depth != null && e.depth >= 0;
}
function sat(t, e, n, r) {
  if (e === "right") {
    for (var i = [], a = t, o = 0; a.length; ) {
      for (var s = 0; s < a.length; s++) {
        var l = a[s];
        l.setLayout({
          skNodeHeight: o
        }, !0);
        for (var u = 0; u < l.inEdges.length; u++) {
          var c = l.inEdges[u];
          i.indexOf(c.node1) < 0 && i.push(c.node1);
        }
      }
      a = i, i = [], ++o;
    }
    F(t, function(f) {
      Tde(f) || f.setLayout({
        depth: Math.max(0, r - f.getLayout().skNodeHeight)
      }, !0);
    });
  } else e === "justify" && lat(t, r);
}
function lat(t, e) {
  F(t, function(n) {
    !Tde(n) && !n.outEdges.length && n.setLayout({
      depth: e
    }, !0);
  });
}
function uat(t, e, n) {
  F(t, function(r) {
    var i = r.getLayout().depth * e;
    n === "vertical" ? r.setLayout({
      y: i
    }, !0) : r.setLayout({
      x: i
    }, !0);
  });
}
function cat(t, e, n, r, i, a, o) {
  var s = fat(t, o);
  dat(s, e, n, r, i, o), bI(s, i, n, r, o);
  for (var l = 1; a > 0; a--)
    l *= 0.99, hat(s, l, o), bI(s, i, n, r, o), yat(s, l, o), bI(s, i, n, r, o);
}
function fat(t, e) {
  var n = [], r = e === "vertical" ? "y" : "x", i = xk(t, function(a) {
    return a.getLayout()[r];
  });
  return i.keys.sort(function(a, o) {
    return a - o;
  }), F(i.keys, function(a) {
    n.push(i.buckets.get(a));
  }), n;
}
function dat(t, e, n, r, i, a) {
  var o = 1 / 0;
  F(t, function(s) {
    var l = s.length, u = 0;
    F(s, function(f) {
      u += f.getLayout().value;
    });
    var c = a === "vertical" ? (r - (l - 1) * i) / u : (n - (l - 1) * i) / u;
    c < o && (o = c);
  }), F(t, function(s) {
    F(s, function(l, u) {
      var c = l.getLayout().value * o;
      a === "vertical" ? (l.setLayout({
        x: u
      }, !0), l.setLayout({
        dx: c
      }, !0)) : (l.setLayout({
        y: u
      }, !0), l.setLayout({
        dy: c
      }, !0));
    });
  }), F(e, function(s) {
    var l = +s.getValue() * o;
    s.setLayout({
      dy: l
    }, !0);
  });
}
function bI(t, e, n, r, i) {
  var a = i === "vertical" ? "x" : "y";
  F(t, function(o) {
    o.sort(function(v, g) {
      return v.getLayout()[a] - g.getLayout()[a];
    });
    for (var s, l, u, c = 0, f = o.length, d = i === "vertical" ? "dx" : "dy", h = 0; h < f; h++)
      l = o[h], u = c - l.getLayout()[a], u > 0 && (s = l.getLayout()[a] + u, i === "vertical" ? l.setLayout({
        x: s
      }, !0) : l.setLayout({
        y: s
      }, !0)), c = l.getLayout()[a] + l.getLayout()[d] + e;
    var p = i === "vertical" ? r : n;
    if (u = c - e - p, u > 0) {
      s = l.getLayout()[a] - u, i === "vertical" ? l.setLayout({
        x: s
      }, !0) : l.setLayout({
        y: s
      }, !0), c = s;
      for (var h = f - 2; h >= 0; --h)
        l = o[h], u = l.getLayout()[a] + l.getLayout()[d] + e - c, u > 0 && (s = l.getLayout()[a] - u, i === "vertical" ? l.setLayout({
          x: s
        }, !0) : l.setLayout({
          y: s
        }, !0)), c = l.getLayout()[a];
    }
  });
}
function hat(t, e, n) {
  F(t.slice().reverse(), function(r) {
    F(r, function(i) {
      if (i.outEdges.length) {
        var a = lf(i.outEdges, pat, n) / lf(i.outEdges, sT);
        if (isNaN(a)) {
          var o = i.outEdges.length;
          a = o ? lf(i.outEdges, vat, n) / o : 0;
        }
        if (n === "vertical") {
          var s = i.getLayout().x + (a - Sf(i, n)) * e;
          i.setLayout({
            x: s
          }, !0);
        } else {
          var l = i.getLayout().y + (a - Sf(i, n)) * e;
          i.setLayout({
            y: l
          }, !0);
        }
      }
    });
  });
}
function pat(t, e) {
  return Sf(t.node2, e) * t.getValue();
}
function vat(t, e) {
  return Sf(t.node2, e);
}
function gat(t, e) {
  return Sf(t.node1, e) * t.getValue();
}
function mat(t, e) {
  return Sf(t.node1, e);
}
function Sf(t, e) {
  return e === "vertical" ? t.getLayout().x + t.getLayout().dx / 2 : t.getLayout().y + t.getLayout().dy / 2;
}
function sT(t) {
  return t.getValue();
}
function lf(t, e, n) {
  for (var r = 0, i = t.length, a = -1; ++a < i; ) {
    var o = +e(t[a], n);
    isNaN(o) || (r += o);
  }
  return r;
}
function yat(t, e, n) {
  F(t, function(r) {
    F(r, function(i) {
      if (i.inEdges.length) {
        var a = lf(i.inEdges, gat, n) / lf(i.inEdges, sT);
        if (isNaN(a)) {
          var o = i.inEdges.length;
          a = o ? lf(i.inEdges, mat, n) / o : 0;
        }
        if (n === "vertical") {
          var s = i.getLayout().x + (a - Sf(i, n)) * e;
          i.setLayout({
            x: s
          }, !0);
        } else {
          var l = i.getLayout().y + (a - Sf(i, n)) * e;
          i.setLayout({
            y: l
          }, !0);
        }
      }
    });
  });
}
function bat(t, e) {
  var n = e === "vertical" ? "x" : "y";
  F(t, function(r) {
    r.outEdges.sort(function(i, a) {
      return i.node2.getLayout()[n] - a.node2.getLayout()[n];
    }), r.inEdges.sort(function(i, a) {
      return i.node1.getLayout()[n] - a.node1.getLayout()[n];
    });
  }), F(t, function(r) {
    var i = 0, a = 0;
    F(r.outEdges, function(o) {
      o.setLayout({
        sy: i
      }, !0), i += o.getLayout().dy;
    }), F(r.inEdges, function(o) {
      o.setLayout({
        ty: a
      }, !0), a += o.getLayout().dy;
    });
  });
}
function _at(t) {
  t.eachSeriesByType("sankey", function(e) {
    var n = e.getGraph(), r = n.nodes, i = n.edges;
    if (r.length) {
      var a = 1 / 0, o = -1 / 0;
      F(r, function(s) {
        var l = s.getLayout().value;
        l < a && (a = l), l > o && (o = l);
      }), F(r, function(s) {
        var l = new Kr({
          type: "color",
          mappingMethod: "linear",
          dataExtent: [a, o],
          visual: e.get("color")
        }), u = l.mapValueToVisual(s.getLayout().value), c = s.getModel().get(["itemStyle", "color"]);
        c != null ? (s.setVisual("color", c), s.setVisual("style", {
          fill: c
        })) : (s.setVisual("color", u), s.setVisual("style", {
          fill: u
        }));
      });
    }
    i.length && F(i, function(s) {
      var l = s.getModel().get("lineStyle");
      s.setVisual("style", l);
    });
  });
}
function Oat(t) {
  t.registerChartView(Jit), t.registerSeriesModel(tat), t.registerLayout(nat), t.registerVisual(_at), t.registerAction({
    type: "dragNode",
    event: "dragnode",
    // here can only use 'update' now, other value is not support in echarts.
    update: "update"
  }, function(e, n) {
    n.eachComponent({
      mainType: "series",
      subType: "sankey",
      query: e
    }, function(r) {
      r.setNodePosition(e.dataIndex, [e.localX, e.localY]);
    });
  });
}
var Pde = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getInitialData = function(e, n) {
      var r, i = n.getComponent("xAxis", this.get("xAxisIndex")), a = n.getComponent("yAxis", this.get("yAxisIndex")), o = i.get("type"), s = a.get("type"), l;
      o === "category" ? (e.layout = "horizontal", r = i.getOrdinalMeta(), l = !0) : s === "category" ? (e.layout = "vertical", r = a.getOrdinalMeta(), l = !0) : e.layout = e.layout || "horizontal";
      var u = ["x", "y"], c = e.layout === "horizontal" ? 0 : 1, f = this._baseAxisDim = u[c], d = u[1 - c], h = [i, a], p = h[c].get("type"), v = h[1 - c].get("type"), g = e.data;
      if (g && l) {
        var m = [];
        F(g, function(O, S) {
          var x;
          Se(O) ? (x = O.slice(), O.unshift(S)) : Se(O.value) ? (x = _e({}, O), x.value = x.value.slice(), O.value.unshift(S)) : x = O, m.push(x);
        }), e.data = m;
      }
      var y = this.defaultValueDimensions, _ = [{
        name: f,
        type: YC(p),
        ordinalMeta: r,
        otherDims: {
          tooltip: !1,
          itemName: 0
        },
        dimsDef: ["base"]
      }, {
        name: d,
        type: YC(v),
        dimsDef: y.slice()
      }];
      return Rm(this, {
        coordDimensions: _,
        dimensionsCount: y.length + 1,
        encodeDefaulter: vt(tue, _, this)
      });
    }, t.prototype.getBaseAxis = function() {
      var e = this._baseAxisDim;
      return this.ecModel.getComponent(e + "Axis", this.get(e + "AxisIndex")).axis;
    }, t;
  }()
), $de = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.defaultValueDimensions = [{
        name: "min",
        defaultTooltip: !0
      }, {
        name: "Q1",
        defaultTooltip: !0
      }, {
        name: "median",
        defaultTooltip: !0
      }, {
        name: "Q3",
        defaultTooltip: !0
      }, {
        name: "max",
        defaultTooltip: !0
      }], n.visualDrawType = "stroke", n;
    }
    return e.type = "series.boxplot", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
      // zlevel: 0,
      z: 2,
      coordinateSystem: "cartesian2d",
      legendHoverLink: !0,
      layout: null,
      boxWidth: [7, 50],
      itemStyle: {
        color: "#fff",
        borderWidth: 1
      },
      emphasis: {
        scale: !0,
        itemStyle: {
          borderWidth: 2,
          shadowBlur: 5,
          shadowOffsetX: 1,
          shadowOffsetY: 1,
          shadowColor: "rgba(0,0,0,0.2)"
        }
      },
      animationDuration: 800
    }, e;
  }(Cn)
);
vr($de, Pde, !0);
var Sat = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = n.getData(), o = this.group, s = this._data;
      this._data || o.removeAll();
      var l = n.get("layout") === "horizontal" ? 1 : 0;
      a.diff(s).add(function(u) {
        if (a.hasValue(u)) {
          var c = a.getItemLayout(u), f = YU(c, a, u, l, !0);
          a.setItemGraphicEl(u, f), o.add(f);
        }
      }).update(function(u, c) {
        var f = s.getItemGraphicEl(c);
        if (!a.hasValue(u)) {
          o.remove(f);
          return;
        }
        var d = a.getItemLayout(u);
        f ? (Zs(f), Ade(d, f, a, u)) : f = YU(d, a, u, l), o.add(f), a.setItemGraphicEl(u, f);
      }).remove(function(u) {
        var c = s.getItemGraphicEl(u);
        c && o.remove(c);
      }).execute(), this._data = a;
    }, e.prototype.remove = function(n) {
      var r = this.group, i = this._data;
      this._data = null, i && i.eachItemGraphicEl(function(a) {
        a && r.remove(a);
      });
    }, e.type = "boxplot", e;
  }(_n)
), xat = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
    }
    return t;
  }()
), wat = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "boxplotBoxPath", r;
    }
    return e.prototype.getDefaultShape = function() {
      return new xat();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.points, a = 0;
      for (n.moveTo(i[a][0], i[a][1]), a++; a < 4; a++)
        n.lineTo(i[a][0], i[a][1]);
      for (n.closePath(); a < i.length; a++)
        n.moveTo(i[a][0], i[a][1]), a++, n.lineTo(i[a][0], i[a][1]);
    }, e;
  }(Dt)
);
function YU(t, e, n, r, i) {
  var a = t.ends, o = new wat({
    shape: {
      points: i ? Cat(a, r, t) : a
    }
  });
  return Ade(t, o, e, n, i), o;
}
function Ade(t, e, n, r, i) {
  var a = n.hostModel, o = hp[i ? "initProps" : "updateProps"];
  o(e, {
    shape: {
      points: t.ends
    }
  }, a, r), e.useStyle(n.getItemVisual(r, "style")), e.style.strokeNoScale = !0, e.z2 = 100;
  var s = n.getItemModel(r), l = s.getModel("emphasis");
  Ai(e, s), ur(e, l.get("focus"), l.get("blurScope"), l.get("disabled"));
}
function Cat(t, e, n) {
  return Ce(t, function(r) {
    return r = r.slice(), r[e] = n.initBaseline, r;
  });
}
var ub = F;
function Tat(t) {
  var e = Pat(t);
  ub(e, function(n) {
    var r = n.seriesModels;
    r.length && ($at(n), ub(r, function(i, a) {
      Aat(i, n.boxOffsetList[a], n.boxWidthList[a]);
    }));
  });
}
function Pat(t) {
  var e = [], n = [];
  return t.eachSeriesByType("boxplot", function(r) {
    var i = r.getBaseAxis(), a = St(n, i);
    a < 0 && (a = n.length, n[a] = i, e[a] = {
      axis: i,
      seriesModels: []
    }), e[a].seriesModels.push(r);
  }), e;
}
function $at(t) {
  var e = t.axis, n = t.seriesModels, r = n.length, i = t.boxWidthList = [], a = t.boxOffsetList = [], o = [], s;
  if (e.type === "category")
    s = e.getBandWidth();
  else {
    var l = 0;
    ub(n, function(p) {
      l = Math.max(l, p.getData().count());
    });
    var u = e.getExtent();
    s = Math.abs(u[1] - u[0]) / l;
  }
  ub(n, function(p) {
    var v = p.get("boxWidth");
    Se(v) || (v = [v, v]), o.push([ze(v[0], s) || 0, ze(v[1], s) || 0]);
  });
  var c = s * 0.8 - 2, f = c / r * 0.3, d = (c - f * (r - 1)) / r, h = d / 2 - c / 2;
  ub(n, function(p, v) {
    a.push(h), h += f + d, i.push(Math.min(Math.max(d, o[v][0]), o[v][1]));
  });
}
function Aat(t, e, n) {
  var r = t.coordinateSystem, i = t.getData(), a = n / 2, o = t.get("layout") === "horizontal" ? 0 : 1, s = 1 - o, l = ["x", "y"], u = i.mapDimension(l[o]), c = i.mapDimensionsAll(l[s]);
  if (u == null || c.length < 5)
    return;
  for (var f = 0; f < i.count(); f++) {
    var d = i.get(u, f), h = _(d, c[2], f), p = _(d, c[0], f), v = _(d, c[1], f), g = _(d, c[3], f), m = _(d, c[4], f), y = [];
    O(y, v, !1), O(y, g, !0), y.push(p, v, m, g), S(y, p), S(y, m), S(y, h), i.setItemLayout(f, {
      initBaseline: h[s],
      ends: y
    });
  }
  function _(x, C, P) {
    var $ = i.get(C, P), T = [];
    T[o] = x, T[s] = $;
    var E;
    return isNaN(x) || isNaN($) ? E = [NaN, NaN] : (E = r.dataToPoint(T), E[o] += e), E;
  }
  function O(x, C, P) {
    var $ = C.slice(), T = C.slice();
    $[o] += a, T[o] -= a, P ? x.push($, T) : x.push(T, $);
  }
  function S(x, C) {
    var P = C.slice(), $ = C.slice();
    P[o] -= a, $[o] += a, x.push(P, $);
  }
}
function Eat(t, e) {
  e = e || {};
  for (var n = [], r = [], i = e.boundIQR, a = i === "none" || i === 0, o = 0; o < t.length; o++) {
    var s = ao(t[o].slice()), l = uw(s, 0.25), u = uw(s, 0.5), c = uw(s, 0.75), f = s[0], d = s[s.length - 1], h = (i ?? 1.5) * (c - l), p = a ? f : Math.max(f, l - h), v = a ? d : Math.min(d, c + h), g = e.itemNameFormatter, m = qe(g) ? g({
      value: o
    }) : Ve(g) ? g.replace("{value}", o + "") : o + "";
    n.push([m, p, l, u, c, v]);
    for (var y = 0; y < s.length; y++) {
      var _ = s[y];
      if (_ < p || _ > v) {
        var O = [m, _];
        r.push(O);
      }
    }
  }
  return {
    boxData: n,
    outliers: r
  };
}
var Mat = {
  type: "echarts:boxplot",
  transform: function(e) {
    var n = e.upstream;
    if (n.sourceFormat !== Qi) {
      var r = "";
      process.env.NODE_ENV !== "production" && (r = fa("source data is not applicable for this boxplot transform. Expect number[][].")), cn(r);
    }
    var i = Eat(n.getRawData(), e.config);
    return [{
      dimensions: ["ItemName", "Low", "Q1", "Q2", "Q3", "High"],
      data: i.boxData
    }, {
      data: i.outliers
    }];
  }
};
function Iat(t) {
  t.registerSeriesModel($de), t.registerChartView(Sat), t.registerLayout(Tat), t.registerTransform(Mat);
}
var Dat = ["color", "borderColor"], Rat = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      this.group.removeClipPath(), this._progressiveEls = null, this._updateDrawMode(n), this._isLargeDraw ? this._renderLarge(n) : this._renderNormal(n);
    }, e.prototype.incrementalPrepareRender = function(n, r, i) {
      this._clear(), this._updateDrawMode(n);
    }, e.prototype.incrementalRender = function(n, r, i, a) {
      this._progressiveEls = [], this._isLargeDraw ? this._incrementalRenderLarge(n, r) : this._incrementalRenderNormal(n, r);
    }, e.prototype.eachRendered = function(n) {
      Nf(this._progressiveEls || this.group, n);
    }, e.prototype._updateDrawMode = function(n) {
      var r = n.pipelineContext.large;
      (this._isLargeDraw == null || r !== this._isLargeDraw) && (this._isLargeDraw = r, this._clear());
    }, e.prototype._renderNormal = function(n) {
      var r = n.getData(), i = this._data, a = this.group, o = r.getLayout("isSimpleBox"), s = n.get("clip", !0), l = n.coordinateSystem, u = l.getArea && l.getArea();
      this._data || a.removeAll(), r.diff(i).add(function(c) {
        if (r.hasValue(c)) {
          var f = r.getItemLayout(c);
          if (s && qU(u, f))
            return;
          var d = _I(f, c, !0);
          Vn(d, {
            shape: {
              points: f.ends
            }
          }, n, c), OI(d, r, c, o), a.add(d), r.setItemGraphicEl(c, d);
        }
      }).update(function(c, f) {
        var d = i.getItemGraphicEl(f);
        if (!r.hasValue(c)) {
          a.remove(d);
          return;
        }
        var h = r.getItemLayout(c);
        if (s && qU(u, h)) {
          a.remove(d);
          return;
        }
        d ? (tn(d, {
          shape: {
            points: h.ends
          }
        }, n, c), Zs(d)) : d = _I(h), OI(d, r, c, o), a.add(d), r.setItemGraphicEl(c, d);
      }).remove(function(c) {
        var f = i.getItemGraphicEl(c);
        f && a.remove(f);
      }).execute(), this._data = r;
    }, e.prototype._renderLarge = function(n) {
      this._clear(), KU(n, this.group);
      var r = n.get("clip", !0) ? b1(n.coordinateSystem, !1, n) : null;
      r ? this.group.setClipPath(r) : this.group.removeClipPath();
    }, e.prototype._incrementalRenderNormal = function(n, r) {
      for (var i = r.getData(), a = i.getLayout("isSimpleBox"), o; (o = n.next()) != null; ) {
        var s = i.getItemLayout(o), l = _I(s);
        OI(l, i, o, a), l.incremental = !0, this.group.add(l), this._progressiveEls.push(l);
      }
    }, e.prototype._incrementalRenderLarge = function(n, r) {
      KU(r, this.group, this._progressiveEls, !0);
    }, e.prototype.remove = function(n) {
      this._clear();
    }, e.prototype._clear = function() {
      this.group.removeAll(), this._data = null;
    }, e.type = "candlestick", e;
  }(_n)
), kat = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
    }
    return t;
  }()
), Lat = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "normalCandlestickBox", r;
    }
    return e.prototype.getDefaultShape = function() {
      return new kat();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.points;
      this.__simpleBox ? (n.moveTo(i[4][0], i[4][1]), n.lineTo(i[6][0], i[6][1])) : (n.moveTo(i[0][0], i[0][1]), n.lineTo(i[1][0], i[1][1]), n.lineTo(i[2][0], i[2][1]), n.lineTo(i[3][0], i[3][1]), n.closePath(), n.moveTo(i[4][0], i[4][1]), n.lineTo(i[5][0], i[5][1]), n.moveTo(i[6][0], i[6][1]), n.lineTo(i[7][0], i[7][1]));
    }, e;
  }(Dt)
);
function _I(t, e, n) {
  var r = t.ends;
  return new Lat({
    shape: {
      points: n ? Nat(r, t) : r
    },
    z2: 100
  });
}
function qU(t, e) {
  for (var n = !0, r = 0; r < e.ends.length; r++)
    if (t.contain(e.ends[r][0], e.ends[r][1])) {
      n = !1;
      break;
    }
  return n;
}
function OI(t, e, n, r) {
  var i = e.getItemModel(n);
  t.useStyle(e.getItemVisual(n, "style")), t.style.strokeNoScale = !0, t.__simpleBox = r, Ai(t, i);
}
function Nat(t, e) {
  return Ce(t, function(n) {
    return n = n.slice(), n[1] = e.initBaseline, n;
  });
}
var Bat = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
    }
    return t;
  }()
), SI = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "largeCandlestickBox", r;
    }
    return e.prototype.getDefaultShape = function() {
      return new Bat();
    }, e.prototype.buildPath = function(n, r) {
      for (var i = r.points, a = 0; a < i.length; )
        if (this.__sign === i[a++]) {
          var o = i[a++];
          n.moveTo(o, i[a++]), n.lineTo(o, i[a++]);
        } else
          a += 3;
    }, e;
  }(Dt)
);
function KU(t, e, n, r) {
  var i = t.getData(), a = i.getLayout("largePoints"), o = new SI({
    shape: {
      points: a
    },
    __sign: 1,
    ignoreCoarsePointer: !0
  });
  e.add(o);
  var s = new SI({
    shape: {
      points: a
    },
    __sign: -1,
    ignoreCoarsePointer: !0
  });
  e.add(s);
  var l = new SI({
    shape: {
      points: a
    },
    __sign: 0,
    ignoreCoarsePointer: !0
  });
  e.add(l), xI(1, o, t), xI(-1, s, t), xI(0, l, t), r && (o.incremental = !0, s.incremental = !0), n && n.push(o, s);
}
function xI(t, e, n, r) {
  var i = n.get(["itemStyle", t > 0 ? "borderColor" : "borderColor0"]) || n.get(["itemStyle", t > 0 ? "color" : "color0"]);
  t === 0 && (i = n.get(["itemStyle", "borderColorDoji"]));
  var a = n.getModel("itemStyle").getItemStyle(Dat);
  e.useStyle(a), e.style.fill = null, e.style.stroke = i;
}
var Ede = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.defaultValueDimensions = [{
        name: "open",
        defaultTooltip: !0
      }, {
        name: "close",
        defaultTooltip: !0
      }, {
        name: "lowest",
        defaultTooltip: !0
      }, {
        name: "highest",
        defaultTooltip: !0
      }], n;
    }
    return e.prototype.getShadowDim = function() {
      return "open";
    }, e.prototype.brushSelector = function(n, r, i) {
      var a = r.getItemLayout(n);
      return a && i.rect(a.brushRect);
    }, e.type = "series.candlestick", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
      // zlevel: 0,
      z: 2,
      coordinateSystem: "cartesian2d",
      legendHoverLink: !0,
      // xAxisIndex: 0,
      // yAxisIndex: 0,
      layout: null,
      clip: !0,
      itemStyle: {
        color: "#eb5454",
        color0: "#47b262",
        borderColor: "#eb5454",
        borderColor0: "#47b262",
        borderColorDoji: null,
        // borderColor: '#d24040',
        // borderColor0: '#398f4f',
        borderWidth: 1
      },
      emphasis: {
        scale: !0,
        itemStyle: {
          borderWidth: 2
        }
      },
      barMaxWidth: null,
      barMinWidth: null,
      barWidth: null,
      large: !0,
      largeThreshold: 600,
      progressive: 3e3,
      progressiveThreshold: 1e4,
      progressiveChunkMode: "mod",
      animationEasing: "linear",
      animationDuration: 300
    }, e;
  }(Cn)
);
vr(Ede, Pde, !0);
function zat(t) {
  !t || !Se(t.series) || F(t.series, function(e) {
    nt(e) && e.type === "k" && (e.type = "candlestick");
  });
}
var Vat = ["itemStyle", "borderColor"], Fat = ["itemStyle", "borderColor0"], Wat = ["itemStyle", "borderColorDoji"], Qat = ["itemStyle", "color"], Hat = ["itemStyle", "color0"], Gat = {
  seriesType: "candlestick",
  plan: $m(),
  // For legend.
  performRawSeries: !0,
  reset: function(t, e) {
    function n(a, o) {
      return o.get(a > 0 ? Qat : Hat);
    }
    function r(a, o) {
      return o.get(a === 0 ? Wat : a > 0 ? Vat : Fat);
    }
    if (!e.isSeriesFiltered(t)) {
      var i = t.pipelineContext.large;
      return !i && {
        progress: function(a, o) {
          for (var s; (s = a.next()) != null; ) {
            var l = o.getItemModel(s), u = o.getItemLayout(s).sign, c = l.getItemStyle();
            c.fill = n(u, l), c.stroke = r(u, l) || c.fill;
            var f = o.ensureUniqueItemVisual(s, "style");
            _e(f, c);
          }
        }
      };
    }
  }
}, jat = {
  seriesType: "candlestick",
  plan: $m(),
  reset: function(t) {
    var e = t.coordinateSystem, n = t.getData(), r = Zat(t, n), i = 0, a = 1, o = ["x", "y"], s = n.getDimensionIndex(n.mapDimension(o[i])), l = Ce(n.mapDimensionsAll(o[a]), n.getDimensionIndex, n), u = l[0], c = l[1], f = l[2], d = l[3];
    if (n.setLayout({
      candleWidth: r,
      // The value is experimented visually.
      isSimpleBox: r <= 1.3
    }), s < 0 || l.length < 4)
      return;
    return {
      progress: t.pipelineContext.large ? p : h
    };
    function h(v, g) {
      for (var m, y = g.getStore(); (m = v.next()) != null; ) {
        var _ = y.get(s, m), O = y.get(u, m), S = y.get(c, m), x = y.get(f, m), C = y.get(d, m), P = Math.min(O, S), $ = Math.max(O, S), T = Q(P, _), E = Q($, _), M = Q(x, _), R = Q(C, _), N = [];
        W(N, E, 0), W(N, T, 1), N.push(U(R), U(E), U(M), U(T));
        var I = g.getItemModel(m), B = !!I.get(["itemStyle", "borderColorDoji"]);
        g.setItemLayout(m, {
          sign: JU(y, m, O, S, c, B),
          initBaseline: O > S ? E[a] : T[a],
          ends: N,
          brushRect: H(x, C, _)
        });
      }
      function Q(j, Y) {
        var ne = [];
        return ne[i] = Y, ne[a] = j, isNaN(Y) || isNaN(j) ? [NaN, NaN] : e.dataToPoint(ne);
      }
      function W(j, Y, ne) {
        var fe = Y.slice(), ue = Y.slice();
        fe[i] = dw(fe[i] + r / 2, 1, !1), ue[i] = dw(ue[i] - r / 2, 1, !0), ne ? j.push(fe, ue) : j.push(ue, fe);
      }
      function H(j, Y, ne) {
        var fe = Q(j, ne), ue = Q(Y, ne);
        return fe[i] -= r / 2, ue[i] -= r / 2, {
          x: fe[0],
          y: fe[1],
          width: r,
          height: ue[1] - fe[1]
        };
      }
      function U(j) {
        return j[i] = dw(j[i], 1), j;
      }
    }
    function p(v, g) {
      for (var m = Al(v.count * 4), y = 0, _, O = [], S = [], x, C = g.getStore(), P = !!t.get(["itemStyle", "borderColorDoji"]); (x = v.next()) != null; ) {
        var $ = C.get(s, x), T = C.get(u, x), E = C.get(c, x), M = C.get(f, x), R = C.get(d, x);
        if (isNaN($) || isNaN(M) || isNaN(R)) {
          m[y++] = NaN, y += 3;
          continue;
        }
        m[y++] = JU(C, x, T, E, c, P), O[i] = $, O[a] = M, _ = e.dataToPoint(O, null, S), m[y++] = _ ? _[0] : NaN, m[y++] = _ ? _[1] : NaN, O[a] = R, _ = e.dataToPoint(O, null, S), m[y++] = _ ? _[1] : NaN;
      }
      g.setLayout("largePoints", m);
    }
  }
};
function JU(t, e, n, r, i, a) {
  var o;
  return n > r ? o = -1 : n < r ? o = 1 : o = a ? 0 : e > 0 ? t.get(i, e - 1) <= r ? 1 : -1 : 1, o;
}
function Zat(t, e) {
  var n = t.getBaseAxis(), r, i = n.type === "category" ? n.getBandWidth() : (r = n.getExtent(), Math.abs(r[1] - r[0]) / e.count()), a = ze(dt(t.get("barMaxWidth"), i), i), o = ze(dt(t.get("barMinWidth"), 1), i), s = t.get("barWidth");
  return s != null ? ze(s, i) : Math.max(Math.min(i / 2, a), o);
}
function Uat(t) {
  t.registerChartView(Rat), t.registerSeriesModel(Ede), t.registerPreprocessor(zat), t.registerVisual(Gat), t.registerLayout(jat);
}
function eX(t, e) {
  var n = e.rippleEffectColor || e.color;
  t.eachChild(function(r) {
    r.attr({
      z: e.z,
      zlevel: e.zlevel,
      style: {
        stroke: e.brushType === "stroke" ? n : null,
        fill: e.brushType === "fill" ? n : null
      }
    });
  });
}
var Xat = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r) {
      var i = t.call(this) || this, a = new m1(n, r), o = new ct();
      return i.add(a), i.add(o), i.updateData(n, r), i;
    }
    return e.prototype.stopEffectAnimation = function() {
      this.childAt(1).removeAll();
    }, e.prototype.startEffectAnimation = function(n) {
      for (var r = n.symbolType, i = n.color, a = n.rippleNumber, o = this.childAt(1), s = 0; s < a; s++) {
        var l = Sr(r, -1, -1, 2, 2, i);
        l.attr({
          style: {
            strokeNoScale: !0
          },
          z2: 99,
          silent: !0,
          scaleX: 0.5,
          scaleY: 0.5
        });
        var u = -s / a * n.period + n.effectOffset;
        l.animate("", !0).when(n.period, {
          scaleX: n.rippleScale / 2,
          scaleY: n.rippleScale / 2
        }).delay(u).start(), l.animateStyle(!0).when(n.period, {
          opacity: 0
        }).delay(u).start(), o.add(l);
      }
      eX(o, n);
    }, e.prototype.updateEffectAnimation = function(n) {
      for (var r = this._effectCfg, i = this.childAt(1), a = ["symbolType", "period", "rippleScale", "rippleNumber"], o = 0; o < a.length; o++) {
        var s = a[o];
        if (r[s] !== n[s]) {
          this.stopEffectAnimation(), this.startEffectAnimation(n);
          return;
        }
      }
      eX(i, n);
    }, e.prototype.highlight = function() {
      Fu(this);
    }, e.prototype.downplay = function() {
      Wu(this);
    }, e.prototype.getSymbolType = function() {
      var n = this.childAt(0);
      return n && n.getSymbolType();
    }, e.prototype.updateData = function(n, r) {
      var i = this, a = n.hostModel;
      this.childAt(0).updateData(n, r);
      var o = this.childAt(1), s = n.getItemModel(r), l = n.getItemVisual(r, "symbol"), u = Em(n.getItemVisual(r, "symbolSize")), c = n.getItemVisual(r, "style"), f = c && c.fill, d = s.getModel("emphasis");
      o.setScale(u), o.traverse(function(g) {
        g.setStyle("fill", f);
      });
      var h = mp(n.getItemVisual(r, "symbolOffset"), u);
      h && (o.x = h[0], o.y = h[1]);
      var p = n.getItemVisual(r, "symbolRotate");
      o.rotation = (p || 0) * Math.PI / 180 || 0;
      var v = {};
      v.showEffectOn = a.get("showEffectOn"), v.rippleScale = s.get(["rippleEffect", "scale"]), v.brushType = s.get(["rippleEffect", "brushType"]), v.period = s.get(["rippleEffect", "period"]) * 1e3, v.effectOffset = r / n.count(), v.z = a.getShallow("z") || 0, v.zlevel = a.getShallow("zlevel") || 0, v.symbolType = l, v.color = f, v.rippleEffectColor = s.get(["rippleEffect", "color"]), v.rippleNumber = s.get(["rippleEffect", "number"]), v.showEffectOn === "render" ? (this._effectCfg ? this.updateEffectAnimation(v) : this.startEffectAnimation(v), this._effectCfg = v) : (this._effectCfg = null, this.stopEffectAnimation(), this.onHoverStateChange = function(g) {
        g === "emphasis" ? v.showEffectOn !== "render" && i.startEffectAnimation(v) : g === "normal" && v.showEffectOn !== "render" && i.stopEffectAnimation();
      }), this._effectCfg = v, ur(this, d.get("focus"), d.get("blurScope"), d.get("disabled"));
    }, e.prototype.fadeOut = function(n) {
      n && n();
    }, e;
  }(ct)
), Yat = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function() {
      this._symbolDraw = new y1(Xat);
    }, e.prototype.render = function(n, r, i) {
      var a = n.getData(), o = this._symbolDraw;
      o.updateData(a, {
        clipShape: this._getClipShape(n)
      }), this.group.add(o.group);
    }, e.prototype._getClipShape = function(n) {
      var r = n.coordinateSystem, i = r && r.getArea && r.getArea();
      return n.get("clip", !0) ? i : null;
    }, e.prototype.updateTransform = function(n, r, i) {
      var a = n.getData();
      this.group.dirty();
      var o = _1("").reset(n, r, i);
      o.progress && o.progress({
        start: 0,
        end: a.count(),
        count: a.count()
      }, a), this._symbolDraw.updateLayout();
    }, e.prototype._updateGroupTransform = function(n) {
      var r = n.coordinateSystem;
      r && r.getRoamTransform && (this.group.transform = nse(r.getRoamTransform()), this.group.decomposeTransform());
    }, e.prototype.remove = function(n, r) {
      this._symbolDraw && this._symbolDraw.remove(!0);
    }, e.type = "effectScatter", e;
  }(_n)
), qat = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.hasSymbolVisual = !0, n;
    }
    return e.prototype.getInitialData = function(n, r) {
      return Yl(null, this, {
        useEncodeDefaulter: !0
      });
    }, e.prototype.brushSelector = function(n, r, i) {
      return i.point(r.getItemLayout(n));
    }, e.type = "series.effectScatter", e.dependencies = ["grid", "polar"], e.defaultOption = {
      coordinateSystem: "cartesian2d",
      // zlevel: 0,
      z: 2,
      legendHoverLink: !0,
      effectType: "ripple",
      progressive: 0,
      // When to show the effect, option: 'render'|'emphasis'
      showEffectOn: "render",
      clip: !0,
      // Ripple effect config
      rippleEffect: {
        period: 4,
        // Scale of ripple
        scale: 2.5,
        // Brush type can be fill or stroke
        brushType: "fill",
        // Ripple number
        number: 3
      },
      universalTransition: {
        divideShape: "clone"
      },
      // Cartesian coordinate system
      // xAxisIndex: 0,
      // yAxisIndex: 0,
      // Polar coordinate system
      // polarIndex: 0,
      // Geo coordinate system
      // geoIndex: 0,
      // symbol: null,        // 图形类型
      symbolSize: 10
      // 图形大小，半宽（半径）参数，当图形为方向或菱形则总宽度为symbolSize * 2
      // symbolRotate: null,  // 图形旋转控制
      // itemStyle: {
      //     opacity: 1
      // }
    }, e;
  }(Cn)
);
function Kat(t) {
  t.registerChartView(Yat), t.registerSeriesModel(qat), t.registerLayout(_1("effectScatter"));
}
var Mde = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i) {
      var a = t.call(this) || this;
      return a.add(a.createLine(n, r, i)), a._updateEffectSymbol(n, r), a;
    }
    return e.prototype.createLine = function(n, r, i) {
      return new q3(n, r, i);
    }, e.prototype._updateEffectSymbol = function(n, r) {
      var i = n.getItemModel(r), a = i.getModel("effect"), o = a.get("symbolSize"), s = a.get("symbol");
      Se(o) || (o = [o, o]);
      var l = n.getItemVisual(r, "style"), u = a.get("color") || l && l.stroke, c = this.childAt(1);
      this._symbolType !== s && (this.remove(c), c = Sr(s, -0.5, -0.5, 1, 1, u), c.z2 = 100, c.culling = !0, this.add(c)), c && (c.setStyle("shadowColor", u), c.setStyle(a.getItemStyle(["color"])), c.scaleX = o[0], c.scaleY = o[1], c.setColor(u), this._symbolType = s, this._symbolScale = o, this._updateEffectAnimation(n, a, r));
    }, e.prototype._updateEffectAnimation = function(n, r, i) {
      var a = this.childAt(1);
      if (a) {
        var o = n.getItemLayout(i), s = r.get("period") * 1e3, l = r.get("loop"), u = r.get("roundTrip"), c = r.get("constantSpeed"), f = br(r.get("delay"), function(h) {
          return h / n.count() * s / 3;
        });
        if (a.ignore = !0, this._updateAnimationPoints(a, o), c > 0 && (s = this._getLineLength(a) / c * 1e3), s !== this._period || l !== this._loop || u !== this._roundTrip) {
          a.stopAnimation();
          var d = void 0;
          qe(f) ? d = f(i) : d = f, a.__t > 0 && (d = -s * a.__t), this._animateSymbol(a, s, d, l, u);
        }
        this._period = s, this._loop = l, this._roundTrip = u;
      }
    }, e.prototype._animateSymbol = function(n, r, i, a, o) {
      if (r > 0) {
        n.__t = 0;
        var s = this, l = n.animate("", a).when(o ? r * 2 : r, {
          __t: o ? 2 : 1
        }).delay(i).during(function() {
          s._updateSymbolPosition(n);
        });
        a || l.done(function() {
          s.remove(n);
        }), l.start();
      }
    }, e.prototype._getLineLength = function(n) {
      return wu(n.__p1, n.__cp1) + wu(n.__cp1, n.__p2);
    }, e.prototype._updateAnimationPoints = function(n, r) {
      n.__p1 = r[0], n.__p2 = r[1], n.__cp1 = r[2] || [(r[0][0] + r[1][0]) / 2, (r[0][1] + r[1][1]) / 2];
    }, e.prototype.updateData = function(n, r, i) {
      this.childAt(0).updateData(n, r, i), this._updateEffectSymbol(n, r);
    }, e.prototype._updateSymbolPosition = function(n) {
      var r = n.__p1, i = n.__p2, a = n.__cp1, o = n.__t < 1 ? n.__t : 2 - n.__t, s = [n.x, n.y], l = s.slice(), u = ii, c = sk;
      s[0] = u(r[0], a[0], i[0], o), s[1] = u(r[1], a[1], i[1], o);
      var f = n.__t < 1 ? c(r[0], a[0], i[0], o) : c(i[0], a[0], r[0], 1 - o), d = n.__t < 1 ? c(r[1], a[1], i[1], o) : c(i[1], a[1], r[1], 1 - o);
      n.rotation = -Math.atan2(d, f) - Math.PI / 2, (this._symbolType === "line" || this._symbolType === "rect" || this._symbolType === "roundRect") && (n.__lastT !== void 0 && n.__lastT < n.__t ? (n.scaleY = wu(l, s) * 1.05, o === 1 && (s[0] = l[0] + (s[0] - l[0]) / 2, s[1] = l[1] + (s[1] - l[1]) / 2)) : n.__lastT === 1 ? n.scaleY = 2 * wu(r, s) : n.scaleY = this._symbolScale[1]), n.__lastT = n.__t, n.ignore = !1, n.x = s[0], n.y = s[1];
    }, e.prototype.updateLayout = function(n, r) {
      this.childAt(0).updateLayout(n, r);
      var i = n.getItemModel(r).getModel("effect");
      this._updateEffectAnimation(n, i, r);
    }, e;
  }(ct)
), Ide = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i) {
      var a = t.call(this) || this;
      return a._createPolyline(n, r, i), a;
    }
    return e.prototype._createPolyline = function(n, r, i) {
      var a = n.getItemLayout(r), o = new va({
        shape: {
          points: a
        }
      });
      this.add(o), this._updateCommonStl(n, r, i);
    }, e.prototype.updateData = function(n, r, i) {
      var a = n.hostModel, o = this.childAt(0), s = {
        shape: {
          points: n.getItemLayout(r)
        }
      };
      tn(o, s, a, r), this._updateCommonStl(n, r, i);
    }, e.prototype._updateCommonStl = function(n, r, i) {
      var a = this.childAt(0), o = n.getItemModel(r), s = i && i.emphasisLineStyle, l = i && i.focus, u = i && i.blurScope, c = i && i.emphasisDisabled;
      if (!i || n.hasItemOption) {
        var f = o.getModel("emphasis");
        s = f.getModel("lineStyle").getLineStyle(), c = f.get("disabled"), l = f.get("focus"), u = f.get("blurScope");
      }
      a.useStyle(n.getItemVisual(r, "style")), a.style.fill = null, a.style.strokeNoScale = !0;
      var d = a.ensureState("emphasis");
      d.style = s, ur(this, l, u, c);
    }, e.prototype.updateLayout = function(n, r) {
      var i = this.childAt(0);
      i.setShape("points", n.getItemLayout(r));
    }, e;
  }(ct)
), Jat = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n._lastFrame = 0, n._lastFramePercent = 0, n;
    }
    return e.prototype.createLine = function(n, r, i) {
      return new Ide(n, r, i);
    }, e.prototype._updateAnimationPoints = function(n, r) {
      this._points = r;
      for (var i = [0], a = 0, o = 1; o < r.length; o++) {
        var s = r[o - 1], l = r[o];
        a += wu(s, l), i.push(a);
      }
      if (a === 0) {
        this._length = 0;
        return;
      }
      for (var o = 0; o < i.length; o++)
        i[o] /= a;
      this._offsets = i, this._length = a;
    }, e.prototype._getLineLength = function() {
      return this._length;
    }, e.prototype._updateSymbolPosition = function(n) {
      var r = n.__t < 1 ? n.__t : 2 - n.__t, i = this._points, a = this._offsets, o = i.length;
      if (a) {
        var s = this._lastFrame, l;
        if (r < this._lastFramePercent) {
          var u = Math.min(s + 1, o - 1);
          for (l = u; l >= 0 && !(a[l] <= r); l--)
            ;
          l = Math.min(l, o - 2);
        } else {
          for (l = s; l < o && !(a[l] > r); l++)
            ;
          l = Math.min(l - 1, o - 2);
        }
        var c = (r - a[l]) / (a[l + 1] - a[l]), f = i[l], d = i[l + 1];
        n.x = f[0] * (1 - c) + c * d[0], n.y = f[1] * (1 - c) + c * d[1];
        var h = n.__t < 1 ? d[0] - f[0] : f[0] - d[0], p = n.__t < 1 ? d[1] - f[1] : f[1] - d[1];
        n.rotation = -Math.atan2(p, h) - Math.PI / 2, this._lastFrame = l, this._lastFramePercent = r, n.ignore = !1;
      }
    }, e;
  }(Mde)
), eot = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
      this.polyline = !1, this.curveness = 0, this.segs = [];
    }
    return t;
  }()
), tot = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r._off = 0, r.hoverDataIdx = -1, r;
    }
    return e.prototype.reset = function() {
      this.notClear = !1, this._off = 0;
    }, e.prototype.getDefaultStyle = function() {
      return {
        stroke: "#000",
        fill: null
      };
    }, e.prototype.getDefaultShape = function() {
      return new eot();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.segs, a = r.curveness, o;
      if (r.polyline)
        for (o = this._off; o < i.length; ) {
          var s = i[o++];
          if (s > 0) {
            n.moveTo(i[o++], i[o++]);
            for (var l = 1; l < s; l++)
              n.lineTo(i[o++], i[o++]);
          }
        }
      else
        for (o = this._off; o < i.length; ) {
          var u = i[o++], c = i[o++], f = i[o++], d = i[o++];
          if (n.moveTo(u, c), a > 0) {
            var h = (u + f) / 2 - (c - d) * a, p = (c + d) / 2 - (f - u) * a;
            n.quadraticCurveTo(h, p, f, d);
          } else
            n.lineTo(f, d);
        }
      this.incremental && (this._off = o, this.notClear = !0);
    }, e.prototype.findDataIndex = function(n, r) {
      var i = this.shape, a = i.segs, o = i.curveness, s = this.style.lineWidth;
      if (i.polyline)
        for (var l = 0, u = 0; u < a.length; ) {
          var c = a[u++];
          if (c > 0)
            for (var f = a[u++], d = a[u++], h = 1; h < c; h++) {
              var p = a[u++], v = a[u++];
              if (Mc(f, d, p, v, s, n, r))
                return l;
            }
          l++;
        }
      else
        for (var l = 0, u = 0; u < a.length; ) {
          var f = a[u++], d = a[u++], p = a[u++], v = a[u++];
          if (o > 0) {
            var g = (f + p) / 2 - (d - v) * o, m = (d + v) / 2 - (p - f) * o;
            if (Zse(f, d, g, m, p, v, s, n, r))
              return l;
          } else if (Mc(f, d, p, v, s, n, r))
            return l;
          l++;
        }
      return -1;
    }, e.prototype.contain = function(n, r) {
      var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
      if (n = i[0], r = i[1], a.contain(n, r)) {
        var o = this.hoverDataIdx = this.findDataIndex(n, r);
        return o >= 0;
      }
      return this.hoverDataIdx = -1, !1;
    }, e.prototype.getBoundingRect = function() {
      var n = this._rect;
      if (!n) {
        for (var r = this.shape, i = r.segs, a = 1 / 0, o = 1 / 0, s = -1 / 0, l = -1 / 0, u = 0; u < i.length; ) {
          var c = i[u++], f = i[u++];
          a = Math.min(c, a), s = Math.max(c, s), o = Math.min(f, o), l = Math.max(f, l);
        }
        n = this._rect = new bt(a, o, s, l);
      }
      return n;
    }, e;
  }(Dt)
), not = (
  /** @class */
  function() {
    function t() {
      this.group = new ct();
    }
    return t.prototype.updateData = function(e) {
      this._clear();
      var n = this._create();
      n.setShape({
        segs: e.getLayout("linesPoints")
      }), this._setCommon(n, e);
    }, t.prototype.incrementalPrepareUpdate = function(e) {
      this.group.removeAll(), this._clear();
    }, t.prototype.incrementalUpdate = function(e, n) {
      var r = this._newAdded[0], i = n.getLayout("linesPoints"), a = r && r.shape.segs;
      if (a && a.length < 2e4) {
        var o = a.length, s = new Float32Array(o + i.length);
        s.set(a), s.set(i, o), r.setShape({
          segs: s
        });
      } else {
        this._newAdded = [];
        var l = this._create();
        l.incremental = !0, l.setShape({
          segs: i
        }), this._setCommon(l, n), l.__startIndex = e.start;
      }
    }, t.prototype.remove = function() {
      this._clear();
    }, t.prototype.eachRendered = function(e) {
      this._newAdded[0] && e(this._newAdded[0]);
    }, t.prototype._create = function() {
      var e = new tot({
        cursor: "default",
        ignoreCoarsePointer: !0
      });
      return this._newAdded.push(e), this.group.add(e), e;
    }, t.prototype._setCommon = function(e, n, r) {
      var i = n.hostModel;
      e.setShape({
        polyline: i.get("polyline"),
        curveness: i.get(["lineStyle", "curveness"])
      }), e.useStyle(i.getModel("lineStyle").getLineStyle()), e.style.strokeNoScale = !0;
      var a = n.getVisual("style");
      a && a.stroke && e.setStyle("stroke", a.stroke), e.setStyle("fill", null);
      var o = ft(e);
      o.seriesIndex = i.seriesIndex, e.on("mousemove", function(s) {
        o.dataIndex = null;
        var l = e.hoverDataIdx;
        l > 0 && (o.dataIndex = l + e.__startIndex);
      });
    }, t.prototype._clear = function() {
      this._newAdded = [], this.group.removeAll();
    }, t;
  }()
), Dde = {
  seriesType: "lines",
  plan: $m(),
  reset: function(t) {
    var e = t.coordinateSystem;
    if (!e) {
      process.env.NODE_ENV !== "production" && $i("The lines series must have a coordinate system.");
      return;
    }
    var n = t.get("polyline"), r = t.pipelineContext.large;
    return {
      progress: function(i, a) {
        var o = [];
        if (r) {
          var s = void 0, l = i.end - i.start;
          if (n) {
            for (var u = 0, c = i.start; c < i.end; c++)
              u += t.getLineCoordsCount(c);
            s = new Float32Array(l + u * 2);
          } else
            s = new Float32Array(l * 4);
          for (var f = 0, d = [], c = i.start; c < i.end; c++) {
            var h = t.getLineCoords(c, o);
            n && (s[f++] = h);
            for (var p = 0; p < h; p++)
              d = e.dataToPoint(o[p], !1, d), s[f++] = d[0], s[f++] = d[1];
          }
          a.setLayout("linesPoints", s);
        } else
          for (var c = i.start; c < i.end; c++) {
            var v = a.getItemModel(c), h = t.getLineCoords(c, o), g = [];
            if (n)
              for (var m = 0; m < h; m++)
                g.push(e.dataToPoint(o[m]));
            else {
              g[0] = e.dataToPoint(o[0]), g[1] = e.dataToPoint(o[1]);
              var y = v.get(["lineStyle", "curveness"]);
              +y && (g[2] = [(g[0][0] + g[1][0]) / 2 - (g[0][1] - g[1][1]) * y, (g[0][1] + g[1][1]) / 2 - (g[1][0] - g[0][0]) * y]);
            }
            a.setItemLayout(c, g);
          }
      }
    };
  }
}, rot = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = n.getData(), o = this._updateLineDraw(a, n), s = n.get("zlevel"), l = n.get(["effect", "trailLength"]), u = i.getZr(), c = u.painter.getType() === "svg";
      c || u.painter.getLayer(s).clear(!0), this._lastZlevel != null && !c && u.configLayer(this._lastZlevel, {
        motionBlur: !1
      }), this._showEffect(n) && l > 0 && (c ? process.env.NODE_ENV !== "production" && console.warn("SVG render mode doesn't support lines with trail effect") : u.configLayer(s, {
        motionBlur: !0,
        lastFrameAlpha: Math.max(Math.min(l / 10 + 0.9, 1), 0)
      })), o.updateData(a);
      var f = n.get("clip", !0) && b1(n.coordinateSystem, !1, n);
      f ? this.group.setClipPath(f) : this.group.removeClipPath(), this._lastZlevel = s, this._finished = !0;
    }, e.prototype.incrementalPrepareRender = function(n, r, i) {
      var a = n.getData(), o = this._updateLineDraw(a, n);
      o.incrementalPrepareUpdate(a), this._clearLayer(i), this._finished = !1;
    }, e.prototype.incrementalRender = function(n, r, i) {
      this._lineDraw.incrementalUpdate(n, r.getData()), this._finished = n.end === r.getData().count();
    }, e.prototype.eachRendered = function(n) {
      this._lineDraw && this._lineDraw.eachRendered(n);
    }, e.prototype.updateTransform = function(n, r, i) {
      var a = n.getData(), o = n.pipelineContext;
      if (!this._finished || o.large || o.progressiveRender)
        return {
          update: !0
        };
      var s = Dde.reset(n, r, i);
      s.progress && s.progress({
        start: 0,
        end: a.count(),
        count: a.count()
      }, a), this._lineDraw.updateLayout(), this._clearLayer(i);
    }, e.prototype._updateLineDraw = function(n, r) {
      var i = this._lineDraw, a = this._showEffect(r), o = !!r.get("polyline"), s = r.pipelineContext, l = s.large;
      return process.env.NODE_ENV !== "production" && a && l && console.warn("Large lines not support effect"), (!i || a !== this._hasEffet || o !== this._isPolyline || l !== this._isLargeDraw) && (i && i.remove(), i = this._lineDraw = l ? new not() : new K3(o ? a ? Jat : Ide : a ? Mde : q3), this._hasEffet = a, this._isPolyline = o, this._isLargeDraw = l), this.group.add(i.group), i;
    }, e.prototype._showEffect = function(n) {
      return !!n.get(["effect", "show"]);
    }, e.prototype._clearLayer = function(n) {
      var r = n.getZr(), i = r.painter.getType() === "svg";
      !i && this._lastZlevel != null && r.painter.getLayer(this._lastZlevel).clear(!0);
    }, e.prototype.remove = function(n, r) {
      this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(r);
    }, e.prototype.dispose = function(n, r) {
      this.remove(n, r);
    }, e.type = "lines", e;
  }(_n)
), iot = typeof Uint32Array > "u" ? Array : Uint32Array, aot = typeof Float64Array > "u" ? Array : Float64Array;
function tX(t) {
  var e = t.data;
  e && e[0] && e[0][0] && e[0][0].coord && (process.env.NODE_ENV !== "production" && console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"), t.data = Ce(e, function(n) {
    var r = [n[0].coord, n[1].coord], i = {
      coords: r
    };
    return n[0].name && (i.fromName = n[0].name), n[1].name && (i.toName = n[1].name), aP([i, n[0], n[1]]);
  }));
}
var oot = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n;
    }
    return e.prototype.init = function(n) {
      n.data = n.data || [], tX(n);
      var r = this._processFlatCoordsArray(n.data);
      this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset, r.flatCoords && (n.data = new Float32Array(r.count)), t.prototype.init.apply(this, arguments);
    }, e.prototype.mergeOption = function(n) {
      if (tX(n), n.data) {
        var r = this._processFlatCoordsArray(n.data);
        this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset, r.flatCoords && (n.data = new Float32Array(r.count));
      }
      t.prototype.mergeOption.apply(this, arguments);
    }, e.prototype.appendData = function(n) {
      var r = this._processFlatCoordsArray(n.data);
      r.flatCoords && (this._flatCoords ? (this._flatCoords = Fb(this._flatCoords, r.flatCoords), this._flatCoordsOffset = Fb(this._flatCoordsOffset, r.flatCoordsOffset)) : (this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset), n.data = new Float32Array(r.count)), this.getRawData().appendData(n.data);
    }, e.prototype._getCoordsFromItemModel = function(n) {
      var r = this.getData().getItemModel(n), i = r.option instanceof Array ? r.option : r.getShallow("coords");
      if (process.env.NODE_ENV !== "production" && !(i instanceof Array && i.length > 0 && i[0] instanceof Array))
        throw new Error("Invalid coords " + JSON.stringify(i) + ". Lines must have 2d coords array in data item.");
      return i;
    }, e.prototype.getLineCoordsCount = function(n) {
      return this._flatCoordsOffset ? this._flatCoordsOffset[n * 2 + 1] : this._getCoordsFromItemModel(n).length;
    }, e.prototype.getLineCoords = function(n, r) {
      if (this._flatCoordsOffset) {
        for (var i = this._flatCoordsOffset[n * 2], a = this._flatCoordsOffset[n * 2 + 1], o = 0; o < a; o++)
          r[o] = r[o] || [], r[o][0] = this._flatCoords[i + o * 2], r[o][1] = this._flatCoords[i + o * 2 + 1];
        return a;
      } else {
        for (var s = this._getCoordsFromItemModel(n), o = 0; o < s.length; o++)
          r[o] = r[o] || [], r[o][0] = s[o][0], r[o][1] = s[o][1];
        return s.length;
      }
    }, e.prototype._processFlatCoordsArray = function(n) {
      var r = 0;
      if (this._flatCoords && (r = this._flatCoords.length), Kt(n[0])) {
        for (var i = n.length, a = new iot(i), o = new aot(i), s = 0, l = 0, u = 0, c = 0; c < i; ) {
          u++;
          var f = n[c++];
          a[l++] = s + r, a[l++] = f;
          for (var d = 0; d < f; d++) {
            var h = n[c++], p = n[c++];
            if (o[s++] = h, o[s++] = p, c > i && process.env.NODE_ENV !== "production")
              throw new Error("Invalid data format.");
          }
        }
        return {
          flatCoordsOffset: new Uint32Array(a.buffer, 0, l),
          flatCoords: o,
          count: u
        };
      }
      return {
        flatCoordsOffset: null,
        flatCoords: null,
        count: n.length
      };
    }, e.prototype.getInitialData = function(n, r) {
      if (process.env.NODE_ENV !== "production") {
        var i = gp.get(n.coordinateSystem);
        if (!i)
          throw new Error("Unknown coordinate system " + n.coordinateSystem);
      }
      var a = new Fi(["value"], this);
      return a.hasItemOption = !1, a.initData(n.data, [], function(o, s, l, u) {
        if (o instanceof Array)
          return NaN;
        a.hasItemOption = !0;
        var c = o.value;
        if (c != null)
          return c instanceof Array ? c[u] : c;
      }), a;
    }, e.prototype.formatTooltip = function(n, r, i) {
      var a = this.getData(), o = a.getItemModel(n), s = o.get("name");
      if (s)
        return s;
      var l = o.get("fromName"), u = o.get("toName"), c = [];
      return l != null && c.push(l), u != null && c.push(u), ti("nameValue", {
        name: c.join(" > ")
      });
    }, e.prototype.preventIncremental = function() {
      return !!this.get(["effect", "show"]);
    }, e.prototype.getProgressive = function() {
      var n = this.option.progressive;
      return n ?? (this.option.large ? 1e4 : this.get("progressive"));
    }, e.prototype.getProgressiveThreshold = function() {
      var n = this.option.progressiveThreshold;
      return n ?? (this.option.large ? 2e4 : this.get("progressiveThreshold"));
    }, e.prototype.getZLevelKey = function() {
      var n = this.getModel("effect"), r = n.get("trailLength");
      return this.getData().count() > this.getProgressiveThreshold() ? this.id : n.get("show") && r > 0 ? r + "" : "";
    }, e.type = "series.lines", e.dependencies = ["grid", "polar", "geo", "calendar"], e.defaultOption = {
      coordinateSystem: "geo",
      // zlevel: 0,
      z: 2,
      legendHoverLink: !0,
      // Cartesian coordinate system
      xAxisIndex: 0,
      yAxisIndex: 0,
      symbol: ["none", "none"],
      symbolSize: [10, 10],
      // Geo coordinate system
      geoIndex: 0,
      effect: {
        show: !1,
        period: 4,
        constantSpeed: 0,
        symbol: "circle",
        symbolSize: 3,
        loop: !0,
        trailLength: 0.2
      },
      large: !1,
      // Available when large is true
      largeThreshold: 2e3,
      polyline: !1,
      clip: !0,
      label: {
        show: !1,
        position: "end"
        // distance: 5,
        // formatter: 标签文本格式器，同Tooltip.formatter，不支持异步回调
      },
      lineStyle: {
        opacity: 0.5
      }
    }, e;
  }(Cn)
);
function US(t) {
  return t instanceof Array || (t = [t, t]), t;
}
var sot = {
  seriesType: "lines",
  reset: function(t) {
    var e = US(t.get("symbol")), n = US(t.get("symbolSize")), r = t.getData();
    r.setVisual("fromSymbol", e && e[0]), r.setVisual("toSymbol", e && e[1]), r.setVisual("fromSymbolSize", n && n[0]), r.setVisual("toSymbolSize", n && n[1]);
    function i(a, o) {
      var s = a.getItemModel(o), l = US(s.getShallow("symbol", !0)), u = US(s.getShallow("symbolSize", !0));
      l[0] && a.setItemVisual(o, "fromSymbol", l[0]), l[1] && a.setItemVisual(o, "toSymbol", l[1]), u[0] && a.setItemVisual(o, "fromSymbolSize", u[0]), u[1] && a.setItemVisual(o, "toSymbolSize", u[1]);
    }
    return {
      dataEach: r.hasItemOption ? i : null
    };
  }
};
function lot(t) {
  t.registerChartView(rot), t.registerSeriesModel(oot), t.registerLayout(Dde), t.registerVisual(sot);
}
var uot = 256, cot = (
  /** @class */
  function() {
    function t() {
      this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {
        inRange: null,
        outOfRange: null
      };
      var e = Hs.createCanvas();
      this.canvas = e;
    }
    return t.prototype.update = function(e, n, r, i, a, o) {
      var s = this._getBrush(), l = this._getGradient(a, "inRange"), u = this._getGradient(a, "outOfRange"), c = this.pointSize + this.blurSize, f = this.canvas, d = f.getContext("2d"), h = e.length;
      f.width = n, f.height = r;
      for (var p = 0; p < h; ++p) {
        var v = e[p], g = v[0], m = v[1], y = v[2], _ = i(y);
        d.globalAlpha = _, d.drawImage(s, g - c, m - c);
      }
      if (!f.width || !f.height)
        return f;
      for (var O = d.getImageData(0, 0, f.width, f.height), S = O.data, x = 0, C = S.length, P = this.minOpacity, $ = this.maxOpacity, T = $ - P; x < C; ) {
        var _ = S[x + 3] / 256, E = Math.floor(_ * (uot - 1)) * 4;
        if (_ > 0) {
          var M = o(_) ? l : u;
          _ > 0 && (_ = _ * T + P), S[x++] = M[E], S[x++] = M[E + 1], S[x++] = M[E + 2], S[x++] = M[E + 3] * _ * 256;
        } else
          x += 4;
      }
      return d.putImageData(O, 0, 0), f;
    }, t.prototype._getBrush = function() {
      var e = this._brushCanvas || (this._brushCanvas = Hs.createCanvas()), n = this.pointSize + this.blurSize, r = n * 2;
      e.width = r, e.height = r;
      var i = e.getContext("2d");
      return i.clearRect(0, 0, r, r), i.shadowOffsetX = r, i.shadowBlur = this.blurSize, i.shadowColor = "#000", i.beginPath(), i.arc(-n, n, this.pointSize, 0, Math.PI * 2, !0), i.closePath(), i.fill(), e;
    }, t.prototype._getGradient = function(e, n) {
      for (var r = this._gradientPixels, i = r[n] || (r[n] = new Uint8ClampedArray(256 * 4)), a = [0, 0, 0, 0], o = 0, s = 0; s < 256; s++)
        e[n](s / 255, !0, a), i[o++] = a[0], i[o++] = a[1], i[o++] = a[2], i[o++] = a[3];
      return i;
    }, t;
  }()
);
function fot(t, e, n) {
  var r = t[1] - t[0];
  e = Ce(e, function(o) {
    return {
      interval: [(o.interval[0] - t[0]) / r, (o.interval[1] - t[0]) / r]
    };
  });
  var i = e.length, a = 0;
  return function(o) {
    var s;
    for (s = a; s < i; s++) {
      var l = e[s].interval;
      if (l[0] <= o && o <= l[1]) {
        a = s;
        break;
      }
    }
    if (s === i)
      for (s = a - 1; s >= 0; s--) {
        var l = e[s].interval;
        if (l[0] <= o && o <= l[1]) {
          a = s;
          break;
        }
      }
    return s >= 0 && s < i && n[s];
  };
}
function dot(t, e) {
  var n = t[1] - t[0];
  return e = [(e[0] - t[0]) / n, (e[1] - t[0]) / n], function(r) {
    return r >= e[0] && r <= e[1];
  };
}
function nX(t) {
  var e = t.dimensions;
  return e[0] === "lng" && e[1] === "lat";
}
var hot = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a;
      if (r.eachComponent("visualMap", function(s) {
        s.eachTargetSeries(function(l) {
          l === n && (a = s);
        });
      }), process.env.NODE_ENV !== "production" && !a)
        throw new Error("Heatmap must use with visualMap");
      this._progressiveEls = null, this.group.removeAll();
      var o = n.coordinateSystem;
      o.type === "cartesian2d" || o.type === "calendar" ? this._renderOnCartesianAndCalendar(n, i, 0, n.getData().count()) : nX(o) && this._renderOnGeo(o, n, a, i);
    }, e.prototype.incrementalPrepareRender = function(n, r, i) {
      this.group.removeAll();
    }, e.prototype.incrementalRender = function(n, r, i, a) {
      var o = r.coordinateSystem;
      o && (nX(o) ? this.render(r, i, a) : (this._progressiveEls = [], this._renderOnCartesianAndCalendar(r, a, n.start, n.end, !0)));
    }, e.prototype.eachRendered = function(n) {
      Nf(this._progressiveEls || this.group, n);
    }, e.prototype._renderOnCartesianAndCalendar = function(n, r, i, a, o) {
      var s = n.coordinateSystem, l = yp(s, "cartesian2d"), u, c, f, d;
      if (l) {
        var h = s.getAxis("x"), p = s.getAxis("y");
        if (process.env.NODE_ENV !== "production") {
          if (!(h.type === "category" && p.type === "category"))
            throw new Error("Heatmap on cartesian must have two category axes");
          if (!(h.onBand && p.onBand))
            throw new Error("Heatmap on cartesian must have two axes with boundaryGap true");
        }
        u = h.getBandWidth() + 0.5, c = p.getBandWidth() + 0.5, f = h.scale.getExtent(), d = p.scale.getExtent();
      }
      for (var v = this.group, g = n.getData(), m = n.getModel(["emphasis", "itemStyle"]).getItemStyle(), y = n.getModel(["blur", "itemStyle"]).getItemStyle(), _ = n.getModel(["select", "itemStyle"]).getItemStyle(), O = n.get(["itemStyle", "borderRadius"]), S = ei(n), x = n.getModel("emphasis"), C = x.get("focus"), P = x.get("blurScope"), $ = x.get("disabled"), T = l ? [g.mapDimension("x"), g.mapDimension("y"), g.mapDimension("value")] : [g.mapDimension("time"), g.mapDimension("value")], E = i; E < a; E++) {
        var M = void 0, R = g.getItemVisual(E, "style");
        if (l) {
          var N = g.get(T[0], E), I = g.get(T[1], E);
          if (isNaN(g.get(T[2], E)) || isNaN(N) || isNaN(I) || N < f[0] || N > f[1] || I < d[0] || I > d[1])
            continue;
          var B = s.dataToPoint([N, I]);
          M = new Zt({
            shape: {
              x: B[0] - u / 2,
              y: B[1] - c / 2,
              width: u,
              height: c
            },
            style: R
          });
        } else {
          if (isNaN(g.get(T[1], E)))
            continue;
          M = new Zt({
            z2: 1,
            shape: s.dataToRect([g.get(T[0], E)]).contentShape,
            style: R
          });
        }
        if (g.hasItemOption) {
          var Q = g.getItemModel(E), W = Q.getModel("emphasis");
          m = W.getModel("itemStyle").getItemStyle(), y = Q.getModel(["blur", "itemStyle"]).getItemStyle(), _ = Q.getModel(["select", "itemStyle"]).getItemStyle(), O = Q.get(["itemStyle", "borderRadius"]), C = W.get("focus"), P = W.get("blurScope"), $ = W.get("disabled"), S = ei(Q);
        }
        M.shape.r = O;
        var H = n.getRawValue(E), U = "-";
        H && H[2] != null && (U = H[2] + ""), Ei(M, S, {
          labelFetcher: n,
          labelDataIndex: E,
          defaultOpacity: R.opacity,
          defaultText: U
        }), M.ensureState("emphasis").style = m, M.ensureState("blur").style = y, M.ensureState("select").style = _, ur(M, C, P, $), M.incremental = o, o && (M.states.emphasis.hoverLayer = !0), v.add(M), g.setItemGraphicEl(E, M), this._progressiveEls && this._progressiveEls.push(M);
      }
    }, e.prototype._renderOnGeo = function(n, r, i, a) {
      var o = i.targetVisuals.inRange, s = i.targetVisuals.outOfRange, l = r.getData(), u = this._hmLayer || this._hmLayer || new cot();
      u.blurSize = r.get("blurSize"), u.pointSize = r.get("pointSize"), u.minOpacity = r.get("minOpacity"), u.maxOpacity = r.get("maxOpacity");
      var c = n.getViewRect().clone(), f = n.getRoamTransform();
      c.applyTransform(f);
      var d = Math.max(c.x, 0), h = Math.max(c.y, 0), p = Math.min(c.width + c.x, a.getWidth()), v = Math.min(c.height + c.y, a.getHeight()), g = p - d, m = v - h, y = [l.mapDimension("lng"), l.mapDimension("lat"), l.mapDimension("value")], _ = l.mapArray(y, function(C, P, $) {
        var T = n.dataToPoint([C, P]);
        return T[0] -= d, T[1] -= h, T.push($), T;
      }), O = i.getExtent(), S = i.type === "visualMap.continuous" ? dot(O, i.option.range) : fot(O, i.getPieceList(), i.option.selected);
      u.update(_, g, m, o.color.getNormalizer(), {
        inRange: o.color.getColorMapper(),
        outOfRange: s.color.getColorMapper()
      }, S);
      var x = new ci({
        style: {
          width: g,
          height: m,
          x: d,
          y: h,
          image: u.canvas
        },
        silent: !0
      });
      this.group.add(x);
    }, e.type = "heatmap", e;
  }(_n)
), pot = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.getInitialData = function(n, r) {
      return Yl(null, this, {
        generateCoord: "value"
      });
    }, e.prototype.preventIncremental = function() {
      var n = gp.get(this.get("coordinateSystem"));
      if (n && n.dimensions)
        return n.dimensions[0] === "lng" && n.dimensions[1] === "lat";
    }, e.type = "series.heatmap", e.dependencies = ["grid", "geo", "calendar"], e.defaultOption = {
      coordinateSystem: "cartesian2d",
      // zlevel: 0,
      z: 2,
      // Cartesian coordinate system
      // xAxisIndex: 0,
      // yAxisIndex: 0,
      // Geo coordinate system
      geoIndex: 0,
      blurSize: 30,
      pointSize: 20,
      maxOpacity: 1,
      minOpacity: 0,
      select: {
        itemStyle: {
          borderColor: "#212121"
        }
      }
    }, e;
  }(Cn)
);
function vot(t) {
  t.registerChartView(hot), t.registerSeriesModel(pot);
}
var got = ["itemStyle", "borderWidth"], rX = [{
  xy: "x",
  wh: "width",
  index: 0,
  posDesc: ["left", "right"]
}, {
  xy: "y",
  wh: "height",
  index: 1,
  posDesc: ["top", "bottom"]
}], wI = new ic(), mot = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = this.group, o = n.getData(), s = this._data, l = n.coordinateSystem, u = l.getBaseAxis(), c = u.isHorizontal(), f = l.master.getRect(), d = {
        ecSize: {
          width: i.getWidth(),
          height: i.getHeight()
        },
        seriesModel: n,
        coordSys: l,
        coordSysExtent: [[f.x, f.x + f.width], [f.y, f.y + f.height]],
        isHorizontal: c,
        valueDim: rX[+c],
        categoryDim: rX[1 - +c]
      };
      o.diff(s).add(function(p) {
        if (o.hasValue(p)) {
          var v = aX(o, p), g = iX(o, p, v, d), m = oX(o, d, g);
          o.setItemGraphicEl(p, m), a.add(m), lX(m, d, g);
        }
      }).update(function(p, v) {
        var g = s.getItemGraphicEl(v);
        if (!o.hasValue(p)) {
          a.remove(g);
          return;
        }
        var m = aX(o, p), y = iX(o, p, m, d), _ = zde(o, y);
        g && _ !== g.__pictorialShapeStr && (a.remove(g), o.setItemGraphicEl(p, null), g = null), g ? wot(g, d, y) : g = oX(o, d, y, !0), o.setItemGraphicEl(p, g), g.__pictorialSymbolMeta = y, a.add(g), lX(g, d, y);
      }).remove(function(p) {
        var v = s.getItemGraphicEl(p);
        v && sX(s, p, v.__pictorialSymbolMeta.animationModel, v);
      }).execute();
      var h = n.get("clip", !0) ? b1(n.coordinateSystem, !1, n) : null;
      return h ? a.setClipPath(h) : a.removeClipPath(), this._data = o, this.group;
    }, e.prototype.remove = function(n, r) {
      var i = this.group, a = this._data;
      n.get("animation") ? a && a.eachItemGraphicEl(function(o) {
        sX(a, ft(o).dataIndex, n, o);
      }) : i.removeAll();
    }, e.type = "pictorialBar", e;
  }(_n)
);
function iX(t, e, n, r) {
  var i = t.getItemLayout(e), a = n.get("symbolRepeat"), o = n.get("symbolClip"), s = n.get("symbolPosition") || "start", l = n.get("symbolRotate"), u = (l || 0) * Math.PI / 180 || 0, c = n.get("symbolPatternSize") || 2, f = n.isAnimationEnabled(), d = {
    dataIndex: e,
    layout: i,
    itemModel: n,
    symbolType: t.getItemVisual(e, "symbol") || "circle",
    style: t.getItemVisual(e, "style"),
    symbolClip: o,
    symbolRepeat: a,
    symbolRepeatDirection: n.get("symbolRepeatDirection"),
    symbolPatternSize: c,
    rotation: u,
    animationModel: f ? n : null,
    hoverScale: f && n.get(["emphasis", "scale"]),
    z2: n.getShallow("z", !0) || 0
  };
  yot(n, a, i, r, d), bot(t, e, i, a, o, d.boundingLength, d.pxSign, c, r, d), _ot(n, d.symbolScale, u, r, d);
  var h = d.symbolSize, p = mp(n.get("symbolOffset"), h);
  return Oot(n, h, i, a, o, p, s, d.valueLineWidth, d.boundingLength, d.repeatCutLength, r, d), d;
}
function yot(t, e, n, r, i) {
  var a = r.valueDim, o = t.get("symbolBoundingData"), s = r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()), l = s.toGlobalCoord(s.dataToCoord(0)), u = 1 - +(n[a.wh] <= 0), c;
  if (Se(o)) {
    var f = [CI(s, o[0]) - l, CI(s, o[1]) - l];
    f[1] < f[0] && f.reverse(), c = f[u];
  } else o != null ? c = CI(s, o) - l : e ? c = r.coordSysExtent[a.index][u] - l : c = n[a.wh];
  i.boundingLength = c, e && (i.repeatCutLength = n[a.wh]), i.pxSign = c > 0 ? 1 : -1;
}
function CI(t, e) {
  return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)));
}
function bot(t, e, n, r, i, a, o, s, l, u) {
  var c = l.valueDim, f = l.categoryDim, d = Math.abs(n[f.wh]), h = t.getItemVisual(e, "symbolSize"), p;
  Se(h) ? p = h.slice() : h == null ? p = ["100%", "100%"] : p = [h, h], p[f.index] = ze(p[f.index], d), p[c.index] = ze(p[c.index], r ? d : Math.abs(a)), u.symbolSize = p;
  var v = u.symbolScale = [p[0] / s, p[1] / s];
  v[c.index] *= (l.isHorizontal ? -1 : 1) * o;
}
function _ot(t, e, n, r, i) {
  var a = t.get(got) || 0;
  a && (wI.attr({
    scaleX: e[0],
    scaleY: e[1],
    rotation: n
  }), wI.updateTransform(), a /= wI.getLineScale(), a *= e[r.valueDim.index]), i.valueLineWidth = a || 0;
}
function Oot(t, e, n, r, i, a, o, s, l, u, c, f) {
  var d = c.categoryDim, h = c.valueDim, p = f.pxSign, v = Math.max(e[h.index] + s, 0), g = v;
  if (r) {
    var m = Math.abs(l), y = br(t.get("symbolMargin"), "15%") + "", _ = !1;
    y.lastIndexOf("!") === y.length - 1 && (_ = !0, y = y.slice(0, y.length - 1));
    var O = ze(y, e[h.index]), S = Math.max(v + O * 2, 0), x = _ ? 0 : O * 2, C = hP(r), P = C ? r : uX((m + x) / S), $ = m - P * v;
    O = $ / 2 / (_ ? P : Math.max(P - 1, 1)), S = v + O * 2, x = _ ? 0 : O * 2, !C && r !== "fixed" && (P = u ? uX((Math.abs(u) + x) / S) : 0), g = P * S - x, f.repeatTimes = P, f.symbolMargin = O;
  }
  var T = p * (g / 2), E = f.pathPosition = [];
  E[d.index] = n[d.wh] / 2, E[h.index] = o === "start" ? T : o === "end" ? l - T : l / 2, a && (E[0] += a[0], E[1] += a[1]);
  var M = f.bundlePosition = [];
  M[d.index] = n[d.xy], M[h.index] = n[h.xy];
  var R = f.barRectShape = _e({}, n);
  R[h.wh] = p * Math.max(Math.abs(n[h.wh]), Math.abs(E[h.index] + T)), R[d.wh] = n[d.wh];
  var N = f.clipShape = {};
  N[d.xy] = -n[d.xy], N[d.wh] = c.ecSize[d.wh], N[h.xy] = 0, N[h.wh] = n[h.wh];
}
function Rde(t) {
  var e = t.symbolPatternSize, n = Sr(
    // Consider texture img, make a big size.
    t.symbolType,
    -e / 2,
    -e / 2,
    e,
    e
  );
  return n.attr({
    culling: !0
  }), n.type !== "image" && n.setStyle({
    strokeNoScale: !0
  }), n;
}
function kde(t, e, n, r) {
  var i = t.__pictorialBundle, a = n.symbolSize, o = n.valueLineWidth, s = n.pathPosition, l = e.valueDim, u = n.repeatTimes || 0, c = 0, f = a[e.valueDim.index] + o + n.symbolMargin * 2;
  for (o6(t, function(v) {
    v.__pictorialAnimationIndex = c, v.__pictorialRepeatTimes = u, c < u ? tg(v, null, p(c), n, r) : tg(v, null, {
      scaleX: 0,
      scaleY: 0
    }, n, r, function() {
      i.remove(v);
    }), c++;
  }); c < u; c++) {
    var d = Rde(n);
    d.__pictorialAnimationIndex = c, d.__pictorialRepeatTimes = u, i.add(d);
    var h = p(c);
    tg(d, {
      x: h.x,
      y: h.y,
      scaleX: 0,
      scaleY: 0
    }, {
      scaleX: h.scaleX,
      scaleY: h.scaleY,
      rotation: h.rotation
    }, n, r);
  }
  function p(v) {
    var g = s.slice(), m = n.pxSign, y = v;
    return (n.symbolRepeatDirection === "start" ? m > 0 : m < 0) && (y = u - 1 - v), g[l.index] = f * (y - u / 2 + 0.5) + s[l.index], {
      x: g[0],
      y: g[1],
      scaleX: n.symbolScale[0],
      scaleY: n.symbolScale[1],
      rotation: n.rotation
    };
  }
}
function Lde(t, e, n, r) {
  var i = t.__pictorialBundle, a = t.__pictorialMainPath;
  a ? tg(a, null, {
    x: n.pathPosition[0],
    y: n.pathPosition[1],
    scaleX: n.symbolScale[0],
    scaleY: n.symbolScale[1],
    rotation: n.rotation
  }, n, r) : (a = t.__pictorialMainPath = Rde(n), i.add(a), tg(a, {
    x: n.pathPosition[0],
    y: n.pathPosition[1],
    scaleX: 0,
    scaleY: 0,
    rotation: n.rotation
  }, {
    scaleX: n.symbolScale[0],
    scaleY: n.symbolScale[1]
  }, n, r));
}
function Nde(t, e, n) {
  var r = _e({}, e.barRectShape), i = t.__pictorialBarRect;
  i ? tg(i, null, {
    shape: r
  }, e, n) : (i = t.__pictorialBarRect = new Zt({
    z2: 2,
    shape: r,
    silent: !0,
    style: {
      stroke: "transparent",
      fill: "transparent",
      lineWidth: 0
    }
  }), i.disableMorphing = !0, t.add(i));
}
function Bde(t, e, n, r) {
  if (n.symbolClip) {
    var i = t.__pictorialClipPath, a = _e({}, n.clipShape), o = e.valueDim, s = n.animationModel, l = n.dataIndex;
    if (i)
      tn(i, {
        shape: a
      }, s, l);
    else {
      a[o.wh] = 0, i = new Zt({
        shape: a
      }), t.__pictorialBundle.setClipPath(i), t.__pictorialClipPath = i;
      var u = {};
      u[o.wh] = n.clipShape[o.wh], hp[r ? "updateProps" : "initProps"](i, {
        shape: u
      }, s, l);
    }
  }
}
function aX(t, e) {
  var n = t.getItemModel(e);
  return n.getAnimationDelayParams = Sot, n.isAnimationEnabled = xot, n;
}
function Sot(t) {
  return {
    index: t.__pictorialAnimationIndex,
    count: t.__pictorialRepeatTimes
  };
}
function xot() {
  return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation");
}
function oX(t, e, n, r) {
  var i = new ct(), a = new ct();
  return i.add(a), i.__pictorialBundle = a, a.x = n.bundlePosition[0], a.y = n.bundlePosition[1], n.symbolRepeat ? kde(i, e, n) : Lde(i, e, n), Nde(i, n, r), Bde(i, e, n, r), i.__pictorialShapeStr = zde(t, n), i.__pictorialSymbolMeta = n, i;
}
function wot(t, e, n) {
  var r = n.animationModel, i = n.dataIndex, a = t.__pictorialBundle;
  tn(a, {
    x: n.bundlePosition[0],
    y: n.bundlePosition[1]
  }, r, i), n.symbolRepeat ? kde(t, e, n, !0) : Lde(t, e, n, !0), Nde(t, n, !0), Bde(t, e, n, !0);
}
function sX(t, e, n, r) {
  var i = r.__pictorialBarRect;
  i && i.removeTextContent();
  var a = [];
  o6(r, function(o) {
    a.push(o);
  }), r.__pictorialMainPath && a.push(r.__pictorialMainPath), r.__pictorialClipPath && (n = null), F(a, function(o) {
    _f(o, {
      scaleX: 0,
      scaleY: 0
    }, n, e, function() {
      r.parent && r.parent.remove(r);
    });
  }), t.setItemGraphicEl(e, null);
}
function zde(t, e) {
  return [t.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":");
}
function o6(t, e, n) {
  F(t.__pictorialBundle.children(), function(r) {
    r !== t.__pictorialBarRect && e.call(n, r);
  });
}
function tg(t, e, n, r, i, a) {
  e && t.attr(e), r.symbolClip && !i ? n && t.attr(n) : n && hp[i ? "updateProps" : "initProps"](t, n, r.animationModel, r.dataIndex, a);
}
function lX(t, e, n) {
  var r = n.dataIndex, i = n.itemModel, a = i.getModel("emphasis"), o = a.getModel("itemStyle").getItemStyle(), s = i.getModel(["blur", "itemStyle"]).getItemStyle(), l = i.getModel(["select", "itemStyle"]).getItemStyle(), u = i.getShallow("cursor"), c = a.get("focus"), f = a.get("blurScope"), d = a.get("scale");
  o6(t, function(v) {
    if (v instanceof ci) {
      var g = v.style;
      v.useStyle(_e({
        // TODO other properties like dx, dy ?
        image: g.image,
        x: g.x,
        y: g.y,
        width: g.width,
        height: g.height
      }, n.style));
    } else
      v.useStyle(n.style);
    var m = v.ensureState("emphasis");
    m.style = o, d && (m.scaleX = v.scaleX * 1.1, m.scaleY = v.scaleY * 1.1), v.ensureState("blur").style = s, v.ensureState("select").style = l, u && (v.cursor = u), v.z2 = n.z2;
  });
  var h = e.valueDim.posDesc[+(n.boundingLength > 0)], p = t.__pictorialBarRect;
  p.ignoreClip = !0, Ei(p, ei(i), {
    labelFetcher: e.seriesModel,
    labelDataIndex: r,
    defaultText: jg(e.seriesModel.getData(), r),
    inheritColor: n.style.fill,
    defaultOpacity: n.style.opacity,
    defaultOutsidePosition: h
  }), ur(t, c, f, a.get("disabled"));
}
function uX(t) {
  var e = Math.round(t);
  return Math.abs(t - e) < 1e-4 ? e : Math.ceil(t);
}
var Cot = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.hasSymbolVisual = !0, n.defaultSymbol = "roundRect", n;
    }
    return e.prototype.getInitialData = function(n) {
      return n.stack = null, t.prototype.getInitialData.apply(this, arguments);
    }, e.type = "series.pictorialBar", e.dependencies = ["grid"], e.defaultOption = Bf(a_.defaultOption, {
      symbol: "circle",
      symbolSize: null,
      symbolRotate: null,
      symbolPosition: null,
      symbolOffset: null,
      symbolMargin: null,
      symbolRepeat: !1,
      symbolRepeatDirection: "end",
      symbolClip: !1,
      symbolBoundingData: null,
      symbolPatternSize: 400,
      barGap: "-100%",
      // Pictorial bar do not clip by default because in many cases
      // xAxis and yAxis are not displayed and it's expected not to clip
      clip: !1,
      // z can be set in data item, which is z2 actually.
      // Disable progressive
      progressive: 0,
      emphasis: {
        // By default pictorialBar do not hover scale. Hover scale is not suitable
        // for the case that both has foreground and background.
        scale: !1
      },
      select: {
        itemStyle: {
          borderColor: "#212121"
        }
      }
    }), e;
  }(a_)
);
function Tot(t) {
  t.registerChartView(mot), t.registerSeriesModel(Cot), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, vt(Oce, "pictorialBar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Sce("pictorialBar"));
}
var Pot = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._layers = [], n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = n.getData(), o = this, s = this.group, l = n.getLayerSeries(), u = a.getLayout("layoutInfo"), c = u.rect, f = u.boundaryGap;
      s.x = 0, s.y = c.y + f[0];
      function d(g) {
        return g.name;
      }
      var h = new Qu(this._layersSeries || [], l, d, d), p = [];
      h.add(We(v, this, "add")).update(We(v, this, "update")).remove(We(v, this, "remove")).execute();
      function v(g, m, y) {
        var _ = o._layers;
        if (g === "remove") {
          s.remove(_[m]);
          return;
        }
        for (var O = [], S = [], x, C = l[m].indices, P = 0; P < C.length; P++) {
          var $ = a.getItemLayout(C[P]), T = $.x, E = $.y0, M = $.y;
          O.push(T, E), S.push(T, E + M), x = a.getItemVisual(C[P], "style");
        }
        var R, N = a.getItemLayout(C[0]), I = n.getModel("label"), B = I.get("margin"), Q = n.getModel("emphasis");
        if (g === "add") {
          var W = p[m] = new ct();
          R = new cfe({
            shape: {
              points: O,
              stackedOnPoints: S,
              smooth: 0.4,
              stackedOnSmooth: 0.4,
              smoothConstraint: !1
            },
            z2: 0
          }), W.add(R), s.add(W), n.isAnimationEnabled() && R.setClipPath($ot(R.getBoundingRect(), n, function() {
            R.removeClipPath();
          }));
        } else {
          var W = _[y];
          R = W.childAt(0), s.add(W), p[m] = W, tn(R, {
            shape: {
              points: O,
              stackedOnPoints: S
            }
          }, n), Zs(R);
        }
        Ei(R, ei(n), {
          labelDataIndex: C[P - 1],
          defaultText: a.getName(C[P - 1]),
          inheritColor: x.fill
        }, {
          normal: {
            verticalAlign: "middle"
            // align: 'right'
          }
        }), R.setTextConfig({
          position: null,
          local: !0
        });
        var H = R.getTextContent();
        H && (H.x = N.x - B, H.y = N.y0 + N.y / 2), R.useStyle(x), a.setItemGraphicEl(m, R), Ai(R, n), ur(R, Q.get("focus"), Q.get("blurScope"), Q.get("disabled"));
      }
      this._layersSeries = l, this._layers = p;
    }, e.type = "themeRiver", e;
  }(_n)
);
function $ot(t, e, n) {
  var r = new Zt({
    shape: {
      x: t.x - 10,
      y: t.y - 10,
      width: 0,
      height: t.height + 20
    }
  });
  return Vn(r, {
    shape: {
      x: t.x - 50,
      width: t.width + 100,
      height: t.height + 20
    }
  }, e, n), r;
}
var TI = 2, Aot = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n) {
      t.prototype.init.apply(this, arguments), this.legendVisualProvider = new S1(We(this.getData, this), We(this.getRawData, this));
    }, e.prototype.fixData = function(n) {
      var r = n.length, i = {}, a = xk(n, function(d) {
        return i.hasOwnProperty(d[0] + "") || (i[d[0] + ""] = -1), d[2];
      }), o = [];
      a.buckets.each(function(d, h) {
        o.push({
          name: h,
          dataList: d
        });
      });
      for (var s = o.length, l = 0; l < s; ++l) {
        for (var u = o[l].name, c = 0; c < o[l].dataList.length; ++c) {
          var f = o[l].dataList[c][0] + "";
          i[f] = l;
        }
        for (var f in i)
          i.hasOwnProperty(f) && i[f] !== l && (i[f] = l, n[r] = [f, 0, u], r++);
      }
      return n;
    }, e.prototype.getInitialData = function(n, r) {
      for (var i = this.getReferringComponents("singleAxis", Er).models[0], a = i.get("type"), o = yn(n.data, function(p) {
        return p[2] !== void 0;
      }), s = this.fixData(o || []), l = [], u = this.nameMap = Ze(), c = 0, f = 0; f < s.length; ++f)
        l.push(s[f][TI]), u.get(s[f][TI]) || (u.set(s[f][TI], c), c++);
      var d = Mm(s, {
        coordDimensions: ["single"],
        dimensionsDefine: [{
          name: "time",
          type: YC(a)
        }, {
          name: "value",
          type: "float"
        }, {
          name: "name",
          type: "ordinal"
        }],
        encodeDefine: {
          single: 0,
          value: 1,
          itemName: 2
        }
      }).dimensions, h = new Fi(d, this);
      return h.initData(s), h;
    }, e.prototype.getLayerSeries = function() {
      for (var n = this.getData(), r = n.count(), i = [], a = 0; a < r; ++a)
        i[a] = a;
      var o = n.mapDimension("single"), s = xk(i, function(u) {
        return n.get("name", u);
      }), l = [];
      return s.buckets.each(function(u, c) {
        u.sort(function(f, d) {
          return n.get(o, f) - n.get(o, d);
        }), l.push({
          name: c,
          indices: u
        });
      }), l;
    }, e.prototype.getAxisTooltipData = function(n, r, i) {
      Se(n) || (n = n ? [n] : []);
      for (var a = this.getData(), o = this.getLayerSeries(), s = [], l = o.length, u, c = 0; c < l; ++c) {
        for (var f = Number.MAX_VALUE, d = -1, h = o[c].indices.length, p = 0; p < h; ++p) {
          var v = a.get(n[0], o[c].indices[p]), g = Math.abs(v - r);
          g <= f && (u = v, f = g, d = o[c].indices[p]);
        }
        s.push(d);
      }
      return {
        dataIndices: s,
        nestestValue: u
      };
    }, e.prototype.formatTooltip = function(n, r, i) {
      var a = this.getData(), o = a.getName(n), s = a.get(a.mapDimension("value"), n);
      return ti("nameValue", {
        name: o,
        value: s
      });
    }, e.type = "series.themeRiver", e.dependencies = ["singleAxis"], e.defaultOption = {
      // zlevel: 0,
      z: 2,
      colorBy: "data",
      coordinateSystem: "singleAxis",
      // gap in axis's orthogonal orientation
      boundaryGap: ["10%", "10%"],
      // legendHoverLink: true,
      singleAxisIndex: 0,
      animationEasing: "linear",
      label: {
        margin: 4,
        show: !0,
        position: "left",
        fontSize: 11
      },
      emphasis: {
        label: {
          show: !0
        }
      }
    }, e;
  }(Cn)
);
function Eot(t, e) {
  t.eachSeriesByType("themeRiver", function(n) {
    var r = n.getData(), i = n.coordinateSystem, a = {}, o = i.getRect();
    a.rect = o;
    var s = n.get("boundaryGap"), l = i.getAxis();
    if (a.boundaryGap = s, l.orient === "horizontal") {
      s[0] = ze(s[0], o.height), s[1] = ze(s[1], o.height);
      var u = o.height - s[0] - s[1];
      cX(r, n, u);
    } else {
      s[0] = ze(s[0], o.width), s[1] = ze(s[1], o.width);
      var c = o.width - s[0] - s[1];
      cX(r, n, c);
    }
    r.setLayout("layoutInfo", a);
  });
}
function cX(t, e, n) {
  if (t.count())
    for (var r = e.coordinateSystem, i = e.getLayerSeries(), a = t.mapDimension("single"), o = t.mapDimension("value"), s = Ce(i, function(g) {
      return Ce(g.indices, function(m) {
        var y = r.dataToPoint(t.get(a, m));
        return y[1] = t.get(o, m), y;
      });
    }), l = Mot(s), u = l.y0, c = n / l.max, f = i.length, d = i[0].indices.length, h, p = 0; p < d; ++p) {
      h = u[p] * c, t.setItemLayout(i[0].indices[p], {
        layerIndex: 0,
        x: s[0][p][0],
        y0: h,
        y: s[0][p][1] * c
      });
      for (var v = 1; v < f; ++v)
        h += s[v - 1][p][1] * c, t.setItemLayout(i[v].indices[p], {
          layerIndex: v,
          x: s[v][p][0],
          y0: h,
          y: s[v][p][1] * c
        });
    }
}
function Mot(t) {
  for (var e = t.length, n = t[0].length, r = [], i = [], a = 0, o = 0; o < n; ++o) {
    for (var s = 0, l = 0; l < e; ++l)
      s += t[l][o][1];
    s > a && (a = s), r.push(s);
  }
  for (var u = 0; u < n; ++u)
    i[u] = (a - r[u]) / 2;
  a = 0;
  for (var c = 0; c < n; ++c) {
    var f = r[c] + i[c];
    f > a && (a = f);
  }
  return {
    y0: i,
    max: a
  };
}
function Iot(t) {
  t.registerChartView(Pot), t.registerSeriesModel(Aot), t.registerLayout(Eot), t.registerProcessor(O1("themeRiver"));
}
var Dot = 2, Rot = 4, fX = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i, a) {
      var o = t.call(this) || this;
      o.z2 = Dot, o.textConfig = {
        inside: !0
      }, ft(o).seriesIndex = r.seriesIndex;
      var s = new jt({
        z2: Rot,
        silent: n.getModel().get(["label", "silent"])
      });
      return o.setTextContent(s), o.updateData(!0, n, r, i, a), o;
    }
    return e.prototype.updateData = function(n, r, i, a, o) {
      this.node = r, r.piece = this, i = i || this._seriesModel, a = a || this._ecModel;
      var s = this;
      ft(s).dataIndex = r.dataIndex;
      var l = r.getModel(), u = l.getModel("emphasis"), c = r.getLayout(), f = _e({}, c);
      f.label = null;
      var d = r.getVisual("style");
      d.lineJoin = "bevel";
      var h = r.getVisual("decal");
      h && (d.decal = Gg(h, o));
      var p = ch(l.getModel("itemStyle"), f, !0);
      _e(f, p), F(da, function(y) {
        var _ = s.ensureState(y), O = l.getModel([y, "itemStyle"]);
        _.style = O.getItemStyle();
        var S = ch(O, f);
        S && (_.shape = S);
      }), n ? (s.setShape(f), s.shape.r = c.r0, Vn(s, {
        shape: {
          r: c.r
        }
      }, i, r.dataIndex)) : (tn(s, {
        shape: f
      }, i), Zs(s)), s.useStyle(d), this._updateLabel(i);
      var v = l.getShallow("cursor");
      v && s.attr("cursor", v), this._seriesModel = i || this._seriesModel, this._ecModel = a || this._ecModel;
      var g = u.get("focus"), m = g === "ancestor" ? r.getAncestorsIndices() : g === "descendant" ? r.getDescendantIndices() : g;
      ur(this, m, u.get("blurScope"), u.get("disabled"));
    }, e.prototype._updateLabel = function(n) {
      var r = this, i = this.node.getModel(), a = i.getModel("label"), o = this.node.getLayout(), s = o.endAngle - o.startAngle, l = (o.startAngle + o.endAngle) / 2, u = Math.cos(l), c = Math.sin(l), f = this, d = f.getTextContent(), h = this.node.dataIndex, p = a.get("minAngle") / 180 * Math.PI, v = a.get("show") && !(p != null && Math.abs(s) < p);
      d.ignore = !v, F(Ub, function(m) {
        var y = m === "normal" ? i.getModel("label") : i.getModel([m, "label"]), _ = m === "normal", O = _ ? d : d.ensureState(m), S = n.getFormattedLabel(h, m);
        _ && (S = S || r.node.name), O.style = Mn(y, {}, null, m !== "normal", !0), S && (O.style.text = S);
        var x = y.get("show");
        x != null && !_ && (O.ignore = !x);
        var C = g(y, "position"), P = _ ? f : f.states[m], $ = P.style.fill;
        P.textConfig = {
          outsideFill: y.get("color") === "inherit" ? $ : null,
          inside: C !== "outside"
        };
        var T, E = g(y, "distance") || 0, M = g(y, "align"), R = g(y, "rotate"), N = Math.PI * 0.5, I = Math.PI * 1.5, B = oo(R === "tangential" ? Math.PI / 2 - l : l), Q = B > N && !Vg(B - N) && B < I;
        C === "outside" ? (T = o.r + E, M = Q ? "right" : "left") : !M || M === "center" ? (s === 2 * Math.PI && o.r0 === 0 ? T = 0 : T = (o.r + o.r0) / 2, M = "center") : M === "left" ? (T = o.r0 + E, M = Q ? "right" : "left") : M === "right" && (T = o.r - E, M = Q ? "left" : "right"), O.style.align = M, O.style.verticalAlign = g(y, "verticalAlign") || "middle", O.x = T * u + o.cx, O.y = T * c + o.cy;
        var W = 0;
        R === "radial" ? W = oo(-l) + (Q ? Math.PI : 0) : R === "tangential" ? W = oo(Math.PI / 2 - l) + (Q ? Math.PI : 0) : Kt(R) && (W = R * Math.PI / 180), O.rotation = oo(W);
      });
      function g(m, y) {
        var _ = m.get(y);
        return _ ?? a.get(y);
      }
      d.dirtyStyle();
    }, e;
  }(ha)
), wL = "sunburstRootToNode", dX = "sunburstHighlight", kot = "sunburstUnhighlight";
function Lot(t) {
  t.registerAction({
    type: wL,
    update: "updateView"
  }, function(e, n) {
    n.eachComponent({
      mainType: "series",
      subType: "sunburst",
      query: e
    }, r);
    function r(i, a) {
      var o = s_(e, [wL], i);
      if (o) {
        var s = i.getViewRoot();
        s && (e.direction = j3(s, o.node) ? "rollUp" : "drillDown"), i.resetViewRoot(o.node);
      }
    }
  }), t.registerAction({
    type: dX,
    update: "none"
  }, function(e, n, r) {
    e = _e({}, e), n.eachComponent({
      mainType: "series",
      subType: "sunburst",
      query: e
    }, i);
    function i(a) {
      var o = s_(e, [dX], a);
      o && (e.dataIndex = o.node.dataIndex);
    }
    process.env.NODE_ENV !== "production" && yr("sunburstHighlight", "highlight"), r.dispatchAction(_e(e, {
      type: "highlight"
    }));
  }), t.registerAction({
    type: kot,
    update: "updateView"
  }, function(e, n, r) {
    e = _e({}, e), process.env.NODE_ENV !== "production" && yr("sunburstUnhighlight", "downplay"), r.dispatchAction(_e(e, {
      type: "downplay"
    }));
  });
}
var Not = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i, a) {
      var o = this;
      this.seriesModel = n, this.api = i, this.ecModel = r;
      var s = n.getData(), l = s.tree.root, u = n.getViewRoot(), c = this.group, f = n.get("renderLabelForZeroData"), d = [];
      u.eachNode(function(y) {
        d.push(y);
      });
      var h = this._oldChildren || [];
      p(d, h), m(l, u), this._initEvents(), this._oldChildren = d;
      function p(y, _) {
        if (y.length === 0 && _.length === 0)
          return;
        new Qu(_, y, O, O).add(S).update(S).remove(vt(S, null)).execute();
        function O(x) {
          return x.getId();
        }
        function S(x, C) {
          var P = x == null ? null : y[x], $ = C == null ? null : _[C];
          v(P, $);
        }
      }
      function v(y, _) {
        if (!f && y && !y.getValue() && (y = null), y !== l && _ !== l) {
          if (_ && _.piece)
            y ? (_.piece.updateData(!1, y, n, r, i), s.setItemGraphicEl(y.dataIndex, _.piece)) : g(_);
          else if (y) {
            var O = new fX(y, n, r, i);
            c.add(O), s.setItemGraphicEl(y.dataIndex, O);
          }
        }
      }
      function g(y) {
        y && y.piece && (c.remove(y.piece), y.piece = null);
      }
      function m(y, _) {
        _.depth > 0 ? (o.virtualPiece ? o.virtualPiece.updateData(!1, y, n, r, i) : (o.virtualPiece = new fX(y, n, r, i), c.add(o.virtualPiece)), _.piece.off("click"), o.virtualPiece.on("click", function(O) {
          o._rootToNode(_.parentNode);
        })) : o.virtualPiece && (c.remove(o.virtualPiece), o.virtualPiece = null);
      }
    }, e.prototype._initEvents = function() {
      var n = this;
      this.group.off("click"), this.group.on("click", function(r) {
        var i = !1, a = n.seriesModel.getViewRoot();
        a.eachNode(function(o) {
          if (!i && o.piece && o.piece === r.target) {
            var s = o.getModel().get("nodeClick");
            if (s === "rootToNode")
              n._rootToNode(o);
            else if (s === "link") {
              var l = o.getModel(), u = l.get("link");
              if (u) {
                var c = l.get("target", !0) || "_blank";
                BC(u, c);
              }
            }
            i = !0;
          }
        });
      });
    }, e.prototype._rootToNode = function(n) {
      n !== this.seriesModel.getViewRoot() && this.api.dispatchAction({
        type: wL,
        from: this.uid,
        seriesId: this.seriesModel.id,
        targetNode: n
      });
    }, e.prototype.containPoint = function(n, r) {
      var i = r.getData(), a = i.getItemLayout(0);
      if (a) {
        var o = n[0] - a.cx, s = n[1] - a.cy, l = Math.sqrt(o * o + s * s);
        return l <= a.r && l >= a.r0;
      }
    }, e.type = "sunburst", e;
  }(_n)
), Bot = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.ignoreStyleOnData = !0, n;
    }
    return e.prototype.getInitialData = function(n, r) {
      var i = {
        name: n.name,
        children: n.data
      };
      Vde(i);
      var a = this._levelModels = Ce(n.levels || [], function(l) {
        return new xn(l, this, r);
      }, this), o = G3.createTree(i, this, s);
      function s(l) {
        l.wrapMethod("getItemModel", function(u, c) {
          var f = o.getNodeByDataIndex(c), d = a[f.depth];
          return d && (u.parentModel = d), u;
        });
      }
      return o.data;
    }, e.prototype.optionUpdated = function() {
      this.resetViewRoot();
    }, e.prototype.getDataParams = function(n) {
      var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
      return r.treePathInfo = GP(i, this), r;
    }, e.prototype.getLevelModel = function(n) {
      return this._levelModels && this._levelModels[n.depth];
    }, e.prototype.getViewRoot = function() {
      return this._viewRoot;
    }, e.prototype.resetViewRoot = function(n) {
      n ? this._viewRoot = n : n = this._viewRoot;
      var r = this.getRawData().tree.root;
      (!n || n !== r && !r.contains(n)) && (this._viewRoot = r);
    }, e.prototype.enableAriaDecal = function() {
      Gfe(this);
    }, e.type = "series.sunburst", e.defaultOption = {
      // zlevel: 0,
      z: 2,
      // 默认全局居中
      center: ["50%", "50%"],
      radius: [0, "75%"],
      // 默认顺时针
      clockwise: !0,
      startAngle: 90,
      // 最小角度改为0
      minAngle: 0,
      // If still show when all data zero.
      stillShowZeroSum: !0,
      // 'rootToNode', 'link', or false
      nodeClick: "rootToNode",
      renderLabelForZeroData: !1,
      label: {
        // could be: 'radial', 'tangential', or 'none'
        rotate: "radial",
        show: !0,
        opacity: 1,
        // 'left' is for inner side of inside, and 'right' is for outer
        // side for inside
        align: "center",
        position: "inside",
        distance: 5,
        silent: !0
      },
      itemStyle: {
        borderWidth: 1,
        borderColor: "white",
        borderType: "solid",
        shadowBlur: 0,
        shadowColor: "rgba(0, 0, 0, 0.2)",
        shadowOffsetX: 0,
        shadowOffsetY: 0,
        opacity: 1
      },
      emphasis: {
        focus: "descendant"
      },
      blur: {
        itemStyle: {
          opacity: 0.2
        },
        label: {
          opacity: 0.1
        }
      },
      // Animation type can be expansion, scale.
      animationType: "expansion",
      animationDuration: 1e3,
      animationDurationUpdate: 500,
      data: [],
      /**
       * Sort order.
       *
       * Valid values: 'desc', 'asc', null, or callback function.
       * 'desc' and 'asc' for descend and ascendant order;
       * null for not sorting;
       * example of callback function:
       * function(nodeA, nodeB) {
       *     return nodeA.getValue() - nodeB.getValue();
       * }
       */
      sort: "desc"
    }, e;
  }(Cn)
);
function Vde(t) {
  var e = 0;
  F(t.children, function(r) {
    Vde(r);
    var i = r.value;
    Se(i) && (i = i[0]), e += i;
  });
  var n = t.value;
  Se(n) && (n = n[0]), (n == null || isNaN(n)) && (n = e), n < 0 && (n = 0), Se(t.value) ? t.value[0] = n : t.value = n;
}
var hX = Math.PI / 180;
function zot(t, e, n) {
  e.eachSeriesByType(t, function(r) {
    var i = r.get("center"), a = r.get("radius");
    Se(a) || (a = [0, a]), Se(i) || (i = [i, i]);
    var o = n.getWidth(), s = n.getHeight(), l = Math.min(o, s), u = ze(i[0], o), c = ze(i[1], s), f = ze(a[0], l / 2), d = ze(a[1], l / 2), h = -r.get("startAngle") * hX, p = r.get("minAngle") * hX, v = r.getData().tree.root, g = r.getViewRoot(), m = g.depth, y = r.get("sort");
    y != null && Fde(g, y);
    var _ = 0;
    F(g.children, function(B) {
      !isNaN(B.getValue()) && _++;
    });
    var O = g.getValue(), S = Math.PI / (O || _) * 2, x = g.depth > 0, C = g.height - (x ? -1 : 1), P = (d - f) / (C || 1), $ = r.get("clockwise"), T = r.get("stillShowZeroSum"), E = $ ? 1 : -1, M = function(B, Q) {
      if (B) {
        var W = Q;
        if (B !== v) {
          var H = B.getValue(), U = O === 0 && T ? S : H * S;
          U < p && (U = p), W = Q + E * U;
          var j = B.depth - m - (x ? -1 : 1), Y = f + P * j, ne = f + P * (j + 1), fe = r.getLevelModel(B);
          if (fe) {
            var ue = fe.get("r0", !0), ye = fe.get("r", !0), se = fe.get("radius", !0);
            se != null && (ue = se[0], ye = se[1]), ue != null && (Y = ze(ue, l / 2)), ye != null && (ne = ze(ye, l / 2));
          }
          B.setLayout({
            angle: U,
            startAngle: Q,
            endAngle: W,
            clockwise: $,
            cx: u,
            cy: c,
            r0: Y,
            r: ne
          });
        }
        if (B.children && B.children.length) {
          var he = 0;
          F(B.children, function(re) {
            he += M(re, Q + he);
          });
        }
        return W - Q;
      }
    };
    if (x) {
      var R = f, N = f + P, I = Math.PI * 2;
      v.setLayout({
        angle: I,
        startAngle: h,
        endAngle: h + I,
        clockwise: $,
        cx: u,
        cy: c,
        r0: R,
        r: N
      });
    }
    M(g, h);
  });
}
function Fde(t, e) {
  var n = t.children || [];
  t.children = Vot(n, e), n.length && F(t.children, function(r) {
    Fde(r, e);
  });
}
function Vot(t, e) {
  if (qe(e)) {
    var n = Ce(t, function(i, a) {
      var o = i.getValue();
      return {
        params: {
          depth: i.depth,
          height: i.height,
          dataIndex: i.dataIndex,
          getValue: function() {
            return o;
          }
        },
        index: a
      };
    });
    return n.sort(function(i, a) {
      return e(i.params, a.params);
    }), Ce(n, function(i) {
      return t[i.index];
    });
  } else {
    var r = e === "asc";
    return t.sort(function(i, a) {
      var o = (i.getValue() - a.getValue()) * (r ? 1 : -1);
      return o === 0 ? (i.dataIndex - a.dataIndex) * (r ? -1 : 1) : o;
    });
  }
}
function Fot(t) {
  var e = {};
  function n(r, i, a) {
    for (var o = r; o && o.depth > 1; )
      o = o.parentNode;
    var s = i.getColorFromPalette(o.name || o.dataIndex + "", e);
    return r.depth > 1 && Ve(s) && (s = CC(s, (r.depth - 1) / (a - 1) * 0.5)), s;
  }
  t.eachSeriesByType("sunburst", function(r) {
    var i = r.getData(), a = i.tree;
    a.eachNode(function(o) {
      var s = o.getModel(), l = s.getModel("itemStyle").getItemStyle();
      l.fill || (l.fill = n(o, r, a.root.height));
      var u = i.ensureUniqueItemVisual(o.dataIndex, "style");
      _e(u, l);
    });
  });
}
function Wot(t) {
  t.registerChartView(Not), t.registerSeriesModel(Bot), t.registerLayout(vt(zot, "sunburst")), t.registerProcessor(vt(O1, "sunburst")), t.registerVisual(Fot), Lot(t);
}
var pX = {
  color: "fill",
  borderColor: "stroke"
}, Qot = {
  symbol: 1,
  symbolSize: 1,
  symbolKeepAspect: 1,
  legendIcon: 1,
  visualMeta: 1,
  liftZ: 1,
  decal: 1
}, Iu = Ut(), Hot = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.optionUpdated = function() {
      this.currentZLevel = this.get("zlevel", !0), this.currentZ = this.get("z", !0);
    }, e.prototype.getInitialData = function(n, r) {
      return Yl(null, this);
    }, e.prototype.getDataParams = function(n, r, i) {
      var a = t.prototype.getDataParams.call(this, n, r);
      return i && (a.info = Iu(i).info), a;
    }, e.type = "series.custom", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
      coordinateSystem: "cartesian2d",
      // zlevel: 0,
      z: 2,
      legendHoverLink: !0,
      // Custom series will not clip by default.
      // Some case will use custom series to draw label
      // For example https://echarts.apache.org/examples/en/editor.html?c=custom-gantt-flight
      clip: !1
      // Cartesian coordinate system
      // xAxisIndex: 0,
      // yAxisIndex: 0,
      // Polar coordinate system
      // polarIndex: 0,
      // Geo coordinate system
      // geoIndex: 0,
    }, e;
  }(Cn)
);
function Got(t, e) {
  return e = e || [0, 0], Ce(["x", "y"], function(n, r) {
    var i = this.getAxis(n), a = e[r], o = t[r] / 2;
    return i.type === "category" ? i.getBandWidth() : Math.abs(i.dataToCoord(a - o) - i.dataToCoord(a + o));
  }, this);
}
function jot(t) {
  var e = t.master.getRect();
  return {
    coordSys: {
      // The name exposed to user is always 'cartesian2d' but not 'grid'.
      type: "cartesian2d",
      x: e.x,
      y: e.y,
      width: e.width,
      height: e.height
    },
    api: {
      coord: function(n) {
        return t.dataToPoint(n);
      },
      size: We(Got, t)
    }
  };
}
function Zot(t, e) {
  return e = e || [0, 0], Ce([0, 1], function(n) {
    var r = e[n], i = t[n] / 2, a = [], o = [];
    return a[n] = r - i, o[n] = r + i, a[1 - n] = o[1 - n] = e[1 - n], Math.abs(this.dataToPoint(a)[n] - this.dataToPoint(o)[n]);
  }, this);
}
function Uot(t) {
  var e = t.getBoundingRect();
  return {
    coordSys: {
      type: "geo",
      x: e.x,
      y: e.y,
      width: e.width,
      height: e.height,
      zoom: t.getZoom()
    },
    api: {
      coord: function(n) {
        return t.dataToPoint(n);
      },
      size: We(Zot, t)
    }
  };
}
function Xot(t, e) {
  var n = this.getAxis(), r = e instanceof Array ? e[0] : e, i = (t instanceof Array ? t[0] : t) / 2;
  return n.type === "category" ? n.getBandWidth() : Math.abs(n.dataToCoord(r - i) - n.dataToCoord(r + i));
}
function Yot(t) {
  var e = t.getRect();
  return {
    coordSys: {
      type: "singleAxis",
      x: e.x,
      y: e.y,
      width: e.width,
      height: e.height
    },
    api: {
      coord: function(n) {
        return t.dataToPoint(n);
      },
      size: We(Xot, t)
    }
  };
}
function qot(t, e) {
  return e = e || [0, 0], Ce(["Radius", "Angle"], function(n, r) {
    var i = "get" + n + "Axis", a = this[i](), o = e[r], s = t[r] / 2, l = a.type === "category" ? a.getBandWidth() : Math.abs(a.dataToCoord(o - s) - a.dataToCoord(o + s));
    return n === "Angle" && (l = l * Math.PI / 180), l;
  }, this);
}
function Kot(t) {
  var e = t.getRadiusAxis(), n = t.getAngleAxis(), r = e.getExtent();
  return r[0] > r[1] && r.reverse(), {
    coordSys: {
      type: "polar",
      cx: t.cx,
      cy: t.cy,
      r: r[1],
      r0: r[0]
    },
    api: {
      coord: function(i) {
        var a = e.dataToRadius(i[0]), o = n.dataToAngle(i[1]), s = t.coordToPoint([a, o]);
        return s.push(a, o * Math.PI / 180), s;
      },
      size: We(qot, t)
    }
  };
}
function Jot(t) {
  var e = t.getRect(), n = t.getRangeInfo();
  return {
    coordSys: {
      type: "calendar",
      x: e.x,
      y: e.y,
      width: e.width,
      height: e.height,
      cellWidth: t.getCellWidth(),
      cellHeight: t.getCellHeight(),
      rangeInfo: {
        start: n.start,
        end: n.end,
        weeks: n.weeks,
        dayCount: n.allDay
      }
    },
    api: {
      coord: function(r, i) {
        return t.dataToPoint(r, i);
      }
    }
  };
}
var vX = {};
function Wde(t, e, n, r) {
  return t && (t.legacy || t.legacy !== !1 && !n && !r && e !== "tspan" && (e === "text" || Qe(t, "text")));
}
function Qde(t, e, n) {
  var r = t, i, a, o;
  if (e === "text")
    o = r;
  else {
    o = {}, Qe(r, "text") && (o.text = r.text), Qe(r, "rich") && (o.rich = r.rich), Qe(r, "textFill") && (o.fill = r.textFill), Qe(r, "textStroke") && (o.stroke = r.textStroke), Qe(r, "fontFamily") && (o.fontFamily = r.fontFamily), Qe(r, "fontSize") && (o.fontSize = r.fontSize), Qe(r, "fontStyle") && (o.fontStyle = r.fontStyle), Qe(r, "fontWeight") && (o.fontWeight = r.fontWeight), a = {
      type: "text",
      style: o,
      // ec4 does not support rectText trigger.
      // And when text position is different in normal and emphasis
      // => hover text trigger emphasis;
      // => text position changed, leave mouse pointer immediately;
      // That might cause incorrect state.
      silent: !0
    }, i = {};
    var s = Qe(r, "textPosition");
    n ? i.position = s ? r.textPosition : "inside" : s && (i.position = r.textPosition), Qe(r, "textPosition") && (i.position = r.textPosition), Qe(r, "textOffset") && (i.offset = r.textOffset), Qe(r, "textRotation") && (i.rotation = r.textRotation), Qe(r, "textDistance") && (i.distance = r.textDistance);
  }
  return gX(o, t), F(o.rich, function(l) {
    gX(l, l);
  }), {
    textConfig: i,
    textContent: a
  };
}
function gX(t, e) {
  e && (e.font = e.textFont || e.font, Qe(e, "textStrokeWidth") && (t.lineWidth = e.textStrokeWidth), Qe(e, "textAlign") && (t.align = e.textAlign), Qe(e, "textVerticalAlign") && (t.verticalAlign = e.textVerticalAlign), Qe(e, "textLineHeight") && (t.lineHeight = e.textLineHeight), Qe(e, "textWidth") && (t.width = e.textWidth), Qe(e, "textHeight") && (t.height = e.textHeight), Qe(e, "textBackgroundColor") && (t.backgroundColor = e.textBackgroundColor), Qe(e, "textPadding") && (t.padding = e.textPadding), Qe(e, "textBorderColor") && (t.borderColor = e.textBorderColor), Qe(e, "textBorderWidth") && (t.borderWidth = e.textBorderWidth), Qe(e, "textBorderRadius") && (t.borderRadius = e.textBorderRadius), Qe(e, "textBoxShadowColor") && (t.shadowColor = e.textBoxShadowColor), Qe(e, "textBoxShadowBlur") && (t.shadowBlur = e.textBoxShadowBlur), Qe(e, "textBoxShadowOffsetX") && (t.shadowOffsetX = e.textBoxShadowOffsetX), Qe(e, "textBoxShadowOffsetY") && (t.shadowOffsetY = e.textBoxShadowOffsetY));
}
function mX(t, e, n) {
  var r = t;
  r.textPosition = r.textPosition || n.position || "inside", n.offset != null && (r.textOffset = n.offset), n.rotation != null && (r.textRotation = n.rotation), n.distance != null && (r.textDistance = n.distance);
  var i = r.textPosition.indexOf("inside") >= 0, a = t.fill || "#000";
  yX(r, e);
  var o = r.textFill == null;
  return i ? o && (r.textFill = n.insideFill || "#fff", !r.textStroke && n.insideStroke && (r.textStroke = n.insideStroke), !r.textStroke && (r.textStroke = a), r.textStrokeWidth == null && (r.textStrokeWidth = 2)) : (o && (r.textFill = t.fill || n.outsideFill || "#000"), !r.textStroke && n.outsideStroke && (r.textStroke = n.outsideStroke)), r.text = e.text, r.rich = e.rich, F(e.rich, function(s) {
    yX(s, s);
  }), r;
}
function yX(t, e) {
  e && (Qe(e, "fill") && (t.textFill = e.fill), Qe(e, "stroke") && (t.textStroke = e.fill), Qe(e, "lineWidth") && (t.textStrokeWidth = e.lineWidth), Qe(e, "font") && (t.font = e.font), Qe(e, "fontStyle") && (t.fontStyle = e.fontStyle), Qe(e, "fontWeight") && (t.fontWeight = e.fontWeight), Qe(e, "fontSize") && (t.fontSize = e.fontSize), Qe(e, "fontFamily") && (t.fontFamily = e.fontFamily), Qe(e, "align") && (t.textAlign = e.align), Qe(e, "verticalAlign") && (t.textVerticalAlign = e.verticalAlign), Qe(e, "lineHeight") && (t.textLineHeight = e.lineHeight), Qe(e, "width") && (t.textWidth = e.width), Qe(e, "height") && (t.textHeight = e.height), Qe(e, "backgroundColor") && (t.textBackgroundColor = e.backgroundColor), Qe(e, "padding") && (t.textPadding = e.padding), Qe(e, "borderColor") && (t.textBorderColor = e.borderColor), Qe(e, "borderWidth") && (t.textBorderWidth = e.borderWidth), Qe(e, "borderRadius") && (t.textBorderRadius = e.borderRadius), Qe(e, "shadowColor") && (t.textBoxShadowColor = e.shadowColor), Qe(e, "shadowBlur") && (t.textBoxShadowBlur = e.shadowBlur), Qe(e, "shadowOffsetX") && (t.textBoxShadowOffsetX = e.shadowOffsetX), Qe(e, "shadowOffsetY") && (t.textBoxShadowOffsetY = e.shadowOffsetY), Qe(e, "textShadowColor") && (t.textShadowColor = e.textShadowColor), Qe(e, "textShadowBlur") && (t.textShadowBlur = e.textShadowBlur), Qe(e, "textShadowOffsetX") && (t.textShadowOffsetX = e.textShadowOffsetX), Qe(e, "textShadowOffsetY") && (t.textShadowOffsetY = e.textShadowOffsetY));
}
function bX(t, e) {
  if (process.env.NODE_ENV !== "production") {
    var n = t + "^_^" + e;
    vX[n] || (console.warn('[ECharts] DEPRECATED: "' + t + '" has been deprecated. ' + e), vX[n] = !0);
  }
}
var Hde = {
  position: ["x", "y"],
  scale: ["scaleX", "scaleY"],
  origin: ["originX", "originY"]
}, _X = kt(Hde), lT = os(Hl, function(t, e) {
  return t[e] = 1, t;
}, {}), OX = Hl.join(", "), uT = ["", "style", "shape", "extra"], Xg = Ut();
function s6(t, e, n, r, i) {
  var a = t + "Animation", o = Om(t, r, i) || {}, s = Xg(e).userDuring;
  return o.duration > 0 && (o.during = s ? We(ist, {
    el: e,
    userDuring: s
  }) : null, o.setToFinal = !0, o.scope = t), _e(o, n[a]), o;
}
function yw(t, e, n, r) {
  r = r || {};
  var i = r.dataIndex, a = r.isInit, o = r.clearStyle, s = n.isAnimationEnabled(), l = Xg(t), u = e.style;
  l.userDuring = e.during;
  var c = {}, f = {};
  if (ost(t, e, f), xX("shape", e, f), xX("extra", e, f), !a && s && (ast(t, e, c), SX("shape", t, e, c), SX("extra", t, e, c), sst(t, e, u, c)), f.style = u, est(t, f, o), nst(t, e), s)
    if (a) {
      var d = {};
      F(uT, function(p) {
        var v = p ? e[p] : e;
        v && v.enterFrom && (p && (d[p] = d[p] || {}), _e(p ? d[p] : d, v.enterFrom));
      });
      var h = s6("enter", t, e, n, i);
      h.duration > 0 && t.animateFrom(d, h);
    } else
      tst(t, e, i || 0, n, c);
  Gde(t, e), u ? t.dirty() : t.markRedraw();
}
function Gde(t, e) {
  for (var n = Xg(t).leaveToProps, r = 0; r < uT.length; r++) {
    var i = uT[r], a = i ? e[i] : e;
    a && a.leaveTo && (n || (n = Xg(t).leaveToProps = {}), i && (n[i] = n[i] || {}), _e(i ? n[i] : n, a.leaveTo));
  }
}
function UP(t, e, n, r) {
  if (t) {
    var i = t.parent, a = Xg(t).leaveToProps;
    if (a) {
      var o = s6("update", t, e, n, 0);
      o.done = function() {
        i.remove(t);
      }, t.animateTo(a, o);
    } else
      i.remove(t);
  }
}
function Ah(t) {
  return t === "all";
}
function est(t, e, n) {
  var r = e.style;
  if (!t.isGroup && r) {
    if (n) {
      t.useStyle({});
      for (var i = t.animators, a = 0; a < i.length; a++) {
        var o = i[a];
        o.targetName === "style" && o.changeTarget(t.style);
      }
    }
    t.setStyle(r);
  }
  e && (e.style = null, e && t.attr(e), e.style = r);
}
function tst(t, e, n, r, i) {
  if (i) {
    var a = s6("update", t, e, r, n);
    a.duration > 0 && t.animateFrom(i, a);
  }
}
function nst(t, e) {
  Qe(e, "silent") && (t.silent = e.silent), Qe(e, "ignore") && (t.ignore = e.ignore), t instanceof ls && Qe(e, "invisible") && (t.invisible = e.invisible), t instanceof Dt && Qe(e, "autoBatch") && (t.autoBatch = e.autoBatch);
}
var gl = {}, rst = {
  // Usually other props do not need to be changed in animation during.
  setTransform: function(t, e) {
    return process.env.NODE_ENV !== "production" && at(Qe(lT, t), "Only " + OX + " available in `setTransform`."), gl.el[t] = e, this;
  },
  getTransform: function(t) {
    return process.env.NODE_ENV !== "production" && at(Qe(lT, t), "Only " + OX + " available in `getTransform`."), gl.el[t];
  },
  setShape: function(t, e) {
    process.env.NODE_ENV !== "production" && cv(t);
    var n = gl.el, r = n.shape || (n.shape = {});
    return r[t] = e, n.dirtyShape && n.dirtyShape(), this;
  },
  getShape: function(t) {
    process.env.NODE_ENV !== "production" && cv(t);
    var e = gl.el.shape;
    if (e)
      return e[t];
  },
  setStyle: function(t, e) {
    process.env.NODE_ENV !== "production" && cv(t);
    var n = gl.el, r = n.style;
    return r && (process.env.NODE_ENV !== "production" && mf(e) && nr("style." + t + " must not be assigned with NaN."), r[t] = e, n.dirtyStyle && n.dirtyStyle()), this;
  },
  getStyle: function(t) {
    process.env.NODE_ENV !== "production" && cv(t);
    var e = gl.el.style;
    if (e)
      return e[t];
  },
  setExtra: function(t, e) {
    process.env.NODE_ENV !== "production" && cv(t);
    var n = gl.el.extra || (gl.el.extra = {});
    return n[t] = e, this;
  },
  getExtra: function(t) {
    process.env.NODE_ENV !== "production" && cv(t);
    var e = gl.el.extra;
    if (e)
      return e[t];
  }
};
function cv(t) {
  if (process.env.NODE_ENV !== "production" && (t === "transition" || t === "enterFrom" || t === "leaveTo"))
    throw new Error('key must not be "' + t + '"');
}
function ist() {
  var t = this, e = t.el;
  if (e) {
    var n = Xg(e).userDuring, r = t.userDuring;
    if (n !== r) {
      t.el = t.userDuring = null;
      return;
    }
    gl.el = e, r(rst);
  }
}
function SX(t, e, n, r) {
  var i = n[t];
  if (i) {
    var a = e[t], o;
    if (a) {
      var s = n.transition, l = i.transition;
      if (l)
        if (!o && (o = r[t] = {}), Ah(l))
          _e(o, a);
        else
          for (var u = wn(l), c = 0; c < u.length; c++) {
            var f = u[c], d = a[f];
            o[f] = d;
          }
      else if (Ah(s) || St(s, t) >= 0) {
        !o && (o = r[t] = {});
        for (var h = kt(a), c = 0; c < h.length; c++) {
          var f = h[c], d = a[f];
          lst(i[f], d) && (o[f] = d);
        }
      }
    }
  }
}
function xX(t, e, n) {
  var r = e[t];
  if (r)
    for (var i = n[t] = {}, a = kt(r), o = 0; o < a.length; o++) {
      var s = a[o];
      i[s] = Jy(r[s]);
    }
}
function ast(t, e, n) {
  for (var r = e.transition, i = Ah(r) ? Hl : wn(r || []), a = 0; a < i.length; a++) {
    var o = i[a];
    if (!(o === "style" || o === "shape" || o === "extra")) {
      var s = t[o];
      process.env.NODE_ENV !== "production" && jde(o, "el.transition"), n[o] = s;
    }
  }
}
function ost(t, e, n) {
  for (var r = 0; r < _X.length; r++) {
    var i = _X[r], a = Hde[i], o = e[i];
    o && (n[a[0]] = o[0], n[a[1]] = o[1]);
  }
  for (var r = 0; r < Hl.length; r++) {
    var s = Hl[r];
    e[s] != null && (n[s] = e[s]);
  }
}
function sst(t, e, n, r) {
  if (n) {
    var i = t.style, a;
    if (i) {
      var o = n.transition, s = e.transition;
      if (o && !Ah(o)) {
        var l = wn(o);
        !a && (a = r.style = {});
        for (var u = 0; u < l.length; u++) {
          var c = l[u], f = i[c];
          a[c] = f;
        }
      } else if (t.getAnimationStyleProps && (Ah(s) || Ah(o) || St(s, "style") >= 0)) {
        var d = t.getAnimationStyleProps(), h = d ? d.style : null;
        if (h) {
          !a && (a = r.style = {});
          for (var p = kt(n), u = 0; u < p.length; u++) {
            var c = p[u];
            if (h[c]) {
              var f = i[c];
              a[c] = f;
            }
          }
        }
      }
    }
  }
}
function lst(t, e) {
  return Pi(t) ? t !== e : t != null && isFinite(t);
}
var jde;
process.env.NODE_ENV !== "production" && (jde = function(t, e) {
  Qe(lT, t) || nr("Prop `" + t + "` is not a permitted in `" + e + "`. Only `" + kt(lT).join("`, `") + "` are permitted.");
});
var Zde = Ut(), ust = ["percent", "easing", "shape", "style", "extra"];
function Ude(t) {
  t.stopAnimation("keyframe"), t.attr(Zde(t));
}
function cT(t, e, n) {
  if (!(!n.isAnimationEnabled() || !e)) {
    if (Se(e)) {
      F(e, function(s) {
        cT(t, s, n);
      });
      return;
    }
    var r = e.keyframes, i = e.duration;
    if (n && i == null) {
      var a = Om("enter", n, 0);
      i = a && a.duration;
    }
    if (!(!r || !i)) {
      var o = Zde(t);
      F(uT, function(s) {
        if (!(s && !t[s])) {
          var l, u = !1;
          r.sort(function(c, f) {
            return c.percent - f.percent;
          }), F(r, function(c) {
            var f = t.animators, d = s ? c[s] : c;
            if (process.env.NODE_ENV !== "production" && c.percent >= 1 && (u = !0), !!d) {
              var h = kt(d);
              if (s || (h = yn(h, function(g) {
                return St(ust, g) < 0;
              })), !!h.length) {
                l || (l = t.animate(s, e.loop, !0), l.scope = "keyframe");
                for (var p = 0; p < f.length; p++)
                  f[p] !== l && f[p].targetName === l.targetName && f[p].stopTracks(h);
                s && (o[s] = o[s] || {});
                var v = s ? o[s] : o;
                F(h, function(g) {
                  v[g] = ((s ? t[s] : t) || {})[g];
                }), l.whenWithKeys(i * c.percent, d, h, c.easing);
              }
            }
          }), l && (process.env.NODE_ENV !== "production" && (u || nr("End frame with percent: 1 is missing in the keyframeAnimation.", !0)), l.delay(e.delay || 0).duration(i).start(e.easing));
        }
      });
    }
  }
}
var Du = "emphasis", Zc = "normal", l6 = "blur", u6 = "select", xf = [Zc, Du, l6, u6], PI = {
  normal: ["itemStyle"],
  emphasis: [Du, "itemStyle"],
  blur: [l6, "itemStyle"],
  select: [u6, "itemStyle"]
}, $I = {
  normal: ["label"],
  emphasis: [Du, "label"],
  blur: [l6, "label"],
  select: [u6, "label"]
}, cst = ["x", "y"], fst = "e\0\0", Ro = {
  normal: {},
  emphasis: {},
  blur: {},
  select: {}
}, wX = {
  cartesian2d: jot,
  geo: Uot,
  single: Yot,
  polar: Kot,
  calendar: Jot
};
function fT(t) {
  return t instanceof Dt;
}
function CL(t) {
  return t instanceof ls;
}
function dst(t, e) {
  e.copyTransform(t), CL(e) && CL(t) && (e.setStyle(t.style), e.z = t.z, e.z2 = t.z2, e.zlevel = t.zlevel, e.invisible = t.invisible, e.ignore = t.ignore, fT(e) && fT(t) && e.setShape(t.shape));
}
var hst = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i, a) {
      this._progressiveEls = null;
      var o = this._data, s = n.getData(), l = this.group, u = CX(n, s, r, i);
      o || l.removeAll(), s.diff(o).add(function(f) {
        AI(i, null, f, u(f, a), n, l, s);
      }).remove(function(f) {
        var d = o.getItemGraphicEl(f);
        d && UP(d, Iu(d).option, n);
      }).update(function(f, d) {
        var h = o.getItemGraphicEl(d);
        AI(i, h, f, u(f, a), n, l, s);
      }).execute();
      var c = n.get("clip", !0) ? b1(n.coordinateSystem, !1, n) : null;
      c ? l.setClipPath(c) : l.removeClipPath(), this._data = s;
    }, e.prototype.incrementalPrepareRender = function(n, r, i) {
      this.group.removeAll(), this._data = null;
    }, e.prototype.incrementalRender = function(n, r, i, a, o) {
      var s = r.getData(), l = CX(r, s, i, a), u = this._progressiveEls = [];
      function c(h) {
        h.isGroup || (h.incremental = !0, h.ensureState("emphasis").hoverLayer = !0);
      }
      for (var f = n.start; f < n.end; f++) {
        var d = AI(null, null, f, l(f, o), r, this.group, s);
        d && (d.traverse(c), u.push(d));
      }
    }, e.prototype.eachRendered = function(n) {
      Nf(this._progressiveEls || this.group, n);
    }, e.prototype.filterForExposedEvent = function(n, r, i, a) {
      var o = r.element;
      if (o == null || i.name === o)
        return !0;
      for (; (i = i.__hostTarget || i.parent) && i !== this.group; )
        if (i.name === o)
          return !0;
      return !1;
    }, e.type = "custom", e;
  }(_n)
);
function c6(t) {
  var e = t.type, n;
  if (e === "path") {
    var r = t.shape, i = r.width != null && r.height != null ? {
      x: r.x || 0,
      y: r.y || 0,
      width: r.width,
      height: r.height
    } : null, a = qde(r);
    n = d1(a, null, i, r.layout || "center"), Iu(n).customPathData = a;
  } else if (e === "image")
    n = new ci({}), Iu(n).customImagePath = t.style.image;
  else if (e === "text")
    n = new jt({});
  else if (e === "group")
    n = new ct();
  else {
    if (e === "compoundPath")
      throw new Error('"compoundPath" is not supported yet.');
    var o = wP(e);
    if (!o) {
      var s = "";
      process.env.NODE_ENV !== "production" && (s = 'graphic type "' + e + '" can not be found.'), cn(s);
    }
    n = new o();
  }
  return Iu(n).customGraphicType = e, n.name = t.name, n.z2EmphasisLift = 1, n.z2SelectLift = 1, n;
}
function f6(t, e, n, r, i, a, o) {
  Ude(e);
  var s = i && i.normal.cfg;
  s && e.setTextConfig(s), r && r.transition == null && (r.transition = cst);
  var l = r && r.style;
  if (l) {
    if (e.type === "text") {
      var u = l;
      Qe(u, "textFill") && (u.fill = u.textFill), Qe(u, "textStroke") && (u.stroke = u.textStroke);
    }
    var c = void 0, f = fT(e) ? l.decal : null;
    t && f && (f.dirty = !0, c = Gg(f, t)), l.__decalPattern = c;
  }
  if (CL(e) && l) {
    var c = l.__decalPattern;
    c && (l.decal = c);
  }
  yw(e, r, a, {
    dataIndex: n,
    isInit: o,
    clearStyle: !0
  }), cT(e, r.keyframeAnimation, a);
}
function Xde(t, e, n, r, i) {
  var a = e.isGroup ? null : e, o = i && i[t].cfg;
  if (a) {
    var s = a.ensureState(t);
    if (r === !1) {
      var l = a.getState(t);
      l && (l.style = null);
    } else
      s.style = r || null;
    o && (s.textConfig = o), Zh(a);
  }
}
function pst(t, e, n) {
  if (!t.isGroup) {
    var r = t, i = n.currentZ, a = n.currentZLevel;
    r.z = i, r.zlevel = a;
    var o = e.z2;
    o != null && (r.z2 = o || 0);
    for (var s = 0; s < xf.length; s++)
      vst(r, e, xf[s]);
  }
}
function vst(t, e, n) {
  var r = n === Zc, i = r ? e : dT(e, n), a = i ? i.z2 : null, o;
  a != null && (o = r ? t : t.ensureState(n), o.z2 = a || 0);
}
function CX(t, e, n, r) {
  var i = t.get("renderItem"), a = t.coordinateSystem, o = {};
  a && (process.env.NODE_ENV !== "production" && (at(i, "series.render is required."), at(a.prepareCustoms || wX[a.type], "This coordSys does not support custom series.")), o = a.prepareCustoms ? a.prepareCustoms(a) : wX[a.type](a));
  for (var s = it({
    getWidth: r.getWidth,
    getHeight: r.getHeight,
    getZr: r.getZr,
    getDevicePixelRatio: r.getDevicePixelRatio,
    value: O,
    style: x,
    ordinalRawValue: S,
    styleEmphasis: C,
    visual: T,
    barLayout: E,
    currentSeriesIndices: M,
    font: R
  }, o.api || {}), l = {
    // The life cycle of context: current round of rendering.
    // The global life cycle is probably not necessary, because
    // user can store global status by themselves.
    context: {},
    seriesId: t.id,
    seriesName: t.name,
    seriesIndex: t.seriesIndex,
    coordSys: o.coordSys,
    dataInsideLength: e.count(),
    encode: gst(t.getData())
  }, u, c, f = {}, d = {}, h = {}, p = {}, v = 0; v < xf.length; v++) {
    var g = xf[v];
    h[g] = t.getModel(PI[g]), p[g] = t.getModel($I[g]);
  }
  function m(N) {
    return N === u ? c || (c = e.getItemModel(N)) : e.getItemModel(N);
  }
  function y(N, I) {
    return e.hasItemOption ? N === u ? f[I] || (f[I] = m(N).getModel(PI[I])) : m(N).getModel(PI[I]) : h[I];
  }
  function _(N, I) {
    return e.hasItemOption ? N === u ? d[I] || (d[I] = m(N).getModel($I[I])) : m(N).getModel($I[I]) : p[I];
  }
  return function(N, I) {
    return u = N, c = null, f = {}, d = {}, i && i(it({
      dataIndexInside: N,
      dataIndex: e.getRawIndex(N),
      // Can be used for optimization when zoom or roam.
      actionType: I ? I.type : null
    }, l), s);
  };
  function O(N, I) {
    return I == null && (I = u), e.getStore().get(e.getDimensionIndex(N || 0), I);
  }
  function S(N, I) {
    I == null && (I = u), N = N || 0;
    var B = e.getDimensionInfo(N);
    if (!B) {
      var Q = e.getDimensionIndex(N);
      return Q >= 0 ? e.getStore().get(Q, I) : void 0;
    }
    var W = e.get(B.name, I), H = B && B.ordinalMeta;
    return H ? H.categories[W] : W;
  }
  function x(N, I) {
    process.env.NODE_ENV !== "production" && bX("api.style", "Please write literal style directly instead."), I == null && (I = u);
    var B = e.getItemVisual(I, "style"), Q = B && B.fill, W = B && B.opacity, H = y(I, Zc).getItemStyle();
    Q != null && (H.fill = Q), W != null && (H.opacity = W);
    var U = {
      inheritColor: Ve(Q) ? Q : "#000"
    }, j = _(I, Zc), Y = Mn(j, null, U, !1, !0);
    Y.text = j.getShallow("show") ? dt(t.getFormattedLabel(I, Zc), jg(e, I)) : null;
    var ne = LC(j, U, !1);
    return $(N, H), H = mX(H, Y, ne), N && P(H, N), H.legacy = !0, H;
  }
  function C(N, I) {
    process.env.NODE_ENV !== "production" && bX("api.styleEmphasis", "Please write literal style directly instead."), I == null && (I = u);
    var B = y(I, Du).getItemStyle(), Q = _(I, Du), W = Mn(Q, null, null, !0, !0);
    W.text = Q.getShallow("show") ? co(t.getFormattedLabel(I, Du), t.getFormattedLabel(I, Zc), jg(e, I)) : null;
    var H = LC(Q, null, !0);
    return $(N, B), B = mX(B, W, H), N && P(B, N), B.legacy = !0, B;
  }
  function P(N, I) {
    for (var B in I)
      Qe(I, B) && (N[B] = I[B]);
  }
  function $(N, I) {
    N && (N.textFill && (I.textFill = N.textFill), N.textPosition && (I.textPosition = N.textPosition));
  }
  function T(N, I) {
    if (I == null && (I = u), Qe(pX, N)) {
      var B = e.getItemVisual(I, "style");
      return B ? B[pX[N]] : null;
    }
    if (Qe(Qot, N))
      return e.getItemVisual(I, N);
  }
  function E(N) {
    if (a.type === "cartesian2d") {
      var I = a.getBaseAxis();
      return Qqe(it({
        axis: I
      }, N));
    }
  }
  function M() {
    return n.getCurrentSeriesIndices();
  }
  function R(N) {
    return G5(N, n);
  }
}
function gst(t) {
  var e = {};
  return F(t.dimensions, function(n) {
    var r = t.getDimensionInfo(n);
    if (!r.isExtraCoord) {
      var i = r.coordDim, a = e[i] = e[i] || [];
      a[r.coordDimIndex] = t.getDimensionIndex(n);
    }
  }), e;
}
function AI(t, e, n, r, i, a, o) {
  if (!r) {
    a.remove(e);
    return;
  }
  var s = d6(t, e, n, r, i, a);
  return s && o.setItemGraphicEl(n, s), s && ur(s, r.focus, r.blurScope, r.emphasisDisabled), s;
}
function d6(t, e, n, r, i, a) {
  process.env.NODE_ENV !== "production" && at(r, "should not have an null/undefined element setting");
  var o = -1, s = e;
  e && Yde(e, r, i) && (o = St(a.childrenRef(), e), e = null);
  var l = !e, u = e;
  u ? u.clearStates() : (u = c6(r), s && dst(s, u)), r.morph === !1 ? u.disableMorphing = !0 : u.disableMorphing && (u.disableMorphing = !1), Ro.normal.cfg = Ro.normal.conOpt = Ro.emphasis.cfg = Ro.emphasis.conOpt = Ro.blur.cfg = Ro.blur.conOpt = Ro.select.cfg = Ro.select.conOpt = null, Ro.isLegacy = !1, yst(u, n, r, i, l, Ro), mst(u, n, r, i, l), f6(t, u, n, r, Ro, i, l), Qe(r, "info") && (Iu(u).info = r.info);
  for (var c = 0; c < xf.length; c++) {
    var f = xf[c];
    if (f !== Zc) {
      var d = dT(r, f), h = h6(r, d, f);
      Xde(f, u, d, h, Ro);
    }
  }
  return pst(u, r, i), r.type === "group" && bst(t, u, n, r, i), o >= 0 ? a.replaceAt(u, o) : a.add(u), u;
}
function Yde(t, e, n) {
  var r = Iu(t), i = e.type, a = e.shape, o = e.style;
  return (
    // Always create new if universal transition is enabled.
    // Because we do transition after render. It needs to know what old element is. Replacement will loose it.
    n.isUniversalTransitionEnabled() || i != null && i !== r.customGraphicType || i === "path" && xst(a) && qde(a) !== r.customPathData || i === "image" && Qe(o, "image") && o.image !== r.customImagePath
  );
}
function mst(t, e, n, r, i) {
  var a = n.clipPath;
  if (a === !1)
    t && t.getClipPath() && t.removeClipPath();
  else if (a) {
    var o = t.getClipPath();
    o && Yde(o, a, r) && (o = null), o || (o = c6(a), process.env.NODE_ENV !== "production" && at(fT(o), "Only any type of `path` can be used in `clipPath`, rather than " + o.type + "."), t.setClipPath(o)), f6(null, o, e, a, null, r, i);
  }
}
function yst(t, e, n, r, i, a) {
  if (!t.isGroup) {
    TX(n, null, a), TX(n, Du, a);
    var o = a.normal.conOpt, s = a.emphasis.conOpt, l = a.blur.conOpt, u = a.select.conOpt;
    if (o != null || s != null || u != null || l != null) {
      var c = t.getTextContent();
      if (o === !1)
        c && t.removeTextContent();
      else {
        o = a.normal.conOpt = o || {
          type: "text"
        }, c ? c.clearStates() : (c = c6(o), t.setTextContent(c)), f6(null, c, e, o, null, r, i);
        for (var f = o && o.style, d = 0; d < xf.length; d++) {
          var h = xf[d];
          if (h !== Zc) {
            var p = a[h].conOpt;
            Xde(h, c, p, h6(o, p, h), null);
          }
        }
        f ? c.dirty() : c.markRedraw();
      }
    }
  }
}
function TX(t, e, n) {
  var r = e ? dT(t, e) : t, i = e ? h6(t, r, Du) : t.style, a = t.type, o = r ? r.textConfig : null, s = t.textContent, l = s ? e ? dT(s, e) : s : null;
  if (i && // Because emphasis style has little info to detect legacy,
  // if normal is legacy, emphasis is trade as legacy.
  (n.isLegacy || Wde(i, a, !!o, !!l))) {
    n.isLegacy = !0;
    var u = Qde(i, a, !e);
    !o && u.textConfig && (o = u.textConfig), !l && u.textContent && (l = u.textContent);
  }
  if (!e && l) {
    var c = l;
    !c.type && (c.type = "text"), process.env.NODE_ENV !== "production" && at(c.type === "text", 'textContent.type must be "text"');
  }
  var f = e ? n[e] : n.normal;
  f.cfg = o, f.conOpt = l;
}
function dT(t, e) {
  return e ? t ? t[e] : null : t;
}
function h6(t, e, n) {
  var r = e && e.style;
  return r == null && n === Du && t && (r = t.styleEmphasis), r;
}
function bst(t, e, n, r, i) {
  var a = r.children, o = a ? a.length : 0, s = r.$mergeChildren, l = s === "byName" || r.diffChildrenByName, u = s === !1;
  if (!(!o && !l && !u)) {
    if (l) {
      Ost({
        api: t,
        oldChildren: e.children() || [],
        newChildren: a || [],
        dataIndex: n,
        seriesModel: i,
        group: e
      });
      return;
    }
    u && e.removeAll();
    for (var c = 0; c < o; c++) {
      var f = a[c], d = e.childAt(c);
      f ? (f.ignore == null && (f.ignore = !1), d6(t, d, n, f, i, e)) : (process.env.NODE_ENV !== "production" && at(d, "renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."), d.ignore = !0);
    }
    for (var h = e.childCount() - 1; h >= c; h--) {
      var p = e.childAt(h);
      _st(e, p, i);
    }
  }
}
function _st(t, e, n) {
  e && UP(e, Iu(t).option, n);
}
function Ost(t) {
  new Qu(t.oldChildren, t.newChildren, PX, PX, t).add($X).update($X).remove(Sst).execute();
}
function PX(t, e) {
  var n = t && t.name;
  return n ?? fst + e;
}
function $X(t, e) {
  var n = this.context, r = t != null ? n.newChildren[t] : null, i = e != null ? n.oldChildren[e] : null;
  d6(n.api, i, n.dataIndex, r, n.seriesModel, n.group);
}
function Sst(t) {
  var e = this.context, n = e.oldChildren[t];
  n && UP(n, Iu(n).option, e.seriesModel);
}
function qde(t) {
  return t && (t.pathData || t.d);
}
function xst(t) {
  return t && (Qe(t, "pathData") || Qe(t, "d"));
}
function wst(t) {
  t.registerChartView(hst), t.registerSeriesModel(Hot);
}
var Zd = Ut(), AX = ot, EI = We, p6 = (
  /** @class */
  function() {
    function t() {
      this._dragging = !1, this.animationThreshold = 15;
    }
    return t.prototype.render = function(e, n, r, i) {
      var a = n.get("value"), o = n.get("status");
      if (this._axisModel = e, this._axisPointerModel = n, this._api = r, !(!i && this._lastValue === a && this._lastStatus === o)) {
        this._lastValue = a, this._lastStatus = o;
        var s = this._group, l = this._handle;
        if (!o || o === "hide") {
          s && s.hide(), l && l.hide();
          return;
        }
        s && s.show(), l && l.show();
        var u = {};
        this.makeElOption(u, a, e, n, r);
        var c = u.graphicKey;
        c !== this._lastGraphicKey && this.clear(r), this._lastGraphicKey = c;
        var f = this._moveAnimation = this.determineAnimation(e, n);
        if (!s)
          s = this._group = new ct(), this.createPointerEl(s, u, e, n), this.createLabelEl(s, u, e, n), r.getZr().add(s);
        else {
          var d = vt(EX, n, f);
          this.updatePointerEl(s, u, d), this.updateLabelEl(s, u, d, n);
        }
        IX(s, n, !0), this._renderHandle(a);
      }
    }, t.prototype.remove = function(e) {
      this.clear(e);
    }, t.prototype.dispose = function(e) {
      this.clear(e);
    }, t.prototype.determineAnimation = function(e, n) {
      var r = n.get("animation"), i = e.axis, a = i.type === "category", o = n.get("snap");
      if (!o && !a)
        return !1;
      if (r === "auto" || r == null) {
        var s = this.animationThreshold;
        if (a && i.getBandWidth() > s)
          return !0;
        if (o) {
          var l = B3(e).seriesDataCount, u = i.getExtent();
          return Math.abs(u[0] - u[1]) / l > s;
        }
        return !1;
      }
      return r === !0;
    }, t.prototype.makeElOption = function(e, n, r, i, a) {
    }, t.prototype.createPointerEl = function(e, n, r, i) {
      var a = n.pointer;
      if (a) {
        var o = Zd(e).pointerEl = new hp[a.type](AX(n.pointer));
        e.add(o);
      }
    }, t.prototype.createLabelEl = function(e, n, r, i) {
      if (n.label) {
        var a = Zd(e).labelEl = new jt(AX(n.label));
        e.add(a), MX(a, i);
      }
    }, t.prototype.updatePointerEl = function(e, n, r) {
      var i = Zd(e).pointerEl;
      i && n.pointer && (i.setStyle(n.pointer.style), r(i, {
        shape: n.pointer.shape
      }));
    }, t.prototype.updateLabelEl = function(e, n, r, i) {
      var a = Zd(e).labelEl;
      a && (a.setStyle(n.label.style), r(a, {
        // Consider text length change in vertical axis, animation should
        // be used on shape, otherwise the effect will be weird.
        // TODOTODO
        // shape: elOption.label.shape,
        x: n.label.x,
        y: n.label.y
      }), MX(a, i));
    }, t.prototype._renderHandle = function(e) {
      if (!(this._dragging || !this.updateHandleTransform)) {
        var n = this._axisPointerModel, r = this._api.getZr(), i = this._handle, a = n.getModel("handle"), o = n.get("status");
        if (!a.get("show") || !o || o === "hide") {
          i && r.remove(i), this._handle = null;
          return;
        }
        var s;
        this._handle || (s = !0, i = this._handle = Sm(a.get("icon"), {
          cursor: "move",
          draggable: !0,
          onmousemove: function(u) {
            Vu(u.event);
          },
          onmousedown: EI(this._onHandleDragMove, this, 0, 0),
          drift: EI(this._onHandleDragMove, this),
          ondragend: EI(this._onHandleDragEnd, this)
        }), r.add(i)), IX(i, n, !1), i.setStyle(a.getItemStyle(null, ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]));
        var l = a.get("size");
        Se(l) || (l = [l, l]), i.scaleX = l[0] / 2, i.scaleY = l[1] / 2, Am(this, "_doDispatchAxisPointer", a.get("throttle") || 0, "fixRate"), this._moveHandleToValue(e, s);
      }
    }, t.prototype._moveHandleToValue = function(e, n) {
      EX(this._axisPointerModel, !n && this._moveAnimation, this._handle, MI(this.getHandleTransform(e, this._axisModel, this._axisPointerModel)));
    }, t.prototype._onHandleDragMove = function(e, n) {
      var r = this._handle;
      if (r) {
        this._dragging = !0;
        var i = this.updateHandleTransform(MI(r), [e, n], this._axisModel, this._axisPointerModel);
        this._payloadInfo = i, r.stopAnimation(), r.attr(MI(i)), Zd(r).lastProp = null, this._doDispatchAxisPointer();
      }
    }, t.prototype._doDispatchAxisPointer = function() {
      var e = this._handle;
      if (e) {
        var n = this._payloadInfo, r = this._axisModel;
        this._api.dispatchAction({
          type: "updateAxisPointer",
          x: n.cursorPoint[0],
          y: n.cursorPoint[1],
          tooltipOption: n.tooltipOption,
          axesInfo: [{
            axisDim: r.axis.dim,
            axisIndex: r.componentIndex
          }]
        });
      }
    }, t.prototype._onHandleDragEnd = function() {
      this._dragging = !1;
      var e = this._handle;
      if (e) {
        var n = this._axisPointerModel.get("value");
        this._moveHandleToValue(n), this._api.dispatchAction({
          type: "hideTip"
        });
      }
    }, t.prototype.clear = function(e) {
      this._lastValue = null, this._lastStatus = null;
      var n = e.getZr(), r = this._group, i = this._handle;
      n && r && (this._lastGraphicKey = null, r && n.remove(r), i && n.remove(i), this._group = null, this._handle = null, this._payloadInfo = null), Jb(this, "_doDispatchAxisPointer");
    }, t.prototype.doClear = function() {
    }, t.prototype.buildLabel = function(e, n, r) {
      return r = r || 0, {
        x: e[r],
        y: e[1 - r],
        width: n[r],
        height: n[1 - r]
      };
    }, t;
  }()
);
function EX(t, e, n, r) {
  Kde(Zd(n).lastProp, r) || (Zd(n).lastProp = r, e ? tn(n, r, t) : (n.stopAnimation(), n.attr(r)));
}
function Kde(t, e) {
  if (nt(t) && nt(e)) {
    var n = !0;
    return F(e, function(r, i) {
      n = n && Kde(t[i], r);
    }), !!n;
  } else
    return t === e;
}
function MX(t, e) {
  t[e.get(["label", "show"]) ? "show" : "hide"]();
}
function MI(t) {
  return {
    x: t.x || 0,
    y: t.y || 0,
    rotation: t.rotation || 0
  };
}
function IX(t, e, n) {
  var r = e.get("z"), i = e.get("zlevel");
  t && t.traverse(function(a) {
    a.type !== "group" && (r != null && (a.z = r), i != null && (a.zlevel = i), a.silent = n);
  });
}
function v6(t) {
  var e = t.get("type"), n = t.getModel(e + "Style"), r;
  return e === "line" ? (r = n.getLineStyle(), r.fill = null) : e === "shadow" && (r = n.getAreaStyle(), r.stroke = null), r;
}
function Jde(t, e, n, r, i) {
  var a = n.get("value"), o = ehe(a, e.axis, e.ecModel, n.get("seriesDataIndices"), {
    precision: n.get(["label", "precision"]),
    formatter: n.get(["label", "formatter"])
  }), s = n.getModel("label"), l = vp(s.get("padding") || 0), u = s.getFont(), c = o1(o, u), f = i.position, d = c.width + l[1] + l[3], h = c.height + l[0] + l[2], p = i.align;
  p === "right" && (f[0] -= d), p === "center" && (f[0] -= d / 2);
  var v = i.verticalAlign;
  v === "bottom" && (f[1] -= h), v === "middle" && (f[1] -= h / 2), Cst(f, d, h, r);
  var g = s.get("backgroundColor");
  (!g || g === "auto") && (g = e.get(["axisLine", "lineStyle", "color"])), t.label = {
    // shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},
    x: f[0],
    y: f[1],
    style: Mn(s, {
      text: o,
      font: u,
      fill: s.getTextColor(),
      padding: l,
      backgroundColor: g
    }),
    // Label should be over axisPointer.
    z2: 10
  };
}
function Cst(t, e, n, r) {
  var i = r.getWidth(), a = r.getHeight();
  t[0] = Math.min(t[0] + e, i) - e, t[1] = Math.min(t[1] + n, a) - n, t[0] = Math.max(t[0], 0), t[1] = Math.max(t[1], 0);
}
function ehe(t, e, n, r, i) {
  t = e.scale.parse(t);
  var a = e.scale.getLabel({
    value: t
  }, {
    // If `precision` is set, width can be fixed (like '12.00500'), which
    // helps to debounce when when moving label.
    precision: i.precision
  }), o = i.formatter;
  if (o) {
    var s = {
      value: P3(e, {
        value: t
      }),
      axisDimension: e.dim,
      axisIndex: e.index,
      seriesData: []
    };
    F(r, function(l) {
      var u = n.getSeriesByIndex(l.seriesIndex), c = l.dataIndexInside, f = u && u.getDataParams(c);
      f && s.seriesData.push(f);
    }), Ve(o) ? a = o.replace("{value}", a) : qe(o) && (a = o(s));
  }
  return a;
}
function g6(t, e, n) {
  var r = Na();
  return Lf(r, r, n.rotation), Gs(r, r, n.position), zs([t.dataToCoord(e), (n.labelOffset || 0) + (n.labelDirection || 1) * (n.labelMargin || 0)], r);
}
function the(t, e, n, r, i, a) {
  var o = sa.innerTextLayout(n.rotation, 0, n.labelDirection);
  n.labelMargin = i.get(["label", "margin"]), Jde(e, r, i, a, {
    position: g6(r.axis, t, n),
    align: o.textAlign,
    verticalAlign: o.textVerticalAlign
  });
}
function m6(t, e, n) {
  return n = n || 0, {
    x1: t[n],
    y1: t[1 - n],
    x2: e[n],
    y2: e[1 - n]
  };
}
function nhe(t, e, n) {
  return n = n || 0, {
    x: t[n],
    y: t[1 - n],
    width: e[n],
    height: e[1 - n]
  };
}
function DX(t, e, n, r, i, a) {
  return {
    cx: t,
    cy: e,
    r0: n,
    r,
    startAngle: i,
    endAngle: a,
    clockwise: !0
  };
}
var Tst = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.makeElOption = function(n, r, i, a, o) {
      var s = i.axis, l = s.grid, u = a.get("type"), c = RX(l, s).getOtherAxis(s).getGlobalExtent(), f = s.toGlobalCoord(s.dataToCoord(r, !0));
      if (u && u !== "none") {
        var d = v6(a), h = Pst[u](s, f, c);
        h.style = d, n.graphicKey = h.type, n.pointer = h;
      }
      var p = sL(l.model, i);
      the(
        // @ts-ignore
        r,
        n,
        p,
        i,
        a,
        o
      );
    }, e.prototype.getHandleTransform = function(n, r, i) {
      var a = sL(r.axis.grid.model, r, {
        labelInside: !1
      });
      a.labelMargin = i.get(["handle", "margin"]);
      var o = g6(r.axis, n, a);
      return {
        x: o[0],
        y: o[1],
        rotation: a.rotation + (a.labelDirection < 0 ? Math.PI : 0)
      };
    }, e.prototype.updateHandleTransform = function(n, r, i, a) {
      var o = i.axis, s = o.grid, l = o.getGlobalExtent(!0), u = RX(s, o).getOtherAxis(o).getGlobalExtent(), c = o.dim === "x" ? 0 : 1, f = [n.x, n.y];
      f[c] += r[c], f[c] = Math.min(l[1], f[c]), f[c] = Math.max(l[0], f[c]);
      var d = (u[1] + u[0]) / 2, h = [d, d];
      h[c] = f[c];
      var p = [{
        verticalAlign: "middle"
      }, {
        align: "center"
      }];
      return {
        x: f[0],
        y: f[1],
        rotation: n.rotation,
        cursorPoint: h,
        tooltipOption: p[c]
      };
    }, e;
  }(p6)
);
function RX(t, e) {
  var n = {};
  return n[e.dim + "AxisIndex"] = e.index, t.getCartesian(n);
}
var Pst = {
  line: function(t, e, n) {
    var r = m6([e, n[0]], [e, n[1]], kX(t));
    return {
      type: "Line",
      subPixelOptimize: !0,
      shape: r
    };
  },
  shadow: function(t, e, n) {
    var r = Math.max(1, t.getBandWidth()), i = n[1] - n[0];
    return {
      type: "Rect",
      shape: nhe([e - r / 2, n[0]], [r, i], kX(t))
    };
  }
};
function kX(t) {
  return t.dim === "x" ? 0 : 1;
}
var $st = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "axisPointer", e.defaultOption = {
      // 'auto' means that show when triggered by tooltip or handle.
      show: "auto",
      // zlevel: 0,
      z: 50,
      type: "line",
      // axispointer triggered by tootip determine snap automatically,
      // see `modelHelper`.
      snap: !1,
      triggerTooltip: !0,
      triggerEmphasis: !0,
      value: null,
      status: null,
      link: [],
      // Do not set 'auto' here, otherwise global animation: false
      // will not effect at this axispointer.
      animation: null,
      animationDurationUpdate: 200,
      lineStyle: {
        color: "#B9BEC9",
        width: 1,
        type: "dashed"
      },
      shadowStyle: {
        color: "rgba(210,219,238,0.2)"
      },
      label: {
        show: !0,
        formatter: null,
        precision: "auto",
        margin: 3,
        color: "#fff",
        padding: [5, 7, 5, 7],
        backgroundColor: "auto",
        borderColor: null,
        borderWidth: 0,
        borderRadius: 3
      },
      handle: {
        show: !1,
        // eslint-disable-next-line
        icon: "M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",
        size: 45,
        // handle margin is from symbol center to axis, which is stable when circular move.
        margin: 50,
        // color: '#1b8bbd'
        // color: '#2f4554'
        color: "#333",
        shadowBlur: 3,
        shadowColor: "#aaa",
        shadowOffsetX: 0,
        shadowOffsetY: 2,
        // For mobile performance
        throttle: 40
      }
    }, e;
  }(At)
), $u = Ut(), Ast = F;
function rhe(t, e, n) {
  if (!Gt.node) {
    var r = e.getZr();
    $u(r).records || ($u(r).records = {}), Est(r, e);
    var i = $u(r).records[t] || ($u(r).records[t] = {});
    i.handler = n;
  }
}
function Est(t, e) {
  if ($u(t).initialized)
    return;
  $u(t).initialized = !0, n("click", vt(LX, "click")), n("mousemove", vt(LX, "mousemove")), n("globalout", Ist);
  function n(r, i) {
    t.on(r, function(a) {
      var o = Dst(e);
      Ast($u(t).records, function(s) {
        s && i(s, a, o.dispatchAction);
      }), Mst(o.pendings, e);
    });
  }
}
function Mst(t, e) {
  var n = t.showTip.length, r = t.hideTip.length, i;
  n ? i = t.showTip[n - 1] : r && (i = t.hideTip[r - 1]), i && (i.dispatchAction = null, e.dispatchAction(i));
}
function Ist(t, e, n) {
  t.handler("leave", null, n);
}
function LX(t, e, n, r) {
  e.handler(t, n, r);
}
function Dst(t) {
  var e = {
    showTip: [],
    hideTip: []
  }, n = function(r) {
    var i = e[r.type];
    i ? i.push(r) : (r.dispatchAction = n, t.dispatchAction(r));
  };
  return {
    dispatchAction: n,
    pendings: e
  };
}
function TL(t, e) {
  if (!Gt.node) {
    var n = e.getZr(), r = ($u(n).records || {})[t];
    r && ($u(n).records[t] = null);
  }
}
var Rst = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = r.getComponent("tooltip"), o = n.get("triggerOn") || a && a.get("triggerOn") || "mousemove|click";
      rhe("axisPointer", i, function(s, l, u) {
        o !== "none" && (s === "leave" || o.indexOf(s) >= 0) && u({
          type: "updateAxisPointer",
          currTrigger: s,
          x: l && l.offsetX,
          y: l && l.offsetY
        });
      });
    }, e.prototype.remove = function(n, r) {
      TL("axisPointer", r);
    }, e.prototype.dispose = function(n, r) {
      TL("axisPointer", r);
    }, e.type = "axisPointer", e;
  }(Ln)
);
function ihe(t, e) {
  var n = [], r = t.seriesIndex, i;
  if (r == null || !(i = e.getSeriesByIndex(r)))
    return {
      point: []
    };
  var a = i.getData(), o = Gh(a, t);
  if (o == null || o < 0 || Se(o))
    return {
      point: []
    };
  var s = a.getItemGraphicEl(o), l = i.coordinateSystem;
  if (i.getTooltipPosition)
    n = i.getTooltipPosition(o) || [];
  else if (l && l.dataToPoint)
    if (t.isStacked) {
      var u = l.getBaseAxis(), c = l.getOtherAxis(u), f = c.dim, d = u.dim, h = f === "x" || f === "radius" ? 1 : 0, p = a.mapDimension(d), v = [];
      v[h] = a.get(p, o), v[1 - h] = a.get(a.getCalculationInfo("stackResultDimension"), o), n = l.dataToPoint(v) || [];
    } else
      n = l.dataToPoint(a.getValues(Ce(l.dimensions, function(m) {
        return a.mapDimension(m);
      }), o)) || [];
  else if (s) {
    var g = s.getBoundingRect().clone();
    g.applyTransform(s.transform), n = [g.x + g.width / 2, g.y + g.height / 2];
  }
  return {
    point: n,
    el: s
  };
}
var NX = Ut();
function kst(t, e, n) {
  var r = t.currTrigger, i = [t.x, t.y], a = t, o = t.dispatchAction || We(n.dispatchAction, n), s = e.getComponent("axisPointer").coordSysAxesInfo;
  if (s) {
    bw(i) && (i = ihe({
      seriesIndex: a.seriesIndex,
      // Do not use dataIndexInside from other ec instance.
      // FIXME: auto detect it?
      dataIndex: a.dataIndex
    }, e).point);
    var l = bw(i), u = a.axesInfo, c = s.axesInfo, f = r === "leave" || bw(i), d = {}, h = {}, p = {
      list: [],
      map: {}
    }, v = {
      showPointer: vt(Nst, h),
      showTooltip: vt(Bst, p)
    };
    F(s.coordSysMap, function(m, y) {
      var _ = l || m.containPoint(i);
      F(s.coordSysAxesInfo[y], function(O, S) {
        var x = O.axis, C = Wst(u, O);
        if (!f && _ && (!u || C)) {
          var P = C && C.value;
          P == null && !l && (P = x.pointToData(i)), P != null && BX(O, P, v, !1, d);
        }
      });
    });
    var g = {};
    return F(c, function(m, y) {
      var _ = m.linkGroup;
      _ && !h[y] && F(_.axesInfo, function(O, S) {
        var x = h[S];
        if (O !== m && x) {
          var C = x.value;
          _.mapper && (C = m.axis.scale.parse(_.mapper(C, zX(O), zX(m)))), g[m.key] = C;
        }
      });
    }), F(g, function(m, y) {
      BX(c[y], m, v, !0, d);
    }), zst(h, c, d), Vst(p, i, t, o), Fst(c, o, n), d;
  }
}
function BX(t, e, n, r, i) {
  var a = t.axis;
  if (!(a.scale.isBlank() || !a.containData(e))) {
    if (!t.involveSeries) {
      n.showPointer(t, e);
      return;
    }
    var o = Lst(e, t), s = o.payloadBatch, l = o.snapToValue;
    s[0] && i.seriesIndex == null && _e(i, s[0]), !r && t.snap && a.containData(l) && l != null && (e = l), n.showPointer(t, e, s), n.showTooltip(t, o, l);
  }
}
function Lst(t, e) {
  var n = e.axis, r = n.dim, i = t, a = [], o = Number.MAX_VALUE, s = -1;
  return F(e.seriesModels, function(l, u) {
    var c = l.getData().mapDimensionsAll(r), f, d;
    if (l.getAxisTooltipData) {
      var h = l.getAxisTooltipData(c, t, n);
      d = h.dataIndices, f = h.nestestValue;
    } else {
      if (d = l.getData().indicesOfNearest(
        c[0],
        t,
        // Add a threshold to avoid find the wrong dataIndex
        // when data length is not same.
        // false,
        n.type === "category" ? 0.5 : null
      ), !d.length)
        return;
      f = l.getData().get(c[0], d[0]);
    }
    if (!(f == null || !isFinite(f))) {
      var p = t - f, v = Math.abs(p);
      v <= o && ((v < o || p >= 0 && s < 0) && (o = v, s = p, i = f, a.length = 0), F(d, function(g) {
        a.push({
          seriesIndex: l.seriesIndex,
          dataIndexInside: g,
          dataIndex: l.getData().getRawIndex(g)
        });
      }));
    }
  }), {
    payloadBatch: a,
    snapToValue: i
  };
}
function Nst(t, e, n, r) {
  t[e.key] = {
    value: n,
    payloadBatch: r
  };
}
function Bst(t, e, n, r) {
  var i = n.payloadBatch, a = e.axis, o = a.model, s = e.axisPointerModel;
  if (!(!e.triggerTooltip || !i.length)) {
    var l = e.coordSys.model, u = o_(l), c = t.map[u];
    c || (c = t.map[u] = {
      coordSysId: l.id,
      coordSysIndex: l.componentIndex,
      coordSysType: l.type,
      coordSysMainType: l.mainType,
      dataByAxis: []
    }, t.list.push(c)), c.dataByAxis.push({
      axisDim: a.dim,
      axisIndex: o.componentIndex,
      axisType: o.type,
      axisId: o.id,
      value: r,
      // Caustion: viewHelper.getValueLabel is actually on "view stage", which
      // depends that all models have been updated. So it should not be performed
      // here. Considering axisPointerModel used here is volatile, which is hard
      // to be retrieve in TooltipView, we prepare parameters here.
      valueLabelOpt: {
        precision: s.get(["label", "precision"]),
        formatter: s.get(["label", "formatter"])
      },
      seriesDataIndices: i.slice()
    });
  }
}
function zst(t, e, n) {
  var r = n.axesInfo = [];
  F(e, function(i, a) {
    var o = i.axisPointerModel.option, s = t[a];
    s ? (!i.useHandle && (o.status = "show"), o.value = s.value, o.seriesDataIndices = (s.payloadBatch || []).slice()) : !i.useHandle && (o.status = "hide"), o.status === "show" && r.push({
      axisDim: i.axis.dim,
      axisIndex: i.axis.model.componentIndex,
      value: o.value
    });
  });
}
function Vst(t, e, n, r) {
  if (bw(e) || !t.list.length) {
    r({
      type: "hideTip"
    });
    return;
  }
  var i = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
  r({
    type: "showTip",
    escapeConnect: !0,
    x: e[0],
    y: e[1],
    tooltipOption: n.tooltipOption,
    position: n.position,
    dataIndexInside: i.dataIndexInside,
    dataIndex: i.dataIndex,
    seriesIndex: i.seriesIndex,
    dataByCoordSys: t.list
  });
}
function Fst(t, e, n) {
  var r = n.getZr(), i = "axisPointerLastHighlights", a = NX(r)[i] || {}, o = NX(r)[i] = {};
  F(t, function(u, c) {
    var f = u.axisPointerModel.option;
    f.status === "show" && u.triggerEmphasis && F(f.seriesDataIndices, function(d) {
      var h = d.seriesIndex + " | " + d.dataIndex;
      o[h] = d;
    });
  });
  var s = [], l = [];
  F(a, function(u, c) {
    !o[c] && l.push(u);
  }), F(o, function(u, c) {
    !a[c] && s.push(u);
  }), l.length && n.dispatchAction({
    type: "downplay",
    escapeConnect: !0,
    // Not blur others when highlight in axisPointer.
    notBlur: !0,
    batch: l
  }), s.length && n.dispatchAction({
    type: "highlight",
    escapeConnect: !0,
    // Not blur others when highlight in axisPointer.
    notBlur: !0,
    batch: s
  });
}
function Wst(t, e) {
  for (var n = 0; n < (t || []).length; n++) {
    var r = t[n];
    if (e.axis.dim === r.axisDim && e.axis.model.componentIndex === r.axisIndex)
      return r;
  }
}
function zX(t) {
  var e = t.axis.model, n = {}, r = n.axisDim = t.axis.dim;
  return n.axisIndex = n[r + "AxisIndex"] = e.componentIndex, n.axisName = n[r + "AxisName"] = e.name, n.axisId = n[r + "AxisId"] = e.id, n;
}
function bw(t) {
  return !t || t[0] == null || isNaN(t[0]) || t[1] == null || isNaN(t[1]);
}
function C1(t) {
  bp.registerAxisPointerClass("CartesianAxisPointer", Tst), t.registerComponentModel($st), t.registerComponentView(Rst), t.registerPreprocessor(function(e) {
    if (e) {
      (!e.axisPointer || e.axisPointer.length === 0) && (e.axisPointer = {});
      var n = e.axisPointer.link;
      n && !Se(n) && (e.axisPointer.link = [n]);
    }
  }), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, function(e, n) {
    e.getComponent("axisPointer").coordSysAxesInfo = Jet(e, n);
  }), t.registerAction({
    type: "updateAxisPointer",
    event: "updateAxisPointer",
    update: ":updateAxisPointer"
  }, kst);
}
function Qst(t) {
  Mt(Efe), Mt(C1);
}
var Hst = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.makeElOption = function(n, r, i, a, o) {
      var s = i.axis;
      s.dim === "angle" && (this.animationThreshold = Math.PI / 18);
      var l = s.polar, u = l.getOtherAxis(s), c = u.getExtent(), f = s.dataToCoord(r), d = a.get("type");
      if (d && d !== "none") {
        var h = v6(a), p = jst[d](s, l, f, c);
        p.style = h, n.graphicKey = p.type, n.pointer = p;
      }
      var v = a.get(["label", "margin"]), g = Gst(r, i, a, l, v);
      Jde(n, i, a, o, g);
    }, e;
  }(p6)
);
function Gst(t, e, n, r, i) {
  var a = e.axis, o = a.dataToCoord(t), s = r.getAngleAxis().getExtent()[0];
  s = s / 180 * Math.PI;
  var l = r.getRadiusAxis().getExtent(), u, c, f;
  if (a.dim === "radius") {
    var d = Na();
    Lf(d, d, s), Gs(d, d, [r.cx, r.cy]), u = zs([o, -i], d);
    var h = e.getModel("axisLabel").get("rotate") || 0, p = sa.innerTextLayout(s, h * Math.PI / 180, -1);
    c = p.textAlign, f = p.textVerticalAlign;
  } else {
    var v = l[1];
    u = r.coordToPoint([v + i, o]);
    var g = r.cx, m = r.cy;
    c = Math.abs(u[0] - g) / v < 0.3 ? "center" : u[0] > g ? "left" : "right", f = Math.abs(u[1] - m) / v < 0.3 ? "middle" : u[1] > m ? "top" : "bottom";
  }
  return {
    position: u,
    align: c,
    verticalAlign: f
  };
}
var jst = {
  line: function(t, e, n, r) {
    return t.dim === "angle" ? {
      type: "Line",
      shape: m6(e.coordToPoint([r[0], n]), e.coordToPoint([r[1], n]))
    } : {
      type: "Circle",
      shape: {
        cx: e.cx,
        cy: e.cy,
        r: n
      }
    };
  },
  shadow: function(t, e, n, r) {
    var i = Math.max(1, t.getBandWidth()), a = Math.PI / 180;
    return t.dim === "angle" ? {
      type: "Sector",
      shape: DX(
        e.cx,
        e.cy,
        r[0],
        r[1],
        // In ECharts y is negative if angle is positive
        (-n - i / 2) * a,
        (-n + i / 2) * a
      )
    } : {
      type: "Sector",
      shape: DX(e.cx, e.cy, n - i / 2, n + i / 2, 0, Math.PI * 2)
    };
  }
}, Zst = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.findAxisModel = function(n) {
      var r, i = this.ecModel;
      return i.eachComponent(n, function(a) {
        a.getCoordSysModel() === this && (r = a);
      }, this), r;
    }, e.type = "polar", e.dependencies = ["radiusAxis", "angleAxis"], e.defaultOption = {
      // zlevel: 0,
      z: 0,
      center: ["50%", "50%"],
      radius: "80%"
    }, e;
  }(At)
), y6 = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.getCoordSysModel = function() {
      return this.getReferringComponents("polar", Er).models[0];
    }, e.type = "polarAxis", e;
  }(At)
);
vr(y6, Dm);
var Ust = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "angleAxis", e;
  }(y6)
), Xst = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "radiusAxis", e;
  }(y6)
), b6 = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r) {
      return t.call(this, "radius", n, r) || this;
    }
    return e.prototype.pointToData = function(n, r) {
      return this.polar.pointToData(n, r)[this.dim === "radius" ? 0 : 1];
    }, e;
  }(vs)
);
b6.prototype.dataToRadius = vs.prototype.dataToCoord;
b6.prototype.radiusToData = vs.prototype.coordToData;
var Yst = Ut(), _6 = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r) {
      return t.call(this, "angle", n, r || [0, 360]) || this;
    }
    return e.prototype.pointToData = function(n, r) {
      return this.polar.pointToData(n, r)[this.dim === "radius" ? 0 : 1];
    }, e.prototype.calculateCategoryInterval = function() {
      var n = this, r = n.getLabelModel(), i = n.scale, a = i.getExtent(), o = i.count();
      if (a[1] - a[0] < 1)
        return 0;
      var s = a[0], l = n.dataToCoord(s + 1) - n.dataToCoord(s), u = Math.abs(l), c = o1(s == null ? "" : s + "", r.getFont(), "center", "top"), f = Math.max(c.height, 7), d = f / u;
      isNaN(d) && (d = 1 / 0);
      var h = Math.max(0, Math.floor(d)), p = Yst(n.model), v = p.lastAutoInterval, g = p.lastTickCount;
      return v != null && g != null && Math.abs(v - h) <= 1 && Math.abs(g - o) <= 1 && v > h ? h = v : (p.lastTickCount = o, p.lastAutoInterval = h), h;
    }, e;
  }(vs)
);
_6.prototype.dataToAngle = vs.prototype.dataToCoord;
_6.prototype.angleToData = vs.prototype.coordToData;
var ahe = ["radius", "angle"], qst = (
  /** @class */
  function() {
    function t(e) {
      this.dimensions = ahe, this.type = "polar", this.cx = 0, this.cy = 0, this._radiusAxis = new b6(), this._angleAxis = new _6(), this.axisPointerEnabled = !0, this.name = e || "", this._radiusAxis.polar = this._angleAxis.polar = this;
    }
    return t.prototype.containPoint = function(e) {
      var n = this.pointToCoord(e);
      return this._radiusAxis.contain(n[0]) && this._angleAxis.contain(n[1]);
    }, t.prototype.containData = function(e) {
      return this._radiusAxis.containData(e[0]) && this._angleAxis.containData(e[1]);
    }, t.prototype.getAxis = function(e) {
      var n = "_" + e + "Axis";
      return this[n];
    }, t.prototype.getAxes = function() {
      return [this._radiusAxis, this._angleAxis];
    }, t.prototype.getAxesByScale = function(e) {
      var n = [], r = this._angleAxis, i = this._radiusAxis;
      return r.scale.type === e && n.push(r), i.scale.type === e && n.push(i), n;
    }, t.prototype.getAngleAxis = function() {
      return this._angleAxis;
    }, t.prototype.getRadiusAxis = function() {
      return this._radiusAxis;
    }, t.prototype.getOtherAxis = function(e) {
      var n = this._angleAxis;
      return e === n ? this._radiusAxis : n;
    }, t.prototype.getBaseAxis = function() {
      return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis();
    }, t.prototype.getTooltipAxes = function(e) {
      var n = e != null && e !== "auto" ? this.getAxis(e) : this.getBaseAxis();
      return {
        baseAxes: [n],
        otherAxes: [this.getOtherAxis(n)]
      };
    }, t.prototype.dataToPoint = function(e, n) {
      return this.coordToPoint([this._radiusAxis.dataToRadius(e[0], n), this._angleAxis.dataToAngle(e[1], n)]);
    }, t.prototype.pointToData = function(e, n) {
      var r = this.pointToCoord(e);
      return [this._radiusAxis.radiusToData(r[0], n), this._angleAxis.angleToData(r[1], n)];
    }, t.prototype.pointToCoord = function(e) {
      var n = e[0] - this.cx, r = e[1] - this.cy, i = this.getAngleAxis(), a = i.getExtent(), o = Math.min(a[0], a[1]), s = Math.max(a[0], a[1]);
      i.inverse ? o = s - 360 : s = o + 360;
      var l = Math.sqrt(n * n + r * r);
      n /= l, r /= l;
      for (var u = Math.atan2(-r, n) / Math.PI * 180, c = u < o ? 1 : -1; u < o || u > s; )
        u += c * 360;
      return [l, u];
    }, t.prototype.coordToPoint = function(e) {
      var n = e[0], r = e[1] / 180 * Math.PI, i = Math.cos(r) * n + this.cx, a = -Math.sin(r) * n + this.cy;
      return [i, a];
    }, t.prototype.getArea = function() {
      var e = this.getAngleAxis(), n = this.getRadiusAxis(), r = n.getExtent().slice();
      r[0] > r[1] && r.reverse();
      var i = e.getExtent(), a = Math.PI / 180;
      return {
        cx: this.cx,
        cy: this.cy,
        r0: r[0],
        r: r[1],
        startAngle: -i[0] * a,
        endAngle: -i[1] * a,
        clockwise: e.inverse,
        contain: function(o, s) {
          var l = o - this.cx, u = s - this.cy, c = l * l + u * u - 1e-4, f = this.r, d = this.r0;
          return c <= f * f && c >= d * d;
        }
      };
    }, t.prototype.convertToPixel = function(e, n, r) {
      var i = VX(n);
      return i === this ? this.dataToPoint(r) : null;
    }, t.prototype.convertFromPixel = function(e, n, r) {
      var i = VX(n);
      return i === this ? this.pointToData(r) : null;
    }, t;
  }()
);
function VX(t) {
  var e = t.seriesModel, n = t.polarModel;
  return n && n.coordinateSystem || e && e.coordinateSystem;
}
const Kst = qst;
function Jst(t, e, n) {
  var r = e.get("center"), i = n.getWidth(), a = n.getHeight();
  t.cx = ze(r[0], i), t.cy = ze(r[1], a);
  var o = t.getRadiusAxis(), s = Math.min(i, a) / 2, l = e.get("radius");
  l == null ? l = [0, "100%"] : Se(l) || (l = [0, l]);
  var u = [ze(l[0], s), ze(l[1], s)];
  o.inverse ? o.setExtent(u[1], u[0]) : o.setExtent(u[0], u[1]);
}
function elt(t, e) {
  var n = this, r = n.getAngleAxis(), i = n.getRadiusAxis();
  if (r.scale.setExtent(1 / 0, -1 / 0), i.scale.setExtent(1 / 0, -1 / 0), t.eachSeries(function(s) {
    if (s.coordinateSystem === n) {
      var l = s.getData();
      F(qC(l, "radius"), function(u) {
        i.scale.unionExtentFromData(l, u);
      }), F(qC(l, "angle"), function(u) {
        r.scale.unionExtentFromData(l, u);
      });
    }
  }), Xh(r.scale, r.model), Xh(i.scale, i.model), r.type === "category" && !r.onBand) {
    var a = r.getExtent(), o = 360 / r.scale.count();
    r.inverse ? a[1] += o : a[1] -= o, r.setExtent(a[0], a[1]);
  }
}
function tlt(t) {
  return t.mainType === "angleAxis";
}
function FX(t, e) {
  var n;
  if (t.type = e.get("type"), t.scale = g1(e), t.onBand = e.get("boundaryGap") && t.type === "category", t.inverse = e.get("inverse"), tlt(e)) {
    t.inverse = t.inverse !== e.get("clockwise");
    var r = e.get("startAngle"), i = (n = e.get("endAngle")) !== null && n !== void 0 ? n : r + (t.inverse ? -360 : 360);
    t.setExtent(r, i);
  }
  e.axis = t, t.model = e;
}
var nlt = {
  dimensions: ahe,
  create: function(t, e) {
    var n = [];
    return t.eachComponent("polar", function(r, i) {
      var a = new Kst(i + "");
      a.update = elt;
      var o = a.getRadiusAxis(), s = a.getAngleAxis(), l = r.findAxisModel("radiusAxis"), u = r.findAxisModel("angleAxis");
      FX(o, l), FX(s, u), Jst(a, r, e), n.push(a), r.coordinateSystem = a, a.model = r;
    }), t.eachSeries(function(r) {
      if (r.get("coordinateSystem") === "polar") {
        var i = r.getReferringComponents("polar", Er).models[0];
        if (process.env.NODE_ENV !== "production" && !i)
          throw new Error('Polar "' + br(r.get("polarIndex"), r.get("polarId"), 0) + '" not found');
        r.coordinateSystem = i.coordinateSystem;
      }
    }), n;
  }
}, rlt = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"];
function XS(t, e, n) {
  e[1] > e[0] && (e = e.slice().reverse());
  var r = t.coordToPoint([e[0], n]), i = t.coordToPoint([e[1], n]);
  return {
    x1: r[0],
    y1: r[1],
    x2: i[0],
    y2: i[1]
  };
}
function YS(t) {
  var e = t.getRadiusAxis();
  return e.inverse ? 0 : 1;
}
function WX(t) {
  var e = t[0], n = t[t.length - 1];
  e && n && Math.abs(Math.abs(e.coord - n.coord) - 360) < 1e-4 && t.pop();
}
var ilt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n;
    }
    return e.prototype.render = function(n, r) {
      if (this.group.removeAll(), !!n.get("show")) {
        var i = n.axis, a = i.polar, o = a.getRadiusAxis().getExtent(), s = i.getTicksCoords(), l = i.getMinorTicksCoords(), u = Ce(i.getViewLabels(), function(c) {
          c = ot(c);
          var f = i.scale, d = f.type === "ordinal" ? f.getRawOrdinalNumber(c.tickValue) : c.tickValue;
          return c.coord = i.dataToCoord(d), c;
        });
        WX(u), WX(s), F(rlt, function(c) {
          n.get([c, "show"]) && (!i.scale.isBlank() || c === "axisLine") && alt[c](this.group, n, a, s, l, o, u);
        }, this);
      }
    }, e.type = "angleAxis", e;
  }(bp)
), alt = {
  axisLine: function(t, e, n, r, i, a) {
    var o = e.getModel(["axisLine", "lineStyle"]), s = n.getAngleAxis(), l = Math.PI / 180, u = s.getExtent(), c = YS(n), f = c ? 0 : 1, d, h = Math.abs(u[1] - u[0]) === 360 ? "Circle" : "Arc";
    a[f] === 0 ? d = new hp[h]({
      shape: {
        cx: n.cx,
        cy: n.cy,
        r: a[c],
        startAngle: -u[0] * l,
        endAngle: -u[1] * l,
        clockwise: s.inverse
      },
      style: o.getLineStyle(),
      z2: 1,
      silent: !0
    }) : d = new c1({
      shape: {
        cx: n.cx,
        cy: n.cy,
        r: a[c],
        r0: a[f]
      },
      style: o.getLineStyle(),
      z2: 1,
      silent: !0
    }), d.style.fill = null, t.add(d);
  },
  axisTick: function(t, e, n, r, i, a) {
    var o = e.getModel("axisTick"), s = (o.get("inside") ? -1 : 1) * o.get("length"), l = a[YS(n)], u = Ce(r, function(c) {
      return new Xr({
        shape: XS(n, [l, l + s], c.coord)
      });
    });
    t.add(no(u, {
      style: it(o.getModel("lineStyle").getLineStyle(), {
        stroke: e.get(["axisLine", "lineStyle", "color"])
      })
    }));
  },
  minorTick: function(t, e, n, r, i, a) {
    if (i.length) {
      for (var o = e.getModel("axisTick"), s = e.getModel("minorTick"), l = (o.get("inside") ? -1 : 1) * s.get("length"), u = a[YS(n)], c = [], f = 0; f < i.length; f++)
        for (var d = 0; d < i[f].length; d++)
          c.push(new Xr({
            shape: XS(n, [u, u + l], i[f][d].coord)
          }));
      t.add(no(c, {
        style: it(s.getModel("lineStyle").getLineStyle(), it(o.getLineStyle(), {
          stroke: e.get(["axisLine", "lineStyle", "color"])
        }))
      }));
    }
  },
  axisLabel: function(t, e, n, r, i, a, o) {
    var s = e.getCategories(!0), l = e.getModel("axisLabel"), u = l.get("margin"), c = e.get("triggerEvent");
    F(o, function(f, d) {
      var h = l, p = f.tickValue, v = a[YS(n)], g = n.coordToPoint([v + u, f.coord]), m = n.cx, y = n.cy, _ = Math.abs(g[0] - m) / v < 0.3 ? "center" : g[0] > m ? "left" : "right", O = Math.abs(g[1] - y) / v < 0.3 ? "middle" : g[1] > y ? "top" : "bottom";
      if (s && s[p]) {
        var S = s[p];
        nt(S) && S.textStyle && (h = new xn(S.textStyle, l, l.ecModel));
      }
      var x = new jt({
        silent: sa.isLabelSilent(e),
        style: Mn(h, {
          x: g[0],
          y: g[1],
          fill: h.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
          text: f.formattedLabel,
          align: _,
          verticalAlign: O
        })
      });
      if (t.add(x), c) {
        var C = sa.makeAxisEventDataBase(e);
        C.targetType = "axisLabel", C.value = f.rawLabel, ft(x).eventData = C;
      }
    }, this);
  },
  splitLine: function(t, e, n, r, i, a) {
    var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), l = s.get("color"), u = 0;
    l = l instanceof Array ? l : [l];
    for (var c = [], f = 0; f < r.length; f++) {
      var d = u++ % l.length;
      c[d] = c[d] || [], c[d].push(new Xr({
        shape: XS(n, a, r[f].coord)
      }));
    }
    for (var f = 0; f < c.length; f++)
      t.add(no(c[f], {
        style: it({
          stroke: l[f % l.length]
        }, s.getLineStyle()),
        silent: !0,
        z: e.get("z")
      }));
  },
  minorSplitLine: function(t, e, n, r, i, a) {
    if (i.length) {
      for (var o = e.getModel("minorSplitLine"), s = o.getModel("lineStyle"), l = [], u = 0; u < i.length; u++)
        for (var c = 0; c < i[u].length; c++)
          l.push(new Xr({
            shape: XS(n, a, i[u][c].coord)
          }));
      t.add(no(l, {
        style: s.getLineStyle(),
        silent: !0,
        z: e.get("z")
      }));
    }
  },
  splitArea: function(t, e, n, r, i, a) {
    if (r.length) {
      var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
      l = l instanceof Array ? l : [l];
      for (var c = [], f = Math.PI / 180, d = -r[0].coord * f, h = Math.min(a[0], a[1]), p = Math.max(a[0], a[1]), v = e.get("clockwise"), g = 1, m = r.length; g <= m; g++) {
        var y = g === m ? r[0].coord : r[g].coord, _ = u++ % l.length;
        c[_] = c[_] || [], c[_].push(new ha({
          shape: {
            cx: n.cx,
            cy: n.cy,
            r0: h,
            r: p,
            startAngle: d,
            endAngle: -y * f,
            clockwise: v
          },
          silent: !0
        })), d = -y * f;
      }
      for (var g = 0; g < c.length; g++)
        t.add(no(c[g], {
          style: it({
            fill: l[g % l.length]
          }, s.getAreaStyle()),
          silent: !0
        }));
    }
  }
}, olt = ["axisLine", "axisTickLabel", "axisName"], slt = ["splitLine", "splitArea", "minorSplitLine"], llt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n;
    }
    return e.prototype.render = function(n, r) {
      if (this.group.removeAll(), !!n.get("show")) {
        var i = this._axisGroup, a = this._axisGroup = new ct();
        this.group.add(a);
        var o = n.axis, s = o.polar, l = s.getAngleAxis(), u = o.getTicksCoords(), c = o.getMinorTicksCoords(), f = l.getExtent()[0], d = o.getExtent(), h = clt(s, n, f), p = new sa(n, h);
        F(olt, p.add, p), a.add(p.getGroup()), h1(i, a, n), F(slt, function(v) {
          n.get([v, "show"]) && !o.scale.isBlank() && ult[v](this.group, n, s, f, d, u, c);
        }, this);
      }
    }, e.type = "radiusAxis", e;
  }(bp)
), ult = {
  splitLine: function(t, e, n, r, i, a) {
    var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), l = s.get("color"), u = 0, c = n.getAngleAxis(), f = Math.PI / 180, d = c.getExtent(), h = Math.abs(d[1] - d[0]) === 360 ? "Circle" : "Arc";
    l = l instanceof Array ? l : [l];
    for (var p = [], v = 0; v < a.length; v++) {
      var g = u++ % l.length;
      p[g] = p[g] || [], p[g].push(new hp[h]({
        shape: {
          cx: n.cx,
          cy: n.cy,
          // ensure circle radius >= 0
          r: Math.max(a[v].coord, 0),
          startAngle: -d[0] * f,
          endAngle: -d[1] * f,
          clockwise: c.inverse
        }
      }));
    }
    for (var v = 0; v < p.length; v++)
      t.add(no(p[v], {
        style: it({
          stroke: l[v % l.length],
          fill: null
        }, s.getLineStyle()),
        silent: !0
      }));
  },
  minorSplitLine: function(t, e, n, r, i, a, o) {
    if (o.length) {
      for (var s = e.getModel("minorSplitLine"), l = s.getModel("lineStyle"), u = [], c = 0; c < o.length; c++)
        for (var f = 0; f < o[c].length; f++)
          u.push(new ic({
            shape: {
              cx: n.cx,
              cy: n.cy,
              r: o[c][f].coord
            }
          }));
      t.add(no(u, {
        style: it({
          fill: null
        }, l.getLineStyle()),
        silent: !0
      }));
    }
  },
  splitArea: function(t, e, n, r, i, a) {
    if (a.length) {
      var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
      l = l instanceof Array ? l : [l];
      for (var c = [], f = a[0].coord, d = 1; d < a.length; d++) {
        var h = u++ % l.length;
        c[h] = c[h] || [], c[h].push(new ha({
          shape: {
            cx: n.cx,
            cy: n.cy,
            r0: f,
            r: a[d].coord,
            startAngle: 0,
            endAngle: Math.PI * 2
          },
          silent: !0
        })), f = a[d].coord;
      }
      for (var d = 0; d < c.length; d++)
        t.add(no(c[d], {
          style: it({
            fill: l[d % l.length]
          }, s.getAreaStyle()),
          silent: !0
        }));
    }
  }
};
function clt(t, e, n) {
  return {
    position: [t.cx, t.cy],
    rotation: n / 180 * Math.PI,
    labelDirection: -1,
    tickDirection: -1,
    nameDirection: 1,
    labelRotate: e.getModel("axisLabel").get("rotate"),
    // Over splitLine and splitArea
    z2: 1
  };
}
function ohe(t) {
  return t.get("stack") || "__ec_stack_" + t.seriesIndex;
}
function she(t, e) {
  return e.dim + t.model.componentIndex;
}
function flt(t, e, n) {
  var r = {}, i = dlt(yn(e.getSeriesByType(t), function(a) {
    return !e.isSeriesFiltered(a) && a.coordinateSystem && a.coordinateSystem.type === "polar";
  }));
  e.eachSeriesByType(t, function(a) {
    if (a.coordinateSystem.type === "polar") {
      var o = a.getData(), s = a.coordinateSystem, l = s.getBaseAxis(), u = she(s, l), c = ohe(a), f = i[u][c], d = f.offset, h = f.width, p = s.getOtherAxis(l), v = a.coordinateSystem.cx, g = a.coordinateSystem.cy, m = a.get("barMinHeight") || 0, y = a.get("barMinAngle") || 0;
      r[c] = r[c] || [];
      for (var _ = o.mapDimension(p.dim), O = o.mapDimension(l.dim), S = Hu(
        o,
        _
        /* , baseDim */
      ), x = l.dim !== "radius" || !a.get("roundCap", !0), C = p.model, P = C.get("startValue"), $ = p.dataToCoord(P || 0), T = 0, E = o.count(); T < E; T++) {
        var M = o.get(_, T), R = o.get(O, T), N = M >= 0 ? "p" : "n", I = $;
        S && (r[c][R] || (r[c][R] = {
          p: $,
          n: $
          // Negative stack
        }), I = r[c][R][N]);
        var B = void 0, Q = void 0, W = void 0, H = void 0;
        if (p.dim === "radius") {
          var U = p.dataToCoord(M) - $, j = l.dataToCoord(R);
          Math.abs(U) < m && (U = (U < 0 ? -1 : 1) * m), B = I, Q = I + U, W = j - d, H = W - h, S && (r[c][R][N] = Q);
        } else {
          var Y = p.dataToCoord(M, x) - $, ne = l.dataToCoord(R);
          Math.abs(Y) < y && (Y = (Y < 0 ? -1 : 1) * y), B = ne + d, Q = B + h, W = I, H = I + Y, S && (r[c][R][N] = H);
        }
        o.setItemLayout(T, {
          cx: v,
          cy: g,
          r0: B,
          r: Q,
          // Consider that positive angle is anti-clockwise,
          // while positive radian of sector is clockwise
          startAngle: -W * Math.PI / 180,
          endAngle: -H * Math.PI / 180,
          /**
           * Keep the same logic with bar in catesion: use end value to
           * control direction. Notice that if clockwise is true (by
           * default), the sector will always draw clockwisely, no matter
           * whether endAngle is greater or less than startAngle.
           */
          clockwise: W >= H
        });
      }
    }
  });
}
function dlt(t) {
  var e = {};
  F(t, function(r, i) {
    var a = r.getData(), o = r.coordinateSystem, s = o.getBaseAxis(), l = she(o, s), u = s.getExtent(), c = s.type === "category" ? s.getBandWidth() : Math.abs(u[1] - u[0]) / a.count(), f = e[l] || {
      bandWidth: c,
      remainedWidth: c,
      autoWidthCount: 0,
      categoryGap: "20%",
      gap: "30%",
      stacks: {}
    }, d = f.stacks;
    e[l] = f;
    var h = ohe(r);
    d[h] || f.autoWidthCount++, d[h] = d[h] || {
      width: 0,
      maxWidth: 0
    };
    var p = ze(r.get("barWidth"), c), v = ze(r.get("barMaxWidth"), c), g = r.get("barGap"), m = r.get("barCategoryGap");
    p && !d[h].width && (p = Math.min(f.remainedWidth, p), d[h].width = p, f.remainedWidth -= p), v && (d[h].maxWidth = v), g != null && (f.gap = g), m != null && (f.categoryGap = m);
  });
  var n = {};
  return F(e, function(r, i) {
    n[i] = {};
    var a = r.stacks, o = r.bandWidth, s = ze(r.categoryGap, o), l = ze(r.gap, 1), u = r.remainedWidth, c = r.autoWidthCount, f = (u - s) / (c + (c - 1) * l);
    f = Math.max(f, 0), F(a, function(v, g) {
      var m = v.maxWidth;
      m && m < f && (m = Math.min(m, u), v.width && (m = Math.min(m, v.width)), u -= m, v.width = m, c--);
    }), f = (u - s) / (c + (c - 1) * l), f = Math.max(f, 0);
    var d = 0, h;
    F(a, function(v, g) {
      v.width || (v.width = f), h = v, d += v.width * (1 + l);
    }), h && (d -= h.width * l);
    var p = -d / 2;
    F(a, function(v, g) {
      n[i][g] = n[i][g] || {
        offset: p,
        width: v.width
      }, p += v.width * (1 + l);
    });
  }), n;
}
var hlt = {
  startAngle: 90,
  clockwise: !0,
  splitNumber: 12,
  axisLabel: {
    rotate: 0
  }
}, plt = {
  splitNumber: 5
}, vlt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "polar", e;
  }(Ln)
);
function glt(t) {
  Mt(C1), bp.registerAxisPointerClass("PolarAxisPointer", Hst), t.registerCoordinateSystem("polar", nlt), t.registerComponentModel(Zst), t.registerComponentView(vlt), Zg(t, "angle", Ust, hlt), Zg(t, "radius", Xst, plt), t.registerComponentView(ilt), t.registerComponentView(llt), t.registerLayout(vt(flt, "bar"));
}
function PL(t, e) {
  e = e || {};
  var n = t.coordinateSystem, r = t.axis, i = {}, a = r.position, o = r.orient, s = n.getRect(), l = [s.x, s.x + s.width, s.y, s.y + s.height], u = {
    horizontal: {
      top: l[2],
      bottom: l[3]
    },
    vertical: {
      left: l[0],
      right: l[1]
    }
  };
  i.position = [o === "vertical" ? u.vertical[a] : l[0], o === "horizontal" ? u.horizontal[a] : l[3]];
  var c = {
    horizontal: 0,
    vertical: 1
  };
  i.rotation = Math.PI / 2 * c[o];
  var f = {
    top: -1,
    bottom: 1,
    right: 1,
    left: -1
  };
  i.labelDirection = i.tickDirection = i.nameDirection = f[a], t.get(["axisTick", "inside"]) && (i.tickDirection = -i.tickDirection), br(e.labelInside, t.get(["axisLabel", "inside"])) && (i.labelDirection = -i.labelDirection);
  var d = e.rotate;
  return d == null && (d = t.get(["axisLabel", "rotate"])), i.labelRotation = a === "top" ? -d : d, i.z2 = 1, i;
}
var mlt = ["axisLine", "axisTickLabel", "axisName"], ylt = ["splitArea", "splitLine"], blt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.axisPointerClass = "SingleAxisPointer", n;
    }
    return e.prototype.render = function(n, r, i, a) {
      var o = this.group;
      o.removeAll();
      var s = this._axisGroup;
      this._axisGroup = new ct();
      var l = PL(n), u = new sa(n, l);
      F(mlt, u.add, u), o.add(this._axisGroup), o.add(u.getGroup()), F(ylt, function(c) {
        n.get([c, "show"]) && _lt[c](this, this.group, this._axisGroup, n);
      }, this), h1(s, this._axisGroup, n), t.prototype.render.call(this, n, r, i, a);
    }, e.prototype.remove = function() {
      Pfe(this);
    }, e.type = "singleAxis", e;
  }(bp)
), _lt = {
  splitLine: function(t, e, n, r) {
    var i = r.axis;
    if (!i.scale.isBlank()) {
      var a = r.getModel("splitLine"), o = a.getModel("lineStyle"), s = o.get("color");
      s = s instanceof Array ? s : [s];
      for (var l = o.get("width"), u = r.coordinateSystem.getRect(), c = i.isHorizontal(), f = [], d = 0, h = i.getTicksCoords({
        tickModel: a
      }), p = [], v = [], g = 0; g < h.length; ++g) {
        var m = i.toGlobalCoord(h[g].coord);
        c ? (p[0] = m, p[1] = u.y, v[0] = m, v[1] = u.y + u.height) : (p[0] = u.x, p[1] = m, v[0] = u.x + u.width, v[1] = m);
        var y = new Xr({
          shape: {
            x1: p[0],
            y1: p[1],
            x2: v[0],
            y2: v[1]
          },
          silent: !0
        });
        Qg(y.shape, l);
        var _ = d++ % s.length;
        f[_] = f[_] || [], f[_].push(y);
      }
      for (var O = o.getLineStyle(["color"]), g = 0; g < f.length; ++g)
        e.add(no(f[g], {
          style: it({
            stroke: s[g % s.length]
          }, O),
          silent: !0
        }));
    }
  },
  splitArea: function(t, e, n, r) {
    Tfe(t, n, r, r);
  }
}, _w = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.getCoordSysModel = function() {
      return this;
    }, e.type = "singleAxis", e.layoutMode = "box", e.defaultOption = {
      left: "5%",
      top: "5%",
      right: "5%",
      bottom: "5%",
      type: "value",
      position: "bottom",
      orient: "horizontal",
      axisLine: {
        show: !0,
        lineStyle: {
          width: 1,
          type: "solid"
        }
      },
      // Single coordinate system and single axis is the,
      // which is used as the parent tooltip model.
      // same model, so we set default tooltip show as true.
      tooltip: {
        show: !0
      },
      axisTick: {
        show: !0,
        length: 6,
        lineStyle: {
          width: 1
        }
      },
      axisLabel: {
        show: !0,
        interval: "auto"
      },
      splitLine: {
        show: !0,
        lineStyle: {
          type: "dashed",
          opacity: 0.2
        }
      }
    }, e;
  }(At)
);
vr(_w, Dm.prototype);
var Olt = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i, a, o) {
      var s = t.call(this, n, r, i) || this;
      return s.type = a || "value", s.position = o || "bottom", s;
    }
    return e.prototype.isHorizontal = function() {
      var n = this.position;
      return n === "top" || n === "bottom";
    }, e.prototype.pointToData = function(n, r) {
      return this.coordinateSystem.pointToData(n)[0];
    }, e;
  }(vs)
), lhe = ["single"], Slt = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.type = "single", this.dimension = "single", this.dimensions = lhe, this.axisPointerEnabled = !0, this.model = e, this._init(e, n, r);
    }
    return t.prototype._init = function(e, n, r) {
      var i = this.dimension, a = new Olt(i, g1(e), [0, 0], e.get("type"), e.get("position")), o = a.type === "category";
      a.onBand = o && e.get("boundaryGap"), a.inverse = e.get("inverse"), a.orient = e.get("orient"), e.axis = a, a.model = e, a.coordinateSystem = this, this._axis = a;
    }, t.prototype.update = function(e, n) {
      e.eachSeries(function(r) {
        if (r.coordinateSystem === this) {
          var i = r.getData();
          F(i.mapDimensionsAll(this.dimension), function(a) {
            this._axis.scale.unionExtentFromData(i, a);
          }, this), Xh(this._axis.scale, this._axis.model);
        }
      }, this);
    }, t.prototype.resize = function(e, n) {
      this._rect = Mr({
        left: e.get("left"),
        top: e.get("top"),
        right: e.get("right"),
        bottom: e.get("bottom"),
        width: e.get("width"),
        height: e.get("height")
      }, {
        width: n.getWidth(),
        height: n.getHeight()
      }), this._adjustAxis();
    }, t.prototype.getRect = function() {
      return this._rect;
    }, t.prototype._adjustAxis = function() {
      var e = this._rect, n = this._axis, r = n.isHorizontal(), i = r ? [0, e.width] : [0, e.height], a = n.inverse ? 1 : 0;
      n.setExtent(i[a], i[1 - a]), this._updateAxisTransform(n, r ? e.x : e.y);
    }, t.prototype._updateAxisTransform = function(e, n) {
      var r = e.getExtent(), i = r[0] + r[1], a = e.isHorizontal();
      e.toGlobalCoord = a ? function(o) {
        return o + n;
      } : function(o) {
        return i - o + n;
      }, e.toLocalCoord = a ? function(o) {
        return o - n;
      } : function(o) {
        return i - o + n;
      };
    }, t.prototype.getAxis = function() {
      return this._axis;
    }, t.prototype.getBaseAxis = function() {
      return this._axis;
    }, t.prototype.getAxes = function() {
      return [this._axis];
    }, t.prototype.getTooltipAxes = function() {
      return {
        baseAxes: [this.getAxis()],
        // Empty otherAxes
        otherAxes: []
      };
    }, t.prototype.containPoint = function(e) {
      var n = this.getRect(), r = this.getAxis(), i = r.orient;
      return i === "horizontal" ? r.contain(r.toLocalCoord(e[0])) && e[1] >= n.y && e[1] <= n.y + n.height : r.contain(r.toLocalCoord(e[1])) && e[0] >= n.y && e[0] <= n.y + n.height;
    }, t.prototype.pointToData = function(e) {
      var n = this.getAxis();
      return [n.coordToData(n.toLocalCoord(e[n.orient === "horizontal" ? 0 : 1]))];
    }, t.prototype.dataToPoint = function(e) {
      var n = this.getAxis(), r = this.getRect(), i = [], a = n.orient === "horizontal" ? 0 : 1;
      return e instanceof Array && (e = e[0]), i[a] = n.toGlobalCoord(n.dataToCoord(+e)), i[1 - a] = a === 0 ? r.y + r.height / 2 : r.x + r.width / 2, i;
    }, t.prototype.convertToPixel = function(e, n, r) {
      var i = QX(n);
      return i === this ? this.dataToPoint(r) : null;
    }, t.prototype.convertFromPixel = function(e, n, r) {
      var i = QX(n);
      return i === this ? this.pointToData(r) : null;
    }, t;
  }()
);
function QX(t) {
  var e = t.seriesModel, n = t.singleAxisModel;
  return n && n.coordinateSystem || e && e.coordinateSystem;
}
function xlt(t, e) {
  var n = [];
  return t.eachComponent("singleAxis", function(r, i) {
    var a = new Slt(r, t, e);
    a.name = "single_" + i, a.resize(r, e), r.coordinateSystem = a, n.push(a);
  }), t.eachSeries(function(r) {
    if (r.get("coordinateSystem") === "singleAxis") {
      var i = r.getReferringComponents("singleAxis", Er).models[0];
      r.coordinateSystem = i && i.coordinateSystem;
    }
  }), n;
}
var wlt = {
  create: xlt,
  dimensions: lhe
}, HX = ["x", "y"], Clt = ["width", "height"], Tlt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.makeElOption = function(n, r, i, a, o) {
      var s = i.axis, l = s.coordinateSystem, u = II(l, 1 - hT(s)), c = l.dataToPoint(r)[0], f = a.get("type");
      if (f && f !== "none") {
        var d = v6(a), h = Plt[f](s, c, u);
        h.style = d, n.graphicKey = h.type, n.pointer = h;
      }
      var p = PL(i);
      the(
        // @ts-ignore
        r,
        n,
        p,
        i,
        a,
        o
      );
    }, e.prototype.getHandleTransform = function(n, r, i) {
      var a = PL(r, {
        labelInside: !1
      });
      a.labelMargin = i.get(["handle", "margin"]);
      var o = g6(r.axis, n, a);
      return {
        x: o[0],
        y: o[1],
        rotation: a.rotation + (a.labelDirection < 0 ? Math.PI : 0)
      };
    }, e.prototype.updateHandleTransform = function(n, r, i, a) {
      var o = i.axis, s = o.coordinateSystem, l = hT(o), u = II(s, l), c = [n.x, n.y];
      c[l] += r[l], c[l] = Math.min(u[1], c[l]), c[l] = Math.max(u[0], c[l]);
      var f = II(s, 1 - l), d = (f[1] + f[0]) / 2, h = [d, d];
      return h[l] = c[l], {
        x: c[0],
        y: c[1],
        rotation: n.rotation,
        cursorPoint: h,
        tooltipOption: {
          verticalAlign: "middle"
        }
      };
    }, e;
  }(p6)
), Plt = {
  line: function(t, e, n) {
    var r = m6([e, n[0]], [e, n[1]], hT(t));
    return {
      type: "Line",
      subPixelOptimize: !0,
      shape: r
    };
  },
  shadow: function(t, e, n) {
    var r = t.getBandWidth(), i = n[1] - n[0];
    return {
      type: "Rect",
      shape: nhe([e - r / 2, n[0]], [r, i], hT(t))
    };
  }
};
function hT(t) {
  return t.isHorizontal() ? 0 : 1;
}
function II(t, e) {
  var n = t.getRect();
  return [n[HX[e]], n[HX[e]] + n[Clt[e]]];
}
var $lt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "single", e;
  }(Ln)
);
function Alt(t) {
  Mt(C1), bp.registerAxisPointerClass("SingleAxisPointer", Tlt), t.registerComponentView($lt), t.registerComponentView(blt), t.registerComponentModel(_w), Zg(t, "single", _w, _w.defaultOption), t.registerCoordinateSystem("single", wlt);
}
var Elt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n, r, i) {
      var a = Tm(n);
      t.prototype.init.apply(this, arguments), GX(n, a);
    }, e.prototype.mergeOption = function(n) {
      t.prototype.mergeOption.apply(this, arguments), GX(this.option, n);
    }, e.prototype.getCellSize = function() {
      return this.option.cellSize;
    }, e.type = "calendar", e.defaultOption = {
      // zlevel: 0,
      z: 2,
      left: 80,
      top: 60,
      cellSize: 20,
      // horizontal vertical
      orient: "horizontal",
      // month separate line style
      splitLine: {
        show: !0,
        lineStyle: {
          color: "#000",
          width: 1,
          type: "solid"
        }
      },
      // rect style  temporarily unused emphasis
      itemStyle: {
        color: "#fff",
        borderWidth: 1,
        borderColor: "#ccc"
      },
      // week text style
      dayLabel: {
        show: !0,
        firstDay: 0,
        // start end
        position: "start",
        margin: "50%",
        color: "#000"
      },
      // month text style
      monthLabel: {
        show: !0,
        // start end
        position: "start",
        margin: 5,
        // center or left
        align: "center",
        formatter: null,
        color: "#000"
      },
      // year text style
      yearLabel: {
        show: !0,
        // top bottom left right
        position: null,
        margin: 30,
        formatter: null,
        color: "#ccc",
        fontFamily: "sans-serif",
        fontWeight: "bolder",
        fontSize: 20
      }
    }, e;
  }(At)
);
function GX(t, e) {
  var n = t.cellSize, r;
  Se(n) ? r = n : r = t.cellSize = [n, n], r.length === 1 && (r[1] = r[0]);
  var i = Ce([0, 1], function(a) {
    return AUe(e, a) && (r[a] = "auto"), r[a] != null && r[a] !== "auto";
  });
  Of(t, e, {
    type: "box",
    ignoreSize: i
  });
}
var Mlt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = this.group;
      a.removeAll();
      var o = n.coordinateSystem, s = o.getRangeInfo(), l = o.getOrient(), u = r.getLocaleModel();
      this._renderDayRect(n, s, a), this._renderLines(n, s, l, a), this._renderYearText(n, s, l, a), this._renderMonthText(n, u, l, a), this._renderWeekText(n, u, s, l, a);
    }, e.prototype._renderDayRect = function(n, r, i) {
      for (var a = n.coordinateSystem, o = n.getModel("itemStyle").getItemStyle(), s = a.getCellWidth(), l = a.getCellHeight(), u = r.start.time; u <= r.end.time; u = a.getNextNDay(u, 1).time) {
        var c = a.dataToRect([u], !1).tl, f = new Zt({
          shape: {
            x: c[0],
            y: c[1],
            width: s,
            height: l
          },
          cursor: "default",
          style: o
        });
        i.add(f);
      }
    }, e.prototype._renderLines = function(n, r, i, a) {
      var o = this, s = n.coordinateSystem, l = n.getModel(["splitLine", "lineStyle"]).getLineStyle(), u = n.get(["splitLine", "show"]), c = l.lineWidth;
      this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = [];
      for (var f = r.start, d = 0; f.time <= r.end.time; d++) {
        p(f.formatedDate), d === 0 && (f = s.getDateInfo(r.start.y + "-" + r.start.m));
        var h = f.date;
        h.setMonth(h.getMonth() + 1), f = s.getDateInfo(h);
      }
      p(s.getNextNDay(r.end.time, 1).formatedDate);
      function p(v) {
        o._firstDayOfMonth.push(s.getDateInfo(v)), o._firstDayPoints.push(s.dataToRect([v], !1).tl);
        var g = o._getLinePointsOfOneWeek(n, v, i);
        o._tlpoints.push(g[0]), o._blpoints.push(g[g.length - 1]), u && o._drawSplitline(g, l, a);
      }
      u && this._drawSplitline(o._getEdgesPoints(o._tlpoints, c, i), l, a), u && this._drawSplitline(o._getEdgesPoints(o._blpoints, c, i), l, a);
    }, e.prototype._getEdgesPoints = function(n, r, i) {
      var a = [n[0].slice(), n[n.length - 1].slice()], o = i === "horizontal" ? 0 : 1;
      return a[0][o] = a[0][o] - r / 2, a[1][o] = a[1][o] + r / 2, a;
    }, e.prototype._drawSplitline = function(n, r, i) {
      var a = new va({
        z2: 20,
        shape: {
          points: n
        },
        style: r
      });
      i.add(a);
    }, e.prototype._getLinePointsOfOneWeek = function(n, r, i) {
      for (var a = n.coordinateSystem, o = a.getDateInfo(r), s = [], l = 0; l < 7; l++) {
        var u = a.getNextNDay(o.time, l), c = a.dataToRect([u.time], !1);
        s[2 * u.day] = c.tl, s[2 * u.day + 1] = c[i === "horizontal" ? "bl" : "tr"];
      }
      return s;
    }, e.prototype._formatterLabel = function(n, r) {
      return Ve(n) && n ? CUe(n, r) : qe(n) ? n(r) : r.nameMap;
    }, e.prototype._yearTextPositionControl = function(n, r, i, a, o) {
      var s = r[0], l = r[1], u = ["center", "bottom"];
      a === "bottom" ? (l += o, u = ["center", "top"]) : a === "left" ? s -= o : a === "right" ? (s += o, u = ["center", "top"]) : l -= o;
      var c = 0;
      return (a === "left" || a === "right") && (c = Math.PI / 2), {
        rotation: c,
        x: s,
        y: l,
        style: {
          align: u[0],
          verticalAlign: u[1]
        }
      };
    }, e.prototype._renderYearText = function(n, r, i, a) {
      var o = n.getModel("yearLabel");
      if (o.get("show")) {
        var s = o.get("margin"), l = o.get("position");
        l || (l = i !== "horizontal" ? "top" : "left");
        var u = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]], c = (u[0][0] + u[1][0]) / 2, f = (u[0][1] + u[1][1]) / 2, d = i === "horizontal" ? 0 : 1, h = {
          top: [c, u[d][1]],
          bottom: [c, u[1 - d][1]],
          left: [u[1 - d][0], f],
          right: [u[d][0], f]
        }, p = r.start.y;
        +r.end.y > +r.start.y && (p = p + "-" + r.end.y);
        var v = o.get("formatter"), g = {
          start: r.start.y,
          end: r.end.y,
          nameMap: p
        }, m = this._formatterLabel(v, g), y = new jt({
          z2: 30,
          style: Mn(o, {
            text: m
          })
        });
        y.attr(this._yearTextPositionControl(y, h[l], i, l, s)), a.add(y);
      }
    }, e.prototype._monthTextPositionControl = function(n, r, i, a, o) {
      var s = "left", l = "top", u = n[0], c = n[1];
      return i === "horizontal" ? (c = c + o, r && (s = "center"), a === "start" && (l = "bottom")) : (u = u + o, r && (l = "middle"), a === "start" && (s = "right")), {
        x: u,
        y: c,
        align: s,
        verticalAlign: l
      };
    }, e.prototype._renderMonthText = function(n, r, i, a) {
      var o = n.getModel("monthLabel");
      if (o.get("show")) {
        var s = o.get("nameMap"), l = o.get("margin"), u = o.get("position"), c = o.get("align"), f = [this._tlpoints, this._blpoints];
        (!s || Ve(s)) && (s && (r = kk(s) || r), s = r.get(["time", "monthAbbr"]) || []);
        var d = u === "start" ? 0 : 1, h = i === "horizontal" ? 0 : 1;
        l = u === "start" ? -l : l;
        for (var p = c === "center", v = 0; v < f[d].length - 1; v++) {
          var g = f[d][v].slice(), m = this._firstDayOfMonth[v];
          if (p) {
            var y = this._firstDayPoints[v];
            g[h] = (y[h] + f[0][v + 1][h]) / 2;
          }
          var _ = o.get("formatter"), O = s[+m.m - 1], S = {
            yyyy: m.y,
            yy: (m.y + "").slice(2),
            MM: m.m,
            M: +m.m,
            nameMap: O
          }, x = this._formatterLabel(_, S), C = new jt({
            z2: 30,
            style: _e(Mn(o, {
              text: x
            }), this._monthTextPositionControl(g, p, i, u, l))
          });
          a.add(C);
        }
      }
    }, e.prototype._weekTextPositionControl = function(n, r, i, a, o) {
      var s = "center", l = "middle", u = n[0], c = n[1], f = i === "start";
      return r === "horizontal" ? (u = u + a + (f ? 1 : -1) * o[0] / 2, s = f ? "right" : "left") : (c = c + a + (f ? 1 : -1) * o[1] / 2, l = f ? "bottom" : "top"), {
        x: u,
        y: c,
        align: s,
        verticalAlign: l
      };
    }, e.prototype._renderWeekText = function(n, r, i, a, o) {
      var s = n.getModel("dayLabel");
      if (s.get("show")) {
        var l = n.coordinateSystem, u = s.get("position"), c = s.get("nameMap"), f = s.get("margin"), d = l.getFirstDayOfWeek();
        if (!c || Ve(c)) {
          c && (r = kk(c) || r);
          var h = r.get(["time", "dayOfWeekShort"]);
          c = h || Ce(r.get(["time", "dayOfWeekAbbr"]), function(S) {
            return S[0];
          });
        }
        var p = l.getNextNDay(i.end.time, 7 - i.lweek).time, v = [l.getCellWidth(), l.getCellHeight()];
        f = ze(f, Math.min(v[1], v[0])), u === "start" && (p = l.getNextNDay(i.start.time, -(7 + i.fweek)).time, f = -f);
        for (var g = 0; g < 7; g++) {
          var m = l.getNextNDay(p, g), y = l.dataToRect([m.time], !1).center, _ = g;
          _ = Math.abs((g + d) % 7);
          var O = new jt({
            z2: 30,
            style: _e(Mn(s, {
              text: c[_]
            }), this._weekTextPositionControl(y, a, u, f, v))
          });
          o.add(O);
        }
      }
    }, e.type = "calendar", e;
  }(Ln)
), DI = 864e5, Ilt = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.type = "calendar", this.dimensions = t.dimensions, this.getDimensionsInfo = t.getDimensionsInfo, this._model = e;
    }
    return t.getDimensionsInfo = function() {
      return [{
        name: "time",
        type: "time"
      }, "value"];
    }, t.prototype.getRangeInfo = function() {
      return this._rangeInfo;
    }, t.prototype.getModel = function() {
      return this._model;
    }, t.prototype.getRect = function() {
      return this._rect;
    }, t.prototype.getCellWidth = function() {
      return this._sw;
    }, t.prototype.getCellHeight = function() {
      return this._sh;
    }, t.prototype.getOrient = function() {
      return this._orient;
    }, t.prototype.getFirstDayOfWeek = function() {
      return this._firstDayOfWeek;
    }, t.prototype.getDateInfo = function(e) {
      e = go(e);
      var n = e.getFullYear(), r = e.getMonth() + 1, i = r < 10 ? "0" + r : "" + r, a = e.getDate(), o = a < 10 ? "0" + a : "" + a, s = e.getDay();
      return s = Math.abs((s + 7 - this.getFirstDayOfWeek()) % 7), {
        y: n + "",
        m: i,
        d: o,
        day: s,
        time: e.getTime(),
        formatedDate: n + "-" + i + "-" + o,
        date: e
      };
    }, t.prototype.getNextNDay = function(e, n) {
      return n = n || 0, n === 0 ? this.getDateInfo(e) : (e = new Date(this.getDateInfo(e).time), e.setDate(e.getDate() + n), this.getDateInfo(e));
    }, t.prototype.update = function(e, n) {
      this._firstDayOfWeek = +this._model.getModel("dayLabel").get("firstDay"), this._orient = this._model.get("orient"), this._lineWidth = this._model.getModel("itemStyle").getItemStyle().lineWidth || 0, this._rangeInfo = this._getRangeInfo(this._initRangeOption());
      var r = this._rangeInfo.weeks || 1, i = ["width", "height"], a = this._model.getCellSize().slice(), o = this._model.getBoxLayoutParams(), s = this._orient === "horizontal" ? [r, 7] : [7, r];
      F([0, 1], function(f) {
        c(a, f) && (o[i[f]] = a[f] * s[f]);
      });
      var l = {
        width: n.getWidth(),
        height: n.getHeight()
      }, u = this._rect = Mr(o, l);
      F([0, 1], function(f) {
        c(a, f) || (a[f] = u[i[f]] / s[f]);
      });
      function c(f, d) {
        return f[d] != null && f[d] !== "auto";
      }
      this._sw = a[0], this._sh = a[1];
    }, t.prototype.dataToPoint = function(e, n) {
      Se(e) && (e = e[0]), n == null && (n = !0);
      var r = this.getDateInfo(e), i = this._rangeInfo, a = r.formatedDate;
      if (n && !(r.time >= i.start.time && r.time < i.end.time + DI))
        return [NaN, NaN];
      var o = r.day, s = this._getRangeInfo([i.start.time, a]).nthWeek;
      return this._orient === "vertical" ? [this._rect.x + o * this._sw + this._sw / 2, this._rect.y + s * this._sh + this._sh / 2] : [this._rect.x + s * this._sw + this._sw / 2, this._rect.y + o * this._sh + this._sh / 2];
    }, t.prototype.pointToData = function(e) {
      var n = this.pointToDate(e);
      return n && n.time;
    }, t.prototype.dataToRect = function(e, n) {
      var r = this.dataToPoint(e, n);
      return {
        contentShape: {
          x: r[0] - (this._sw - this._lineWidth) / 2,
          y: r[1] - (this._sh - this._lineWidth) / 2,
          width: this._sw - this._lineWidth,
          height: this._sh - this._lineWidth
        },
        center: r,
        tl: [r[0] - this._sw / 2, r[1] - this._sh / 2],
        tr: [r[0] + this._sw / 2, r[1] - this._sh / 2],
        br: [r[0] + this._sw / 2, r[1] + this._sh / 2],
        bl: [r[0] - this._sw / 2, r[1] + this._sh / 2]
      };
    }, t.prototype.pointToDate = function(e) {
      var n = Math.floor((e[0] - this._rect.x) / this._sw) + 1, r = Math.floor((e[1] - this._rect.y) / this._sh) + 1, i = this._rangeInfo.range;
      return this._orient === "vertical" ? this._getDateByWeeksAndDay(r, n - 1, i) : this._getDateByWeeksAndDay(n, r - 1, i);
    }, t.prototype.convertToPixel = function(e, n, r) {
      var i = jX(n);
      return i === this ? i.dataToPoint(r) : null;
    }, t.prototype.convertFromPixel = function(e, n, r) {
      var i = jX(n);
      return i === this ? i.pointToData(r) : null;
    }, t.prototype.containPoint = function(e) {
      return console.warn("Not implemented."), !1;
    }, t.prototype._initRangeOption = function() {
      var e = this._model.get("range"), n;
      if (Se(e) && e.length === 1 && (e = e[0]), Se(e))
        n = e;
      else {
        var r = e.toString();
        if (/^\d{4}$/.test(r) && (n = [r + "-01-01", r + "-12-31"]), /^\d{4}[\/|-]\d{1,2}$/.test(r)) {
          var i = this.getDateInfo(r), a = i.date;
          a.setMonth(a.getMonth() + 1);
          var o = this.getNextNDay(a, -1);
          n = [i.formatedDate, o.formatedDate];
        }
        /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(r) && (n = [r, r]);
      }
      if (!n)
        return process.env.NODE_ENV !== "production" && qo("Invalid date range."), e;
      var s = this._getRangeInfo(n);
      return s.start.time > s.end.time && n.reverse(), n;
    }, t.prototype._getRangeInfo = function(e) {
      var n = [this.getDateInfo(e[0]), this.getDateInfo(e[1])], r;
      n[0].time > n[1].time && (r = !0, n.reverse());
      var i = Math.floor(n[1].time / DI) - Math.floor(n[0].time / DI) + 1, a = new Date(n[0].time), o = a.getDate(), s = n[1].date.getDate();
      a.setDate(o + i - 1);
      var l = a.getDate();
      if (l !== s)
        for (var u = a.getTime() - n[1].time > 0 ? 1 : -1; (l = a.getDate()) !== s && (a.getTime() - n[1].time) * u > 0; )
          i -= u, a.setDate(l - u);
      var c = Math.floor((i + n[0].day + 6) / 7), f = r ? -c + 1 : c - 1;
      return r && n.reverse(), {
        range: [n[0].formatedDate, n[1].formatedDate],
        start: n[0],
        end: n[1],
        allDay: i,
        weeks: c,
        // From 0.
        nthWeek: f,
        fweek: n[0].day,
        lweek: n[1].day
      };
    }, t.prototype._getDateByWeeksAndDay = function(e, n, r) {
      var i = this._getRangeInfo(r);
      if (e > i.weeks || e === 0 && n < i.fweek || e === i.weeks && n > i.lweek)
        return null;
      var a = (e - 1) * 7 - i.fweek + n, o = new Date(i.start.time);
      return o.setDate(+i.start.d + a), this.getDateInfo(o);
    }, t.create = function(e, n) {
      var r = [];
      return e.eachComponent("calendar", function(i) {
        var a = new t(i);
        r.push(a), i.coordinateSystem = a;
      }), e.eachSeries(function(i) {
        i.get("coordinateSystem") === "calendar" && (i.coordinateSystem = r[i.get("calendarIndex") || 0]);
      }), r;
    }, t.dimensions = ["time", "value"], t;
  }()
);
function jX(t) {
  var e = t.calendarModel, n = t.seriesModel, r = e ? e.coordinateSystem : n ? n.coordinateSystem : null;
  return r;
}
function Dlt(t) {
  t.registerComponentModel(Elt), t.registerComponentView(Mlt), t.registerCoordinateSystem("calendar", Ilt);
}
function Rlt(t, e) {
  var n = t.existing;
  if (e.id = t.keyInfo.id, !e.type && n && (e.type = n.type), e.parentId == null) {
    var r = e.parentOption;
    r ? e.parentId = r.id : n && (e.parentId = n.parentId);
  }
  e.parentOption = null;
}
function ZX(t, e) {
  var n;
  return F(e, function(r) {
    t[r] != null && t[r] !== "auto" && (n = !0);
  }), n;
}
function klt(t, e, n) {
  var r = _e({}, n), i = t[e], a = n.$action || "merge";
  if (a === "merge")
    if (i) {
      if (process.env.NODE_ENV !== "production") {
        var o = n.type;
        at(!o || i.type === o, 'Please set $action: "replace" to change `type`');
      }
      mt(i, r, !0), Of(i, r, {
        ignoreSize: !0
      }), qle(n, i), qS(n, i), qS(n, i, "shape"), qS(n, i, "style"), qS(n, i, "extra"), n.clipPath = i.clipPath;
    } else
      t[e] = r;
  else a === "replace" ? t[e] = r : a === "remove" && i && (t[e] = null);
}
var uhe = ["transition", "enterFrom", "leaveTo"], Llt = uhe.concat(["enterAnimation", "updateAnimation", "leaveAnimation"]);
function qS(t, e, n) {
  if (n && (!t[n] && e[n] && (t[n] = {}), t = t[n], e = e[n]), !(!t || !e))
    for (var r = n ? uhe : Llt, i = 0; i < r.length; i++) {
      var a = r[i];
      t[a] == null && e[a] != null && (t[a] = e[a]);
    }
}
function Nlt(t, e) {
  if (t && (t.hv = e.hv = [
    // Rigid body, don't care about `width`.
    ZX(e, ["left", "right"]),
    // Rigid body, don't care about `height`.
    ZX(e, ["top", "bottom"])
  ], t.type === "group")) {
    var n = t, r = e;
    n.width == null && (n.width = r.width = 0), n.height == null && (n.height = r.height = 0);
  }
}
var Blt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.preventAutoZ = !0, n;
    }
    return e.prototype.mergeOption = function(n, r) {
      var i = this.option.elements;
      this.option.elements = null, t.prototype.mergeOption.call(this, n, r), this.option.elements = i;
    }, e.prototype.optionUpdated = function(n, r) {
      var i = this.option, a = (r ? i : n).elements, o = i.elements = r ? [] : i.elements, s = [];
      this._flatten(a, s, null);
      var l = Nse(o, s, "normalMerge"), u = this._elOptionsToUpdate = [];
      F(l, function(c, f) {
        var d = c.newOption;
        process.env.NODE_ENV !== "production" && at(nt(d) || c.existing, "Empty graphic option definition"), d && (u.push(d), Rlt(c, d), klt(o, f, d), Nlt(o[f], d));
      }, this), i.elements = yn(o, function(c) {
        return c && delete c.$action, c != null;
      });
    }, e.prototype._flatten = function(n, r, i) {
      F(n, function(a) {
        if (a) {
          i && (a.parentOption = i), r.push(a);
          var o = a.children;
          o && o.length && this._flatten(o, r, a), delete a.children;
        }
      }, this);
    }, e.prototype.useElOptionsToUpdate = function() {
      var n = this._elOptionsToUpdate;
      return this._elOptionsToUpdate = null, n;
    }, e.type = "graphic", e.defaultOption = {
      elements: []
      // parentId: null
    }, e;
  }(At)
), UX = {
  // Reserved but not supported in graphic component.
  path: null,
  compoundPath: null,
  // Supported in graphic component.
  group: ct,
  image: ci,
  text: jt
}, Vo = Ut(), zlt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function() {
      this._elMap = Ze();
    }, e.prototype.render = function(n, r, i) {
      n !== this._lastGraphicModel && this._clear(), this._lastGraphicModel = n, this._updateElements(n), this._relocate(n, i);
    }, e.prototype._updateElements = function(n) {
      var r = n.useElOptionsToUpdate();
      if (r) {
        var i = this._elMap, a = this.group, o = n.get("z"), s = n.get("zlevel");
        F(r, function(l) {
          var u = Br(l.id, null), c = u != null ? i.get(u) : null, f = Br(l.parentId, null), d = f != null ? i.get(f) : a, h = l.type, p = l.style;
          h === "text" && p && l.hv && l.hv[1] && (p.textVerticalAlign = p.textBaseline = p.verticalAlign = p.align = null);
          var v = l.textContent, g = l.textConfig;
          if (p && Wde(p, h, !!g, !!v)) {
            var m = Qde(p, h, !0);
            !g && m.textConfig && (g = l.textConfig = m.textConfig), !v && m.textContent && (v = m.textContent);
          }
          var y = Vlt(l);
          process.env.NODE_ENV !== "production" && c && at(d === c.parent, "Changing parent is not supported.");
          var _ = l.$action || "merge", O = _ === "merge", S = _ === "replace";
          if (O) {
            var x = !c, C = c;
            x ? C = XX(u, d, l.type, i) : (C && (Vo(C).isNew = !1), Ude(C)), C && (yw(C, y, n, {
              isInit: x
            }), YX(C, l, o, s));
          } else if (S) {
            Ow(c, l, i, n);
            var P = XX(u, d, l.type, i);
            P && (yw(P, y, n, {
              isInit: !0
            }), YX(P, l, o, s));
          } else _ === "remove" && (Gde(c, l), Ow(c, l, i, n));
          var $ = i.get(u);
          if ($ && v)
            if (O) {
              var T = $.getTextContent();
              T ? T.attr(v) : $.setTextContent(new jt(v));
            } else S && $.setTextContent(new jt(v));
          if ($) {
            var E = l.clipPath;
            if (E) {
              var M = E.type, R = void 0, x = !1;
              if (O) {
                var N = $.getClipPath();
                x = !N || Vo(N).type !== M, R = x ? $L(M) : N;
              } else S && (x = !0, R = $L(M));
              $.setClipPath(R), yw(R, E, n, {
                isInit: x
              }), cT(R, E.keyframeAnimation, n);
            }
            var I = Vo($);
            $.setTextConfig(g), I.option = l, Flt($, n, l), xm({
              el: $,
              componentModel: n,
              itemName: $.name,
              itemTooltipOption: l.tooltip
            }), cT($, l.keyframeAnimation, n);
          }
        });
      }
    }, e.prototype._relocate = function(n, r) {
      for (var i = n.option.elements, a = this.group, o = this._elMap, s = r.getWidth(), l = r.getHeight(), u = ["x", "y"], c = 0; c < i.length; c++) {
        var f = i[c], d = Br(f.id, null), h = d != null ? o.get(d) : null;
        if (!(!h || !h.isGroup)) {
          var p = h.parent, v = p === a, g = Vo(h), m = Vo(p);
          g.width = ze(g.option.width, v ? s : m.width) || 0, g.height = ze(g.option.height, v ? l : m.height) || 0;
        }
      }
      for (var c = i.length - 1; c >= 0; c--) {
        var f = i[c], d = Br(f.id, null), h = d != null ? o.get(d) : null;
        if (h) {
          var p = h.parent, m = Vo(p), y = p === a ? {
            width: s,
            height: l
          } : {
            width: m.width,
            height: m.height
          }, _ = {}, O = MP(h, f, y, null, {
            hv: f.hv,
            boundingMode: f.bounding
          }, _);
          if (!Vo(h).isNew && O) {
            for (var S = f.transition, x = {}, C = 0; C < u.length; C++) {
              var P = u[C], $ = _[P];
              S && (Ah(S) || St(S, P) >= 0) ? x[P] = $ : h[P] = $;
            }
            tn(h, x, n, 0);
          } else
            h.attr(_);
        }
      }
    }, e.prototype._clear = function() {
      var n = this, r = this._elMap;
      r.each(function(i) {
        Ow(i, Vo(i).option, r, n._lastGraphicModel);
      }), this._elMap = Ze();
    }, e.prototype.dispose = function() {
      this._clear();
    }, e.type = "graphic", e;
  }(Ln)
);
function $L(t) {
  process.env.NODE_ENV !== "production" && at(t, "graphic type MUST be set");
  var e = Qe(UX, t) ? UX[t] : wP(t);
  process.env.NODE_ENV !== "production" && at(e, "graphic type " + t + " can not be found");
  var n = new e({});
  return Vo(n).type = t, n;
}
function XX(t, e, n, r) {
  var i = $L(n);
  return e.add(i), r.set(t, i), Vo(i).id = t, Vo(i).isNew = !0, i;
}
function Ow(t, e, n, r) {
  var i = t && t.parent;
  i && (t.type === "group" && t.traverse(function(a) {
    Ow(a, e, n, r);
  }), UP(t, e, r), n.removeKey(Vo(t).id));
}
function YX(t, e, n, r) {
  t.isGroup || F([
    ["cursor", ls.prototype.cursor],
    // We should not support configure z and zlevel in the element level.
    // But seems we didn't limit it previously. So here still use it to avoid breaking.
    ["zlevel", r || 0],
    ["z", n || 0],
    // z2 must not be null/undefined, otherwise sort error may occur.
    ["z2", 0]
  ], function(i) {
    var a = i[0];
    Qe(e, a) ? t[a] = dt(e[a], i[1]) : t[a] == null && (t[a] = i[1]);
  }), F(kt(e), function(i) {
    if (i.indexOf("on") === 0) {
      var a = e[i];
      t[i] = qe(a) ? a : null;
    }
  }), Qe(e, "draggable") && (t.draggable = e.draggable), e.name != null && (t.name = e.name), e.id != null && (t.id = e.id);
}
function Vlt(t) {
  return t = _e({}, t), F(["id", "parentId", "$action", "hv", "bounding", "textContent", "clipPath"].concat(Yle), function(e) {
    delete t[e];
  }), t;
}
function Flt(t, e, n) {
  var r = ft(t).eventData;
  !t.silent && !t.ignore && !r && (r = ft(t).eventData = {
    componentType: "graphic",
    componentIndex: e.componentIndex,
    name: t.name
  }), r && (r.info = n.info);
}
function Wlt(t) {
  t.registerComponentModel(Blt), t.registerComponentView(zlt), t.registerPreprocessor(function(e) {
    var n = e.graphic;
    Se(n) ? !n[0] || !n[0].elements ? e.graphic = [{
      elements: n
    }] : e.graphic = [e.graphic[0]] : n && !n.elements && (e.graphic = [{
      elements: [n]
    }]);
  });
}
var qX = ["x", "y", "radius", "angle", "single"], Qlt = ["cartesian2d", "polar", "singleAxis"];
function Hlt(t) {
  var e = t.get("coordinateSystem");
  return St(Qlt, e) >= 0;
}
function Uc(t) {
  return process.env.NODE_ENV !== "production" && at(t), t + "Axis";
}
function Glt(t, e) {
  var n = Ze(), r = [], i = Ze();
  t.eachComponent({
    mainType: "dataZoom",
    query: e
  }, function(c) {
    i.get(c.uid) || s(c);
  });
  var a;
  do
    a = !1, t.eachComponent("dataZoom", o);
  while (a);
  function o(c) {
    !i.get(c.uid) && l(c) && (s(c), a = !0);
  }
  function s(c) {
    i.set(c.uid, !0), r.push(c), u(c);
  }
  function l(c) {
    var f = !1;
    return c.eachTargetAxis(function(d, h) {
      var p = n.get(d);
      p && p[h] && (f = !0);
    }), f;
  }
  function u(c) {
    c.eachTargetAxis(function(f, d) {
      (n.get(f) || n.set(f, []))[d] = !0;
    });
  }
  return r;
}
function che(t) {
  var e = t.ecModel, n = {
    infoList: [],
    infoMap: Ze()
  };
  return t.eachTargetAxis(function(r, i) {
    var a = e.getComponent(Uc(r), i);
    if (a) {
      var o = a.getCoordSysModel();
      if (o) {
        var s = o.uid, l = n.infoMap.get(s);
        l || (l = {
          model: o,
          axisModels: []
        }, n.infoList.push(l), n.infoMap.set(s, l)), l.axisModels.push(a);
      }
    }
  }), n;
}
var RI = (
  /** @class */
  function() {
    function t() {
      this.indexList = [], this.indexMap = [];
    }
    return t.prototype.add = function(e) {
      this.indexMap[e] || (this.indexList.push(e), this.indexMap[e] = !0);
    }, t;
  }()
), d_ = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._autoThrottle = !0, n._noTarget = !0, n._rangePropMode = ["percent", "percent"], n;
    }
    return e.prototype.init = function(n, r, i) {
      var a = KX(n);
      this.settledOption = a, this.mergeDefaultAndTheme(n, i), this._doInit(a);
    }, e.prototype.mergeOption = function(n) {
      var r = KX(n);
      mt(this.option, n, !0), mt(this.settledOption, r, !0), this._doInit(r);
    }, e.prototype._doInit = function(n) {
      var r = this.option;
      this._setDefaultThrottle(n), this._updateRangeUse(n);
      var i = this.settledOption;
      F([["start", "startValue"], ["end", "endValue"]], function(a, o) {
        this._rangePropMode[o] === "value" && (r[a[0]] = i[a[0]] = null);
      }, this), this._resetTarget();
    }, e.prototype._resetTarget = function() {
      var n = this.get("orient", !0), r = this._targetAxisInfoMap = Ze(), i = this._fillSpecifiedTargetAxis(r);
      i ? this._orient = n || this._makeAutoOrientByTargetAxis() : (this._orient = n || "horizontal", this._fillAutoTargetAxisByOrient(r, this._orient)), this._noTarget = !0, r.each(function(a) {
        a.indexList.length && (this._noTarget = !1);
      }, this);
    }, e.prototype._fillSpecifiedTargetAxis = function(n) {
      var r = !1;
      return F(qX, function(i) {
        var a = this.getReferringComponents(Uc(i), dje);
        if (a.specified) {
          r = !0;
          var o = new RI();
          F(a.models, function(s) {
            o.add(s.componentIndex);
          }), n.set(i, o);
        }
      }, this), r;
    }, e.prototype._fillAutoTargetAxisByOrient = function(n, r) {
      var i = this.ecModel, a = !0;
      if (a) {
        var o = r === "vertical" ? "y" : "x", s = i.findComponents({
          mainType: o + "Axis"
        });
        l(s, o);
      }
      if (a) {
        var s = i.findComponents({
          mainType: "singleAxis",
          filter: function(c) {
            return c.get("orient", !0) === r;
          }
        });
        l(s, "single");
      }
      function l(u, c) {
        var f = u[0];
        if (f) {
          var d = new RI();
          if (d.add(f.componentIndex), n.set(c, d), a = !1, c === "x" || c === "y") {
            var h = f.getReferringComponents("grid", Er).models[0];
            h && F(u, function(p) {
              f.componentIndex !== p.componentIndex && h === p.getReferringComponents("grid", Er).models[0] && d.add(p.componentIndex);
            });
          }
        }
      }
      a && F(qX, function(u) {
        if (a) {
          var c = i.findComponents({
            mainType: Uc(u),
            filter: function(d) {
              return d.get("type", !0) === "category";
            }
          });
          if (c[0]) {
            var f = new RI();
            f.add(c[0].componentIndex), n.set(u, f), a = !1;
          }
        }
      }, this);
    }, e.prototype._makeAutoOrientByTargetAxis = function() {
      var n;
      return this.eachTargetAxis(function(r) {
        !n && (n = r);
      }, this), n === "y" ? "vertical" : "horizontal";
    }, e.prototype._setDefaultThrottle = function(n) {
      if (n.hasOwnProperty("throttle") && (this._autoThrottle = !1), this._autoThrottle) {
        var r = this.ecModel.option;
        this.option.throttle = r.animation && r.animationDurationUpdate > 0 ? 100 : 20;
      }
    }, e.prototype._updateRangeUse = function(n) {
      var r = this._rangePropMode, i = this.get("rangeMode");
      F([["start", "startValue"], ["end", "endValue"]], function(a, o) {
        var s = n[a[0]] != null, l = n[a[1]] != null;
        s && !l ? r[o] = "percent" : !s && l ? r[o] = "value" : i ? r[o] = i[o] : s && (r[o] = "percent");
      });
    }, e.prototype.noTarget = function() {
      return this._noTarget;
    }, e.prototype.getFirstTargetAxisModel = function() {
      var n;
      return this.eachTargetAxis(function(r, i) {
        n == null && (n = this.ecModel.getComponent(Uc(r), i));
      }, this), n;
    }, e.prototype.eachTargetAxis = function(n, r) {
      this._targetAxisInfoMap.each(function(i, a) {
        F(i.indexList, function(o) {
          n.call(r, a, o);
        });
      });
    }, e.prototype.getAxisProxy = function(n, r) {
      var i = this.getAxisModel(n, r);
      if (i)
        return i.__dzAxisProxy;
    }, e.prototype.getAxisModel = function(n, r) {
      process.env.NODE_ENV !== "production" && at(n && r != null);
      var i = this._targetAxisInfoMap.get(n);
      if (i && i.indexMap[r])
        return this.ecModel.getComponent(Uc(n), r);
    }, e.prototype.setRawRange = function(n) {
      var r = this.option, i = this.settledOption;
      F([["start", "startValue"], ["end", "endValue"]], function(a) {
        (n[a[0]] != null || n[a[1]] != null) && (r[a[0]] = i[a[0]] = n[a[0]], r[a[1]] = i[a[1]] = n[a[1]]);
      }, this), this._updateRangeUse(n);
    }, e.prototype.setCalculatedRange = function(n) {
      var r = this.option;
      F(["start", "startValue", "end", "endValue"], function(i) {
        r[i] = n[i];
      });
    }, e.prototype.getPercentRange = function() {
      var n = this.findRepresentativeAxisProxy();
      if (n)
        return n.getDataPercentWindow();
    }, e.prototype.getValueRange = function(n, r) {
      if (n == null && r == null) {
        var i = this.findRepresentativeAxisProxy();
        if (i)
          return i.getDataValueWindow();
      } else
        return this.getAxisProxy(n, r).getDataValueWindow();
    }, e.prototype.findRepresentativeAxisProxy = function(n) {
      if (n)
        return n.__dzAxisProxy;
      for (var r, i = this._targetAxisInfoMap.keys(), a = 0; a < i.length; a++)
        for (var o = i[a], s = this._targetAxisInfoMap.get(o), l = 0; l < s.indexList.length; l++) {
          var u = this.getAxisProxy(o, s.indexList[l]);
          if (u.hostedBy(this))
            return u;
          r || (r = u);
        }
      return r;
    }, e.prototype.getRangePropMode = function() {
      return this._rangePropMode.slice();
    }, e.prototype.getOrient = function() {
      return process.env.NODE_ENV !== "production" && at(this._orient), this._orient;
    }, e.type = "dataZoom", e.dependencies = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "series", "toolbox"], e.defaultOption = {
      // zlevel: 0,
      z: 4,
      filterMode: "filter",
      start: 0,
      end: 100
    }, e;
  }(At)
);
function KX(t) {
  var e = {};
  return F(["start", "end", "startValue", "endValue", "throttle"], function(n) {
    t.hasOwnProperty(n) && (e[n] = t[n]);
  }), e;
}
var jlt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "dataZoom.select", e;
  }(d_)
), O6 = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i, a) {
      this.dataZoomModel = n, this.ecModel = r, this.api = i;
    }, e.type = "dataZoom", e;
  }(Ln)
), Zlt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "dataZoom.select", e;
  }(O6)
), xv = F, JX = ao, Ult = (
  /** @class */
  function() {
    function t(e, n, r, i) {
      this._dimName = e, this._axisIndex = n, this.ecModel = i, this._dataZoomModel = r;
    }
    return t.prototype.hostedBy = function(e) {
      return this._dataZoomModel === e;
    }, t.prototype.getDataValueWindow = function() {
      return this._valueWindow.slice();
    }, t.prototype.getDataPercentWindow = function() {
      return this._percentWindow.slice();
    }, t.prototype.getTargetSeriesModels = function() {
      var e = [];
      return this.ecModel.eachSeries(function(n) {
        if (Hlt(n)) {
          var r = Uc(this._dimName), i = n.getReferringComponents(r, Er).models[0];
          i && this._axisIndex === i.componentIndex && e.push(n);
        }
      }, this), e;
    }, t.prototype.getAxisModel = function() {
      return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex);
    }, t.prototype.getMinMaxSpan = function() {
      return ot(this._minMaxSpan);
    }, t.prototype.calculateDataWindow = function(e) {
      var n = this._dataExtent, r = this.getAxisModel(), i = r.axis.scale, a = this._dataZoomModel.getRangePropMode(), o = [0, 100], s = [], l = [], u;
      xv(["start", "end"], function(d, h) {
        var p = e[d], v = e[d + "Value"];
        a[h] === "percent" ? (p == null && (p = o[h]), v = i.parse(gn(p, o, n))) : (u = !0, v = v == null ? n[h] : i.parse(v), p = gn(v, n, o)), l[h] = v == null || isNaN(v) ? n[h] : v, s[h] = p == null || isNaN(p) ? o[h] : p;
      }), JX(l), JX(s);
      var c = this._minMaxSpan;
      u ? f(l, s, n, o, !1) : f(s, l, o, n, !0);
      function f(d, h, p, v, g) {
        var m = g ? "Span" : "ValueSpan";
        _p(0, d, p, "all", c["min" + m], c["max" + m]);
        for (var y = 0; y < 2; y++)
          h[y] = gn(d[y], p, v, !0), g && (h[y] = i.parse(h[y]));
      }
      return {
        valueWindow: l,
        percentWindow: s
      };
    }, t.prototype.reset = function(e) {
      if (e === this._dataZoomModel) {
        var n = this.getTargetSeriesModels();
        this._dataExtent = Xlt(this, this._dimName, n), this._updateMinMaxSpan();
        var r = this.calculateDataWindow(e.settledOption);
        this._valueWindow = r.valueWindow, this._percentWindow = r.percentWindow, this._setAxisModel();
      }
    }, t.prototype.filterData = function(e, n) {
      if (e !== this._dataZoomModel)
        return;
      var r = this._dimName, i = this.getTargetSeriesModels(), a = e.get("filterMode"), o = this._valueWindow;
      if (a === "none")
        return;
      xv(i, function(l) {
        var u = l.getData(), c = u.mapDimensionsAll(r);
        if (c.length) {
          if (a === "weakFilter") {
            var f = u.getStore(), d = Ce(c, function(h) {
              return u.getDimensionIndex(h);
            }, u);
            u.filterSelf(function(h) {
              for (var p, v, g, m = 0; m < c.length; m++) {
                var y = f.get(d[m], h), _ = !isNaN(y), O = y < o[0], S = y > o[1];
                if (_ && !O && !S)
                  return !0;
                _ && (g = !0), O && (p = !0), S && (v = !0);
              }
              return g && p && v;
            });
          } else
            xv(c, function(h) {
              if (a === "empty")
                l.setData(u = u.map(h, function(v) {
                  return s(v) ? v : NaN;
                }));
              else {
                var p = {};
                p[h] = o, u.selectRange(p);
              }
            });
          xv(c, function(h) {
            u.setApproximateExtent(o, h);
          });
        }
      });
      function s(l) {
        return l >= o[0] && l <= o[1];
      }
    }, t.prototype._updateMinMaxSpan = function() {
      var e = this._minMaxSpan = {}, n = this._dataZoomModel, r = this._dataExtent;
      xv(["min", "max"], function(i) {
        var a = n.get(i + "Span"), o = n.get(i + "ValueSpan");
        o != null && (o = this.getAxisModel().axis.scale.parse(o)), o != null ? a = gn(r[0] + o, r, [0, 100], !0) : a != null && (o = gn(a, [0, 100], r, !0) - r[0]), e[i + "Span"] = a, e[i + "ValueSpan"] = o;
      }, this);
    }, t.prototype._setAxisModel = function() {
      var e = this.getAxisModel(), n = this._percentWindow, r = this._valueWindow;
      if (n) {
        var i = T5(r, [0, 500]);
        i = Math.min(i, 20);
        var a = e.axis.scale.rawExtentInfo;
        n[0] !== 0 && a.setDeterminedMinMax("min", +r[0].toFixed(i)), n[1] !== 100 && a.setDeterminedMinMax("max", +r[1].toFixed(i)), a.freeze();
      }
    }, t;
  }()
);
function Xlt(t, e, n) {
  var r = [1 / 0, -1 / 0];
  xv(n, function(o) {
    fKe(r, o.getData(), e);
  });
  var i = t.getAxisModel(), a = Tce(i.axis.scale, i, r).calculate();
  return [a.min, a.max];
}
var Ylt = {
  // `dataZoomProcessor` will only be performed in needed series. Consider if
  // there is a line series and a pie series, it is better not to update the
  // line series if only pie series is needed to be updated.
  getTargetSeries: function(t) {
    function e(i) {
      t.eachComponent("dataZoom", function(a) {
        a.eachTargetAxis(function(o, s) {
          var l = t.getComponent(Uc(o), s);
          i(o, s, l, a);
        });
      });
    }
    e(function(i, a, o, s) {
      o.__dzAxisProxy = null;
    });
    var n = [];
    e(function(i, a, o, s) {
      o.__dzAxisProxy || (o.__dzAxisProxy = new Ult(i, a, s, t), n.push(o.__dzAxisProxy));
    });
    var r = Ze();
    return F(n, function(i) {
      F(i.getTargetSeriesModels(), function(a) {
        r.set(a.uid, a);
      });
    }), r;
  },
  // Consider appendData, where filter should be performed. Because data process is
  // in block mode currently, it is not need to worry about that the overallProgress
  // execute every frame.
  overallReset: function(t, e) {
    t.eachComponent("dataZoom", function(n) {
      n.eachTargetAxis(function(r, i) {
        n.getAxisProxy(r, i).reset(n);
      }), n.eachTargetAxis(function(r, i) {
        n.getAxisProxy(r, i).filterData(n, e);
      });
    }), t.eachComponent("dataZoom", function(n) {
      var r = n.findRepresentativeAxisProxy();
      if (r) {
        var i = r.getDataPercentWindow(), a = r.getDataValueWindow();
        n.setCalculatedRange({
          start: i[0],
          end: i[1],
          startValue: a[0],
          endValue: a[1]
        });
      }
    });
  }
};
function qlt(t) {
  t.registerAction("dataZoom", function(e, n) {
    var r = Glt(n, e);
    F(r, function(i) {
      i.setRawRange({
        start: e.start,
        end: e.end,
        startValue: e.startValue,
        endValue: e.endValue
      });
    });
  });
}
var eY = !1;
function S6(t) {
  eY || (eY = !0, t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, Ylt), qlt(t), t.registerSubTypeDefaulter("dataZoom", function() {
    return "slider";
  }));
}
function Klt(t) {
  t.registerComponentModel(jlt), t.registerComponentView(Zlt), S6(t);
}
var Ho = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
    }
    return t;
  }()
), fhe = {};
function wv(t, e) {
  fhe[t] = e;
}
function dhe(t) {
  return fhe[t];
}
var Jlt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.optionUpdated = function() {
      t.prototype.optionUpdated.apply(this, arguments);
      var n = this.ecModel;
      F(this.option.feature, function(r, i) {
        var a = dhe(i);
        a && (a.getDefaultOption && (a.defaultOption = a.getDefaultOption(n)), mt(r, a.defaultOption));
      });
    }, e.type = "toolbox", e.layoutMode = {
      type: "box",
      ignoreSize: !0
    }, e.defaultOption = {
      show: !0,
      z: 6,
      // zlevel: 0,
      orient: "horizontal",
      left: "right",
      top: "top",
      // right
      // bottom
      backgroundColor: "transparent",
      borderColor: "#ccc",
      borderRadius: 0,
      borderWidth: 0,
      padding: 5,
      itemSize: 15,
      itemGap: 8,
      showTitle: !0,
      iconStyle: {
        borderColor: "#666",
        color: "none"
      },
      emphasis: {
        iconStyle: {
          borderColor: "#3E98C5"
        }
      },
      // textStyle: {},
      // feature
      tooltip: {
        show: !1,
        position: "bottom"
      }
    }, e;
  }(At)
);
function eut(t, e, n) {
  var r = e.getBoxLayoutParams(), i = e.get("padding"), a = {
    width: n.getWidth(),
    height: n.getHeight()
  }, o = Mr(r, a, i);
  Th(e.get("orient"), t, e.get("itemGap"), o.width, o.height), MP(t, r, a, i);
}
function hhe(t, e) {
  var n = vp(e.get("padding")), r = e.getItemStyle(["color", "opacity"]);
  return r.fill = e.get("backgroundColor"), t = new Zt({
    shape: {
      x: t.x - n[3],
      y: t.y - n[0],
      width: t.width + n[1] + n[3],
      height: t.height + n[0] + n[2],
      r: e.get("borderRadius")
    },
    style: r,
    silent: !0,
    z2: -1
  }), t;
}
var tut = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.render = function(n, r, i, a) {
      var o = this.group;
      if (o.removeAll(), !n.get("show"))
        return;
      var s = +n.get("itemSize"), l = n.get("orient") === "vertical", u = n.get("feature") || {}, c = this._features || (this._features = {}), f = [];
      F(u, function(p, v) {
        f.push(v);
      }), new Qu(this._featureNames || [], f).add(d).update(d).remove(vt(d, null)).execute(), this._featureNames = f;
      function d(p, v) {
        var g = f[p], m = f[v], y = u[g], _ = new xn(y, n, n.ecModel), O;
        if (a && a.newTitle != null && a.featureName === g && (y.title = a.newTitle), g && !m) {
          if (nut(g))
            O = {
              onclick: _.option.onclick,
              featureName: g
            };
          else {
            var S = dhe(g);
            if (!S)
              return;
            O = new S();
          }
          c[g] = O;
        } else if (O = c[m], !O)
          return;
        O.uid = Cm("toolbox-feature"), O.model = _, O.ecModel = r, O.api = i;
        var x = O instanceof Ho;
        if (!g && m) {
          x && O.dispose && O.dispose(r, i);
          return;
        }
        if (!_.get("show") || x && O.unusable) {
          x && O.remove && O.remove(r, i);
          return;
        }
        h(_, O, g), _.setIconStatus = function(C, P) {
          var $ = this.option, T = this.iconPaths;
          $.iconStatus = $.iconStatus || {}, $.iconStatus[C] = P, T[C] && (P === "emphasis" ? Fu : Wu)(T[C]);
        }, O instanceof Ho && O.render && O.render(_, r, i, a);
      }
      function h(p, v, g) {
        var m = p.getModel("iconStyle"), y = p.getModel(["emphasis", "iconStyle"]), _ = v instanceof Ho && v.getIcons ? v.getIcons() : p.get("icon"), O = p.get("title") || {}, S, x;
        Ve(_) ? (S = {}, S[g] = _) : S = _, Ve(O) ? (x = {}, x[g] = O) : x = O;
        var C = p.iconPaths = {};
        F(S, function(P, $) {
          var T = Sm(P, {}, {
            x: -s / 2,
            y: -s / 2,
            width: s,
            height: s
          });
          T.setStyle(m.getItemStyle());
          var E = T.ensureState("emphasis");
          E.style = y.getItemStyle();
          var M = new jt({
            style: {
              text: x[$],
              align: y.get("textAlign"),
              borderRadius: y.get("textBorderRadius"),
              padding: y.get("textPadding"),
              fill: null,
              font: G5({
                fontStyle: y.get("textFontStyle"),
                fontFamily: y.get("textFontFamily"),
                fontSize: y.get("textFontSize"),
                fontWeight: y.get("textFontWeight")
              }, r)
            },
            ignore: !0
          });
          T.setTextContent(M), xm({
            el: T,
            componentModel: n,
            itemName: $,
            formatterParamsExtra: {
              title: x[$]
            }
          }), T.__title = x[$], T.on("mouseover", function() {
            var R = y.getItemStyle(), N = l ? n.get("right") == null && n.get("left") !== "right" ? "right" : "left" : n.get("bottom") == null && n.get("top") !== "bottom" ? "bottom" : "top";
            M.setStyle({
              fill: y.get("textFill") || R.fill || R.stroke || "#000",
              backgroundColor: y.get("textBackgroundColor")
            }), T.setTextConfig({
              position: y.get("textPosition") || N
            }), M.ignore = !n.get("showTitle"), i.enterEmphasis(this);
          }).on("mouseout", function() {
            p.get(["iconStatus", $]) !== "emphasis" && i.leaveEmphasis(this), M.hide();
          }), (p.get(["iconStatus", $]) === "emphasis" ? Fu : Wu)(T), o.add(T), T.on("click", We(v.onclick, v, r, i, $)), C[$] = T;
        });
      }
      eut(o, n, i), o.add(hhe(o.getBoundingRect(), n)), l || o.eachChild(function(p) {
        var v = p.__title, g = p.ensureState("emphasis"), m = g.textConfig || (g.textConfig = {}), y = p.getTextContent(), _ = y && y.ensureState("emphasis");
        if (_ && !qe(_) && v) {
          var O = _.style || (_.style = {}), S = o1(v, jt.makeFont(O)), x = p.x + o.x, C = p.y + o.y + s, P = !1;
          C + S.height > i.getHeight() && (m.position = "top", P = !0);
          var $ = P ? -5 - S.height : s + 10;
          x + S.width / 2 > i.getWidth() ? (m.position = ["100%", $], O.align = "right") : x - S.width / 2 < 0 && (m.position = [0, $], O.align = "left");
        }
      });
    }, e.prototype.updateView = function(n, r, i, a) {
      F(this._features, function(o) {
        o instanceof Ho && o.updateView && o.updateView(o.model, r, i, a);
      });
    }, e.prototype.remove = function(n, r) {
      F(this._features, function(i) {
        i instanceof Ho && i.remove && i.remove(n, r);
      }), this.group.removeAll();
    }, e.prototype.dispose = function(n, r) {
      F(this._features, function(i) {
        i instanceof Ho && i.dispose && i.dispose(n, r);
      });
    }, e.type = "toolbox", e;
  }(Ln)
);
function nut(t) {
  return t.indexOf("my") === 0;
}
var rut = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.onclick = function(n, r) {
      var i = this.model, a = i.get("name") || n.get("title.0.text") || "echarts", o = r.getZr().painter.getType() === "svg", s = o ? "svg" : i.get("type", !0) || "png", l = r.getConnectedDataURL({
        type: s,
        backgroundColor: i.get("backgroundColor", !0) || n.get("backgroundColor") || "#fff",
        connectedBackgroundColor: i.get("connectedBackgroundColor"),
        excludeComponents: i.get("excludeComponents"),
        pixelRatio: i.get("pixelRatio")
      }), u = Gt.browser;
      if (typeof MouseEvent == "function" && (u.newEdge || !u.ie && !u.edge)) {
        var c = document.createElement("a");
        c.download = a + "." + s, c.target = "_blank", c.href = l;
        var f = new MouseEvent("click", {
          // some micro front-end framework， window maybe is a Proxy
          view: document.defaultView,
          bubbles: !0,
          cancelable: !1
        });
        c.dispatchEvent(f);
      } else if (window.navigator.msSaveOrOpenBlob || o) {
        var d = l.split(","), h = d[0].indexOf("base64") > -1, p = o ? decodeURIComponent(d[1]) : d[1];
        h && (p = window.atob(p));
        var v = a + "." + s;
        if (window.navigator.msSaveOrOpenBlob) {
          for (var g = p.length, m = new Uint8Array(g); g--; )
            m[g] = p.charCodeAt(g);
          var y = new Blob([m]);
          window.navigator.msSaveOrOpenBlob(y, v);
        } else {
          var _ = document.createElement("iframe");
          document.body.appendChild(_);
          var O = _.contentWindow, S = O.document;
          S.open("image/svg+xml", "replace"), S.write(p), S.close(), O.focus(), S.execCommand("SaveAs", !0, v), document.body.removeChild(_);
        }
      } else {
        var x = i.get("lang"), C = '<body style="margin:0;"><img src="' + l + '" style="max-width:100%;" title="' + (x && x[0] || "") + '" /></body>', P = window.open();
        P.document.write(C), P.document.title = a;
      }
    }, e.getDefaultOption = function(n) {
      var r = {
        show: !0,
        icon: "M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",
        title: n.getLocaleModel().get(["toolbox", "saveAsImage", "title"]),
        type: "png",
        // Default use option.backgroundColor
        // backgroundColor: '#fff',
        connectedBackgroundColor: "#fff",
        name: "",
        excludeComponents: ["toolbox"],
        // use current pixel ratio of device by default
        // pixelRatio: 1,
        lang: n.getLocaleModel().get(["toolbox", "saveAsImage", "lang"])
      };
      return r;
    }, e;
  }(Ho)
), tY = "__ec_magicType_stack__", iut = [["line", "bar"], ["stack"]], aut = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.getIcons = function() {
      var n = this.model, r = n.get("icon"), i = {};
      return F(n.get("type"), function(a) {
        r[a] && (i[a] = r[a]);
      }), i;
    }, e.getDefaultOption = function(n) {
      var r = {
        show: !0,
        type: [],
        // Icon group
        icon: {
          line: "M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",
          bar: "M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",
          // eslint-disable-next-line
          stack: "M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"
          // jshint ignore:line
        },
        // `line`, `bar`, `stack`, `tiled`
        title: n.getLocaleModel().get(["toolbox", "magicType", "title"]),
        option: {},
        seriesIndex: {}
      };
      return r;
    }, e.prototype.onclick = function(n, r, i) {
      var a = this.model, o = a.get(["seriesIndex", i]);
      if (nY[i]) {
        var s = {
          series: []
        }, l = function(f) {
          var d = f.subType, h = f.id, p = nY[i](d, h, f, a);
          p && (it(p, f.option), s.series.push(p));
          var v = f.coordinateSystem;
          if (v && v.type === "cartesian2d" && (i === "line" || i === "bar")) {
            var g = v.getAxesByScale("ordinal")[0];
            if (g) {
              var m = g.dim, y = m + "Axis", _ = f.getReferringComponents(y, Er).models[0], O = _.componentIndex;
              s[y] = s[y] || [];
              for (var S = 0; S <= O; S++)
                s[y][O] = s[y][O] || {};
              s[y][O].boundaryGap = i === "bar";
            }
          }
        };
        F(iut, function(f) {
          St(f, i) >= 0 && F(f, function(d) {
            a.setIconStatus(d, "normal");
          });
        }), a.setIconStatus(i, "emphasis"), n.eachComponent({
          mainType: "series",
          query: o == null ? null : {
            seriesIndex: o
          }
        }, l);
        var u, c = i;
        i === "stack" && (u = mt({
          stack: a.option.title.tiled,
          tiled: a.option.title.stack
        }, a.option.title), a.get(["iconStatus", i]) !== "emphasis" && (c = "tiled")), r.dispatchAction({
          type: "changeMagicType",
          currentType: c,
          newOption: s,
          newTitle: u,
          featureName: "magicType"
        });
      }
    }, e;
  }(Ho)
), nY = {
  line: function(t, e, n, r) {
    if (t === "bar")
      return mt({
        id: e,
        type: "line",
        // Preserve data related option
        data: n.get("data"),
        stack: n.get("stack"),
        markPoint: n.get("markPoint"),
        markLine: n.get("markLine")
      }, r.get(["option", "line"]) || {}, !0);
  },
  bar: function(t, e, n, r) {
    if (t === "line")
      return mt({
        id: e,
        type: "bar",
        // Preserve data related option
        data: n.get("data"),
        stack: n.get("stack"),
        markPoint: n.get("markPoint"),
        markLine: n.get("markLine")
      }, r.get(["option", "bar"]) || {}, !0);
  },
  stack: function(t, e, n, r) {
    var i = n.get("stack") === tY;
    if (t === "line" || t === "bar")
      return r.setIconStatus("stack", i ? "normal" : "emphasis"), mt({
        id: e,
        stack: i ? "" : tY
      }, r.get(["option", "stack"]) || {}, !0);
  }
};
Js({
  type: "changeMagicType",
  event: "magicTypeChanged",
  update: "prepareAndUpdate"
}, function(t, e) {
  e.mergeOption(t.newOption);
});
var XP = new Array(60).join("-"), Yg = "	";
function out(t) {
  var e = {}, n = [], r = [];
  return t.eachRawSeries(function(i) {
    var a = i.coordinateSystem;
    if (a && (a.type === "cartesian2d" || a.type === "polar")) {
      var o = a.getBaseAxis();
      if (o.type === "category") {
        var s = o.dim + "_" + o.index;
        e[s] || (e[s] = {
          categoryAxis: o,
          valueAxis: a.getOtherAxis(o),
          series: []
        }, r.push({
          axisDim: o.dim,
          axisIndex: o.index
        })), e[s].series.push(i);
      } else
        n.push(i);
    } else
      n.push(i);
  }), {
    seriesGroupByCategoryAxis: e,
    other: n,
    meta: r
  };
}
function sut(t) {
  var e = [];
  return F(t, function(n, r) {
    var i = n.categoryAxis, a = n.valueAxis, o = a.dim, s = [" "].concat(Ce(n.series, function(h) {
      return h.name;
    })), l = [i.model.getCategories()];
    F(n.series, function(h) {
      var p = h.getRawData();
      l.push(h.getRawData().mapArray(p.mapDimension(o), function(v) {
        return v;
      }));
    });
    for (var u = [s.join(Yg)], c = 0; c < l[0].length; c++) {
      for (var f = [], d = 0; d < l.length; d++)
        f.push(l[d][c]);
      u.push(f.join(Yg));
    }
    e.push(u.join(`
`));
  }), e.join(`

` + XP + `

`);
}
function lut(t) {
  return Ce(t, function(e) {
    var n = e.getRawData(), r = [e.name], i = [];
    return n.each(n.dimensions, function() {
      for (var a = arguments.length, o = arguments[a - 1], s = n.getName(o), l = 0; l < a - 1; l++)
        i[l] = arguments[l];
      r.push((s ? s + Yg : "") + i.join(Yg));
    }), r.join(`
`);
  }).join(`

` + XP + `

`);
}
function uut(t) {
  var e = out(t);
  return {
    value: yn([sut(e.seriesGroupByCategoryAxis), lut(e.other)], function(n) {
      return !!n.replace(/[\n\t\s]/g, "");
    }).join(`

` + XP + `

`),
    meta: e.meta
  };
}
function pT(t) {
  return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
}
function cut(t) {
  var e = t.slice(0, t.indexOf(`
`));
  if (e.indexOf(Yg) >= 0)
    return !0;
}
var AL = new RegExp("[" + Yg + "]+", "g");
function fut(t) {
  for (var e = t.split(/\n+/g), n = pT(e.shift()).split(AL), r = [], i = Ce(n, function(l) {
    return {
      name: l,
      data: []
    };
  }), a = 0; a < e.length; a++) {
    var o = pT(e[a]).split(AL);
    r.push(o.shift());
    for (var s = 0; s < o.length; s++)
      i[s] && (i[s].data[a] = o[s]);
  }
  return {
    series: i,
    categories: r
  };
}
function dut(t) {
  for (var e = t.split(/\n+/g), n = pT(e.shift()), r = [], i = 0; i < e.length; i++) {
    var a = pT(e[i]);
    if (a) {
      var o = a.split(AL), s = "", l = void 0, u = !1;
      isNaN(o[0]) ? (u = !0, s = o[0], o = o.slice(1), r[i] = {
        name: s,
        value: []
      }, l = r[i].value) : l = r[i] = [];
      for (var c = 0; c < o.length; c++)
        l.push(+o[c]);
      l.length === 1 && (u ? r[i].value = l[0] : r[i] = l[0]);
    }
  }
  return {
    name: n,
    data: r
  };
}
function hut(t, e) {
  var n = t.split(new RegExp(`
*` + XP + `
*`, "g")), r = {
    series: []
  };
  return F(n, function(i, a) {
    if (cut(i)) {
      var o = fut(i), s = e[a], l = s.axisDim + "Axis";
      s && (r[l] = r[l] || [], r[l][s.axisIndex] = {
        data: o.categories
      }, r.series = r.series.concat(o.series));
    } else {
      var o = dut(i);
      r.series.push(o);
    }
  }), r;
}
var put = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.onclick = function(n, r) {
      setTimeout(function() {
        r.dispatchAction({
          type: "hideTip"
        });
      });
      var i = r.getDom(), a = this.model;
      this._dom && i.removeChild(this._dom);
      var o = document.createElement("div");
      o.style.cssText = "position:absolute;top:0;bottom:0;left:0;right:0;padding:5px", o.style.backgroundColor = a.get("backgroundColor") || "#fff";
      var s = document.createElement("h4"), l = a.get("lang") || [];
      s.innerHTML = l[0] || a.get("title"), s.style.cssText = "margin:10px 20px", s.style.color = a.get("textColor");
      var u = document.createElement("div"), c = document.createElement("textarea");
      u.style.cssText = "overflow:auto";
      var f = a.get("optionToContent"), d = a.get("contentToOption"), h = uut(n);
      if (qe(f)) {
        var p = f(r.getOption());
        Ve(p) ? u.innerHTML = p : gf(p) && u.appendChild(p);
      } else {
        c.readOnly = a.get("readOnly");
        var v = c.style;
        v.cssText = "display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none", v.color = a.get("textColor"), v.borderColor = a.get("textareaBorderColor"), v.backgroundColor = a.get("textareaColor"), c.value = h.value, u.appendChild(c);
      }
      var g = h.meta, m = document.createElement("div");
      m.style.cssText = "position:absolute;bottom:5px;left:0;right:0";
      var y = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px", _ = document.createElement("div"), O = document.createElement("div");
      y += ";background-color:" + a.get("buttonColor"), y += ";color:" + a.get("buttonTextColor");
      var S = this;
      function x() {
        i.removeChild(o), S._dom = null;
      }
      ok(_, "click", x), ok(O, "click", function() {
        if (d == null && f != null || d != null && f == null) {
          process.env.NODE_ENV !== "production" && nr("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."), x();
          return;
        }
        var C;
        try {
          qe(d) ? C = d(u, r.getOption()) : C = hut(c.value, g);
        } catch (P) {
          throw x(), new Error("Data view format error " + P);
        }
        C && r.dispatchAction({
          type: "changeDataView",
          newOption: C
        }), x();
      }), _.innerHTML = l[1], O.innerHTML = l[2], O.style.cssText = _.style.cssText = y, !a.get("readOnly") && m.appendChild(O), m.appendChild(_), o.appendChild(s), o.appendChild(u), o.appendChild(m), u.style.height = i.clientHeight - 80 + "px", i.appendChild(o), this._dom = o;
    }, e.prototype.remove = function(n, r) {
      this._dom && r.getDom().removeChild(this._dom);
    }, e.prototype.dispose = function(n, r) {
      this.remove(n, r);
    }, e.getDefaultOption = function(n) {
      var r = {
        show: !0,
        readOnly: !1,
        optionToContent: null,
        contentToOption: null,
        // eslint-disable-next-line
        icon: "M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",
        title: n.getLocaleModel().get(["toolbox", "dataView", "title"]),
        lang: n.getLocaleModel().get(["toolbox", "dataView", "lang"]),
        backgroundColor: "#fff",
        textColor: "#000",
        textareaColor: "#fff",
        textareaBorderColor: "#333",
        buttonColor: "#c23531",
        buttonTextColor: "#fff"
      };
      return r;
    }, e;
  }(Ho)
);
function vut(t, e) {
  return Ce(t, function(n, r) {
    var i = e && e[r];
    if (nt(i) && !Se(i)) {
      var a = nt(n) && !Se(n);
      a || (n = {
        value: n
      });
      var o = i.name != null && n.name == null;
      return n = it(n, i), o && delete n.name, n;
    } else
      return n;
  });
}
Js({
  type: "changeDataView",
  event: "dataViewChanged",
  update: "prepareAndUpdate"
}, function(t, e) {
  var n = [];
  F(t.newOption.series, function(r) {
    var i = e.getSeriesByName(r.name)[0];
    if (!i)
      n.push(_e({
        // Default is scatter
        type: "scatter"
      }, r));
    else {
      var a = i.get("data");
      n.push({
        name: r.name,
        data: vut(r.data, a)
      });
    }
  }), e.mergeOption(it({
    series: n
  }, t.newOption));
});
var phe = F, vhe = Ut();
function gut(t, e) {
  var n = x6(t);
  phe(e, function(r, i) {
    for (var a = n.length - 1; a >= 0; a--) {
      var o = n[a];
      if (o[i])
        break;
    }
    if (a < 0) {
      var s = t.queryComponents({
        mainType: "dataZoom",
        subType: "select",
        id: i
      })[0];
      if (s) {
        var l = s.getPercentRange();
        n[0][i] = {
          dataZoomId: i,
          start: l[0],
          end: l[1]
        };
      }
    }
  }), n.push(e);
}
function mut(t) {
  var e = x6(t), n = e[e.length - 1];
  e.length > 1 && e.pop();
  var r = {};
  return phe(n, function(i, a) {
    for (var o = e.length - 1; o >= 0; o--)
      if (i = e[o][a], i) {
        r[a] = i;
        break;
      }
  }), r;
}
function yut(t) {
  vhe(t).snapshots = null;
}
function but(t) {
  return x6(t).length;
}
function x6(t) {
  var e = vhe(t);
  return e.snapshots || (e.snapshots = [{}]), e.snapshots;
}
var _ut = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.onclick = function(n, r) {
      yut(n), r.dispatchAction({
        type: "restore",
        from: this.uid
      });
    }, e.getDefaultOption = function(n) {
      var r = {
        show: !0,
        // eslint-disable-next-line
        icon: "M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",
        title: n.getLocaleModel().get(["toolbox", "restore", "title"])
      };
      return r;
    }, e;
  }(Ho)
);
Js({
  type: "restore",
  event: "restore",
  update: "prepareAndUpdate"
}, function(t, e) {
  e.resetOption("recreate");
});
var Out = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"], w6 = (
  /** @class */
  function() {
    function t(e, n, r) {
      var i = this;
      this._targetInfoList = [];
      var a = rY(n, e);
      F(Sut, function(o, s) {
        (!r || !r.include || St(r.include, s) >= 0) && o(a, i._targetInfoList);
      });
    }
    return t.prototype.setOutputRanges = function(e, n) {
      return this.matchOutputRanges(e, n, function(r, i, a) {
        if ((r.coordRanges || (r.coordRanges = [])).push(i), !r.coordRange) {
          r.coordRange = i;
          var o = kI[r.brushType](0, a, i);
          r.__rangeOffset = {
            offset: sY[r.brushType](o.values, r.range, [1, 1]),
            xyMinMax: o.xyMinMax
          };
        }
      }), e;
    }, t.prototype.matchOutputRanges = function(e, n, r) {
      F(e, function(i) {
        var a = this.findTargetInfo(i, n);
        a && a !== !0 && F(a.coordSyses, function(o) {
          var s = kI[i.brushType](1, o, i.range, !0);
          r(i, s.values, o, n);
        });
      }, this);
    }, t.prototype.setInputRanges = function(e, n) {
      F(e, function(r) {
        var i = this.findTargetInfo(r, n);
        if (process.env.NODE_ENV !== "production" && (at(!i || i === !0 || r.coordRange, "coordRange must be specified when coord index specified."), at(!i || i !== !0 || r.range, "range must be specified in global brush.")), r.range = r.range || [], i && i !== !0) {
          r.panelId = i.panelId;
          var a = kI[r.brushType](0, i.coordSys, r.coordRange), o = r.__rangeOffset;
          r.range = o ? sY[r.brushType](a.values, o.offset, xut(a.xyMinMax, o.xyMinMax)) : a.values;
        }
      }, this);
    }, t.prototype.makePanelOpts = function(e, n) {
      return Ce(this._targetInfoList, function(r) {
        var i = r.getPanelRect();
        return {
          panelId: r.panelId,
          defaultBrushType: n ? n(r) : null,
          clipPath: Sde(i),
          isTargetByCursor: wde(i, e, r.coordSysModel),
          getLinearBrushOtherExtent: xde(i)
        };
      });
    }, t.prototype.controlSeries = function(e, n, r) {
      var i = this.findTargetInfo(e, r);
      return i === !0 || i && St(i.coordSyses, n.coordinateSystem) >= 0;
    }, t.prototype.findTargetInfo = function(e, n) {
      for (var r = this._targetInfoList, i = rY(n, e), a = 0; a < r.length; a++) {
        var o = r[a], s = e.panelId;
        if (s) {
          if (o.panelId === s)
            return o;
        } else
          for (var l = 0; l < iY.length; l++)
            if (iY[l](i, o))
              return o;
      }
      return !0;
    }, t;
  }()
);
function EL(t) {
  return t[0] > t[1] && t.reverse(), t;
}
function rY(t, e) {
  return tb(t, e, {
    includeMainTypes: Out
  });
}
var Sut = {
  grid: function(t, e) {
    var n = t.xAxisModels, r = t.yAxisModels, i = t.gridModels, a = Ze(), o = {}, s = {};
    !n && !r && !i || (F(n, function(l) {
      var u = l.axis.grid.model;
      a.set(u.id, u), o[u.id] = !0;
    }), F(r, function(l) {
      var u = l.axis.grid.model;
      a.set(u.id, u), s[u.id] = !0;
    }), F(i, function(l) {
      a.set(l.id, l), o[l.id] = !0, s[l.id] = !0;
    }), a.each(function(l) {
      var u = l.coordinateSystem, c = [];
      F(u.getCartesians(), function(f, d) {
        (St(n, f.getAxis("x").model) >= 0 || St(r, f.getAxis("y").model) >= 0) && c.push(f);
      }), e.push({
        panelId: "grid--" + l.id,
        gridModel: l,
        coordSysModel: l,
        // Use the first one as the representitive coordSys.
        coordSys: c[0],
        coordSyses: c,
        getPanelRect: aY.grid,
        xAxisDeclared: o[l.id],
        yAxisDeclared: s[l.id]
      });
    }));
  },
  geo: function(t, e) {
    F(t.geoModels, function(n) {
      var r = n.coordinateSystem;
      e.push({
        panelId: "geo--" + n.id,
        geoModel: n,
        coordSysModel: n,
        coordSys: r,
        coordSyses: [r],
        getPanelRect: aY.geo
      });
    });
  }
}, iY = [
  // grid
  function(t, e) {
    var n = t.xAxisModel, r = t.yAxisModel, i = t.gridModel;
    return !i && n && (i = n.axis.grid.model), !i && r && (i = r.axis.grid.model), i && i === e.gridModel;
  },
  // geo
  function(t, e) {
    var n = t.geoModel;
    return n && n === e.geoModel;
  }
], aY = {
  grid: function() {
    return this.coordSys.master.getRect().clone();
  },
  geo: function() {
    var t = this.coordSys, e = t.getBoundingRect().clone();
    return e.applyTransform(of(t)), e;
  }
}, kI = {
  lineX: vt(oY, 0),
  lineY: vt(oY, 1),
  rect: function(t, e, n, r) {
    var i = t ? e.pointToData([n[0][0], n[1][0]], r) : e.dataToPoint([n[0][0], n[1][0]], r), a = t ? e.pointToData([n[0][1], n[1][1]], r) : e.dataToPoint([n[0][1], n[1][1]], r), o = [EL([i[0], a[0]]), EL([i[1], a[1]])];
    return {
      values: o,
      xyMinMax: o
    };
  },
  polygon: function(t, e, n, r) {
    var i = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]], a = Ce(n, function(o) {
      var s = t ? e.pointToData(o, r) : e.dataToPoint(o, r);
      return i[0][0] = Math.min(i[0][0], s[0]), i[1][0] = Math.min(i[1][0], s[1]), i[0][1] = Math.max(i[0][1], s[0]), i[1][1] = Math.max(i[1][1], s[1]), s;
    });
    return {
      values: a,
      xyMinMax: i
    };
  }
};
function oY(t, e, n, r) {
  process.env.NODE_ENV !== "production" && at(n.type === "cartesian2d", "lineX/lineY brush is available only in cartesian2d.");
  var i = n.getAxis(["x", "y"][t]), a = EL(Ce([0, 1], function(s) {
    return e ? i.coordToData(i.toLocalCoord(r[s]), !0) : i.toGlobalCoord(i.dataToCoord(r[s]));
  })), o = [];
  return o[t] = a, o[1 - t] = [NaN, NaN], {
    values: a,
    xyMinMax: o
  };
}
var sY = {
  lineX: vt(lY, 0),
  lineY: vt(lY, 1),
  rect: function(t, e, n) {
    return [[t[0][0] - n[0] * e[0][0], t[0][1] - n[0] * e[0][1]], [t[1][0] - n[1] * e[1][0], t[1][1] - n[1] * e[1][1]]];
  },
  polygon: function(t, e, n) {
    return Ce(t, function(r, i) {
      return [r[0] - n[0] * e[i][0], r[1] - n[1] * e[i][1]];
    });
  }
};
function lY(t, e, n, r) {
  return [e[0] - r[t] * n[0], e[1] - r[t] * n[1]];
}
function xut(t, e) {
  var n = uY(t), r = uY(e), i = [n[0] / r[0], n[1] / r[1]];
  return isNaN(i[0]) && (i[0] = 1), isNaN(i[1]) && (i[1] = 1), i;
}
function uY(t) {
  return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [NaN, NaN];
}
var ML = F, wut = sje("toolbox-dataZoom_"), Cut = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.render = function(n, r, i, a) {
      this._brushController || (this._brushController = new J3(i.getZr()), this._brushController.on("brush", We(this._onBrush, this)).mount()), $ut(n, r, this, a, i), Put(n, r);
    }, e.prototype.onclick = function(n, r, i) {
      Tut[i].call(this);
    }, e.prototype.remove = function(n, r) {
      this._brushController && this._brushController.unmount();
    }, e.prototype.dispose = function(n, r) {
      this._brushController && this._brushController.dispose();
    }, e.prototype._onBrush = function(n) {
      var r = n.areas;
      if (!n.isEnd || !r.length)
        return;
      var i = {}, a = this.ecModel;
      this._brushController.updateCovers([]);
      var o = new w6(C6(this.model), a, {
        include: ["grid"]
      });
      o.matchOutputRanges(r, a, function(u, c, f) {
        if (f.type === "cartesian2d") {
          var d = u.brushType;
          d === "rect" ? (s("x", f, c[0]), s("y", f, c[1])) : s({
            lineX: "x",
            lineY: "y"
          }[d], f, c);
        }
      }), gut(a, i), this._dispatchZoomAction(i);
      function s(u, c, f) {
        var d = c.getAxis(u), h = d.model, p = l(u, h, a), v = p.findRepresentativeAxisProxy(h).getMinMaxSpan();
        (v.minValueSpan != null || v.maxValueSpan != null) && (f = _p(0, f.slice(), d.scale.getExtent(), 0, v.minValueSpan, v.maxValueSpan)), p && (i[p.id] = {
          dataZoomId: p.id,
          startValue: f[0],
          endValue: f[1]
        });
      }
      function l(u, c, f) {
        var d;
        return f.eachComponent({
          mainType: "dataZoom",
          subType: "select"
        }, function(h) {
          var p = h.getAxisModel(u, c.componentIndex);
          p && (d = h);
        }), d;
      }
    }, e.prototype._dispatchZoomAction = function(n) {
      var r = [];
      ML(n, function(i, a) {
        r.push(ot(i));
      }), r.length && this.api.dispatchAction({
        type: "dataZoom",
        from: this.uid,
        batch: r
      });
    }, e.getDefaultOption = function(n) {
      var r = {
        show: !0,
        filterMode: "filter",
        // Icon group
        icon: {
          zoom: "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",
          back: "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"
        },
        // `zoom`, `back`
        title: n.getLocaleModel().get(["toolbox", "dataZoom", "title"]),
        brushStyle: {
          borderWidth: 0,
          color: "rgba(210,219,238,0.2)"
        }
      };
      return r;
    }, e;
  }(Ho)
), Tut = {
  zoom: function() {
    var t = !this._isZoomActive;
    this.api.dispatchAction({
      type: "takeGlobalCursor",
      key: "dataZoomSelect",
      dataZoomSelectActive: t
    });
  },
  back: function() {
    this._dispatchZoomAction(mut(this.ecModel));
  }
};
function C6(t) {
  var e = {
    xAxisIndex: t.get("xAxisIndex", !0),
    yAxisIndex: t.get("yAxisIndex", !0),
    xAxisId: t.get("xAxisId", !0),
    yAxisId: t.get("yAxisId", !0)
  };
  return e.xAxisIndex == null && e.xAxisId == null && (e.xAxisIndex = "all"), e.yAxisIndex == null && e.yAxisId == null && (e.yAxisIndex = "all"), e;
}
function Put(t, e) {
  t.setIconStatus("back", but(e) > 1 ? "emphasis" : "normal");
}
function $ut(t, e, n, r, i) {
  var a = n._isZoomActive;
  r && r.type === "takeGlobalCursor" && (a = r.key === "dataZoomSelect" ? r.dataZoomSelectActive : !1), n._isZoomActive = a, t.setIconStatus("zoom", a ? "emphasis" : "normal");
  var o = new w6(C6(t), e, {
    include: ["grid"]
  }), s = o.makePanelOpts(i, function(l) {
    return l.xAxisDeclared && !l.yAxisDeclared ? "lineX" : !l.xAxisDeclared && l.yAxisDeclared ? "lineY" : "rect";
  });
  n._brushController.setPanels(s).enableBrush(a && s.length ? {
    brushType: "auto",
    brushStyle: t.getModel("brushStyle").getItemStyle()
  } : !1);
}
kUe("dataZoom", function(t) {
  var e = t.getComponent("toolbox", 0), n = ["feature", "dataZoom"];
  if (!e || e.get(n) == null)
    return;
  var r = e.getModel(n), i = [], a = C6(r), o = tb(t, a);
  ML(o.xAxisModels, function(l) {
    return s(l, "xAxis", "xAxisIndex");
  }), ML(o.yAxisModels, function(l) {
    return s(l, "yAxis", "yAxisIndex");
  });
  function s(l, u, c) {
    var f = l.componentIndex, d = {
      type: "select",
      $fromToolbox: !0,
      // Default to be filter
      filterMode: r.get("filterMode", !0) || "filter",
      // Id for merge mapping.
      id: wut + u + f
    };
    d[c] = f, i.push(d);
  }
  return i;
});
function Aut(t) {
  t.registerComponentModel(Jlt), t.registerComponentView(tut), wv("saveAsImage", rut), wv("magicType", aut), wv("dataView", put), wv("dataZoom", Cut), wv("restore", _ut), Mt(Klt);
}
var Eut = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "tooltip", e.dependencies = ["axisPointer"], e.defaultOption = {
      // zlevel: 0,
      z: 60,
      show: !0,
      // tooltip main content
      showContent: !0,
      // 'trigger' only works on coordinate system.
      // 'item' | 'axis' | 'none'
      trigger: "item",
      // 'click' | 'mousemove' | 'none'
      triggerOn: "mousemove|click",
      alwaysShowContent: !1,
      displayMode: "single",
      renderMode: "auto",
      // whether restraint content inside viewRect.
      // If renderMode: 'richText', default true.
      // If renderMode: 'html', defaut false (for backward compat).
      confine: null,
      showDelay: 0,
      hideDelay: 100,
      // Animation transition time, unit is second
      transitionDuration: 0.4,
      enterable: !1,
      backgroundColor: "#fff",
      // box shadow
      shadowBlur: 10,
      shadowColor: "rgba(0, 0, 0, .2)",
      shadowOffsetX: 1,
      shadowOffsetY: 2,
      // tooltip border radius, unit is px, default is 4
      borderRadius: 4,
      // tooltip border width, unit is px, default is 0 (no border)
      borderWidth: 1,
      // Tooltip inside padding, default is 5 for all direction
      // Array is allowed to set up, right, bottom, left, same with css
      // The default value: See `tooltip/tooltipMarkup.ts#getPaddingFromTooltipModel`.
      padding: null,
      // Extra css text
      extraCssText: "",
      // axis indicator, trigger by axis
      axisPointer: {
        // default is line
        // legal values: 'line' | 'shadow' | 'cross'
        type: "line",
        // Valid when type is line, appoint tooltip line locate on which line. Optional
        // legal values: 'x' | 'y' | 'angle' | 'radius' | 'auto'
        // default is 'auto', chose the axis which type is category.
        // for multiply y axis, cartesian coord chose x axis, polar chose angle axis
        axis: "auto",
        animation: "auto",
        animationDurationUpdate: 200,
        animationEasingUpdate: "exponentialOut",
        crossStyle: {
          color: "#999",
          width: 1,
          type: "dashed",
          // TODO formatter
          textStyle: {}
        }
        // lineStyle and shadowStyle should not be specified here,
        // otherwise it will always override those styles on option.axisPointer.
      },
      textStyle: {
        color: "#666",
        fontSize: 14
      }
    }, e;
  }(At)
);
function ghe(t) {
  var e = t.get("confine");
  return e != null ? !!e : t.get("renderMode") === "richText";
}
function mhe(t) {
  if (Gt.domSupported) {
    for (var e = document.documentElement.style, n = 0, r = t.length; n < r; n++)
      if (t[n] in e)
        return t[n];
  }
}
var yhe = mhe(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]), Mut = mhe(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]);
function bhe(t, e) {
  if (!t)
    return e;
  e = J5(e, !0);
  var n = t.indexOf(e);
  return t = n === -1 ? e : "-" + t.slice(0, n) + "-" + e, t.toLowerCase();
}
function Iut(t, e) {
  var n = t.currentStyle || document.defaultView && document.defaultView.getComputedStyle(t);
  return n ? n[e] : null;
}
var Dut = bhe(Mut, "transition"), T6 = bhe(yhe, "transform"), Rut = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (Gt.transform3dSupported ? "will-change:transform;" : "");
function kut(t) {
  return t = t === "left" ? "right" : t === "right" ? "left" : t === "top" ? "bottom" : "top", t;
}
function Lut(t, e, n) {
  if (!Ve(n) || n === "inside")
    return "";
  var r = t.get("backgroundColor"), i = t.get("borderWidth");
  e = Uh(e);
  var a = kut(n), o = Math.max(Math.round(i) * 1.5, 6), s = "", l = T6 + ":", u;
  St(["left", "right"], a) > -1 ? (s += "top:50%", l += "translateY(-50%) rotate(" + (u = a === "left" ? -225 : -45) + "deg)") : (s += "left:50%", l += "translateX(-50%) rotate(" + (u = a === "top" ? 225 : 45) + "deg)");
  var c = u * Math.PI / 180, f = o + i, d = f * Math.abs(Math.cos(c)) + f * Math.abs(Math.sin(c)), h = Math.round(((d - Math.SQRT2 * i) / 2 + Math.SQRT2 * i - (d - f) / 2) * 100) / 100;
  s += ";" + a + ":-" + h + "px";
  var p = e + " solid " + i + "px;", v = ["position:absolute;width:" + o + "px;height:" + o + "px;z-index:-1;", s + ";" + l + ";", "border-bottom:" + p, "border-right:" + p, "background-color:" + r + ";"];
  return '<div style="' + v.join("") + '"></div>';
}
function Nut(t, e) {
  var n = "cubic-bezier(0.23,1,0.32,1)", r = " " + t / 2 + "s " + n, i = "opacity" + r + ",visibility" + r;
  return e || (r = " " + t + "s " + n, i += Gt.transformSupported ? "," + T6 + r : ",left" + r + ",top" + r), Dut + ":" + i;
}
function cY(t, e, n) {
  var r = t.toFixed(0) + "px", i = e.toFixed(0) + "px";
  if (!Gt.transformSupported)
    return n ? "top:" + i + ";left:" + r + ";" : [["top", i], ["left", r]];
  var a = Gt.transform3dSupported, o = "translate" + (a ? "3d" : "") + "(" + r + "," + i + (a ? ",0" : "") + ")";
  return n ? "top:0;left:0;" + T6 + ":" + o + ";" : [["top", 0], ["left", 0], [yhe, o]];
}
function But(t) {
  var e = [], n = t.get("fontSize"), r = t.getTextColor();
  r && e.push("color:" + r), e.push("font:" + t.getFont()), n && e.push("line-height:" + Math.round(n * 3 / 2) + "px");
  var i = t.get("textShadowColor"), a = t.get("textShadowBlur") || 0, o = t.get("textShadowOffsetX") || 0, s = t.get("textShadowOffsetY") || 0;
  return i && a && e.push("text-shadow:" + o + "px " + s + "px " + a + "px " + i), F(["decoration", "align"], function(l) {
    var u = t.get(l);
    u && e.push("text-" + l + ":" + u);
  }), e.join(";");
}
function zut(t, e, n) {
  var r = [], i = t.get("transitionDuration"), a = t.get("backgroundColor"), o = t.get("shadowBlur"), s = t.get("shadowColor"), l = t.get("shadowOffsetX"), u = t.get("shadowOffsetY"), c = t.getModel("textStyle"), f = Pue(t, "html"), d = l + "px " + u + "px " + o + "px " + s;
  return r.push("box-shadow:" + d), e && i && r.push(Nut(i, n)), a && r.push("background-color:" + a), F(["width", "color", "radius"], function(h) {
    var p = "border-" + h, v = J5(p), g = t.get(v);
    g != null && r.push(p + ":" + g + (h === "color" ? "" : "px"));
  }), r.push(But(c)), f != null && r.push("padding:" + vp(f).join("px ") + "px"), r.join(";") + ";";
}
function fY(t, e, n, r, i) {
  var a = e && e.painter;
  if (n) {
    var o = a && a.getViewportRoot();
    o && E9e(t, o, n, r, i);
  } else {
    t[0] = r, t[1] = i;
    var s = a && a.getViewportRootOffset();
    s && (t[0] += s.offsetLeft, t[1] += s.offsetTop);
  }
  t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight();
}
var Vut = (
  /** @class */
  function() {
    function t(e, n) {
      if (this._show = !1, this._styleCoord = [0, 0, 0, 0], this._enterable = !0, this._alwaysShowContent = !1, this._firstShow = !0, this._longHide = !0, Gt.wxa)
        return null;
      var r = document.createElement("div");
      r.domBelongToZr = !0, this.el = r;
      var i = this._zr = e.getZr(), a = n.appendTo, o = a && (Ve(a) ? document.querySelector(a) : gf(a) ? a : qe(a) && a(e.getDom()));
      fY(this._styleCoord, i, o, e.getWidth() / 2, e.getHeight() / 2), (o || e.getDom()).appendChild(r), this._api = e, this._container = o;
      var s = this;
      r.onmouseenter = function() {
        s._enterable && (clearTimeout(s._hideTimeout), s._show = !0), s._inContent = !0;
      }, r.onmousemove = function(l) {
        if (l = l || window.event, !s._enterable) {
          var u = i.handler, c = i.painter.getViewportRoot();
          No(c, l, !0), u.dispatch("mousemove", l);
        }
      }, r.onmouseleave = function() {
        s._inContent = !1, s._enterable && s._show && s.hideLater(s._hideDelay);
      };
    }
    return t.prototype.update = function(e) {
      if (!this._container) {
        var n = this._api.getDom(), r = Iut(n, "position"), i = n.style;
        i.position !== "absolute" && r !== "absolute" && (i.position = "relative");
      }
      var a = e.get("alwaysShowContent");
      a && this._moveIfResized(), this._alwaysShowContent = a, this.el.className = e.get("className") || "";
    }, t.prototype.show = function(e, n) {
      clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
      var r = this.el, i = r.style, a = this._styleCoord;
      r.innerHTML ? i.cssText = Rut + zut(e, !this._firstShow, this._longHide) + cY(a[0], a[1], !0) + ("border-color:" + Uh(n) + ";") + (e.get("extraCssText") || "") + (";pointer-events:" + (this._enterable ? "auto" : "none")) : i.display = "none", this._show = !0, this._firstShow = !1, this._longHide = !1;
    }, t.prototype.setContent = function(e, n, r, i, a) {
      var o = this.el;
      if (e == null) {
        o.innerHTML = "";
        return;
      }
      var s = "";
      if (Ve(a) && r.get("trigger") === "item" && !ghe(r) && (s = Lut(r, i, a)), Ve(e))
        o.innerHTML = e + s;
      else if (e) {
        o.innerHTML = "", Se(e) || (e = [e]);
        for (var l = 0; l < e.length; l++)
          gf(e[l]) && e[l].parentNode !== o && o.appendChild(e[l]);
        if (s && o.childNodes.length) {
          var u = document.createElement("div");
          u.innerHTML = s, o.appendChild(u);
        }
      }
    }, t.prototype.setEnterable = function(e) {
      this._enterable = e;
    }, t.prototype.getSize = function() {
      var e = this.el;
      return [e.offsetWidth, e.offsetHeight];
    }, t.prototype.moveTo = function(e, n) {
      var r = this._styleCoord;
      if (fY(r, this._zr, this._container, e, n), r[0] != null && r[1] != null) {
        var i = this.el.style, a = cY(r[0], r[1]);
        F(a, function(o) {
          i[o[0]] = o[1];
        });
      }
    }, t.prototype._moveIfResized = function() {
      var e = this._styleCoord[2], n = this._styleCoord[3];
      this.moveTo(e * this._zr.getWidth(), n * this._zr.getHeight());
    }, t.prototype.hide = function() {
      var e = this, n = this.el.style;
      n.visibility = "hidden", n.opacity = "0", Gt.transform3dSupported && (n.willChange = ""), this._show = !1, this._longHideTimeout = setTimeout(function() {
        return e._longHide = !0;
      }, 500);
    }, t.prototype.hideLater = function(e) {
      this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(We(this.hide, this), e)) : this.hide());
    }, t.prototype.isShow = function() {
      return this._show;
    }, t.prototype.dispose = function() {
      clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
      var e = this.el.parentNode;
      e && e.removeChild(this.el), this.el = this._container = null;
    }, t;
  }()
), Fut = (
  /** @class */
  function() {
    function t(e) {
      this._show = !1, this._styleCoord = [0, 0, 0, 0], this._alwaysShowContent = !1, this._enterable = !0, this._zr = e.getZr(), hY(this._styleCoord, this._zr, e.getWidth() / 2, e.getHeight() / 2);
    }
    return t.prototype.update = function(e) {
      var n = e.get("alwaysShowContent");
      n && this._moveIfResized(), this._alwaysShowContent = n;
    }, t.prototype.show = function() {
      this._hideTimeout && clearTimeout(this._hideTimeout), this.el.show(), this._show = !0;
    }, t.prototype.setContent = function(e, n, r, i, a) {
      var o = this;
      nt(e) && cn(process.env.NODE_ENV !== "production" ? "Passing DOM nodes as content is not supported in richText tooltip!" : ""), this.el && this._zr.remove(this.el);
      var s = r.getModel("textStyle");
      this.el = new jt({
        style: {
          rich: n.richTextStyles,
          text: e,
          lineHeight: 22,
          borderWidth: 1,
          borderColor: i,
          textShadowColor: s.get("textShadowColor"),
          fill: r.get(["textStyle", "color"]),
          padding: Pue(r, "richText"),
          verticalAlign: "top",
          align: "left"
        },
        z: r.get("z")
      }), F(["backgroundColor", "borderRadius", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"], function(u) {
        o.el.style[u] = r.get(u);
      }), F(["textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], function(u) {
        o.el.style[u] = s.get(u) || 0;
      }), this._zr.add(this.el);
      var l = this;
      this.el.on("mouseover", function() {
        l._enterable && (clearTimeout(l._hideTimeout), l._show = !0), l._inContent = !0;
      }), this.el.on("mouseout", function() {
        l._enterable && l._show && l.hideLater(l._hideDelay), l._inContent = !1;
      });
    }, t.prototype.setEnterable = function(e) {
      this._enterable = e;
    }, t.prototype.getSize = function() {
      var e = this.el, n = this.el.getBoundingRect(), r = dY(e.style);
      return [n.width + r.left + r.right, n.height + r.top + r.bottom];
    }, t.prototype.moveTo = function(e, n) {
      var r = this.el;
      if (r) {
        var i = this._styleCoord;
        hY(i, this._zr, e, n), e = i[0], n = i[1];
        var a = r.style, o = Ec(a.borderWidth || 0), s = dY(a);
        r.x = e + o + s.left, r.y = n + o + s.top, r.markRedraw();
      }
    }, t.prototype._moveIfResized = function() {
      var e = this._styleCoord[2], n = this._styleCoord[3];
      this.moveTo(e * this._zr.getWidth(), n * this._zr.getHeight());
    }, t.prototype.hide = function() {
      this.el && this.el.hide(), this._show = !1;
    }, t.prototype.hideLater = function(e) {
      this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(We(this.hide, this), e)) : this.hide());
    }, t.prototype.isShow = function() {
      return this._show;
    }, t.prototype.dispose = function() {
      this._zr.remove(this.el);
    }, t;
  }()
);
function Ec(t) {
  return Math.max(0, t);
}
function dY(t) {
  var e = Ec(t.shadowBlur || 0), n = Ec(t.shadowOffsetX || 0), r = Ec(t.shadowOffsetY || 0);
  return {
    left: Ec(e - n),
    right: Ec(e + n),
    top: Ec(e - r),
    bottom: Ec(e + r)
  };
}
function hY(t, e, n, r) {
  t[0] = n, t[1] = r, t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight();
}
var Wut = new Zt({
  shape: {
    x: -1,
    y: -1,
    width: 2,
    height: 2
  }
}), Qut = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n, r) {
      if (!(Gt.node || !r.getDom())) {
        var i = n.getComponent("tooltip"), a = this._renderMode = pje(i.get("renderMode"));
        this._tooltipContent = a === "richText" ? new Fut(r) : new Vut(r, {
          appendTo: i.get("appendToBody", !0) ? "body" : i.get("appendTo", !0)
        });
      }
    }, e.prototype.render = function(n, r, i) {
      if (!(Gt.node || !i.getDom())) {
        this.group.removeAll(), this._tooltipModel = n, this._ecModel = r, this._api = i;
        var a = this._tooltipContent;
        a.update(n), a.setEnterable(n.get("enterable")), this._initGlobalListener(), this._keepShow(), this._renderMode !== "richText" && n.get("transitionDuration") ? Am(this, "_updatePosition", 50, "fixRate") : Jb(this, "_updatePosition");
      }
    }, e.prototype._initGlobalListener = function() {
      var n = this._tooltipModel, r = n.get("triggerOn");
      rhe("itemTooltip", this._api, We(function(i, a, o) {
        r !== "none" && (r.indexOf(i) >= 0 ? this._tryShow(a, o) : i === "leave" && this._hide(o));
      }, this));
    }, e.prototype._keepShow = function() {
      var n = this._tooltipModel, r = this._ecModel, i = this._api, a = n.get("triggerOn");
      if (this._lastX != null && this._lastY != null && a !== "none" && a !== "click") {
        var o = this;
        clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function() {
          !i.isDisposed() && o.manuallyShowTip(n, r, i, {
            x: o._lastX,
            y: o._lastY,
            dataByCoordSys: o._lastDataByCoordSys
          });
        });
      }
    }, e.prototype.manuallyShowTip = function(n, r, i, a) {
      if (!(a.from === this.uid || Gt.node || !i.getDom())) {
        var o = pY(a, i);
        this._ticket = "";
        var s = a.dataByCoordSys, l = Zut(a, r, i);
        if (l) {
          var u = l.el.getBoundingRect().clone();
          u.applyTransform(l.el.transform), this._tryShow({
            offsetX: u.x + u.width / 2,
            offsetY: u.y + u.height / 2,
            target: l.el,
            position: a.position,
            // When manully trigger, the mouse is not on the el, so we'd better to
            // position tooltip on the bottom of the el and display arrow is possible.
            positionDefault: "bottom"
          }, o);
        } else if (a.tooltip && a.x != null && a.y != null) {
          var c = Wut;
          c.x = a.x, c.y = a.y, c.update(), ft(c).tooltipConfig = {
            name: null,
            option: a.tooltip
          }, this._tryShow({
            offsetX: a.x,
            offsetY: a.y,
            target: c
          }, o);
        } else if (s)
          this._tryShow({
            offsetX: a.x,
            offsetY: a.y,
            position: a.position,
            dataByCoordSys: s,
            tooltipOption: a.tooltipOption
          }, o);
        else if (a.seriesIndex != null) {
          if (this._manuallyAxisShowTip(n, r, i, a))
            return;
          var f = ihe(a, r), d = f.point[0], h = f.point[1];
          d != null && h != null && this._tryShow({
            offsetX: d,
            offsetY: h,
            target: f.el,
            position: a.position,
            // When manully trigger, the mouse is not on the el, so we'd better to
            // position tooltip on the bottom of the el and display arrow is possible.
            positionDefault: "bottom"
          }, o);
        } else a.x != null && a.y != null && (i.dispatchAction({
          type: "updateAxisPointer",
          x: a.x,
          y: a.y
        }), this._tryShow({
          offsetX: a.x,
          offsetY: a.y,
          position: a.position,
          target: i.getZr().findHover(a.x, a.y).target
        }, o));
      }
    }, e.prototype.manuallyHideTip = function(n, r, i, a) {
      var o = this._tooltipContent;
      this._tooltipModel && o.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = this._lastDataByCoordSys = null, a.from !== this.uid && this._hide(pY(a, i));
    }, e.prototype._manuallyAxisShowTip = function(n, r, i, a) {
      var o = a.seriesIndex, s = a.dataIndex, l = r.getComponent("axisPointer").coordSysAxesInfo;
      if (!(o == null || s == null || l == null)) {
        var u = r.getSeriesByIndex(o);
        if (u) {
          var c = u.getData(), f = U0([c.getItemModel(s), u, (u.coordinateSystem || {}).model], this._tooltipModel);
          if (f.get("trigger") === "axis")
            return i.dispatchAction({
              type: "updateAxisPointer",
              seriesIndex: o,
              dataIndex: s,
              position: a.position
            }), !0;
        }
      }
    }, e.prototype._tryShow = function(n, r) {
      var i = n.target, a = this._tooltipModel;
      if (a) {
        this._lastX = n.offsetX, this._lastY = n.offsetY;
        var o = n.dataByCoordSys;
        if (o && o.length)
          this._showAxisTooltip(o, n);
        else if (i) {
          var s = ft(i);
          if (s.ssrType === "legend")
            return;
          this._lastDataByCoordSys = null;
          var l, u;
          sh(i, function(c) {
            if (ft(c).dataIndex != null)
              return l = c, !0;
            if (ft(c).tooltipConfig != null)
              return u = c, !0;
          }, !0), l ? this._showSeriesItemTooltip(n, l, r) : u ? this._showComponentItemTooltip(n, u, r) : this._hide(r);
        } else
          this._lastDataByCoordSys = null, this._hide(r);
      }
    }, e.prototype._showOrMove = function(n, r) {
      var i = n.get("showDelay");
      r = We(r, this), clearTimeout(this._showTimout), i > 0 ? this._showTimout = setTimeout(r, i) : r();
    }, e.prototype._showAxisTooltip = function(n, r) {
      var i = this._ecModel, a = this._tooltipModel, o = [r.offsetX, r.offsetY], s = U0([r.tooltipOption], a), l = this._renderMode, u = [], c = ti("section", {
        blocks: [],
        noHeader: !0
      }), f = [], d = new bM();
      F(n, function(y) {
        F(y.dataByAxis, function(_) {
          var O = i.getComponent(_.axisDim + "Axis", _.axisIndex), S = _.value;
          if (!(!O || S == null)) {
            var x = ehe(S, O.axis, i, _.seriesDataIndices, _.valueLabelOpt), C = ti("section", {
              header: x,
              noHeader: !Zo(x),
              sortBlocks: !0,
              blocks: []
            });
            c.blocks.push(C), F(_.seriesDataIndices, function(P) {
              var $ = i.getSeriesByIndex(P.seriesIndex), T = P.dataIndexInside, E = $.getDataParams(T);
              if (!(E.dataIndex < 0)) {
                E.axisDim = _.axisDim, E.axisIndex = _.axisIndex, E.axisType = _.axisType, E.axisId = _.axisId, E.axisValue = P3(O.axis, {
                  value: S
                }), E.axisValueLabel = x, E.marker = d.makeTooltipMarker("item", Uh(E.color), l);
                var M = qG($.formatTooltip(T, !0, null)), R = M.frag;
                if (R) {
                  var N = U0([$], a).get("valueFormatter");
                  C.blocks.push(N ? _e({
                    valueFormatter: N
                  }, R) : R);
                }
                M.text && f.push(M.text), u.push(E);
              }
            });
          }
        });
      }), c.blocks.reverse(), f.reverse();
      var h = r.position, p = s.get("order"), v = rj(c, d, l, p, i.get("useUTC"), s.get("textStyle"));
      v && f.unshift(v);
      var g = l === "richText" ? `

` : "<br/>", m = f.join(g);
      this._showOrMove(s, function() {
        this._updateContentNotChangedOnAxis(n, u) ? this._updatePosition(s, h, o[0], o[1], this._tooltipContent, u) : this._showTooltipContent(s, m, u, Math.random() + "", o[0], o[1], h, null, d);
      });
    }, e.prototype._showSeriesItemTooltip = function(n, r, i) {
      var a = this._ecModel, o = ft(r), s = o.seriesIndex, l = a.getSeriesByIndex(s), u = o.dataModel || l, c = o.dataIndex, f = o.dataType, d = u.getData(f), h = this._renderMode, p = n.positionDefault, v = U0([d.getItemModel(c), u, l && (l.coordinateSystem || {}).model], this._tooltipModel, p ? {
        position: p
      } : null), g = v.get("trigger");
      if (!(g != null && g !== "item")) {
        var m = u.getDataParams(c, f), y = new bM();
        m.marker = y.makeTooltipMarker("item", Uh(m.color), h);
        var _ = qG(u.formatTooltip(c, !1, f)), O = v.get("order"), S = v.get("valueFormatter"), x = _.frag, C = x ? rj(S ? _e({
          valueFormatter: S
        }, x) : x, y, h, O, a.get("useUTC"), v.get("textStyle")) : _.text, P = "item_" + u.name + "_" + c;
        this._showOrMove(v, function() {
          this._showTooltipContent(v, C, m, P, n.offsetX, n.offsetY, n.position, n.target, y);
        }), i({
          type: "showTip",
          dataIndexInside: c,
          dataIndex: d.getRawIndex(c),
          seriesIndex: s,
          from: this.uid
        });
      }
    }, e.prototype._showComponentItemTooltip = function(n, r, i) {
      var a = this._renderMode === "html", o = ft(r), s = o.tooltipConfig, l = s.option || {}, u = l.encodeHTMLContent;
      if (Ve(l)) {
        var c = l;
        l = {
          content: c,
          // Fixed formatter
          formatter: c
        }, u = !0;
      }
      u && a && l.content && (l = ot(l), l.content = ea(l.content));
      var f = [l], d = this._ecModel.getComponent(o.componentMainType, o.componentIndex);
      d && f.push(d), f.push({
        formatter: l.content
      });
      var h = n.positionDefault, p = U0(f, this._tooltipModel, h ? {
        position: h
      } : null), v = p.get("content"), g = Math.random() + "", m = new bM();
      this._showOrMove(p, function() {
        var y = ot(p.get("formatterParams") || {});
        this._showTooltipContent(p, v, y, g, n.offsetX, n.offsetY, n.position, r, m);
      }), i({
        type: "showTip",
        from: this.uid
      });
    }, e.prototype._showTooltipContent = function(n, r, i, a, o, s, l, u, c) {
      if (this._ticket = "", !(!n.get("showContent") || !n.get("show"))) {
        var f = this._tooltipContent;
        f.setEnterable(n.get("enterable"));
        var d = n.get("formatter");
        l = l || n.get("position");
        var h = r, p = this._getNearestPoint([o, s], i, n.get("trigger"), n.get("borderColor")), v = p.color;
        if (d)
          if (Ve(d)) {
            var g = n.ecModel.get("useUTC"), m = Se(i) ? i[0] : i, y = m && m.axisType && m.axisType.indexOf("time") >= 0;
            h = d, y && (h = p1(m.axisValue, h, g)), h = e3(h, i, !0);
          } else if (qe(d)) {
            var _ = We(function(O, S) {
              O === this._ticket && (f.setContent(S, c, n, v, l), this._updatePosition(n, l, o, s, f, i, u));
            }, this);
            this._ticket = a, h = d(i, a, _);
          } else
            h = d;
        f.setContent(h, c, n, v, l), f.show(n, v), this._updatePosition(n, l, o, s, f, i, u);
      }
    }, e.prototype._getNearestPoint = function(n, r, i, a) {
      if (i === "axis" || Se(r))
        return {
          color: a || (this._renderMode === "html" ? "#fff" : "none")
        };
      if (!Se(r))
        return {
          color: a || r.color || r.borderColor
        };
    }, e.prototype._updatePosition = function(n, r, i, a, o, s, l) {
      var u = this._api.getWidth(), c = this._api.getHeight();
      r = r || n.get("position");
      var f = o.getSize(), d = n.get("align"), h = n.get("verticalAlign"), p = l && l.getBoundingRect().clone();
      if (l && p.applyTransform(l.transform), qe(r) && (r = r([i, a], s, o.el, p, {
        viewSize: [u, c],
        contentSize: f.slice()
      })), Se(r))
        i = ze(r[0], u), a = ze(r[1], c);
      else if (nt(r)) {
        var v = r;
        v.width = f[0], v.height = f[1];
        var g = Mr(v, {
          width: u,
          height: c
        });
        i = g.x, a = g.y, d = null, h = null;
      } else if (Ve(r) && l) {
        var m = jut(r, p, f, n.get("borderWidth"));
        i = m[0], a = m[1];
      } else {
        var m = Hut(i, a, o, u, c, d ? null : 20, h ? null : 20);
        i = m[0], a = m[1];
      }
      if (d && (i -= vY(d) ? f[0] / 2 : d === "right" ? f[0] : 0), h && (a -= vY(h) ? f[1] / 2 : h === "bottom" ? f[1] : 0), ghe(n)) {
        var m = Gut(i, a, o, u, c);
        i = m[0], a = m[1];
      }
      o.moveTo(i, a);
    }, e.prototype._updateContentNotChangedOnAxis = function(n, r) {
      var i = this._lastDataByCoordSys, a = this._cbParamsList, o = !!i && i.length === n.length;
      return o && F(i, function(s, l) {
        var u = s.dataByAxis || [], c = n[l] || {}, f = c.dataByAxis || [];
        o = o && u.length === f.length, o && F(u, function(d, h) {
          var p = f[h] || {}, v = d.seriesDataIndices || [], g = p.seriesDataIndices || [];
          o = o && d.value === p.value && d.axisType === p.axisType && d.axisId === p.axisId && v.length === g.length, o && F(v, function(m, y) {
            var _ = g[y];
            o = o && m.seriesIndex === _.seriesIndex && m.dataIndex === _.dataIndex;
          }), a && F(d.seriesDataIndices, function(m) {
            var y = m.seriesIndex, _ = r[y], O = a[y];
            _ && O && O.data !== _.data && (o = !1);
          });
        });
      }), this._lastDataByCoordSys = n, this._cbParamsList = r, !!o;
    }, e.prototype._hide = function(n) {
      this._lastDataByCoordSys = null, n({
        type: "hideTip",
        from: this.uid
      });
    }, e.prototype.dispose = function(n, r) {
      Gt.node || !r.getDom() || (Jb(this, "_updatePosition"), this._tooltipContent.dispose(), TL("itemTooltip", r));
    }, e.type = "tooltip", e;
  }(Ln)
);
function U0(t, e, n) {
  var r = e.ecModel, i;
  n ? (i = new xn(n, r, r), i = new xn(e.option, i, r)) : i = e;
  for (var a = t.length - 1; a >= 0; a--) {
    var o = t[a];
    o && (o instanceof xn && (o = o.get("tooltip", !0)), Ve(o) && (o = {
      formatter: o
    }), o && (i = new xn(o, i, r)));
  }
  return i;
}
function pY(t, e) {
  return t.dispatchAction || We(e.dispatchAction, e);
}
function Hut(t, e, n, r, i, a, o) {
  var s = n.getSize(), l = s[0], u = s[1];
  return a != null && (t + l + a + 2 > r ? t -= l + a : t += a), o != null && (e + u + o > i ? e -= u + o : e += o), [t, e];
}
function Gut(t, e, n, r, i) {
  var a = n.getSize(), o = a[0], s = a[1];
  return t = Math.min(t + o, r) - o, e = Math.min(e + s, i) - s, t = Math.max(t, 0), e = Math.max(e, 0), [t, e];
}
function jut(t, e, n, r) {
  var i = n[0], a = n[1], o = Math.ceil(Math.SQRT2 * r) + 8, s = 0, l = 0, u = e.width, c = e.height;
  switch (t) {
    case "inside":
      s = e.x + u / 2 - i / 2, l = e.y + c / 2 - a / 2;
      break;
    case "top":
      s = e.x + u / 2 - i / 2, l = e.y - a - o;
      break;
    case "bottom":
      s = e.x + u / 2 - i / 2, l = e.y + c + o;
      break;
    case "left":
      s = e.x - i - o, l = e.y + c / 2 - a / 2;
      break;
    case "right":
      s = e.x + u + o, l = e.y + c / 2 - a / 2;
  }
  return [s, l];
}
function vY(t) {
  return t === "center" || t === "middle";
}
function Zut(t, e, n) {
  var r = E5(t).queryOptionMap, i = r.keys()[0];
  if (!(!i || i === "series")) {
    var a = l1(e, i, r.get(i), {
      useDefault: !1,
      enableAll: !1,
      enableNone: !1
    }), o = a.models[0];
    if (o) {
      var s = n.getViewOfComponentModel(o), l;
      if (s.group.traverse(function(u) {
        var c = ft(u).tooltipConfig;
        if (c && c.name === t.name)
          return l = u, !0;
      }), l)
        return {
          componentMainType: i,
          componentIndex: o.componentIndex,
          el: l
        };
    }
  }
}
function Uut(t) {
  Mt(C1), t.registerComponentModel(Eut), t.registerComponentView(Qut), t.registerAction({
    type: "showTip",
    event: "showTip",
    update: "tooltip:manuallyShowTip"
  }, fr), t.registerAction({
    type: "hideTip",
    event: "hideTip",
    update: "tooltip:manuallyHideTip"
  }, fr);
}
var Xut = ["rect", "polygon", "keep", "clear"];
function Yut(t, e) {
  var n = wn(t ? t.brush : []);
  if (n.length) {
    var r = [];
    F(n, function(l) {
      var u = l.hasOwnProperty("toolbox") ? l.toolbox : [];
      u instanceof Array && (r = r.concat(u));
    });
    var i = t && t.toolbox;
    Se(i) && (i = i[0]), i || (i = {
      feature: {}
    }, t.toolbox = [i]);
    var a = i.feature || (i.feature = {}), o = a.brush || (a.brush = {}), s = o.type || (o.type = []);
    s.push.apply(s, r), qut(s), e && !s.length && s.push.apply(s, Xut);
  }
}
function qut(t) {
  var e = {};
  F(t, function(n) {
    e[n] = 1;
  }), t.length = 0, F(e, function(n, r) {
    t.push(r);
  });
}
var gY = F;
function mY(t) {
  if (t) {
    for (var e in t)
      if (t.hasOwnProperty(e))
        return !0;
  }
}
function IL(t, e, n) {
  var r = {};
  return gY(e, function(a) {
    var o = r[a] = i();
    gY(t[a], function(s, l) {
      if (Kr.isValidType(l)) {
        var u = {
          type: l,
          visual: s
        };
        n && n(u, a), o[l] = new Kr(u), l === "opacity" && (u = ot(u), u.type = "colorAlpha", o.__hidden.__alphaForOpacity = new Kr(u));
      }
    });
  }), r;
  function i() {
    var a = function() {
    };
    a.prototype.__hidden = a.prototype;
    var o = new a();
    return o;
  }
}
function _he(t, e, n) {
  var r;
  F(n, function(i) {
    e.hasOwnProperty(i) && mY(e[i]) && (r = !0);
  }), r && F(n, function(i) {
    e.hasOwnProperty(i) && mY(e[i]) ? t[i] = ot(e[i]) : delete t[i];
  });
}
function Kut(t, e, n, r, i, a) {
  var o = {};
  F(t, function(f) {
    var d = Kr.prepareVisualTypes(e[f]);
    o[f] = d;
  });
  var s;
  function l(f) {
    return c3(n, s, f);
  }
  function u(f, d) {
    Nue(n, s, f, d);
  }
  n.each(c);
  function c(f, d) {
    s = f;
    var h = n.getRawDataItem(s);
    if (!(h && h.visualMap === !1))
      for (var p = r.call(i, f), v = e[p], g = o[p], m = 0, y = g.length; m < y; m++) {
        var _ = g[m];
        v[_] && v[_].applyVisual(f, l, u);
      }
  }
}
function Jut(t, e, n, r) {
  var i = {};
  return F(t, function(a) {
    var o = Kr.prepareVisualTypes(e[a]);
    i[a] = o;
  }), {
    progress: function(o, s) {
      var l;
      r != null && (l = s.getDimensionIndex(r));
      function u(S) {
        return c3(s, f, S);
      }
      function c(S, x) {
        Nue(s, f, S, x);
      }
      for (var f, d = s.getStore(); (f = o.next()) != null; ) {
        var h = s.getRawDataItem(f);
        if (!(h && h.visualMap === !1))
          for (var p = r != null ? d.get(l, f) : f, v = n(p), g = e[v], m = i[v], y = 0, _ = m.length; y < _; y++) {
            var O = m[y];
            g[O] && g[O].applyVisual(p, u, c);
          }
      }
    }
  };
}
function ect(t) {
  var e = t.brushType, n = {
    point: function(r) {
      return yY[e].point(r, n, t);
    },
    rect: function(r) {
      return yY[e].rect(r, n, t);
    }
  };
  return n;
}
var yY = {
  lineX: bY(0),
  lineY: bY(1),
  rect: {
    point: function(t, e, n) {
      return t && n.boundingRect.contain(t[0], t[1]);
    },
    rect: function(t, e, n) {
      return t && n.boundingRect.intersect(t);
    }
  },
  polygon: {
    point: function(t, e, n) {
      return t && n.boundingRect.contain(t[0], t[1]) && Gd(n.range, t[0], t[1]);
    },
    rect: function(t, e, n) {
      var r = n.range;
      if (!t || r.length <= 1)
        return !1;
      var i = t.x, a = t.y, o = t.width, s = t.height, l = r[0];
      if (Gd(r, i, a) || Gd(r, i + o, a) || Gd(r, i, a + s) || Gd(r, i + o, a + s) || bt.create(t).contain(l[0], l[1]) || yy(i, a, i + o, a, r) || yy(i, a, i, a + s, r) || yy(i + o, a, i + o, a + s, r) || yy(i, a + s, i + o, a + s, r))
        return !0;
    }
  }
};
function bY(t) {
  var e = ["x", "y"], n = ["width", "height"];
  return {
    point: function(r, i, a) {
      if (r) {
        var o = a.range, s = r[t];
        return X0(s, o);
      }
    },
    rect: function(r, i, a) {
      if (r) {
        var o = a.range, s = [r[e[t]], r[e[t]] + r[n[t]]];
        return s[1] < s[0] && s.reverse(), X0(s[0], o) || X0(s[1], o) || X0(o[0], s) || X0(o[1], s);
      }
    }
  };
}
function X0(t, e) {
  return e[0] <= t && t <= e[1];
}
var _Y = ["inBrush", "outOfBrush"], LI = "__ecBrushSelect", DL = "__ecInBrushSelectEvent";
function Ohe(t) {
  t.eachComponent({
    mainType: "brush"
  }, function(e) {
    var n = e.brushTargetManager = new w6(e.option, t);
    n.setInputRanges(e.areas, t);
  });
}
function tct(t, e, n) {
  var r = [], i, a;
  t.eachComponent({
    mainType: "brush"
  }, function(o) {
    n && n.type === "takeGlobalCursor" && o.setBrushOption(n.key === "brush" ? n.brushOption : {
      brushType: !1
    });
  }), Ohe(t), t.eachComponent({
    mainType: "brush"
  }, function(o, s) {
    var l = {
      brushId: o.id,
      brushIndex: s,
      brushName: o.name,
      areas: ot(o.areas),
      selected: []
    };
    r.push(l);
    var u = o.option, c = u.brushLink, f = [], d = [], h = [], p = !1;
    s || (i = u.throttleType, a = u.throttleDelay);
    var v = Ce(o.areas, function(S) {
      var x = act[S.brushType], C = it({
        boundingRect: x ? x(S) : void 0
      }, S);
      return C.selectors = ect(C), C;
    }), g = IL(o.option, _Y, function(S) {
      S.mappingMethod = "fixed";
    });
    Se(c) && F(c, function(S) {
      f[S] = 1;
    });
    function m(S) {
      return c === "all" || !!f[S];
    }
    function y(S) {
      return !!S.length;
    }
    t.eachSeries(function(S, x) {
      var C = h[x] = [];
      S.subType === "parallel" ? _(S, x) : O(S, x, C);
    });
    function _(S, x) {
      var C = S.coordinateSystem;
      p = p || C.hasAxisBrushed(), m(x) && C.eachActiveState(S.getData(), function(P, $) {
        P === "active" && (d[$] = 1);
      });
    }
    function O(S, x, C) {
      if (!(!S.brushSelector || ict(o, x)) && (F(v, function($) {
        o.brushTargetManager.controlSeries($, S, t) && C.push($), p = p || y(C);
      }), m(x) && y(C))) {
        var P = S.getData();
        P.each(function($) {
          OY(S, C, P, $) && (d[$] = 1);
        });
      }
    }
    t.eachSeries(function(S, x) {
      var C = {
        seriesId: S.id,
        seriesIndex: x,
        seriesName: S.name,
        dataIndex: []
      };
      l.selected.push(C);
      var P = h[x], $ = S.getData(), T = m(x) ? function(E) {
        return d[E] ? (C.dataIndex.push($.getRawIndex(E)), "inBrush") : "outOfBrush";
      } : function(E) {
        return OY(S, P, $, E) ? (C.dataIndex.push($.getRawIndex(E)), "inBrush") : "outOfBrush";
      };
      (m(x) ? p : y(P)) && Kut(_Y, g, $, T);
    });
  }), nct(e, i, a, r, n);
}
function nct(t, e, n, r, i) {
  if (i) {
    var a = t.getZr();
    if (!a[DL]) {
      a[LI] || (a[LI] = rct);
      var o = Am(a, LI, n, e);
      o(t, r);
    }
  }
}
function rct(t, e) {
  if (!t.isDisposed()) {
    var n = t.getZr();
    n[DL] = !0, t.dispatchAction({
      type: "brushSelect",
      batch: e
    }), n[DL] = !1;
  }
}
function OY(t, e, n, r) {
  for (var i = 0, a = e.length; i < a; i++) {
    var o = e[i];
    if (t.brushSelector(r, n, o.selectors, o))
      return !0;
  }
}
function ict(t, e) {
  var n = t.option.seriesIndex;
  return n != null && n !== "all" && (Se(n) ? St(n, e) < 0 : e !== n);
}
var act = {
  rect: function(t) {
    return SY(t.range);
  },
  polygon: function(t) {
    for (var e, n = t.range, r = 0, i = n.length; r < i; r++) {
      e = e || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
      var a = n[r];
      a[0] < e[0][0] && (e[0][0] = a[0]), a[0] > e[0][1] && (e[0][1] = a[0]), a[1] < e[1][0] && (e[1][0] = a[1]), a[1] > e[1][1] && (e[1][1] = a[1]);
    }
    return e && SY(e);
  }
};
function SY(t) {
  return new bt(t[0][0], t[1][0], t[0][1] - t[0][0], t[1][1] - t[1][0]);
}
var oct = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n, r) {
      this.ecModel = n, this.api = r, this.model, (this._brushController = new J3(r.getZr())).on("brush", We(this._onBrush, this)).mount();
    }, e.prototype.render = function(n, r, i, a) {
      this.model = n, this._updateController(n, r, i, a);
    }, e.prototype.updateTransform = function(n, r, i, a) {
      Ohe(r), this._updateController(n, r, i, a);
    }, e.prototype.updateVisual = function(n, r, i, a) {
      this.updateTransform(n, r, i, a);
    }, e.prototype.updateView = function(n, r, i, a) {
      this._updateController(n, r, i, a);
    }, e.prototype._updateController = function(n, r, i, a) {
      (!a || a.$from !== n.id) && this._brushController.setPanels(n.brushTargetManager.makePanelOpts(i)).enableBrush(n.brushOption).updateCovers(n.areas.slice());
    }, e.prototype.dispose = function() {
      this._brushController.dispose();
    }, e.prototype._onBrush = function(n) {
      var r = this.model.id, i = this.model.brushTargetManager.setOutputRanges(n.areas, this.ecModel);
      (!n.isEnd || n.removeOnClick) && this.api.dispatchAction({
        type: "brush",
        brushId: r,
        areas: ot(i),
        $from: r
      }), n.isEnd && this.api.dispatchAction({
        type: "brushEnd",
        brushId: r,
        areas: ot(i),
        $from: r
      });
    }, e.type = "brush", e;
  }(Ln)
), sct = "#ddd", lct = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.areas = [], n.brushOption = {}, n;
    }
    return e.prototype.optionUpdated = function(n, r) {
      var i = this.option;
      !r && _he(i, n, ["inBrush", "outOfBrush"]);
      var a = i.inBrush = i.inBrush || {};
      i.outOfBrush = i.outOfBrush || {
        color: sct
      }, a.hasOwnProperty("liftZ") || (a.liftZ = 5);
    }, e.prototype.setAreas = function(n) {
      process.env.NODE_ENV !== "production" && (at(Se(n)), F(n, function(r) {
        at(r.brushType, "Illegal areas");
      })), n && (this.areas = Ce(n, function(r) {
        return xY(this.option, r);
      }, this));
    }, e.prototype.setBrushOption = function(n) {
      this.brushOption = xY(this.option, n), this.brushType = this.brushOption.brushType;
    }, e.type = "brush", e.dependencies = ["geo", "grid", "xAxis", "yAxis", "parallel", "series"], e.defaultOption = {
      seriesIndex: "all",
      brushType: "rect",
      brushMode: "single",
      transformable: !0,
      brushStyle: {
        borderWidth: 1,
        color: "rgba(210,219,238,0.3)",
        borderColor: "#D2DBEE"
      },
      throttleType: "fixRate",
      throttleDelay: 0,
      removeOnClick: !0,
      z: 1e4
    }, e;
  }(At)
);
function xY(t, e) {
  return mt({
    brushType: t.brushType,
    brushMode: t.brushMode,
    transformable: t.transformable,
    brushStyle: new xn(t.brushStyle).getItemStyle(),
    removeOnClick: t.removeOnClick,
    z: t.z
  }, e, !0);
}
var uct = ["rect", "polygon", "lineX", "lineY", "keep", "clear"], cct = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.render = function(n, r, i) {
      var a, o, s;
      r.eachComponent({
        mainType: "brush"
      }, function(l) {
        a = l.brushType, o = l.brushOption.brushMode || "single", s = s || !!l.areas.length;
      }), this._brushType = a, this._brushMode = o, F(n.get("type", !0), function(l) {
        n.setIconStatus(l, (l === "keep" ? o === "multiple" : l === "clear" ? s : l === a) ? "emphasis" : "normal");
      });
    }, e.prototype.updateView = function(n, r, i) {
      this.render(n, r, i);
    }, e.prototype.getIcons = function() {
      var n = this.model, r = n.get("icon", !0), i = {};
      return F(n.get("type", !0), function(a) {
        r[a] && (i[a] = r[a]);
      }), i;
    }, e.prototype.onclick = function(n, r, i) {
      var a = this._brushType, o = this._brushMode;
      i === "clear" ? (r.dispatchAction({
        type: "axisAreaSelect",
        intervals: []
      }), r.dispatchAction({
        type: "brush",
        command: "clear",
        // Clear all areas of all brush components.
        areas: []
      })) : r.dispatchAction({
        type: "takeGlobalCursor",
        key: "brush",
        brushOption: {
          brushType: i === "keep" ? a : a === i ? !1 : i,
          brushMode: i === "keep" ? o === "multiple" ? "single" : "multiple" : o
        }
      });
    }, e.getDefaultOption = function(n) {
      var r = {
        show: !0,
        type: uct.slice(),
        icon: {
          /* eslint-disable */
          rect: "M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",
          polygon: "M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",
          lineX: "M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",
          lineY: "M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",
          keep: "M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",
          clear: "M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"
          // jshint ignore:line
          /* eslint-enable */
        },
        // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`
        title: n.getLocaleModel().get(["toolbox", "brush", "title"])
      };
      return r;
    }, e;
  }(Ho)
);
function fct(t) {
  t.registerComponentView(oct), t.registerComponentModel(lct), t.registerPreprocessor(Yut), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, tct), t.registerAction({
    type: "brush",
    event: "brush",
    update: "updateVisual"
  }, function(e, n) {
    n.eachComponent({
      mainType: "brush",
      query: e
    }, function(r) {
      r.setAreas(e.areas);
    });
  }), t.registerAction({
    type: "brushSelect",
    event: "brushSelected",
    update: "none"
  }, fr), t.registerAction({
    type: "brushEnd",
    event: "brushEnd",
    update: "none"
  }, fr), wv("brush", cct);
}
var dct = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.layoutMode = {
        type: "box",
        ignoreSize: !0
      }, n;
    }
    return e.type = "title", e.defaultOption = {
      // zlevel: 0,
      z: 6,
      show: !0,
      text: "",
      target: "blank",
      subtext: "",
      subtarget: "blank",
      left: 0,
      top: 0,
      backgroundColor: "rgba(0,0,0,0)",
      borderColor: "#ccc",
      borderWidth: 0,
      padding: 5,
      itemGap: 10,
      textStyle: {
        fontSize: 18,
        fontWeight: "bold",
        color: "#464646"
      },
      subtextStyle: {
        fontSize: 12,
        color: "#6E7079"
      }
    }, e;
  }(At)
), hct = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      if (this.group.removeAll(), !!n.get("show")) {
        var a = this.group, o = n.getModel("textStyle"), s = n.getModel("subtextStyle"), l = n.get("textAlign"), u = dt(n.get("textBaseline"), n.get("textVerticalAlign")), c = new jt({
          style: Mn(o, {
            text: n.get("text"),
            fill: o.getTextColor()
          }, {
            disableBox: !0
          }),
          z2: 10
        }), f = c.getBoundingRect(), d = n.get("subtext"), h = new jt({
          style: Mn(s, {
            text: d,
            fill: s.getTextColor(),
            y: f.height + n.get("itemGap"),
            verticalAlign: "top"
          }, {
            disableBox: !0
          }),
          z2: 10
        }), p = n.get("link"), v = n.get("sublink"), g = n.get("triggerEvent", !0);
        c.silent = !p && !g, h.silent = !v && !g, p && c.on("click", function() {
          BC(p, "_" + n.get("target"));
        }), v && h.on("click", function() {
          BC(v, "_" + n.get("subtarget"));
        }), ft(c).eventData = ft(h).eventData = g ? {
          componentType: "title",
          componentIndex: n.componentIndex
        } : null, a.add(c), d && a.add(h);
        var m = a.getBoundingRect(), y = n.getBoxLayoutParams();
        y.width = m.width, y.height = m.height;
        var _ = Mr(y, {
          width: i.getWidth(),
          height: i.getHeight()
        }, n.get("padding"));
        l || (l = n.get("left") || n.get("right"), l === "middle" && (l = "center"), l === "right" ? _.x += _.width : l === "center" && (_.x += _.width / 2)), u || (u = n.get("top") || n.get("bottom"), u === "center" && (u = "middle"), u === "bottom" ? _.y += _.height : u === "middle" && (_.y += _.height / 2), u = u || "top"), a.x = _.x, a.y = _.y, a.markRedraw();
        var O = {
          align: l,
          verticalAlign: u
        };
        c.setStyle(O), h.setStyle(O), m = a.getBoundingRect();
        var S = _.margin, x = n.getItemStyle(["color", "opacity"]);
        x.fill = n.get("backgroundColor");
        var C = new Zt({
          shape: {
            x: m.x - S[3],
            y: m.y - S[0],
            width: m.width + S[1] + S[3],
            height: m.height + S[0] + S[2],
            r: n.get("borderRadius")
          },
          style: x,
          subPixelOptimize: !0,
          silent: !0
        });
        a.add(C);
      }
    }, e.type = "title", e;
  }(Ln)
);
function pct(t) {
  t.registerComponentModel(dct), t.registerComponentView(hct);
}
var wY = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.layoutMode = "box", n;
    }
    return e.prototype.init = function(n, r, i) {
      this.mergeDefaultAndTheme(n, i), this._initData();
    }, e.prototype.mergeOption = function(n) {
      t.prototype.mergeOption.apply(this, arguments), this._initData();
    }, e.prototype.setCurrentIndex = function(n) {
      n == null && (n = this.option.currentIndex);
      var r = this._data.count();
      this.option.loop ? n = (n % r + r) % r : (n >= r && (n = r - 1), n < 0 && (n = 0)), this.option.currentIndex = n;
    }, e.prototype.getCurrentIndex = function() {
      return this.option.currentIndex;
    }, e.prototype.isIndexMax = function() {
      return this.getCurrentIndex() >= this._data.count() - 1;
    }, e.prototype.setPlayState = function(n) {
      this.option.autoPlay = !!n;
    }, e.prototype.getPlayState = function() {
      return !!this.option.autoPlay;
    }, e.prototype._initData = function() {
      var n = this.option, r = n.data || [], i = n.axisType, a = this._names = [], o;
      i === "category" ? (o = [], F(r, function(u, c) {
        var f = Br(ym(u), ""), d;
        nt(u) ? (d = ot(u), d.value = c) : d = c, o.push(d), a.push(f);
      })) : o = r;
      var s = {
        category: "ordinal",
        time: "time",
        value: "number"
      }[i] || "number", l = this._data = new Fi([{
        name: "value",
        type: s
      }], this);
      l.initData(o, a);
    }, e.prototype.getData = function() {
      return this._data;
    }, e.prototype.getCategories = function() {
      if (this.get("axisType") === "category")
        return this._names.slice();
    }, e.type = "timeline", e.defaultOption = {
      // zlevel: 0,                  // 一级层叠
      z: 4,
      show: !0,
      axisType: "time",
      realtime: !0,
      left: "20%",
      top: null,
      right: "20%",
      bottom: 0,
      width: null,
      height: 40,
      padding: 5,
      controlPosition: "left",
      autoPlay: !1,
      rewind: !1,
      loop: !0,
      playInterval: 2e3,
      currentIndex: 0,
      itemStyle: {},
      label: {
        color: "#000"
      },
      data: []
    }, e;
  }(At)
), She = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "timeline.slider", e.defaultOption = Bf(wY.defaultOption, {
      backgroundColor: "rgba(0,0,0,0)",
      borderColor: "#ccc",
      borderWidth: 0,
      orient: "horizontal",
      inverse: !1,
      tooltip: {
        trigger: "item"
        // data item may also have tootip attr.
      },
      symbol: "circle",
      symbolSize: 12,
      lineStyle: {
        show: !0,
        width: 2,
        color: "#DAE1F5"
      },
      label: {
        position: "auto",
        // When using number, label position is not
        // restricted by viewRect.
        // positive: right/bottom, negative: left/top
        show: !0,
        interval: "auto",
        rotate: 0,
        // formatter: null,
        // 其余属性默认使用全局文本样式，详见TEXTSTYLE
        color: "#A4B1D7"
      },
      itemStyle: {
        color: "#A4B1D7",
        borderWidth: 1
      },
      checkpointStyle: {
        symbol: "circle",
        symbolSize: 15,
        color: "#316bf3",
        borderColor: "#fff",
        borderWidth: 2,
        shadowBlur: 2,
        shadowOffsetX: 1,
        shadowOffsetY: 1,
        shadowColor: "rgba(0, 0, 0, 0.3)",
        // borderColor: 'rgba(194,53,49, 0.5)',
        animation: !0,
        animationDuration: 300,
        animationEasing: "quinticInOut"
      },
      controlStyle: {
        show: !0,
        showPlayBtn: !0,
        showPrevBtn: !0,
        showNextBtn: !0,
        itemSize: 24,
        itemGap: 12,
        position: "left",
        playIcon: "path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",
        stopIcon: "path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",
        // eslint-disable-next-line max-len
        nextIcon: "M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",
        // eslint-disable-next-line max-len
        prevIcon: "M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",
        prevBtnSize: 18,
        nextBtnSize: 18,
        color: "#A4B1D7",
        borderColor: "#A4B1D7",
        borderWidth: 1
      },
      emphasis: {
        label: {
          show: !0,
          // 其余属性默认使用全局文本样式，详见TEXTSTYLE
          color: "#6f778d"
        },
        itemStyle: {
          color: "#316BF3"
        },
        controlStyle: {
          color: "#316BF3",
          borderColor: "#316BF3",
          borderWidth: 2
        }
      },
      progress: {
        lineStyle: {
          color: "#316BF3"
        },
        itemStyle: {
          color: "#316BF3"
        },
        label: {
          color: "#6f778d"
        }
      },
      data: []
    }), e;
  }(wY)
);
vr(She, DP.prototype);
var vct = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "timeline", e;
  }(Ln)
), gct = (
  /** @class */
  function(t) {
    le(e, t);
    function e(n, r, i, a) {
      var o = t.call(this, n, r, i) || this;
      return o.type = a || "value", o;
    }
    return e.prototype.getLabelModel = function() {
      return this.model.getModel("label");
    }, e.prototype.isHorizontal = function() {
      return this.model.get("orient") === "horizontal";
    }, e;
  }(vs)
), NI = Math.PI, CY = Ut(), mct = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n, r) {
      this.api = r;
    }, e.prototype.render = function(n, r, i) {
      if (this.model = n, this.api = i, this.ecModel = r, this.group.removeAll(), n.get("show", !0)) {
        var a = this._layout(n, i), o = this._createGroup("_mainGroup"), s = this._createGroup("_labelGroup"), l = this._axis = this._createAxis(a, n);
        n.formatTooltip = function(u) {
          var c = l.scale.getLabel({
            value: u
          });
          return ti("nameValue", {
            noName: !0,
            value: c
          });
        }, F(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function(u) {
          this["_render" + u](a, o, l, n);
        }, this), this._renderAxisLabel(a, s, l, n), this._position(a, n);
      }
      this._doPlayStop(), this._updateTicksStatus();
    }, e.prototype.remove = function() {
      this._clearTimer(), this.group.removeAll();
    }, e.prototype.dispose = function() {
      this._clearTimer();
    }, e.prototype._layout = function(n, r) {
      var i = n.get(["label", "position"]), a = n.get("orient"), o = bct(n, r), s;
      i == null || i === "auto" ? s = a === "horizontal" ? o.y + o.height / 2 < r.getHeight() / 2 ? "-" : "+" : o.x + o.width / 2 < r.getWidth() / 2 ? "+" : "-" : Ve(i) ? s = {
        horizontal: {
          top: "-",
          bottom: "+"
        },
        vertical: {
          left: "-",
          right: "+"
        }
      }[a][i] : s = i;
      var l = {
        horizontal: "center",
        vertical: s >= 0 || s === "+" ? "left" : "right"
      }, u = {
        horizontal: s >= 0 || s === "+" ? "top" : "bottom",
        vertical: "middle"
      }, c = {
        horizontal: 0,
        vertical: NI / 2
      }, f = a === "vertical" ? o.height : o.width, d = n.getModel("controlStyle"), h = d.get("show", !0), p = h ? d.get("itemSize") : 0, v = h ? d.get("itemGap") : 0, g = p + v, m = n.get(["label", "rotate"]) || 0;
      m = m * NI / 180;
      var y, _, O, S = d.get("position", !0), x = h && d.get("showPlayBtn", !0), C = h && d.get("showPrevBtn", !0), P = h && d.get("showNextBtn", !0), $ = 0, T = f;
      S === "left" || S === "bottom" ? (x && (y = [0, 0], $ += g), C && (_ = [$, 0], $ += g), P && (O = [T - p, 0], T -= g)) : (x && (y = [T - p, 0], T -= g), C && (_ = [0, 0], $ += g), P && (O = [T - p, 0], T -= g));
      var E = [$, T];
      return n.get("inverse") && E.reverse(), {
        viewRect: o,
        mainLength: f,
        orient: a,
        rotation: c[a],
        labelRotation: m,
        labelPosOpt: s,
        labelAlign: n.get(["label", "align"]) || l[a],
        labelBaseline: n.get(["label", "verticalAlign"]) || n.get(["label", "baseline"]) || u[a],
        // Based on mainGroup.
        playPosition: y,
        prevBtnPosition: _,
        nextBtnPosition: O,
        axisExtent: E,
        controlSize: p,
        controlGap: v
      };
    }, e.prototype._position = function(n, r) {
      var i = this._mainGroup, a = this._labelGroup, o = n.viewRect;
      if (n.orient === "vertical") {
        var s = Na(), l = o.x, u = o.y + o.height;
        Gs(s, s, [-l, -u]), Lf(s, s, -NI / 2), Gs(s, s, [l, u]), o = o.clone(), o.applyTransform(s);
      }
      var c = y(o), f = y(i.getBoundingRect()), d = y(a.getBoundingRect()), h = [i.x, i.y], p = [a.x, a.y];
      p[0] = h[0] = c[0][0];
      var v = n.labelPosOpt;
      if (v == null || Ve(v)) {
        var g = v === "+" ? 0 : 1;
        _(h, f, c, 1, g), _(p, d, c, 1, 1 - g);
      } else {
        var g = v >= 0 ? 0 : 1;
        _(h, f, c, 1, g), p[1] = h[1] + v;
      }
      i.setPosition(h), a.setPosition(p), i.rotation = a.rotation = n.rotation, m(i), m(a);
      function m(O) {
        O.originX = c[0][0] - O.x, O.originY = c[1][0] - O.y;
      }
      function y(O) {
        return [[O.x, O.x + O.width], [O.y, O.y + O.height]];
      }
      function _(O, S, x, C, P) {
        O[C] += x[C][P] - S[C][P];
      }
    }, e.prototype._createAxis = function(n, r) {
      var i = r.getData(), a = r.get("axisType"), o = yct(r, a);
      o.getTicks = function() {
        return i.mapArray(["value"], function(u) {
          return {
            value: u
          };
        });
      };
      var s = i.getDataExtent("value");
      o.setExtent(s[0], s[1]), o.calcNiceTicks();
      var l = new gct("value", o, n.axisExtent, a);
      return l.model = r, l;
    }, e.prototype._createGroup = function(n) {
      var r = this[n] = new ct();
      return this.group.add(r), r;
    }, e.prototype._renderAxisLine = function(n, r, i, a) {
      var o = i.getExtent();
      if (a.get(["lineStyle", "show"])) {
        var s = new Xr({
          shape: {
            x1: o[0],
            y1: 0,
            x2: o[1],
            y2: 0
          },
          style: _e({
            lineCap: "round"
          }, a.getModel("lineStyle").getLineStyle()),
          silent: !0,
          z2: 1
        });
        r.add(s);
        var l = this._progressLine = new Xr({
          shape: {
            x1: o[0],
            x2: this._currentPointer ? this._currentPointer.x : o[0],
            y1: 0,
            y2: 0
          },
          style: it({
            lineCap: "round",
            lineWidth: s.style.lineWidth
          }, a.getModel(["progress", "lineStyle"]).getLineStyle()),
          silent: !0,
          z2: 1
        });
        r.add(l);
      }
    }, e.prototype._renderAxisTick = function(n, r, i, a) {
      var o = this, s = a.getData(), l = i.scale.getTicks();
      this._tickSymbols = [], F(l, function(u) {
        var c = i.dataToCoord(u.value), f = s.getItemModel(u.value), d = f.getModel("itemStyle"), h = f.getModel(["emphasis", "itemStyle"]), p = f.getModel(["progress", "itemStyle"]), v = {
          x: c,
          y: 0,
          onclick: We(o._changeTimeline, o, u.value)
        }, g = TY(f, d, r, v);
        g.ensureState("emphasis").style = h.getItemStyle(), g.ensureState("progress").style = p.getItemStyle(), af(g);
        var m = ft(g);
        f.get("tooltip") ? (m.dataIndex = u.value, m.dataModel = a) : m.dataIndex = m.dataModel = null, o._tickSymbols.push(g);
      });
    }, e.prototype._renderAxisLabel = function(n, r, i, a) {
      var o = this, s = i.getLabelModel();
      if (s.get("show")) {
        var l = a.getData(), u = i.getViewLabels();
        this._tickLabels = [], F(u, function(c) {
          var f = c.tickValue, d = l.getItemModel(f), h = d.getModel("label"), p = d.getModel(["emphasis", "label"]), v = d.getModel(["progress", "label"]), g = i.dataToCoord(c.tickValue), m = new jt({
            x: g,
            y: 0,
            rotation: n.labelRotation - n.rotation,
            onclick: We(o._changeTimeline, o, f),
            silent: !1,
            style: Mn(h, {
              text: c.formattedLabel,
              align: n.labelAlign,
              verticalAlign: n.labelBaseline
            })
          });
          m.ensureState("emphasis").style = Mn(p), m.ensureState("progress").style = Mn(v), r.add(m), af(m), CY(m).dataIndex = f, o._tickLabels.push(m);
        });
      }
    }, e.prototype._renderControl = function(n, r, i, a) {
      var o = n.controlSize, s = n.rotation, l = a.getModel("controlStyle").getItemStyle(), u = a.getModel(["emphasis", "controlStyle"]).getItemStyle(), c = a.getPlayState(), f = a.get("inverse", !0);
      d(n.nextBtnPosition, "next", We(this._changeTimeline, this, f ? "-" : "+")), d(n.prevBtnPosition, "prev", We(this._changeTimeline, this, f ? "+" : "-")), d(n.playPosition, c ? "stop" : "play", We(this._handlePlayClick, this, !c), !0);
      function d(h, p, v, g) {
        if (h) {
          var m = js(dt(a.get(["controlStyle", p + "BtnSize"]), o), o), y = [0, -m / 2, m, m], _ = _ct(a, p + "Icon", y, {
            x: h[0],
            y: h[1],
            originX: o / 2,
            originY: 0,
            rotation: g ? -s : 0,
            rectHover: !0,
            style: l,
            onclick: v
          });
          _.ensureState("emphasis").style = u, r.add(_), af(_);
        }
      }
    }, e.prototype._renderCurrentPointer = function(n, r, i, a) {
      var o = a.getData(), s = a.getCurrentIndex(), l = o.getItemModel(s).getModel("checkpointStyle"), u = this, c = {
        onCreate: function(f) {
          f.draggable = !0, f.drift = We(u._handlePointerDrag, u), f.ondragend = We(u._handlePointerDragend, u), PY(f, u._progressLine, s, i, a, !0);
        },
        onUpdate: function(f) {
          PY(f, u._progressLine, s, i, a);
        }
      };
      this._currentPointer = TY(l, l, this._mainGroup, {}, this._currentPointer, c);
    }, e.prototype._handlePlayClick = function(n) {
      this._clearTimer(), this.api.dispatchAction({
        type: "timelinePlayChange",
        playState: n,
        from: this.uid
      });
    }, e.prototype._handlePointerDrag = function(n, r, i) {
      this._clearTimer(), this._pointerChangeTimeline([i.offsetX, i.offsetY]);
    }, e.prototype._handlePointerDragend = function(n) {
      this._pointerChangeTimeline([n.offsetX, n.offsetY], !0);
    }, e.prototype._pointerChangeTimeline = function(n, r) {
      var i = this._toAxisCoord(n)[0], a = this._axis, o = ao(a.getExtent().slice());
      i > o[1] && (i = o[1]), i < o[0] && (i = o[0]), this._currentPointer.x = i, this._currentPointer.markRedraw();
      var s = this._progressLine;
      s && (s.shape.x2 = i, s.dirty());
      var l = this._findNearestTick(i), u = this.model;
      (r || l !== u.getCurrentIndex() && u.get("realtime")) && this._changeTimeline(l);
    }, e.prototype._doPlayStop = function() {
      var n = this;
      this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(function() {
        var r = n.model;
        n._changeTimeline(r.getCurrentIndex() + (r.get("rewind", !0) ? -1 : 1));
      }, this.model.get("playInterval")));
    }, e.prototype._toAxisCoord = function(n) {
      var r = this._mainGroup.getLocalTransform();
      return zs(n, r, !0);
    }, e.prototype._findNearestTick = function(n) {
      var r = this.model.getData(), i = 1 / 0, a, o = this._axis;
      return r.each(["value"], function(s, l) {
        var u = o.dataToCoord(s), c = Math.abs(u - n);
        c < i && (i = c, a = l);
      }), a;
    }, e.prototype._clearTimer = function() {
      this._timer && (clearTimeout(this._timer), this._timer = null);
    }, e.prototype._changeTimeline = function(n) {
      var r = this.model.getCurrentIndex();
      n === "+" ? n = r + 1 : n === "-" && (n = r - 1), this.api.dispatchAction({
        type: "timelineChange",
        currentIndex: n,
        from: this.uid
      });
    }, e.prototype._updateTicksStatus = function() {
      var n = this.model.getCurrentIndex(), r = this._tickSymbols, i = this._tickLabels;
      if (r)
        for (var a = 0; a < r.length; a++)
          r && r[a] && r[a].toggleState("progress", a < n);
      if (i)
        for (var a = 0; a < i.length; a++)
          i && i[a] && i[a].toggleState("progress", CY(i[a]).dataIndex <= n);
    }, e.type = "timeline.slider", e;
  }(vct)
);
function yct(t, e) {
  if (e = e || t.get("type"), e)
    switch (e) {
      case "category":
        return new FP({
          ordinalMeta: t.getCategories(),
          extent: [1 / 0, -1 / 0]
        });
      case "time":
        return new C3({
          locale: t.ecModel.getLocaleModel(),
          useUTC: t.ecModel.get("useUTC")
        });
      default:
        return new Gu();
    }
}
function bct(t, e) {
  return Mr(t.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  }, t.get("padding"));
}
function _ct(t, e, n, r) {
  var i = r.style, a = Sm(t.get(["controlStyle", e]), r || {}, new bt(n[0], n[1], n[2], n[3]));
  return i && a.setStyle(i), a;
}
function TY(t, e, n, r, i, a) {
  var o = e.get("color");
  if (i)
    i.setColor(o), n.add(i), a && a.onUpdate(i);
  else {
    var s = t.get("symbol");
    i = Sr(s, -1, -1, 2, 2, o), i.setStyle("strokeNoScale", !0), n.add(i), a && a.onCreate(i);
  }
  var l = e.getItemStyle(["color"]);
  i.setStyle(l), r = mt({
    rectHover: !0,
    z2: 100
  }, r, !0);
  var u = Em(t.get("symbolSize"));
  r.scaleX = u[0] / 2, r.scaleY = u[1] / 2;
  var c = mp(t.get("symbolOffset"), u);
  c && (r.x = (r.x || 0) + c[0], r.y = (r.y || 0) + c[1]);
  var f = t.get("symbolRotate");
  return r.rotation = (f || 0) * Math.PI / 180 || 0, i.attr(r), i.updateTransform(), i;
}
function PY(t, e, n, r, i, a) {
  if (!t.dragging) {
    var o = i.getModel("checkpointStyle"), s = r.dataToCoord(i.getData().get("value", n));
    if (a || !o.get("animation", !0))
      t.attr({
        x: s,
        y: 0
      }), e && e.attr({
        shape: {
          x2: s
        }
      });
    else {
      var l = {
        duration: o.get("animationDuration", !0),
        easing: o.get("animationEasing", !0)
      };
      t.stopAnimation(null, !0), t.animateTo({
        x: s,
        y: 0
      }, l), e && e.animateTo({
        shape: {
          x2: s
        }
      }, l);
    }
  }
}
function Oct(t) {
  t.registerAction({
    type: "timelineChange",
    event: "timelineChanged",
    update: "prepareAndUpdate"
  }, function(e, n, r) {
    var i = n.getComponent("timeline");
    return i && e.currentIndex != null && (i.setCurrentIndex(e.currentIndex), !i.get("loop", !0) && i.isIndexMax() && i.getPlayState() && (i.setPlayState(!1), r.dispatchAction({
      type: "timelinePlayChange",
      playState: !1,
      from: e.from
    }))), n.resetOption("timeline", {
      replaceMerge: i.get("replaceMerge", !0)
    }), it({
      currentIndex: i.option.currentIndex
    }, e);
  }), t.registerAction({
    type: "timelinePlayChange",
    event: "timelinePlayChanged",
    update: "update"
  }, function(e, n) {
    var r = n.getComponent("timeline");
    r && e.playState != null && r.setPlayState(e.playState);
  });
}
function Sct(t) {
  var e = t && t.timeline;
  Se(e) || (e = e ? [e] : []), F(e, function(n) {
    n && xct(n);
  });
}
function xct(t) {
  var e = t.type, n = {
    number: "value",
    time: "time"
  };
  if (n[e] && (t.axisType = n[e], delete t.type), $Y(t), Ud(t, "controlPosition")) {
    var r = t.controlStyle || (t.controlStyle = {});
    Ud(r, "position") || (r.position = t.controlPosition), r.position === "none" && !Ud(r, "show") && (r.show = !1, delete r.position), delete t.controlPosition;
  }
  F(t.data || [], function(i) {
    nt(i) && !Se(i) && (!Ud(i, "value") && Ud(i, "name") && (i.value = i.name), $Y(i));
  });
}
function $Y(t) {
  var e = t.itemStyle || (t.itemStyle = {}), n = e.emphasis || (e.emphasis = {}), r = t.label || t.label || {}, i = r.normal || (r.normal = {}), a = {
    normal: 1,
    emphasis: 1
  };
  F(r, function(o, s) {
    !a[s] && !Ud(i, s) && (i[s] = o);
  }), n.label && !Ud(r, "emphasis") && (r.emphasis = n.label, delete n.label);
}
function Ud(t, e) {
  return t.hasOwnProperty(e);
}
function wct(t) {
  t.registerComponentModel(She), t.registerComponentView(mct), t.registerSubTypeDefaulter("timeline", function() {
    return "slider";
  }), Oct(t), t.registerPreprocessor(Sct);
}
function P6(t, e) {
  if (!t)
    return !1;
  for (var n = Se(t) ? t : [t], r = 0; r < n.length; r++)
    if (n[r] && n[r][e])
      return !0;
  return !1;
}
function KS(t) {
  Hh(t, "label", ["show"]);
}
var JS = Ut(), Zu = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.createdBySelf = !1, n;
    }
    return e.prototype.init = function(n, r, i) {
      if (process.env.NODE_ENV !== "production" && this.type === "marker")
        throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");
      this.mergeDefaultAndTheme(n, i), this._mergeOption(n, i, !1, !0);
    }, e.prototype.isAnimationEnabled = function() {
      if (Gt.node)
        return !1;
      var n = this.__hostSeries;
      return this.getShallow("animation") && n && n.isAnimationEnabled();
    }, e.prototype.mergeOption = function(n, r) {
      this._mergeOption(n, r, !1, !1);
    }, e.prototype._mergeOption = function(n, r, i, a) {
      var o = this.mainType;
      i || r.eachSeries(function(s) {
        var l = s.get(this.mainType, !0), u = JS(s)[o];
        if (!l || !l.data) {
          JS(s)[o] = null;
          return;
        }
        u ? u._mergeOption(l, r, !0) : (a && KS(l), F(l.data, function(c) {
          c instanceof Array ? (KS(c[0]), KS(c[1])) : KS(c);
        }), u = this.createMarkerModelFromSeries(l, this, r), _e(u, {
          mainType: this.mainType,
          // Use the same series index and name
          seriesIndex: s.seriesIndex,
          name: s.name,
          createdBySelf: !0
        }), u.__hostSeries = s), JS(s)[o] = u;
      }, this);
    }, e.prototype.formatTooltip = function(n, r, i) {
      var a = this.getData(), o = this.getRawValue(n), s = a.getName(n);
      return ti("section", {
        header: this.name,
        blocks: [ti("nameValue", {
          name: s,
          value: o,
          noName: !s,
          noValue: o == null
        })]
      });
    }, e.prototype.getData = function() {
      return this._data;
    }, e.prototype.setData = function(n) {
      this._data = n;
    }, e.prototype.getDataParams = function(n, r) {
      var i = DP.prototype.getDataParams.call(this, n, r), a = this.__hostSeries;
      return a && (i.seriesId = a.id, i.seriesName = a.name, i.seriesType = a.subType), i;
    }, e.getMarkerModelFromSeries = function(n, r) {
      return JS(n)[r];
    }, e.type = "marker", e.dependencies = ["series", "grid", "polar", "geo"], e;
  }(At)
);
vr(Zu, DP.prototype);
var Cct = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
      return new e(n, r, i);
    }, e.type = "markPoint", e.defaultOption = {
      // zlevel: 0,
      z: 5,
      symbol: "pin",
      symbolSize: 50,
      // symbolRotate: 0,
      // symbolOffset: [0, 0]
      tooltip: {
        trigger: "item"
      },
      label: {
        show: !0,
        position: "inside"
      },
      itemStyle: {
        borderWidth: 2
      },
      emphasis: {
        label: {
          show: !0
        }
      }
    }, e;
  }(Zu)
);
function RL(t) {
  return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y)));
}
function Tct(t) {
  return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y));
}
function ex(t, e, n, r, i, a) {
  var o = [], s = Hu(
    e,
    r
    /* , otherDataDim */
  ), l = s ? e.getCalculationInfo("stackResultDimension") : r, u = $6(e, l, t), c = e.indicesOfNearest(l, u)[0];
  o[i] = e.get(n, c), o[a] = e.get(l, c);
  var f = e.get(r, c), d = Ms(e.get(r, c));
  return d = Math.min(d, 20), d >= 0 && (o[a] = +o[a].toFixed(d)), [o, f];
}
var BI = {
  min: vt(ex, "min"),
  max: vt(ex, "max"),
  average: vt(ex, "average"),
  median: vt(ex, "median")
};
function h_(t, e) {
  if (e) {
    var n = t.getData(), r = t.coordinateSystem, i = r && r.dimensions;
    if (!Tct(e) && !Se(e.coord) && Se(i)) {
      var a = xhe(e, n, r, t);
      if (e = ot(e), e.type && BI[e.type] && a.baseAxis && a.valueAxis) {
        var o = St(i, a.baseAxis.dim), s = St(i, a.valueAxis.dim), l = BI[e.type](n, a.baseDataDim, a.valueDataDim, o, s);
        e.coord = l[0], e.value = l[1];
      } else
        e.coord = [e.xAxis != null ? e.xAxis : e.radiusAxis, e.yAxis != null ? e.yAxis : e.angleAxis];
    }
    if (e.coord == null || !Se(i))
      e.coord = [];
    else
      for (var u = e.coord, c = 0; c < 2; c++)
        BI[u[c]] && (u[c] = $6(n, n.mapDimension(i[c]), u[c]));
    return e;
  }
}
function xhe(t, e, n, r) {
  var i = {};
  return t.valueIndex != null || t.valueDim != null ? (i.valueDataDim = t.valueIndex != null ? e.getDimension(t.valueIndex) : t.valueDim, i.valueAxis = n.getAxis(Pct(r, i.valueDataDim)), i.baseAxis = n.getOtherAxis(i.valueAxis), i.baseDataDim = e.mapDimension(i.baseAxis.dim)) : (i.baseAxis = r.getBaseAxis(), i.valueAxis = n.getOtherAxis(i.baseAxis), i.baseDataDim = e.mapDimension(i.baseAxis.dim), i.valueDataDim = e.mapDimension(i.valueAxis.dim)), i;
}
function Pct(t, e) {
  var n = t.getData().getDimensionInfo(e);
  return n && n.coordDim;
}
function p_(t, e) {
  return t && t.containData && e.coord && !RL(e) ? t.containData(e.coord) : !0;
}
function $ct(t, e, n) {
  return t && t.containZone && e.coord && n.coord && !RL(e) && !RL(n) ? t.containZone(e.coord, n.coord) : !0;
}
function whe(t, e) {
  return t ? function(n, r, i, a) {
    var o = a < 2 ? n.coord && n.coord[a] : n.value;
    return sf(o, e[a]);
  } : function(n, r, i, a) {
    return sf(n.value, e[a]);
  };
}
function $6(t, e, n) {
  if (n === "average") {
    var r = 0, i = 0;
    return t.each(e, function(a, o) {
      isNaN(a) || (r += a, i++);
    }), r / i;
  } else return n === "median" ? t.getMedian(e) : t.getDataExtent(e)[n === "max" ? 1 : 0];
}
var zI = Ut(), A6 = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function() {
      this.markerGroupMap = Ze();
    }, e.prototype.render = function(n, r, i) {
      var a = this, o = this.markerGroupMap;
      o.each(function(s) {
        zI(s).keep = !1;
      }), r.eachSeries(function(s) {
        var l = Zu.getMarkerModelFromSeries(s, a.type);
        l && a.renderSeries(s, l, r, i);
      }), o.each(function(s) {
        !zI(s).keep && a.group.remove(s.group);
      });
    }, e.prototype.markKeep = function(n) {
      zI(n).keep = !0;
    }, e.prototype.toggleBlurSeries = function(n, r) {
      var i = this;
      F(n, function(a) {
        var o = Zu.getMarkerModelFromSeries(a, i.type);
        if (o) {
          var s = o.getData();
          s.eachItemGraphicEl(function(l) {
            l && (r ? ole(l) : N5(l));
          });
        }
      });
    }, e.type = "marker", e;
  }(Ln)
);
function AY(t, e, n) {
  var r = e.coordinateSystem;
  t.each(function(i) {
    var a = t.getItemModel(i), o, s = ze(a.get("x"), n.getWidth()), l = ze(a.get("y"), n.getHeight());
    if (!isNaN(s) && !isNaN(l))
      o = [s, l];
    else if (e.getMarkerPosition)
      o = e.getMarkerPosition(t.getValues(t.dimensions, i));
    else if (r) {
      var u = t.get(r.dimensions[0], i), c = t.get(r.dimensions[1], i);
      o = r.dataToPoint([u, c]);
    }
    isNaN(s) || (o[0] = s), isNaN(l) || (o[1] = l), t.setItemLayout(i, o);
  });
}
var Act = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.updateTransform = function(n, r, i) {
      r.eachSeries(function(a) {
        var o = Zu.getMarkerModelFromSeries(a, "markPoint");
        o && (AY(o.getData(), a, i), this.markerGroupMap.get(a.id).updateLayout());
      }, this);
    }, e.prototype.renderSeries = function(n, r, i, a) {
      var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, new y1()), f = Ect(o, n, r);
      r.setData(f), AY(r.getData(), n, a), f.each(function(d) {
        var h = f.getItemModel(d), p = h.getShallow("symbol"), v = h.getShallow("symbolSize"), g = h.getShallow("symbolRotate"), m = h.getShallow("symbolOffset"), y = h.getShallow("symbolKeepAspect");
        if (qe(p) || qe(v) || qe(g) || qe(m)) {
          var _ = r.getRawValue(d), O = r.getDataParams(d);
          qe(p) && (p = p(_, O)), qe(v) && (v = v(_, O)), qe(g) && (g = g(_, O)), qe(m) && (m = m(_, O));
        }
        var S = h.getModel("itemStyle").getItemStyle(), x = v1(l, "color");
        S.fill || (S.fill = x), f.setItemVisual(d, {
          symbol: p,
          symbolSize: v,
          symbolRotate: g,
          symbolOffset: m,
          symbolKeepAspect: y,
          style: S
        });
      }), c.updateData(f), this.group.add(c.group), f.eachItemGraphicEl(function(d) {
        d.traverse(function(h) {
          ft(h).dataModel = r;
        });
      }), this.markKeep(c), c.group.silent = r.get("silent") || n.get("silent");
    }, e.type = "markPoint", e;
  }(A6)
);
function Ect(t, e, n) {
  var r;
  t ? r = Ce(t && t.dimensions, function(s) {
    var l = e.getData().getDimensionInfo(e.getData().mapDimension(s)) || {};
    return _e(_e({}, l), {
      name: s,
      // DON'T use ordinalMeta to parse and collect ordinal.
      ordinalMeta: null
    });
  }) : r = [{
    name: "value",
    type: "float"
  }];
  var i = new Fi(r, n), a = Ce(n.get("data"), vt(h_, e));
  t && (a = yn(a, vt(p_, t)));
  var o = whe(!!t, r);
  return i.initData(a, null, o), i;
}
function Mct(t) {
  t.registerComponentModel(Cct), t.registerComponentView(Act), t.registerPreprocessor(function(e) {
    P6(e.series, "markPoint") && (e.markPoint = e.markPoint || {});
  });
}
var Ict = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
      return new e(n, r, i);
    }, e.type = "markLine", e.defaultOption = {
      // zlevel: 0,
      z: 5,
      symbol: ["circle", "arrow"],
      symbolSize: [8, 16],
      // symbolRotate: 0,
      symbolOffset: 0,
      precision: 2,
      tooltip: {
        trigger: "item"
      },
      label: {
        show: !0,
        position: "end",
        distance: 5
      },
      lineStyle: {
        type: "dashed"
      },
      emphasis: {
        label: {
          show: !0
        },
        lineStyle: {
          width: 3
        }
      },
      animationEasing: "linear"
    }, e;
  }(Zu)
), tx = Ut(), Dct = function(t, e, n, r) {
  var i = t.getData(), a;
  if (Se(r))
    a = r;
  else {
    var o = r.type;
    if (o === "min" || o === "max" || o === "average" || o === "median" || r.xAxis != null || r.yAxis != null) {
      var s = void 0, l = void 0;
      if (r.yAxis != null || r.xAxis != null)
        s = e.getAxis(r.yAxis != null ? "y" : "x"), l = br(r.yAxis, r.xAxis);
      else {
        var u = xhe(r, i, e, t);
        s = u.valueAxis;
        var c = S3(i, u.valueDataDim);
        l = $6(i, c, o);
      }
      var f = s.dim === "x" ? 0 : 1, d = 1 - f, h = ot(r), p = {
        coord: []
      };
      h.type = null, h.coord = [], h.coord[d] = -1 / 0, p.coord[d] = 1 / 0;
      var v = n.get("precision");
      v >= 0 && Kt(l) && (l = +l.toFixed(Math.min(v, 20))), h.coord[f] = p.coord[f] = l, a = [h, p, {
        type: o,
        valueIndex: r.valueIndex,
        // Force to use the value of calculated value.
        value: l
      }];
    } else
      process.env.NODE_ENV !== "production" && qo("Invalid markLine data."), a = [];
  }
  var g = [h_(t, a[0]), h_(t, a[1]), _e({}, a[2])];
  return g[2].type = g[2].type || null, mt(g[2], g[0]), mt(g[2], g[1]), g;
};
function vT(t) {
  return !isNaN(t) && !isFinite(t);
}
function EY(t, e, n, r) {
  var i = 1 - t, a = r.dimensions[t];
  return vT(e[i]) && vT(n[i]) && e[t] === n[t] && r.getAxis(a).containData(e[t]);
}
function Rct(t, e) {
  if (t.type === "cartesian2d") {
    var n = e[0].coord, r = e[1].coord;
    if (n && r && (EY(1, n, r, t) || EY(0, n, r, t)))
      return !0;
  }
  return p_(t, e[0]) && p_(t, e[1]);
}
function VI(t, e, n, r, i) {
  var a = r.coordinateSystem, o = t.getItemModel(e), s, l = ze(o.get("x"), i.getWidth()), u = ze(o.get("y"), i.getHeight());
  if (!isNaN(l) && !isNaN(u))
    s = [l, u];
  else {
    if (r.getMarkerPosition)
      s = r.getMarkerPosition(t.getValues(t.dimensions, e));
    else {
      var c = a.dimensions, f = t.get(c[0], e), d = t.get(c[1], e);
      s = a.dataToPoint([f, d]);
    }
    if (yp(a, "cartesian2d")) {
      var h = a.getAxis("x"), p = a.getAxis("y"), c = a.dimensions;
      vT(t.get(c[0], e)) ? s[0] = h.toGlobalCoord(h.getExtent()[n ? 0 : 1]) : vT(t.get(c[1], e)) && (s[1] = p.toGlobalCoord(p.getExtent()[n ? 0 : 1]));
    }
    isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
  }
  t.setItemLayout(e, s);
}
var kct = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.updateTransform = function(n, r, i) {
      r.eachSeries(function(a) {
        var o = Zu.getMarkerModelFromSeries(a, "markLine");
        if (o) {
          var s = o.getData(), l = tx(o).from, u = tx(o).to;
          l.each(function(c) {
            VI(l, c, !0, a, i), VI(u, c, !1, a, i);
          }), s.each(function(c) {
            s.setItemLayout(c, [l.getItemLayout(c), u.getItemLayout(c)]);
          }), this.markerGroupMap.get(a.id).updateLayout();
        }
      }, this);
    }, e.prototype.renderSeries = function(n, r, i, a) {
      var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, new K3());
      this.group.add(c.group);
      var f = Lct(o, n, r), d = f.from, h = f.to, p = f.line;
      tx(r).from = d, tx(r).to = h, r.setData(p);
      var v = r.get("symbol"), g = r.get("symbolSize"), m = r.get("symbolRotate"), y = r.get("symbolOffset");
      Se(v) || (v = [v, v]), Se(g) || (g = [g, g]), Se(m) || (m = [m, m]), Se(y) || (y = [y, y]), f.from.each(function(O) {
        _(d, O, !0), _(h, O, !1);
      }), p.each(function(O) {
        var S = p.getItemModel(O).getModel("lineStyle").getLineStyle();
        p.setItemLayout(O, [d.getItemLayout(O), h.getItemLayout(O)]), S.stroke == null && (S.stroke = d.getItemVisual(O, "style").fill), p.setItemVisual(O, {
          fromSymbolKeepAspect: d.getItemVisual(O, "symbolKeepAspect"),
          fromSymbolOffset: d.getItemVisual(O, "symbolOffset"),
          fromSymbolRotate: d.getItemVisual(O, "symbolRotate"),
          fromSymbolSize: d.getItemVisual(O, "symbolSize"),
          fromSymbol: d.getItemVisual(O, "symbol"),
          toSymbolKeepAspect: h.getItemVisual(O, "symbolKeepAspect"),
          toSymbolOffset: h.getItemVisual(O, "symbolOffset"),
          toSymbolRotate: h.getItemVisual(O, "symbolRotate"),
          toSymbolSize: h.getItemVisual(O, "symbolSize"),
          toSymbol: h.getItemVisual(O, "symbol"),
          style: S
        });
      }), c.updateData(p), f.line.eachItemGraphicEl(function(O) {
        ft(O).dataModel = r, O.traverse(function(S) {
          ft(S).dataModel = r;
        });
      });
      function _(O, S, x) {
        var C = O.getItemModel(S);
        VI(O, S, x, n, a);
        var P = C.getModel("itemStyle").getItemStyle();
        P.fill == null && (P.fill = v1(l, "color")), O.setItemVisual(S, {
          symbolKeepAspect: C.get("symbolKeepAspect"),
          // `0` should be considered as a valid value, so use `retrieve2` instead of `||`
          symbolOffset: dt(C.get("symbolOffset", !0), y[x ? 0 : 1]),
          symbolRotate: dt(C.get("symbolRotate", !0), m[x ? 0 : 1]),
          // TODO: when 2d array is supported, it should ignore parent
          symbolSize: dt(C.get("symbolSize"), g[x ? 0 : 1]),
          symbol: dt(C.get("symbol", !0), v[x ? 0 : 1]),
          style: P
        });
      }
      this.markKeep(c), c.group.silent = r.get("silent") || n.get("silent");
    }, e.type = "markLine", e;
  }(A6)
);
function Lct(t, e, n) {
  var r;
  t ? r = Ce(t && t.dimensions, function(u) {
    var c = e.getData().getDimensionInfo(e.getData().mapDimension(u)) || {};
    return _e(_e({}, c), {
      name: u,
      // DON'T use ordinalMeta to parse and collect ordinal.
      ordinalMeta: null
    });
  }) : r = [{
    name: "value",
    type: "float"
  }];
  var i = new Fi(r, n), a = new Fi(r, n), o = new Fi([], n), s = Ce(n.get("data"), vt(Dct, e, t, n));
  t && (s = yn(s, vt(Rct, t)));
  var l = whe(!!t, r);
  return i.initData(Ce(s, function(u) {
    return u[0];
  }), null, l), a.initData(Ce(s, function(u) {
    return u[1];
  }), null, l), o.initData(Ce(s, function(u) {
    return u[2];
  })), o.hasItemOption = !0, {
    from: i,
    to: a,
    line: o
  };
}
function Nct(t) {
  t.registerComponentModel(Ict), t.registerComponentView(kct), t.registerPreprocessor(function(e) {
    P6(e.series, "markLine") && (e.markLine = e.markLine || {});
  });
}
var Bct = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
      return new e(n, r, i);
    }, e.type = "markArea", e.defaultOption = {
      // zlevel: 0,
      // PENDING
      z: 1,
      tooltip: {
        trigger: "item"
      },
      // markArea should fixed on the coordinate system
      animation: !1,
      label: {
        show: !0,
        position: "top"
      },
      itemStyle: {
        // color and borderColor default to use color from series
        // color: 'auto'
        // borderColor: 'auto'
        borderWidth: 0
      },
      emphasis: {
        label: {
          show: !0,
          position: "top"
        }
      }
    }, e;
  }(Zu)
), nx = Ut(), zct = function(t, e, n, r) {
  var i = r[0], a = r[1];
  if (!(!i || !a)) {
    var o = h_(t, i), s = h_(t, a), l = o.coord, u = s.coord;
    l[0] = br(l[0], -1 / 0), l[1] = br(l[1], -1 / 0), u[0] = br(u[0], 1 / 0), u[1] = br(u[1], 1 / 0);
    var c = aP([{}, o, s]);
    return c.coord = [o.coord, s.coord], c.x0 = o.x, c.y0 = o.y, c.x1 = s.x, c.y1 = s.y, c;
  }
};
function gT(t) {
  return !isNaN(t) && !isFinite(t);
}
function MY(t, e, n, r) {
  var i = 1 - t;
  return gT(e[i]) && gT(n[i]);
}
function Vct(t, e) {
  var n = e.coord[0], r = e.coord[1], i = {
    coord: n,
    x: e.x0,
    y: e.y0
  }, a = {
    coord: r,
    x: e.x1,
    y: e.y1
  };
  return yp(t, "cartesian2d") ? n && r && (MY(1, n, r) || MY(0, n, r)) ? !0 : $ct(t, i, a) : p_(t, i) || p_(t, a);
}
function IY(t, e, n, r, i) {
  var a = r.coordinateSystem, o = t.getItemModel(e), s, l = ze(o.get(n[0]), i.getWidth()), u = ze(o.get(n[1]), i.getHeight());
  if (!isNaN(l) && !isNaN(u))
    s = [l, u];
  else {
    if (r.getMarkerPosition) {
      var c = t.getValues(["x0", "y0"], e), f = t.getValues(["x1", "y1"], e), d = a.clampData(c), h = a.clampData(f), p = [];
      n[0] === "x0" ? p[0] = d[0] > h[0] ? f[0] : c[0] : p[0] = d[0] > h[0] ? c[0] : f[0], n[1] === "y0" ? p[1] = d[1] > h[1] ? f[1] : c[1] : p[1] = d[1] > h[1] ? c[1] : f[1], s = r.getMarkerPosition(p, n, !0);
    } else {
      var v = t.get(n[0], e), g = t.get(n[1], e), m = [v, g];
      a.clampData && a.clampData(m, m), s = a.dataToPoint(m, !0);
    }
    if (yp(a, "cartesian2d")) {
      var y = a.getAxis("x"), _ = a.getAxis("y"), v = t.get(n[0], e), g = t.get(n[1], e);
      gT(v) ? s[0] = y.toGlobalCoord(y.getExtent()[n[0] === "x0" ? 0 : 1]) : gT(g) && (s[1] = _.toGlobalCoord(_.getExtent()[n[1] === "y0" ? 0 : 1]));
    }
    isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
  }
  return s;
}
var DY = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]], Fct = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.updateTransform = function(n, r, i) {
      r.eachSeries(function(a) {
        var o = Zu.getMarkerModelFromSeries(a, "markArea");
        if (o) {
          var s = o.getData();
          s.each(function(l) {
            var u = Ce(DY, function(f) {
              return IY(s, l, f, a, i);
            });
            s.setItemLayout(l, u);
            var c = s.getItemGraphicEl(l);
            c.setShape("points", u);
          });
        }
      }, this);
    }, e.prototype.renderSeries = function(n, r, i, a) {
      var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, {
        group: new ct()
      });
      this.group.add(c.group), this.markKeep(c);
      var f = Wct(o, n, r);
      r.setData(f), f.each(function(d) {
        var h = Ce(DY, function(P) {
          return IY(f, d, P, n, a);
        }), p = o.getAxis("x").scale, v = o.getAxis("y").scale, g = p.getExtent(), m = v.getExtent(), y = [p.parse(f.get("x0", d)), p.parse(f.get("x1", d))], _ = [v.parse(f.get("y0", d)), v.parse(f.get("y1", d))];
        ao(y), ao(_);
        var O = !(g[0] > y[1] || g[1] < y[0] || m[0] > _[1] || m[1] < _[0]), S = !O;
        f.setItemLayout(d, {
          points: h,
          allClipped: S
        });
        var x = f.getItemModel(d).getModel("itemStyle").getItemStyle(), C = v1(l, "color");
        x.fill || (x.fill = C, Ve(x.fill) && (x.fill = Gb(x.fill, 0.4))), x.stroke || (x.stroke = C), f.setItemVisual(d, "style", x);
      }), f.diff(nx(c).data).add(function(d) {
        var h = f.getItemLayout(d);
        if (!h.allClipped) {
          var p = new pa({
            shape: {
              points: h.points
            }
          });
          f.setItemGraphicEl(d, p), c.group.add(p);
        }
      }).update(function(d, h) {
        var p = nx(c).data.getItemGraphicEl(h), v = f.getItemLayout(d);
        v.allClipped ? p && c.group.remove(p) : (p ? tn(p, {
          shape: {
            points: v.points
          }
        }, r, d) : p = new pa({
          shape: {
            points: v.points
          }
        }), f.setItemGraphicEl(d, p), c.group.add(p));
      }).remove(function(d) {
        var h = nx(c).data.getItemGraphicEl(d);
        c.group.remove(h);
      }).execute(), f.eachItemGraphicEl(function(d, h) {
        var p = f.getItemModel(h), v = f.getItemVisual(h, "style");
        d.useStyle(f.getItemVisual(h, "style")), Ei(d, ei(p), {
          labelFetcher: r,
          labelDataIndex: h,
          defaultText: f.getName(h) || "",
          inheritColor: Ve(v.fill) ? Gb(v.fill, 1) : "#000"
        }), Ai(d, p), ur(d, null, null, p.get(["emphasis", "disabled"])), ft(d).dataModel = r;
      }), nx(c).data = f, c.group.silent = r.get("silent") || n.get("silent");
    }, e.type = "markArea", e;
  }(A6)
);
function Wct(t, e, n) {
  var r, i, a = ["x0", "y0", "x1", "y1"];
  if (t) {
    var o = Ce(t && t.dimensions, function(u) {
      var c = e.getData(), f = c.getDimensionInfo(c.mapDimension(u)) || {};
      return _e(_e({}, f), {
        name: u,
        // DON'T use ordinalMeta to parse and collect ordinal.
        ordinalMeta: null
      });
    });
    i = Ce(a, function(u, c) {
      return {
        name: u,
        type: o[c % 2].type
      };
    }), r = new Fi(i, n);
  } else
    i = [{
      name: "value",
      type: "float"
    }], r = new Fi(i, n);
  var s = Ce(n.get("data"), vt(zct, e, t, n));
  t && (s = yn(s, vt(Vct, t)));
  var l = t ? function(u, c, f, d) {
    var h = u.coord[Math.floor(d / 2)][d % 2];
    return sf(h, i[d]);
  } : function(u, c, f, d) {
    return sf(u.value, i[d]);
  };
  return r.initData(s, null, l), r.hasItemOption = !0, r;
}
function Qct(t) {
  t.registerComponentModel(Bct), t.registerComponentView(Fct), t.registerPreprocessor(function(e) {
    P6(e.series, "markArea") && (e.markArea = e.markArea || {});
  });
}
var Hct = function(t, e) {
  if (e === "all")
    return {
      type: "all",
      title: t.getLocaleModel().get(["legend", "selector", "all"])
    };
  if (e === "inverse")
    return {
      type: "inverse",
      title: t.getLocaleModel().get(["legend", "selector", "inverse"])
    };
}, kL = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.layoutMode = {
        type: "box",
        // legend.width/height are maxWidth/maxHeight actually,
        // whereas real width/height is calculated by its content.
        // (Setting {left: 10, right: 10} does not make sense).
        // So consider the case:
        // `setOption({legend: {left: 10});`
        // then `setOption({legend: {right: 10});`
        // The previous `left` should be cleared by setting `ignoreSize`.
        ignoreSize: !0
      }, n;
    }
    return e.prototype.init = function(n, r, i) {
      this.mergeDefaultAndTheme(n, i), n.selected = n.selected || {}, this._updateSelector(n);
    }, e.prototype.mergeOption = function(n, r) {
      t.prototype.mergeOption.call(this, n, r), this._updateSelector(n);
    }, e.prototype._updateSelector = function(n) {
      var r = n.selector, i = this.ecModel;
      r === !0 && (r = n.selector = ["all", "inverse"]), Se(r) && F(r, function(a, o) {
        Ve(a) && (a = {
          type: a
        }), r[o] = mt(a, Hct(i, a.type));
      });
    }, e.prototype.optionUpdated = function() {
      this._updateData(this.ecModel);
      var n = this._data;
      if (n[0] && this.get("selectedMode") === "single") {
        for (var r = !1, i = 0; i < n.length; i++) {
          var a = n[i].get("name");
          if (this.isSelected(a)) {
            this.select(a), r = !0;
            break;
          }
        }
        !r && this.select(n[0].get("name"));
      }
    }, e.prototype._updateData = function(n) {
      var r = [], i = [];
      n.eachRawSeries(function(l) {
        var u = l.name;
        i.push(u);
        var c;
        if (l.legendVisualProvider) {
          var f = l.legendVisualProvider, d = f.getAllNames();
          n.isSeriesFiltered(l) || (i = i.concat(d)), d.length ? r = r.concat(d) : c = !0;
        } else
          c = !0;
        c && A5(l) && r.push(l.name);
      }), this._availableNames = i;
      var a = this.get("data") || r, o = Ze(), s = Ce(a, function(l) {
        return (Ve(l) || Kt(l)) && (l = {
          name: l
        }), o.get(l.name) ? null : (o.set(l.name, !0), new xn(l, this, this.ecModel));
      }, this);
      this._data = yn(s, function(l) {
        return !!l;
      });
    }, e.prototype.getData = function() {
      return this._data;
    }, e.prototype.select = function(n) {
      var r = this.option.selected, i = this.get("selectedMode");
      if (i === "single") {
        var a = this._data;
        F(a, function(o) {
          r[o.get("name")] = !1;
        });
      }
      r[n] = !0;
    }, e.prototype.unSelect = function(n) {
      this.get("selectedMode") !== "single" && (this.option.selected[n] = !1);
    }, e.prototype.toggleSelected = function(n) {
      var r = this.option.selected;
      r.hasOwnProperty(n) || (r[n] = !0), this[r[n] ? "unSelect" : "select"](n);
    }, e.prototype.allSelect = function() {
      var n = this._data, r = this.option.selected;
      F(n, function(i) {
        r[i.get("name", !0)] = !0;
      });
    }, e.prototype.inverseSelect = function() {
      var n = this._data, r = this.option.selected;
      F(n, function(i) {
        var a = i.get("name", !0);
        r.hasOwnProperty(a) || (r[a] = !0), r[a] = !r[a];
      });
    }, e.prototype.isSelected = function(n) {
      var r = this.option.selected;
      return !(r.hasOwnProperty(n) && !r[n]) && St(this._availableNames, n) >= 0;
    }, e.prototype.getOrient = function() {
      return this.get("orient") === "vertical" ? {
        index: 1,
        name: "vertical"
      } : {
        index: 0,
        name: "horizontal"
      };
    }, e.type = "legend.plain", e.dependencies = ["series"], e.defaultOption = {
      // zlevel: 0,
      z: 4,
      show: !0,
      orient: "horizontal",
      left: "center",
      // right: 'center',
      top: 0,
      // bottom: null,
      align: "auto",
      backgroundColor: "rgba(0,0,0,0)",
      borderColor: "#ccc",
      borderRadius: 0,
      borderWidth: 0,
      padding: 5,
      itemGap: 10,
      itemWidth: 25,
      itemHeight: 14,
      symbolRotate: "inherit",
      symbolKeepAspect: !0,
      inactiveColor: "#ccc",
      inactiveBorderColor: "#ccc",
      inactiveBorderWidth: "auto",
      itemStyle: {
        color: "inherit",
        opacity: "inherit",
        borderColor: "inherit",
        borderWidth: "auto",
        borderCap: "inherit",
        borderJoin: "inherit",
        borderDashOffset: "inherit",
        borderMiterLimit: "inherit"
      },
      lineStyle: {
        width: "auto",
        color: "inherit",
        inactiveColor: "#ccc",
        inactiveWidth: 2,
        opacity: "inherit",
        type: "inherit",
        cap: "inherit",
        join: "inherit",
        dashOffset: "inherit",
        miterLimit: "inherit"
      },
      textStyle: {
        color: "#333"
      },
      selectedMode: !0,
      selector: !1,
      selectorLabel: {
        show: !0,
        borderRadius: 10,
        padding: [3, 5, 3, 5],
        fontSize: 12,
        fontFamily: "sans-serif",
        color: "#666",
        borderWidth: 1,
        borderColor: "#666"
      },
      emphasis: {
        selectorLabel: {
          show: !0,
          color: "#eee",
          backgroundColor: "#666"
        }
      },
      selectorPosition: "auto",
      selectorItemGap: 7,
      selectorButtonGap: 10,
      tooltip: {
        show: !1
      }
    }, e;
  }(At)
), fv = vt, LL = F, rx = ct, Che = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.newlineDisabled = !1, n;
    }
    return e.prototype.init = function() {
      this.group.add(this._contentGroup = new rx()), this.group.add(this._selectorGroup = new rx()), this._isFirstRender = !0;
    }, e.prototype.getContentGroup = function() {
      return this._contentGroup;
    }, e.prototype.getSelectorGroup = function() {
      return this._selectorGroup;
    }, e.prototype.render = function(n, r, i) {
      var a = this._isFirstRender;
      if (this._isFirstRender = !1, this.resetInner(), !!n.get("show", !0)) {
        var o = n.get("align"), s = n.get("orient");
        (!o || o === "auto") && (o = n.get("left") === "right" && s === "vertical" ? "right" : "left");
        var l = n.get("selector", !0), u = n.get("selectorPosition", !0);
        l && (!u || u === "auto") && (u = s === "horizontal" ? "end" : "start"), this.renderInner(o, n, r, i, l, s, u);
        var c = n.getBoxLayoutParams(), f = {
          width: i.getWidth(),
          height: i.getHeight()
        }, d = n.get("padding"), h = Mr(c, f, d), p = this.layoutInner(n, o, h, a, l, u), v = Mr(it({
          width: p.width,
          height: p.height
        }, c), f, d);
        this.group.x = v.x - p.x, this.group.y = v.y - p.y, this.group.markRedraw(), this.group.add(this._backgroundEl = hhe(p, n));
      }
    }, e.prototype.resetInner = function() {
      this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll();
    }, e.prototype.renderInner = function(n, r, i, a, o, s, l) {
      var u = this.getContentGroup(), c = Ze(), f = r.get("selectedMode"), d = [];
      i.eachRawSeries(function(h) {
        !h.get("legendHoverLink") && d.push(h.id);
      }), LL(r.getData(), function(h, p) {
        var v = h.get("name");
        if (!this.newlineDisabled && (v === "" || v === `
`)) {
          var g = new rx();
          g.newline = !0, u.add(g);
          return;
        }
        var m = i.getSeriesByName(v)[0];
        if (!c.get(v)) {
          if (m) {
            var y = m.getData(), _ = y.getVisual("legendLineStyle") || {}, O = y.getVisual("legendIcon"), S = y.getVisual("style"), x = this._createItem(m, v, p, h, r, n, _, S, O, f, a);
            x.on("click", fv(RY, v, null, a, d)).on("mouseover", fv(NL, m.name, null, a, d)).on("mouseout", fv(BL, m.name, null, a, d)), i.ssr && x.eachChild(function(C) {
              var P = ft(C);
              P.seriesIndex = m.seriesIndex, P.dataIndex = p, P.ssrType = "legend";
            }), c.set(v, !0);
          } else
            i.eachRawSeries(function(C) {
              if (!c.get(v) && C.legendVisualProvider) {
                var P = C.legendVisualProvider;
                if (!P.containName(v))
                  return;
                var $ = P.indexOfName(v), T = P.getItemVisual($, "style"), E = P.getItemVisual($, "legendIcon"), M = oa(T.fill);
                M && M[3] === 0 && (M[3] = 0.2, T = _e(_e({}, T), {
                  fill: Bs(M, "rgba")
                }));
                var R = this._createItem(C, v, p, h, r, n, {}, T, E, f, a);
                R.on("click", fv(RY, null, v, a, d)).on("mouseover", fv(NL, null, v, a, d)).on("mouseout", fv(BL, null, v, a, d)), i.ssr && R.eachChild(function(N) {
                  var I = ft(N);
                  I.seriesIndex = C.seriesIndex, I.dataIndex = p, I.ssrType = "legend";
                }), c.set(v, !0);
              }
            }, this);
          process.env.NODE_ENV !== "production" && (c.get(v) || console.warn(v + " series not exists. Legend data should be same with series name or data name."));
        }
      }, this), o && this._createSelector(o, r, a, s, l);
    }, e.prototype._createSelector = function(n, r, i, a, o) {
      var s = this.getSelectorGroup();
      LL(n, function(u) {
        var c = u.type, f = new jt({
          style: {
            x: 0,
            y: 0,
            align: "center",
            verticalAlign: "middle"
          },
          onclick: function() {
            i.dispatchAction({
              type: c === "all" ? "legendAllSelect" : "legendInverseSelect"
            });
          }
        });
        s.add(f);
        var d = r.getModel("selectorLabel"), h = r.getModel(["emphasis", "selectorLabel"]);
        Ei(f, {
          normal: d,
          emphasis: h
        }, {
          defaultText: u.title
        }), af(f);
      });
    }, e.prototype._createItem = function(n, r, i, a, o, s, l, u, c, f, d) {
      var h = n.visualDrawType, p = o.get("itemWidth"), v = o.get("itemHeight"), g = o.isSelected(r), m = a.get("symbolRotate"), y = a.get("symbolKeepAspect"), _ = a.get("icon");
      c = _ || c || "roundRect";
      var O = Gct(c, a, l, u, h, g, d), S = new rx(), x = a.getModel("textStyle");
      if (qe(n.getLegendIcon) && (!_ || _ === "inherit"))
        S.add(n.getLegendIcon({
          itemWidth: p,
          itemHeight: v,
          icon: c,
          iconRotate: m,
          itemStyle: O.itemStyle,
          lineStyle: O.lineStyle,
          symbolKeepAspect: y
        }));
      else {
        var C = _ === "inherit" && n.getData().getVisual("symbol") ? m === "inherit" ? n.getData().getVisual("symbolRotate") : m : 0;
        S.add(jct({
          itemWidth: p,
          itemHeight: v,
          icon: c,
          iconRotate: C,
          itemStyle: O.itemStyle,
          lineStyle: O.lineStyle,
          symbolKeepAspect: y
        }));
      }
      var P = s === "left" ? p + 5 : -5, $ = s, T = o.get("formatter"), E = r;
      Ve(T) && T ? E = T.replace("{name}", r ?? "") : qe(T) && (E = T(r));
      var M = g ? x.getTextColor() : a.get("inactiveColor");
      S.add(new jt({
        style: Mn(x, {
          text: E,
          x: P,
          y: v / 2,
          fill: M,
          align: $,
          verticalAlign: "middle"
        }, {
          inheritColor: M
        })
      }));
      var R = new Zt({
        shape: S.getBoundingRect(),
        style: {
          // Cannot use 'invisible' because SVG SSR will miss the node
          fill: "transparent"
        }
      }), N = a.getModel("tooltip");
      return N.get("show") && xm({
        el: R,
        componentModel: o,
        itemName: r,
        itemTooltipOption: N.option
      }), S.add(R), S.eachChild(function(I) {
        I.silent = !0;
      }), R.silent = !f, this.getContentGroup().add(S), af(S), S.__legendDataIndex = i, S;
    }, e.prototype.layoutInner = function(n, r, i, a, o, s) {
      var l = this.getContentGroup(), u = this.getSelectorGroup();
      Th(n.get("orient"), l, n.get("itemGap"), i.width, i.height);
      var c = l.getBoundingRect(), f = [-c.x, -c.y];
      if (u.markRedraw(), l.markRedraw(), o) {
        Th(
          // Buttons in selectorGroup always layout horizontally
          "horizontal",
          u,
          n.get("selectorItemGap", !0)
        );
        var d = u.getBoundingRect(), h = [-d.x, -d.y], p = n.get("selectorButtonGap", !0), v = n.getOrient().index, g = v === 0 ? "width" : "height", m = v === 0 ? "height" : "width", y = v === 0 ? "y" : "x";
        s === "end" ? h[v] += c[g] + p : f[v] += d[g] + p, h[1 - v] += c[m] / 2 - d[m] / 2, u.x = h[0], u.y = h[1], l.x = f[0], l.y = f[1];
        var _ = {
          x: 0,
          y: 0
        };
        return _[g] = c[g] + p + d[g], _[m] = Math.max(c[m], d[m]), _[y] = Math.min(0, d[y] + h[1 - v]), _;
      } else
        return l.x = f[0], l.y = f[1], this.group.getBoundingRect();
    }, e.prototype.remove = function() {
      this.getContentGroup().removeAll(), this._isFirstRender = !0;
    }, e.type = "legend.plain", e;
  }(Ln)
);
function Gct(t, e, n, r, i, a, o) {
  function s(g, m) {
    g.lineWidth === "auto" && (g.lineWidth = m.lineWidth > 0 ? 2 : 0), LL(g, function(y, _) {
      g[_] === "inherit" && (g[_] = m[_]);
    });
  }
  var l = e.getModel("itemStyle"), u = l.getItemStyle(), c = t.lastIndexOf("empty", 0) === 0 ? "fill" : "stroke", f = l.getShallow("decal");
  u.decal = !f || f === "inherit" ? r.decal : Gg(f, o), u.fill === "inherit" && (u.fill = r[i]), u.stroke === "inherit" && (u.stroke = r[c]), u.opacity === "inherit" && (u.opacity = (i === "fill" ? r : n).opacity), s(u, r);
  var d = e.getModel("lineStyle"), h = d.getLineStyle();
  if (s(h, n), u.fill === "auto" && (u.fill = r.fill), u.stroke === "auto" && (u.stroke = r.fill), h.stroke === "auto" && (h.stroke = r.fill), !a) {
    var p = e.get("inactiveBorderWidth"), v = u[c];
    u.lineWidth = p === "auto" ? r.lineWidth > 0 && v ? 2 : 0 : u.lineWidth, u.fill = e.get("inactiveColor"), u.stroke = e.get("inactiveBorderColor"), h.stroke = d.get("inactiveColor"), h.lineWidth = d.get("inactiveWidth");
  }
  return {
    itemStyle: u,
    lineStyle: h
  };
}
function jct(t) {
  var e = t.icon || "roundRect", n = Sr(e, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill, t.symbolKeepAspect);
  return n.setStyle(t.itemStyle), n.rotation = (t.iconRotate || 0) * Math.PI / 180, n.setOrigin([t.itemWidth / 2, t.itemHeight / 2]), e.indexOf("empty") > -1 && (n.style.stroke = n.style.fill, n.style.fill = "#fff", n.style.lineWidth = 2), n;
}
function RY(t, e, n, r) {
  BL(t, e, n, r), n.dispatchAction({
    type: "legendToggleSelect",
    name: t ?? e
  }), NL(t, e, n, r);
}
function The(t) {
  for (var e = t.getZr().storage.getDisplayList(), n, r = 0, i = e.length; r < i && !(n = e[r].states.emphasis); )
    r++;
  return n && n.hoverLayer;
}
function NL(t, e, n, r) {
  The(n) || n.dispatchAction({
    type: "highlight",
    seriesName: t,
    name: e,
    excludeSeriesId: r
  });
}
function BL(t, e, n, r) {
  The(n) || n.dispatchAction({
    type: "downplay",
    seriesName: t,
    name: e,
    excludeSeriesId: r
  });
}
function Zct(t) {
  var e = t.findComponents({
    mainType: "legend"
  });
  e && e.length && t.filterSeries(function(n) {
    for (var r = 0; r < e.length; r++)
      if (!e[r].isSelected(n.name))
        return !1;
    return !0;
  });
}
function Y0(t, e, n) {
  var r = {}, i = t === "toggleSelected", a;
  return n.eachComponent("legend", function(o) {
    i && a != null ? o[a ? "select" : "unSelect"](e.name) : t === "allSelect" || t === "inverseSelect" ? o[t]() : (o[t](e.name), a = o.isSelected(e.name));
    var s = o.getData();
    F(s, function(l) {
      var u = l.get("name");
      if (!(u === `
` || u === "")) {
        var c = o.isSelected(u);
        r.hasOwnProperty(u) ? r[u] = r[u] && c : r[u] = c;
      }
    });
  }), t === "allSelect" || t === "inverseSelect" ? {
    selected: r
  } : {
    name: e.name,
    selected: r
  };
}
function Uct(t) {
  t.registerAction("legendToggleSelect", "legendselectchanged", vt(Y0, "toggleSelected")), t.registerAction("legendAllSelect", "legendselectall", vt(Y0, "allSelect")), t.registerAction("legendInverseSelect", "legendinverseselect", vt(Y0, "inverseSelect")), t.registerAction("legendSelect", "legendselected", vt(Y0, "select")), t.registerAction("legendUnSelect", "legendunselected", vt(Y0, "unSelect"));
}
function Phe(t) {
  t.registerComponentModel(kL), t.registerComponentView(Che), t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER, Zct), t.registerSubTypeDefaulter("legend", function() {
    return "plain";
  }), Uct(t);
}
var Xct = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.setScrollDataIndex = function(n) {
      this.option.scrollDataIndex = n;
    }, e.prototype.init = function(n, r, i) {
      var a = Tm(n);
      t.prototype.init.call(this, n, r, i), kY(this, n, a);
    }, e.prototype.mergeOption = function(n, r) {
      t.prototype.mergeOption.call(this, n, r), kY(this, this.option, n);
    }, e.type = "legend.scroll", e.defaultOption = Bf(kL.defaultOption, {
      scrollDataIndex: 0,
      pageButtonItemGap: 5,
      pageButtonGap: null,
      pageButtonPosition: "end",
      pageFormatter: "{current}/{total}",
      pageIcons: {
        horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
        vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
      },
      pageIconColor: "#2f4554",
      pageIconInactiveColor: "#aaa",
      pageIconSize: 15,
      pageTextStyle: {
        color: "#333"
      },
      animationDurationUpdate: 800
    }), e;
  }(kL)
);
function kY(t, e, n) {
  var r = t.getOrient(), i = [1, 1];
  i[r.index] = 0, Of(e, n, {
    type: "box",
    ignoreSize: !!i
  });
}
var LY = ct, FI = ["width", "height"], WI = ["x", "y"], Yct = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.newlineDisabled = !0, n._currentIndex = 0, n;
    }
    return e.prototype.init = function() {
      t.prototype.init.call(this), this.group.add(this._containerGroup = new LY()), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new LY());
    }, e.prototype.resetInner = function() {
      t.prototype.resetInner.call(this), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null;
    }, e.prototype.renderInner = function(n, r, i, a, o, s, l) {
      var u = this;
      t.prototype.renderInner.call(this, n, r, i, a, o, s, l);
      var c = this._controllerGroup, f = r.get("pageIconSize", !0), d = Se(f) ? f : [f, f];
      p("pagePrev", 0);
      var h = r.getModel("pageTextStyle");
      c.add(new jt({
        name: "pageText",
        style: {
          // Placeholder to calculate a proper layout.
          text: "xx/xx",
          fill: h.getTextColor(),
          font: h.getFont(),
          verticalAlign: "middle",
          align: "center"
        },
        silent: !0
      })), p("pageNext", 1);
      function p(v, g) {
        var m = v + "DataIndex", y = Sm(r.get("pageIcons", !0)[r.getOrient().name][g], {
          // Buttons will be created in each render, so we do not need
          // to worry about avoiding using legendModel kept in scope.
          onclick: We(u._pageGo, u, m, r, a)
        }, {
          x: -d[0] / 2,
          y: -d[1] / 2,
          width: d[0],
          height: d[1]
        });
        y.name = v, c.add(y);
      }
    }, e.prototype.layoutInner = function(n, r, i, a, o, s) {
      var l = this.getSelectorGroup(), u = n.getOrient().index, c = FI[u], f = WI[u], d = FI[1 - u], h = WI[1 - u];
      o && Th(
        // Buttons in selectorGroup always layout horizontally
        "horizontal",
        l,
        n.get("selectorItemGap", !0)
      );
      var p = n.get("selectorButtonGap", !0), v = l.getBoundingRect(), g = [-v.x, -v.y], m = ot(i);
      o && (m[c] = i[c] - v[c] - p);
      var y = this._layoutContentAndController(n, a, m, u, c, d, h, f);
      if (o) {
        if (s === "end")
          g[u] += y[c] + p;
        else {
          var _ = v[c] + p;
          g[u] -= _, y[f] -= _;
        }
        y[c] += v[c] + p, g[1 - u] += y[h] + y[d] / 2 - v[d] / 2, y[d] = Math.max(y[d], v[d]), y[h] = Math.min(y[h], v[h] + g[1 - u]), l.x = g[0], l.y = g[1], l.markRedraw();
      }
      return y;
    }, e.prototype._layoutContentAndController = function(n, r, i, a, o, s, l, u) {
      var c = this.getContentGroup(), f = this._containerGroup, d = this._controllerGroup;
      Th(n.get("orient"), c, n.get("itemGap"), a ? i.width : null, a ? null : i.height), Th(
        // Buttons in controller are layout always horizontally.
        "horizontal",
        d,
        n.get("pageButtonItemGap", !0)
      );
      var h = c.getBoundingRect(), p = d.getBoundingRect(), v = this._showController = h[o] > i[o], g = [-h.x, -h.y];
      r || (g[a] = c[u]);
      var m = [0, 0], y = [-p.x, -p.y], _ = dt(n.get("pageButtonGap", !0), n.get("itemGap", !0));
      if (v) {
        var O = n.get("pageButtonPosition", !0);
        O === "end" ? y[a] += i[o] - p[o] : m[a] += p[o] + _;
      }
      y[1 - a] += h[s] / 2 - p[s] / 2, c.setPosition(g), f.setPosition(m), d.setPosition(y);
      var S = {
        x: 0,
        y: 0
      };
      if (S[o] = v ? i[o] : h[o], S[s] = Math.max(h[s], p[s]), S[l] = Math.min(0, p[l] + y[1 - a]), f.__rectSize = i[o], v) {
        var x = {
          x: 0,
          y: 0
        };
        x[o] = Math.max(i[o] - p[o] - _, 0), x[s] = S[s], f.setClipPath(new Zt({
          shape: x
        })), f.__rectSize = x[o];
      } else
        d.eachChild(function(P) {
          P.attr({
            invisible: !0,
            silent: !0
          });
        });
      var C = this._getPageInfo(n);
      return C.pageIndex != null && tn(
        c,
        {
          x: C.contentPosition[0],
          y: C.contentPosition[1]
        },
        // When switch from "show controller" to "not show controller", view should be
        // updated immediately without animation, otherwise causes weird effect.
        v ? n : null
      ), this._updatePageInfoView(n, C), S;
    }, e.prototype._pageGo = function(n, r, i) {
      var a = this._getPageInfo(r)[n];
      a != null && i.dispatchAction({
        type: "legendScroll",
        scrollDataIndex: a,
        legendId: r.id
      });
    }, e.prototype._updatePageInfoView = function(n, r) {
      var i = this._controllerGroup;
      F(["pagePrev", "pageNext"], function(c) {
        var f = c + "DataIndex", d = r[f] != null, h = i.childOfName(c);
        h && (h.setStyle("fill", d ? n.get("pageIconColor", !0) : n.get("pageIconInactiveColor", !0)), h.cursor = d ? "pointer" : "default");
      });
      var a = i.childOfName("pageText"), o = n.get("pageFormatter"), s = r.pageIndex, l = s != null ? s + 1 : 0, u = r.pageCount;
      a && o && a.setStyle("text", Ve(o) ? o.replace("{current}", l == null ? "" : l + "").replace("{total}", u == null ? "" : u + "") : o({
        current: l,
        total: u
      }));
    }, e.prototype._getPageInfo = function(n) {
      var r = n.get("scrollDataIndex", !0), i = this.getContentGroup(), a = this._containerGroup.__rectSize, o = n.getOrient().index, s = FI[o], l = WI[o], u = this._findTargetItemIndex(r), c = i.children(), f = c[u], d = c.length, h = d ? 1 : 0, p = {
        contentPosition: [i.x, i.y],
        pageCount: h,
        pageIndex: h - 1,
        pagePrevDataIndex: null,
        pageNextDataIndex: null
      };
      if (!f)
        return p;
      var v = O(f);
      p.contentPosition[o] = -v.s;
      for (var g = u + 1, m = v, y = v, _ = null; g <= d; ++g)
        _ = O(c[g]), // Half of the last item is out of the window.
        (!_ && y.e > m.s + a || _ && !S(_, m.s)) && (y.i > m.i ? m = y : m = _, m && (p.pageNextDataIndex == null && (p.pageNextDataIndex = m.i), ++p.pageCount)), y = _;
      for (var g = u - 1, m = v, y = v, _ = null; g >= -1; --g)
        _ = O(c[g]), // If the the end item does not intersect with the window started
        // from the current item, a page can be settled.
        (!_ || !S(y, _.s)) && m.i < y.i && (y = m, p.pagePrevDataIndex == null && (p.pagePrevDataIndex = m.i), ++p.pageCount, ++p.pageIndex), m = _;
      return p;
      function O(x) {
        if (x) {
          var C = x.getBoundingRect(), P = C[l] + x[l];
          return {
            s: P,
            e: P + C[s],
            i: x.__legendDataIndex
          };
        }
      }
      function S(x, C) {
        return x.e >= C && x.s <= C + a;
      }
    }, e.prototype._findTargetItemIndex = function(n) {
      if (!this._showController)
        return 0;
      var r, i = this.getContentGroup(), a;
      return i.eachChild(function(o, s) {
        var l = o.__legendDataIndex;
        a == null && l != null && (a = s), l === n && (r = s);
      }), r ?? a;
    }, e.type = "legend.scroll", e;
  }(Che)
);
function qct(t) {
  t.registerAction("legendScroll", "legendscroll", function(e, n) {
    var r = e.scrollDataIndex;
    r != null && n.eachComponent({
      mainType: "legend",
      subType: "scroll",
      query: e
    }, function(i) {
      i.setScrollDataIndex(r);
    });
  });
}
function Kct(t) {
  Mt(Phe), t.registerComponentModel(Xct), t.registerComponentView(Yct), qct(t);
}
function Jct(t) {
  Mt(Phe), Mt(Kct);
}
var eft = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "dataZoom.inside", e.defaultOption = Bf(d_.defaultOption, {
      disabled: !1,
      zoomLock: !1,
      zoomOnMouseWheel: !0,
      moveOnMouseMove: !0,
      moveOnMouseWheel: !1,
      preventDefaultMouseMove: !0
    }), e;
  }(d_)
), E6 = Ut();
function tft(t, e, n) {
  E6(t).coordSysRecordMap.each(function(r) {
    var i = r.dataZoomInfoMap.get(e.uid);
    i && (i.getRange = n);
  });
}
function nft(t, e) {
  for (var n = E6(t).coordSysRecordMap, r = n.keys(), i = 0; i < r.length; i++) {
    var a = r[i], o = n.get(a), s = o.dataZoomInfoMap;
    if (s) {
      var l = e.uid, u = s.get(l);
      u && (s.removeKey(l), s.keys().length || $he(n, o));
    }
  }
}
function $he(t, e) {
  if (e) {
    t.removeKey(e.model.uid);
    var n = e.controller;
    n && n.dispose();
  }
}
function rft(t, e) {
  var n = {
    model: e,
    containsPoint: vt(aft, e),
    dispatchAction: vt(ift, t),
    dataZoomInfoMap: null,
    controller: null
  }, r = n.controller = new x1(t.getZr());
  return F(["pan", "zoom", "scrollMove"], function(i) {
    r.on(i, function(a) {
      var o = [];
      n.dataZoomInfoMap.each(function(s) {
        if (a.isAvailableBehavior(s.model.option)) {
          var l = (s.getRange || {})[i], u = l && l(s.dzReferCoordSysInfo, n.model.mainType, n.controller, a);
          !s.model.get("disabled", !0) && u && o.push({
            dataZoomId: s.model.id,
            start: u[0],
            end: u[1]
          });
        }
      }), o.length && n.dispatchAction(o);
    });
  }), n;
}
function ift(t, e) {
  t.isDisposed() || t.dispatchAction({
    type: "dataZoom",
    animation: {
      easing: "cubicOut",
      duration: 100
    },
    batch: e
  });
}
function aft(t, e, n, r) {
  return t.coordinateSystem.containPoint([n, r]);
}
function oft(t) {
  var e, n = "type_", r = {
    type_true: 2,
    type_move: 1,
    type_false: 0,
    type_undefined: -1
  }, i = !0;
  return t.each(function(a) {
    var o = a.model, s = o.get("disabled", !0) ? !1 : o.get("zoomLock", !0) ? "move" : !0;
    r[n + s] > r[n + e] && (e = s), i = i && o.get("preventDefaultMouseMove", !0);
  }), {
    controlType: e,
    opt: {
      // RoamController will enable all of these functionalities,
      // and the final behavior is determined by its event listener
      // provided by each inside zoom.
      zoomOnMouseWheel: !0,
      moveOnMouseMove: !0,
      moveOnMouseWheel: !0,
      preventDefaultMouseMove: !!i
    }
  };
}
function sft(t) {
  t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, function(e, n) {
    var r = E6(n), i = r.coordSysRecordMap || (r.coordSysRecordMap = Ze());
    i.each(function(a) {
      a.dataZoomInfoMap = null;
    }), e.eachComponent({
      mainType: "dataZoom",
      subType: "inside"
    }, function(a) {
      var o = che(a);
      F(o.infoList, function(s) {
        var l = s.model.uid, u = i.get(l) || i.set(l, rft(n, s.model)), c = u.dataZoomInfoMap || (u.dataZoomInfoMap = Ze());
        c.set(a.uid, {
          dzReferCoordSysInfo: s,
          model: a,
          getRange: null
        });
      });
    }), i.each(function(a) {
      var o = a.controller, s, l = a.dataZoomInfoMap;
      if (l) {
        var u = l.keys()[0];
        u != null && (s = l.get(u));
      }
      if (!s) {
        $he(i, a);
        return;
      }
      var c = oft(l);
      o.enable(c.controlType, c.opt), o.setPointerChecker(a.containsPoint), Am(a, "dispatchAction", s.model.get("throttle", !0), "fixRate");
    });
  });
}
var lft = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = "dataZoom.inside", n;
    }
    return e.prototype.render = function(n, r, i) {
      if (t.prototype.render.apply(this, arguments), n.noTarget()) {
        this._clear();
        return;
      }
      this.range = n.getPercentRange(), tft(i, n, {
        pan: We(QI.pan, this),
        zoom: We(QI.zoom, this),
        scrollMove: We(QI.scrollMove, this)
      });
    }, e.prototype.dispose = function() {
      this._clear(), t.prototype.dispose.apply(this, arguments);
    }, e.prototype._clear = function() {
      nft(this.api, this.dataZoomModel), this.range = null;
    }, e.type = "dataZoom.inside", e;
  }(O6)
), QI = {
  zoom: function(t, e, n, r) {
    var i = this.range, a = i.slice(), o = t.axisModels[0];
    if (o) {
      var s = HI[e](null, [r.originX, r.originY], o, n, t), l = (s.signal > 0 ? s.pixelStart + s.pixelLength - s.pixel : s.pixel - s.pixelStart) / s.pixelLength * (a[1] - a[0]) + a[0], u = Math.max(1 / r.scale, 0);
      a[0] = (a[0] - l) * u + l, a[1] = (a[1] - l) * u + l;
      var c = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
      if (_p(0, a, [0, 100], 0, c.minSpan, c.maxSpan), this.range = a, i[0] !== a[0] || i[1] !== a[1])
        return a;
    }
  },
  pan: NY(function(t, e, n, r, i, a) {
    var o = HI[r]([a.oldX, a.oldY], [a.newX, a.newY], e, i, n);
    return o.signal * (t[1] - t[0]) * o.pixel / o.pixelLength;
  }),
  scrollMove: NY(function(t, e, n, r, i, a) {
    var o = HI[r]([0, 0], [a.scrollDelta, a.scrollDelta], e, i, n);
    return o.signal * (t[1] - t[0]) * a.scrollDelta;
  })
};
function NY(t) {
  return function(e, n, r, i) {
    var a = this.range, o = a.slice(), s = e.axisModels[0];
    if (s) {
      var l = t(o, s, e, n, r, i);
      if (_p(l, o, [0, 100], "all"), this.range = o, a[0] !== o[0] || a[1] !== o[1])
        return o;
    }
  };
}
var HI = {
  grid: function(t, e, n, r, i) {
    var a = n.axis, o = {}, s = i.model.coordinateSystem.getRect();
    return t = t || [0, 0], a.dim === "x" ? (o.pixel = e[0] - t[0], o.pixelLength = s.width, o.pixelStart = s.x, o.signal = a.inverse ? 1 : -1) : (o.pixel = e[1] - t[1], o.pixelLength = s.height, o.pixelStart = s.y, o.signal = a.inverse ? -1 : 1), o;
  },
  polar: function(t, e, n, r, i) {
    var a = n.axis, o = {}, s = i.model.coordinateSystem, l = s.getRadiusAxis().getExtent(), u = s.getAngleAxis().getExtent();
    return t = t ? s.pointToCoord(t) : [0, 0], e = s.pointToCoord(e), n.mainType === "radiusAxis" ? (o.pixel = e[0] - t[0], o.pixelLength = l[1] - l[0], o.pixelStart = l[0], o.signal = a.inverse ? 1 : -1) : (o.pixel = e[1] - t[1], o.pixelLength = u[1] - u[0], o.pixelStart = u[0], o.signal = a.inverse ? -1 : 1), o;
  },
  singleAxis: function(t, e, n, r, i) {
    var a = n.axis, o = i.model.coordinateSystem.getRect(), s = {};
    return t = t || [0, 0], a.orient === "horizontal" ? (s.pixel = e[0] - t[0], s.pixelLength = o.width, s.pixelStart = o.x, s.signal = a.inverse ? 1 : -1) : (s.pixel = e[1] - t[1], s.pixelLength = o.height, s.pixelStart = o.y, s.signal = a.inverse ? -1 : 1), s;
  }
};
function Ahe(t) {
  S6(t), t.registerComponentModel(eft), t.registerComponentView(lft), sft(t);
}
var uft = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "dataZoom.slider", e.layoutMode = "box", e.defaultOption = Bf(d_.defaultOption, {
      show: !0,
      // deault value can only be drived in view stage.
      right: "ph",
      top: "ph",
      width: "ph",
      height: "ph",
      left: null,
      bottom: null,
      borderColor: "#d2dbee",
      borderRadius: 3,
      backgroundColor: "rgba(47,69,84,0)",
      // dataBackgroundColor: '#ddd',
      dataBackground: {
        lineStyle: {
          color: "#d2dbee",
          width: 0.5
        },
        areaStyle: {
          color: "#d2dbee",
          opacity: 0.2
        }
      },
      selectedDataBackground: {
        lineStyle: {
          color: "#8fb0f7",
          width: 0.5
        },
        areaStyle: {
          color: "#8fb0f7",
          opacity: 0.2
        }
      },
      // Color of selected window.
      fillerColor: "rgba(135,175,274,0.2)",
      handleIcon: "path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",
      // Percent of the slider height
      handleSize: "100%",
      handleStyle: {
        color: "#fff",
        borderColor: "#ACB8D1"
      },
      moveHandleSize: 7,
      moveHandleIcon: "path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",
      moveHandleStyle: {
        color: "#D2DBEE",
        opacity: 0.7
      },
      showDetail: !0,
      showDataShadow: "auto",
      realtime: !0,
      zoomLock: !1,
      textStyle: {
        color: "#6E7079"
      },
      brushSelect: !0,
      brushStyle: {
        color: "rgba(135,175,274,0.15)"
      },
      emphasis: {
        handleStyle: {
          borderColor: "#8FB0F7"
        },
        moveHandleStyle: {
          color: "#8FB0F7"
        }
      }
    }), e;
  }(d_)
), q0 = Zt, BY = 7, cft = 1, GI = 30, fft = 7, K0 = "horizontal", zY = "vertical", dft = 5, hft = ["line", "bar", "candlestick", "scatter"], pft = {
  easing: "cubicOut",
  duration: 100,
  delay: 0
}, vft = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._displayables = {}, n;
    }
    return e.prototype.init = function(n, r) {
      this.api = r, this._onBrush = We(this._onBrush, this), this._onBrushEnd = We(this._onBrushEnd, this);
    }, e.prototype.render = function(n, r, i, a) {
      if (t.prototype.render.apply(this, arguments), Am(this, "_dispatchZoomAction", n.get("throttle"), "fixRate"), this._orient = n.getOrient(), n.get("show") === !1) {
        this.group.removeAll();
        return;
      }
      if (n.noTarget()) {
        this._clear(), this.group.removeAll();
        return;
      }
      (!a || a.type !== "dataZoom" || a.from !== this.uid) && this._buildView(), this._updateView();
    }, e.prototype.dispose = function() {
      this._clear(), t.prototype.dispose.apply(this, arguments);
    }, e.prototype._clear = function() {
      Jb(this, "_dispatchZoomAction");
      var n = this.api.getZr();
      n.off("mousemove", this._onBrush), n.off("mouseup", this._onBrushEnd);
    }, e.prototype._buildView = function() {
      var n = this.group;
      n.removeAll(), this._brushing = !1, this._displayables.brushRect = null, this._resetLocation(), this._resetInterval();
      var r = this._displayables.sliderGroup = new ct();
      this._renderBackground(), this._renderHandle(), this._renderDataShadow(), n.add(r), this._positionGroup();
    }, e.prototype._resetLocation = function() {
      var n = this.dataZoomModel, r = this.api, i = n.get("brushSelect"), a = i ? fft : 0, o = this._findCoordRect(), s = {
        width: r.getWidth(),
        height: r.getHeight()
      }, l = this._orient === K0 ? {
        // Why using 'right', because right should be used in vertical,
        // and it is better to be consistent for dealing with position param merge.
        right: s.width - o.x - o.width,
        top: s.height - GI - BY - a,
        width: o.width,
        height: GI
      } : {
        right: BY,
        top: o.y,
        width: GI,
        height: o.height
      }, u = Tm(n.option);
      F(["right", "top", "width", "height"], function(f) {
        u[f] === "ph" && (u[f] = l[f]);
      });
      var c = Mr(u, s);
      this._location = {
        x: c.x,
        y: c.y
      }, this._size = [c.width, c.height], this._orient === zY && this._size.reverse();
    }, e.prototype._positionGroup = function() {
      var n = this.group, r = this._location, i = this._orient, a = this.dataZoomModel.getFirstTargetAxisModel(), o = a && a.get("inverse"), s = this._displayables.sliderGroup, l = (this._dataShadowInfo || {}).otherAxisInverse;
      s.attr(i === K0 && !o ? {
        scaleY: l ? 1 : -1,
        scaleX: 1
      } : i === K0 && o ? {
        scaleY: l ? 1 : -1,
        scaleX: -1
      } : i === zY && !o ? {
        scaleY: l ? -1 : 1,
        scaleX: 1,
        rotation: Math.PI / 2
      } : {
        scaleY: l ? -1 : 1,
        scaleX: -1,
        rotation: Math.PI / 2
      });
      var u = n.getBoundingRect([s]);
      n.x = r.x - u.x, n.y = r.y - u.y, n.markRedraw();
    }, e.prototype._getViewExtent = function() {
      return [0, this._size[0]];
    }, e.prototype._renderBackground = function() {
      var n = this.dataZoomModel, r = this._size, i = this._displayables.sliderGroup, a = n.get("brushSelect");
      i.add(new q0({
        silent: !0,
        shape: {
          x: 0,
          y: 0,
          width: r[0],
          height: r[1]
        },
        style: {
          fill: n.get("backgroundColor")
        },
        z2: -40
      }));
      var o = new q0({
        shape: {
          x: 0,
          y: 0,
          width: r[0],
          height: r[1]
        },
        style: {
          fill: "transparent"
        },
        z2: 0,
        onclick: We(this._onClickPanel, this)
      }), s = this.api.getZr();
      a ? (o.on("mousedown", this._onBrushStart, this), o.cursor = "crosshair", s.on("mousemove", this._onBrush), s.on("mouseup", this._onBrushEnd)) : (s.off("mousemove", this._onBrush), s.off("mouseup", this._onBrushEnd)), i.add(o);
    }, e.prototype._renderDataShadow = function() {
      var n = this._dataShadowInfo = this._prepareDataShadowInfo();
      if (this._displayables.dataShadowSegs = [], !n)
        return;
      var r = this._size, i = this._shadowSize || [], a = n.series, o = a.getRawData(), s = a.getShadowDim && a.getShadowDim(), l = s && o.getDimensionInfo(s) ? a.getShadowDim() : n.otherDim;
      if (l == null)
        return;
      var u = this._shadowPolygonPts, c = this._shadowPolylinePts;
      if (o !== this._shadowData || l !== this._shadowDim || r[0] !== i[0] || r[1] !== i[1]) {
        var f = o.getDataExtent(l), d = (f[1] - f[0]) * 0.3;
        f = [f[0] - d, f[1] + d];
        var h = [0, r[1]], p = [0, r[0]], v = [[r[0], 0], [0, 0]], g = [], m = p[1] / (o.count() - 1), y = 0, _ = Math.round(o.count() / r[0]), O;
        o.each([l], function($, T) {
          if (_ > 0 && T % _) {
            y += m;
            return;
          }
          var E = $ == null || isNaN($) || $ === "", M = E ? 0 : gn($, f, h, !0);
          E && !O && T ? (v.push([v[v.length - 1][0], 0]), g.push([g[g.length - 1][0], 0])) : !E && O && (v.push([y, 0]), g.push([y, 0])), v.push([y, M]), g.push([y, M]), y += m, O = E;
        }), u = this._shadowPolygonPts = v, c = this._shadowPolylinePts = g;
      }
      this._shadowData = o, this._shadowDim = l, this._shadowSize = [r[0], r[1]];
      var S = this.dataZoomModel;
      function x($) {
        var T = S.getModel($ ? "selectedDataBackground" : "dataBackground"), E = new ct(), M = new pa({
          shape: {
            points: u
          },
          segmentIgnoreThreshold: 1,
          style: T.getModel("areaStyle").getAreaStyle(),
          silent: !0,
          z2: -20
        }), R = new va({
          shape: {
            points: c
          },
          segmentIgnoreThreshold: 1,
          style: T.getModel("lineStyle").getLineStyle(),
          silent: !0,
          z2: -19
        });
        return E.add(M), E.add(R), E;
      }
      for (var C = 0; C < 3; C++) {
        var P = x(C === 1);
        this._displayables.sliderGroup.add(P), this._displayables.dataShadowSegs.push(P);
      }
    }, e.prototype._prepareDataShadowInfo = function() {
      var n = this.dataZoomModel, r = n.get("showDataShadow");
      if (r !== !1) {
        var i, a = this.ecModel;
        return n.eachTargetAxis(function(o, s) {
          var l = n.getAxisProxy(o, s).getTargetSeriesModels();
          F(l, function(u) {
            if (!i && !(r !== !0 && St(hft, u.get("type")) < 0)) {
              var c = a.getComponent(Uc(o), s).axis, f = gft(o), d, h = u.coordinateSystem;
              f != null && h.getOtherAxis && (d = h.getOtherAxis(c).inverse), f = u.getData().mapDimension(f), i = {
                thisAxis: c,
                series: u,
                thisDim: o,
                otherDim: f,
                otherAxisInverse: d
              };
            }
          }, this);
        }, this), i;
      }
    }, e.prototype._renderHandle = function() {
      var n = this.group, r = this._displayables, i = r.handles = [null, null], a = r.handleLabels = [null, null], o = this._displayables.sliderGroup, s = this._size, l = this.dataZoomModel, u = this.api, c = l.get("borderRadius") || 0, f = l.get("brushSelect"), d = r.filler = new q0({
        silent: f,
        style: {
          fill: l.get("fillerColor")
        },
        textConfig: {
          position: "inside"
        }
      });
      o.add(d), o.add(new q0({
        silent: !0,
        subPixelOptimize: !0,
        shape: {
          x: 0,
          y: 0,
          width: s[0],
          height: s[1],
          r: c
        },
        style: {
          // deprecated option
          stroke: l.get("dataBackgroundColor") || l.get("borderColor"),
          lineWidth: cft,
          fill: "rgba(0,0,0,0)"
        }
      })), F([0, 1], function(_) {
        var O = l.get("handleIcon");
        !WC[O] && O.indexOf("path://") < 0 && O.indexOf("image://") < 0 && (O = "path://" + O, process.env.NODE_ENV !== "production" && ss("handleIcon now needs 'path://' prefix when using a path string"));
        var S = Sr(O, -1, 0, 2, 2, null, !0);
        S.attr({
          cursor: VY(this._orient),
          draggable: !0,
          drift: We(this._onDragMove, this, _),
          ondragend: We(this._onDragEnd, this),
          onmouseover: We(this._showDataInfo, this, !0),
          onmouseout: We(this._showDataInfo, this, !1),
          z2: 5
        });
        var x = S.getBoundingRect(), C = l.get("handleSize");
        this._handleHeight = ze(C, this._size[1]), this._handleWidth = x.width / x.height * this._handleHeight, S.setStyle(l.getModel("handleStyle").getItemStyle()), S.style.strokeNoScale = !0, S.rectHover = !0, S.ensureState("emphasis").style = l.getModel(["emphasis", "handleStyle"]).getItemStyle(), af(S);
        var P = l.get("handleColor");
        P != null && (S.style.fill = P), o.add(i[_] = S);
        var $ = l.getModel("textStyle");
        n.add(a[_] = new jt({
          silent: !0,
          invisible: !0,
          style: Mn($, {
            x: 0,
            y: 0,
            text: "",
            verticalAlign: "middle",
            align: "center",
            fill: $.getTextColor(),
            font: $.getFont()
          }),
          z2: 10
        }));
      }, this);
      var h = d;
      if (f) {
        var p = ze(l.get("moveHandleSize"), s[1]), v = r.moveHandle = new Zt({
          style: l.getModel("moveHandleStyle").getItemStyle(),
          silent: !0,
          shape: {
            r: [0, 0, 2, 2],
            y: s[1] - 0.5,
            height: p
          }
        }), g = p * 0.8, m = r.moveHandleIcon = Sr(l.get("moveHandleIcon"), -g / 2, -g / 2, g, g, "#fff", !0);
        m.silent = !0, m.y = s[1] + p / 2 - 0.5, v.ensureState("emphasis").style = l.getModel(["emphasis", "moveHandleStyle"]).getItemStyle();
        var y = Math.min(s[1] / 2, Math.max(p, 10));
        h = r.moveZone = new Zt({
          invisible: !0,
          shape: {
            y: s[1] - y,
            height: p + y
          }
        }), h.on("mouseover", function() {
          u.enterEmphasis(v);
        }).on("mouseout", function() {
          u.leaveEmphasis(v);
        }), o.add(v), o.add(m), o.add(h);
      }
      h.attr({
        draggable: !0,
        cursor: VY(this._orient),
        drift: We(this._onDragMove, this, "all"),
        ondragstart: We(this._showDataInfo, this, !0),
        ondragend: We(this._onDragEnd, this),
        onmouseover: We(this._showDataInfo, this, !0),
        onmouseout: We(this._showDataInfo, this, !1)
      });
    }, e.prototype._resetInterval = function() {
      var n = this._range = this.dataZoomModel.getPercentRange(), r = this._getViewExtent();
      this._handleEnds = [gn(n[0], [0, 100], r, !0), gn(n[1], [0, 100], r, !0)];
    }, e.prototype._updateInterval = function(n, r) {
      var i = this.dataZoomModel, a = this._handleEnds, o = this._getViewExtent(), s = i.findRepresentativeAxisProxy().getMinMaxSpan(), l = [0, 100];
      _p(r, a, o, i.get("zoomLock") ? "all" : n, s.minSpan != null ? gn(s.minSpan, l, o, !0) : null, s.maxSpan != null ? gn(s.maxSpan, l, o, !0) : null);
      var u = this._range, c = this._range = ao([gn(a[0], o, l, !0), gn(a[1], o, l, !0)]);
      return !u || u[0] !== c[0] || u[1] !== c[1];
    }, e.prototype._updateView = function(n) {
      var r = this._displayables, i = this._handleEnds, a = ao(i.slice()), o = this._size;
      F([0, 1], function(h) {
        var p = r.handles[h], v = this._handleHeight;
        p.attr({
          scaleX: v / 2,
          scaleY: v / 2,
          // This is a trick, by adding an extra tiny offset to let the default handle's end point align to the drag window.
          // NOTE: It may affect some custom shapes a bit. But we prefer to have better result by default.
          x: i[h] + (h ? -1 : 1),
          y: o[1] / 2 - v / 2
        });
      }, this), r.filler.setShape({
        x: a[0],
        y: 0,
        width: a[1] - a[0],
        height: o[1]
      });
      var s = {
        x: a[0],
        width: a[1] - a[0]
      };
      r.moveHandle && (r.moveHandle.setShape(s), r.moveZone.setShape(s), r.moveZone.getBoundingRect(), r.moveHandleIcon && r.moveHandleIcon.attr("x", s.x + s.width / 2));
      for (var l = r.dataShadowSegs, u = [0, a[0], a[1], o[0]], c = 0; c < l.length; c++) {
        var f = l[c], d = f.getClipPath();
        d || (d = new Zt(), f.setClipPath(d)), d.setShape({
          x: u[c],
          y: 0,
          width: u[c + 1] - u[c],
          height: o[1]
        });
      }
      this._updateDataInfo(n);
    }, e.prototype._updateDataInfo = function(n) {
      var r = this.dataZoomModel, i = this._displayables, a = i.handleLabels, o = this._orient, s = ["", ""];
      if (r.get("showDetail")) {
        var l = r.findRepresentativeAxisProxy();
        if (l) {
          var u = l.getAxisModel().axis, c = this._range, f = n ? l.calculateDataWindow({
            start: c[0],
            end: c[1]
          }).valueWindow : l.getDataValueWindow();
          s = [this._formatLabel(f[0], u), this._formatLabel(f[1], u)];
        }
      }
      var d = ao(this._handleEnds.slice());
      h.call(this, 0), h.call(this, 1);
      function h(p) {
        var v = of(i.handles[p].parent, this.group), g = CP(p === 0 ? "right" : "left", v), m = this._handleWidth / 2 + dft, y = zs([d[p] + (p === 0 ? -m : m), this._size[1] / 2], v);
        a[p].setStyle({
          x: y[0],
          y: y[1],
          verticalAlign: o === K0 ? "middle" : g,
          align: o === K0 ? g : "center",
          text: s[p]
        });
      }
    }, e.prototype._formatLabel = function(n, r) {
      var i = this.dataZoomModel, a = i.get("labelFormatter"), o = i.get("labelPrecision");
      (o == null || o === "auto") && (o = r.getPixelPrecision());
      var s = n == null || isNaN(n) ? "" : r.type === "category" || r.type === "time" ? r.scale.getLabel({
        value: Math.round(n)
      }) : n.toFixed(Math.min(o, 20));
      return qe(a) ? a(n, s) : Ve(a) ? a.replace("{value}", s) : s;
    }, e.prototype._showDataInfo = function(n) {
      n = this._dragging || n;
      var r = this._displayables, i = r.handleLabels;
      i[0].attr("invisible", !n), i[1].attr("invisible", !n), r.moveHandle && this.api[n ? "enterEmphasis" : "leaveEmphasis"](r.moveHandle, 1);
    }, e.prototype._onDragMove = function(n, r, i, a) {
      this._dragging = !0, Vu(a.event);
      var o = this._displayables.sliderGroup.getLocalTransform(), s = zs([r, i], o, !0), l = this._updateInterval(n, s[0]), u = this.dataZoomModel.get("realtime");
      this._updateView(!u), l && u && this._dispatchZoomAction(!0);
    }, e.prototype._onDragEnd = function() {
      this._dragging = !1, this._showDataInfo(!1);
      var n = this.dataZoomModel.get("realtime");
      !n && this._dispatchZoomAction(!1);
    }, e.prototype._onClickPanel = function(n) {
      var r = this._size, i = this._displayables.sliderGroup.transformCoordToLocal(n.offsetX, n.offsetY);
      if (!(i[0] < 0 || i[0] > r[0] || i[1] < 0 || i[1] > r[1])) {
        var a = this._handleEnds, o = (a[0] + a[1]) / 2, s = this._updateInterval("all", i[0] - o);
        this._updateView(), s && this._dispatchZoomAction(!1);
      }
    }, e.prototype._onBrushStart = function(n) {
      var r = n.offsetX, i = n.offsetY;
      this._brushStart = new yt(r, i), this._brushing = !0, this._brushStartTime = +/* @__PURE__ */ new Date();
    }, e.prototype._onBrushEnd = function(n) {
      if (this._brushing) {
        var r = this._displayables.brushRect;
        if (this._brushing = !1, !!r) {
          r.attr("ignore", !0);
          var i = r.shape, a = +/* @__PURE__ */ new Date();
          if (!(a - this._brushStartTime < 200 && Math.abs(i.width) < 5)) {
            var o = this._getViewExtent(), s = [0, 100];
            this._range = ao([gn(i.x, o, s, !0), gn(i.x + i.width, o, s, !0)]), this._handleEnds = [i.x, i.x + i.width], this._updateView(), this._dispatchZoomAction(!1);
          }
        }
      }
    }, e.prototype._onBrush = function(n) {
      this._brushing && (Vu(n.event), this._updateBrushRect(n.offsetX, n.offsetY));
    }, e.prototype._updateBrushRect = function(n, r) {
      var i = this._displayables, a = this.dataZoomModel, o = i.brushRect;
      o || (o = i.brushRect = new q0({
        silent: !0,
        style: a.getModel("brushStyle").getItemStyle()
      }), i.sliderGroup.add(o)), o.attr("ignore", !1);
      var s = this._brushStart, l = this._displayables.sliderGroup, u = l.transformCoordToLocal(n, r), c = l.transformCoordToLocal(s.x, s.y), f = this._size;
      u[0] = Math.max(Math.min(f[0], u[0]), 0), o.setShape({
        x: c[0],
        y: 0,
        width: u[0] - c[0],
        height: f[1]
      });
    }, e.prototype._dispatchZoomAction = function(n) {
      var r = this._range;
      this.api.dispatchAction({
        type: "dataZoom",
        from: this.uid,
        dataZoomId: this.dataZoomModel.id,
        animation: n ? pft : null,
        start: r[0],
        end: r[1]
      });
    }, e.prototype._findCoordRect = function() {
      var n, r = che(this.dataZoomModel).infoList;
      if (!n && r.length) {
        var i = r[0].model.coordinateSystem;
        n = i.getRect && i.getRect();
      }
      if (!n) {
        var a = this.api.getWidth(), o = this.api.getHeight();
        n = {
          x: a * 0.2,
          y: o * 0.2,
          width: a * 0.6,
          height: o * 0.6
        };
      }
      return n;
    }, e.type = "dataZoom.slider", e;
  }(O6)
);
function gft(t) {
  var e = {
    x: "y",
    y: "x",
    radius: "angle",
    angle: "radius"
  };
  return e[t];
}
function VY(t) {
  return t === "vertical" ? "ns-resize" : "ew-resize";
}
function Ehe(t) {
  t.registerComponentModel(uft), t.registerComponentView(vft), S6(t);
}
function mft(t) {
  Mt(Ahe), Mt(Ehe);
}
var Mhe = {
  /**
   * @public
   */
  get: function(t, e, n) {
    var r = ot((yft[t] || {})[e]);
    return n && Se(r) ? r[r.length - 1] : r;
  }
}, yft = {
  color: {
    active: ["#006edd", "#e0ffff"],
    inactive: ["rgba(0,0,0,0)"]
  },
  colorHue: {
    active: [0, 360],
    inactive: [0, 0]
  },
  colorSaturation: {
    active: [0.3, 1],
    inactive: [0, 0]
  },
  colorLightness: {
    active: [0.9, 0.5],
    inactive: [0, 0]
  },
  colorAlpha: {
    active: [0.3, 1],
    inactive: [0, 0]
  },
  opacity: {
    active: [0.3, 1],
    inactive: [0, 0]
  },
  symbol: {
    active: ["circle", "roundRect", "diamond"],
    inactive: ["none"]
  },
  symbolSize: {
    active: [10, 50],
    inactive: [0, 0]
  }
}, FY = Kr.mapVisual, bft = Kr.eachVisual, _ft = Se, WY = F, Oft = ao, Sft = gn, mT = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.stateList = ["inRange", "outOfRange"], n.replacableOptionKeys = ["inRange", "outOfRange", "target", "controller", "color"], n.layoutMode = {
        type: "box",
        ignoreSize: !0
      }, n.dataBound = [-1 / 0, 1 / 0], n.targetVisuals = {}, n.controllerVisuals = {}, n;
    }
    return e.prototype.init = function(n, r, i) {
      this.mergeDefaultAndTheme(n, i);
    }, e.prototype.optionUpdated = function(n, r) {
      var i = this.option;
      !r && _he(i, n, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption();
    }, e.prototype.resetVisual = function(n) {
      var r = this.stateList;
      n = We(n, this), this.controllerVisuals = IL(this.option.controller, r, n), this.targetVisuals = IL(this.option.target, r, n);
    }, e.prototype.getItemSymbol = function() {
      return null;
    }, e.prototype.getTargetSeriesIndices = function() {
      var n = this.option.seriesIndex, r = [];
      return n == null || n === "all" ? this.ecModel.eachSeries(function(i, a) {
        r.push(a);
      }) : r = wn(n), r;
    }, e.prototype.eachTargetSeries = function(n, r) {
      F(this.getTargetSeriesIndices(), function(i) {
        var a = this.ecModel.getSeriesByIndex(i);
        a && n.call(r, a);
      }, this);
    }, e.prototype.isTargetSeries = function(n) {
      var r = !1;
      return this.eachTargetSeries(function(i) {
        i === n && (r = !0);
      }), r;
    }, e.prototype.formatValueText = function(n, r, i) {
      var a = this.option, o = a.precision, s = this.dataBound, l = a.formatter, u;
      i = i || ["<", ">"], Se(n) && (n = n.slice(), u = !0);
      var c = r ? n : u ? [f(n[0]), f(n[1])] : f(n);
      if (Ve(l))
        return l.replace("{value}", u ? c[0] : c).replace("{value2}", u ? c[1] : c);
      if (qe(l))
        return u ? l(n[0], n[1]) : l(n);
      if (u)
        return n[0] === s[0] ? i[0] + " " + c[1] : n[1] === s[1] ? i[1] + " " + c[0] : c[0] + " - " + c[1];
      return c;
      function f(d) {
        return d === s[0] ? "min" : d === s[1] ? "max" : (+d).toFixed(Math.min(o, 20));
      }
    }, e.prototype.resetExtent = function() {
      var n = this.option, r = Oft([n.min, n.max]);
      this._dataExtent = r;
    }, e.prototype.getDataDimensionIndex = function(n) {
      var r = this.option.dimension;
      if (r != null)
        return n.getDimensionIndex(r);
      for (var i = n.dimensions, a = i.length - 1; a >= 0; a--) {
        var o = i[a], s = n.getDimensionInfo(o);
        if (!s.isCalculationCoord)
          return s.storeDimIndex;
      }
    }, e.prototype.getExtent = function() {
      return this._dataExtent.slice();
    }, e.prototype.completeVisualOption = function() {
      var n = this.ecModel, r = this.option, i = {
        inRange: r.inRange,
        outOfRange: r.outOfRange
      }, a = r.target || (r.target = {}), o = r.controller || (r.controller = {});
      mt(a, i), mt(o, i);
      var s = this.isCategory();
      l.call(this, a), l.call(this, o), u.call(this, a, "inRange", "outOfRange"), c.call(this, o);
      function l(f) {
        _ft(r.color) && !f.inRange && (f.inRange = {
          color: r.color.slice().reverse()
        }), f.inRange = f.inRange || {
          color: n.get("gradientColor")
        };
      }
      function u(f, d, h) {
        var p = f[d], v = f[h];
        p && !v && (v = f[h] = {}, WY(p, function(g, m) {
          if (Kr.isValidType(m)) {
            var y = Mhe.get(m, "inactive", s);
            y != null && (v[m] = y, m === "color" && !v.hasOwnProperty("opacity") && !v.hasOwnProperty("colorAlpha") && (v.opacity = [0, 0]));
          }
        }));
      }
      function c(f) {
        var d = (f.inRange || {}).symbol || (f.outOfRange || {}).symbol, h = (f.inRange || {}).symbolSize || (f.outOfRange || {}).symbolSize, p = this.get("inactiveColor"), v = this.getItemSymbol(), g = v || "roundRect";
        WY(this.stateList, function(m) {
          var y = this.itemSize, _ = f[m];
          _ || (_ = f[m] = {
            color: s ? p : [p]
          }), _.symbol == null && (_.symbol = d && ot(d) || (s ? g : [g])), _.symbolSize == null && (_.symbolSize = h && ot(h) || (s ? y[0] : [y[0], y[0]])), _.symbol = FY(_.symbol, function(x) {
            return x === "none" ? g : x;
          });
          var O = _.symbolSize;
          if (O != null) {
            var S = -1 / 0;
            bft(O, function(x) {
              x > S && (S = x);
            }), _.symbolSize = FY(O, function(x) {
              return Sft(x, [0, S], [0, y[0]], !0);
            });
          }
        }, this);
      }
    }, e.prototype.resetItemSize = function() {
      this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))];
    }, e.prototype.isCategory = function() {
      return !!this.option.categories;
    }, e.prototype.setSelected = function(n) {
    }, e.prototype.getSelected = function() {
      return null;
    }, e.prototype.getValueState = function(n) {
      return null;
    }, e.prototype.getVisualMeta = function(n) {
      return null;
    }, e.type = "visualMap", e.dependencies = ["series"], e.defaultOption = {
      show: !0,
      // zlevel: 0,
      z: 4,
      seriesIndex: "all",
      min: 0,
      max: 200,
      left: 0,
      right: null,
      top: null,
      bottom: 0,
      itemWidth: null,
      itemHeight: null,
      inverse: !1,
      orient: "vertical",
      backgroundColor: "rgba(0,0,0,0)",
      borderColor: "#ccc",
      contentColor: "#5793f3",
      inactiveColor: "#aaa",
      borderWidth: 0,
      padding: 5,
      // 接受数组分别设定上右下左边距，同css
      textGap: 10,
      precision: 0,
      textStyle: {
        color: "#333"
        // 值域文字颜色
      }
    }, e;
  }(At)
), QY = [20, 140], xft = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.optionUpdated = function(n, r) {
      t.prototype.optionUpdated.apply(this, arguments), this.resetExtent(), this.resetVisual(function(i) {
        i.mappingMethod = "linear", i.dataExtent = this.getExtent();
      }), this._resetRange();
    }, e.prototype.resetItemSize = function() {
      t.prototype.resetItemSize.apply(this, arguments);
      var n = this.itemSize;
      (n[0] == null || isNaN(n[0])) && (n[0] = QY[0]), (n[1] == null || isNaN(n[1])) && (n[1] = QY[1]);
    }, e.prototype._resetRange = function() {
      var n = this.getExtent(), r = this.option.range;
      !r || r.auto ? (n.auto = 1, this.option.range = n) : Se(r) && (r[0] > r[1] && r.reverse(), r[0] = Math.max(r[0], n[0]), r[1] = Math.min(r[1], n[1]));
    }, e.prototype.completeVisualOption = function() {
      t.prototype.completeVisualOption.apply(this, arguments), F(this.stateList, function(n) {
        var r = this.option.controller[n].symbolSize;
        r && r[0] !== r[1] && (r[0] = r[1] / 3);
      }, this);
    }, e.prototype.setSelected = function(n) {
      this.option.range = n.slice(), this._resetRange();
    }, e.prototype.getSelected = function() {
      var n = this.getExtent(), r = ao((this.get("range") || []).slice());
      return r[0] > n[1] && (r[0] = n[1]), r[1] > n[1] && (r[1] = n[1]), r[0] < n[0] && (r[0] = n[0]), r[1] < n[0] && (r[1] = n[0]), r;
    }, e.prototype.getValueState = function(n) {
      var r = this.option.range, i = this.getExtent();
      return (r[0] <= i[0] || r[0] <= n) && (r[1] >= i[1] || n <= r[1]) ? "inRange" : "outOfRange";
    }, e.prototype.findTargetDataIndices = function(n) {
      var r = [];
      return this.eachTargetSeries(function(i) {
        var a = [], o = i.getData();
        o.each(this.getDataDimensionIndex(o), function(s, l) {
          n[0] <= s && s <= n[1] && a.push(l);
        }, this), r.push({
          seriesId: i.id,
          dataIndex: a
        });
      }, this), r;
    }, e.prototype.getVisualMeta = function(n) {
      var r = HY(this, "outOfRange", this.getExtent()), i = HY(this, "inRange", this.option.range.slice()), a = [];
      function o(h, p) {
        a.push({
          value: h,
          color: n(h, p)
        });
      }
      for (var s = 0, l = 0, u = i.length, c = r.length; l < c && (!i.length || r[l] <= i[0]); l++)
        r[l] < i[s] && o(r[l], "outOfRange");
      for (var f = 1; s < u; s++, f = 0)
        f && a.length && o(i[s], "outOfRange"), o(i[s], "inRange");
      for (var f = 1; l < c; l++)
        (!i.length || i[i.length - 1] < r[l]) && (f && (a.length && o(a[a.length - 1].value, "outOfRange"), f = 0), o(r[l], "outOfRange"));
      var d = a.length;
      return {
        stops: a,
        outerColors: [d ? a[0].color : "transparent", d ? a[d - 1].color : "transparent"]
      };
    }, e.type = "visualMap.continuous", e.defaultOption = Bf(mT.defaultOption, {
      align: "auto",
      calculable: !1,
      hoverLink: !0,
      realtime: !0,
      handleIcon: "path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",
      handleSize: "120%",
      handleStyle: {
        borderColor: "#fff",
        borderWidth: 1
      },
      indicatorIcon: "circle",
      indicatorSize: "50%",
      indicatorStyle: {
        borderColor: "#fff",
        borderWidth: 2,
        shadowBlur: 2,
        shadowOffsetX: 1,
        shadowOffsetY: 1,
        shadowColor: "rgba(0,0,0,0.2)"
      }
      // emphasis: {
      //     handleStyle: {
      //         shadowBlur: 3,
      //         shadowOffsetX: 1,
      //         shadowOffsetY: 1,
      //         shadowColor: 'rgba(0,0,0,0.2)'
      //     }
      // }
    }), e;
  }(mT)
);
function HY(t, e, n) {
  if (n[0] === n[1])
    return n.slice();
  for (var r = 200, i = (n[1] - n[0]) / r, a = n[0], o = [], s = 0; s <= r && a < n[1]; s++)
    o.push(a), a += i;
  return o.push(n[1]), o;
}
var Ihe = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.autoPositionValues = {
        left: 1,
        right: 1,
        top: 1,
        bottom: 1
      }, n;
    }
    return e.prototype.init = function(n, r) {
      this.ecModel = n, this.api = r;
    }, e.prototype.render = function(n, r, i, a) {
      if (this.visualMapModel = n, n.get("show") === !1) {
        this.group.removeAll();
        return;
      }
      this.doRender(n, r, i, a);
    }, e.prototype.renderBackground = function(n) {
      var r = this.visualMapModel, i = vp(r.get("padding") || 0), a = n.getBoundingRect();
      n.add(new Zt({
        z2: -1,
        silent: !0,
        shape: {
          x: a.x - i[3],
          y: a.y - i[0],
          width: a.width + i[3] + i[1],
          height: a.height + i[0] + i[2]
        },
        style: {
          fill: r.get("backgroundColor"),
          stroke: r.get("borderColor"),
          lineWidth: r.get("borderWidth")
        }
      }));
    }, e.prototype.getControllerVisual = function(n, r, i) {
      i = i || {};
      var a = i.forceState, o = this.visualMapModel, s = {};
      if (r === "color") {
        var l = o.get("contentColor");
        s.color = l;
      }
      function u(h) {
        return s[h];
      }
      function c(h, p) {
        s[h] = p;
      }
      var f = o.controllerVisuals[a || o.getValueState(n)], d = Kr.prepareVisualTypes(f);
      return F(d, function(h) {
        var p = f[h];
        i.convertOpacityToAlpha && h === "opacity" && (h = "colorAlpha", p = f.__alphaForOpacity), Kr.dependsOn(h, r) && p && p.applyVisual(n, u, c);
      }), s[r];
    }, e.prototype.positionGroup = function(n) {
      var r = this.visualMapModel, i = this.api;
      MP(n, r.getBoxLayoutParams(), {
        width: i.getWidth(),
        height: i.getHeight()
      });
    }, e.prototype.doRender = function(n, r, i, a) {
    }, e.type = "visualMap", e;
  }(Ln)
), GY = [["left", "right", "width"], ["top", "bottom", "height"]];
function Dhe(t, e, n) {
  var r = t.option, i = r.align;
  if (i != null && i !== "auto")
    return i;
  for (var a = {
    width: e.getWidth(),
    height: e.getHeight()
  }, o = r.orient === "horizontal" ? 1 : 0, s = GY[o], l = [0, null, 10], u = {}, c = 0; c < 3; c++)
    u[GY[1 - o][c]] = l[c], u[s[c]] = c === 2 ? n[0] : r[s[c]];
  var f = [["x", "width", 3], ["y", "height", 0]][o], d = Mr(u, a, r.padding);
  return s[(d.margin[f[2]] || 0) + d[f[0]] + d[f[1]] * 0.5 < a[f[1]] * 0.5 ? 0 : 1];
}
function Sw(t, e) {
  return F(t || [], function(n) {
    n.dataIndex != null && (n.dataIndexInside = n.dataIndex, n.dataIndex = null), n.highlightKey = "visualMap" + (e ? e.componentIndex : "");
  }), t;
}
var ml = gn, wft = F, jY = Math.min, jI = Math.max, Cft = 12, Tft = 6, Pft = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._shapes = {}, n._dataInterval = [], n._handleEnds = [], n._hoverLinkDataIndices = [], n;
    }
    return e.prototype.init = function(n, r) {
      t.prototype.init.call(this, n, r), this._hoverLinkFromSeriesMouseOver = We(this._hoverLinkFromSeriesMouseOver, this), this._hideIndicator = We(this._hideIndicator, this);
    }, e.prototype.doRender = function(n, r, i, a) {
      (!a || a.type !== "selectDataRange" || a.from !== this.uid) && this._buildView();
    }, e.prototype._buildView = function() {
      this.group.removeAll();
      var n = this.visualMapModel, r = this.group;
      this._orient = n.get("orient"), this._useHandle = n.get("calculable"), this._resetInterval(), this._renderBar(r);
      var i = n.get("text");
      this._renderEndsText(r, i, 0), this._renderEndsText(r, i, 1), this._updateView(!0), this.renderBackground(r), this._updateView(), this._enableHoverLinkToSeries(), this._enableHoverLinkFromSeries(), this.positionGroup(r);
    }, e.prototype._renderEndsText = function(n, r, i) {
      if (r) {
        var a = r[1 - i];
        a = a != null ? a + "" : "";
        var o = this.visualMapModel, s = o.get("textGap"), l = o.itemSize, u = this._shapes.mainGroup, c = this._applyTransform([l[0] / 2, i === 0 ? -s : l[1] + s], u), f = this._applyTransform(i === 0 ? "bottom" : "top", u), d = this._orient, h = this.visualMapModel.textStyleModel;
        this.group.add(new jt({
          style: Mn(h, {
            x: c[0],
            y: c[1],
            verticalAlign: d === "horizontal" ? "middle" : f,
            align: d === "horizontal" ? f : "center",
            text: a
          })
        }));
      }
    }, e.prototype._renderBar = function(n) {
      var r = this.visualMapModel, i = this._shapes, a = r.itemSize, o = this._orient, s = this._useHandle, l = Dhe(r, this.api, a), u = i.mainGroup = this._createBarGroup(l), c = new ct();
      u.add(c), c.add(i.outOfRange = ZY()), c.add(i.inRange = ZY(null, s ? XY(this._orient) : null, We(this._dragHandle, this, "all", !1), We(this._dragHandle, this, "all", !0))), c.setClipPath(new Zt({
        shape: {
          x: 0,
          y: 0,
          width: a[0],
          height: a[1],
          r: 3
        }
      }));
      var f = r.textStyleModel.getTextRect("国"), d = jI(f.width, f.height);
      s && (i.handleThumbs = [], i.handleLabels = [], i.handleLabelPoints = [], this._createHandle(r, u, 0, a, d, o), this._createHandle(r, u, 1, a, d, o)), this._createIndicator(r, u, a, d, o), n.add(u);
    }, e.prototype._createHandle = function(n, r, i, a, o, s) {
      var l = We(this._dragHandle, this, i, !1), u = We(this._dragHandle, this, i, !0), c = js(n.get("handleSize"), a[0]), f = Sr(n.get("handleIcon"), -c / 2, -c / 2, c, c, null, !0), d = XY(this._orient);
      f.attr({
        cursor: d,
        draggable: !0,
        drift: l,
        ondragend: u,
        onmousemove: function(m) {
          Vu(m.event);
        }
      }), f.x = a[0] / 2, f.useStyle(n.getModel("handleStyle").getItemStyle()), f.setStyle({
        strokeNoScale: !0,
        strokeFirst: !0
      }), f.style.lineWidth *= 2, f.ensureState("emphasis").style = n.getModel(["emphasis", "handleStyle"]).getItemStyle(), ah(f, !0), r.add(f);
      var h = this.visualMapModel.textStyleModel, p = new jt({
        cursor: d,
        draggable: !0,
        drift: l,
        onmousemove: function(m) {
          Vu(m.event);
        },
        ondragend: u,
        style: Mn(h, {
          x: 0,
          y: 0,
          text: ""
        })
      });
      p.ensureState("blur").style = {
        opacity: 0.1
      }, p.stateTransition = {
        duration: 200
      }, this.group.add(p);
      var v = [c, 0], g = this._shapes;
      g.handleThumbs[i] = f, g.handleLabelPoints[i] = v, g.handleLabels[i] = p;
    }, e.prototype._createIndicator = function(n, r, i, a, o) {
      var s = js(n.get("indicatorSize"), i[0]), l = Sr(n.get("indicatorIcon"), -s / 2, -s / 2, s, s, null, !0);
      l.attr({
        cursor: "move",
        invisible: !0,
        silent: !0,
        x: i[0] / 2
      });
      var u = n.getModel("indicatorStyle").getItemStyle();
      if (l instanceof ci) {
        var c = l.style;
        l.useStyle(_e({
          // TODO other properties like x, y ?
          image: c.image,
          x: c.x,
          y: c.y,
          width: c.width,
          height: c.height
        }, u));
      } else
        l.useStyle(u);
      r.add(l);
      var f = this.visualMapModel.textStyleModel, d = new jt({
        silent: !0,
        invisible: !0,
        style: Mn(f, {
          x: 0,
          y: 0,
          text: ""
        })
      });
      this.group.add(d);
      var h = [(o === "horizontal" ? a / 2 : Tft) + i[0] / 2, 0], p = this._shapes;
      p.indicator = l, p.indicatorLabel = d, p.indicatorLabelPoint = h, this._firstShowIndicator = !0;
    }, e.prototype._dragHandle = function(n, r, i, a) {
      if (this._useHandle) {
        if (this._dragging = !r, !r) {
          var o = this._applyTransform([i, a], this._shapes.mainGroup, !0);
          this._updateInterval(n, o[1]), this._hideIndicator(), this._updateView();
        }
        r === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
          type: "selectDataRange",
          from: this.uid,
          visualMapId: this.visualMapModel.id,
          selected: this._dataInterval.slice()
        }), r ? !this._hovering && this._clearHoverLinkToSeries() : UY(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[n], !1);
      }
    }, e.prototype._resetInterval = function() {
      var n = this.visualMapModel, r = this._dataInterval = n.getSelected(), i = n.getExtent(), a = [0, n.itemSize[1]];
      this._handleEnds = [ml(r[0], i, a, !0), ml(r[1], i, a, !0)];
    }, e.prototype._updateInterval = function(n, r) {
      r = r || 0;
      var i = this.visualMapModel, a = this._handleEnds, o = [0, i.itemSize[1]];
      _p(
        r,
        a,
        o,
        n,
        // cross is forbidden
        0
      );
      var s = i.getExtent();
      this._dataInterval = [ml(a[0], o, s, !0), ml(a[1], o, s, !0)];
    }, e.prototype._updateView = function(n) {
      var r = this.visualMapModel, i = r.getExtent(), a = this._shapes, o = [0, r.itemSize[1]], s = n ? o : this._handleEnds, l = this._createBarVisual(this._dataInterval, i, s, "inRange"), u = this._createBarVisual(i, i, o, "outOfRange");
      a.inRange.setStyle({
        fill: l.barColor
        // opacity: visualInRange.opacity
      }).setShape("points", l.barPoints), a.outOfRange.setStyle({
        fill: u.barColor
        // opacity: visualOutOfRange.opacity
      }).setShape("points", u.barPoints), this._updateHandle(s, l);
    }, e.prototype._createBarVisual = function(n, r, i, a) {
      var o = {
        forceState: a,
        convertOpacityToAlpha: !0
      }, s = this._makeColorGradient(n, o), l = [this.getControllerVisual(n[0], "symbolSize", o), this.getControllerVisual(n[1], "symbolSize", o)], u = this._createBarPoints(i, l);
      return {
        barColor: new _m(0, 0, 0, 1, s),
        barPoints: u,
        handlesColor: [s[0].color, s[s.length - 1].color]
      };
    }, e.prototype._makeColorGradient = function(n, r) {
      var i = 100, a = [], o = (n[1] - n[0]) / i;
      a.push({
        color: this.getControllerVisual(n[0], "color", r),
        offset: 0
      });
      for (var s = 1; s < i; s++) {
        var l = n[0] + o * s;
        if (l > n[1])
          break;
        a.push({
          color: this.getControllerVisual(l, "color", r),
          offset: s / i
        });
      }
      return a.push({
        color: this.getControllerVisual(n[1], "color", r),
        offset: 1
      }), a;
    }, e.prototype._createBarPoints = function(n, r) {
      var i = this.visualMapModel.itemSize;
      return [[i[0] - r[0], n[0]], [i[0], n[0]], [i[0], n[1]], [i[0] - r[1], n[1]]];
    }, e.prototype._createBarGroup = function(n) {
      var r = this._orient, i = this.visualMapModel.get("inverse");
      return new ct(r === "horizontal" && !i ? {
        scaleX: n === "bottom" ? 1 : -1,
        rotation: Math.PI / 2
      } : r === "horizontal" && i ? {
        scaleX: n === "bottom" ? -1 : 1,
        rotation: -Math.PI / 2
      } : r === "vertical" && !i ? {
        scaleX: n === "left" ? 1 : -1,
        scaleY: -1
      } : {
        scaleX: n === "left" ? 1 : -1
      });
    }, e.prototype._updateHandle = function(n, r) {
      if (this._useHandle) {
        var i = this._shapes, a = this.visualMapModel, o = i.handleThumbs, s = i.handleLabels, l = a.itemSize, u = a.getExtent();
        wft([0, 1], function(c) {
          var f = o[c];
          f.setStyle("fill", r.handlesColor[c]), f.y = n[c];
          var d = ml(n[c], [0, l[1]], u, !0), h = this.getControllerVisual(d, "symbolSize");
          f.scaleX = f.scaleY = h / l[0], f.x = l[0] - h / 2;
          var p = zs(i.handleLabelPoints[c], of(f, this.group));
          s[c].setStyle({
            x: p[0],
            y: p[1],
            text: a.formatValueText(this._dataInterval[c]),
            verticalAlign: "middle",
            align: this._orient === "vertical" ? this._applyTransform("left", i.mainGroup) : "center"
          });
        }, this);
      }
    }, e.prototype._showIndicator = function(n, r, i, a) {
      var o = this.visualMapModel, s = o.getExtent(), l = o.itemSize, u = [0, l[1]], c = this._shapes, f = c.indicator;
      if (f) {
        f.attr("invisible", !1);
        var d = {
          convertOpacityToAlpha: !0
        }, h = this.getControllerVisual(n, "color", d), p = this.getControllerVisual(n, "symbolSize"), v = ml(n, s, u, !0), g = l[0] - p / 2, m = {
          x: f.x,
          y: f.y
        };
        f.y = v, f.x = g;
        var y = zs(c.indicatorLabelPoint, of(f, this.group)), _ = c.indicatorLabel;
        _.attr("invisible", !1);
        var O = this._applyTransform("left", c.mainGroup), S = this._orient, x = S === "horizontal";
        _.setStyle({
          text: (i || "") + o.formatValueText(r),
          verticalAlign: x ? O : "middle",
          align: x ? "center" : O
        });
        var C = {
          x: g,
          y: v,
          style: {
            fill: h
          }
        }, P = {
          style: {
            x: y[0],
            y: y[1]
          }
        };
        if (o.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {
          var $ = {
            duration: 100,
            easing: "cubicInOut",
            additive: !0
          };
          f.x = m.x, f.y = m.y, f.animateTo(C, $), _.animateTo(P, $);
        } else
          f.attr(C), _.attr(P);
        this._firstShowIndicator = !1;
        var T = this._shapes.handleLabels;
        if (T)
          for (var E = 0; E < T.length; E++)
            this.api.enterBlur(T[E]);
      }
    }, e.prototype._enableHoverLinkToSeries = function() {
      var n = this;
      this._shapes.mainGroup.on("mousemove", function(r) {
        if (n._hovering = !0, !n._dragging) {
          var i = n.visualMapModel.itemSize, a = n._applyTransform([r.offsetX, r.offsetY], n._shapes.mainGroup, !0, !0);
          a[1] = jY(jI(0, a[1]), i[1]), n._doHoverLinkToSeries(a[1], 0 <= a[0] && a[0] <= i[0]);
        }
      }).on("mouseout", function() {
        n._hovering = !1, !n._dragging && n._clearHoverLinkToSeries();
      });
    }, e.prototype._enableHoverLinkFromSeries = function() {
      var n = this.api.getZr();
      this.visualMapModel.option.hoverLink ? (n.on("mouseover", this._hoverLinkFromSeriesMouseOver, this), n.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries();
    }, e.prototype._doHoverLinkToSeries = function(n, r) {
      var i = this.visualMapModel, a = i.itemSize;
      if (i.option.hoverLink) {
        var o = [0, a[1]], s = i.getExtent();
        n = jY(jI(o[0], n), o[1]);
        var l = $ft(i, s, o), u = [n - l, n + l], c = ml(n, o, s, !0), f = [ml(u[0], o, s, !0), ml(u[1], o, s, !0)];
        u[0] < o[0] && (f[0] = -1 / 0), u[1] > o[1] && (f[1] = 1 / 0), r && (f[0] === -1 / 0 ? this._showIndicator(c, f[1], "< ", l) : f[1] === 1 / 0 ? this._showIndicator(c, f[0], "> ", l) : this._showIndicator(c, c, "≈ ", l));
        var d = this._hoverLinkDataIndices, h = [];
        (r || UY(i)) && (h = this._hoverLinkDataIndices = i.findTargetDataIndices(f));
        var p = cje(d, h);
        this._dispatchHighDown("downplay", Sw(p[0], i)), this._dispatchHighDown("highlight", Sw(p[1], i));
      }
    }, e.prototype._hoverLinkFromSeriesMouseOver = function(n) {
      var r;
      if (sh(n.target, function(l) {
        var u = ft(l);
        if (u.dataIndex != null)
          return r = u, !0;
      }, !0), !!r) {
        var i = this.ecModel.getSeriesByIndex(r.seriesIndex), a = this.visualMapModel;
        if (a.isTargetSeries(i)) {
          var o = i.getData(r.dataType), s = o.getStore().get(a.getDataDimensionIndex(o), r.dataIndex);
          isNaN(s) || this._showIndicator(s, s);
        }
      }
    }, e.prototype._hideIndicator = function() {
      var n = this._shapes;
      n.indicator && n.indicator.attr("invisible", !0), n.indicatorLabel && n.indicatorLabel.attr("invisible", !0);
      var r = this._shapes.handleLabels;
      if (r)
        for (var i = 0; i < r.length; i++)
          this.api.leaveBlur(r[i]);
    }, e.prototype._clearHoverLinkToSeries = function() {
      this._hideIndicator();
      var n = this._hoverLinkDataIndices;
      this._dispatchHighDown("downplay", Sw(n, this.visualMapModel)), n.length = 0;
    }, e.prototype._clearHoverLinkFromSeries = function() {
      this._hideIndicator();
      var n = this.api.getZr();
      n.off("mouseover", this._hoverLinkFromSeriesMouseOver), n.off("mouseout", this._hideIndicator);
    }, e.prototype._applyTransform = function(n, r, i, a) {
      var o = of(r, a ? null : this.group);
      return Se(n) ? zs(n, o, i) : CP(n, o, i);
    }, e.prototype._dispatchHighDown = function(n, r) {
      r && r.length && this.api.dispatchAction({
        type: n,
        batch: r
      });
    }, e.prototype.dispose = function() {
      this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries();
    }, e.type = "visualMap.continuous", e;
  }(Ihe)
);
function ZY(t, e, n, r) {
  return new pa({
    shape: {
      points: t
    },
    draggable: !!n,
    cursor: e,
    drift: n,
    onmousemove: function(i) {
      Vu(i.event);
    },
    ondragend: r
  });
}
function $ft(t, e, n) {
  var r = Cft / 2, i = t.get("hoverLinkDataSize");
  return i && (r = ml(i, e, n, !0) / 2), r;
}
function UY(t) {
  var e = t.get("hoverLinkOnHandle");
  return !!(e ?? t.get("realtime"));
}
function XY(t) {
  return t === "vertical" ? "ns-resize" : "ew-resize";
}
var Aft = {
  type: "selectDataRange",
  event: "dataRangeSelected",
  // FIXME use updateView appears wrong
  update: "update"
}, Eft = function(t, e) {
  e.eachComponent({
    mainType: "visualMap",
    query: t
  }, function(n) {
    n.setSelected(t.selected);
  });
}, Mft = [
  {
    createOnAllSeries: !0,
    reset: function(t, e) {
      var n = [];
      return e.eachComponent("visualMap", function(r) {
        var i = t.pipelineContext;
        !r.isTargetSeries(t) || i && i.large || n.push(Jut(r.stateList, r.targetVisuals, We(r.getValueState, r), r.getDataDimensionIndex(t.getData())));
      }), n;
    }
  },
  // Only support color.
  {
    createOnAllSeries: !0,
    reset: function(t, e) {
      var n = t.getData(), r = [];
      e.eachComponent("visualMap", function(i) {
        if (i.isTargetSeries(t)) {
          var a = i.getVisualMeta(We(Ift, null, t, i)) || {
            stops: [],
            outerColors: []
          }, o = i.getDataDimensionIndex(n);
          o >= 0 && (a.dimension = o, r.push(a));
        }
      }), t.getData().setVisual("visualMeta", r);
    }
  }
];
function Ift(t, e, n, r) {
  for (var i = e.targetVisuals[r], a = Kr.prepareVisualTypes(i), o = {
    color: v1(t.getData(), "color")
    // default color.
  }, s = 0, l = a.length; s < l; s++) {
    var u = a[s], c = i[u === "opacity" ? "__alphaForOpacity" : u];
    c && c.applyVisual(n, f, d);
  }
  return o.color;
  function f(h) {
    return o[h];
  }
  function d(h, p) {
    o[h] = p;
  }
}
var YY = F;
function Dft(t) {
  var e = t && t.visualMap;
  Se(e) || (e = e ? [e] : []), YY(e, function(n) {
    if (n) {
      dv(n, "splitList") && !dv(n, "pieces") && (n.pieces = n.splitList, delete n.splitList);
      var r = n.pieces;
      r && Se(r) && YY(r, function(i) {
        nt(i) && (dv(i, "start") && !dv(i, "min") && (i.min = i.start), dv(i, "end") && !dv(i, "max") && (i.max = i.end));
      });
    }
  });
}
function dv(t, e) {
  return t && t.hasOwnProperty && t.hasOwnProperty(e);
}
var qY = !1;
function Rhe(t) {
  qY || (qY = !0, t.registerSubTypeDefaulter("visualMap", function(e) {
    return !e.categories && (!(e.pieces ? e.pieces.length > 0 : e.splitNumber > 0) || e.calculable) ? "continuous" : "piecewise";
  }), t.registerAction(Aft, Eft), F(Mft, function(e) {
    t.registerVisual(t.PRIORITY.VISUAL.COMPONENT, e);
  }), t.registerPreprocessor(Dft));
}
function khe(t) {
  t.registerComponentModel(xft), t.registerComponentView(Pft), Rhe(t);
}
var Rft = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._pieceList = [], n;
    }
    return e.prototype.optionUpdated = function(n, r) {
      t.prototype.optionUpdated.apply(this, arguments), this.resetExtent();
      var i = this._mode = this._determineMode();
      this._pieceList = [], kft[this._mode].call(this, this._pieceList), this._resetSelected(n, r);
      var a = this.option.categories;
      this.resetVisual(function(o, s) {
        i === "categories" ? (o.mappingMethod = "category", o.categories = ot(a)) : (o.dataExtent = this.getExtent(), o.mappingMethod = "piecewise", o.pieceList = Ce(this._pieceList, function(l) {
          return l = ot(l), s !== "inRange" && (l.visual = null), l;
        }));
      });
    }, e.prototype.completeVisualOption = function() {
      var n = this.option, r = {}, i = Kr.listVisualTypes(), a = this.isCategory();
      F(n.pieces, function(s) {
        F(i, function(l) {
          s.hasOwnProperty(l) && (r[l] = 1);
        });
      }), F(r, function(s, l) {
        var u = !1;
        F(this.stateList, function(c) {
          u = u || o(n, c, l) || o(n.target, c, l);
        }, this), !u && F(this.stateList, function(c) {
          (n[c] || (n[c] = {}))[l] = Mhe.get(l, c === "inRange" ? "active" : "inactive", a);
        });
      }, this);
      function o(s, l, u) {
        return s && s[l] && s[l].hasOwnProperty(u);
      }
      t.prototype.completeVisualOption.apply(this, arguments);
    }, e.prototype._resetSelected = function(n, r) {
      var i = this.option, a = this._pieceList, o = (r ? i : n).selected || {};
      if (i.selected = o, F(a, function(l, u) {
        var c = this.getSelectedMapKey(l);
        o.hasOwnProperty(c) || (o[c] = !0);
      }, this), i.selectedMode === "single") {
        var s = !1;
        F(a, function(l, u) {
          var c = this.getSelectedMapKey(l);
          o[c] && (s ? o[c] = !1 : s = !0);
        }, this);
      }
    }, e.prototype.getItemSymbol = function() {
      return this.get("itemSymbol");
    }, e.prototype.getSelectedMapKey = function(n) {
      return this._mode === "categories" ? n.value + "" : n.index + "";
    }, e.prototype.getPieceList = function() {
      return this._pieceList;
    }, e.prototype._determineMode = function() {
      var n = this.option;
      return n.pieces && n.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber";
    }, e.prototype.setSelected = function(n) {
      this.option.selected = ot(n);
    }, e.prototype.getValueState = function(n) {
      var r = Kr.findPieceIndex(n, this._pieceList);
      return r != null && this.option.selected[this.getSelectedMapKey(this._pieceList[r])] ? "inRange" : "outOfRange";
    }, e.prototype.findTargetDataIndices = function(n) {
      var r = [], i = this._pieceList;
      return this.eachTargetSeries(function(a) {
        var o = [], s = a.getData();
        s.each(this.getDataDimensionIndex(s), function(l, u) {
          var c = Kr.findPieceIndex(l, i);
          c === n && o.push(u);
        }, this), r.push({
          seriesId: a.id,
          dataIndex: o
        });
      }, this), r;
    }, e.prototype.getRepresentValue = function(n) {
      var r;
      if (this.isCategory())
        r = n.value;
      else if (n.value != null)
        r = n.value;
      else {
        var i = n.interval || [];
        r = i[0] === -1 / 0 && i[1] === 1 / 0 ? 0 : (i[0] + i[1]) / 2;
      }
      return r;
    }, e.prototype.getVisualMeta = function(n) {
      if (this.isCategory())
        return;
      var r = [], i = ["", ""], a = this;
      function o(c, f) {
        var d = a.getRepresentValue({
          interval: c
        });
        f || (f = a.getValueState(d));
        var h = n(d, f);
        c[0] === -1 / 0 ? i[0] = h : c[1] === 1 / 0 ? i[1] = h : r.push({
          value: c[0],
          color: h
        }, {
          value: c[1],
          color: h
        });
      }
      var s = this._pieceList.slice();
      if (!s.length)
        s.push({
          interval: [-1 / 0, 1 / 0]
        });
      else {
        var l = s[0].interval[0];
        l !== -1 / 0 && s.unshift({
          interval: [-1 / 0, l]
        }), l = s[s.length - 1].interval[1], l !== 1 / 0 && s.push({
          interval: [l, 1 / 0]
        });
      }
      var u = -1 / 0;
      return F(s, function(c) {
        var f = c.interval;
        f && (f[0] > u && o([u, f[0]], "outOfRange"), o(f.slice()), u = f[1]);
      }, this), {
        stops: r,
        outerColors: i
      };
    }, e.type = "visualMap.piecewise", e.defaultOption = Bf(mT.defaultOption, {
      selected: null,
      minOpen: !1,
      maxOpen: !1,
      align: "auto",
      itemWidth: 20,
      itemHeight: 14,
      itemSymbol: "roundRect",
      pieces: null,
      categories: null,
      splitNumber: 5,
      selectedMode: "multiple",
      itemGap: 10,
      hoverLink: !0
      // Enable hover highlight.
    }), e;
  }(mT)
), kft = {
  splitNumber: function(t) {
    var e = this.option, n = Math.min(e.precision, 20), r = this.getExtent(), i = e.splitNumber;
    i = Math.max(parseInt(i, 10), 1), e.splitNumber = i;
    for (var a = (r[1] - r[0]) / i; +a.toFixed(n) !== a && n < 5; )
      n++;
    e.precision = n, a = +a.toFixed(n), e.minOpen && t.push({
      interval: [-1 / 0, r[0]],
      close: [0, 0]
    });
    for (var o = 0, s = r[0]; o < i; s += a, o++) {
      var l = o === i - 1 ? r[1] : s + a;
      t.push({
        interval: [s, l],
        close: [1, 1]
      });
    }
    e.maxOpen && t.push({
      interval: [r[1], 1 / 0],
      close: [0, 0]
    }), Sk(t), F(t, function(u, c) {
      u.index = c, u.text = this.formatValueText(u.interval);
    }, this);
  },
  categories: function(t) {
    var e = this.option;
    F(e.categories, function(n) {
      t.push({
        text: this.formatValueText(n, !0),
        value: n
      });
    }, this), KY(e, t);
  },
  pieces: function(t) {
    var e = this.option;
    F(e.pieces, function(n, r) {
      nt(n) || (n = {
        value: n
      });
      var i = {
        text: "",
        index: r
      };
      if (n.label != null && (i.text = n.label), n.hasOwnProperty("value")) {
        var a = i.value = n.value;
        i.interval = [a, a], i.close = [1, 1];
      } else {
        for (var o = i.interval = [], s = i.close = [0, 0], l = [1, 0, 1], u = [-1 / 0, 1 / 0], c = [], f = 0; f < 2; f++) {
          for (var d = [["gte", "gt", "min"], ["lte", "lt", "max"]][f], h = 0; h < 3 && o[f] == null; h++)
            o[f] = n[d[h]], s[f] = l[h], c[f] = h === 2;
          o[f] == null && (o[f] = u[f]);
        }
        c[0] && o[1] === 1 / 0 && (s[0] = 0), c[1] && o[0] === -1 / 0 && (s[1] = 0), process.env.NODE_ENV !== "production" && o[0] > o[1] && console.warn("Piece " + r + "is illegal: " + o + " lower bound should not greater then uppper bound."), o[0] === o[1] && s[0] && s[1] && (i.value = o[0]);
      }
      i.visual = Kr.retrieveVisuals(n), t.push(i);
    }, this), KY(e, t), Sk(t), F(t, function(n) {
      var r = n.close, i = [["<", "≤"][r[1]], [">", "≥"][r[0]]];
      n.text = n.text || this.formatValueText(n.value != null ? n.value : n.interval, !1, i);
    }, this);
  }
};
function KY(t, e) {
  var n = t.inverse;
  (t.orient === "vertical" ? !n : n) && e.reverse();
}
var Lft = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.doRender = function() {
      var n = this.group;
      n.removeAll();
      var r = this.visualMapModel, i = r.get("textGap"), a = r.textStyleModel, o = a.getFont(), s = a.getTextColor(), l = this._getItemAlign(), u = r.itemSize, c = this._getViewData(), f = c.endsText, d = br(r.get("showLabel", !0), !f);
      f && this._renderEndsText(n, f[0], u, d, l), F(c.viewPieceList, function(h) {
        var p = h.piece, v = new ct();
        v.onclick = We(this._onItemClick, this, p), this._enableHoverLink(v, h.indexInModelPieceList);
        var g = r.getRepresentValue(p);
        if (this._createItemSymbol(v, g, [0, 0, u[0], u[1]]), d) {
          var m = this.visualMapModel.getValueState(g);
          v.add(new jt({
            style: {
              x: l === "right" ? -i : u[0] + i,
              y: u[1] / 2,
              text: p.text,
              verticalAlign: "middle",
              align: l,
              font: o,
              fill: s,
              opacity: m === "outOfRange" ? 0.5 : 1
            }
          }));
        }
        n.add(v);
      }, this), f && this._renderEndsText(n, f[1], u, d, l), Th(r.get("orient"), n, r.get("itemGap")), this.renderBackground(n), this.positionGroup(n);
    }, e.prototype._enableHoverLink = function(n, r) {
      var i = this;
      n.on("mouseover", function() {
        return a("highlight");
      }).on("mouseout", function() {
        return a("downplay");
      });
      var a = function(o) {
        var s = i.visualMapModel;
        s.option.hoverLink && i.api.dispatchAction({
          type: o,
          batch: Sw(s.findTargetDataIndices(r), s)
        });
      };
    }, e.prototype._getItemAlign = function() {
      var n = this.visualMapModel, r = n.option;
      if (r.orient === "vertical")
        return Dhe(n, this.api, n.itemSize);
      var i = r.align;
      return (!i || i === "auto") && (i = "left"), i;
    }, e.prototype._renderEndsText = function(n, r, i, a, o) {
      if (r) {
        var s = new ct(), l = this.visualMapModel.textStyleModel;
        s.add(new jt({
          style: Mn(l, {
            x: a ? o === "right" ? i[0] : 0 : i[0] / 2,
            y: i[1] / 2,
            verticalAlign: "middle",
            align: a ? o : "center",
            text: r
          })
        })), n.add(s);
      }
    }, e.prototype._getViewData = function() {
      var n = this.visualMapModel, r = Ce(n.getPieceList(), function(s, l) {
        return {
          piece: s,
          indexInModelPieceList: l
        };
      }), i = n.get("text"), a = n.get("orient"), o = n.get("inverse");
      return (a === "horizontal" ? o : !o) ? r.reverse() : i && (i = i.slice().reverse()), {
        viewPieceList: r,
        endsText: i
      };
    }, e.prototype._createItemSymbol = function(n, r, i) {
      n.add(Sr(
        // symbol will be string
        this.getControllerVisual(r, "symbol"),
        i[0],
        i[1],
        i[2],
        i[3],
        // color will be string
        this.getControllerVisual(r, "color")
      ));
    }, e.prototype._onItemClick = function(n) {
      var r = this.visualMapModel, i = r.option, a = i.selectedMode;
      if (a) {
        var o = ot(i.selected), s = r.getSelectedMapKey(n);
        a === "single" || a === !0 ? (o[s] = !0, F(o, function(l, u) {
          o[u] = u === s;
        })) : o[s] = !o[s], this.api.dispatchAction({
          type: "selectDataRange",
          from: this.uid,
          visualMapId: this.visualMapModel.id,
          selected: o
        });
      }
    }, e.type = "visualMap.piecewise", e;
  }(Ihe)
);
function Lhe(t) {
  t.registerComponentModel(Rft), t.registerComponentView(Lft), Rhe(t);
}
function Nft(t) {
  Mt(khe), Mt(Lhe);
}
var Bft = {
  label: {
    enabled: !0
  },
  decal: {
    show: !1
  }
}, JY = Ut(), zft = {};
function Vft(t, e) {
  var n = t.getModel("aria");
  if (!n.get("enabled"))
    return;
  var r = ot(Bft);
  mt(r.label, t.getLocaleModel().get("aria"), !1), mt(n.option, r, !1), i(), a();
  function i() {
    var u = n.getModel("decal"), c = u.get("show");
    if (c) {
      var f = Ze();
      t.eachSeries(function(d) {
        if (!d.isColorBySeries()) {
          var h = f.get(d.type);
          h || (h = {}, f.set(d.type, h)), JY(d).scope = h;
        }
      }), t.eachRawSeries(function(d) {
        if (t.isSeriesFiltered(d))
          return;
        if (qe(d.enableAriaDecal)) {
          d.enableAriaDecal();
          return;
        }
        var h = d.getData();
        if (d.isColorBySeries()) {
          var y = zk(d.ecModel, d.name, zft, t.getSeriesCount()), _ = h.getVisual("decal");
          h.setVisual("decal", O(_, y));
        } else {
          var p = d.getRawData(), v = {}, g = JY(d).scope;
          h.each(function(S) {
            var x = h.getRawIndex(S);
            v[x] = S;
          });
          var m = p.count();
          p.each(function(S) {
            var x = v[S], C = p.getName(S) || S + "", P = zk(d.ecModel, C, g, m), $ = h.getItemVisual(x, "decal");
            h.setItemVisual(x, "decal", O($, P));
          });
        }
        function O(S, x) {
          var C = S ? _e(_e({}, x), S) : x;
          return C.dirty = !0, C;
        }
      });
    }
  }
  function a() {
    var u = e.getZr().dom;
    if (u) {
      var c = t.getLocaleModel().get("aria"), f = n.getModel("label");
      if (f.option = it(f.option, c), !!f.get("enabled")) {
        if (f.get("description")) {
          u.setAttribute("aria-label", f.get("description"));
          return;
        }
        var d = t.getSeriesCount(), h = f.get(["data", "maxCount"]) || 10, p = f.get(["series", "maxCount"]) || 10, v = Math.min(d, p), g;
        if (!(d < 1)) {
          var m = s();
          if (m) {
            var y = f.get(["general", "withTitle"]);
            g = o(y, {
              title: m
            });
          } else
            g = f.get(["general", "withoutTitle"]);
          var _ = [], O = d > 1 ? f.get(["series", "multiple", "prefix"]) : f.get(["series", "single", "prefix"]);
          g += o(O, {
            seriesCount: d
          }), t.eachSeries(function(P, $) {
            if ($ < v) {
              var T = void 0, E = P.get("name"), M = E ? "withName" : "withoutName";
              T = d > 1 ? f.get(["series", "multiple", M]) : f.get(["series", "single", M]), T = o(T, {
                seriesId: P.seriesIndex,
                seriesName: P.get("name"),
                seriesType: l(P.subType)
              });
              var R = P.getData();
              if (R.count() > h) {
                var N = f.get(["data", "partialData"]);
                T += o(N, {
                  displayCnt: h
                });
              } else
                T += f.get(["data", "allData"]);
              for (var I = f.get(["data", "separator", "middle"]), B = f.get(["data", "separator", "end"]), Q = [], W = 0; W < R.count(); W++)
                if (W < h) {
                  var H = R.getName(W), U = R.getValues(W), j = f.get(["data", H ? "withName" : "withoutName"]);
                  Q.push(o(j, {
                    name: H,
                    value: U.join(I)
                  }));
                }
              T += Q.join(I) + B, _.push(T);
            }
          });
          var S = f.getModel(["series", "multiple", "separator"]), x = S.get("middle"), C = S.get("end");
          g += _.join(x) + C, u.setAttribute("aria-label", g);
        }
      }
    }
  }
  function o(u, c) {
    if (!Ve(u))
      return u;
    var f = u;
    return F(c, function(d, h) {
      f = f.replace(new RegExp("\\{\\s*" + h + "\\s*\\}", "g"), d);
    }), f;
  }
  function s() {
    var u = t.get("title");
    return u && u.length && (u = u[0]), u && u.text;
  }
  function l(u) {
    var c = t.getLocaleModel().get(["series", "typeNames"]);
    return c[u] || c.chart;
  }
}
function Fft(t) {
  if (!(!t || !t.aria)) {
    var e = t.aria;
    e.show != null && (e.enabled = e.show), e.label = e.label || {}, F(["description", "general", "series", "data"], function(n) {
      e[n] != null && (e.label[n] = e[n]);
    });
  }
}
function Wft(t) {
  t.registerPreprocessor(Fft), t.registerVisual(t.PRIORITY.VISUAL.ARIA, Vft);
}
var eq = {
  value: "eq",
  // PENDING: not good for literal semantic?
  "<": "lt",
  "<=": "lte",
  ">": "gt",
  ">=": "gte",
  "=": "eq",
  "!=": "ne",
  "<>": "ne"
  // Might be misleading for sake of the difference between '==' and '===',
  // so don't support them.
  // '==': 'eq',
  // '===': 'seq',
  // '!==': 'sne'
  // PENDING: Whether support some common alias "ge", "le", "neq"?
  // ge: 'gte',
  // le: 'lte',
  // neq: 'ne',
}, Qft = (
  /** @class */
  function() {
    function t(e) {
      var n = this._condVal = Ve(e) ? new RegExp(e) : y5(e) ? e : null;
      if (n == null) {
        var r = "";
        process.env.NODE_ENV !== "production" && (r = fa("Illegal regexp", e, "in")), cn(r);
      }
    }
    return t.prototype.evaluate = function(e) {
      var n = typeof e;
      return Ve(n) ? this._condVal.test(e) : Kt(n) ? this._condVal.test(e + "") : !1;
    }, t;
  }()
), Hft = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.evaluate = function() {
      return this.value;
    }, t;
  }()
), Gft = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.evaluate = function() {
      for (var e = this.children, n = 0; n < e.length; n++)
        if (!e[n].evaluate())
          return !1;
      return !0;
    }, t;
  }()
), jft = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.evaluate = function() {
      for (var e = this.children, n = 0; n < e.length; n++)
        if (e[n].evaluate())
          return !0;
      return !1;
    }, t;
  }()
), Zft = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.evaluate = function() {
      return !this.child.evaluate();
    }, t;
  }()
), Uft = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.evaluate = function() {
      for (var e = !!this.valueParser, n = this.getValue, r = n(this.valueGetterParam), i = e ? this.valueParser(r) : null, a = 0; a < this.subCondList.length; a++)
        if (!this.subCondList[a].evaluate(e ? i : r))
          return !1;
      return !0;
    }, t;
  }()
);
function M6(t, e) {
  if (t === !0 || t === !1) {
    var n = new Hft();
    return n.value = t, n;
  }
  var r = "";
  return Nhe(t) || (process.env.NODE_ENV !== "production" && (r = fa("Illegal config. Expect a plain object but actually", t)), cn(r)), t.and ? tq("and", t, e) : t.or ? tq("or", t, e) : t.not ? Xft(t, e) : Yft(t, e);
}
function tq(t, e, n) {
  var r = e[t], i = "";
  process.env.NODE_ENV !== "production" && (i = fa('"and"/"or" condition should only be `' + t + ": [...]` and must not be empty array.", "Illegal condition:", e)), Se(r) || cn(i), r.length || cn(i);
  var a = t === "and" ? new Gft() : new jft();
  return a.children = Ce(r, function(o) {
    return M6(o, n);
  }), a.children.length || cn(i), a;
}
function Xft(t, e) {
  var n = t.not, r = "";
  process.env.NODE_ENV !== "production" && (r = fa('"not" condition should only be `not: {}`.', "Illegal condition:", t)), Nhe(n) || cn(r);
  var i = new Zft();
  return i.child = M6(n, e), i.child || cn(r), i;
}
function Yft(t, e) {
  for (var n = "", r = e.prepareGetValue(t), i = [], a = kt(t), o = t.parser, s = o ? pue(o) : null, l = 0; l < a.length; l++) {
    var u = a[l];
    if (!(u === "parser" || e.valueGetterAttrMap.get(u))) {
      var c = Qe(eq, u) ? eq[u] : u, f = t[u], d = s ? s(f) : f, h = yXe(c, d) || c === "reg" && new Qft(d);
      h || (process.env.NODE_ENV !== "production" && (n = fa('Illegal relational operation: "' + u + '" in condition:', t)), cn(n)), i.push(h);
    }
  }
  i.length || (process.env.NODE_ENV !== "production" && (n = fa("Relational condition must have at least one operator.", "Illegal condition:", t)), cn(n));
  var p = new Uft();
  return p.valueGetterParam = r, p.valueParser = s, p.getValue = e.getValue, p.subCondList = i, p;
}
function Nhe(t) {
  return nt(t) && !Pi(t);
}
var qft = (
  /** @class */
  function() {
    function t(e, n) {
      this._cond = M6(e, n);
    }
    return t.prototype.evaluate = function() {
      return this._cond.evaluate();
    }, t;
  }()
);
function Kft(t, e) {
  return new qft(t, e);
}
var Jft = {
  type: "echarts:filter",
  // PENDING: enhance to filter by index rather than create new data
  transform: function(t) {
    for (var e = t.upstream, n, r = Kft(t.config, {
      valueGetterAttrMap: Ze({
        dimension: !0
      }),
      prepareGetValue: function(s) {
        var l = "", u = s.dimension;
        Qe(s, "dimension") || (process.env.NODE_ENV !== "production" && (l = fa('Relation condition must has prop "dimension" specified.', "Illegal condition:", s)), cn(l));
        var c = e.getDimensionInfo(u);
        return c || (process.env.NODE_ENV !== "production" && (l = fa("Can not find dimension info via: " + u + `.
`, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
`, "Illegal condition:", s, `.
`)), cn(l)), {
          dimIdx: c.index
        };
      },
      getValue: function(s) {
        return e.retrieveValueFromItem(n, s.dimIdx);
      }
    }), i = [], a = 0, o = e.count(); a < o; a++)
      n = e.getRawDataItem(a), r.evaluate() && i.push(n);
    return {
      data: i
    };
  }
}, zL = "";
process.env.NODE_ENV !== "production" && (zL = ["Valid config is like:", '{ dimension: "age", order: "asc" }', 'or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));
var edt = {
  type: "echarts:sort",
  transform: function(t) {
    var e = t.upstream, n = t.config, r = "", i = wn(n);
    i.length || (process.env.NODE_ENV !== "production" && (r = "Empty `config` in sort transform."), cn(r));
    var a = [];
    F(i, function(c) {
      var f = c.dimension, d = c.order, h = c.parser, p = c.incomparable;
      if (f == null && (process.env.NODE_ENV !== "production" && (r = 'Sort transform config must has "dimension" specified.' + zL), cn(r)), d !== "asc" && d !== "desc" && (process.env.NODE_ENV !== "production" && (r = 'Sort transform config must has "order" specified.' + zL), cn(r)), p && p !== "min" && p !== "max") {
        var v = "";
        process.env.NODE_ENV !== "production" && (v = 'incomparable must be "min" or "max" rather than "' + p + '".'), cn(v);
      }
      if (d !== "asc" && d !== "desc") {
        var g = "";
        process.env.NODE_ENV !== "production" && (g = 'order must be "asc" or "desc" rather than "' + d + '".'), cn(g);
      }
      var m = e.getDimensionInfo(f);
      m || (process.env.NODE_ENV !== "production" && (r = fa("Can not find dimension info via: " + f + `.
`, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
`, "Illegal config:", c, `.
`)), cn(r));
      var y = h ? pue(h) : null;
      h && !y && (process.env.NODE_ENV !== "production" && (r = fa("Invalid parser name " + h + `.
`, "Illegal config:", c, `.
`)), cn(r)), a.push({
        dimIdx: m.index,
        parser: y,
        comparator: new gue(d, p)
      });
    });
    var o = e.sourceFormat;
    o !== Qi && o !== ps && (process.env.NODE_ENV !== "production" && (r = 'sourceFormat "' + o + '" is not supported yet'), cn(r));
    for (var s = [], l = 0, u = e.count(); l < u; l++)
      s.push(e.getRawDataItem(l));
    return s.sort(function(c, f) {
      for (var d = 0; d < a.length; d++) {
        var h = a[d], p = e.retrieveValueFromItem(c, h.dimIdx), v = e.retrieveValueFromItem(f, h.dimIdx);
        h.parser && (p = h.parser(p), v = h.parser(v));
        var g = h.comparator.evaluate(p, v);
        if (g !== 0)
          return g;
      }
      return 0;
    }), {
      data: s
    };
  }
};
function tdt(t) {
  t.registerTransform(Jft), t.registerTransform(edt);
}
var ndt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = "dataset", n;
    }
    return e.prototype.init = function(n, r, i) {
      t.prototype.init.call(this, n, r, i), this._sourceManager = new _ue(this), tj(this);
    }, e.prototype.mergeOption = function(n, r) {
      t.prototype.mergeOption.call(this, n, r), tj(this);
    }, e.prototype.optionUpdated = function() {
      this._sourceManager.dirty();
    }, e.prototype.getSourceManager = function() {
      return this._sourceManager;
    }, e.type = "dataset", e.defaultOption = {
      seriesLayoutBy: Nl
    }, e;
  }(At)
), rdt = (
  /** @class */
  function(t) {
    le(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = "dataset", n;
    }
    return e.type = "dataset", e;
  }(Ln)
);
function idt(t) {
  t.registerComponentModel(ndt), t.registerComponentView(rdt);
}
var fl = jl.CMD;
function kv(t, e) {
  return Math.abs(t - e) < 1e-5;
}
function VL(t) {
  var e = t.data, n = t.len(), r = [], i, a = 0, o = 0, s = 0, l = 0;
  function u(R, N) {
    i && i.length > 2 && r.push(i), i = [R, N];
  }
  function c(R, N, I, B) {
    kv(R, I) && kv(N, B) || i.push(R, N, I, B, I, B);
  }
  function f(R, N, I, B, Q, W) {
    var H = Math.abs(N - R), U = Math.tan(H / 4) * 4 / 3, j = N < R ? -1 : 1, Y = Math.cos(R), ne = Math.sin(R), fe = Math.cos(N), ue = Math.sin(N), ye = Y * Q + I, se = ne * W + B, he = fe * Q + I, re = ue * W + B, q = Q * U * j, K = W * U * j;
    i.push(ye - q * ne, se + K * Y, he + q * ue, re - K * fe, he, re);
  }
  for (var d, h, p, v, g = 0; g < n; ) {
    var m = e[g++], y = g === 1;
    switch (y && (a = e[g], o = e[g + 1], s = a, l = o, (m === fl.L || m === fl.C || m === fl.Q) && (i = [s, l])), m) {
      case fl.M:
        a = s = e[g++], o = l = e[g++], u(s, l);
        break;
      case fl.L:
        d = e[g++], h = e[g++], c(a, o, d, h), a = d, o = h;
        break;
      case fl.C:
        i.push(e[g++], e[g++], e[g++], e[g++], a = e[g++], o = e[g++]);
        break;
      case fl.Q:
        d = e[g++], h = e[g++], p = e[g++], v = e[g++], i.push(a + 2 / 3 * (d - a), o + 2 / 3 * (h - o), p + 2 / 3 * (d - p), v + 2 / 3 * (h - v), p, v), a = p, o = v;
        break;
      case fl.A:
        var _ = e[g++], O = e[g++], S = e[g++], x = e[g++], C = e[g++], P = e[g++] + C;
        g += 1;
        var $ = !e[g++];
        d = Math.cos(C) * S + _, h = Math.sin(C) * x + O, y ? (s = d, l = h, u(s, l)) : c(a, o, d, h), a = Math.cos(P) * S + _, o = Math.sin(P) * x + O;
        for (var T = ($ ? -1 : 1) * Math.PI / 2, E = C; $ ? E > P : E < P; E += T) {
          var M = $ ? Math.max(E + T, P) : Math.min(E + T, P);
          f(E, M, _, O, S, x);
        }
        break;
      case fl.R:
        s = a = e[g++], l = o = e[g++], d = s + e[g++], h = l + e[g++], u(d, l), c(d, l, d, h), c(d, h, s, h), c(s, h, s, l), c(s, l, d, l);
        break;
      case fl.Z:
        i && c(a, o, s, l), a = s, o = l;
        break;
    }
  }
  return i && i.length > 2 && r.push(i), r;
}
function FL(t, e, n, r, i, a, o, s, l, u) {
  if (kv(t, n) && kv(e, r) && kv(i, o) && kv(a, s)) {
    l.push(o, s);
    return;
  }
  var c = 2 / u, f = c * c, d = o - t, h = s - e, p = Math.sqrt(d * d + h * h);
  d /= p, h /= p;
  var v = n - t, g = r - e, m = i - o, y = a - s, _ = v * v + g * g, O = m * m + y * y;
  if (_ < f && O < f) {
    l.push(o, s);
    return;
  }
  var S = d * v + h * g, x = -d * m - h * y, C = _ - S * S, P = O - x * x;
  if (C < f && S >= 0 && P < f && x >= 0) {
    l.push(o, s);
    return;
  }
  var $ = [], T = [];
  yf(t, n, i, o, 0.5, $), yf(e, r, a, s, 0.5, T), FL($[0], T[0], $[1], T[1], $[2], T[2], $[3], T[3], l, u), FL($[4], T[4], $[5], T[5], $[6], T[6], $[7], T[7], l, u);
}
function adt(t, e) {
  var n = VL(t), r = [];
  e = e || 1;
  for (var i = 0; i < n.length; i++) {
    var a = n[i], o = [], s = a[0], l = a[1];
    o.push(s, l);
    for (var u = 2; u < a.length; ) {
      var c = a[u++], f = a[u++], d = a[u++], h = a[u++], p = a[u++], v = a[u++];
      FL(s, l, c, f, d, h, p, v, o, e), s = p, l = v;
    }
    r.push(o);
  }
  return r;
}
function Bhe(t, e, n) {
  var r = t[e], i = t[1 - e], a = Math.abs(r / i), o = Math.ceil(Math.sqrt(a * n)), s = Math.floor(n / o);
  s === 0 && (s = 1, o = n);
  for (var l = [], u = 0; u < o; u++)
    l.push(s);
  var c = o * s, f = n - c;
  if (f > 0)
    for (var u = 0; u < f; u++)
      l[u % o] += 1;
  return l;
}
function nq(t, e, n) {
  for (var r = t.r0, i = t.r, a = t.startAngle, o = t.endAngle, s = Math.abs(o - a), l = s * i, u = i - r, c = l > Math.abs(u), f = Bhe([l, u], c ? 0 : 1, e), d = (c ? s : u) / f.length, h = 0; h < f.length; h++)
    for (var p = (c ? u : s) / f[h], v = 0; v < f[h]; v++) {
      var g = {};
      c ? (g.startAngle = a + d * h, g.endAngle = a + d * (h + 1), g.r0 = r + p * v, g.r = r + p * (v + 1)) : (g.startAngle = a + p * v, g.endAngle = a + p * (v + 1), g.r0 = r + d * h, g.r = r + d * (h + 1)), g.clockwise = t.clockwise, g.cx = t.cx, g.cy = t.cy, n.push(g);
    }
}
function odt(t, e, n) {
  for (var r = t.width, i = t.height, a = r > i, o = Bhe([r, i], a ? 0 : 1, e), s = a ? "width" : "height", l = a ? "height" : "width", u = a ? "x" : "y", c = a ? "y" : "x", f = t[s] / o.length, d = 0; d < o.length; d++)
    for (var h = t[l] / o[d], p = 0; p < o[d]; p++) {
      var v = {};
      v[u] = d * f, v[c] = p * h, v[s] = f, v[l] = h, v.x += t.x, v.y += t.y, n.push(v);
    }
}
function rq(t, e, n, r) {
  return t * r - n * e;
}
function sdt(t, e, n, r, i, a, o, s) {
  var l = n - t, u = r - e, c = o - i, f = s - a, d = rq(c, f, l, u);
  if (Math.abs(d) < 1e-6)
    return null;
  var h = t - i, p = e - a, v = rq(h, p, c, f) / d;
  return v < 0 || v > 1 ? null : new yt(v * l + t, v * u + e);
}
function ldt(t, e, n) {
  var r = new yt();
  yt.sub(r, n, e), r.normalize();
  var i = new yt();
  yt.sub(i, t, e);
  var a = i.dot(r);
  return a;
}
function hv(t, e) {
  var n = t[t.length - 1];
  n && n[0] === e[0] && n[1] === e[1] || t.push(e);
}
function udt(t, e, n) {
  for (var r = t.length, i = [], a = 0; a < r; a++) {
    var o = t[a], s = t[(a + 1) % r], l = sdt(o[0], o[1], s[0], s[1], e.x, e.y, n.x, n.y);
    l && i.push({
      projPt: ldt(l, e, n),
      pt: l,
      idx: a
    });
  }
  if (i.length < 2)
    return [{ points: t }, { points: t }];
  i.sort(function(g, m) {
    return g.projPt - m.projPt;
  });
  var u = i[0], c = i[i.length - 1];
  if (c.idx < u.idx) {
    var f = u;
    u = c, c = f;
  }
  for (var d = [u.pt.x, u.pt.y], h = [c.pt.x, c.pt.y], p = [d], v = [h], a = u.idx + 1; a <= c.idx; a++)
    hv(p, t[a].slice());
  hv(p, h), hv(p, d);
  for (var a = c.idx + 1; a <= u.idx + r; a++)
    hv(v, t[a % r].slice());
  return hv(v, d), hv(v, h), [{
    points: p
  }, {
    points: v
  }];
}
function iq(t) {
  var e = t.points, n = [], r = [];
  yP(e, n, r);
  var i = new bt(n[0], n[1], r[0] - n[0], r[1] - n[1]), a = i.width, o = i.height, s = i.x, l = i.y, u = new yt(), c = new yt();
  return a > o ? (u.x = c.x = s + a / 2, u.y = l, c.y = l + o) : (u.y = c.y = l + o / 2, u.x = s, c.x = s + a), udt(e, u, c);
}
function yT(t, e, n, r) {
  if (n === 1)
    r.push(e);
  else {
    var i = Math.floor(n / 2), a = t(e);
    yT(t, a[0], i, r), yT(t, a[1], n - i, r);
  }
  return r;
}
function cdt(t, e) {
  for (var n = [], r = 0; r < e; r++)
    n.push(z5(t));
  return n;
}
function fdt(t, e) {
  e.setStyle(t.style), e.z = t.z, e.z2 = t.z2, e.zlevel = t.zlevel;
}
function ddt(t) {
  for (var e = [], n = 0; n < t.length; )
    e.push([t[n++], t[n++]]);
  return e;
}
function hdt(t, e) {
  var n = [], r = t.shape, i;
  switch (t.type) {
    case "rect":
      odt(r, e, n), i = Zt;
      break;
    case "sector":
      nq(r, e, n), i = ha;
      break;
    case "circle":
      nq({
        r0: 0,
        r: r.r,
        startAngle: 0,
        endAngle: Math.PI * 2,
        cx: r.cx,
        cy: r.cy
      }, e, n), i = ha;
      break;
    default:
      var a = t.getComputedTransform(), o = a ? Math.sqrt(Math.max(a[0] * a[0] + a[1] * a[1], a[2] * a[2] + a[3] * a[3])) : 1, s = Ce(adt(t.getUpdatedPathProxy(), o), function(m) {
        return ddt(m);
      }), l = s.length;
      if (l === 0)
        yT(iq, {
          points: s[0]
        }, e, n);
      else if (l === e)
        for (var u = 0; u < l; u++)
          n.push({
            points: s[u]
          });
      else {
        var c = 0, f = Ce(s, function(m) {
          var y = [], _ = [];
          yP(m, y, _);
          var O = (_[1] - y[1]) * (_[0] - y[0]);
          return c += O, { poly: m, area: O };
        });
        f.sort(function(m, y) {
          return y.area - m.area;
        });
        for (var d = e, u = 0; u < l; u++) {
          var h = f[u];
          if (d <= 0)
            break;
          var p = u === l - 1 ? d : Math.ceil(h.area / c * e);
          p < 0 || (yT(iq, {
            points: h.poly
          }, p, n), d -= p);
        }
      }
      i = pa;
      break;
  }
  if (!i)
    return cdt(t, e);
  for (var v = [], u = 0; u < n.length; u++) {
    var g = new i();
    g.setShape(n[u]), fdt(t, g), v.push(g);
  }
  return v;
}
function pdt(t, e) {
  var n = t.length, r = e.length;
  if (n === r)
    return [t, e];
  for (var i = [], a = [], o = n < r ? t : e, s = Math.min(n, r), l = Math.abs(r - n) / 6, u = (s - 2) / 6, c = Math.ceil(l / u) + 1, f = [o[0], o[1]], d = l, h = 2; h < s; ) {
    var p = o[h - 2], v = o[h - 1], g = o[h++], m = o[h++], y = o[h++], _ = o[h++], O = o[h++], S = o[h++];
    if (d <= 0) {
      f.push(g, m, y, _, O, S);
      continue;
    }
    for (var x = Math.min(d, c - 1) + 1, C = 1; C <= x; C++) {
      var P = C / x;
      yf(p, g, y, O, P, i), yf(v, m, _, S, P, a), p = i[3], v = a[3], f.push(i[1], a[1], i[2], a[2], p, v), g = i[5], m = a[5], y = i[6], _ = a[6];
    }
    d -= x - 1;
  }
  return o === t ? [f, e] : [t, f];
}
function aq(t, e) {
  for (var n = t.length, r = t[n - 2], i = t[n - 1], a = [], o = 0; o < e.length; )
    a[o++] = r, a[o++] = i;
  return a;
}
function vdt(t, e) {
  for (var n, r, i, a = [], o = [], s = 0; s < Math.max(t.length, e.length); s++) {
    var l = t[s], u = e[s], c = void 0, f = void 0;
    l ? u ? (n = pdt(l, u), c = n[0], f = n[1], r = c, i = f) : (f = aq(i || l, l), c = l) : (c = aq(r || u, u), f = u), a.push(c), o.push(f);
  }
  return [a, o];
}
function oq(t) {
  for (var e = 0, n = 0, r = 0, i = t.length, a = 0, o = i - 2; a < i; o = a, a += 2) {
    var s = t[o], l = t[o + 1], u = t[a], c = t[a + 1], f = s * c - u * l;
    e += f, n += (s + u) * f, r += (l + c) * f;
  }
  return e === 0 ? [t[0] || 0, t[1] || 0] : [n / e / 3, r / e / 3, e];
}
function gdt(t, e, n, r) {
  for (var i = (t.length - 2) / 6, a = 1 / 0, o = 0, s = t.length, l = s - 2, u = 0; u < i; u++) {
    for (var c = u * 6, f = 0, d = 0; d < s; d += 2) {
      var h = d === 0 ? c : (c + d - 2) % l + 2, p = t[h] - n[0], v = t[h + 1] - n[1], g = e[d] - r[0], m = e[d + 1] - r[1], y = g - p, _ = m - v;
      f += y * y + _ * _;
    }
    f < a && (a = f, o = u);
  }
  return o;
}
function mdt(t) {
  for (var e = [], n = t.length, r = 0; r < n; r += 2)
    e[r] = t[n - r - 2], e[r + 1] = t[n - r - 1];
  return e;
}
function ydt(t, e, n, r) {
  for (var i = [], a, o = 0; o < t.length; o++) {
    var s = t[o], l = e[o], u = oq(s), c = oq(l);
    a == null && (a = u[2] < 0 != c[2] < 0);
    var f = [], d = [], h = 0, p = 1 / 0, v = [], g = s.length;
    a && (s = mdt(s));
    for (var m = gdt(s, l, u, c) * 6, y = g - 2, _ = 0; _ < y; _ += 2) {
      var O = (m + _) % y + 2;
      f[_ + 2] = s[O] - u[0], f[_ + 3] = s[O + 1] - u[1];
    }
    f[0] = s[m] - u[0], f[1] = s[m + 1] - u[1];
    for (var S = r / n, x = -r / 2; x <= r / 2; x += S) {
      for (var C = Math.sin(x), P = Math.cos(x), $ = 0, _ = 0; _ < s.length; _ += 2) {
        var T = f[_], E = f[_ + 1], M = l[_] - c[0], R = l[_ + 1] - c[1], N = M * P - R * C, I = M * C + R * P;
        v[_] = N, v[_ + 1] = I;
        var B = N - T, Q = I - E;
        $ += B * B + Q * Q;
      }
      if ($ < p) {
        p = $, h = x;
        for (var W = 0; W < v.length; W++)
          d[W] = v[W];
      }
    }
    i.push({
      from: f,
      to: d,
      fromCp: u,
      toCp: c,
      rotation: -h
    });
  }
  return i;
}
function bT(t) {
  return t.__isCombineMorphing;
}
var zhe = "__mOriginal_";
function _T(t, e, n) {
  var r = zhe + e, i = t[r] || t[e];
  t[r] || (t[r] = t[e]);
  var a = n.replace, o = n.after, s = n.before;
  t[e] = function() {
    var l = arguments, u;
    return s && s.apply(this, l), a ? u = a.apply(this, l) : u = i.apply(this, l), o && o.apply(this, l), u;
  };
}
function cb(t, e) {
  var n = zhe + e;
  t[n] && (t[e] = t[n], t[n] = null);
}
function sq(t, e) {
  for (var n = 0; n < t.length; n++)
    for (var r = t[n], i = 0; i < r.length; ) {
      var a = r[i], o = r[i + 1];
      r[i++] = e[0] * a + e[2] * o + e[4], r[i++] = e[1] * a + e[3] * o + e[5];
    }
}
function Vhe(t, e) {
  var n = t.getUpdatedPathProxy(), r = e.getUpdatedPathProxy(), i = vdt(VL(n), VL(r)), a = i[0], o = i[1], s = t.getComputedTransform(), l = e.getComputedTransform();
  function u() {
    this.transform = null;
  }
  s && sq(a, s), l && sq(o, l), _T(e, "updateTransform", { replace: u }), e.transform = null;
  var c = ydt(a, o, 10, Math.PI), f = [];
  _T(e, "buildPath", { replace: function(d) {
    for (var h = e.__morphT, p = 1 - h, v = [], g = 0; g < c.length; g++) {
      var m = c[g], y = m.from, _ = m.to, O = m.rotation * h, S = m.fromCp, x = m.toCp, C = Math.sin(O), P = Math.cos(O);
      Yy(v, S, x, h);
      for (var $ = 0; $ < y.length; $ += 2) {
        var T = y[$], E = y[$ + 1], M = _[$], R = _[$ + 1], N = T * p + M * h, I = E * p + R * h;
        f[$] = N * P - I * C + v[0], f[$ + 1] = N * C + I * P + v[1];
      }
      var B = f[0], Q = f[1];
      d.moveTo(B, Q);
      for (var $ = 2; $ < y.length; ) {
        var M = f[$++], R = f[$++], W = f[$++], H = f[$++], U = f[$++], j = f[$++];
        B === M && Q === R && W === U && H === j ? d.lineTo(U, j) : d.bezierCurveTo(M, R, W, H, U, j), B = U, Q = j;
      }
    }
  } });
}
function I6(t, e, n) {
  if (!t || !e)
    return e;
  var r = n.done, i = n.during;
  Vhe(t, e), e.__morphT = 0;
  function a() {
    cb(e, "buildPath"), cb(e, "updateTransform"), e.__morphT = -1, e.createPathProxy(), e.dirtyShape();
  }
  return e.animateTo({
    __morphT: 1
  }, it({
    during: function(o) {
      e.dirtyShape(), i && i(o);
    },
    done: function() {
      a(), r && r();
    }
  }, n)), e;
}
function bdt(t, e, n, r, i, a) {
  var o = 16;
  t = i === n ? 0 : Math.round(32767 * (t - n) / (i - n)), e = a === r ? 0 : Math.round(32767 * (e - r) / (a - r));
  for (var s = 0, l, u = (1 << o) / 2; u > 0; u /= 2) {
    var c = 0, f = 0;
    (t & u) > 0 && (c = 1), (e & u) > 0 && (f = 1), s += u * u * (3 * c ^ f), f === 0 && (c === 1 && (t = u - 1 - t, e = u - 1 - e), l = t, t = e, e = l);
  }
  return s;
}
function OT(t) {
  var e = 1 / 0, n = 1 / 0, r = -1 / 0, i = -1 / 0, a = Ce(t, function(s) {
    var l = s.getBoundingRect(), u = s.getComputedTransform(), c = l.x + l.width / 2 + (u ? u[4] : 0), f = l.y + l.height / 2 + (u ? u[5] : 0);
    return e = Math.min(c, e), n = Math.min(f, n), r = Math.max(c, r), i = Math.max(f, i), [c, f];
  }), o = Ce(a, function(s, l) {
    return {
      cp: s,
      z: bdt(s[0], s[1], e, n, r, i),
      path: t[l]
    };
  });
  return o.sort(function(s, l) {
    return s.z - l.z;
  }).map(function(s) {
    return s.path;
  });
}
function Fhe(t) {
  return hdt(t.path, t.count);
}
function WL() {
  return {
    fromIndividuals: [],
    toIndividuals: [],
    count: 0
  };
}
function _dt(t, e, n) {
  var r = [];
  function i(S) {
    for (var x = 0; x < S.length; x++) {
      var C = S[x];
      bT(C) ? i(C.childrenRef()) : C instanceof Dt && r.push(C);
    }
  }
  i(t);
  var a = r.length;
  if (!a)
    return WL();
  var o = n.dividePath || Fhe, s = o({
    path: e,
    count: a
  });
  if (s.length !== a)
    return console.error("Invalid morphing: unmatched splitted path"), WL();
  r = OT(r), s = OT(s);
  for (var l = n.done, u = n.during, c = n.individualDelay, f = new Pu(), d = 0; d < a; d++) {
    var h = r[d], p = s[d];
    p.parent = e, p.copyTransform(f), c || Vhe(h, p);
  }
  e.__isCombineMorphing = !0, e.childrenRef = function() {
    return s;
  };
  function v(S) {
    for (var x = 0; x < s.length; x++)
      s[x].addSelfToZr(S);
  }
  _T(e, "addSelfToZr", {
    after: function(S) {
      v(S);
    }
  }), _T(e, "removeSelfFromZr", {
    after: function(S) {
      for (var x = 0; x < s.length; x++)
        s[x].removeSelfFromZr(S);
    }
  });
  function g() {
    e.__isCombineMorphing = !1, e.__morphT = -1, e.childrenRef = null, cb(e, "addSelfToZr"), cb(e, "removeSelfFromZr");
  }
  var m = s.length;
  if (c)
    for (var y = m, _ = function() {
      y--, y === 0 && (g(), l && l());
    }, d = 0; d < m; d++) {
      var O = c ? it({
        delay: (n.delay || 0) + c(d, m, r[d], s[d]),
        done: _
      }, n) : n;
      I6(r[d], s[d], O);
    }
  else
    e.__morphT = 0, e.animateTo({
      __morphT: 1
    }, it({
      during: function(S) {
        for (var x = 0; x < m; x++) {
          var C = s[x];
          C.__morphT = e.__morphT, C.dirtyShape();
        }
        u && u(S);
      },
      done: function() {
        g();
        for (var S = 0; S < t.length; S++)
          cb(t[S], "updateTransform");
        l && l();
      }
    }, n));
  return e.__zr && v(e.__zr), {
    fromIndividuals: r,
    toIndividuals: s,
    count: m
  };
}
function Odt(t, e, n) {
  var r = e.length, i = [], a = n.dividePath || Fhe;
  function o(h) {
    for (var p = 0; p < h.length; p++) {
      var v = h[p];
      bT(v) ? o(v.childrenRef()) : v instanceof Dt && i.push(v);
    }
  }
  if (bT(t)) {
    o(t.childrenRef());
    var s = i.length;
    if (s < r)
      for (var l = 0, u = s; u < r; u++)
        i.push(z5(i[l++ % s]));
    i.length = r;
  } else {
    i = a({ path: t, count: r });
    for (var c = t.getComputedTransform(), u = 0; u < i.length; u++)
      i[u].setLocalTransform(c);
    if (i.length !== r)
      return console.error("Invalid morphing: unmatched splitted path"), WL();
  }
  i = OT(i), e = OT(e);
  for (var f = n.individualDelay, u = 0; u < r; u++) {
    var d = f ? it({
      delay: (n.delay || 0) + f(u, r, i[u], e[u])
    }, n) : n;
    I6(i[u], e[u], d);
  }
  return {
    fromIndividuals: i,
    toIndividuals: e,
    count: e.length
  };
}
function lq(t) {
  return Se(t[0]);
}
function uq(t, e) {
  for (var n = [], r = t.length, i = 0; i < r; i++)
    n.push({
      one: t[i],
      many: []
    });
  for (var i = 0; i < e.length; i++) {
    var a = e[i].length, o = void 0;
    for (o = 0; o < a; o++)
      n[o % r].many.push(e[i][o]);
  }
  for (var s = 0, i = r - 1; i >= 0; i--)
    if (!n[i].many.length) {
      var l = n[s].many;
      if (l.length <= 1)
        if (s)
          s = 0;
        else
          return n;
      var a = l.length, u = Math.ceil(a / 2);
      n[i].many = l.slice(u, a), n[s].many = l.slice(0, u), s++;
    }
  return n;
}
var Sdt = {
  clone: function(t) {
    for (var e = [], n = 1 - Math.pow(1 - t.path.style.opacity, 1 / t.count), r = 0; r < t.count; r++) {
      var i = z5(t.path);
      i.setStyle("opacity", n), e.push(i);
    }
    return e;
  },
  // Use the default divider
  split: null
};
function ZI(t, e, n, r, i, a) {
  if (!t.length || !e.length)
    return;
  var o = Om("update", r, i);
  if (!(o && o.duration > 0))
    return;
  var s = r.getModel("universalTransition").get("delay"), l = Object.assign({
    // Need to setToFinal so the further calculation based on the style can be correct.
    // Like emphasis color.
    setToFinal: !0
  }, o), u, c;
  lq(t) && (u = t, c = e), lq(e) && (u = e, c = t);
  function f(m, y, _, O, S) {
    var x = m.many, C = m.one;
    if (x.length === 1 && !S) {
      var P = y ? x[0] : C, $ = y ? C : x[0];
      if (bT(P))
        f({
          many: [P],
          one: $
        }, !0, _, O, !0);
      else {
        var T = s ? it({
          delay: s(_, O)
        }, l) : l;
        I6(P, $, T), a(P, $, P, $, T);
      }
    } else
      for (var E = it({
        dividePath: Sdt[n],
        individualDelay: s && function(Q, W, H, U) {
          return s(Q + _, O);
        }
      }, l), M = y ? _dt(x, C, E) : Odt(C, x, E), R = M.fromIndividuals, N = M.toIndividuals, I = R.length, B = 0; B < I; B++) {
        var T = s ? it({
          delay: s(B, I)
        }, l) : l;
        a(R[B], N[B], y ? x[B] : m.one, y ? m.one : x[B], T);
      }
  }
  for (var d = u ? u === t : t.length > e.length, h = u ? uq(c, u) : uq(d ? e : t, [d ? t : e]), p = 0, v = 0; v < h.length; v++)
    p += h[v].many.length;
  for (var g = 0, v = 0; v < h.length; v++)
    f(h[v], d, g, p), g += h[v].many.length;
}
function Vd(t) {
  if (!t)
    return [];
  if (Se(t)) {
    for (var e = [], n = 0; n < t.length; n++)
      e.push(Vd(t[n]));
    return e;
  }
  var r = [];
  return t.traverse(function(i) {
    i instanceof Dt && !i.disableMorphing && !i.invisible && !i.ignore && r.push(i);
  }), r;
}
var Whe = 1e4, xdt = 0, cq = 1, fq = 2, wdt = Ut();
function Cdt(t, e) {
  for (var n = t.dimensions, r = 0; r < n.length; r++) {
    var i = t.getDimensionInfo(n[r]);
    if (i && i.otherDims[e] === 0)
      return n[r];
  }
}
function Tdt(t, e, n) {
  var r = t.getDimensionInfo(n), i = r && r.ordinalMeta;
  if (r) {
    var a = t.get(r.name, e);
    return i && i.categories[a] || a + "";
  }
}
function dq(t, e, n, r) {
  var i = r ? "itemChildGroupId" : "itemGroupId", a = Cdt(t, i);
  if (a) {
    var o = Tdt(t, e, a);
    return o;
  }
  var s = t.getRawDataItem(e), l = r ? "childGroupId" : "groupId";
  if (s && s[l])
    return s[l] + "";
  if (!r)
    return n || t.getId(e);
}
function hq(t) {
  var e = [];
  return F(t, function(n) {
    var r = n.data, i = n.dataGroupId;
    if (r.count() > Whe) {
      process.env.NODE_ENV !== "production" && nr("Universal transition is disabled on large data > 10k.");
      return;
    }
    for (var a = r.getIndices(), o = 0; o < a.length; o++)
      e.push({
        data: r,
        groupId: dq(r, o, i, !1),
        childGroupId: dq(r, o, i, !0),
        divide: n.divide,
        dataIndex: o
      });
  }), e;
}
function UI(t, e, n) {
  t.traverse(function(r) {
    r instanceof Dt && Vn(r, {
      style: {
        opacity: 0
      }
    }, e, {
      dataIndex: n,
      isFrom: !0
    });
  });
}
function XI(t) {
  if (t.parent) {
    var e = t.getComputedTransform();
    t.setLocalTransform(e), t.parent.remove(t);
  }
}
function pv(t) {
  t.stopAnimation(), t.isGroup && t.traverse(function(e) {
    e.stopAnimation();
  });
}
function Pdt(t, e, n) {
  var r = Om("update", n, e);
  r && t.traverse(function(i) {
    if (i instanceof ls) {
      var a = eUe(i);
      a && i.animateFrom({
        style: a
      }, r);
    }
  });
}
function $dt(t, e) {
  var n = t.length;
  if (n !== e.length)
    return !1;
  for (var r = 0; r < n; r++) {
    var i = t[r], a = e[r];
    if (i.data.getId(i.dataIndex) !== a.data.getId(a.dataIndex))
      return !1;
  }
  return !0;
}
function Qhe(t, e, n) {
  var r = hq(t), i = hq(e);
  function a(_, O, S, x, C) {
    (S || _) && O.animateFrom({
      style: S && S !== _ ? _e(_e({}, S.style), _.style) : _.style
    }, C);
  }
  var o = !1, s = xdt, l = Ze(), u = Ze();
  r.forEach(function(_) {
    _.groupId && l.set(_.groupId, !0), _.childGroupId && u.set(_.childGroupId, !0);
  });
  for (var c = 0; c < i.length; c++) {
    var f = i[c].groupId;
    if (u.get(f)) {
      s = cq;
      break;
    }
    var d = i[c].childGroupId;
    if (d && l.get(d)) {
      s = fq;
      break;
    }
  }
  function h(_, O) {
    return function(S) {
      var x = S.data, C = S.dataIndex;
      return O ? x.getId(C) : _ ? s === cq ? S.childGroupId : S.groupId : s === fq ? S.childGroupId : S.groupId;
    };
  }
  var p = $dt(r, i), v = {};
  if (!p)
    for (var c = 0; c < i.length; c++) {
      var g = i[c], m = g.data.getItemGraphicEl(g.dataIndex);
      m && (v[m.id] = !0);
    }
  function y(_, O) {
    var S = r[O], x = i[_], C = x.data.hostModel, P = S.data.getItemGraphicEl(S.dataIndex), $ = x.data.getItemGraphicEl(x.dataIndex);
    if (P === $) {
      $ && Pdt($, x.dataIndex, C);
      return;
    }
    // We can't use the elements that already being morphed
    P && v[P.id] || $ && (pv($), P ? (pv(P), XI(P), o = !0, ZI(Vd(P), Vd($), x.divide, C, _, a)) : UI($, C, _));
  }
  new Qu(r, i, h(!0, p), h(!1, p), null, "multiple").update(y).updateManyToOne(function(_, O) {
    var S = i[_], x = S.data, C = x.hostModel, P = x.getItemGraphicEl(S.dataIndex), $ = yn(Ce(O, function(T) {
      return r[T].data.getItemGraphicEl(r[T].dataIndex);
    }), function(T) {
      return T && T !== P && !v[T.id];
    });
    P && (pv(P), $.length ? (F($, function(T) {
      pv(T), XI(T);
    }), o = !0, ZI(Vd($), Vd(P), S.divide, C, _, a)) : UI(P, C, S.dataIndex));
  }).updateOneToMany(function(_, O) {
    var S = r[O], x = S.data.getItemGraphicEl(S.dataIndex);
    if (!(x && v[x.id])) {
      var C = yn(Ce(_, function($) {
        return i[$].data.getItemGraphicEl(i[$].dataIndex);
      }), function($) {
        return $ && $ !== x;
      }), P = i[_[0]].data.hostModel;
      C.length && (F(C, function($) {
        return pv($);
      }), x ? (pv(x), XI(x), o = !0, ZI(
        Vd(x),
        Vd(C),
        S.divide,
        // Use divide on old.
        P,
        _[0],
        a
      )) : F(C, function($) {
        return UI($, P, _[0]);
      }));
    }
  }).updateManyToMany(function(_, O) {
    new Qu(O, _, function(S) {
      return r[S].data.getId(r[S].dataIndex);
    }, function(S) {
      return i[S].data.getId(i[S].dataIndex);
    }).update(function(S, x) {
      y(_[S], O[x]);
    }).execute();
  }).execute(), o && F(e, function(_) {
    var O = _.data, S = O.hostModel, x = S && n.getViewOfSeriesModel(S), C = Om("update", S, 0);
    x && S.isAnimationEnabled() && C && C.duration > 0 && x.group.traverse(function(P) {
      P instanceof Dt && !P.animators.length && P.animateFrom({
        style: {
          opacity: 0
        }
      }, C);
    });
  });
}
function pq(t) {
  var e = t.getModel("universalTransition").get("seriesKey");
  return e || t.id;
}
function vq(t) {
  return Se(t) ? t.sort().join(",") : t;
}
function Ic(t) {
  if (t.hostModel)
    return t.hostModel.getModel("universalTransition").get("divideShape");
}
function Adt(t, e) {
  var n = Ze(), r = Ze(), i = Ze();
  F(t.oldSeries, function(o, s) {
    var l = t.oldDataGroupIds[s], u = t.oldData[s], c = pq(o), f = vq(c);
    r.set(f, {
      dataGroupId: l,
      data: u
    }), Se(c) && F(c, function(d) {
      i.set(d, {
        key: f,
        dataGroupId: l,
        data: u
      });
    });
  });
  function a(o) {
    n.get(o) && nr("Duplicated seriesKey in universalTransition " + o);
  }
  return F(e.updatedSeries, function(o) {
    if (o.isUniversalTransitionEnabled() && o.isAnimationEnabled()) {
      var s = o.get("dataGroupId"), l = o.getData(), u = pq(o), c = vq(u), f = r.get(c);
      if (f)
        process.env.NODE_ENV !== "production" && a(c), n.set(c, {
          oldSeries: [{
            dataGroupId: f.dataGroupId,
            divide: Ic(f.data),
            data: f.data
          }],
          newSeries: [{
            dataGroupId: s,
            divide: Ic(l),
            data: l
          }]
        });
      else if (Se(u)) {
        process.env.NODE_ENV !== "production" && a(c);
        var d = [];
        F(u, function(v) {
          var g = r.get(v);
          g.data && d.push({
            dataGroupId: g.dataGroupId,
            divide: Ic(g.data),
            data: g.data
          });
        }), d.length && n.set(c, {
          oldSeries: d,
          newSeries: [{
            dataGroupId: s,
            data: l,
            divide: Ic(l)
          }]
        });
      } else {
        var h = i.get(u);
        if (h) {
          var p = n.get(h.key);
          p || (p = {
            oldSeries: [{
              dataGroupId: h.dataGroupId,
              data: h.data,
              divide: Ic(h.data)
            }],
            newSeries: []
          }, n.set(h.key, p)), p.newSeries.push({
            dataGroupId: s,
            data: l,
            divide: Ic(l)
          });
        }
      }
    }
  }), n;
}
function gq(t, e) {
  for (var n = 0; n < t.length; n++) {
    var r = e.seriesIndex != null && e.seriesIndex === t[n].seriesIndex || e.seriesId != null && e.seriesId === t[n].id;
    if (r)
      return n;
  }
}
function Edt(t, e, n, r) {
  var i = [], a = [];
  F(wn(t.from), function(o) {
    var s = gq(e.oldSeries, o);
    s >= 0 && i.push({
      dataGroupId: e.oldDataGroupIds[s],
      data: e.oldData[s],
      // TODO can specify divideShape in transition.
      divide: Ic(e.oldData[s]),
      groupIdDim: o.dimension
    });
  }), F(wn(t.to), function(o) {
    var s = gq(n.updatedSeries, o);
    if (s >= 0) {
      var l = n.updatedSeries[s].getData();
      a.push({
        dataGroupId: e.oldDataGroupIds[s],
        data: l,
        divide: Ic(l),
        groupIdDim: o.dimension
      });
    }
  }), i.length > 0 && a.length > 0 && Qhe(i, a, r);
}
function Mdt(t) {
  t.registerUpdateLifecycle("series:beforeupdate", function(e, n, r) {
    F(wn(r.seriesTransition), function(i) {
      F(wn(i.to), function(a) {
        for (var o = r.updatedSeries, s = 0; s < o.length; s++)
          (a.seriesIndex != null && a.seriesIndex === o[s].seriesIndex || a.seriesId != null && a.seriesId === o[s].id) && (o[s][vw] = !0);
      });
    });
  }), t.registerUpdateLifecycle("series:transition", function(e, n, r) {
    var i = wdt(n);
    if (i.oldSeries && r.updatedSeries && r.optionChanged) {
      var a = r.seriesTransition;
      if (a)
        F(wn(a), function(h) {
          Edt(h, i, r, n);
        });
      else {
        var o = Adt(i, r);
        F(o.keys(), function(h) {
          var p = o.get(h);
          Qhe(p.oldSeries, p.newSeries, n);
        });
      }
      F(r.updatedSeries, function(h) {
        h[vw] && (h[vw] = !1);
      });
    }
    for (var s = e.getSeries(), l = i.oldSeries = [], u = i.oldDataGroupIds = [], c = i.oldData = [], f = 0; f < s.length; f++) {
      var d = s[f].getData();
      d.count() < Whe && (l.push(s[f]), u.push(s[f].get("dataGroupId")), c.push(d));
    }
  });
}
Mt([zJe]);
Mt([RJe]);
Mt([aet, Oet, Iet, ftt, Stt, lnt, Lnt, brt, Frt, Zrt, nit, Yit, Oat, Iat, Uat, Kat, lot, vot, Tot, Iot, Wot, wst]);
Mt(Qst);
Mt(glt);
Mt(Vfe);
Mt(Alt);
Mt(Cde);
Mt(Dlt);
Mt(Wlt);
Mt(Aut);
Mt(Uut);
Mt(C1);
Mt(fct);
Mt(pct);
Mt(wct);
Mt(Mct);
Mt(Nct);
Mt(Qct);
Mt(Jct);
Mt(mft);
Mt(Ahe);
Mt(Ehe);
Mt(Nft);
Mt(khe);
Mt(Lhe);
Mt(Wft);
Mt(tdt);
Mt(idt);
Mt(Mdt);
Mt(eJe);
const Idt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Axis: vs,
  ChartView: _n,
  ComponentModel: At,
  ComponentView: Ln,
  List: Fi,
  Model: xn,
  PRIORITY: Uue,
  SeriesModel: Cn,
  color: cGe,
  connect: oqe,
  dataTool: hqe,
  dependencies: QYe,
  disConnect: sqe,
  disconnect: rce,
  dispose: lqe,
  env: Gt,
  extendChartView: FKe,
  extendComponentModel: BKe,
  extendComponentView: zKe,
  extendSeriesModel: VKe,
  format: TKe,
  getCoordinateSystemDimensions: cqe,
  getInstanceByDom: g3,
  getInstanceById: uqe,
  getMap: dqe,
  graphic: CKe,
  helper: mKe,
  init: nce,
  innerDrawElementOnCanvas: d3,
  matrix: F9e,
  number: xKe,
  parseGeoJSON: eL,
  parseGeoJson: eL,
  registerAction: Js,
  registerCoordinateSystem: oce,
  registerLayout: sce,
  registerLoading: O3,
  registerLocale: U5,
  registerMap: lce,
  registerPostInit: ice,
  registerPostUpdate: ace,
  registerPreprocessor: y3,
  registerProcessor: b3,
  registerTheme: m3,
  registerTransform: uce,
  registerUpdateLifecycle: NP,
  registerVisual: zf,
  setCanvasCreator: fqe,
  setPlatformAPI: Goe,
  throttle: kP,
  time: wKe,
  use: Mt,
  util: PKe,
  vector: P9e,
  version: WYe,
  zrUtil: _9e,
  zrender: jGe
}, Symbol.toStringTag, { value: "Module" }));
function Ddt(t) {
  return Tee() ? (im(t), !0) : !1;
}
function ST(t) {
  return typeof t == "function" ? t() : z(t);
}
const Rdt = typeof window < "u" && typeof document < "u";
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
const kdt = Object.prototype.toString, Ldt = (t) => kdt.call(t) === "[object Object]", QL = () => {
};
function Ndt(t, e) {
  function n(...r) {
    return new Promise((i, a) => {
      Promise.resolve(t(() => e.apply(this, r), { fn: e, thisArg: this, args: r })).then(i).catch(a);
    });
  }
  return n;
}
function Bdt(t, e = {}) {
  let n, r, i = QL;
  const a = (s) => {
    clearTimeout(s), i(), i = QL;
  };
  return (s) => {
    const l = ST(t), u = ST(e.maxWait);
    return n && a(n), l <= 0 || u !== void 0 && u <= 0 ? (r && (a(r), r = null), Promise.resolve(s())) : new Promise((c, f) => {
      i = e.rejectOnCancel ? f : c, u && !r && (r = setTimeout(() => {
        n && a(n), r = null, c(s());
      }, u)), n = setTimeout(() => {
        r && a(r), r = null, c(s());
      }, l);
    });
  };
}
function zdt(t) {
  return In();
}
function Vdt(t, e = 200, n = {}) {
  return Ndt(
    Bdt(e, n),
    t
  );
}
function Fdt(t, e) {
  zdt() && qu(t, e);
}
function Wdt(t) {
  var e;
  const n = ST(t);
  return (e = n == null ? void 0 : n.$el) != null ? e : n;
}
const Qdt = Rdt ? window : void 0;
function Hdt(...t) {
  let e, n, r, i;
  if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([n, r, i] = t, e = Qdt) : [e, n, r, i] = t, !e)
    return QL;
  Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
  const a = [], o = () => {
    a.forEach((c) => c()), a.length = 0;
  }, s = (c, f, d, h) => (c.addEventListener(f, d, h), () => c.removeEventListener(f, d, h)), l = me(
    () => [Wdt(e), ST(i)],
    ([c, f]) => {
      if (o(), !c)
        return;
      const d = Ldt(f) ? { ...f } : f;
      a.push(
        ...n.flatMap((h) => r.map((p) => s(c, h, p, d)))
      );
    },
    { immediate: !0, flush: "post" }
  ), u = () => {
    l(), o();
  };
  return Ddt(u), u;
}
function Gdt(t, e = "default") {
  let n = null, r = s;
  const i = ee({});
  let a;
  const o = V(() => i.value);
  r = Vdt(s, 200);
  function s() {
    n == null || n.resize({
      animation: {
        duration: 300,
        easing: "quadraticIn"
      }
    });
  }
  function l(f = e) {
    const d = z(t);
    if (!d || !z(d))
      return;
    n = nce(d, f), a = Hdt(window, "resize", r);
  }
  function u(f, d = !1) {
    return i.value = f, new Promise((h) => {
      var p;
      ((p = z(t)) == null ? void 0 : p.offsetHeight) === 0 && setTimeout(() => {
        u(z(o)), h(null);
      }, 30), Bt(() => {
        setTimeout(() => {
          !n && (l("default"), !n) || (d && (n == null || n.clear()), n == null || n.setOption(z(o)), h(null));
        }, 30);
      });
    });
  }
  me(
    () => e,
    (f) => {
      n && (n.dispose(), l(f), u(i.value));
    }
  ), Fdt(() => {
    n && (a(), n.dispose(), n = null);
  });
  function c() {
    return n || l("default"), n;
  }
  return {
    setOptions: u,
    resize: s,
    echarts: Idt,
    getInstance: c
  };
}
const D6 = /* @__PURE__ */ ae({
  __name: "Charts",
  props: {
    echartsOptions: {},
    width: {},
    height: {},
    loading: { type: Boolean }
  },
  setup(t) {
    const e = t, n = ee(null), { setOptions: r, resize: i } = Gdt(n), a = ff(Ql, {
      style: {
        fontSize: "24px"
      }
    });
    return me(
      () => [e.width, e.height],
      u$e(async () => {
        i();
      }, 200)
    ), me(
      () => e,
      async () => {
        await Bt();
        const { echartsOptions: o } = e;
        r(o);
      },
      {
        immediate: !0,
        deep: !0
      }
    ), (o, s) => (be(), Je(z(Zy), {
      spinning: o.loading,
      indicator: z(a)
    }, {
      default: ke(() => [
        tt("div", {
          ref_key: "chartRef",
          ref: n,
          style: dr({ width: o.width + "px", height: o.height + "px" })
        }, null, 4)
      ]),
      _: 1
    }, 8, ["spinning", "indicator"]));
  }
});
function R6(t) {
  return pte(t, kHe);
}
const k6 = {
  type: Object,
  default: () => ({
    sourceType: kr.STATIC,
    data: [],
    url: "",
    method: "GET",
    params: {},
    headers: {},
    refreshTime: 0,
    dataProcess: () => []
  })
}, jdt = (t, e) => new Promise((n, r) => {
  const i = new Blob([`
      self.onmessage = function(e) {
        self.postMessage((${t}).call(null, e.data));
      }
    `], { type: "application/javascript" }), a = new Worker(URL.createObjectURL(i));
  a.postMessage(JSON.parse(e)), a.onmessage = (o) => {
    a.terminate(), n(o.data);
  }, a.onerror = (o) => {
    a.terminate(), r(o);
  };
}), L6 = {
  width: {
    type: Number,
    default: 400
  },
  height: {
    type: Number,
    default: 260
  },
  dataSource: k6,
  // 标题
  title: {
    type: Object
  },
  // 图例
  legend: {
    type: Object
  },
  // 背景
  backgroundColor: {
    type: String
  },
  // 边框
  grid: {
    type: Object
  },
  // 提示框
  tooltip: {
    type: Object
  },
  // x轴数据
  xAxis: {
    type: Object
  },
  // y轴数据
  yAxis: {
    type: Object
  },
  // 折线
  series: {
    type: Array
  },
  // 数据集
  dataset: {
    type: Object
  }
}, Hhe = [];
Hhe.line = {
  lineStyle: {
    type: "solid",
    width: 1
  },
  symbol: "rect",
  symbolSize: 4,
  symbolRotate: 0,
  smooth: !1,
  step: !1
};
const Zdt = R6({
  title: {
    text: "折线图标题"
  },
  xAxis: {
    data: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"]
  },
  series: Hhe
}), Udt = {
  container: {
    props: {
      width: 400,
      height: 260
    }
  },
  props: {
    // 数据源
    dataSource: {
      sourceType: kr.STATIC,
      data: {
        xData: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"],
        series: [
          {
            type: "line",
            name: "系列1",
            data: [89.3, 92.1, 94.4, 85.4]
          },
          {
            type: "line",
            name: "系列2",
            data: [95.8, 89.4, 91.2, 76.9]
          }
        ]
      },
      url: location.origin + "/mock/api/get/example/line",
      method: "POST",
      params: {},
      headers: {},
      refreshTime: 0,
      dataProcess: `
        (res) => {
          // 取出列表
          const data = res.data;
          // x轴数据
          const xData = data.map((item) => item.name); 
          // 系列数据
          const series = [
            { type: 'line', name: '苹果', data: data.map(item => item.apple) },
            { type: 'line', name: 'VIVO', data: data.map(item => item.vivo) },
            { type: 'line', name: '小米', data: data.map(item => item.mi) },
          ];

          // 返回图表数据
          return { xData, series };
        }
      `
    },
    ...Zdt
  }
}, Ghe = (t, { manual: e, ready: n = !0, refreshDeps: r = [], refreshDepsAction: i }) => {
  const a = ee(!1);
  return Vt(() => {
    !e && t.options.refreshDeps !== !0 && (a.value = z(n));
  }), r instanceof Array ? me(
    [a, ...r],
    ([o]) => {
      o && !e && o && (i ? i() : t.refresh());
    },
    {
      deep: !0,
      immediate: !1
    }
  ) : me(a, (o) => {
    !e && o && (i ? i() : t.refresh());
  }), {
    name: "autoRunPlugin",
    onBefore: () => {
      if (!z(n))
        return {
          stopNow: !0
        };
    }
  };
};
Ghe.onInit = ({ ready: t = !0, manual: e }) => ({
  loading: !e && z(t)
});
const xw = /* @__PURE__ */ new Map(), Xdt = (t, e, n) => {
  const r = xw.get(t);
  r != null && r.timer && clearTimeout(r.timer);
  let i;
  e > -1 && (i = setTimeout(() => {
    xw.delete(t);
  }, e)), xw.set(t, {
    ...n,
    timer: i
  });
}, Ydt = (t) => xw.get(t), ww = /* @__PURE__ */ new Map(), qdt = (t) => ww.get(t), Kdt = (t, e) => {
  ww.set(t, e), e.then((n) => (ww.delete(t), n)).catch((n) => {
    throw ww.delete(t), n;
  });
}, Xd = {}, Jdt = [], eht = (t, e) => {
  Xd[t] && (Xd[t].forEach((n) => n(e)), Jdt.forEach((n) => n({
    type: t,
    data: e
  })));
}, YI = (t, e) => (Xd[t] || (Xd[t] = []), Xd[t].push(e), function() {
  const r = Xd[t].indexOf(e);
  Xd[t].splice(r, 1);
}), tht = (t, {
  cacheKey: e,
  cacheTime: n = 5 * 60 * 1e3,
  staleTime: r = 0,
  setCache: i,
  getCache: a
}) => {
  const o = ee(), s = ee(), l = (c, f) => {
    i ? i(f) : Xdt(c, n, f), eht(c, f.data);
  }, u = (c, f = []) => a ? a(f) : Ydt(c);
  return Vt(() => {
    if (!e)
      return;
    const c = u(e);
    c && Object.hasOwnProperty.call(c, "data") && (t.state.data = c.data, t.state.params = c.params, (r === -1 || (/* @__PURE__ */ new Date()).getTime() - c.time <= r) && (t.state.loading = !1)), o.value = YI(e, (f) => {
      t.setState({ data: f });
    });
  }), im(() => {
    var c;
    (c = o.value) == null || c.call(o);
  }), e ? {
    name: "cachePlugin",
    onBefore: (c) => {
      const f = u(e, c);
      return !f || !Object.hasOwnProperty.call(f, "data") ? {} : r === -1 || (/* @__PURE__ */ new Date()).getTime() - f.time <= r ? {
        loading: !1,
        data: f == null ? void 0 : f.data,
        returnNow: !0
      } : {
        data: f == null ? void 0 : f.data
      };
    },
    onRequest: (c, f) => {
      let d = qdt(e);
      return d && d !== s.value ? { servicePromise: d } : (d = c(...f), s.value = d, Kdt(e, d), { servicePromise: d });
    },
    onSuccess: (c, f) => {
      var d;
      e && ((d = o.value) == null || d.call(o), l(e, {
        data: c,
        params: f,
        time: (/* @__PURE__ */ new Date()).getTime()
      }), o.value = YI(e, (h) => {
        t.setState({ data: h });
      }));
    },
    onMutate: (c) => {
      var f;
      e && ((f = o.value) == null || f.call(o), l(e, {
        data: c,
        params: t.state.params,
        time: (/* @__PURE__ */ new Date()).getTime()
      }), o.value = YI(e, (d) => {
        t.setState({ data: d });
      }));
    }
  } : {};
};
function nht(t) {
  var e = typeof t;
  return t != null && (e == "object" || e == "function");
}
var el = nht, rht = typeof Su == "object" && Su && Su.Object === Object && Su, jhe = rht, iht = jhe, aht = typeof self == "object" && self && self.Object === Object && self, oht = iht || aht || Function("return this")(), tl = oht, sht = tl, lht = function() {
  return sht.Date.now();
}, uht = lht, cht = /\s/;
function fht(t) {
  for (var e = t.length; e-- && cht.test(t.charAt(e)); )
    ;
  return e;
}
var dht = fht, hht = dht, pht = /^\s+/;
function vht(t) {
  return t && t.slice(0, hht(t) + 1).replace(pht, "");
}
var ght = vht, mht = tl, yht = mht.Symbol, YP = yht, mq = YP, Zhe = Object.prototype, bht = Zhe.hasOwnProperty, _ht = Zhe.toString, J0 = mq ? mq.toStringTag : void 0;
function Oht(t) {
  var e = bht.call(t, J0), n = t[J0];
  try {
    t[J0] = void 0;
    var r = !0;
  } catch {
  }
  var i = _ht.call(t);
  return r && (e ? t[J0] = n : delete t[J0]), i;
}
var Sht = Oht, xht = Object.prototype, wht = xht.toString;
function Cht(t) {
  return wht.call(t);
}
var Tht = Cht, yq = YP, Pht = Sht, $ht = Tht, Aht = "[object Null]", Eht = "[object Undefined]", bq = yq ? yq.toStringTag : void 0;
function Mht(t) {
  return t == null ? t === void 0 ? Eht : Aht : bq && bq in Object(t) ? Pht(t) : $ht(t);
}
var km = Mht;
function Iht(t) {
  return t != null && typeof t == "object";
}
var Vf = Iht, Dht = km, Rht = Vf, kht = "[object Symbol]";
function Lht(t) {
  return typeof t == "symbol" || Rht(t) && Dht(t) == kht;
}
var Nht = Lht, Bht = ght, _q = el, zht = Nht, Oq = NaN, Vht = /^[-+]0x[0-9a-f]+$/i, Fht = /^0b[01]+$/i, Wht = /^0o[0-7]+$/i, Qht = parseInt;
function Hht(t) {
  if (typeof t == "number")
    return t;
  if (zht(t))
    return Oq;
  if (_q(t)) {
    var e = typeof t.valueOf == "function" ? t.valueOf() : t;
    t = _q(e) ? e + "" : e;
  }
  if (typeof t != "string")
    return t === 0 ? t : +t;
  t = Bht(t);
  var n = Fht.test(t);
  return n || Wht.test(t) ? Qht(t.slice(2), n ? 2 : 8) : Vht.test(t) ? Oq : +t;
}
var Ght = Hht, jht = el, qI = uht, Sq = Ght, Zht = "Expected a function", Uht = Math.max, Xht = Math.min;
function Yht(t, e, n) {
  var r, i, a, o, s, l, u = 0, c = !1, f = !1, d = !0;
  if (typeof t != "function")
    throw new TypeError(Zht);
  e = Sq(e) || 0, jht(n) && (c = !!n.leading, f = "maxWait" in n, a = f ? Uht(Sq(n.maxWait) || 0, e) : a, d = "trailing" in n ? !!n.trailing : d);
  function h(x) {
    var C = r, P = i;
    return r = i = void 0, u = x, o = t.apply(P, C), o;
  }
  function p(x) {
    return u = x, s = setTimeout(m, e), c ? h(x) : o;
  }
  function v(x) {
    var C = x - l, P = x - u, $ = e - C;
    return f ? Xht($, a - P) : $;
  }
  function g(x) {
    var C = x - l, P = x - u;
    return l === void 0 || C >= e || C < 0 || f && P >= a;
  }
  function m() {
    var x = qI();
    if (g(x))
      return y(x);
    s = setTimeout(m, v(x));
  }
  function y(x) {
    return s = void 0, d && r ? h(x) : (r = i = void 0, o);
  }
  function _() {
    s !== void 0 && clearTimeout(s), u = 0, r = l = i = s = void 0;
  }
  function O() {
    return s === void 0 ? o : y(qI());
  }
  function S() {
    var x = qI(), C = g(x);
    if (r = arguments, i = this, l = x, C) {
      if (s === void 0)
        return p(l);
      if (f)
        return clearTimeout(s), s = setTimeout(m, e), h(l);
    }
    return s === void 0 && (s = setTimeout(m, e)), o;
  }
  return S.cancel = _, S.flush = O, S;
}
var Uhe = Yht;
const qht = /* @__PURE__ */ g2(Uhe), Kht = (t, { debounceWait: e, debounceLeading: n, debounceTrailing: r, debounceMaxWait: i }) => {
  const a = ee(), o = V(() => {
    const s = {}, l = z(n), u = z(r), c = z(i);
    return l !== void 0 && (s.leading = l), u !== void 0 && (s.trailing = u), c !== void 0 && (s.maxWait = c), s;
  });
  return Vt((s) => {
    if (z(e)) {
      const l = t.runAsync.bind(t);
      a.value = qht(
        (u) => {
          u();
        },
        z(e),
        o.value
      ), t.runAsync = (...u) => new Promise((c, f) => {
        var d;
        (d = a.value) == null || d.call(a, () => {
          l(...u).then(c).catch(f);
        });
      }), s(() => {
        var u;
        (u = a.value) == null || u.cancel(), t.runAsync = l;
      });
    }
  }), z(e) ? {
    name: "debouncePlugin",
    onCancel: () => {
      var s;
      (s = a.value) == null || s.cancel();
    }
  } : {};
};
var Jht = Object.defineProperty, ept = (t, e, n) => e in t ? Jht(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, xq = (t, e, n) => (ept(t, typeof e != "symbol" ? e + "" : e, n), n);
class tpt {
  constructor() {
    xq(this, "table", {}), xq(this, "hashTable", {});
  }
  insert(e) {
    const n = Symbol(e);
    return this.table[e] = !0, this.hashTable[n] = e, n;
  }
  find(e) {
    return this.hashTable[e];
  }
}
new tpt();
function npt(t) {
  const n = t.toString().match(/^function\s+([^\s(]+)/);
  return n ? n[1] : "";
}
function rpt(t) {
  const e = t.toString(), n = /([a-zA-Z$_][a-zA-Z0-9$_]*)\s*\(/, r = e.match(n);
  return r ? r[1].trim() : "";
}
var ipt = Object.defineProperty, apt = (t, e, n) => e in t ? ipt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, wq = (t, e, n) => (apt(t, typeof e != "symbol" ? e + "" : e, n), n);
class opt {
  constructor() {
    wq(this, "requestInstances", /* @__PURE__ */ new Map()), wq(this, "listeners", []);
  }
  emit(e) {
    this.listeners.forEach((n) => n(e));
  }
  subscribe(e) {
    return this.listeners.push(e), () => {
      const n = this.listeners.indexOf(e);
      this.listeners.splice(n, 1);
    };
  }
  insert(e, n) {
    this.requestInstances.set(e, { ...n }), this.emit({
      key: e,
      ...n
    });
  }
  update(e, n) {
    this.has(e) && this.requestInstances.set(e, { ...this.requestInstances.get(e), ...n });
  }
  has(e) {
    return this.requestInstances.has(e);
  }
  reset(e) {
    if (this.requestInstances.has(e)) {
      const n = this.requestInstances.get(e);
      this.requestInstances.clear(), this.insert(e, n);
    } else
      this.requestInstances.clear();
  }
  getAll() {
    return this.requestInstances;
  }
}
const Sa = new opt(), spt = (t, { ready: e = !0, debugKey: n, ...r }) => {
  const i = () => {
    if (n && !Sa.has(n)) {
      const o = t.serviceRef.value.toString().includes("function") ? npt(t.serviceRef.value.toString()) : rpt(t.serviceRef.value.toString());
      Sa.insert(n, {
        instance: t,
        requestName: o,
        time: Date.now()
      });
    }
  }, a = V(
    () => Object.fromEntries(
      Object.entries({ ready: e, ...r }).map(([o, s]) => [o, z(s)])
    )
  );
  return Vt(() => {
    n && Sa.has(n) && Sa.emit({
      ...t,
      options: { ...t.options, ...a.value }
    });
  }), {
    name: "devtoolsPlugin",
    onBefore: (o) => {
      i(), n && Sa.has(n) && Sa.emit({
        ...t.state,
        key: n,
        params: o,
        loading: !0,
        time: Date.now(),
        type: "pending"
      });
    },
    onSuccess(o, s) {
      i(), n && Sa.has(n) && Sa.emit({
        ...t.state,
        key: n,
        data: o,
        params: s,
        loading: !1,
        time: Date.now(),
        type: "done"
      });
    },
    onCancel() {
      i(), n && Sa.has(n) && Sa.emit({
        ...t.state,
        key: n,
        loading: !1,
        time: Date.now(),
        type: "cancel"
      });
    },
    onError(o, s) {
      i(), n && Sa.has(n) && Sa.emit({
        ...t.state,
        key: n,
        params: s,
        loading: !1,
        error: o,
        time: Date.now(),
        type: "error"
      });
    },
    onMutate(o) {
      i(), n && Sa.has(n) && Sa.emit({
        ...t.state,
        key: n,
        data: o,
        loading: !1,
        time: Date.now(),
        type: "mutate"
      });
    }
  };
}, lpt = (t, { loadingDelay: e }) => {
  const n = ee(), r = () => {
    n.value && (clearTimeout(z(n.value)), n.value = void 0);
  };
  return {
    name: "loadingDelayPlugin",
    onFinally: () => {
      r();
      const i = z(e);
      i && (t.setState({
        loading: !0
      }), n.value = setTimeout(() => {
        t.setState({
          loading: !1
        });
      }, i));
    },
    onError: () => {
      r();
    }
  };
};
function N6() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
const upt = !!(typeof window < "u" && window.document && window.document.createElement);
function B6() {
  return N6() ? document.visibilityState !== "hidden" : !0;
}
const fb = [];
function cpt(t) {
  return fb.push(t), function() {
    const n = fb.indexOf(t);
    fb.splice(n, 1);
  };
}
if (N6()) {
  const t = () => {
    if (B6())
      for (let e = 0; e < fb.length; e++) {
        const n = fb[e];
        n();
      }
  };
  window.addEventListener("visibilitychange", t, !1);
}
const fpt = (t, { pollingInterval: e, pollingWhenHidden: n = !0, pollingErrorRetryCount: r = -1 }) => {
  let i;
  const a = ee(), o = ee(0), s = () => {
    var l;
    i && clearTimeout(i), (l = a.value) == null || l.call(a);
  };
  return Vt(() => {
    z(e) || s();
  }), z(e) ? {
    name: "pollingPlugin",
    onBefore: () => {
      s();
    },
    onError: () => {
      o.value += 1;
    },
    onSuccess: () => {
      o.value = 0;
    },
    onFinally: () => {
      r === -1 || r !== -1 && o.value <= r ? i = setTimeout(() => {
        !n && !B6() ? a.value = cpt(() => {
          t.refresh();
        }) : t.refresh();
      }, z(e)) : o.value = 0;
    },
    onCancel: () => {
      s();
    }
  } : {};
};
function dpt(t, e) {
  let n = !1;
  return (...r) => {
    n || (n = !0, t(...r), setTimeout(() => {
      n = !1;
    }, e));
  };
}
function hpt() {
  return N6() && typeof navigator.onLine < "u" ? navigator.onLine : !0;
}
const db = [];
function ppt(t) {
  return db.push(t), function() {
    const n = db.indexOf(t);
    n > -1 && db.splice(n, 1);
  };
}
if (upt) {
  const t = () => {
    if (!(!B6() || !hpt()))
      for (let e = 0; e < db.length; e++) {
        const n = db[e];
        n();
      }
  };
  window.addEventListener("visibilitychange", t, !1), window.addEventListener("focus", t, !1);
}
const vpt = (t, { refreshOnWindowFocus: e, focusTimespan: n = 5e3 }) => {
  const r = ee(), i = () => {
    var a;
    (a = r.value) == null || a.call(r);
  };
  return Vt((a) => {
    if (z(e)) {
      const o = dpt(
        t.refresh.bind(t),
        z(n)
      );
      r.value = ppt(() => {
        o();
      });
    }
    a(() => {
      i();
    });
  }), im(() => {
    i();
  }), {
    name: "refreshOnWindowFocusPlugin"
  };
}, gpt = (t, { retryInterval: e, retryCount: n }) => {
  const r = ee(), i = ee(0), a = ee(!1);
  return n ? {
    name: "retryPlugin",
    onBefore: () => {
      a.value || (i.value = 0), a.value = !1, r.value && clearTimeout(r.value);
    },
    onSuccess: () => {
      i.value = 0;
    },
    onError: () => {
      if (i.value += 1, n === -1 || i.value <= n) {
        const o = e ?? Math.min(1e3 * 2 ** i.value, 3e4);
        r.value = setTimeout(() => {
          a.value = !0, t.refresh();
        }, o);
      } else
        i.value = 0;
    },
    onCancel: () => {
      i.value = 0, r.value && clearTimeout(r.value);
    }
  } : {};
};
var mpt = Uhe, ypt = el, bpt = "Expected a function";
function _pt(t, e, n) {
  var r = !0, i = !0;
  if (typeof t != "function")
    throw new TypeError(bpt);
  return ypt(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), mpt(t, e, {
    leading: r,
    maxWait: e,
    trailing: i
  });
}
var Opt = _pt;
const Spt = /* @__PURE__ */ g2(Opt), xpt = (t, { throttleWait: e, throttleLeading: n, throttleTrailing: r }) => {
  const i = V(() => {
    const o = {};
    return z(n) !== void 0 && (o.leading = z(n)), z(r) !== void 0 && (o.trailing = z(r)), o;
  }), a = V(
    () => Spt(
      (o) => {
        o();
      },
      z(e),
      i.value
    )
  );
  return Vt((o) => {
    if (z(e)) {
      const s = t.runAsync.bind(t);
      t.runAsync = (...l) => new Promise((u, c) => {
        var f;
        (f = a.value) == null || f.call(a, () => {
          s(...l).then(u).catch(c);
        });
      }), o(() => {
        var l;
        t.runAsync = s, (l = a.value) == null || l.cancel();
      });
    }
  }), z(e) ? {
    name: "throttlePlugin",
    onCancel: () => {
      var o;
      (o = a.value) == null || o.cancel();
    }
  } : {};
}, Cq = (t) => typeof t == "function", wpt = (t) => typeof t == "boolean";
var Cpt = Object.defineProperty, Tpt = (t, e, n) => e in t ? Cpt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ix = (t, e, n) => (Tpt(t, typeof e != "symbol" ? e + "" : e, n), n);
class Ppt {
  constructor(e, n, r, i = {}) {
    ix(this, "pluginImpls"), ix(this, "count", 0), ix(this, "state", {
      loading: !1,
      params: void 0,
      data: void 0,
      error: void 0
    }), ix(this, "previousValidData"), this.serviceRef = e, this.options = n, this.setUpdateData = r, this.initState = i, this.state = {
      ...this.state,
      loading: !n.manual,
      ...i
    };
  }
  setState(e = {}) {
    this.state = {
      ...this.state,
      ...e
    }, this.setUpdateData(this.state);
  }
  setData(e, n) {
    console.warn("Please use 'setFetchState' instead of 'setData'"), n instanceof Array ? n.forEach((r) => {
      this.state[r] = e, this.setUpdateData(e, r);
    }) : (this.state[n] = e, this.setUpdateData(e, n));
  }
  setFetchState(e, n) {
    n instanceof Array ? n.forEach((r) => {
      this.state[r] = e, this.setUpdateData(e, r);
    }) : (this.state[n] = e, this.setUpdateData(e, n));
  }
  runPluginHandler(e, ...n) {
    var r, i, a;
    const o = (a = (i = (r = this.pluginImpls) == null ? void 0 : r.map((s) => {
      var l;
      return (l = s[e]) == null ? void 0 : l.call(s, ...n);
    })) != null ? i : []) == null ? void 0 : a.filter(Boolean);
    return Object.assign({}, ...o);
  }
  async runAsync(...e) {
    var n, r, i, a, o, s, l, u, c, f, d;
    this.count += 1;
    const h = this.count, { stopNow: p = !1, returnNow: v = !1, ...g } = this.runPluginHandler(
      "onBefore",
      e
    );
    if (p)
      return new Promise(() => {
      });
    if (this.setState({
      loading: !0,
      params: e,
      ...g
    }), v)
      return Promise.resolve(g.data);
    try {
      (r = (n = this.options).onBefore) == null || r.call(n, e);
    } catch (m) {
      return this.setState({
        error: m,
        loading: !1
      }), (a = (i = this.options).onError) == null || a.call(i, m, e), this.runPluginHandler("onError", m, e), new Promise(() => {
      });
    }
    try {
      let { servicePromise: m } = this.runPluginHandler("onRequest", this.serviceRef.value, e);
      const y = (O) => {
        var S, x, C, P;
        if (h !== this.count)
          return new Promise(() => {
          });
        const $ = this.options.formatResult ? this.options.formatResult(O) : O;
        return this.setState({
          data: $,
          error: void 0,
          loading: !1
        }), (x = (S = this.options).onSuccess) == null || x.call(S, $, e), this.runPluginHandler("onSuccess", $, e), this.previousValidData = $, (P = (C = this.options).onFinally) == null || P.call(C, e, $, void 0), h === this.count && this.runPluginHandler("onFinally", e, $, void 0), $;
      };
      m || (m = this.serviceRef.value(...e));
      const _ = await m;
      return y(_);
    } catch (m) {
      if (h !== this.count)
        return new Promise(() => {
        });
      throw this.setState({
        error: m,
        loading: !1
      }), (s = (o = this.options).onError) == null || s.call(o, m, e), this.runPluginHandler("onError", m, e), (Cq((l = this.options) == null ? void 0 : l.rollbackOnError) && ((u = this.options) != null && u.rollbackOnError(e)) || wpt((c = this.options) == null ? void 0 : c.rollbackOnError) && this.options.rollbackOnError) && this.setState({
        data: this.previousValidData
      }), (d = (f = this.options).onFinally) == null || d.call(f, e, void 0, m), h === this.count && this.runPluginHandler("onFinally", e, void 0, m), m;
    }
  }
  run(...e) {
    this.runAsync(...e).catch((n) => {
      this.options.onError || console.error(n);
    });
  }
  cancel() {
    this.count += 1, this.setState({
      loading: !1
    }), this.runPluginHandler("onCancel");
  }
  refresh() {
    this.run(...this.state.params || []);
  }
  refreshAsync() {
    return this.runAsync(...this.state.params || []);
  }
  mutate(e) {
    const n = Cq(e) ? e(this.state.data) : e;
    this.runPluginHandler("onMutate", n), this.setState({
      data: n
    });
  }
}
const $pt = Symbol(
  "USEREQUEST_GLOBAL_OPTIONS_PROVIDE_KEY"
);
function Apt(t) {
  return Object.keys(t).filter((n) => ["data", "loading", "params", "error"].includes(n)).length === 4;
}
function Ept(t, e = {}, n = []) {
  const r = et(
    $pt,
    {}
  ), { initialData: i = void 0, manual: a = !1, ready: o = !0, ...s } = {
    ...r ?? {},
    ...e ?? {}
  }, l = {
    manual: a,
    ready: o,
    initialData: i,
    ...s
  }, u = ee(t), c = zn({
    data: i,
    loading: !1,
    params: void 0,
    error: void 0
  }), f = (v, g) => {
    g ? c[g] = v : Apt(v) && (c.data = v.data, c.loading = v.loading, c.error = v.error, c.params = v.params);
  }, d = n.map((v) => {
    var g;
    return (g = v == null ? void 0 : v.onInit) == null ? void 0 : g.call(v, l);
  }).filter(Boolean), h = new Ppt(
    u,
    l,
    f,
    Object.assign({}, ...d, c)
  );
  h.options = l, h.pluginImpls = n.map((v) => v(h, l));
  const p = V(() => Vs(o) ? o.value : o);
  if (Vt(() => {
    if (!a) {
      const v = h.state.params || e.defaultParams || [];
      p.value && h.options.refreshDeps === !0 && u.value && h.run(...v);
    }
  }), !a && h.options.refreshDeps !== !0) {
    const v = h.state.params || e.defaultParams || [];
    z(o) && h.run(...v);
  }
  return im(() => {
    h.cancel();
  }), {
    ...k_(c),
    cancel: h.cancel.bind(h),
    refresh: h.refresh.bind(h),
    refreshAsync: h.refreshAsync.bind(h),
    run: h.run.bind(h),
    runAsync: h.runAsync.bind(h),
    mutate: h.mutate.bind(h)
  };
}
const Mpt = (t, e) => function(r, i = {}, a = []) {
  let o = t;
  const s = e || [];
  for (let l = s.length; l--; )
    o = s[l](o);
  return o(r, i, a);
};
function Ipt(t, e, n) {
  var r;
  const i = (r = [
    process.env.NODE_ENV === "development" ? spt : null,
    Kht,
    lpt,
    fpt,
    vpt,
    xpt,
    Ghe,
    tht,
    gpt
  ]) == null ? void 0 : r.filter(Boolean);
  return Mpt(Ept, e == null ? void 0 : e.use)(t, e, [
    ...i
  ]);
}
/*! js-cookie v3.0.5 | MIT */
function ax(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e];
    for (var r in n)
      t[r] = n[r];
  }
  return t;
}
var Dpt = {
  read: function(t) {
    return t[0] === '"' && (t = t.slice(1, -1)), t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
  },
  write: function(t) {
    return encodeURIComponent(t).replace(
      /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
      decodeURIComponent
    );
  }
};
function HL(t, e) {
  function n(i, a, o) {
    if (!(typeof document > "u")) {
      o = ax({}, e, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
      var s = "";
      for (var l in o)
        o[l] && (s += "; " + l, o[l] !== !0 && (s += "=" + o[l].split(";")[0]));
      return document.cookie = i + "=" + t.write(a, i) + s;
    }
  }
  function r(i) {
    if (!(typeof document > "u" || arguments.length && !i)) {
      for (var a = document.cookie ? document.cookie.split("; ") : [], o = {}, s = 0; s < a.length; s++) {
        var l = a[s].split("="), u = l.slice(1).join("=");
        try {
          var c = decodeURIComponent(l[0]);
          if (o[c] = t.read(u, c), i === c)
            break;
        } catch {
        }
      }
      return i ? o[i] : o;
    }
  }
  return Object.create(
    {
      set: n,
      get: r,
      remove: function(i, a) {
        n(
          i,
          "",
          ax({}, a, {
            expires: -1
          })
        );
      },
      withAttributes: function(i) {
        return HL(this.converter, ax({}, this.attributes, i));
      },
      withConverter: function(i) {
        return HL(ax({}, this.converter, i), this.attributes);
      }
    },
    {
      attributes: { value: Object.freeze(e) },
      converter: { value: Object.freeze(t) }
    }
  );
}
HL(Dpt, { path: "/" });
function Rpt() {
  this.__data__ = [], this.size = 0;
}
var kpt = Rpt;
function Lpt(t, e) {
  return t === e || t !== t && e !== e;
}
var qP = Lpt, Npt = qP;
function Bpt(t, e) {
  for (var n = t.length; n--; )
    if (Npt(t[n][0], e))
      return n;
  return -1;
}
var KP = Bpt, zpt = KP, Vpt = Array.prototype, Fpt = Vpt.splice;
function Wpt(t) {
  var e = this.__data__, n = zpt(e, t);
  if (n < 0)
    return !1;
  var r = e.length - 1;
  return n == r ? e.pop() : Fpt.call(e, n, 1), --this.size, !0;
}
var Qpt = Wpt, Hpt = KP;
function Gpt(t) {
  var e = this.__data__, n = Hpt(e, t);
  return n < 0 ? void 0 : e[n][1];
}
var jpt = Gpt, Zpt = KP;
function Upt(t) {
  return Zpt(this.__data__, t) > -1;
}
var Xpt = Upt, Ypt = KP;
function qpt(t, e) {
  var n = this.__data__, r = Ypt(n, t);
  return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
}
var Kpt = qpt, Jpt = kpt, evt = Qpt, tvt = jpt, nvt = Xpt, rvt = Kpt;
function Lm(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var r = t[e];
    this.set(r[0], r[1]);
  }
}
Lm.prototype.clear = Jpt;
Lm.prototype.delete = evt;
Lm.prototype.get = tvt;
Lm.prototype.has = nvt;
Lm.prototype.set = rvt;
var JP = Lm, ivt = JP;
function avt() {
  this.__data__ = new ivt(), this.size = 0;
}
var ovt = avt;
function svt(t) {
  var e = this.__data__, n = e.delete(t);
  return this.size = e.size, n;
}
var lvt = svt;
function uvt(t) {
  return this.__data__.get(t);
}
var cvt = uvt;
function fvt(t) {
  return this.__data__.has(t);
}
var dvt = fvt, hvt = km, pvt = el, vvt = "[object AsyncFunction]", gvt = "[object Function]", mvt = "[object GeneratorFunction]", yvt = "[object Proxy]";
function bvt(t) {
  if (!pvt(t))
    return !1;
  var e = hvt(t);
  return e == gvt || e == mvt || e == vvt || e == yvt;
}
var z6 = bvt, _vt = tl, Ovt = _vt["__core-js_shared__"], Svt = Ovt, KI = Svt, Tq = function() {
  var t = /[^.]+$/.exec(KI && KI.keys && KI.keys.IE_PROTO || "");
  return t ? "Symbol(src)_1." + t : "";
}();
function xvt(t) {
  return !!Tq && Tq in t;
}
var wvt = xvt, Cvt = Function.prototype, Tvt = Cvt.toString;
function Pvt(t) {
  if (t != null) {
    try {
      return Tvt.call(t);
    } catch {
    }
    try {
      return t + "";
    } catch {
    }
  }
  return "";
}
var Xhe = Pvt, $vt = z6, Avt = wvt, Evt = el, Mvt = Xhe, Ivt = /[\\^$.*+?()[\]{}|]/g, Dvt = /^\[object .+?Constructor\]$/, Rvt = Function.prototype, kvt = Object.prototype, Lvt = Rvt.toString, Nvt = kvt.hasOwnProperty, Bvt = RegExp(
  "^" + Lvt.call(Nvt).replace(Ivt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function zvt(t) {
  if (!Evt(t) || Avt(t))
    return !1;
  var e = $vt(t) ? Bvt : Dvt;
  return e.test(Mvt(t));
}
var Vvt = zvt;
function Fvt(t, e) {
  return t == null ? void 0 : t[e];
}
var Wvt = Fvt, Qvt = Vvt, Hvt = Wvt;
function Gvt(t, e) {
  var n = Hvt(t, e);
  return Qvt(n) ? n : void 0;
}
var Op = Gvt, jvt = Op, Zvt = tl, Uvt = jvt(Zvt, "Map"), V6 = Uvt, Xvt = Op, Yvt = Xvt(Object, "create"), e$ = Yvt, Pq = e$;
function qvt() {
  this.__data__ = Pq ? Pq(null) : {}, this.size = 0;
}
var Kvt = qvt;
function Jvt(t) {
  var e = this.has(t) && delete this.__data__[t];
  return this.size -= e ? 1 : 0, e;
}
var egt = Jvt, tgt = e$, ngt = "__lodash_hash_undefined__", rgt = Object.prototype, igt = rgt.hasOwnProperty;
function agt(t) {
  var e = this.__data__;
  if (tgt) {
    var n = e[t];
    return n === ngt ? void 0 : n;
  }
  return igt.call(e, t) ? e[t] : void 0;
}
var ogt = agt, sgt = e$, lgt = Object.prototype, ugt = lgt.hasOwnProperty;
function cgt(t) {
  var e = this.__data__;
  return sgt ? e[t] !== void 0 : ugt.call(e, t);
}
var fgt = cgt, dgt = e$, hgt = "__lodash_hash_undefined__";
function pgt(t, e) {
  var n = this.__data__;
  return this.size += this.has(t) ? 0 : 1, n[t] = dgt && e === void 0 ? hgt : e, this;
}
var vgt = pgt, ggt = Kvt, mgt = egt, ygt = ogt, bgt = fgt, _gt = vgt;
function Nm(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var r = t[e];
    this.set(r[0], r[1]);
  }
}
Nm.prototype.clear = ggt;
Nm.prototype.delete = mgt;
Nm.prototype.get = ygt;
Nm.prototype.has = bgt;
Nm.prototype.set = _gt;
var Ogt = Nm, $q = Ogt, Sgt = JP, xgt = V6;
function wgt() {
  this.size = 0, this.__data__ = {
    hash: new $q(),
    map: new (xgt || Sgt)(),
    string: new $q()
  };
}
var Cgt = wgt;
function Tgt(t) {
  var e = typeof t;
  return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
}
var Pgt = Tgt, $gt = Pgt;
function Agt(t, e) {
  var n = t.__data__;
  return $gt(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
}
var t$ = Agt, Egt = t$;
function Mgt(t) {
  var e = Egt(this, t).delete(t);
  return this.size -= e ? 1 : 0, e;
}
var Igt = Mgt, Dgt = t$;
function Rgt(t) {
  return Dgt(this, t).get(t);
}
var kgt = Rgt, Lgt = t$;
function Ngt(t) {
  return Lgt(this, t).has(t);
}
var Bgt = Ngt, zgt = t$;
function Vgt(t, e) {
  var n = zgt(this, t), r = n.size;
  return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
}
var Fgt = Vgt, Wgt = Cgt, Qgt = Igt, Hgt = kgt, Ggt = Bgt, jgt = Fgt;
function Bm(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var r = t[e];
    this.set(r[0], r[1]);
  }
}
Bm.prototype.clear = Wgt;
Bm.prototype.delete = Qgt;
Bm.prototype.get = Hgt;
Bm.prototype.has = Ggt;
Bm.prototype.set = jgt;
var Yhe = Bm, Zgt = JP, Ugt = V6, Xgt = Yhe, Ygt = 200;
function qgt(t, e) {
  var n = this.__data__;
  if (n instanceof Zgt) {
    var r = n.__data__;
    if (!Ugt || r.length < Ygt - 1)
      return r.push([t, e]), this.size = ++n.size, this;
    n = this.__data__ = new Xgt(r);
  }
  return n.set(t, e), this.size = n.size, this;
}
var Kgt = qgt, Jgt = JP, emt = ovt, tmt = lvt, nmt = cvt, rmt = dvt, imt = Kgt;
function zm(t) {
  var e = this.__data__ = new Jgt(t);
  this.size = e.size;
}
zm.prototype.clear = emt;
zm.prototype.delete = tmt;
zm.prototype.get = nmt;
zm.prototype.has = rmt;
zm.prototype.set = imt;
var qhe = zm;
function amt(t, e) {
  for (var n = -1, r = t == null ? 0 : t.length; ++n < r && e(t[n], n, t) !== !1; )
    ;
  return t;
}
var omt = amt, smt = Op, lmt = function() {
  try {
    var t = smt(Object, "defineProperty");
    return t({}, "", {}), t;
  } catch {
  }
}(), Khe = lmt, Aq = Khe;
function umt(t, e, n) {
  e == "__proto__" && Aq ? Aq(t, e, {
    configurable: !0,
    enumerable: !0,
    value: n,
    writable: !0
  }) : t[e] = n;
}
var F6 = umt, cmt = F6, fmt = qP, dmt = Object.prototype, hmt = dmt.hasOwnProperty;
function pmt(t, e, n) {
  var r = t[e];
  (!(hmt.call(t, e) && fmt(r, n)) || n === void 0 && !(e in t)) && cmt(t, e, n);
}
var Jhe = pmt, vmt = Jhe, gmt = F6;
function mmt(t, e, n, r) {
  var i = !n;
  n || (n = {});
  for (var a = -1, o = e.length; ++a < o; ) {
    var s = e[a], l = r ? r(n[s], t[s], s, n, t) : void 0;
    l === void 0 && (l = t[s]), i ? gmt(n, s, l) : vmt(n, s, l);
  }
  return n;
}
var T1 = mmt;
function ymt(t, e) {
  for (var n = -1, r = Array(t); ++n < t; )
    r[n] = e(n);
  return r;
}
var bmt = ymt, _mt = km, Omt = Vf, Smt = "[object Arguments]";
function xmt(t) {
  return Omt(t) && _mt(t) == Smt;
}
var wmt = xmt, Eq = wmt, Cmt = Vf, epe = Object.prototype, Tmt = epe.hasOwnProperty, Pmt = epe.propertyIsEnumerable, $mt = Eq(/* @__PURE__ */ function() {
  return arguments;
}()) ? Eq : function(t) {
  return Cmt(t) && Tmt.call(t, "callee") && !Pmt.call(t, "callee");
}, tpe = $mt, Amt = Array.isArray, n$ = Amt, xT = { exports: {} };
function Emt() {
  return !1;
}
var Mmt = Emt;
xT.exports;
(function(t, e) {
  var n = tl, r = Mmt, i = e && !e.nodeType && e, a = i && !0 && t && !t.nodeType && t, o = a && a.exports === i, s = o ? n.Buffer : void 0, l = s ? s.isBuffer : void 0, u = l || r;
  t.exports = u;
})(xT, xT.exports);
var W6 = xT.exports, Imt = 9007199254740991, Dmt = /^(?:0|[1-9]\d*)$/;
function Rmt(t, e) {
  var n = typeof t;
  return e = e ?? Imt, !!e && (n == "number" || n != "symbol" && Dmt.test(t)) && t > -1 && t % 1 == 0 && t < e;
}
var npe = Rmt, kmt = 9007199254740991;
function Lmt(t) {
  return typeof t == "number" && t > -1 && t % 1 == 0 && t <= kmt;
}
var rpe = Lmt, Nmt = km, Bmt = rpe, zmt = Vf, Vmt = "[object Arguments]", Fmt = "[object Array]", Wmt = "[object Boolean]", Qmt = "[object Date]", Hmt = "[object Error]", Gmt = "[object Function]", jmt = "[object Map]", Zmt = "[object Number]", Umt = "[object Object]", Xmt = "[object RegExp]", Ymt = "[object Set]", qmt = "[object String]", Kmt = "[object WeakMap]", Jmt = "[object ArrayBuffer]", e0t = "[object DataView]", t0t = "[object Float32Array]", n0t = "[object Float64Array]", r0t = "[object Int8Array]", i0t = "[object Int16Array]", a0t = "[object Int32Array]", o0t = "[object Uint8Array]", s0t = "[object Uint8ClampedArray]", l0t = "[object Uint16Array]", u0t = "[object Uint32Array]", Jn = {};
Jn[t0t] = Jn[n0t] = Jn[r0t] = Jn[i0t] = Jn[a0t] = Jn[o0t] = Jn[s0t] = Jn[l0t] = Jn[u0t] = !0;
Jn[Vmt] = Jn[Fmt] = Jn[Jmt] = Jn[Wmt] = Jn[e0t] = Jn[Qmt] = Jn[Hmt] = Jn[Gmt] = Jn[jmt] = Jn[Zmt] = Jn[Umt] = Jn[Xmt] = Jn[Ymt] = Jn[qmt] = Jn[Kmt] = !1;
function c0t(t) {
  return zmt(t) && Bmt(t.length) && !!Jn[Nmt(t)];
}
var f0t = c0t;
function d0t(t) {
  return function(e) {
    return t(e);
  };
}
var Q6 = d0t, wT = { exports: {} };
wT.exports;
(function(t, e) {
  var n = jhe, r = e && !e.nodeType && e, i = r && !0 && t && !t.nodeType && t, a = i && i.exports === r, o = a && n.process, s = function() {
    try {
      var l = i && i.require && i.require("util").types;
      return l || o && o.binding && o.binding("util");
    } catch {
    }
  }();
  t.exports = s;
})(wT, wT.exports);
var H6 = wT.exports, h0t = f0t, p0t = Q6, Mq = H6, Iq = Mq && Mq.isTypedArray, v0t = Iq ? p0t(Iq) : h0t, ipe = v0t, g0t = bmt, m0t = tpe, y0t = n$, b0t = W6, _0t = npe, O0t = ipe, S0t = Object.prototype, x0t = S0t.hasOwnProperty;
function w0t(t, e) {
  var n = y0t(t), r = !n && m0t(t), i = !n && !r && b0t(t), a = !n && !r && !i && O0t(t), o = n || r || i || a, s = o ? g0t(t.length, String) : [], l = s.length;
  for (var u in t)
    (e || x0t.call(t, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
    (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
    i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
    a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
    _0t(u, l))) && s.push(u);
  return s;
}
var ape = w0t, C0t = Object.prototype;
function T0t(t) {
  var e = t && t.constructor, n = typeof e == "function" && e.prototype || C0t;
  return t === n;
}
var G6 = T0t;
function P0t(t, e) {
  return function(n) {
    return t(e(n));
  };
}
var ope = P0t, $0t = ope, A0t = $0t(Object.keys, Object), E0t = A0t, M0t = G6, I0t = E0t, D0t = Object.prototype, R0t = D0t.hasOwnProperty;
function k0t(t) {
  if (!M0t(t))
    return I0t(t);
  var e = [];
  for (var n in Object(t))
    R0t.call(t, n) && n != "constructor" && e.push(n);
  return e;
}
var L0t = k0t, N0t = z6, B0t = rpe;
function z0t(t) {
  return t != null && B0t(t.length) && !N0t(t);
}
var r$ = z0t, V0t = ape, F0t = L0t, W0t = r$;
function Q0t(t) {
  return W0t(t) ? V0t(t) : F0t(t);
}
var j6 = Q0t, H0t = T1, G0t = j6;
function j0t(t, e) {
  return t && H0t(e, G0t(e), t);
}
var Z0t = j0t;
function U0t(t) {
  var e = [];
  if (t != null)
    for (var n in Object(t))
      e.push(n);
  return e;
}
var X0t = U0t, Y0t = el, q0t = G6, K0t = X0t, J0t = Object.prototype, eyt = J0t.hasOwnProperty;
function tyt(t) {
  if (!Y0t(t))
    return K0t(t);
  var e = q0t(t), n = [];
  for (var r in t)
    r == "constructor" && (e || !eyt.call(t, r)) || n.push(r);
  return n;
}
var nyt = tyt, ryt = ape, iyt = nyt, ayt = r$;
function oyt(t) {
  return ayt(t) ? ryt(t, !0) : iyt(t);
}
var P1 = oyt, syt = T1, lyt = P1;
function uyt(t, e) {
  return t && syt(e, lyt(e), t);
}
var cyt = uyt, CT = { exports: {} };
CT.exports;
(function(t, e) {
  var n = tl, r = e && !e.nodeType && e, i = r && !0 && t && !t.nodeType && t, a = i && i.exports === r, o = a ? n.Buffer : void 0, s = o ? o.allocUnsafe : void 0;
  function l(u, c) {
    if (c)
      return u.slice();
    var f = u.length, d = s ? s(f) : new u.constructor(f);
    return u.copy(d), d;
  }
  t.exports = l;
})(CT, CT.exports);
var spe = CT.exports;
function fyt(t, e) {
  var n = -1, r = t.length;
  for (e || (e = Array(r)); ++n < r; )
    e[n] = t[n];
  return e;
}
var lpe = fyt;
function dyt(t, e) {
  for (var n = -1, r = t == null ? 0 : t.length, i = 0, a = []; ++n < r; ) {
    var o = t[n];
    e(o, n, t) && (a[i++] = o);
  }
  return a;
}
var hyt = dyt;
function pyt() {
  return [];
}
var upe = pyt, vyt = hyt, gyt = upe, myt = Object.prototype, yyt = myt.propertyIsEnumerable, Dq = Object.getOwnPropertySymbols, byt = Dq ? function(t) {
  return t == null ? [] : (t = Object(t), vyt(Dq(t), function(e) {
    return yyt.call(t, e);
  }));
} : gyt, Z6 = byt, _yt = T1, Oyt = Z6;
function Syt(t, e) {
  return _yt(t, Oyt(t), e);
}
var xyt = Syt;
function wyt(t, e) {
  for (var n = -1, r = e.length, i = t.length; ++n < r; )
    t[i + n] = e[n];
  return t;
}
var cpe = wyt, Cyt = ope, Tyt = Cyt(Object.getPrototypeOf, Object), U6 = Tyt, Pyt = cpe, $yt = U6, Ayt = Z6, Eyt = upe, Myt = Object.getOwnPropertySymbols, Iyt = Myt ? function(t) {
  for (var e = []; t; )
    Pyt(e, Ayt(t)), t = $yt(t);
  return e;
} : Eyt, fpe = Iyt, Dyt = T1, Ryt = fpe;
function kyt(t, e) {
  return Dyt(t, Ryt(t), e);
}
var Lyt = kyt, Nyt = cpe, Byt = n$;
function zyt(t, e, n) {
  var r = e(t);
  return Byt(t) ? r : Nyt(r, n(t));
}
var dpe = zyt, Vyt = dpe, Fyt = Z6, Wyt = j6;
function Qyt(t) {
  return Vyt(t, Wyt, Fyt);
}
var Hyt = Qyt, Gyt = dpe, jyt = fpe, Zyt = P1;
function Uyt(t) {
  return Gyt(t, Zyt, jyt);
}
var Xyt = Uyt, Yyt = Op, qyt = tl, Kyt = Yyt(qyt, "DataView"), Jyt = Kyt, ebt = Op, tbt = tl, nbt = ebt(tbt, "Promise"), rbt = nbt, ibt = Op, abt = tl, obt = ibt(abt, "Set"), sbt = obt, lbt = Op, ubt = tl, cbt = lbt(ubt, "WeakMap"), fbt = cbt, GL = Jyt, jL = V6, ZL = rbt, UL = sbt, XL = fbt, hpe = km, Vm = Xhe, Rq = "[object Map]", dbt = "[object Object]", kq = "[object Promise]", Lq = "[object Set]", Nq = "[object WeakMap]", Bq = "[object DataView]", hbt = Vm(GL), pbt = Vm(jL), vbt = Vm(ZL), gbt = Vm(UL), mbt = Vm(XL), Fd = hpe;
(GL && Fd(new GL(new ArrayBuffer(1))) != Bq || jL && Fd(new jL()) != Rq || ZL && Fd(ZL.resolve()) != kq || UL && Fd(new UL()) != Lq || XL && Fd(new XL()) != Nq) && (Fd = function(t) {
  var e = hpe(t), n = e == dbt ? t.constructor : void 0, r = n ? Vm(n) : "";
  if (r)
    switch (r) {
      case hbt:
        return Bq;
      case pbt:
        return Rq;
      case vbt:
        return kq;
      case gbt:
        return Lq;
      case mbt:
        return Nq;
    }
  return e;
});
var X6 = Fd, ybt = Object.prototype, bbt = ybt.hasOwnProperty;
function _bt(t) {
  var e = t.length, n = new t.constructor(e);
  return e && typeof t[0] == "string" && bbt.call(t, "index") && (n.index = t.index, n.input = t.input), n;
}
var Obt = _bt, Sbt = tl, xbt = Sbt.Uint8Array, wbt = xbt, zq = wbt;
function Cbt(t) {
  var e = new t.constructor(t.byteLength);
  return new zq(e).set(new zq(t)), e;
}
var Y6 = Cbt, Tbt = Y6;
function Pbt(t, e) {
  var n = e ? Tbt(t.buffer) : t.buffer;
  return new t.constructor(n, t.byteOffset, t.byteLength);
}
var $bt = Pbt, Abt = /\w*$/;
function Ebt(t) {
  var e = new t.constructor(t.source, Abt.exec(t));
  return e.lastIndex = t.lastIndex, e;
}
var Mbt = Ebt, Vq = YP, Fq = Vq ? Vq.prototype : void 0, Wq = Fq ? Fq.valueOf : void 0;
function Ibt(t) {
  return Wq ? Object(Wq.call(t)) : {};
}
var Dbt = Ibt, Rbt = Y6;
function kbt(t, e) {
  var n = e ? Rbt(t.buffer) : t.buffer;
  return new t.constructor(n, t.byteOffset, t.length);
}
var ppe = kbt, Lbt = Y6, Nbt = $bt, Bbt = Mbt, zbt = Dbt, Vbt = ppe, Fbt = "[object Boolean]", Wbt = "[object Date]", Qbt = "[object Map]", Hbt = "[object Number]", Gbt = "[object RegExp]", jbt = "[object Set]", Zbt = "[object String]", Ubt = "[object Symbol]", Xbt = "[object ArrayBuffer]", Ybt = "[object DataView]", qbt = "[object Float32Array]", Kbt = "[object Float64Array]", Jbt = "[object Int8Array]", e_t = "[object Int16Array]", t_t = "[object Int32Array]", n_t = "[object Uint8Array]", r_t = "[object Uint8ClampedArray]", i_t = "[object Uint16Array]", a_t = "[object Uint32Array]";
function o_t(t, e, n) {
  var r = t.constructor;
  switch (e) {
    case Xbt:
      return Lbt(t);
    case Fbt:
    case Wbt:
      return new r(+t);
    case Ybt:
      return Nbt(t, n);
    case qbt:
    case Kbt:
    case Jbt:
    case e_t:
    case t_t:
    case n_t:
    case r_t:
    case i_t:
    case a_t:
      return Vbt(t, n);
    case Qbt:
      return new r();
    case Hbt:
    case Zbt:
      return new r(t);
    case Gbt:
      return Bbt(t);
    case jbt:
      return new r();
    case Ubt:
      return zbt(t);
  }
}
var s_t = o_t, l_t = el, Qq = Object.create, u_t = /* @__PURE__ */ function() {
  function t() {
  }
  return function(e) {
    if (!l_t(e))
      return {};
    if (Qq)
      return Qq(e);
    t.prototype = e;
    var n = new t();
    return t.prototype = void 0, n;
  };
}(), c_t = u_t, f_t = c_t, d_t = U6, h_t = G6;
function p_t(t) {
  return typeof t.constructor == "function" && !h_t(t) ? f_t(d_t(t)) : {};
}
var vpe = p_t, v_t = X6, g_t = Vf, m_t = "[object Map]";
function y_t(t) {
  return g_t(t) && v_t(t) == m_t;
}
var b_t = y_t, __t = b_t, O_t = Q6, Hq = H6, Gq = Hq && Hq.isMap, S_t = Gq ? O_t(Gq) : __t, x_t = S_t, w_t = X6, C_t = Vf, T_t = "[object Set]";
function P_t(t) {
  return C_t(t) && w_t(t) == T_t;
}
var $_t = P_t, A_t = $_t, E_t = Q6, jq = H6, Zq = jq && jq.isSet, M_t = Zq ? E_t(Zq) : A_t, I_t = M_t, D_t = qhe, R_t = omt, k_t = Jhe, L_t = Z0t, N_t = cyt, B_t = spe, z_t = lpe, V_t = xyt, F_t = Lyt, W_t = Hyt, Q_t = Xyt, H_t = X6, G_t = Obt, j_t = s_t, Z_t = vpe, U_t = n$, X_t = W6, Y_t = x_t, q_t = el, K_t = I_t, J_t = j6, e1t = P1, t1t = 1, n1t = 2, r1t = 4, gpe = "[object Arguments]", i1t = "[object Array]", a1t = "[object Boolean]", o1t = "[object Date]", s1t = "[object Error]", mpe = "[object Function]", l1t = "[object GeneratorFunction]", u1t = "[object Map]", c1t = "[object Number]", ype = "[object Object]", f1t = "[object RegExp]", d1t = "[object Set]", h1t = "[object String]", p1t = "[object Symbol]", v1t = "[object WeakMap]", g1t = "[object ArrayBuffer]", m1t = "[object DataView]", y1t = "[object Float32Array]", b1t = "[object Float64Array]", _1t = "[object Int8Array]", O1t = "[object Int16Array]", S1t = "[object Int32Array]", x1t = "[object Uint8Array]", w1t = "[object Uint8ClampedArray]", C1t = "[object Uint16Array]", T1t = "[object Uint32Array]", Un = {};
Un[gpe] = Un[i1t] = Un[g1t] = Un[m1t] = Un[a1t] = Un[o1t] = Un[y1t] = Un[b1t] = Un[_1t] = Un[O1t] = Un[S1t] = Un[u1t] = Un[c1t] = Un[ype] = Un[f1t] = Un[d1t] = Un[h1t] = Un[p1t] = Un[x1t] = Un[w1t] = Un[C1t] = Un[T1t] = !0;
Un[s1t] = Un[mpe] = Un[v1t] = !1;
function Cw(t, e, n, r, i, a) {
  var o, s = e & t1t, l = e & n1t, u = e & r1t;
  if (n && (o = i ? n(t, r, i, a) : n(t)), o !== void 0)
    return o;
  if (!q_t(t))
    return t;
  var c = U_t(t);
  if (c) {
    if (o = G_t(t), !s)
      return z_t(t, o);
  } else {
    var f = H_t(t), d = f == mpe || f == l1t;
    if (X_t(t))
      return B_t(t, s);
    if (f == ype || f == gpe || d && !i) {
      if (o = l || d ? {} : Z_t(t), !s)
        return l ? F_t(t, N_t(o, t)) : V_t(t, L_t(o, t));
    } else {
      if (!Un[f])
        return i ? t : {};
      o = j_t(t, f, s);
    }
  }
  a || (a = new D_t());
  var h = a.get(t);
  if (h)
    return h;
  a.set(t, o), K_t(t) ? t.forEach(function(g) {
    o.add(Cw(g, e, n, g, t, a));
  }) : Y_t(t) && t.forEach(function(g, m) {
    o.set(m, Cw(g, e, n, m, t, a));
  });
  var p = u ? l ? Q_t : W_t : l ? e1t : J_t, v = c ? void 0 : p(t);
  return R_t(v || t, function(g, m) {
    v && (m = g, g = t[m]), k_t(o, m, Cw(g, e, n, m, t, a));
  }), o;
}
var P1t = Cw, $1t = P1t, A1t = 1, E1t = 4;
function M1t(t) {
  return $1t(t, A1t | E1t);
}
var I1t = M1t;
const Uq = /* @__PURE__ */ g2(I1t);
var D1t = Object.defineProperty, R1t = (t, e, n) => e in t ? D1t(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Id = (t, e, n) => (R1t(t, typeof e != "symbol" ? e + "" : e, n), n);
class k1t {
  constructor() {
    Id(this, "subscriptions", /* @__PURE__ */ new Map()), Id(this, "emitEffectCache", /* @__PURE__ */ new Map()), Id(this, "useSubscription", (e, n) => {
      const r = ee();
      Vt((i) => {
        var a, o;
        r.value = n;
        function s(u) {
          r.value && r.value(u);
        }
        const l = (o = (a = this.subscriptions) == null ? void 0 : a.get(e)) != null ? o : [];
        l.push(s), this.subscriptions.set(e, l), this.emitEffect(e), i(() => {
          this.subscriptions.delete(e);
        });
      });
    }), Id(this, "emit", (e, ...n) => {
      if (typeof e == "string" || typeof e == "number") {
        const r = this.subscriptions.get(e);
        r == null || r.forEach((i) => {
          i == null || i({
            params: Uq(n),
            event: e
          });
        }), this.emitEffectCache.set(e, {
          params: Uq(n),
          event: e
        });
      } else
        throw new TypeError("event must be string or number !");
    }), Id(this, "emitEffect", (e) => {
      const n = this.emitEffectCache.get(e), r = this.subscriptions.get(e);
      n && (r == null || r.forEach((i) => {
        i == null || i({
          ...n
        });
      }));
    }), Id(this, "removeListener", (e) => {
      this.subscriptions.delete(e);
    }), Id(this, "clear", () => {
      this.subscriptions.clear();
    }), this.clear();
  }
}
new k1t();
var L1t = { exports: {} };
/*!
* screenfull
* v5.2.0 - 2021-11-03
* (c) Sindre Sorhus; MIT License
*/
(function(t) {
  (function() {
    var e = typeof window < "u" && typeof window.document < "u" ? window.document : {}, n = t.exports, r = function() {
      for (var o, s = [
        [
          "requestFullscreen",
          "exitFullscreen",
          "fullscreenElement",
          "fullscreenEnabled",
          "fullscreenchange",
          "fullscreenerror"
        ],
        // New WebKit
        [
          "webkitRequestFullscreen",
          "webkitExitFullscreen",
          "webkitFullscreenElement",
          "webkitFullscreenEnabled",
          "webkitfullscreenchange",
          "webkitfullscreenerror"
        ],
        // Old WebKit
        [
          "webkitRequestFullScreen",
          "webkitCancelFullScreen",
          "webkitCurrentFullScreenElement",
          "webkitCancelFullScreen",
          "webkitfullscreenchange",
          "webkitfullscreenerror"
        ],
        [
          "mozRequestFullScreen",
          "mozCancelFullScreen",
          "mozFullScreenElement",
          "mozFullScreenEnabled",
          "mozfullscreenchange",
          "mozfullscreenerror"
        ],
        [
          "msRequestFullscreen",
          "msExitFullscreen",
          "msFullscreenElement",
          "msFullscreenEnabled",
          "MSFullscreenChange",
          "MSFullscreenError"
        ]
      ], l = 0, u = s.length, c = {}; l < u; l++)
        if (o = s[l], o && o[1] in e) {
          for (l = 0; l < o.length; l++)
            c[s[0][l]] = o[l];
          return c;
        }
      return !1;
    }(), i = {
      change: r.fullscreenchange,
      error: r.fullscreenerror
    }, a = {
      request: function(o, s) {
        return new Promise((function(l, u) {
          var c = (function() {
            this.off("change", c), l();
          }).bind(this);
          this.on("change", c), o = o || e.documentElement;
          var f = o[r.requestFullscreen](s);
          f instanceof Promise && f.then(c).catch(u);
        }).bind(this));
      },
      exit: function() {
        return new Promise((function(o, s) {
          if (!this.isFullscreen) {
            o();
            return;
          }
          var l = (function() {
            this.off("change", l), o();
          }).bind(this);
          this.on("change", l);
          var u = e[r.exitFullscreen]();
          u instanceof Promise && u.then(l).catch(s);
        }).bind(this));
      },
      toggle: function(o, s) {
        return this.isFullscreen ? this.exit() : this.request(o, s);
      },
      onchange: function(o) {
        this.on("change", o);
      },
      onerror: function(o) {
        this.on("error", o);
      },
      on: function(o, s) {
        var l = i[o];
        l && e.addEventListener(l, s, !1);
      },
      off: function(o, s) {
        var l = i[o];
        l && e.removeEventListener(l, s, !1);
      },
      raw: r
    };
    if (!r) {
      n ? t.exports = { isEnabled: !1 } : window.screenfull = { isEnabled: !1 };
      return;
    }
    Object.defineProperties(a, {
      isFullscreen: {
        get: function() {
          return !!e[r.fullscreenElement];
        }
      },
      element: {
        enumerable: !0,
        get: function() {
          return e[r.fullscreenElement];
        }
      },
      isEnabled: {
        enumerable: !0,
        get: function() {
          return !!e[r.fullscreenEnabled];
        }
      }
    }), n ? t.exports = a : window.screenfull = a;
  })();
})(L1t);
var N1t = "__lodash_hash_undefined__";
function B1t(t) {
  return this.__data__.set(t, N1t), this;
}
var z1t = B1t;
function V1t(t) {
  return this.__data__.has(t);
}
var F1t = V1t, W1t = Yhe, Q1t = z1t, H1t = F1t;
function YL(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.__data__ = new W1t(); ++e < n; )
    this.add(t[e]);
}
YL.prototype.add = YL.prototype.push = Q1t;
YL.prototype.has = H1t;
var Xq = YP, Yq = Xq ? Xq.prototype : void 0;
Yq && Yq.valueOf;
var G1t = F6, j1t = qP;
function Z1t(t, e, n) {
  (n !== void 0 && !j1t(t[e], n) || n === void 0 && !(e in t)) && G1t(t, e, n);
}
var bpe = Z1t;
function U1t(t) {
  return function(e, n, r) {
    for (var i = -1, a = Object(e), o = r(e), s = o.length; s--; ) {
      var l = o[t ? s : ++i];
      if (n(a[l], l, a) === !1)
        break;
    }
    return e;
  };
}
var X1t = U1t, Y1t = X1t, q1t = Y1t(), K1t = q1t, J1t = r$, eOt = Vf;
function tOt(t) {
  return eOt(t) && J1t(t);
}
var nOt = tOt, rOt = km, iOt = U6, aOt = Vf, oOt = "[object Object]", sOt = Function.prototype, lOt = Object.prototype, _pe = sOt.toString, uOt = lOt.hasOwnProperty, cOt = _pe.call(Object);
function fOt(t) {
  if (!aOt(t) || rOt(t) != oOt)
    return !1;
  var e = iOt(t);
  if (e === null)
    return !0;
  var n = uOt.call(e, "constructor") && e.constructor;
  return typeof n == "function" && n instanceof n && _pe.call(n) == cOt;
}
var dOt = fOt;
function hOt(t, e) {
  if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
    return t[e];
}
var Ope = hOt, pOt = T1, vOt = P1;
function gOt(t) {
  return pOt(t, vOt(t));
}
var mOt = gOt, qq = bpe, yOt = spe, bOt = ppe, _Ot = lpe, OOt = vpe, Kq = tpe, Jq = n$, SOt = nOt, xOt = W6, wOt = z6, COt = el, TOt = dOt, POt = ipe, eK = Ope, $Ot = mOt;
function AOt(t, e, n, r, i, a, o) {
  var s = eK(t, n), l = eK(e, n), u = o.get(l);
  if (u) {
    qq(t, n, u);
    return;
  }
  var c = a ? a(s, l, n + "", t, e, o) : void 0, f = c === void 0;
  if (f) {
    var d = Jq(l), h = !d && xOt(l), p = !d && !h && POt(l);
    c = l, d || h || p ? Jq(s) ? c = s : SOt(s) ? c = _Ot(s) : h ? (f = !1, c = yOt(l, !0)) : p ? (f = !1, c = bOt(l, !0)) : c = [] : TOt(l) || Kq(l) ? (c = s, Kq(s) ? c = $Ot(s) : (!COt(s) || wOt(s)) && (c = OOt(l))) : f = !1;
  }
  f && (o.set(l, c), i(c, l, r, a, o), o.delete(l)), qq(t, n, c);
}
var EOt = AOt, MOt = qhe, IOt = bpe, DOt = K1t, ROt = EOt, kOt = el, LOt = P1, NOt = Ope;
function Spe(t, e, n, r, i) {
  t !== e && DOt(e, function(a, o) {
    if (i || (i = new MOt()), kOt(a))
      ROt(t, e, o, n, Spe, r, i);
    else {
      var s = r ? r(NOt(t, o), a, o + "", t, e, i) : void 0;
      s === void 0 && (s = a), IOt(t, o, s);
    }
  }, LOt);
}
var BOt = Spe;
function zOt(t) {
  return t;
}
var xpe = zOt;
function VOt(t, e, n) {
  switch (n.length) {
    case 0:
      return t.call(e);
    case 1:
      return t.call(e, n[0]);
    case 2:
      return t.call(e, n[0], n[1]);
    case 3:
      return t.call(e, n[0], n[1], n[2]);
  }
  return t.apply(e, n);
}
var FOt = VOt, WOt = FOt, tK = Math.max;
function QOt(t, e, n) {
  return e = tK(e === void 0 ? t.length - 1 : e, 0), function() {
    for (var r = arguments, i = -1, a = tK(r.length - e, 0), o = Array(a); ++i < a; )
      o[i] = r[e + i];
    i = -1;
    for (var s = Array(e + 1); ++i < e; )
      s[i] = r[i];
    return s[e] = n(o), WOt(t, this, s);
  };
}
var HOt = QOt;
function GOt(t) {
  return function() {
    return t;
  };
}
var jOt = GOt, ZOt = jOt, nK = Khe, UOt = xpe, XOt = nK ? function(t, e) {
  return nK(t, "toString", {
    configurable: !0,
    enumerable: !1,
    value: ZOt(e),
    writable: !0
  });
} : UOt, YOt = XOt, qOt = 800, KOt = 16, JOt = Date.now;
function eSt(t) {
  var e = 0, n = 0;
  return function() {
    var r = JOt(), i = KOt - (r - n);
    if (n = r, i > 0) {
      if (++e >= qOt)
        return arguments[0];
    } else
      e = 0;
    return t.apply(void 0, arguments);
  };
}
var tSt = eSt, nSt = YOt, rSt = tSt, iSt = rSt(nSt), aSt = iSt, oSt = xpe, sSt = HOt, lSt = aSt;
function uSt(t, e) {
  return lSt(sSt(t, e, oSt), t + "");
}
var cSt = uSt, fSt = qP, dSt = r$, hSt = npe, pSt = el;
function vSt(t, e, n) {
  if (!pSt(n))
    return !1;
  var r = typeof e;
  return (r == "number" ? dSt(n) && hSt(e, n.length) : r == "string" && e in n) ? fSt(n[e], t) : !1;
}
var gSt = vSt, mSt = cSt, ySt = gSt;
function bSt(t) {
  return mSt(function(e, n) {
    var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
    for (a = t.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && ySt(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), e = Object(e); ++r < i; ) {
      var s = n[r];
      s && t(e, s, r, a);
    }
    return e;
  });
}
var _St = bSt, OSt = BOt, SSt = _St;
SSt(function(t, e, n) {
  OSt(t, e, n);
});
const q6 = (t) => {
  var h, p, v;
  const e = t.dataSource || {}, n = ee(), r = ee(), i = ee((h = e == null ? void 0 : e.data) == null ? void 0 : h.series), a = V(() => async () => await fetch(t.dataSource.url, {
    method: t.dataSource.method
  }).then((g) => g.json())), { run: o, refresh: s, cancel: l, data: u, loading: c } = Ipt(a.value, {
    defaultParams: t.dataSource.params,
    manual: !0,
    cacheKey: t.dataSource.url,
    cacheTime: (((p = t.dataSource) == null ? void 0 : p.refreshTime) || 0) * 1e3,
    pollingInterval: (((v = t.dataSource) == null ? void 0 : v.refreshTime) || 0) * 1e3,
    // 刷新时间
    onError: (g) => {
      console.error(g), Wh.error(t.dataSource.url + "请求失败");
    }
  });
  t.dataSource.sourceType === kr.API && o(), me(
    () => u.value,
    async (g) => {
      if (g && t.dataSource.sourceType === kr.API) {
        let m = g;
        t.dataSource.dataProcess && (m = await jdt(t.dataSource.dataProcess, JSON.stringify(g))), n.value = m.xAxis || m.xData ? { data: m.xData } : n.value, r.value = m.yAxis || m.yData ? { data: m.yData } : r.value, i.value = m.series;
      }
    },
    {
      deep: !0
    }
  ), me(
    () => [
      t.dataSource.sourceType,
      t.dataSource.method,
      t.dataSource.data
    ],
    () => {
      if (t.dataSource.sourceType === kr.API && s(), t.dataSource.sourceType === kr.STATIC) {
        l();
        const g = t.dataSource || {}, { xData: m, yData: y, series: _ } = (g == null ? void 0 : g.data) || {};
        m && (n.value = { data: m }), y && (r.value = { data: y }), i.value = _;
      }
      if ([kr.BASIC_PATH, kr.VIEW_CODE].includes(t.dataSource.sourceType)) {
        const g = t.dataSource || {}, m = {
          viewCode: g.viewCode,
          basicPath: g.basicPath,
          items: "",
          filter: "",
          key: "",
          isOne: ""
        };
        window.mabp.$doLoadComponentData(m).then(function(y) {
          i.value = y.data;
        });
      }
    },
    {
      deep: !0
    }
  );
  const f = (g) => {
    var S, x, C, P;
    let m = 34, y = 20, _ = 30, O = 20;
    return !Array.isArray(g.title) && ((S = g.title) != null && S.show) && (O += 20), !Array.isArray(g.legend) && ((x = g.legend) != null && x.show) && (g.legend.left === "center" && g.legend.top !== "auto" && (O += 20), g.legend.left === "center" && g.legend.bottom !== "auto" && (m += 20), g.legend.top === "center" && g.legend.left !== "auto" && (_ += 70), g.legend.top === "center" && g.legend.right !== "auto" && (y += 50)), !Array.isArray(g.xAxis) && ((C = g.xAxis) != null && C.name) && (m += 20), !Array.isArray(g.yAxis) && ((P = g.yAxis) != null && P.name) && (_ += 20), {
      bottom: m,
      left: _,
      right: y,
      top: O
    };
  };
  return {
    options: V(() => {
      var _, O;
      const g = mte(t, [
        "width",
        "height",
        "dataSource"
      ]);
      !Array.isArray(g.title) && !((_ = g.title) != null && _.show) && !Array.isArray(g.legend) && g.legend && (g.legend.top = 12);
      const m = (g == null ? void 0 : g.label) || {}, y = pte(
        {
          xAxis: n.value,
          yAxis: r.value,
          series: (O = i.value) == null ? void 0 : O.map((S) => {
            var C;
            const x = ((C = g.series) == null ? void 0 : C[S.type]) || {};
            return {
              ...m,
              ...S,
              ...x
            };
          }),
          grid: f(g)
        },
        g
      );
      return console.log("option result:", y), y;
    }),
    loading: c
  };
}, xSt = ae({
  name: "DBasicLine",
  components: { Charts: D6 },
  props: L6,
  setup(t) {
    const { options: e, loading: n } = q6(t);
    return {
      options: e,
      loading: n
    };
  }
});
function wSt(t, e, n, r, i, a) {
  const o = $r("Charts");
  return be(), Je(o, {
    width: t.width,
    height: t.height,
    "echarts-options": t.options,
    loading: t.loading
  }, null, 8, ["width", "height", "echarts-options", "loading"]);
}
const ng = /* @__PURE__ */ ui(xSt, [["render", wSt]]);
class Sn {
  /**
  Get the line description around the given position.
  */
  lineAt(e) {
    if (e < 0 || e > this.length)
      throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);
    return this.lineInner(e, !1, 1, 0);
  }
  /**
  Get the description for the given (1-based) line number.
  */
  line(e) {
    if (e < 1 || e > this.lines)
      throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);
    return this.lineInner(e, !0, 1, 0);
  }
  /**
  Replace a range of the text with the given content.
  */
  replace(e, n, r) {
    [e, n] = qg(this, e, n);
    let i = [];
    return this.decompose(
      0,
      e,
      i,
      2
      /* Open.To */
    ), r.length && r.decompose(
      0,
      r.length,
      i,
      3
      /* Open.To */
    ), this.decompose(
      n,
      this.length,
      i,
      1
      /* Open.From */
    ), Cl.from(i, this.length - (n - e) + r.length);
  }
  /**
  Append another document to this one.
  */
  append(e) {
    return this.replace(this.length, this.length, e);
  }
  /**
  Retrieve the text between the given points.
  */
  slice(e, n = this.length) {
    [e, n] = qg(this, e, n);
    let r = [];
    return this.decompose(e, n, r, 0), Cl.from(r, n - e);
  }
  /**
  Test whether this text is equal to another instance.
  */
  eq(e) {
    if (e == this)
      return !0;
    if (e.length != this.length || e.lines != this.lines)
      return !1;
    let n = this.scanIdentical(e, 1), r = this.length - this.scanIdentical(e, -1), i = new hb(this), a = new hb(e);
    for (let o = n, s = n; ; ) {
      if (i.next(o), a.next(o), o = 0, i.lineBreak != a.lineBreak || i.done != a.done || i.value != a.value)
        return !1;
      if (s += i.value.length, i.done || s >= r)
        return !0;
    }
  }
  /**
  Iterate over the text. When `dir` is `-1`, iteration happens
  from end to start. This will return lines and the breaks between
  them as separate strings.
  */
  iter(e = 1) {
    return new hb(this, e);
  }
  /**
  Iterate over a range of the text. When `from` > `to`, the
  iterator will run in reverse.
  */
  iterRange(e, n = this.length) {
    return new wpe(this, e, n);
  }
  /**
  Return a cursor that iterates over the given range of lines,
  _without_ returning the line breaks between, and yielding empty
  strings for empty lines.
  
  When `from` and `to` are given, they should be 1-based line numbers.
  */
  iterLines(e, n) {
    let r;
    if (e == null)
      r = this.iter();
    else {
      n == null && (n = this.lines + 1);
      let i = this.line(e).from;
      r = this.iterRange(i, Math.max(i, n == this.lines + 1 ? this.length : n <= 1 ? 0 : this.line(n - 1).to));
    }
    return new Cpe(r);
  }
  /**
  Return the document as a string, using newline characters to
  separate lines.
  */
  toString() {
    return this.sliceString(0);
  }
  /**
  Convert the document to an array of lines (which can be
  deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)).
  */
  toJSON() {
    let e = [];
    return this.flatten(e), e;
  }
  /**
  @internal
  */
  constructor() {
  }
  /**
  Create a `Text` instance for the given array of lines.
  */
  static of(e) {
    if (e.length == 0)
      throw new RangeError("A document must have at least one line");
    return e.length == 1 && !e[0] ? Sn.empty : e.length <= 32 ? new Pr(e) : Cl.from(Pr.split(e, []));
  }
}
class Pr extends Sn {
  constructor(e, n = CSt(e)) {
    super(), this.text = e, this.length = n;
  }
  get lines() {
    return this.text.length;
  }
  get children() {
    return null;
  }
  lineInner(e, n, r, i) {
    for (let a = 0; ; a++) {
      let o = this.text[a], s = i + o.length;
      if ((n ? r : s) >= e)
        return new TSt(i, s, r, o);
      i = s + 1, r++;
    }
  }
  decompose(e, n, r, i) {
    let a = e <= 0 && n >= this.length ? this : new Pr(rK(this.text, e, n), Math.min(n, this.length) - Math.max(0, e));
    if (i & 1) {
      let o = r.pop(), s = Tw(a.text, o.text.slice(), 0, a.length);
      if (s.length <= 32)
        r.push(new Pr(s, o.length + a.length));
      else {
        let l = s.length >> 1;
        r.push(new Pr(s.slice(0, l)), new Pr(s.slice(l)));
      }
    } else
      r.push(a);
  }
  replace(e, n, r) {
    if (!(r instanceof Pr))
      return super.replace(e, n, r);
    [e, n] = qg(this, e, n);
    let i = Tw(this.text, Tw(r.text, rK(this.text, 0, e)), n), a = this.length + r.length - (n - e);
    return i.length <= 32 ? new Pr(i, a) : Cl.from(Pr.split(i, []), a);
  }
  sliceString(e, n = this.length, r = `
`) {
    [e, n] = qg(this, e, n);
    let i = "";
    for (let a = 0, o = 0; a <= n && o < this.text.length; o++) {
      let s = this.text[o], l = a + s.length;
      a > e && o && (i += r), e < l && n > a && (i += s.slice(Math.max(0, e - a), n - a)), a = l + 1;
    }
    return i;
  }
  flatten(e) {
    for (let n of this.text)
      e.push(n);
  }
  scanIdentical() {
    return 0;
  }
  static split(e, n) {
    let r = [], i = -1;
    for (let a of e)
      r.push(a), i += a.length + 1, r.length == 32 && (n.push(new Pr(r, i)), r = [], i = -1);
    return i > -1 && n.push(new Pr(r, i)), n;
  }
}
class Cl extends Sn {
  constructor(e, n) {
    super(), this.children = e, this.length = n, this.lines = 0;
    for (let r of e)
      this.lines += r.lines;
  }
  lineInner(e, n, r, i) {
    for (let a = 0; ; a++) {
      let o = this.children[a], s = i + o.length, l = r + o.lines - 1;
      if ((n ? l : s) >= e)
        return o.lineInner(e, n, r, i);
      i = s + 1, r = l + 1;
    }
  }
  decompose(e, n, r, i) {
    for (let a = 0, o = 0; o <= n && a < this.children.length; a++) {
      let s = this.children[a], l = o + s.length;
      if (e <= l && n >= o) {
        let u = i & ((o <= e ? 1 : 0) | (l >= n ? 2 : 0));
        o >= e && l <= n && !u ? r.push(s) : s.decompose(e - o, n - o, r, u);
      }
      o = l + 1;
    }
  }
  replace(e, n, r) {
    if ([e, n] = qg(this, e, n), r.lines < this.lines)
      for (let i = 0, a = 0; i < this.children.length; i++) {
        let o = this.children[i], s = a + o.length;
        if (e >= a && n <= s) {
          let l = o.replace(e - a, n - a, r), u = this.lines - o.lines + l.lines;
          if (l.lines < u >> 4 && l.lines > u >> 6) {
            let c = this.children.slice();
            return c[i] = l, new Cl(c, this.length - (n - e) + r.length);
          }
          return super.replace(a, s, l);
        }
        a = s + 1;
      }
    return super.replace(e, n, r);
  }
  sliceString(e, n = this.length, r = `
`) {
    [e, n] = qg(this, e, n);
    let i = "";
    for (let a = 0, o = 0; a < this.children.length && o <= n; a++) {
      let s = this.children[a], l = o + s.length;
      o > e && a && (i += r), e < l && n > o && (i += s.sliceString(e - o, n - o, r)), o = l + 1;
    }
    return i;
  }
  flatten(e) {
    for (let n of this.children)
      n.flatten(e);
  }
  scanIdentical(e, n) {
    if (!(e instanceof Cl))
      return 0;
    let r = 0, [i, a, o, s] = n > 0 ? [0, 0, this.children.length, e.children.length] : [this.children.length - 1, e.children.length - 1, -1, -1];
    for (; ; i += n, a += n) {
      if (i == o || a == s)
        return r;
      let l = this.children[i], u = e.children[a];
      if (l != u)
        return r + l.scanIdentical(u, n);
      r += l.length + 1;
    }
  }
  static from(e, n = e.reduce((r, i) => r + i.length + 1, -1)) {
    let r = 0;
    for (let h of e)
      r += h.lines;
    if (r < 32) {
      let h = [];
      for (let p of e)
        p.flatten(h);
      return new Pr(h, n);
    }
    let i = Math.max(
      32,
      r >> 5
      /* Tree.BranchShift */
    ), a = i << 1, o = i >> 1, s = [], l = 0, u = -1, c = [];
    function f(h) {
      let p;
      if (h.lines > a && h instanceof Cl)
        for (let v of h.children)
          f(v);
      else h.lines > o && (l > o || !l) ? (d(), s.push(h)) : h instanceof Pr && l && (p = c[c.length - 1]) instanceof Pr && h.lines + p.lines <= 32 ? (l += h.lines, u += h.length + 1, c[c.length - 1] = new Pr(p.text.concat(h.text), p.length + 1 + h.length)) : (l + h.lines > i && d(), l += h.lines, u += h.length + 1, c.push(h));
    }
    function d() {
      l != 0 && (s.push(c.length == 1 ? c[0] : Cl.from(c, u)), u = -1, l = c.length = 0);
    }
    for (let h of e)
      f(h);
    return d(), s.length == 1 ? s[0] : new Cl(s, n);
  }
}
Sn.empty = /* @__PURE__ */ new Pr([""], 0);
function CSt(t) {
  let e = -1;
  for (let n of t)
    e += n.length + 1;
  return e;
}
function Tw(t, e, n = 0, r = 1e9) {
  for (let i = 0, a = 0, o = !0; a < t.length && i <= r; a++) {
    let s = t[a], l = i + s.length;
    l >= n && (l > r && (s = s.slice(0, r - i)), i < n && (s = s.slice(n - i)), o ? (e[e.length - 1] += s, o = !1) : e.push(s)), i = l + 1;
  }
  return e;
}
function rK(t, e, n) {
  return Tw(t, [""], e, n);
}
class hb {
  constructor(e, n = 1) {
    this.dir = n, this.done = !1, this.lineBreak = !1, this.value = "", this.nodes = [e], this.offsets = [n > 0 ? 1 : (e instanceof Pr ? e.text.length : e.children.length) << 1];
  }
  nextInner(e, n) {
    for (this.done = this.lineBreak = !1; ; ) {
      let r = this.nodes.length - 1, i = this.nodes[r], a = this.offsets[r], o = a >> 1, s = i instanceof Pr ? i.text.length : i.children.length;
      if (o == (n > 0 ? s : 0)) {
        if (r == 0)
          return this.done = !0, this.value = "", this;
        n > 0 && this.offsets[r - 1]++, this.nodes.pop(), this.offsets.pop();
      } else if ((a & 1) == (n > 0 ? 0 : 1)) {
        if (this.offsets[r] += n, e == 0)
          return this.lineBreak = !0, this.value = `
`, this;
        e--;
      } else if (i instanceof Pr) {
        let l = i.text[o + (n < 0 ? -1 : 0)];
        if (this.offsets[r] += n, l.length > Math.max(0, e))
          return this.value = e == 0 ? l : n > 0 ? l.slice(e) : l.slice(0, l.length - e), this;
        e -= l.length;
      } else {
        let l = i.children[o + (n < 0 ? -1 : 0)];
        e > l.length ? (e -= l.length, this.offsets[r] += n) : (n < 0 && this.offsets[r]--, this.nodes.push(l), this.offsets.push(n > 0 ? 1 : (l instanceof Pr ? l.text.length : l.children.length) << 1));
      }
    }
  }
  next(e = 0) {
    return e < 0 && (this.nextInner(-e, -this.dir), e = this.value.length), this.nextInner(e, this.dir);
  }
}
class wpe {
  constructor(e, n, r) {
    this.value = "", this.done = !1, this.cursor = new hb(e, n > r ? -1 : 1), this.pos = n > r ? e.length : 0, this.from = Math.min(n, r), this.to = Math.max(n, r);
  }
  nextInner(e, n) {
    if (n < 0 ? this.pos <= this.from : this.pos >= this.to)
      return this.value = "", this.done = !0, this;
    e += Math.max(0, n < 0 ? this.pos - this.to : this.from - this.pos);
    let r = n < 0 ? this.pos - this.from : this.to - this.pos;
    e > r && (e = r), r -= e;
    let { value: i } = this.cursor.next(e);
    return this.pos += (i.length + e) * n, this.value = i.length <= r ? i : n < 0 ? i.slice(i.length - r) : i.slice(0, r), this.done = !this.value, this;
  }
  next(e = 0) {
    return e < 0 ? e = Math.max(e, this.from - this.pos) : e > 0 && (e = Math.min(e, this.to - this.pos)), this.nextInner(e, this.cursor.dir);
  }
  get lineBreak() {
    return this.cursor.lineBreak && this.value != "";
  }
}
class Cpe {
  constructor(e) {
    this.inner = e, this.afterBreak = !0, this.value = "", this.done = !1;
  }
  next(e = 0) {
    let { done: n, lineBreak: r, value: i } = this.inner.next(e);
    return n && this.afterBreak ? (this.value = "", this.afterBreak = !1) : n ? (this.done = !0, this.value = "") : r ? this.afterBreak ? this.value = "" : (this.afterBreak = !0, this.next()) : (this.value = i, this.afterBreak = !1), this;
  }
  get lineBreak() {
    return !1;
  }
}
typeof Symbol < "u" && (Sn.prototype[Symbol.iterator] = function() {
  return this.iter();
}, hb.prototype[Symbol.iterator] = wpe.prototype[Symbol.iterator] = Cpe.prototype[Symbol.iterator] = function() {
  return this;
});
class TSt {
  /**
  @internal
  */
  constructor(e, n, r, i) {
    this.from = e, this.to = n, this.number = r, this.text = i;
  }
  /**
  The length of the line (not including any line break after it).
  */
  get length() {
    return this.to - this.from;
  }
}
function qg(t, e, n) {
  return e = Math.max(0, Math.min(t.length, e)), [e, Math.max(e, Math.min(t.length, n))];
}
let rg = /* @__PURE__ */ "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t) => t ? parseInt(t, 36) : 1);
for (let t = 1; t < rg.length; t++)
  rg[t] += rg[t - 1];
function PSt(t) {
  for (let e = 1; e < rg.length; e += 2)
    if (rg[e] > t)
      return rg[e - 1] <= t;
  return !1;
}
function iK(t) {
  return t >= 127462 && t <= 127487;
}
const aK = 8205;
function wi(t, e, n = !0, r = !0) {
  return (n ? Tpe : $St)(t, e, r);
}
function Tpe(t, e, n) {
  if (e == t.length)
    return e;
  e && Ppe(t.charCodeAt(e)) && $pe(t.charCodeAt(e - 1)) && e--;
  let r = bi(t, e);
  for (e += jo(r); e < t.length; ) {
    let i = bi(t, e);
    if (r == aK || i == aK || n && PSt(i))
      e += jo(i), r = i;
    else if (iK(i)) {
      let a = 0, o = e - 2;
      for (; o >= 0 && iK(bi(t, o)); )
        a++, o -= 2;
      if (a % 2 == 0)
        break;
      e += 2;
    } else
      break;
  }
  return e;
}
function $St(t, e, n) {
  for (; e > 0; ) {
    let r = Tpe(t, e - 2, n);
    if (r < e)
      return r;
    e--;
  }
  return 0;
}
function Ppe(t) {
  return t >= 56320 && t < 57344;
}
function $pe(t) {
  return t >= 55296 && t < 56320;
}
function bi(t, e) {
  let n = t.charCodeAt(e);
  if (!$pe(n) || e + 1 == t.length)
    return n;
  let r = t.charCodeAt(e + 1);
  return Ppe(r) ? (n - 55296 << 10) + (r - 56320) + 65536 : n;
}
function K6(t) {
  return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
}
function jo(t) {
  return t < 65536 ? 1 : 2;
}
const qL = /\r\n?|\n/;
var Oi = /* @__PURE__ */ function(t) {
  return t[t.Simple = 0] = "Simple", t[t.TrackDel = 1] = "TrackDel", t[t.TrackBefore = 2] = "TrackBefore", t[t.TrackAfter = 3] = "TrackAfter", t;
}(Oi || (Oi = {}));
class Bl {
  // Sections are encoded as pairs of integers. The first is the
  // length in the current document, and the second is -1 for
  // unaffected sections, and the length of the replacement content
  // otherwise. So an insertion would be (0, n>0), a deletion (n>0,
  // 0), and a replacement two positive numbers.
  /**
  @internal
  */
  constructor(e) {
    this.sections = e;
  }
  /**
  The length of the document before the change.
  */
  get length() {
    let e = 0;
    for (let n = 0; n < this.sections.length; n += 2)
      e += this.sections[n];
    return e;
  }
  /**
  The length of the document after the change.
  */
  get newLength() {
    let e = 0;
    for (let n = 0; n < this.sections.length; n += 2) {
      let r = this.sections[n + 1];
      e += r < 0 ? this.sections[n] : r;
    }
    return e;
  }
  /**
  False when there are actual changes in this set.
  */
  get empty() {
    return this.sections.length == 0 || this.sections.length == 2 && this.sections[1] < 0;
  }
  /**
  Iterate over the unchanged parts left by these changes. `posA`
  provides the position of the range in the old document, `posB`
  the new position in the changed document.
  */
  iterGaps(e) {
    for (let n = 0, r = 0, i = 0; n < this.sections.length; ) {
      let a = this.sections[n++], o = this.sections[n++];
      o < 0 ? (e(r, i, a), i += a) : i += o, r += a;
    }
  }
  /**
  Iterate over the ranges changed by these changes. (See
  [`ChangeSet.iterChanges`](https://codemirror.net/6/docs/ref/#state.ChangeSet.iterChanges) for a
  variant that also provides you with the inserted text.)
  `fromA`/`toA` provides the extent of the change in the starting
  document, `fromB`/`toB` the extent of the replacement in the
  changed document.
  
  When `individual` is true, adjacent changes (which are kept
  separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are
  reported separately.
  */
  iterChangedRanges(e, n = !1) {
    KL(this, e, n);
  }
  /**
  Get a description of the inverted form of these changes.
  */
  get invertedDesc() {
    let e = [];
    for (let n = 0; n < this.sections.length; ) {
      let r = this.sections[n++], i = this.sections[n++];
      i < 0 ? e.push(r, i) : e.push(i, r);
    }
    return new Bl(e);
  }
  /**
  Compute the combined effect of applying another set of changes
  after this one. The length of the document after this set should
  match the length before `other`.
  */
  composeDesc(e) {
    return this.empty ? e : e.empty ? this : Ape(this, e);
  }
  /**
  Map this description, which should start with the same document
  as `other`, over another set of changes, so that it can be
  applied after it. When `before` is true, map as if the changes
  in `other` happened before the ones in `this`.
  */
  mapDesc(e, n = !1) {
    return e.empty ? this : JL(this, e, n);
  }
  mapPos(e, n = -1, r = Oi.Simple) {
    let i = 0, a = 0;
    for (let o = 0; o < this.sections.length; ) {
      let s = this.sections[o++], l = this.sections[o++], u = i + s;
      if (l < 0) {
        if (u > e)
          return a + (e - i);
        a += s;
      } else {
        if (r != Oi.Simple && u >= e && (r == Oi.TrackDel && i < e && u > e || r == Oi.TrackBefore && i < e || r == Oi.TrackAfter && u > e))
          return null;
        if (u > e || u == e && n < 0 && !s)
          return e == i || n < 0 ? a : a + l;
        a += l;
      }
      i = u;
    }
    if (e > i)
      throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);
    return a;
  }
  /**
  Check whether these changes touch a given range. When one of the
  changes entirely covers the range, the string `"cover"` is
  returned.
  */
  touchesRange(e, n = e) {
    for (let r = 0, i = 0; r < this.sections.length && i <= n; ) {
      let a = this.sections[r++], o = this.sections[r++], s = i + a;
      if (o >= 0 && i <= n && s >= e)
        return i < e && s > n ? "cover" : !0;
      i = s;
    }
    return !1;
  }
  /**
  @internal
  */
  toString() {
    let e = "";
    for (let n = 0; n < this.sections.length; ) {
      let r = this.sections[n++], i = this.sections[n++];
      e += (e ? " " : "") + r + (i >= 0 ? ":" + i : "");
    }
    return e;
  }
  /**
  Serialize this change desc to a JSON-representable value.
  */
  toJSON() {
    return this.sections;
  }
  /**
  Create a change desc from its JSON representation (as produced
  by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeDesc.toJSON).
  */
  static fromJSON(e) {
    if (!Array.isArray(e) || e.length % 2 || e.some((n) => typeof n != "number"))
      throw new RangeError("Invalid JSON representation of ChangeDesc");
    return new Bl(e);
  }
  /**
  @internal
  */
  static create(e) {
    return new Bl(e);
  }
}
class Zr extends Bl {
  constructor(e, n) {
    super(e), this.inserted = n;
  }
  /**
  Apply the changes to a document, returning the modified
  document.
  */
  apply(e) {
    if (this.length != e.length)
      throw new RangeError("Applying change set to a document with the wrong length");
    return KL(this, (n, r, i, a, o) => e = e.replace(i, i + (r - n), o), !1), e;
  }
  mapDesc(e, n = !1) {
    return JL(this, e, n, !0);
  }
  /**
  Given the document as it existed _before_ the changes, return a
  change set that represents the inverse of this set, which could
  be used to go from the document created by the changes back to
  the document as it existed before the changes.
  */
  invert(e) {
    let n = this.sections.slice(), r = [];
    for (let i = 0, a = 0; i < n.length; i += 2) {
      let o = n[i], s = n[i + 1];
      if (s >= 0) {
        n[i] = s, n[i + 1] = o;
        let l = i >> 1;
        for (; r.length < l; )
          r.push(Sn.empty);
        r.push(o ? e.slice(a, a + o) : Sn.empty);
      }
      a += o;
    }
    return new Zr(n, r);
  }
  /**
  Combine two subsequent change sets into a single set. `other`
  must start in the document produced by `this`. If `this` goes
  `docA` → `docB` and `other` represents `docB` → `docC`, the
  returned value will represent the change `docA` → `docC`.
  */
  compose(e) {
    return this.empty ? e : e.empty ? this : Ape(this, e, !0);
  }
  /**
  Given another change set starting in the same document, maps this
  change set over the other, producing a new change set that can be
  applied to the document produced by applying `other`. When
  `before` is `true`, order changes as if `this` comes before
  `other`, otherwise (the default) treat `other` as coming first.
  
  Given two changes `A` and `B`, `A.compose(B.map(A))` and
  `B.compose(A.map(B, true))` will produce the same document. This
  provides a basic form of [operational
  transformation](https://en.wikipedia.org/wiki/Operational_transformation),
  and can be used for collaborative editing.
  */
  map(e, n = !1) {
    return e.empty ? this : JL(this, e, n, !0);
  }
  /**
  Iterate over the changed ranges in the document, calling `f` for
  each, with the range in the original document (`fromA`-`toA`)
  and the range that replaces it in the new document
  (`fromB`-`toB`).
  
  When `individual` is true, adjacent changes are reported
  separately.
  */
  iterChanges(e, n = !1) {
    KL(this, e, n);
  }
  /**
  Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change
  set.
  */
  get desc() {
    return Bl.create(this.sections);
  }
  /**
  @internal
  */
  filter(e) {
    let n = [], r = [], i = [], a = new v_(this);
    e: for (let o = 0, s = 0; ; ) {
      let l = o == e.length ? 1e9 : e[o++];
      for (; s < l || s == l && a.len == 0; ) {
        if (a.done)
          break e;
        let c = Math.min(a.len, l - s);
        Ni(i, c, -1);
        let f = a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0;
        Ni(n, c, f), f > 0 && Xc(r, n, a.text), a.forward(c), s += c;
      }
      let u = e[o++];
      for (; s < u; ) {
        if (a.done)
          break e;
        let c = Math.min(a.len, u - s);
        Ni(n, c, -1), Ni(i, c, a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0), a.forward(c), s += c;
      }
    }
    return {
      changes: new Zr(n, r),
      filtered: Bl.create(i)
    };
  }
  /**
  Serialize this change set to a JSON-representable value.
  */
  toJSON() {
    let e = [];
    for (let n = 0; n < this.sections.length; n += 2) {
      let r = this.sections[n], i = this.sections[n + 1];
      i < 0 ? e.push(r) : i == 0 ? e.push([r]) : e.push([r].concat(this.inserted[n >> 1].toJSON()));
    }
    return e;
  }
  /**
  Create a change set for the given changes, for a document of the
  given length, using `lineSep` as line separator.
  */
  static of(e, n, r) {
    let i = [], a = [], o = 0, s = null;
    function l(c = !1) {
      if (!c && !i.length)
        return;
      o < n && Ni(i, n - o, -1);
      let f = new Zr(i, a);
      s = s ? s.compose(f.map(s)) : f, i = [], a = [], o = 0;
    }
    function u(c) {
      if (Array.isArray(c))
        for (let f of c)
          u(f);
      else if (c instanceof Zr) {
        if (c.length != n)
          throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${n})`);
        l(), s = s ? s.compose(c.map(s)) : c;
      } else {
        let { from: f, to: d = f, insert: h } = c;
        if (f > d || f < 0 || d > n)
          throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);
        let p = h ? typeof h == "string" ? Sn.of(h.split(r || qL)) : h : Sn.empty, v = p.length;
        if (f == d && v == 0)
          return;
        f < o && l(), f > o && Ni(i, f - o, -1), Ni(i, d - f, v), Xc(a, i, p), o = d;
      }
    }
    return u(e), l(!s), s;
  }
  /**
  Create an empty changeset of the given length.
  */
  static empty(e) {
    return new Zr(e ? [e, -1] : [], []);
  }
  /**
  Create a changeset from its JSON representation (as produced by
  [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeSet.toJSON).
  */
  static fromJSON(e) {
    if (!Array.isArray(e))
      throw new RangeError("Invalid JSON representation of ChangeSet");
    let n = [], r = [];
    for (let i = 0; i < e.length; i++) {
      let a = e[i];
      if (typeof a == "number")
        n.push(a, -1);
      else {
        if (!Array.isArray(a) || typeof a[0] != "number" || a.some((o, s) => s && typeof o != "string"))
          throw new RangeError("Invalid JSON representation of ChangeSet");
        if (a.length == 1)
          n.push(a[0], 0);
        else {
          for (; r.length < i; )
            r.push(Sn.empty);
          r[i] = Sn.of(a.slice(1)), n.push(a[0], r[i].length);
        }
      }
    }
    return new Zr(n, r);
  }
  /**
  @internal
  */
  static createSet(e, n) {
    return new Zr(e, n);
  }
}
function Ni(t, e, n, r = !1) {
  if (e == 0 && n <= 0)
    return;
  let i = t.length - 2;
  i >= 0 && n <= 0 && n == t[i + 1] ? t[i] += e : e == 0 && t[i] == 0 ? t[i + 1] += n : r ? (t[i] += e, t[i + 1] += n) : t.push(e, n);
}
function Xc(t, e, n) {
  if (n.length == 0)
    return;
  let r = e.length - 2 >> 1;
  if (r < t.length)
    t[t.length - 1] = t[t.length - 1].append(n);
  else {
    for (; t.length < r; )
      t.push(Sn.empty);
    t.push(n);
  }
}
function KL(t, e, n) {
  let r = t.inserted;
  for (let i = 0, a = 0, o = 0; o < t.sections.length; ) {
    let s = t.sections[o++], l = t.sections[o++];
    if (l < 0)
      i += s, a += s;
    else {
      let u = i, c = a, f = Sn.empty;
      for (; u += s, c += l, l && r && (f = f.append(r[o - 2 >> 1])), !(n || o == t.sections.length || t.sections[o + 1] < 0); )
        s = t.sections[o++], l = t.sections[o++];
      e(i, u, a, c, f), i = u, a = c;
    }
  }
}
function JL(t, e, n, r = !1) {
  let i = [], a = r ? [] : null, o = new v_(t), s = new v_(e);
  for (let l = -1; ; )
    if (o.ins == -1 && s.ins == -1) {
      let u = Math.min(o.len, s.len);
      Ni(i, u, -1), o.forward(u), s.forward(u);
    } else if (s.ins >= 0 && (o.ins < 0 || l == o.i || o.off == 0 && (s.len < o.len || s.len == o.len && !n))) {
      let u = s.len;
      for (Ni(i, s.ins, -1); u; ) {
        let c = Math.min(o.len, u);
        o.ins >= 0 && l < o.i && o.len <= c && (Ni(i, 0, o.ins), a && Xc(a, i, o.text), l = o.i), o.forward(c), u -= c;
      }
      s.next();
    } else if (o.ins >= 0) {
      let u = 0, c = o.len;
      for (; c; )
        if (s.ins == -1) {
          let f = Math.min(c, s.len);
          u += f, c -= f, s.forward(f);
        } else if (s.ins == 0 && s.len < c)
          c -= s.len, s.next();
        else
          break;
      Ni(i, u, l < o.i ? o.ins : 0), a && l < o.i && Xc(a, i, o.text), l = o.i, o.forward(o.len - c);
    } else {
      if (o.done && s.done)
        return a ? Zr.createSet(i, a) : Bl.create(i);
      throw new Error("Mismatched change set lengths");
    }
}
function Ape(t, e, n = !1) {
  let r = [], i = n ? [] : null, a = new v_(t), o = new v_(e);
  for (let s = !1; ; ) {
    if (a.done && o.done)
      return i ? Zr.createSet(r, i) : Bl.create(r);
    if (a.ins == 0)
      Ni(r, a.len, 0, s), a.next();
    else if (o.len == 0 && !o.done)
      Ni(r, 0, o.ins, s), i && Xc(i, r, o.text), o.next();
    else {
      if (a.done || o.done)
        throw new Error("Mismatched change set lengths");
      {
        let l = Math.min(a.len2, o.len), u = r.length;
        if (a.ins == -1) {
          let c = o.ins == -1 ? -1 : o.off ? 0 : o.ins;
          Ni(r, l, c, s), i && c && Xc(i, r, o.text);
        } else o.ins == -1 ? (Ni(r, a.off ? 0 : a.len, l, s), i && Xc(i, r, a.textBit(l))) : (Ni(r, a.off ? 0 : a.len, o.off ? 0 : o.ins, s), i && !o.off && Xc(i, r, o.text));
        s = (a.ins > l || o.ins >= 0 && o.len > l) && (s || r.length > u), a.forward2(l), o.forward(l);
      }
    }
  }
}
class v_ {
  constructor(e) {
    this.set = e, this.i = 0, this.next();
  }
  next() {
    let { sections: e } = this.set;
    this.i < e.length ? (this.len = e[this.i++], this.ins = e[this.i++]) : (this.len = 0, this.ins = -2), this.off = 0;
  }
  get done() {
    return this.ins == -2;
  }
  get len2() {
    return this.ins < 0 ? this.len : this.ins;
  }
  get text() {
    let { inserted: e } = this.set, n = this.i - 2 >> 1;
    return n >= e.length ? Sn.empty : e[n];
  }
  textBit(e) {
    let { inserted: n } = this.set, r = this.i - 2 >> 1;
    return r >= n.length && !e ? Sn.empty : n[r].slice(this.off, e == null ? void 0 : this.off + e);
  }
  forward(e) {
    e == this.len ? this.next() : (this.len -= e, this.off += e);
  }
  forward2(e) {
    this.ins == -1 ? this.forward(e) : e == this.ins ? this.next() : (this.ins -= e, this.off += e);
  }
}
class fh {
  constructor(e, n, r) {
    this.from = e, this.to = n, this.flags = r;
  }
  /**
  The anchor of the range—the side that doesn't move when you
  extend it.
  */
  get anchor() {
    return this.flags & 32 ? this.to : this.from;
  }
  /**
  The head of the range, which is moved when the range is
  [extended](https://codemirror.net/6/docs/ref/#state.SelectionRange.extend).
  */
  get head() {
    return this.flags & 32 ? this.from : this.to;
  }
  /**
  True when `anchor` and `head` are at the same position.
  */
  get empty() {
    return this.from == this.to;
  }
  /**
  If this is a cursor that is explicitly associated with the
  character on one of its sides, this returns the side. -1 means
  the character before its position, 1 the character after, and 0
  means no association.
  */
  get assoc() {
    return this.flags & 8 ? -1 : this.flags & 16 ? 1 : 0;
  }
  /**
  The bidirectional text level associated with this cursor, if
  any.
  */
  get bidiLevel() {
    let e = this.flags & 7;
    return e == 7 ? null : e;
  }
  /**
  The goal column (stored vertical offset) associated with a
  cursor. This is used to preserve the vertical position when
  [moving](https://codemirror.net/6/docs/ref/#view.EditorView.moveVertically) across
  lines of different length.
  */
  get goalColumn() {
    let e = this.flags >> 6;
    return e == 16777215 ? void 0 : e;
  }
  /**
  Map this range through a change, producing a valid range in the
  updated document.
  */
  map(e, n = -1) {
    let r, i;
    return this.empty ? r = i = e.mapPos(this.from, n) : (r = e.mapPos(this.from, 1), i = e.mapPos(this.to, -1)), r == this.from && i == this.to ? this : new fh(r, i, this.flags);
  }
  /**
  Extend this range to cover at least `from` to `to`.
  */
  extend(e, n = e) {
    if (e <= this.anchor && n >= this.anchor)
      return De.range(e, n);
    let r = Math.abs(e - this.anchor) > Math.abs(n - this.anchor) ? e : n;
    return De.range(this.anchor, r);
  }
  /**
  Compare this range to another range.
  */
  eq(e, n = !1) {
    return this.anchor == e.anchor && this.head == e.head && (!n || !this.empty || this.assoc == e.assoc);
  }
  /**
  Return a JSON-serializable object representing the range.
  */
  toJSON() {
    return { anchor: this.anchor, head: this.head };
  }
  /**
  Convert a JSON representation of a range to a `SelectionRange`
  instance.
  */
  static fromJSON(e) {
    if (!e || typeof e.anchor != "number" || typeof e.head != "number")
      throw new RangeError("Invalid JSON representation for SelectionRange");
    return De.range(e.anchor, e.head);
  }
  /**
  @internal
  */
  static create(e, n, r) {
    return new fh(e, n, r);
  }
}
class De {
  constructor(e, n) {
    this.ranges = e, this.mainIndex = n;
  }
  /**
  Map a selection through a change. Used to adjust the selection
  position for changes.
  */
  map(e, n = -1) {
    return e.empty ? this : De.create(this.ranges.map((r) => r.map(e, n)), this.mainIndex);
  }
  /**
  Compare this selection to another selection. By default, ranges
  are compared only by position. When `includeAssoc` is true,
  cursor ranges must also have the same
  [`assoc`](https://codemirror.net/6/docs/ref/#state.SelectionRange.assoc) value.
  */
  eq(e, n = !1) {
    if (this.ranges.length != e.ranges.length || this.mainIndex != e.mainIndex)
      return !1;
    for (let r = 0; r < this.ranges.length; r++)
      if (!this.ranges[r].eq(e.ranges[r], n))
        return !1;
    return !0;
  }
  /**
  Get the primary selection range. Usually, you should make sure
  your code applies to _all_ ranges, by using methods like
  [`changeByRange`](https://codemirror.net/6/docs/ref/#state.EditorState.changeByRange).
  */
  get main() {
    return this.ranges[this.mainIndex];
  }
  /**
  Make sure the selection only has one range. Returns a selection
  holding only the main range from this selection.
  */
  asSingle() {
    return this.ranges.length == 1 ? this : new De([this.main], 0);
  }
  /**
  Extend this selection with an extra range.
  */
  addRange(e, n = !0) {
    return De.create([e].concat(this.ranges), n ? 0 : this.mainIndex + 1);
  }
  /**
  Replace a given range with another range, and then normalize the
  selection to merge and sort ranges if necessary.
  */
  replaceRange(e, n = this.mainIndex) {
    let r = this.ranges.slice();
    return r[n] = e, De.create(r, this.mainIndex);
  }
  /**
  Convert this selection to an object that can be serialized to
  JSON.
  */
  toJSON() {
    return { ranges: this.ranges.map((e) => e.toJSON()), main: this.mainIndex };
  }
  /**
  Create a selection from a JSON representation.
  */
  static fromJSON(e) {
    if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length)
      throw new RangeError("Invalid JSON representation for EditorSelection");
    return new De(e.ranges.map((n) => fh.fromJSON(n)), e.main);
  }
  /**
  Create a selection holding a single range.
  */
  static single(e, n = e) {
    return new De([De.range(e, n)], 0);
  }
  /**
  Sort and merge the given set of ranges, creating a valid
  selection.
  */
  static create(e, n = 0) {
    if (e.length == 0)
      throw new RangeError("A selection needs at least one range");
    for (let r = 0, i = 0; i < e.length; i++) {
      let a = e[i];
      if (a.empty ? a.from <= r : a.from < r)
        return De.normalized(e.slice(), n);
      r = a.to;
    }
    return new De(e, n);
  }
  /**
  Create a cursor selection range at the given position. You can
  safely ignore the optional arguments in most situations.
  */
  static cursor(e, n = 0, r, i) {
    return fh.create(e, e, (n == 0 ? 0 : n < 0 ? 8 : 16) | (r == null ? 7 : Math.min(6, r)) | (i ?? 16777215) << 6);
  }
  /**
  Create a selection range.
  */
  static range(e, n, r, i) {
    let a = (r ?? 16777215) << 6 | (i == null ? 7 : Math.min(6, i));
    return n < e ? fh.create(n, e, 48 | a) : fh.create(e, n, (n > e ? 8 : 0) | a);
  }
  /**
  @internal
  */
  static normalized(e, n = 0) {
    let r = e[n];
    e.sort((i, a) => i.from - a.from), n = e.indexOf(r);
    for (let i = 1; i < e.length; i++) {
      let a = e[i], o = e[i - 1];
      if (a.empty ? a.from <= o.to : a.from < o.to) {
        let s = o.from, l = Math.max(a.to, o.to);
        i <= n && n--, e.splice(--i, 2, a.anchor > a.head ? De.range(l, s) : De.range(s, l));
      }
    }
    return new De(e, n);
  }
}
function Epe(t, e) {
  for (let n of t.ranges)
    if (n.to > e)
      throw new RangeError("Selection points outside of document");
}
let J6 = 0;
class ut {
  constructor(e, n, r, i, a) {
    this.combine = e, this.compareInput = n, this.compare = r, this.isStatic = i, this.id = J6++, this.default = e([]), this.extensions = typeof a == "function" ? a(this) : a;
  }
  /**
  Returns a facet reader for this facet, which can be used to
  [read](https://codemirror.net/6/docs/ref/#state.EditorState.facet) it but not to define values for it.
  */
  get reader() {
    return this;
  }
  /**
  Define a new facet.
  */
  static define(e = {}) {
    return new ut(e.combine || ((n) => n), e.compareInput || ((n, r) => n === r), e.compare || (e.combine ? (n, r) => n === r : eB), !!e.static, e.enables);
  }
  /**
  Returns an extension that adds the given value to this facet.
  */
  of(e) {
    return new Pw([], this, 0, e);
  }
  /**
  Create an extension that computes a value for the facet from a
  state. You must take care to declare the parts of the state that
  this value depends on, since your function is only called again
  for a new state when one of those parts changed.
  
  In cases where your value depends only on a single field, you'll
  want to use the [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method instead.
  */
  compute(e, n) {
    if (this.isStatic)
      throw new Error("Can't compute a static facet");
    return new Pw(e, this, 1, n);
  }
  /**
  Create an extension that computes zero or more values for this
  facet from a state.
  */
  computeN(e, n) {
    if (this.isStatic)
      throw new Error("Can't compute a static facet");
    return new Pw(e, this, 2, n);
  }
  from(e, n) {
    return n || (n = (r) => r), this.compute([e], (r) => n(r.field(e)));
  }
}
function eB(t, e) {
  return t == e || t.length == e.length && t.every((n, r) => n === e[r]);
}
class Pw {
  constructor(e, n, r, i) {
    this.dependencies = e, this.facet = n, this.type = r, this.value = i, this.id = J6++;
  }
  dynamicSlot(e) {
    var n;
    let r = this.value, i = this.facet.compareInput, a = this.id, o = e[a] >> 1, s = this.type == 2, l = !1, u = !1, c = [];
    for (let f of this.dependencies)
      f == "doc" ? l = !0 : f == "selection" ? u = !0 : ((n = e[f.id]) !== null && n !== void 0 ? n : 1) & 1 || c.push(e[f.id]);
    return {
      create(f) {
        return f.values[o] = r(f), 1;
      },
      update(f, d) {
        if (l && d.docChanged || u && (d.docChanged || d.selection) || e4(f, c)) {
          let h = r(f);
          if (s ? !oK(h, f.values[o], i) : !i(h, f.values[o]))
            return f.values[o] = h, 1;
        }
        return 0;
      },
      reconfigure: (f, d) => {
        let h, p = d.config.address[a];
        if (p != null) {
          let v = PT(d, p);
          if (this.dependencies.every((g) => g instanceof ut ? d.facet(g) === f.facet(g) : g instanceof fi ? d.field(g, !1) == f.field(g, !1) : !0) || (s ? oK(h = r(f), v, i) : i(h = r(f), v)))
            return f.values[o] = v, 0;
        } else
          h = r(f);
        return f.values[o] = h, 1;
      }
    };
  }
}
function oK(t, e, n) {
  if (t.length != e.length)
    return !1;
  for (let r = 0; r < t.length; r++)
    if (!n(t[r], e[r]))
      return !1;
  return !0;
}
function e4(t, e) {
  let n = !1;
  for (let r of e)
    pb(t, r) & 1 && (n = !0);
  return n;
}
function ASt(t, e, n) {
  let r = n.map((l) => t[l.id]), i = n.map((l) => l.type), a = r.filter((l) => !(l & 1)), o = t[e.id] >> 1;
  function s(l) {
    let u = [];
    for (let c = 0; c < r.length; c++) {
      let f = PT(l, r[c]);
      if (i[c] == 2)
        for (let d of f)
          u.push(d);
      else
        u.push(f);
    }
    return e.combine(u);
  }
  return {
    create(l) {
      for (let u of r)
        pb(l, u);
      return l.values[o] = s(l), 1;
    },
    update(l, u) {
      if (!e4(l, a))
        return 0;
      let c = s(l);
      return e.compare(c, l.values[o]) ? 0 : (l.values[o] = c, 1);
    },
    reconfigure(l, u) {
      let c = e4(l, r), f = u.config.facets[e.id], d = u.facet(e);
      if (f && !c && eB(n, f))
        return l.values[o] = d, 0;
      let h = s(l);
      return e.compare(h, d) ? (l.values[o] = d, 0) : (l.values[o] = h, 1);
    }
  };
}
const sK = /* @__PURE__ */ ut.define({ static: !0 });
class fi {
  constructor(e, n, r, i, a) {
    this.id = e, this.createF = n, this.updateF = r, this.compareF = i, this.spec = a, this.provides = void 0;
  }
  /**
  Define a state field.
  */
  static define(e) {
    let n = new fi(J6++, e.create, e.update, e.compare || ((r, i) => r === i), e);
    return e.provide && (n.provides = e.provide(n)), n;
  }
  create(e) {
    let n = e.facet(sK).find((r) => r.field == this);
    return ((n == null ? void 0 : n.create) || this.createF)(e);
  }
  /**
  @internal
  */
  slot(e) {
    let n = e[this.id] >> 1;
    return {
      create: (r) => (r.values[n] = this.create(r), 1),
      update: (r, i) => {
        let a = r.values[n], o = this.updateF(a, i);
        return this.compareF(a, o) ? 0 : (r.values[n] = o, 1);
      },
      reconfigure: (r, i) => i.config.address[this.id] != null ? (r.values[n] = i.field(this), 0) : (r.values[n] = this.create(r), 1)
    };
  }
  /**
  Returns an extension that enables this field and overrides the
  way it is initialized. Can be useful when you need to provide a
  non-default starting value for the field.
  */
  init(e) {
    return [this, sK.of({ field: this, create: e })];
  }
  /**
  State field instances can be used as
  [`Extension`](https://codemirror.net/6/docs/ref/#state.Extension) values to enable the field in a
  given state.
  */
  get extension() {
    return this;
  }
}
const Yd = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 };
function ey(t) {
  return (e) => new Mpe(e, t);
}
const Ff = {
  /**
  The highest precedence level, for extensions that should end up
  near the start of the precedence ordering.
  */
  highest: /* @__PURE__ */ ey(Yd.highest),
  /**
  A higher-than-default precedence, for extensions that should
  come before those with default precedence.
  */
  high: /* @__PURE__ */ ey(Yd.high),
  /**
  The default precedence, which is also used for extensions
  without an explicit precedence.
  */
  default: /* @__PURE__ */ ey(Yd.default),
  /**
  A lower-than-default precedence.
  */
  low: /* @__PURE__ */ ey(Yd.low),
  /**
  The lowest precedence level. Meant for things that should end up
  near the end of the extension order.
  */
  lowest: /* @__PURE__ */ ey(Yd.lowest)
};
class Mpe {
  constructor(e, n) {
    this.inner = e, this.prec = n;
  }
}
class $1 {
  /**
  Create an instance of this compartment to add to your [state
  configuration](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions).
  */
  of(e) {
    return new t4(this, e);
  }
  /**
  Create an [effect](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) that
  reconfigures this compartment.
  */
  reconfigure(e) {
    return $1.reconfigure.of({ compartment: this, extension: e });
  }
  /**
  Get the current content of the compartment in the state, or
  `undefined` if it isn't present.
  */
  get(e) {
    return e.config.compartments.get(this);
  }
}
class t4 {
  constructor(e, n) {
    this.compartment = e, this.inner = n;
  }
}
class TT {
  constructor(e, n, r, i, a, o) {
    for (this.base = e, this.compartments = n, this.dynamicSlots = r, this.address = i, this.staticValues = a, this.facets = o, this.statusTemplate = []; this.statusTemplate.length < r.length; )
      this.statusTemplate.push(
        0
        /* SlotStatus.Unresolved */
      );
  }
  staticFacet(e) {
    let n = this.address[e.id];
    return n == null ? e.default : this.staticValues[n >> 1];
  }
  static resolve(e, n, r) {
    let i = [], a = /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ new Map();
    for (let d of ESt(e, n, o))
      d instanceof fi ? i.push(d) : (a[d.facet.id] || (a[d.facet.id] = [])).push(d);
    let s = /* @__PURE__ */ Object.create(null), l = [], u = [];
    for (let d of i)
      s[d.id] = u.length << 1, u.push((h) => d.slot(h));
    let c = r == null ? void 0 : r.config.facets;
    for (let d in a) {
      let h = a[d], p = h[0].facet, v = c && c[d] || [];
      if (h.every(
        (g) => g.type == 0
        /* Provider.Static */
      ))
        if (s[p.id] = l.length << 1 | 1, eB(v, h))
          l.push(r.facet(p));
        else {
          let g = p.combine(h.map((m) => m.value));
          l.push(r && p.compare(g, r.facet(p)) ? r.facet(p) : g);
        }
      else {
        for (let g of h)
          g.type == 0 ? (s[g.id] = l.length << 1 | 1, l.push(g.value)) : (s[g.id] = u.length << 1, u.push((m) => g.dynamicSlot(m)));
        s[p.id] = u.length << 1, u.push((g) => ASt(g, p, h));
      }
    }
    let f = u.map((d) => d(s));
    return new TT(e, o, f, s, l, a);
  }
}
function ESt(t, e, n) {
  let r = [[], [], [], [], []], i = /* @__PURE__ */ new Map();
  function a(o, s) {
    let l = i.get(o);
    if (l != null) {
      if (l <= s)
        return;
      let u = r[l].indexOf(o);
      u > -1 && r[l].splice(u, 1), o instanceof t4 && n.delete(o.compartment);
    }
    if (i.set(o, s), Array.isArray(o))
      for (let u of o)
        a(u, s);
    else if (o instanceof t4) {
      if (n.has(o.compartment))
        throw new RangeError("Duplicate use of compartment in extensions");
      let u = e.get(o.compartment) || o.inner;
      n.set(o.compartment, u), a(u, s);
    } else if (o instanceof Mpe)
      a(o.inner, o.prec);
    else if (o instanceof fi)
      r[s].push(o), o.provides && a(o.provides, s);
    else if (o instanceof Pw)
      r[s].push(o), o.facet.extensions && a(o.facet.extensions, Yd.default);
    else {
      let u = o.extension;
      if (!u)
        throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);
      a(u, s);
    }
  }
  return a(t, Yd.default), r.reduce((o, s) => o.concat(s));
}
function pb(t, e) {
  if (e & 1)
    return 2;
  let n = e >> 1, r = t.status[n];
  if (r == 4)
    throw new Error("Cyclic dependency between fields and/or facets");
  if (r & 2)
    return r;
  t.status[n] = 4;
  let i = t.computeSlot(t, t.config.dynamicSlots[n]);
  return t.status[n] = 2 | i;
}
function PT(t, e) {
  return e & 1 ? t.config.staticValues[e >> 1] : t.values[e >> 1];
}
const Ipe = /* @__PURE__ */ ut.define(), n4 = /* @__PURE__ */ ut.define({
  combine: (t) => t.some((e) => e),
  static: !0
}), Dpe = /* @__PURE__ */ ut.define({
  combine: (t) => t.length ? t[0] : void 0,
  static: !0
}), Rpe = /* @__PURE__ */ ut.define(), kpe = /* @__PURE__ */ ut.define(), Lpe = /* @__PURE__ */ ut.define(), Npe = /* @__PURE__ */ ut.define({
  combine: (t) => t.length ? t[0] : !1
});
class ac {
  /**
  @internal
  */
  constructor(e, n) {
    this.type = e, this.value = n;
  }
  /**
  Define a new type of annotation.
  */
  static define() {
    return new MSt();
  }
}
class MSt {
  /**
  Create an instance of this annotation.
  */
  of(e) {
    return new ac(this, e);
  }
}
class ISt {
  /**
  @internal
  */
  constructor(e) {
    this.map = e;
  }
  /**
  Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this
  type.
  */
  of(e) {
    return new zt(this, e);
  }
}
class zt {
  /**
  @internal
  */
  constructor(e, n) {
    this.type = e, this.value = n;
  }
  /**
  Map this effect through a position mapping. Will return
  `undefined` when that ends up deleting the effect.
  */
  map(e) {
    let n = this.type.map(this.value, e);
    return n === void 0 ? void 0 : n == this.value ? this : new zt(this.type, n);
  }
  /**
  Tells you whether this effect object is of a given
  [type](https://codemirror.net/6/docs/ref/#state.StateEffectType).
  */
  is(e) {
    return this.type == e;
  }
  /**
  Define a new effect type. The type parameter indicates the type
  of values that his effect holds. It should be a type that
  doesn't include `undefined`, since that is used in
  [mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is
  removed.
  */
  static define(e = {}) {
    return new ISt(e.map || ((n) => n));
  }
  /**
  Map an array of effects through a change set.
  */
  static mapEffects(e, n) {
    if (!e.length)
      return e;
    let r = [];
    for (let i of e) {
      let a = i.map(n);
      a && r.push(a);
    }
    return r;
  }
}
zt.reconfigure = /* @__PURE__ */ zt.define();
zt.appendConfig = /* @__PURE__ */ zt.define();
class zr {
  constructor(e, n, r, i, a, o) {
    this.startState = e, this.changes = n, this.selection = r, this.effects = i, this.annotations = a, this.scrollIntoView = o, this._doc = null, this._state = null, r && Epe(r, n.newLength), a.some((s) => s.type == zr.time) || (this.annotations = a.concat(zr.time.of(Date.now())));
  }
  /**
  @internal
  */
  static create(e, n, r, i, a, o) {
    return new zr(e, n, r, i, a, o);
  }
  /**
  The new document produced by the transaction. Contrary to
  [`.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state)`.doc`, accessing this won't
  force the entire new state to be computed right away, so it is
  recommended that [transaction
  filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) use this getter
  when they need to look at the new document.
  */
  get newDoc() {
    return this._doc || (this._doc = this.changes.apply(this.startState.doc));
  }
  /**
  The new selection produced by the transaction. If
  [`this.selection`](https://codemirror.net/6/docs/ref/#state.Transaction.selection) is undefined,
  this will [map](https://codemirror.net/6/docs/ref/#state.EditorSelection.map) the start state's
  current selection through the changes made by the transaction.
  */
  get newSelection() {
    return this.selection || this.startState.selection.map(this.changes);
  }
  /**
  The new state created by the transaction. Computed on demand
  (but retained for subsequent access), so it is recommended not to
  access it in [transaction
  filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) when possible.
  */
  get state() {
    return this._state || this.startState.applyTransaction(this), this._state;
  }
  /**
  Get the value of the given annotation type, if any.
  */
  annotation(e) {
    for (let n of this.annotations)
      if (n.type == e)
        return n.value;
  }
  /**
  Indicates whether the transaction changed the document.
  */
  get docChanged() {
    return !this.changes.empty;
  }
  /**
  Indicates whether this transaction reconfigures the state
  (through a [configuration compartment](https://codemirror.net/6/docs/ref/#state.Compartment) or
  with a top-level configuration
  [effect](https://codemirror.net/6/docs/ref/#state.StateEffect^reconfigure).
  */
  get reconfigured() {
    return this.startState.config != this.state.config;
  }
  /**
  Returns true if the transaction has a [user
  event](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent) annotation that is equal to
  or more specific than `event`. For example, if the transaction
  has `"select.pointer"` as user event, `"select"` and
  `"select.pointer"` will match it.
  */
  isUserEvent(e) {
    let n = this.annotation(zr.userEvent);
    return !!(n && (n == e || n.length > e.length && n.slice(0, e.length) == e && n[e.length] == "."));
  }
}
zr.time = /* @__PURE__ */ ac.define();
zr.userEvent = /* @__PURE__ */ ac.define();
zr.addToHistory = /* @__PURE__ */ ac.define();
zr.remote = /* @__PURE__ */ ac.define();
function DSt(t, e) {
  let n = [];
  for (let r = 0, i = 0; ; ) {
    let a, o;
    if (r < t.length && (i == e.length || e[i] >= t[r]))
      a = t[r++], o = t[r++];
    else if (i < e.length)
      a = e[i++], o = e[i++];
    else
      return n;
    !n.length || n[n.length - 1] < a ? n.push(a, o) : n[n.length - 1] < o && (n[n.length - 1] = o);
  }
}
function Bpe(t, e, n) {
  var r;
  let i, a, o;
  return n ? (i = e.changes, a = Zr.empty(e.changes.length), o = t.changes.compose(e.changes)) : (i = e.changes.map(t.changes), a = t.changes.mapDesc(e.changes, !0), o = t.changes.compose(i)), {
    changes: o,
    selection: e.selection ? e.selection.map(a) : (r = t.selection) === null || r === void 0 ? void 0 : r.map(i),
    effects: zt.mapEffects(t.effects, i).concat(zt.mapEffects(e.effects, a)),
    annotations: t.annotations.length ? t.annotations.concat(e.annotations) : e.annotations,
    scrollIntoView: t.scrollIntoView || e.scrollIntoView
  };
}
function r4(t, e, n) {
  let r = e.selection, i = ig(e.annotations);
  return e.userEvent && (i = i.concat(zr.userEvent.of(e.userEvent))), {
    changes: e.changes instanceof Zr ? e.changes : Zr.of(e.changes || [], n, t.facet(Dpe)),
    selection: r && (r instanceof De ? r : De.single(r.anchor, r.head)),
    effects: ig(e.effects),
    annotations: i,
    scrollIntoView: !!e.scrollIntoView
  };
}
function zpe(t, e, n) {
  let r = r4(t, e.length ? e[0] : {}, t.doc.length);
  e.length && e[0].filter === !1 && (n = !1);
  for (let a = 1; a < e.length; a++) {
    e[a].filter === !1 && (n = !1);
    let o = !!e[a].sequential;
    r = Bpe(r, r4(t, e[a], o ? r.changes.newLength : t.doc.length), o);
  }
  let i = zr.create(t, r.changes, r.selection, r.effects, r.annotations, r.scrollIntoView);
  return kSt(n ? RSt(i) : i);
}
function RSt(t) {
  let e = t.startState, n = !0;
  for (let i of e.facet(Rpe)) {
    let a = i(t);
    if (a === !1) {
      n = !1;
      break;
    }
    Array.isArray(a) && (n = n === !0 ? a : DSt(n, a));
  }
  if (n !== !0) {
    let i, a;
    if (n === !1)
      a = t.changes.invertedDesc, i = Zr.empty(e.doc.length);
    else {
      let o = t.changes.filter(n);
      i = o.changes, a = o.filtered.mapDesc(o.changes).invertedDesc;
    }
    t = zr.create(e, i, t.selection && t.selection.map(a), zt.mapEffects(t.effects, a), t.annotations, t.scrollIntoView);
  }
  let r = e.facet(kpe);
  for (let i = r.length - 1; i >= 0; i--) {
    let a = r[i](t);
    a instanceof zr ? t = a : Array.isArray(a) && a.length == 1 && a[0] instanceof zr ? t = a[0] : t = zpe(e, ig(a), !1);
  }
  return t;
}
function kSt(t) {
  let e = t.startState, n = e.facet(Lpe), r = t;
  for (let i = n.length - 1; i >= 0; i--) {
    let a = n[i](t);
    a && Object.keys(a).length && (r = Bpe(r, r4(e, a, t.changes.newLength), !0));
  }
  return r == t ? t : zr.create(e, t.changes, t.selection, r.effects, r.annotations, r.scrollIntoView);
}
const LSt = [];
function ig(t) {
  return t == null ? LSt : Array.isArray(t) ? t : [t];
}
var lr = /* @__PURE__ */ function(t) {
  return t[t.Word = 0] = "Word", t[t.Space = 1] = "Space", t[t.Other = 2] = "Other", t;
}(lr || (lr = {}));
const NSt = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
let i4;
try {
  i4 = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
} catch {
}
function BSt(t) {
  if (i4)
    return i4.test(t);
  for (let e = 0; e < t.length; e++) {
    let n = t[e];
    if (/\w/.test(n) || n > "" && (n.toUpperCase() != n.toLowerCase() || NSt.test(n)))
      return !0;
  }
  return !1;
}
function zSt(t) {
  return (e) => {
    if (!/\S/.test(e))
      return lr.Space;
    if (BSt(e))
      return lr.Word;
    for (let n = 0; n < t.length; n++)
      if (e.indexOf(t[n]) > -1)
        return lr.Word;
    return lr.Other;
  };
}
class un {
  constructor(e, n, r, i, a, o) {
    this.config = e, this.doc = n, this.selection = r, this.values = i, this.status = e.statusTemplate.slice(), this.computeSlot = a, o && (o._state = this);
    for (let s = 0; s < this.config.dynamicSlots.length; s++)
      pb(this, s << 1);
    this.computeSlot = null;
  }
  field(e, n = !0) {
    let r = this.config.address[e.id];
    if (r == null) {
      if (n)
        throw new RangeError("Field is not present in this state");
      return;
    }
    return pb(this, r), PT(this, r);
  }
  /**
  Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this
  state. Any number of [transaction specs](https://codemirror.net/6/docs/ref/#state.TransactionSpec)
  can be passed. Unless
  [`sequential`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.sequential) is set, the
  [changes](https://codemirror.net/6/docs/ref/#state.TransactionSpec.changes) (if any) of each spec
  are assumed to start in the _current_ document (not the document
  produced by previous specs), and its
  [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection) and
  [effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) are assumed to refer
  to the document created by its _own_ changes. The resulting
  transaction contains the combined effect of all the different
  specs. For [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection), later
  specs take precedence over earlier ones.
  */
  update(...e) {
    return zpe(this, e, !0);
  }
  /**
  @internal
  */
  applyTransaction(e) {
    let n = this.config, { base: r, compartments: i } = n;
    for (let s of e.effects)
      s.is($1.reconfigure) ? (n && (i = /* @__PURE__ */ new Map(), n.compartments.forEach((l, u) => i.set(u, l)), n = null), i.set(s.value.compartment, s.value.extension)) : s.is(zt.reconfigure) ? (n = null, r = s.value) : s.is(zt.appendConfig) && (n = null, r = ig(r).concat(s.value));
    let a;
    n ? a = e.startState.values.slice() : (n = TT.resolve(r, i, this), a = new un(n, this.doc, this.selection, n.dynamicSlots.map(() => null), (l, u) => u.reconfigure(l, this), null).values);
    let o = e.startState.facet(n4) ? e.newSelection : e.newSelection.asSingle();
    new un(n, e.newDoc, o, a, (s, l) => l.update(s, e), e);
  }
  /**
  Create a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec) that
  replaces every selection range with the given content.
  */
  replaceSelection(e) {
    return typeof e == "string" && (e = this.toText(e)), this.changeByRange((n) => ({
      changes: { from: n.from, to: n.to, insert: e },
      range: De.cursor(n.from + e.length)
    }));
  }
  /**
  Create a set of changes and a new selection by running the given
  function for each range in the active selection. The function
  can return an optional set of changes (in the coordinate space
  of the start document), plus an updated range (in the coordinate
  space of the document produced by the call's own changes). This
  method will merge all the changes and ranges into a single
  changeset and selection, and return it as a [transaction
  spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to
  [`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update).
  */
  changeByRange(e) {
    let n = this.selection, r = e(n.ranges[0]), i = this.changes(r.changes), a = [r.range], o = ig(r.effects);
    for (let s = 1; s < n.ranges.length; s++) {
      let l = e(n.ranges[s]), u = this.changes(l.changes), c = u.map(i);
      for (let d = 0; d < s; d++)
        a[d] = a[d].map(c);
      let f = i.mapDesc(u, !0);
      a.push(l.range.map(f)), i = i.compose(c), o = zt.mapEffects(o, c).concat(zt.mapEffects(ig(l.effects), f));
    }
    return {
      changes: i,
      selection: De.create(a, n.mainIndex),
      effects: o
    };
  }
  /**
  Create a [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet) from the given change
  description, taking the state's document length and line
  separator into account.
  */
  changes(e = []) {
    return e instanceof Zr ? e : Zr.of(e, this.doc.length, this.facet(un.lineSeparator));
  }
  /**
  Using the state's [line
  separator](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator), create a
  [`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string.
  */
  toText(e) {
    return Sn.of(e.split(this.facet(un.lineSeparator) || qL));
  }
  /**
  Return the given range of the document as a string.
  */
  sliceDoc(e = 0, n = this.doc.length) {
    return this.doc.sliceString(e, n, this.lineBreak);
  }
  /**
  Get the value of a state [facet](https://codemirror.net/6/docs/ref/#state.Facet).
  */
  facet(e) {
    let n = this.config.address[e.id];
    return n == null ? e.default : (pb(this, n), PT(this, n));
  }
  /**
  Convert this state to a JSON-serializable object. When custom
  fields should be serialized, you can pass them in as an object
  mapping property names (in the resulting object, which should
  not use `doc` or `selection`) to fields.
  */
  toJSON(e) {
    let n = {
      doc: this.sliceDoc(),
      selection: this.selection.toJSON()
    };
    if (e)
      for (let r in e) {
        let i = e[r];
        i instanceof fi && this.config.address[i.id] != null && (n[r] = i.spec.toJSON(this.field(e[r]), this));
      }
    return n;
  }
  /**
  Deserialize a state from its JSON representation. When custom
  fields should be deserialized, pass the same object you passed
  to [`toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) when serializing as
  third argument.
  */
  static fromJSON(e, n = {}, r) {
    if (!e || typeof e.doc != "string")
      throw new RangeError("Invalid JSON representation for EditorState");
    let i = [];
    if (r) {
      for (let a in r)
        if (Object.prototype.hasOwnProperty.call(e, a)) {
          let o = r[a], s = e[a];
          i.push(o.init((l) => o.spec.fromJSON(s, l)));
        }
    }
    return un.create({
      doc: e.doc,
      selection: De.fromJSON(e.selection),
      extensions: n.extensions ? i.concat([n.extensions]) : i
    });
  }
  /**
  Create a new state. You'll usually only need this when
  initializing an editor—updated states are created by applying
  transactions.
  */
  static create(e = {}) {
    let n = TT.resolve(e.extensions || [], /* @__PURE__ */ new Map()), r = e.doc instanceof Sn ? e.doc : Sn.of((e.doc || "").split(n.staticFacet(un.lineSeparator) || qL)), i = e.selection ? e.selection instanceof De ? e.selection : De.single(e.selection.anchor, e.selection.head) : De.single(0);
    return Epe(i, r.length), n.staticFacet(n4) || (i = i.asSingle()), new un(n, r, i, n.dynamicSlots.map(() => null), (a, o) => o.create(a), null);
  }
  /**
  The size (in columns) of a tab in the document, determined by
  the [`tabSize`](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize) facet.
  */
  get tabSize() {
    return this.facet(un.tabSize);
  }
  /**
  Get the proper [line-break](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator)
  string for this state.
  */
  get lineBreak() {
    return this.facet(un.lineSeparator) || `
`;
  }
  /**
  Returns true when the editor is
  [configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only.
  */
  get readOnly() {
    return this.facet(Npe);
  }
  /**
  Look up a translation for the given phrase (via the
  [`phrases`](https://codemirror.net/6/docs/ref/#state.EditorState^phrases) facet), or return the
  original string if no translation is found.
  
  If additional arguments are passed, they will be inserted in
  place of markers like `$1` (for the first value) and `$2`, etc.
  A single `$` is equivalent to `$1`, and `$$` will produce a
  literal dollar sign.
  */
  phrase(e, ...n) {
    for (let r of this.facet(un.phrases))
      if (Object.prototype.hasOwnProperty.call(r, e)) {
        e = r[e];
        break;
      }
    return n.length && (e = e.replace(/\$(\$|\d*)/g, (r, i) => {
      if (i == "$")
        return "$";
      let a = +(i || 1);
      return !a || a > n.length ? r : n[a - 1];
    })), e;
  }
  /**
  Find the values for a given language data field, provided by the
  the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.
  
  Examples of language data fields are...
  
  - [`"commentTokens"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying
    comment syntax.
  - [`"autocomplete"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)
    for providing language-specific completion sources.
  - [`"wordChars"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding
    characters that should be considered part of words in this
    language.
  - [`"closeBrackets"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls
    bracket closing behavior.
  */
  languageDataAt(e, n, r = -1) {
    let i = [];
    for (let a of this.facet(Ipe))
      for (let o of a(this, n, r))
        Object.prototype.hasOwnProperty.call(o, e) && i.push(o[e]);
    return i;
  }
  /**
  Return a function that can categorize strings (expected to
  represent a single [grapheme cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak))
  into one of:
  
   - Word (contains an alphanumeric character or a character
     explicitly listed in the local language's `"wordChars"`
     language data, which should be a string)
   - Space (contains only whitespace)
   - Other (anything else)
  */
  charCategorizer(e) {
    return zSt(this.languageDataAt("wordChars", e).join(""));
  }
  /**
  Find the word at the given position, meaning the range
  containing all [word](https://codemirror.net/6/docs/ref/#state.CharCategory.Word) characters
  around it. If no word characters are adjacent to the position,
  this returns null.
  */
  wordAt(e) {
    let { text: n, from: r, length: i } = this.doc.lineAt(e), a = this.charCategorizer(e), o = e - r, s = e - r;
    for (; o > 0; ) {
      let l = wi(n, o, !1);
      if (a(n.slice(l, o)) != lr.Word)
        break;
      o = l;
    }
    for (; s < i; ) {
      let l = wi(n, s);
      if (a(n.slice(s, l)) != lr.Word)
        break;
      s = l;
    }
    return o == s ? null : De.range(o + r, s + r);
  }
}
un.allowMultipleSelections = n4;
un.tabSize = /* @__PURE__ */ ut.define({
  combine: (t) => t.length ? t[0] : 4
});
un.lineSeparator = Dpe;
un.readOnly = Npe;
un.phrases = /* @__PURE__ */ ut.define({
  compare(t, e) {
    let n = Object.keys(t), r = Object.keys(e);
    return n.length == r.length && n.every((i) => t[i] == e[i]);
  }
});
un.languageData = Ipe;
un.changeFilter = Rpe;
un.transactionFilter = kpe;
un.transactionExtender = Lpe;
$1.reconfigure = /* @__PURE__ */ zt.define();
function Kl(t, e, n = {}) {
  let r = {};
  for (let i of t)
    for (let a of Object.keys(i)) {
      let o = i[a], s = r[a];
      if (s === void 0)
        r[a] = o;
      else if (!(s === o || o === void 0)) if (Object.hasOwnProperty.call(n, a))
        r[a] = n[a](s, o);
      else
        throw new Error("Config merge conflict for field " + a);
    }
  for (let i in e)
    r[i] === void 0 && (r[i] = e[i]);
  return r;
}
class Kh {
  /**
  Compare this value with another value. Used when comparing
  rangesets. The default implementation compares by identity.
  Unless you are only creating a fixed number of unique instances
  of your value type, it is a good idea to implement this
  properly.
  */
  eq(e) {
    return this == e;
  }
  /**
  Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value.
  */
  range(e, n = e) {
    return a4.create(e, n, this);
  }
}
Kh.prototype.startSide = Kh.prototype.endSide = 0;
Kh.prototype.point = !1;
Kh.prototype.mapMode = Oi.TrackDel;
let a4 = class Vpe {
  constructor(e, n, r) {
    this.from = e, this.to = n, this.value = r;
  }
  /**
  @internal
  */
  static create(e, n, r) {
    return new Vpe(e, n, r);
  }
};
function o4(t, e) {
  return t.from - e.from || t.value.startSide - e.value.startSide;
}
class tB {
  constructor(e, n, r, i) {
    this.from = e, this.to = n, this.value = r, this.maxPoint = i;
  }
  get length() {
    return this.to[this.to.length - 1];
  }
  // Find the index of the given position and side. Use the ranges'
  // `from` pos when `end == false`, `to` when `end == true`.
  findIndex(e, n, r, i = 0) {
    let a = r ? this.to : this.from;
    for (let o = i, s = a.length; ; ) {
      if (o == s)
        return o;
      let l = o + s >> 1, u = a[l] - e || (r ? this.value[l].endSide : this.value[l].startSide) - n;
      if (l == o)
        return u >= 0 ? o : s;
      u >= 0 ? s = l : o = l + 1;
    }
  }
  between(e, n, r, i) {
    for (let a = this.findIndex(n, -1e9, !0), o = this.findIndex(r, 1e9, !1, a); a < o; a++)
      if (i(this.from[a] + e, this.to[a] + e, this.value[a]) === !1)
        return !1;
  }
  map(e, n) {
    let r = [], i = [], a = [], o = -1, s = -1;
    for (let l = 0; l < this.value.length; l++) {
      let u = this.value[l], c = this.from[l] + e, f = this.to[l] + e, d, h;
      if (c == f) {
        let p = n.mapPos(c, u.startSide, u.mapMode);
        if (p == null || (d = h = p, u.startSide != u.endSide && (h = n.mapPos(c, u.endSide), h < d)))
          continue;
      } else if (d = n.mapPos(c, u.startSide), h = n.mapPos(f, u.endSide), d > h || d == h && u.startSide > 0 && u.endSide <= 0)
        continue;
      (h - d || u.endSide - u.startSide) < 0 || (o < 0 && (o = d), u.point && (s = Math.max(s, h - d)), r.push(u), i.push(d - o), a.push(h - o));
    }
    return { mapped: r.length ? new tB(i, a, r, s) : null, pos: o };
  }
}
class On {
  constructor(e, n, r, i) {
    this.chunkPos = e, this.chunk = n, this.nextLayer = r, this.maxPoint = i;
  }
  /**
  @internal
  */
  static create(e, n, r, i) {
    return new On(e, n, r, i);
  }
  /**
  @internal
  */
  get length() {
    let e = this.chunk.length - 1;
    return e < 0 ? 0 : Math.max(this.chunkEnd(e), this.nextLayer.length);
  }
  /**
  The number of ranges in the set.
  */
  get size() {
    if (this.isEmpty)
      return 0;
    let e = this.nextLayer.size;
    for (let n of this.chunk)
      e += n.value.length;
    return e;
  }
  /**
  @internal
  */
  chunkEnd(e) {
    return this.chunkPos[e] + this.chunk[e].length;
  }
  /**
  Update the range set, optionally adding new ranges or filtering
  out existing ones.
  
  (Note: The type parameter is just there as a kludge to work
  around TypeScript variance issues that prevented `RangeSet<X>`
  from being a subtype of `RangeSet<Y>` when `X` is a subtype of
  `Y`.)
  */
  update(e) {
    let { add: n = [], sort: r = !1, filterFrom: i = 0, filterTo: a = this.length } = e, o = e.filter;
    if (n.length == 0 && !o)
      return this;
    if (r && (n = n.slice().sort(o4)), this.isEmpty)
      return n.length ? On.of(n) : this;
    let s = new Fpe(this, null, -1).goto(0), l = 0, u = [], c = new wf();
    for (; s.value || l < n.length; )
      if (l < n.length && (s.from - n[l].from || s.startSide - n[l].value.startSide) >= 0) {
        let f = n[l++];
        c.addInner(f.from, f.to, f.value) || u.push(f);
      } else s.rangeIndex == 1 && s.chunkIndex < this.chunk.length && (l == n.length || this.chunkEnd(s.chunkIndex) < n[l].from) && (!o || i > this.chunkEnd(s.chunkIndex) || a < this.chunkPos[s.chunkIndex]) && c.addChunk(this.chunkPos[s.chunkIndex], this.chunk[s.chunkIndex]) ? s.nextChunk() : ((!o || i > s.to || a < s.from || o(s.from, s.to, s.value)) && (c.addInner(s.from, s.to, s.value) || u.push(a4.create(s.from, s.to, s.value))), s.next());
    return c.finishInner(this.nextLayer.isEmpty && !u.length ? On.empty : this.nextLayer.update({ add: u, filter: o, filterFrom: i, filterTo: a }));
  }
  /**
  Map this range set through a set of changes, return the new set.
  */
  map(e) {
    if (e.empty || this.isEmpty)
      return this;
    let n = [], r = [], i = -1;
    for (let o = 0; o < this.chunk.length; o++) {
      let s = this.chunkPos[o], l = this.chunk[o], u = e.touchesRange(s, s + l.length);
      if (u === !1)
        i = Math.max(i, l.maxPoint), n.push(l), r.push(e.mapPos(s));
      else if (u === !0) {
        let { mapped: c, pos: f } = l.map(s, e);
        c && (i = Math.max(i, c.maxPoint), n.push(c), r.push(f));
      }
    }
    let a = this.nextLayer.map(e);
    return n.length == 0 ? a : new On(r, n, a || On.empty, i);
  }
  /**
  Iterate over the ranges that touch the region `from` to `to`,
  calling `f` for each. There is no guarantee that the ranges will
  be reported in any specific order. When the callback returns
  `false`, iteration stops.
  */
  between(e, n, r) {
    if (!this.isEmpty) {
      for (let i = 0; i < this.chunk.length; i++) {
        let a = this.chunkPos[i], o = this.chunk[i];
        if (n >= a && e <= a + o.length && o.between(a, e - a, n - a, r) === !1)
          return;
      }
      this.nextLayer.between(e, n, r);
    }
  }
  /**
  Iterate over the ranges in this set, in order, including all
  ranges that end at or after `from`.
  */
  iter(e = 0) {
    return g_.from([this]).goto(e);
  }
  /**
  @internal
  */
  get isEmpty() {
    return this.nextLayer == this;
  }
  /**
  Iterate over the ranges in a collection of sets, in order,
  starting from `from`.
  */
  static iter(e, n = 0) {
    return g_.from(e).goto(n);
  }
  /**
  Iterate over two groups of sets, calling methods on `comparator`
  to notify it of possible differences.
  */
  static compare(e, n, r, i, a = -1) {
    let o = e.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= a), s = n.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= a), l = lK(o, s, r), u = new ty(o, l, a), c = new ty(s, l, a);
    r.iterGaps((f, d, h) => uK(u, f, c, d, h, i)), r.empty && r.length == 0 && uK(u, 0, c, 0, 0, i);
  }
  /**
  Compare the contents of two groups of range sets, returning true
  if they are equivalent in the given range.
  */
  static eq(e, n, r = 0, i) {
    i == null && (i = 999999999);
    let a = e.filter((c) => !c.isEmpty && n.indexOf(c) < 0), o = n.filter((c) => !c.isEmpty && e.indexOf(c) < 0);
    if (a.length != o.length)
      return !1;
    if (!a.length)
      return !0;
    let s = lK(a, o), l = new ty(a, s, 0).goto(r), u = new ty(o, s, 0).goto(r);
    for (; ; ) {
      if (l.to != u.to || !s4(l.active, u.active) || l.point && (!u.point || !l.point.eq(u.point)))
        return !1;
      if (l.to > i)
        return !0;
      l.next(), u.next();
    }
  }
  /**
  Iterate over a group of range sets at the same time, notifying
  the iterator about the ranges covering every given piece of
  content. Returns the open count (see
  [`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end
  of the iteration.
  */
  static spans(e, n, r, i, a = -1) {
    let o = new ty(e, null, a).goto(n), s = n, l = o.openStart;
    for (; ; ) {
      let u = Math.min(o.to, r);
      if (o.point) {
        let c = o.activeForPoint(o.to), f = o.pointFrom < n ? c.length + 1 : o.point.startSide < 0 ? c.length : Math.min(c.length, l);
        i.point(s, u, o.point, c, f, o.pointRank), l = Math.min(o.openEnd(u), c.length);
      } else u > s && (i.span(s, u, o.active, l), l = o.openEnd(u));
      if (o.to > r)
        return l + (o.point && o.to > r ? 1 : 0);
      s = o.to, o.next();
    }
  }
  /**
  Create a range set for the given range or array of ranges. By
  default, this expects the ranges to be _sorted_ (by start
  position and, if two start at the same position,
  `value.startSide`). You can pass `true` as second argument to
  cause the method to sort them.
  */
  static of(e, n = !1) {
    let r = new wf();
    for (let i of e instanceof a4 ? [e] : n ? VSt(e) : e)
      r.add(i.from, i.to, i.value);
    return r.finish();
  }
  /**
  Join an array of range sets into a single set.
  */
  static join(e) {
    if (!e.length)
      return On.empty;
    let n = e[e.length - 1];
    for (let r = e.length - 2; r >= 0; r--)
      for (let i = e[r]; i != On.empty; i = i.nextLayer)
        n = new On(i.chunkPos, i.chunk, n, Math.max(i.maxPoint, n.maxPoint));
    return n;
  }
}
On.empty = /* @__PURE__ */ new On([], [], null, -1);
function VSt(t) {
  if (t.length > 1)
    for (let e = t[0], n = 1; n < t.length; n++) {
      let r = t[n];
      if (o4(e, r) > 0)
        return t.slice().sort(o4);
      e = r;
    }
  return t;
}
On.empty.nextLayer = On.empty;
class wf {
  finishChunk(e) {
    this.chunks.push(new tB(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, e && (this.from = [], this.to = [], this.value = []);
  }
  /**
  Create an empty builder.
  */
  constructor() {
    this.chunks = [], this.chunkPos = [], this.chunkStart = -1, this.last = null, this.lastFrom = -1e9, this.lastTo = -1e9, this.from = [], this.to = [], this.value = [], this.maxPoint = -1, this.setMaxPoint = -1, this.nextLayer = null;
  }
  /**
  Add a range. Ranges should be added in sorted (by `from` and
  `value.startSide`) order.
  */
  add(e, n, r) {
    this.addInner(e, n, r) || (this.nextLayer || (this.nextLayer = new wf())).add(e, n, r);
  }
  /**
  @internal
  */
  addInner(e, n, r) {
    let i = e - this.lastTo || r.startSide - this.last.endSide;
    if (i <= 0 && (e - this.lastFrom || r.startSide - this.last.startSide) < 0)
      throw new Error("Ranges must be added sorted by `from` position and `startSide`");
    return i < 0 ? !1 : (this.from.length == 250 && this.finishChunk(!0), this.chunkStart < 0 && (this.chunkStart = e), this.from.push(e - this.chunkStart), this.to.push(n - this.chunkStart), this.last = r, this.lastFrom = e, this.lastTo = n, this.value.push(r), r.point && (this.maxPoint = Math.max(this.maxPoint, n - e)), !0);
  }
  /**
  @internal
  */
  addChunk(e, n) {
    if ((e - this.lastTo || n.value[0].startSide - this.last.endSide) < 0)
      return !1;
    this.from.length && this.finishChunk(!0), this.setMaxPoint = Math.max(this.setMaxPoint, n.maxPoint), this.chunks.push(n), this.chunkPos.push(e);
    let r = n.value.length - 1;
    return this.last = n.value[r], this.lastFrom = n.from[r] + e, this.lastTo = n.to[r] + e, !0;
  }
  /**
  Finish the range set. Returns the new set. The builder can't be
  used anymore after this has been called.
  */
  finish() {
    return this.finishInner(On.empty);
  }
  /**
  @internal
  */
  finishInner(e) {
    if (this.from.length && this.finishChunk(!1), this.chunks.length == 0)
      return e;
    let n = On.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint);
    return this.from = null, n;
  }
}
function lK(t, e, n) {
  let r = /* @__PURE__ */ new Map();
  for (let a of t)
    for (let o = 0; o < a.chunk.length; o++)
      a.chunk[o].maxPoint <= 0 && r.set(a.chunk[o], a.chunkPos[o]);
  let i = /* @__PURE__ */ new Set();
  for (let a of e)
    for (let o = 0; o < a.chunk.length; o++) {
      let s = r.get(a.chunk[o]);
      s != null && (n ? n.mapPos(s) : s) == a.chunkPos[o] && !(n != null && n.touchesRange(s, s + a.chunk[o].length)) && i.add(a.chunk[o]);
    }
  return i;
}
class Fpe {
  constructor(e, n, r, i = 0) {
    this.layer = e, this.skip = n, this.minPoint = r, this.rank = i;
  }
  get startSide() {
    return this.value ? this.value.startSide : 0;
  }
  get endSide() {
    return this.value ? this.value.endSide : 0;
  }
  goto(e, n = -1e9) {
    return this.chunkIndex = this.rangeIndex = 0, this.gotoInner(e, n, !1), this;
  }
  gotoInner(e, n, r) {
    for (; this.chunkIndex < this.layer.chunk.length; ) {
      let i = this.layer.chunk[this.chunkIndex];
      if (!(this.skip && this.skip.has(i) || this.layer.chunkEnd(this.chunkIndex) < e || i.maxPoint < this.minPoint))
        break;
      this.chunkIndex++, r = !1;
    }
    if (this.chunkIndex < this.layer.chunk.length) {
      let i = this.layer.chunk[this.chunkIndex].findIndex(e - this.layer.chunkPos[this.chunkIndex], n, !0);
      (!r || this.rangeIndex < i) && this.setRangeIndex(i);
    }
    this.next();
  }
  forward(e, n) {
    (this.to - e || this.endSide - n) < 0 && this.gotoInner(e, n, !0);
  }
  next() {
    for (; ; )
      if (this.chunkIndex == this.layer.chunk.length) {
        this.from = this.to = 1e9, this.value = null;
        break;
      } else {
        let e = this.layer.chunkPos[this.chunkIndex], n = this.layer.chunk[this.chunkIndex], r = e + n.from[this.rangeIndex];
        if (this.from = r, this.to = e + n.to[this.rangeIndex], this.value = n.value[this.rangeIndex], this.setRangeIndex(this.rangeIndex + 1), this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint)
          break;
      }
  }
  setRangeIndex(e) {
    if (e == this.layer.chunk[this.chunkIndex].value.length) {
      if (this.chunkIndex++, this.skip)
        for (; this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]); )
          this.chunkIndex++;
      this.rangeIndex = 0;
    } else
      this.rangeIndex = e;
  }
  nextChunk() {
    this.chunkIndex++, this.rangeIndex = 0, this.next();
  }
  compare(e) {
    return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide;
  }
}
class g_ {
  constructor(e) {
    this.heap = e;
  }
  static from(e, n = null, r = -1) {
    let i = [];
    for (let a = 0; a < e.length; a++)
      for (let o = e[a]; !o.isEmpty; o = o.nextLayer)
        o.maxPoint >= r && i.push(new Fpe(o, n, r, a));
    return i.length == 1 ? i[0] : new g_(i);
  }
  get startSide() {
    return this.value ? this.value.startSide : 0;
  }
  goto(e, n = -1e9) {
    for (let r of this.heap)
      r.goto(e, n);
    for (let r = this.heap.length >> 1; r >= 0; r--)
      JI(this.heap, r);
    return this.next(), this;
  }
  forward(e, n) {
    for (let r of this.heap)
      r.forward(e, n);
    for (let r = this.heap.length >> 1; r >= 0; r--)
      JI(this.heap, r);
    (this.to - e || this.value.endSide - n) < 0 && this.next();
  }
  next() {
    if (this.heap.length == 0)
      this.from = this.to = 1e9, this.value = null, this.rank = -1;
    else {
      let e = this.heap[0];
      this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), JI(this.heap, 0);
    }
  }
}
function JI(t, e) {
  for (let n = t[e]; ; ) {
    let r = (e << 1) + 1;
    if (r >= t.length)
      break;
    let i = t[r];
    if (r + 1 < t.length && i.compare(t[r + 1]) >= 0 && (i = t[r + 1], r++), n.compare(i) < 0)
      break;
    t[r] = n, t[e] = i, e = r;
  }
}
class ty {
  constructor(e, n, r) {
    this.minPoint = r, this.active = [], this.activeTo = [], this.activeRank = [], this.minActive = -1, this.point = null, this.pointFrom = 0, this.pointRank = 0, this.to = -1e9, this.endSide = 0, this.openStart = -1, this.cursor = g_.from(e, n, r);
  }
  goto(e, n = -1e9) {
    return this.cursor.goto(e, n), this.active.length = this.activeTo.length = this.activeRank.length = 0, this.minActive = -1, this.to = e, this.endSide = n, this.openStart = -1, this.next(), this;
  }
  forward(e, n) {
    for (; this.minActive > -1 && (this.activeTo[this.minActive] - e || this.active[this.minActive].endSide - n) < 0; )
      this.removeActive(this.minActive);
    this.cursor.forward(e, n);
  }
  removeActive(e) {
    ox(this.active, e), ox(this.activeTo, e), ox(this.activeRank, e), this.minActive = cK(this.active, this.activeTo);
  }
  addActive(e) {
    let n = 0, { value: r, to: i, rank: a } = this.cursor;
    for (; n < this.activeRank.length && (a - this.activeRank[n] || i - this.activeTo[n]) > 0; )
      n++;
    sx(this.active, n, r), sx(this.activeTo, n, i), sx(this.activeRank, n, a), e && sx(e, n, this.cursor.from), this.minActive = cK(this.active, this.activeTo);
  }
  // After calling this, if `this.point` != null, the next range is a
  // point. Otherwise, it's a regular range, covered by `this.active`.
  next() {
    let e = this.to, n = this.point;
    this.point = null;
    let r = this.openStart < 0 ? [] : null;
    for (; ; ) {
      let i = this.minActive;
      if (i > -1 && (this.activeTo[i] - this.cursor.from || this.active[i].endSide - this.cursor.startSide) < 0) {
        if (this.activeTo[i] > e) {
          this.to = this.activeTo[i], this.endSide = this.active[i].endSide;
          break;
        }
        this.removeActive(i), r && ox(r, i);
      } else if (this.cursor.value)
        if (this.cursor.from > e) {
          this.to = this.cursor.from, this.endSide = this.cursor.startSide;
          break;
        } else {
          let a = this.cursor.value;
          if (!a.point)
            this.addActive(r), this.cursor.next();
          else if (n && this.cursor.to == this.to && this.cursor.from < this.cursor.to)
            this.cursor.next();
          else {
            this.point = a, this.pointFrom = this.cursor.from, this.pointRank = this.cursor.rank, this.to = this.cursor.to, this.endSide = a.endSide, this.cursor.next(), this.forward(this.to, this.endSide);
            break;
          }
        }
      else {
        this.to = this.endSide = 1e9;
        break;
      }
    }
    if (r) {
      this.openStart = 0;
      for (let i = r.length - 1; i >= 0 && r[i] < e; i--)
        this.openStart++;
    }
  }
  activeForPoint(e) {
    if (!this.active.length)
      return this.active;
    let n = [];
    for (let r = this.active.length - 1; r >= 0 && !(this.activeRank[r] < this.pointRank); r--)
      (this.activeTo[r] > e || this.activeTo[r] == e && this.active[r].endSide >= this.point.endSide) && n.push(this.active[r]);
    return n.reverse();
  }
  openEnd(e) {
    let n = 0;
    for (let r = this.activeTo.length - 1; r >= 0 && this.activeTo[r] > e; r--)
      n++;
    return n;
  }
}
function uK(t, e, n, r, i, a) {
  t.goto(e), n.goto(r);
  let o = r + i, s = r, l = r - e;
  for (; ; ) {
    let u = t.to + l - n.to || t.endSide - n.endSide, c = u < 0 ? t.to + l : n.to, f = Math.min(c, o);
    if (t.point || n.point ? t.point && n.point && (t.point == n.point || t.point.eq(n.point)) && s4(t.activeForPoint(t.to), n.activeForPoint(n.to)) || a.comparePoint(s, f, t.point, n.point) : f > s && !s4(t.active, n.active) && a.compareRange(s, f, t.active, n.active), c > o)
      break;
    s = c, u <= 0 && t.next(), u >= 0 && n.next();
  }
}
function s4(t, e) {
  if (t.length != e.length)
    return !1;
  for (let n = 0; n < t.length; n++)
    if (t[n] != e[n] && !t[n].eq(e[n]))
      return !1;
  return !0;
}
function ox(t, e) {
  for (let n = e, r = t.length - 1; n < r; n++)
    t[n] = t[n + 1];
  t.pop();
}
function sx(t, e, n) {
  for (let r = t.length - 1; r >= e; r--)
    t[r + 1] = t[r];
  t[e] = n;
}
function cK(t, e) {
  let n = -1, r = 1e9;
  for (let i = 0; i < e.length; i++)
    (e[i] - r || t[i].endSide - t[n].endSide) < 0 && (n = i, r = e[i]);
  return n;
}
function Fm(t, e, n = t.length) {
  let r = 0;
  for (let i = 0; i < n; )
    t.charCodeAt(i) == 9 ? (r += e - r % e, i++) : (r++, i = wi(t, i));
  return r;
}
function l4(t, e, n, r) {
  for (let i = 0, a = 0; ; ) {
    if (a >= e)
      return i;
    if (i == t.length)
      break;
    a += t.charCodeAt(i) == 9 ? n - a % n : 1, i = wi(t, i);
  }
  return r === !0 ? -1 : t.length;
}
const u4 = "ͼ", fK = typeof Symbol > "u" ? "__" + u4 : Symbol.for(u4), c4 = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), dK = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {};
class Cf {
  // :: (Object<Style>, ?{finish: ?(string) → string})
  // Create a style module from the given spec.
  //
  // When `finish` is given, it is called on regular (non-`@`)
  // selectors (after `&` expansion) to compute the final selector.
  constructor(e, n) {
    this.rules = [];
    let { finish: r } = n || {};
    function i(o) {
      return /^@/.test(o) ? [o] : o.split(/,\s*/);
    }
    function a(o, s, l, u) {
      let c = [], f = /^@(\w+)\b/.exec(o[0]), d = f && f[1] == "keyframes";
      if (f && s == null) return l.push(o[0] + ";");
      for (let h in s) {
        let p = s[h];
        if (/&/.test(h))
          a(
            h.split(/,\s*/).map((v) => o.map((g) => v.replace(/&/, g))).reduce((v, g) => v.concat(g)),
            p,
            l
          );
        else if (p && typeof p == "object") {
          if (!f) throw new RangeError("The value of a property (" + h + ") should be a primitive value.");
          a(i(h), p, c, d);
        } else p != null && c.push(h.replace(/_.*/, "").replace(/[A-Z]/g, (v) => "-" + v.toLowerCase()) + ": " + p + ";");
      }
      (c.length || d) && l.push((r && !f && !u ? o.map(r) : o).join(", ") + " {" + c.join(" ") + "}");
    }
    for (let o in e) a(i(o), e[o], this.rules);
  }
  // :: () → string
  // Returns a string containing the module's CSS rules.
  getRules() {
    return this.rules.join(`
`);
  }
  // :: () → string
  // Generate a new unique CSS class name.
  static newName() {
    let e = dK[fK] || 1;
    return dK[fK] = e + 1, u4 + e.toString(36);
  }
  // :: (union<Document, ShadowRoot>, union<[StyleModule], StyleModule>, ?{nonce: ?string})
  //
  // Mount the given set of modules in the given DOM root, which ensures
  // that the CSS rules defined by the module are available in that
  // context.
  //
  // Rules are only added to the document once per root.
  //
  // Rule order will follow the order of the modules, so that rules from
  // modules later in the array take precedence of those from earlier
  // modules. If you call this function multiple times for the same root
  // in a way that changes the order of already mounted modules, the old
  // order will be changed.
  //
  // If a Content Security Policy nonce is provided, it is added to
  // the `<style>` tag generated by the library.
  static mount(e, n, r) {
    let i = e[c4], a = r && r.nonce;
    i ? a && i.setNonce(a) : i = new FSt(e, a), i.mount(Array.isArray(n) ? n : [n], e);
  }
}
let hK = /* @__PURE__ */ new Map();
class FSt {
  constructor(e, n) {
    let r = e.ownerDocument || e, i = r.defaultView;
    if (!e.head && e.adoptedStyleSheets && i.CSSStyleSheet) {
      let a = hK.get(r);
      if (a) return e[c4] = a;
      this.sheet = new i.CSSStyleSheet(), hK.set(r, this);
    } else
      this.styleTag = r.createElement("style"), n && this.styleTag.setAttribute("nonce", n);
    this.modules = [], e[c4] = this;
  }
  mount(e, n) {
    let r = this.sheet, i = 0, a = 0;
    for (let o = 0; o < e.length; o++) {
      let s = e[o], l = this.modules.indexOf(s);
      if (l < a && l > -1 && (this.modules.splice(l, 1), a--, l = -1), l == -1) {
        if (this.modules.splice(a++, 0, s), r) for (let u = 0; u < s.rules.length; u++)
          r.insertRule(s.rules[u], i++);
      } else {
        for (; a < l; ) i += this.modules[a++].rules.length;
        i += s.rules.length, a++;
      }
    }
    if (r)
      n.adoptedStyleSheets.indexOf(this.sheet) < 0 && (n.adoptedStyleSheets = [this.sheet, ...n.adoptedStyleSheets]);
    else {
      let o = "";
      for (let l = 0; l < this.modules.length; l++)
        o += this.modules[l].getRules() + `
`;
      this.styleTag.textContent = o;
      let s = n.head || n;
      this.styleTag.parentNode != s && s.insertBefore(this.styleTag, s.firstChild);
    }
  }
  setNonce(e) {
    this.styleTag && this.styleTag.getAttribute("nonce") != e && this.styleTag.setAttribute("nonce", e);
  }
}
var Tf = {
  8: "Backspace",
  9: "Tab",
  10: "Enter",
  12: "NumLock",
  13: "Enter",
  16: "Shift",
  17: "Control",
  18: "Alt",
  20: "CapsLock",
  27: "Escape",
  32: " ",
  33: "PageUp",
  34: "PageDown",
  35: "End",
  36: "Home",
  37: "ArrowLeft",
  38: "ArrowUp",
  39: "ArrowRight",
  40: "ArrowDown",
  44: "PrintScreen",
  45: "Insert",
  46: "Delete",
  59: ";",
  61: "=",
  91: "Meta",
  92: "Meta",
  106: "*",
  107: "+",
  108: ",",
  109: "-",
  110: ".",
  111: "/",
  144: "NumLock",
  145: "ScrollLock",
  160: "Shift",
  161: "Shift",
  162: "Control",
  163: "Control",
  164: "Alt",
  165: "Alt",
  173: "-",
  186: ";",
  187: "=",
  188: ",",
  189: "-",
  190: ".",
  191: "/",
  192: "`",
  219: "[",
  220: "\\",
  221: "]",
  222: "'"
}, m_ = {
  48: ")",
  49: "!",
  50: "@",
  51: "#",
  52: "$",
  53: "%",
  54: "^",
  55: "&",
  56: "*",
  57: "(",
  59: ":",
  61: "+",
  173: "_",
  186: ":",
  187: "+",
  188: "<",
  189: "_",
  190: ">",
  191: "?",
  192: "~",
  219: "{",
  220: "|",
  221: "}",
  222: '"'
}, WSt = typeof navigator < "u" && /Mac/.test(navigator.platform), QSt = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
for (var _i = 0; _i < 10; _i++) Tf[48 + _i] = Tf[96 + _i] = String(_i);
for (var _i = 1; _i <= 24; _i++) Tf[_i + 111] = "F" + _i;
for (var _i = 65; _i <= 90; _i++)
  Tf[_i] = String.fromCharCode(_i + 32), m_[_i] = String.fromCharCode(_i);
for (var eD in Tf) m_.hasOwnProperty(eD) || (m_[eD] = Tf[eD]);
function HSt(t) {
  var e = WSt && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || QSt && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? m_ : Tf)[t.keyCode] || t.key || "Unidentified";
  return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
}
function y_(t) {
  let e;
  return t.nodeType == 11 ? e = t.getSelection ? t : t.ownerDocument : e = t, e.getSelection();
}
function f4(t, e) {
  return e ? t == e || t.contains(e.nodeType != 1 ? e.parentNode : e) : !1;
}
function GSt(t) {
  let e = t.activeElement;
  for (; e && e.shadowRoot; )
    e = e.shadowRoot.activeElement;
  return e;
}
function $w(t, e) {
  if (!e.anchorNode)
    return !1;
  try {
    return f4(t, e.anchorNode);
  } catch {
    return !1;
  }
}
function Kg(t) {
  return t.nodeType == 3 ? ep(t, 0, t.nodeValue.length).getClientRects() : t.nodeType == 1 ? t.getClientRects() : [];
}
function vb(t, e, n, r) {
  return n ? pK(t, e, n, r, -1) || pK(t, e, n, r, 1) : !1;
}
function Jh(t) {
  for (var e = 0; ; e++)
    if (t = t.previousSibling, !t)
      return e;
}
function $T(t) {
  return t.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName);
}
function pK(t, e, n, r, i) {
  for (; ; ) {
    if (t == n && e == r)
      return !0;
    if (e == (i < 0 ? 0 : Uu(t))) {
      if (t.nodeName == "DIV")
        return !1;
      let a = t.parentNode;
      if (!a || a.nodeType != 1)
        return !1;
      e = Jh(t) + (i < 0 ? 0 : 1), t = a;
    } else if (t.nodeType == 1) {
      if (t = t.childNodes[e + (i < 0 ? -1 : 0)], t.nodeType == 1 && t.contentEditable == "false")
        return !1;
      e = i < 0 ? Uu(t) : 0;
    } else
      return !1;
  }
}
function Uu(t) {
  return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
}
function i$(t, e) {
  let n = e ? t.left : t.right;
  return { left: n, right: n, top: t.top, bottom: t.bottom };
}
function jSt(t) {
  let e = t.visualViewport;
  return e ? {
    left: 0,
    right: e.width,
    top: 0,
    bottom: e.height
  } : {
    left: 0,
    right: t.innerWidth,
    top: 0,
    bottom: t.innerHeight
  };
}
function Wpe(t, e) {
  let n = e.width / t.offsetWidth, r = e.height / t.offsetHeight;
  return (n > 0.995 && n < 1.005 || !isFinite(n) || Math.abs(e.width - t.offsetWidth) < 1) && (n = 1), (r > 0.995 && r < 1.005 || !isFinite(r) || Math.abs(e.height - t.offsetHeight) < 1) && (r = 1), { scaleX: n, scaleY: r };
}
function ZSt(t, e, n, r, i, a, o, s) {
  let l = t.ownerDocument, u = l.defaultView || window;
  for (let c = t, f = !1; c && !f; )
    if (c.nodeType == 1) {
      let d, h = c == l.body, p = 1, v = 1;
      if (h)
        d = jSt(u);
      else {
        if (/^(fixed|sticky)$/.test(getComputedStyle(c).position) && (f = !0), c.scrollHeight <= c.clientHeight && c.scrollWidth <= c.clientWidth) {
          c = c.assignedSlot || c.parentNode;
          continue;
        }
        let y = c.getBoundingClientRect();
        ({ scaleX: p, scaleY: v } = Wpe(c, y)), d = {
          left: y.left,
          right: y.left + c.clientWidth * p,
          top: y.top,
          bottom: y.top + c.clientHeight * v
        };
      }
      let g = 0, m = 0;
      if (i == "nearest")
        e.top < d.top ? (m = -(d.top - e.top + o), n > 0 && e.bottom > d.bottom + m && (m = e.bottom - d.bottom + m + o)) : e.bottom > d.bottom && (m = e.bottom - d.bottom + o, n < 0 && e.top - m < d.top && (m = -(d.top + m - e.top + o)));
      else {
        let y = e.bottom - e.top, _ = d.bottom - d.top;
        m = (i == "center" && y <= _ ? e.top + y / 2 - _ / 2 : i == "start" || i == "center" && n < 0 ? e.top - o : e.bottom - _ + o) - d.top;
      }
      if (r == "nearest" ? e.left < d.left ? (g = -(d.left - e.left + a), n > 0 && e.right > d.right + g && (g = e.right - d.right + g + a)) : e.right > d.right && (g = e.right - d.right + a, n < 0 && e.left < d.left + g && (g = -(d.left + g - e.left + a))) : g = (r == "center" ? e.left + (e.right - e.left) / 2 - (d.right - d.left) / 2 : r == "start" == s ? e.left - a : e.right - (d.right - d.left) + a) - d.left, g || m)
        if (h)
          u.scrollBy(g, m);
        else {
          let y = 0, _ = 0;
          if (m) {
            let O = c.scrollTop;
            c.scrollTop += m / v, _ = (c.scrollTop - O) * v;
          }
          if (g) {
            let O = c.scrollLeft;
            c.scrollLeft += g / p, y = (c.scrollLeft - O) * p;
          }
          e = {
            left: e.left - y,
            top: e.top - _,
            right: e.right - y,
            bottom: e.bottom - _
          }, y && Math.abs(y - g) < 1 && (r = "nearest"), _ && Math.abs(_ - m) < 1 && (i = "nearest");
        }
      if (h)
        break;
      c = c.assignedSlot || c.parentNode;
    } else if (c.nodeType == 11)
      c = c.host;
    else
      break;
}
function USt(t) {
  let e = t.ownerDocument;
  for (let n = t.parentNode; n && n != e.body; )
    if (n.nodeType == 1) {
      if (n.scrollHeight > n.clientHeight || n.scrollWidth > n.clientWidth)
        return n;
      n = n.assignedSlot || n.parentNode;
    } else if (n.nodeType == 11)
      n = n.host;
    else
      break;
  return null;
}
class XSt {
  constructor() {
    this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
  }
  eq(e) {
    return this.anchorNode == e.anchorNode && this.anchorOffset == e.anchorOffset && this.focusNode == e.focusNode && this.focusOffset == e.focusOffset;
  }
  setRange(e) {
    let { anchorNode: n, focusNode: r } = e;
    this.set(n, Math.min(e.anchorOffset, n ? Uu(n) : 0), r, Math.min(e.focusOffset, r ? Uu(r) : 0));
  }
  set(e, n, r, i) {
    this.anchorNode = e, this.anchorOffset = n, this.focusNode = r, this.focusOffset = i;
  }
}
let vv = null;
function Qpe(t) {
  if (t.setActive)
    return t.setActive();
  if (vv)
    return t.focus(vv);
  let e = [];
  for (let n = t; n && (e.push(n, n.scrollTop, n.scrollLeft), n != n.ownerDocument); n = n.parentNode)
    ;
  if (t.focus(vv == null ? {
    get preventScroll() {
      return vv = { preventScroll: !0 }, !0;
    }
  } : void 0), !vv) {
    vv = !1;
    for (let n = 0; n < e.length; ) {
      let r = e[n++], i = e[n++], a = e[n++];
      r.scrollTop != i && (r.scrollTop = i), r.scrollLeft != a && (r.scrollLeft = a);
    }
  }
}
let vK;
function ep(t, e, n = e) {
  let r = vK || (vK = document.createRange());
  return r.setEnd(t, n), r.setStart(t, e), r;
}
function ag(t, e, n, r) {
  let i = { key: e, code: e, keyCode: n, which: n, cancelable: !0 };
  r && ({ altKey: i.altKey, ctrlKey: i.ctrlKey, shiftKey: i.shiftKey, metaKey: i.metaKey } = r);
  let a = new KeyboardEvent("keydown", i);
  a.synthetic = !0, t.dispatchEvent(a);
  let o = new KeyboardEvent("keyup", i);
  return o.synthetic = !0, t.dispatchEvent(o), a.defaultPrevented || o.defaultPrevented;
}
function YSt(t) {
  for (; t; ) {
    if (t && (t.nodeType == 9 || t.nodeType == 11 && t.host))
      return t;
    t = t.assignedSlot || t.parentNode;
  }
  return null;
}
function Hpe(t) {
  for (; t.attributes.length; )
    t.removeAttributeNode(t.attributes[0]);
}
function qSt(t, e) {
  let n = e.focusNode, r = e.focusOffset;
  if (!n || e.anchorNode != n || e.anchorOffset != r)
    return !1;
  for (r = Math.min(r, Uu(n)); ; )
    if (r) {
      if (n.nodeType != 1)
        return !1;
      let i = n.childNodes[r - 1];
      i.contentEditable == "false" ? r-- : (n = i, r = Uu(n));
    } else {
      if (n == t)
        return !0;
      r = Jh(n), n = n.parentNode;
    }
}
function Gpe(t) {
  return t.scrollTop > Math.max(1, t.scrollHeight - t.clientHeight - 4);
}
function jpe(t, e) {
  for (let n = t, r = e; ; ) {
    if (n.nodeType == 3 && r > 0)
      return { node: n, offset: r };
    if (n.nodeType == 1 && r > 0) {
      if (n.contentEditable == "false")
        return null;
      n = n.childNodes[r - 1], r = Uu(n);
    } else if (n.parentNode && !$T(n))
      r = Jh(n), n = n.parentNode;
    else
      return null;
  }
}
function Zpe(t, e) {
  for (let n = t, r = e; ; ) {
    if (n.nodeType == 3 && r < n.nodeValue.length)
      return { node: n, offset: r };
    if (n.nodeType == 1 && r < n.childNodes.length) {
      if (n.contentEditable == "false")
        return null;
      n = n.childNodes[r], r = 0;
    } else if (n.parentNode && !$T(n))
      r = Jh(n) + 1, n = n.parentNode;
    else
      return null;
  }
}
class zi {
  constructor(e, n, r = !0) {
    this.node = e, this.offset = n, this.precise = r;
  }
  static before(e, n) {
    return new zi(e.parentNode, Jh(e), n);
  }
  static after(e, n) {
    return new zi(e.parentNode, Jh(e) + 1, n);
  }
}
const nB = [];
class Qn {
  constructor() {
    this.parent = null, this.dom = null, this.flags = 2;
  }
  get overrideDOMText() {
    return null;
  }
  get posAtStart() {
    return this.parent ? this.parent.posBefore(this) : 0;
  }
  get posAtEnd() {
    return this.posAtStart + this.length;
  }
  posBefore(e) {
    let n = this.posAtStart;
    for (let r of this.children) {
      if (r == e)
        return n;
      n += r.length + r.breakAfter;
    }
    throw new RangeError("Invalid child in posBefore");
  }
  posAfter(e) {
    return this.posBefore(e) + e.length;
  }
  sync(e, n) {
    if (this.flags & 2) {
      let r = this.dom, i = null, a;
      for (let o of this.children) {
        if (o.flags & 7) {
          if (!o.dom && (a = i ? i.nextSibling : r.firstChild)) {
            let s = Qn.get(a);
            (!s || !s.parent && s.canReuseDOM(o)) && o.reuseDOM(a);
          }
          o.sync(e, n), o.flags &= -8;
        }
        if (a = i ? i.nextSibling : r.firstChild, n && !n.written && n.node == r && a != o.dom && (n.written = !0), o.dom.parentNode == r)
          for (; a && a != o.dom; )
            a = gK(a);
        else
          r.insertBefore(o.dom, a);
        i = o.dom;
      }
      for (a = i ? i.nextSibling : r.firstChild, a && n && n.node == r && (n.written = !0); a; )
        a = gK(a);
    } else if (this.flags & 1)
      for (let r of this.children)
        r.flags & 7 && (r.sync(e, n), r.flags &= -8);
  }
  reuseDOM(e) {
  }
  localPosFromDOM(e, n) {
    let r;
    if (e == this.dom)
      r = this.dom.childNodes[n];
    else {
      let i = Uu(e) == 0 ? 0 : n == 0 ? -1 : 1;
      for (; ; ) {
        let a = e.parentNode;
        if (a == this.dom)
          break;
        i == 0 && a.firstChild != a.lastChild && (e == a.firstChild ? i = -1 : i = 1), e = a;
      }
      i < 0 ? r = e : r = e.nextSibling;
    }
    if (r == this.dom.firstChild)
      return 0;
    for (; r && !Qn.get(r); )
      r = r.nextSibling;
    if (!r)
      return this.length;
    for (let i = 0, a = 0; ; i++) {
      let o = this.children[i];
      if (o.dom == r)
        return a;
      a += o.length + o.breakAfter;
    }
  }
  domBoundsAround(e, n, r = 0) {
    let i = -1, a = -1, o = -1, s = -1;
    for (let l = 0, u = r, c = r; l < this.children.length; l++) {
      let f = this.children[l], d = u + f.length;
      if (u < e && d > n)
        return f.domBoundsAround(e, n, u);
      if (d >= e && i == -1 && (i = l, a = u), u > n && f.dom.parentNode == this.dom) {
        o = l, s = c;
        break;
      }
      c = d, u = d + f.breakAfter;
    }
    return {
      from: a,
      to: s < 0 ? r + this.length : s,
      startDOM: (i ? this.children[i - 1].dom.nextSibling : null) || this.dom.firstChild,
      endDOM: o < this.children.length && o >= 0 ? this.children[o].dom : null
    };
  }
  markDirty(e = !1) {
    this.flags |= 2, this.markParentsDirty(e);
  }
  markParentsDirty(e) {
    for (let n = this.parent; n; n = n.parent) {
      if (e && (n.flags |= 2), n.flags & 1)
        return;
      n.flags |= 1, e = !1;
    }
  }
  setParent(e) {
    this.parent != e && (this.parent = e, this.flags & 7 && this.markParentsDirty(!0));
  }
  setDOM(e) {
    this.dom != e && (this.dom && (this.dom.cmView = null), this.dom = e, e.cmView = this);
  }
  get rootView() {
    for (let e = this; ; ) {
      let n = e.parent;
      if (!n)
        return e;
      e = n;
    }
  }
  replaceChildren(e, n, r = nB) {
    this.markDirty();
    for (let i = e; i < n; i++) {
      let a = this.children[i];
      a.parent == this && r.indexOf(a) < 0 && a.destroy();
    }
    this.children.splice(e, n - e, ...r);
    for (let i = 0; i < r.length; i++)
      r[i].setParent(this);
  }
  ignoreMutation(e) {
    return !1;
  }
  ignoreEvent(e) {
    return !1;
  }
  childCursor(e = this.length) {
    return new Upe(this.children, e, this.children.length);
  }
  childPos(e, n = 1) {
    return this.childCursor().findPos(e, n);
  }
  toString() {
    let e = this.constructor.name.replace("View", "");
    return e + (this.children.length ? "(" + this.children.join() + ")" : this.length ? "[" + (e == "Text" ? this.text : this.length) + "]" : "") + (this.breakAfter ? "#" : "");
  }
  static get(e) {
    return e.cmView;
  }
  get isEditable() {
    return !0;
  }
  get isWidget() {
    return !1;
  }
  get isHidden() {
    return !1;
  }
  merge(e, n, r, i, a, o) {
    return !1;
  }
  become(e) {
    return !1;
  }
  canReuseDOM(e) {
    return e.constructor == this.constructor && !((this.flags | e.flags) & 8);
  }
  // When this is a zero-length view with a side, this should return a
  // number <= 0 to indicate it is before its position, or a
  // number > 0 when after its position.
  getSide() {
    return 0;
  }
  destroy() {
    for (let e of this.children)
      e.parent == this && e.destroy();
    this.parent = null;
  }
}
Qn.prototype.breakAfter = 0;
function gK(t) {
  let e = t.nextSibling;
  return t.parentNode.removeChild(t), e;
}
class Upe {
  constructor(e, n, r) {
    this.children = e, this.pos = n, this.i = r, this.off = 0;
  }
  findPos(e, n = 1) {
    for (; ; ) {
      if (e > this.pos || e == this.pos && (n > 0 || this.i == 0 || this.children[this.i - 1].breakAfter))
        return this.off = e - this.pos, this;
      let r = this.children[--this.i];
      this.pos -= r.length + r.breakAfter;
    }
  }
}
function Xpe(t, e, n, r, i, a, o, s, l) {
  let { children: u } = t, c = u.length ? u[e] : null, f = a.length ? a[a.length - 1] : null, d = f ? f.breakAfter : o;
  if (!(e == r && c && !o && !d && a.length < 2 && c.merge(n, i, a.length ? f : null, n == 0, s, l))) {
    if (r < u.length) {
      let h = u[r];
      h && (i < h.length || h.breakAfter && (f != null && f.breakAfter)) ? (e == r && (h = h.split(i), i = 0), !d && f && h.merge(0, i, f, !0, 0, l) ? a[a.length - 1] = h : ((i || h.children.length && !h.children[0].length) && h.merge(0, i, null, !1, 0, l), a.push(h))) : h != null && h.breakAfter && (f ? f.breakAfter = 1 : o = 1), r++;
    }
    for (c && (c.breakAfter = o, n > 0 && (!o && a.length && c.merge(n, c.length, a[0], !1, s, 0) ? c.breakAfter = a.shift().breakAfter : (n < c.length || c.children.length && c.children[c.children.length - 1].length == 0) && c.merge(n, c.length, null, !1, s, 0), e++)); e < r && a.length; )
      if (u[r - 1].become(a[a.length - 1]))
        r--, a.pop(), l = a.length ? 0 : s;
      else if (u[e].become(a[0]))
        e++, a.shift(), s = a.length ? 0 : l;
      else
        break;
    !a.length && e && r < u.length && !u[e - 1].breakAfter && u[r].merge(0, 0, u[e - 1], !1, s, l) && e--, (e < r || a.length) && t.replaceChildren(e, r, a);
  }
}
function Ype(t, e, n, r, i, a) {
  let o = t.childCursor(), { i: s, off: l } = o.findPos(n, 1), { i: u, off: c } = o.findPos(e, -1), f = e - n;
  for (let d of r)
    f += d.length;
  t.length += f, Xpe(t, u, c, s, l, r, 0, i, a);
}
let Aa = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, d4 = typeof document < "u" ? document : { documentElement: { style: {} } };
const h4 = /* @__PURE__ */ /Edge\/(\d+)/.exec(Aa.userAgent), qpe = /* @__PURE__ */ /MSIE \d/.test(Aa.userAgent), p4 = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Aa.userAgent), a$ = !!(qpe || p4 || h4), mK = !a$ && /* @__PURE__ */ /gecko\/(\d+)/i.test(Aa.userAgent), tD = !a$ && /* @__PURE__ */ /Chrome\/(\d+)/.exec(Aa.userAgent), yK = "webkitFontSmoothing" in d4.documentElement.style, Kpe = !a$ && /* @__PURE__ */ /Apple Computer/.test(Aa.vendor), bK = Kpe && (/* @__PURE__ */ /Mobile\/\w+/.test(Aa.userAgent) || Aa.maxTouchPoints > 2);
var lt = {
  mac: bK || /* @__PURE__ */ /Mac/.test(Aa.platform),
  windows: /* @__PURE__ */ /Win/.test(Aa.platform),
  linux: /* @__PURE__ */ /Linux|X11/.test(Aa.platform),
  ie: a$,
  ie_version: qpe ? d4.documentMode || 6 : p4 ? +p4[1] : h4 ? +h4[1] : 0,
  gecko: mK,
  gecko_version: mK ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(Aa.userAgent) || [0, 0])[1] : 0,
  chrome: !!tD,
  chrome_version: tD ? +tD[1] : 0,
  ios: bK,
  android: /* @__PURE__ */ /Android\b/.test(Aa.userAgent),
  webkit: yK,
  safari: Kpe,
  webkit_version: yK ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(Aa.userAgent) || [0, 0])[1] : 0,
  tabSize: d4.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size"
};
const KSt = 256;
class Us extends Qn {
  constructor(e) {
    super(), this.text = e;
  }
  get length() {
    return this.text.length;
  }
  createDOM(e) {
    this.setDOM(e || document.createTextNode(this.text));
  }
  sync(e, n) {
    this.dom || this.createDOM(), this.dom.nodeValue != this.text && (n && n.node == this.dom && (n.written = !0), this.dom.nodeValue = this.text);
  }
  reuseDOM(e) {
    e.nodeType == 3 && this.createDOM(e);
  }
  merge(e, n, r) {
    return this.flags & 8 || r && (!(r instanceof Us) || this.length - (n - e) + r.length > KSt || r.flags & 8) ? !1 : (this.text = this.text.slice(0, e) + (r ? r.text : "") + this.text.slice(n), this.markDirty(), !0);
  }
  split(e) {
    let n = new Us(this.text.slice(e));
    return this.text = this.text.slice(0, e), this.markDirty(), n.flags |= this.flags & 8, n;
  }
  localPosFromDOM(e, n) {
    return e == this.dom ? n : n ? this.text.length : 0;
  }
  domAtPos(e) {
    return new zi(this.dom, e);
  }
  domBoundsAround(e, n, r) {
    return { from: r, to: r + this.length, startDOM: this.dom, endDOM: this.dom.nextSibling };
  }
  coordsAt(e, n) {
    return JSt(this.dom, e, n);
  }
}
class Xu extends Qn {
  constructor(e, n = [], r = 0) {
    super(), this.mark = e, this.children = n, this.length = r;
    for (let i of n)
      i.setParent(this);
  }
  setAttrs(e) {
    if (Hpe(e), this.mark.class && (e.className = this.mark.class), this.mark.attrs)
      for (let n in this.mark.attrs)
        e.setAttribute(n, this.mark.attrs[n]);
    return e;
  }
  canReuseDOM(e) {
    return super.canReuseDOM(e) && !((this.flags | e.flags) & 8);
  }
  reuseDOM(e) {
    e.nodeName == this.mark.tagName.toUpperCase() && (this.setDOM(e), this.flags |= 6);
  }
  sync(e, n) {
    this.dom ? this.flags & 4 && this.setAttrs(this.dom) : this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))), super.sync(e, n);
  }
  merge(e, n, r, i, a, o) {
    return r && (!(r instanceof Xu && r.mark.eq(this.mark)) || e && a <= 0 || n < this.length && o <= 0) ? !1 : (Ype(this, e, n, r ? r.children.slice() : [], a - 1, o - 1), this.markDirty(), !0);
  }
  split(e) {
    let n = [], r = 0, i = -1, a = 0;
    for (let s of this.children) {
      let l = r + s.length;
      l > e && n.push(r < e ? s.split(e - r) : s), i < 0 && r >= e && (i = a), r = l, a++;
    }
    let o = this.length - e;
    return this.length = e, i > -1 && (this.children.length = i, this.markDirty()), new Xu(this.mark, n, o);
  }
  domAtPos(e) {
    return Jpe(this, e);
  }
  coordsAt(e, n) {
    return tve(this, e, n);
  }
}
function JSt(t, e, n) {
  let r = t.nodeValue.length;
  e > r && (e = r);
  let i = e, a = e, o = 0;
  e == 0 && n < 0 || e == r && n >= 0 ? lt.chrome || lt.gecko || (e ? (i--, o = 1) : a < r && (a++, o = -1)) : n < 0 ? i-- : a < r && a++;
  let s = ep(t, i, a).getClientRects();
  if (!s.length)
    return null;
  let l = s[(o ? o < 0 : n >= 0) ? 0 : s.length - 1];
  return lt.safari && !o && l.width == 0 && (l = Array.prototype.find.call(s, (u) => u.width) || l), o ? i$(l, o < 0) : l || null;
}
class Yc extends Qn {
  static create(e, n, r) {
    return new Yc(e, n, r);
  }
  constructor(e, n, r) {
    super(), this.widget = e, this.length = n, this.side = r, this.prevWidget = null;
  }
  split(e) {
    let n = Yc.create(this.widget, this.length - e, this.side);
    return this.length -= e, n;
  }
  sync(e) {
    (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), this.prevWidget = null, this.setDOM(this.widget.toDOM(e)), this.widget.editable || (this.dom.contentEditable = "false"));
  }
  getSide() {
    return this.side;
  }
  merge(e, n, r, i, a, o) {
    return r && (!(r instanceof Yc) || !this.widget.compare(r.widget) || e > 0 && a <= 0 || n < this.length && o <= 0) ? !1 : (this.length = e + (r ? r.length : 0) + (this.length - n), !0);
  }
  become(e) {
    return e instanceof Yc && e.side == this.side && this.widget.constructor == e.widget.constructor ? (this.widget.compare(e.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, !0) : !1;
  }
  ignoreMutation() {
    return !0;
  }
  ignoreEvent(e) {
    return this.widget.ignoreEvent(e);
  }
  get overrideDOMText() {
    if (this.length == 0)
      return Sn.empty;
    let e = this;
    for (; e.parent; )
      e = e.parent;
    let { view: n } = e, r = n && n.state.doc, i = this.posAtStart;
    return r ? r.slice(i, i + this.length) : Sn.empty;
  }
  domAtPos(e) {
    return (this.length ? e == 0 : this.side > 0) ? zi.before(this.dom) : zi.after(this.dom, e == this.length);
  }
  domBoundsAround() {
    return null;
  }
  coordsAt(e, n) {
    let r = this.widget.coordsAt(this.dom, e, n);
    if (r)
      return r;
    let i = this.dom.getClientRects(), a = null;
    if (!i.length)
      return null;
    let o = this.side ? this.side < 0 : e > 0;
    for (let s = o ? i.length - 1 : 0; a = i[s], !(e > 0 ? s == 0 : s == i.length - 1 || a.top < a.bottom); s += o ? -1 : 1)
      ;
    return i$(a, !o);
  }
  get isEditable() {
    return !1;
  }
  get isWidget() {
    return !0;
  }
  get isHidden() {
    return this.widget.isHidden;
  }
  destroy() {
    super.destroy(), this.dom && this.widget.destroy(this.dom);
  }
}
class Jg extends Qn {
  constructor(e) {
    super(), this.side = e;
  }
  get length() {
    return 0;
  }
  merge() {
    return !1;
  }
  become(e) {
    return e instanceof Jg && e.side == this.side;
  }
  split() {
    return new Jg(this.side);
  }
  sync() {
    if (!this.dom) {
      let e = document.createElement("img");
      e.className = "cm-widgetBuffer", e.setAttribute("aria-hidden", "true"), this.setDOM(e);
    }
  }
  getSide() {
    return this.side;
  }
  domAtPos(e) {
    return this.side > 0 ? zi.before(this.dom) : zi.after(this.dom);
  }
  localPosFromDOM() {
    return 0;
  }
  domBoundsAround() {
    return null;
  }
  coordsAt(e) {
    return this.dom.getBoundingClientRect();
  }
  get overrideDOMText() {
    return Sn.empty;
  }
  get isHidden() {
    return !0;
  }
}
Us.prototype.children = Yc.prototype.children = Jg.prototype.children = nB;
function Jpe(t, e) {
  let n = t.dom, { children: r } = t, i = 0;
  for (let a = 0; i < r.length; i++) {
    let o = r[i], s = a + o.length;
    if (!(s == a && o.getSide() <= 0)) {
      if (e > a && e < s && o.dom.parentNode == n)
        return o.domAtPos(e - a);
      if (e <= a)
        break;
      a = s;
    }
  }
  for (let a = i; a > 0; a--) {
    let o = r[a - 1];
    if (o.dom.parentNode == n)
      return o.domAtPos(o.length);
  }
  for (let a = i; a < r.length; a++) {
    let o = r[a];
    if (o.dom.parentNode == n)
      return o.domAtPos(0);
  }
  return new zi(n, 0);
}
function eve(t, e, n) {
  let r, { children: i } = t;
  n > 0 && e instanceof Xu && i.length && (r = i[i.length - 1]) instanceof Xu && r.mark.eq(e.mark) ? eve(r, e.children[0], n - 1) : (i.push(e), e.setParent(t)), t.length += e.length;
}
function tve(t, e, n) {
  let r = null, i = -1, a = null, o = -1;
  function s(u, c) {
    for (let f = 0, d = 0; f < u.children.length && d <= c; f++) {
      let h = u.children[f], p = d + h.length;
      p >= c && (h.children.length ? s(h, c - d) : (!a || a.isHidden && n > 0) && (p > c || d == p && h.getSide() > 0) ? (a = h, o = c - d) : (d < c || d == p && h.getSide() < 0 && !h.isHidden) && (r = h, i = c - d)), d = p;
    }
  }
  s(t, e);
  let l = (n < 0 ? r : a) || r || a;
  return l ? l.coordsAt(Math.max(0, l == r ? i : o), n) : ext(t);
}
function ext(t) {
  let e = t.dom.lastChild;
  if (!e)
    return t.dom.getBoundingClientRect();
  let n = Kg(e);
  return n[n.length - 1] || null;
}
function v4(t, e) {
  for (let n in t)
    n == "class" && e.class ? e.class += " " + t.class : n == "style" && e.style ? e.style += ";" + t.style : e[n] = t[n];
  return e;
}
const _K = /* @__PURE__ */ Object.create(null);
function AT(t, e, n) {
  if (t == e)
    return !0;
  t || (t = _K), e || (e = _K);
  let r = Object.keys(t), i = Object.keys(e);
  if (r.length - (n && r.indexOf(n) > -1 ? 1 : 0) != i.length - (n && i.indexOf(n) > -1 ? 1 : 0))
    return !1;
  for (let a of r)
    if (a != n && (i.indexOf(a) == -1 || t[a] !== e[a]))
      return !1;
  return !0;
}
function g4(t, e, n) {
  let r = !1;
  if (e)
    for (let i in e)
      n && i in n || (r = !0, i == "style" ? t.style.cssText = "" : t.removeAttribute(i));
  if (n)
    for (let i in n)
      e && e[i] == n[i] || (r = !0, i == "style" ? t.style.cssText = n[i] : t.setAttribute(i, n[i]));
  return r;
}
function txt(t) {
  let e = /* @__PURE__ */ Object.create(null);
  for (let n = 0; n < t.attributes.length; n++) {
    let r = t.attributes[n];
    e[r.name] = r.value;
  }
  return e;
}
class Rr extends Qn {
  constructor() {
    super(...arguments), this.children = [], this.length = 0, this.prevAttrs = void 0, this.attrs = null, this.breakAfter = 0;
  }
  // Consumes source
  merge(e, n, r, i, a, o) {
    if (r) {
      if (!(r instanceof Rr))
        return !1;
      this.dom || r.transferDOM(this);
    }
    return i && this.setDeco(r ? r.attrs : null), Ype(this, e, n, r ? r.children.slice() : [], a, o), !0;
  }
  split(e) {
    let n = new Rr();
    if (n.breakAfter = this.breakAfter, this.length == 0)
      return n;
    let { i: r, off: i } = this.childPos(e);
    i && (n.append(this.children[r].split(i), 0), this.children[r].merge(i, this.children[r].length, null, !1, 0, 0), r++);
    for (let a = r; a < this.children.length; a++)
      n.append(this.children[a], 0);
    for (; r > 0 && this.children[r - 1].length == 0; )
      this.children[--r].destroy();
    return this.children.length = r, this.markDirty(), this.length = e, n;
  }
  transferDOM(e) {
    this.dom && (this.markDirty(), e.setDOM(this.dom), e.prevAttrs = this.prevAttrs === void 0 ? this.attrs : this.prevAttrs, this.prevAttrs = void 0, this.dom = null);
  }
  setDeco(e) {
    AT(this.attrs, e) || (this.dom && (this.prevAttrs = this.attrs, this.markDirty()), this.attrs = e);
  }
  append(e, n) {
    eve(this, e, n);
  }
  // Only called when building a line view in ContentBuilder
  addLineDeco(e) {
    let n = e.spec.attributes, r = e.spec.class;
    n && (this.attrs = v4(n, this.attrs || {})), r && (this.attrs = v4({ class: r }, this.attrs || {}));
  }
  domAtPos(e) {
    return Jpe(this, e);
  }
  reuseDOM(e) {
    e.nodeName == "DIV" && (this.setDOM(e), this.flags |= 6);
  }
  sync(e, n) {
    var r;
    this.dom ? this.flags & 4 && (Hpe(this.dom), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0) : (this.setDOM(document.createElement("div")), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0), this.prevAttrs !== void 0 && (g4(this.dom, this.prevAttrs, this.attrs), this.dom.classList.add("cm-line"), this.prevAttrs = void 0), super.sync(e, n);
    let i = this.dom.lastChild;
    for (; i && Qn.get(i) instanceof Xu; )
      i = i.lastChild;
    if (!i || !this.length || i.nodeName != "BR" && ((r = Qn.get(i)) === null || r === void 0 ? void 0 : r.isEditable) == !1 && (!lt.ios || !this.children.some((a) => a instanceof Us))) {
      let a = document.createElement("BR");
      a.cmIgnore = !0, this.dom.appendChild(a);
    }
  }
  measureTextSize() {
    if (this.children.length == 0 || this.length > 20)
      return null;
    let e = 0, n;
    for (let r of this.children) {
      if (!(r instanceof Us) || /[^ -~]/.test(r.text))
        return null;
      let i = Kg(r.dom);
      if (i.length != 1)
        return null;
      e += i[0].width, n = i[0].height;
    }
    return e ? {
      lineHeight: this.dom.getBoundingClientRect().height,
      charWidth: e / this.length,
      textHeight: n
    } : null;
  }
  coordsAt(e, n) {
    let r = tve(this, e, n);
    if (!this.children.length && r && this.parent) {
      let { heightOracle: i } = this.parent.view.viewState, a = r.bottom - r.top;
      if (Math.abs(a - i.lineHeight) < 2 && i.textHeight < a) {
        let o = (a - i.textHeight) / 2;
        return { top: r.top + o, bottom: r.bottom - o, left: r.left, right: r.left };
      }
    }
    return r;
  }
  become(e) {
    return e instanceof Rr && this.children.length == 0 && e.children.length == 0 && AT(this.attrs, e.attrs) && this.breakAfter == e.breakAfter;
  }
  covers() {
    return !0;
  }
  static find(e, n) {
    for (let r = 0, i = 0; r < e.children.length; r++) {
      let a = e.children[r], o = i + a.length;
      if (o >= n) {
        if (a instanceof Rr)
          return a;
        if (o > n)
          break;
      }
      i = o + a.breakAfter;
    }
    return null;
  }
}
class Ru extends Qn {
  constructor(e, n, r) {
    super(), this.widget = e, this.length = n, this.deco = r, this.breakAfter = 0, this.prevWidget = null;
  }
  merge(e, n, r, i, a, o) {
    return r && (!(r instanceof Ru) || !this.widget.compare(r.widget) || e > 0 && a <= 0 || n < this.length && o <= 0) ? !1 : (this.length = e + (r ? r.length : 0) + (this.length - n), !0);
  }
  domAtPos(e) {
    return e == 0 ? zi.before(this.dom) : zi.after(this.dom, e == this.length);
  }
  split(e) {
    let n = this.length - e;
    this.length = e;
    let r = new Ru(this.widget, n, this.deco);
    return r.breakAfter = this.breakAfter, r;
  }
  get children() {
    return nB;
  }
  sync(e) {
    (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), this.prevWidget = null, this.setDOM(this.widget.toDOM(e)), this.widget.editable || (this.dom.contentEditable = "false"));
  }
  get overrideDOMText() {
    return this.parent ? this.parent.view.state.doc.slice(this.posAtStart, this.posAtEnd) : Sn.empty;
  }
  domBoundsAround() {
    return null;
  }
  become(e) {
    return e instanceof Ru && e.widget.constructor == this.widget.constructor ? (e.widget.compare(this.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, this.deco = e.deco, this.breakAfter = e.breakAfter, !0) : !1;
  }
  ignoreMutation() {
    return !0;
  }
  ignoreEvent(e) {
    return this.widget.ignoreEvent(e);
  }
  get isEditable() {
    return !1;
  }
  get isWidget() {
    return !0;
  }
  coordsAt(e, n) {
    return this.widget.coordsAt(this.dom, e, n);
  }
  destroy() {
    super.destroy(), this.dom && this.widget.destroy(this.dom);
  }
  covers(e) {
    let { startSide: n, endSide: r } = this.deco;
    return n == r ? !1 : e < 0 ? n < 0 : r > 0;
  }
}
class Jl {
  /**
  Compare this instance to another instance of the same type.
  (TypeScript can't express this, but only instances of the same
  specific class will be passed to this method.) This is used to
  avoid redrawing widgets when they are replaced by a new
  decoration of the same type. The default implementation just
  returns `false`, which will cause new instances of the widget to
  always be redrawn.
  */
  eq(e) {
    return !1;
  }
  /**
  Update a DOM element created by a widget of the same type (but
  different, non-`eq` content) to reflect this widget. May return
  true to indicate that it could update, false to indicate it
  couldn't (in which case the widget will be redrawn). The default
  implementation just returns false.
  */
  updateDOM(e, n) {
    return !1;
  }
  /**
  @internal
  */
  compare(e) {
    return this == e || this.constructor == e.constructor && this.eq(e);
  }
  /**
  The estimated height this widget will have, to be used when
  estimating the height of content that hasn't been drawn. May
  return -1 to indicate you don't know. The default implementation
  returns -1.
  */
  get estimatedHeight() {
    return -1;
  }
  /**
  For inline widgets that are displayed inline (as opposed to
  `inline-block`) and introduce line breaks (through `<br>` tags
  or textual newlines), this must indicate the amount of line
  breaks they introduce. Defaults to 0.
  */
  get lineBreaks() {
    return 0;
  }
  /**
  Can be used to configure which kinds of events inside the widget
  should be ignored by the editor. The default is to ignore all
  events.
  */
  ignoreEvent(e) {
    return !0;
  }
  /**
  Override the way screen coordinates for positions at/in the
  widget are found. `pos` will be the offset into the widget, and
  `side` the side of the position that is being queried—less than
  zero for before, greater than zero for after, and zero for
  directly at that position.
  */
  coordsAt(e, n, r) {
    return null;
  }
  /**
  @internal
  */
  get isHidden() {
    return !1;
  }
  /**
  @internal
  */
  get editable() {
    return !1;
  }
  /**
  This is called when the an instance of the widget is removed
  from the editor view.
  */
  destroy(e) {
  }
}
var la = /* @__PURE__ */ function(t) {
  return t[t.Text = 0] = "Text", t[t.WidgetBefore = 1] = "WidgetBefore", t[t.WidgetAfter = 2] = "WidgetAfter", t[t.WidgetRange = 3] = "WidgetRange", t;
}(la || (la = {}));
class pt extends Kh {
  constructor(e, n, r, i) {
    super(), this.startSide = e, this.endSide = n, this.widget = r, this.spec = i;
  }
  /**
  @internal
  */
  get heightRelevant() {
    return !1;
  }
  /**
  Create a mark decoration, which influences the styling of the
  content in its range. Nested mark decorations will cause nested
  DOM elements to be created. Nesting order is determined by
  precedence of the [facet](https://codemirror.net/6/docs/ref/#view.EditorView^decorations), with
  the higher-precedence decorations creating the inner DOM nodes.
  Such elements are split on line boundaries and on the boundaries
  of lower-precedence decorations.
  */
  static mark(e) {
    return new A1(e);
  }
  /**
  Create a widget decoration, which displays a DOM element at the
  given position.
  */
  static widget(e) {
    let n = Math.max(-1e4, Math.min(1e4, e.side || 0)), r = !!e.block;
    return n += r && !e.inlineOrder ? n > 0 ? 3e8 : -4e8 : n > 0 ? 1e8 : -1e8, new Pf(e, n, n, r, e.widget || null, !1);
  }
  /**
  Create a replace decoration which replaces the given range with
  a widget, or simply hides it.
  */
  static replace(e) {
    let n = !!e.block, r, i;
    if (e.isBlockGap)
      r = -5e8, i = 4e8;
    else {
      let { start: a, end: o } = nve(e, n);
      r = (a ? n ? -3e8 : -1 : 5e8) - 1, i = (o ? n ? 2e8 : 1 : -6e8) + 1;
    }
    return new Pf(e, r, i, n, e.widget || null, !0);
  }
  /**
  Create a line decoration, which can add DOM attributes to the
  line starting at the given position.
  */
  static line(e) {
    return new E1(e);
  }
  /**
  Build a [`DecorationSet`](https://codemirror.net/6/docs/ref/#view.DecorationSet) from the given
  decorated range or ranges. If the ranges aren't already sorted,
  pass `true` for `sort` to make the library sort them for you.
  */
  static set(e, n = !1) {
    return On.of(e, n);
  }
  /**
  @internal
  */
  hasHeight() {
    return this.widget ? this.widget.estimatedHeight > -1 : !1;
  }
}
pt.none = On.empty;
class A1 extends pt {
  constructor(e) {
    let { start: n, end: r } = nve(e);
    super(n ? -1 : 5e8, r ? 1 : -6e8, null, e), this.tagName = e.tagName || "span", this.class = e.class || "", this.attrs = e.attributes || null;
  }
  eq(e) {
    var n, r;
    return this == e || e instanceof A1 && this.tagName == e.tagName && (this.class || ((n = this.attrs) === null || n === void 0 ? void 0 : n.class)) == (e.class || ((r = e.attrs) === null || r === void 0 ? void 0 : r.class)) && AT(this.attrs, e.attrs, "class");
  }
  range(e, n = e) {
    if (e >= n)
      throw new RangeError("Mark decorations may not be empty");
    return super.range(e, n);
  }
}
A1.prototype.point = !1;
class E1 extends pt {
  constructor(e) {
    super(-2e8, -2e8, null, e);
  }
  eq(e) {
    return e instanceof E1 && this.spec.class == e.spec.class && AT(this.spec.attributes, e.spec.attributes);
  }
  range(e, n = e) {
    if (n != e)
      throw new RangeError("Line decoration ranges must be zero-length");
    return super.range(e, n);
  }
}
E1.prototype.mapMode = Oi.TrackBefore;
E1.prototype.point = !0;
class Pf extends pt {
  constructor(e, n, r, i, a, o) {
    super(n, r, a, e), this.block = i, this.isReplace = o, this.mapMode = i ? n <= 0 ? Oi.TrackBefore : Oi.TrackAfter : Oi.TrackDel;
  }
  // Only relevant when this.block == true
  get type() {
    return this.startSide != this.endSide ? la.WidgetRange : this.startSide <= 0 ? la.WidgetBefore : la.WidgetAfter;
  }
  get heightRelevant() {
    return this.block || !!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0);
  }
  eq(e) {
    return e instanceof Pf && nxt(this.widget, e.widget) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide;
  }
  range(e, n = e) {
    if (this.isReplace && (e > n || e == n && this.startSide > 0 && this.endSide <= 0))
      throw new RangeError("Invalid range for replacement decoration");
    if (!this.isReplace && n != e)
      throw new RangeError("Widget decorations can only have zero-length ranges");
    return super.range(e, n);
  }
}
Pf.prototype.point = !0;
function nve(t, e = !1) {
  let { inclusiveStart: n, inclusiveEnd: r } = t;
  return n == null && (n = t.inclusive), r == null && (r = t.inclusive), { start: n ?? e, end: r ?? e };
}
function nxt(t, e) {
  return t == e || !!(t && e && t.compare(e));
}
function m4(t, e, n, r = 0) {
  let i = n.length - 1;
  i >= 0 && n[i] + r >= t ? n[i] = Math.max(n[i], e) : n.push(t, e);
}
class gb {
  constructor(e, n, r, i) {
    this.doc = e, this.pos = n, this.end = r, this.disallowBlockEffectsFor = i, this.content = [], this.curLine = null, this.breakAtStart = 0, this.pendingBuffer = 0, this.bufferMarks = [], this.atCursorPos = !0, this.openStart = -1, this.openEnd = -1, this.text = "", this.textOff = 0, this.cursor = e.iter(), this.skip = n;
  }
  posCovered() {
    if (this.content.length == 0)
      return !this.breakAtStart && this.doc.lineAt(this.pos).from != this.pos;
    let e = this.content[this.content.length - 1];
    return !(e.breakAfter || e instanceof Ru && e.deco.endSide < 0);
  }
  getLine() {
    return this.curLine || (this.content.push(this.curLine = new Rr()), this.atCursorPos = !0), this.curLine;
  }
  flushBuffer(e = this.bufferMarks) {
    this.pendingBuffer && (this.curLine.append(lx(new Jg(-1), e), e.length), this.pendingBuffer = 0);
  }
  addBlockWidget(e) {
    this.flushBuffer(), this.curLine = null, this.content.push(e);
  }
  finish(e) {
    this.pendingBuffer && e <= this.bufferMarks.length ? this.flushBuffer() : this.pendingBuffer = 0, !this.posCovered() && !(e && this.content.length && this.content[this.content.length - 1] instanceof Ru) && this.getLine();
  }
  buildText(e, n, r) {
    for (; e > 0; ) {
      if (this.textOff == this.text.length) {
        let { value: a, lineBreak: o, done: s } = this.cursor.next(this.skip);
        if (this.skip = 0, s)
          throw new Error("Ran out of text content when drawing inline views");
        if (o) {
          this.posCovered() || this.getLine(), this.content.length ? this.content[this.content.length - 1].breakAfter = 1 : this.breakAtStart = 1, this.flushBuffer(), this.curLine = null, this.atCursorPos = !0, e--;
          continue;
        } else
          this.text = a, this.textOff = 0;
      }
      let i = Math.min(
        this.text.length - this.textOff,
        e,
        512
        /* T.Chunk */
      );
      this.flushBuffer(n.slice(n.length - r)), this.getLine().append(lx(new Us(this.text.slice(this.textOff, this.textOff + i)), n), r), this.atCursorPos = !0, this.textOff += i, e -= i, r = 0;
    }
  }
  span(e, n, r, i) {
    this.buildText(n - e, r, i), this.pos = n, this.openStart < 0 && (this.openStart = i);
  }
  point(e, n, r, i, a, o) {
    if (this.disallowBlockEffectsFor[o] && r instanceof Pf) {
      if (r.block)
        throw new RangeError("Block decorations may not be specified via plugins");
      if (n > this.doc.lineAt(this.pos).to)
        throw new RangeError("Decorations that replace line breaks may not be specified via plugins");
    }
    let s = n - e;
    if (r instanceof Pf)
      if (r.block)
        r.startSide > 0 && !this.posCovered() && this.getLine(), this.addBlockWidget(new Ru(r.widget || em.block, s, r));
      else {
        let l = Yc.create(r.widget || em.inline, s, s ? 0 : r.startSide), u = this.atCursorPos && !l.isEditable && a <= i.length && (e < n || r.startSide > 0), c = !l.isEditable && (e < n || a > i.length || r.startSide <= 0), f = this.getLine();
        this.pendingBuffer == 2 && !u && !l.isEditable && (this.pendingBuffer = 0), this.flushBuffer(i), u && (f.append(lx(new Jg(1), i), a), a = i.length + Math.max(0, a - i.length)), f.append(lx(l, i), a), this.atCursorPos = c, this.pendingBuffer = c ? e < n || a > i.length ? 1 : 2 : 0, this.pendingBuffer && (this.bufferMarks = i.slice());
      }
    else this.doc.lineAt(this.pos).from == this.pos && this.getLine().addLineDeco(r);
    s && (this.textOff + s <= this.text.length ? this.textOff += s : (this.skip += s - (this.text.length - this.textOff), this.text = "", this.textOff = 0), this.pos = n), this.openStart < 0 && (this.openStart = a);
  }
  static build(e, n, r, i, a) {
    let o = new gb(e, n, r, a);
    return o.openEnd = On.spans(i, n, r, o), o.openStart < 0 && (o.openStart = o.openEnd), o.finish(o.openEnd), o;
  }
}
function lx(t, e) {
  for (let n of e)
    t = new Xu(n, [t], t.length);
  return t;
}
class em extends Jl {
  constructor(e) {
    super(), this.tag = e;
  }
  eq(e) {
    return e.tag == this.tag;
  }
  toDOM() {
    return document.createElement(this.tag);
  }
  updateDOM(e) {
    return e.nodeName.toLowerCase() == this.tag;
  }
  get isHidden() {
    return !0;
  }
}
em.inline = /* @__PURE__ */ new em("span");
em.block = /* @__PURE__ */ new em("div");
var ir = /* @__PURE__ */ function(t) {
  return t[t.LTR = 0] = "LTR", t[t.RTL = 1] = "RTL", t;
}(ir || (ir = {}));
const tp = ir.LTR, rB = ir.RTL;
function rve(t) {
  let e = [];
  for (let n = 0; n < t.length; n++)
    e.push(1 << +t[n]);
  return e;
}
const rxt = /* @__PURE__ */ rve("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), ixt = /* @__PURE__ */ rve("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), y4 = /* @__PURE__ */ Object.create(null), dl = [];
for (let t of ["()", "[]", "{}"]) {
  let e = /* @__PURE__ */ t.charCodeAt(0), n = /* @__PURE__ */ t.charCodeAt(1);
  y4[e] = n, y4[n] = -e;
}
function ive(t) {
  return t <= 247 ? rxt[t] : 1424 <= t && t <= 1524 ? 2 : 1536 <= t && t <= 1785 ? ixt[t - 1536] : 1774 <= t && t <= 2220 ? 4 : 8192 <= t && t <= 8204 ? 256 : 64336 <= t && t <= 65023 ? 4 : 1;
}
const axt = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;
class qc {
  /**
  The direction of this span.
  */
  get dir() {
    return this.level % 2 ? rB : tp;
  }
  /**
  @internal
  */
  constructor(e, n, r) {
    this.from = e, this.to = n, this.level = r;
  }
  /**
  @internal
  */
  side(e, n) {
    return this.dir == n == e ? this.to : this.from;
  }
  /**
  @internal
  */
  forward(e, n) {
    return e == (this.dir == n);
  }
  /**
  @internal
  */
  static find(e, n, r, i) {
    let a = -1;
    for (let o = 0; o < e.length; o++) {
      let s = e[o];
      if (s.from <= n && s.to >= n) {
        if (s.level == r)
          return o;
        (a < 0 || (i != 0 ? i < 0 ? s.from < n : s.to > n : e[a].level > s.level)) && (a = o);
      }
    }
    if (a < 0)
      throw new RangeError("Index out of range");
    return a;
  }
}
function ave(t, e) {
  if (t.length != e.length)
    return !1;
  for (let n = 0; n < t.length; n++) {
    let r = t[n], i = e[n];
    if (r.from != i.from || r.to != i.to || r.direction != i.direction || !ave(r.inner, i.inner))
      return !1;
  }
  return !0;
}
const Wn = [];
function oxt(t, e, n, r, i) {
  for (let a = 0; a <= r.length; a++) {
    let o = a ? r[a - 1].to : e, s = a < r.length ? r[a].from : n, l = a ? 256 : i;
    for (let u = o, c = l, f = l; u < s; u++) {
      let d = ive(t.charCodeAt(u));
      d == 512 ? d = c : d == 8 && f == 4 && (d = 16), Wn[u] = d == 4 ? 2 : d, d & 7 && (f = d), c = d;
    }
    for (let u = o, c = l, f = l; u < s; u++) {
      let d = Wn[u];
      if (d == 128)
        u < s - 1 && c == Wn[u + 1] && c & 24 ? d = Wn[u] = c : Wn[u] = 256;
      else if (d == 64) {
        let h = u + 1;
        for (; h < s && Wn[h] == 64; )
          h++;
        let p = u && c == 8 || h < n && Wn[h] == 8 ? f == 1 ? 1 : 8 : 256;
        for (let v = u; v < h; v++)
          Wn[v] = p;
        u = h - 1;
      } else d == 8 && f == 1 && (Wn[u] = 1);
      c = d, d & 7 && (f = d);
    }
  }
}
function sxt(t, e, n, r, i) {
  let a = i == 1 ? 2 : 1;
  for (let o = 0, s = 0, l = 0; o <= r.length; o++) {
    let u = o ? r[o - 1].to : e, c = o < r.length ? r[o].from : n;
    for (let f = u, d, h, p; f < c; f++)
      if (h = y4[d = t.charCodeAt(f)])
        if (h < 0) {
          for (let v = s - 3; v >= 0; v -= 3)
            if (dl[v + 1] == -h) {
              let g = dl[v + 2], m = g & 2 ? i : g & 4 ? g & 1 ? a : i : 0;
              m && (Wn[f] = Wn[dl[v]] = m), s = v;
              break;
            }
        } else {
          if (dl.length == 189)
            break;
          dl[s++] = f, dl[s++] = d, dl[s++] = l;
        }
      else if ((p = Wn[f]) == 2 || p == 1) {
        let v = p == i;
        l = v ? 0 : 1;
        for (let g = s - 3; g >= 0; g -= 3) {
          let m = dl[g + 2];
          if (m & 2)
            break;
          if (v)
            dl[g + 2] |= 2;
          else {
            if (m & 4)
              break;
            dl[g + 2] |= 4;
          }
        }
      }
  }
}
function lxt(t, e, n, r) {
  for (let i = 0, a = r; i <= n.length; i++) {
    let o = i ? n[i - 1].to : t, s = i < n.length ? n[i].from : e;
    for (let l = o; l < s; ) {
      let u = Wn[l];
      if (u == 256) {
        let c = l + 1;
        for (; ; )
          if (c == s) {
            if (i == n.length)
              break;
            c = n[i++].to, s = i < n.length ? n[i].from : e;
          } else if (Wn[c] == 256)
            c++;
          else
            break;
        let f = a == 1, d = (c < e ? Wn[c] : r) == 1, h = f == d ? f ? 1 : 2 : r;
        for (let p = c, v = i, g = v ? n[v - 1].to : t; p > l; )
          p == g && (p = n[--v].from, g = v ? n[v - 1].to : t), Wn[--p] = h;
        l = c;
      } else
        a = u, l++;
    }
  }
}
function b4(t, e, n, r, i, a, o) {
  let s = r % 2 ? 2 : 1;
  if (r % 2 == i % 2)
    for (let l = e, u = 0; l < n; ) {
      let c = !0, f = !1;
      if (u == a.length || l < a[u].from) {
        let v = Wn[l];
        v != s && (c = !1, f = v == 16);
      }
      let d = !c && s == 1 ? [] : null, h = c ? r : r + 1, p = l;
      e: for (; ; )
        if (u < a.length && p == a[u].from) {
          if (f)
            break e;
          let v = a[u];
          if (!c)
            for (let g = v.to, m = u + 1; ; ) {
              if (g == n)
                break e;
              if (m < a.length && a[m].from == g)
                g = a[m++].to;
              else {
                if (Wn[g] == s)
                  break e;
                break;
              }
            }
          if (u++, d)
            d.push(v);
          else {
            v.from > l && o.push(new qc(l, v.from, h));
            let g = v.direction == tp != !(h % 2);
            _4(t, g ? r + 1 : r, i, v.inner, v.from, v.to, o), l = v.to;
          }
          p = v.to;
        } else {
          if (p == n || (c ? Wn[p] != s : Wn[p] == s))
            break;
          p++;
        }
      d ? b4(t, l, p, r + 1, i, d, o) : l < p && o.push(new qc(l, p, h)), l = p;
    }
  else
    for (let l = n, u = a.length; l > e; ) {
      let c = !0, f = !1;
      if (!u || l > a[u - 1].to) {
        let v = Wn[l - 1];
        v != s && (c = !1, f = v == 16);
      }
      let d = !c && s == 1 ? [] : null, h = c ? r : r + 1, p = l;
      e: for (; ; )
        if (u && p == a[u - 1].to) {
          if (f)
            break e;
          let v = a[--u];
          if (!c)
            for (let g = v.from, m = u; ; ) {
              if (g == e)
                break e;
              if (m && a[m - 1].to == g)
                g = a[--m].from;
              else {
                if (Wn[g - 1] == s)
                  break e;
                break;
              }
            }
          if (d)
            d.push(v);
          else {
            v.to < l && o.push(new qc(v.to, l, h));
            let g = v.direction == tp != !(h % 2);
            _4(t, g ? r + 1 : r, i, v.inner, v.from, v.to, o), l = v.from;
          }
          p = v.from;
        } else {
          if (p == e || (c ? Wn[p - 1] != s : Wn[p - 1] == s))
            break;
          p--;
        }
      d ? b4(t, p, l, r + 1, i, d, o) : p < l && o.push(new qc(p, l, h)), l = p;
    }
}
function _4(t, e, n, r, i, a, o) {
  let s = e % 2 ? 2 : 1;
  oxt(t, i, a, r, s), sxt(t, i, a, r, s), lxt(i, a, r, s), b4(t, i, a, e, n, r, o);
}
function uxt(t, e, n) {
  if (!t)
    return [new qc(0, 0, e == rB ? 1 : 0)];
  if (e == tp && !n.length && !axt.test(t))
    return ove(t.length);
  if (n.length)
    for (; t.length > Wn.length; )
      Wn[Wn.length] = 256;
  let r = [], i = e == tp ? 0 : 1;
  return _4(t, i, i, n, 0, t.length, r), r;
}
function ove(t) {
  return [new qc(0, t, 0)];
}
let sve = "";
function cxt(t, e, n, r, i) {
  var a;
  let o = r.head - t.from, s = qc.find(e, o, (a = r.bidiLevel) !== null && a !== void 0 ? a : -1, r.assoc), l = e[s], u = l.side(i, n);
  if (o == u) {
    let d = s += i ? 1 : -1;
    if (d < 0 || d >= e.length)
      return null;
    l = e[s = d], o = l.side(!i, n), u = l.side(i, n);
  }
  let c = wi(t.text, o, l.forward(i, n));
  (c < l.from || c > l.to) && (c = u), sve = t.text.slice(Math.min(o, c), Math.max(o, c));
  let f = s == (i ? e.length - 1 : 0) ? null : e[s + (i ? 1 : -1)];
  return f && c == u && f.level + (i ? 0 : 1) < l.level ? De.cursor(f.side(!i, n) + t.from, f.forward(i, n) ? 1 : -1, f.level) : De.cursor(c + t.from, l.forward(i, n) ? -1 : 1, l.level);
}
function fxt(t, e, n) {
  for (let r = e; r < n; r++) {
    let i = ive(t.charCodeAt(r));
    if (i == 1)
      return tp;
    if (i == 2 || i == 4)
      return rB;
  }
  return tp;
}
const lve = /* @__PURE__ */ ut.define(), uve = /* @__PURE__ */ ut.define(), cve = /* @__PURE__ */ ut.define(), fve = /* @__PURE__ */ ut.define(), O4 = /* @__PURE__ */ ut.define(), dve = /* @__PURE__ */ ut.define(), hve = /* @__PURE__ */ ut.define(), pve = /* @__PURE__ */ ut.define({
  combine: (t) => t.some((e) => e)
}), vve = /* @__PURE__ */ ut.define({
  combine: (t) => t.some((e) => e)
}), gve = /* @__PURE__ */ ut.define();
class og {
  constructor(e, n = "nearest", r = "nearest", i = 5, a = 5, o = !1) {
    this.range = e, this.y = n, this.x = r, this.yMargin = i, this.xMargin = a, this.isSnapshot = o;
  }
  map(e) {
    return e.empty ? this : new og(this.range.map(e), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
  }
  clip(e) {
    return this.range.to <= e.doc.length ? this : new og(De.cursor(e.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
  }
}
const ux = /* @__PURE__ */ zt.define({ map: (t, e) => t.map(e) }), mve = /* @__PURE__ */ zt.define();
function Ia(t, e, n) {
  let r = t.facet(fve);
  r.length ? r[0](e) : window.onerror ? window.onerror(String(e), n, void 0, void 0, e) : n ? console.error(n + ":", e) : console.error(e);
}
const Nc = /* @__PURE__ */ ut.define({ combine: (t) => t.length ? t[0] : !0 });
let dxt = 0;
const Ty = /* @__PURE__ */ ut.define();
class Ir {
  constructor(e, n, r, i, a) {
    this.id = e, this.create = n, this.domEventHandlers = r, this.domEventObservers = i, this.extension = a(this);
  }
  /**
  Define a plugin from a constructor function that creates the
  plugin's value, given an editor view.
  */
  static define(e, n) {
    const { eventHandlers: r, eventObservers: i, provide: a, decorations: o } = n || {};
    return new Ir(dxt++, e, r, i, (s) => {
      let l = [Ty.of(s)];
      return o && l.push(b_.of((u) => {
        let c = u.plugin(s);
        return c ? o(c) : pt.none;
      })), a && l.push(a(s)), l;
    });
  }
  /**
  Create a plugin for a class whose constructor takes a single
  editor view as argument.
  */
  static fromClass(e, n) {
    return Ir.define((r) => new e(r), n);
  }
}
class nD {
  constructor(e) {
    this.spec = e, this.mustUpdate = null, this.value = null;
  }
  update(e) {
    if (this.value) {
      if (this.mustUpdate) {
        let n = this.mustUpdate;
        if (this.mustUpdate = null, this.value.update)
          try {
            this.value.update(n);
          } catch (r) {
            if (Ia(n.state, r, "CodeMirror plugin crashed"), this.value.destroy)
              try {
                this.value.destroy();
              } catch {
              }
            this.deactivate();
          }
      }
    } else if (this.spec)
      try {
        this.value = this.spec.create(e);
      } catch (n) {
        Ia(e.state, n, "CodeMirror plugin crashed"), this.deactivate();
      }
    return this;
  }
  destroy(e) {
    var n;
    if (!((n = this.value) === null || n === void 0) && n.destroy)
      try {
        this.value.destroy();
      } catch (r) {
        Ia(e.state, r, "CodeMirror plugin crashed");
      }
  }
  deactivate() {
    this.spec = this.value = null;
  }
}
const yve = /* @__PURE__ */ ut.define(), iB = /* @__PURE__ */ ut.define(), b_ = /* @__PURE__ */ ut.define(), bve = /* @__PURE__ */ ut.define(), aB = /* @__PURE__ */ ut.define(), _ve = /* @__PURE__ */ ut.define();
function OK(t, e) {
  let n = t.state.facet(_ve);
  if (!n.length)
    return n;
  let r = n.map((a) => a instanceof Function ? a(t) : a), i = [];
  return On.spans(r, e.from, e.to, {
    point() {
    },
    span(a, o, s, l) {
      let u = a - e.from, c = o - e.from, f = i;
      for (let d = s.length - 1; d >= 0; d--, l--) {
        let h = s[d].spec.bidiIsolate, p;
        if (h == null && (h = fxt(e.text, u, c)), l > 0 && f.length && (p = f[f.length - 1]).to == u && p.direction == h)
          p.to = c, f = p.inner;
        else {
          let v = { from: u, to: c, direction: h, inner: [] };
          f.push(v), f = v.inner;
        }
      }
    }
  }), i;
}
const Ove = /* @__PURE__ */ ut.define();
function Sve(t) {
  let e = 0, n = 0, r = 0, i = 0;
  for (let a of t.state.facet(Ove)) {
    let o = a(t);
    o && (o.left != null && (e = Math.max(e, o.left)), o.right != null && (n = Math.max(n, o.right)), o.top != null && (r = Math.max(r, o.top)), o.bottom != null && (i = Math.max(i, o.bottom)));
  }
  return { left: e, right: n, top: r, bottom: i };
}
const Py = /* @__PURE__ */ ut.define();
class Jo {
  constructor(e, n, r, i) {
    this.fromA = e, this.toA = n, this.fromB = r, this.toB = i;
  }
  join(e) {
    return new Jo(Math.min(this.fromA, e.fromA), Math.max(this.toA, e.toA), Math.min(this.fromB, e.fromB), Math.max(this.toB, e.toB));
  }
  addToSet(e) {
    let n = e.length, r = this;
    for (; n > 0; n--) {
      let i = e[n - 1];
      if (!(i.fromA > r.toA)) {
        if (i.toA < r.fromA)
          break;
        r = r.join(i), e.splice(n - 1, 1);
      }
    }
    return e.splice(n, 0, r), e;
  }
  static extendWithRanges(e, n) {
    if (n.length == 0)
      return e;
    let r = [];
    for (let i = 0, a = 0, o = 0, s = 0; ; i++) {
      let l = i == e.length ? null : e[i], u = o - s, c = l ? l.fromB : 1e9;
      for (; a < n.length && n[a] < c; ) {
        let f = n[a], d = n[a + 1], h = Math.max(s, f), p = Math.min(c, d);
        if (h <= p && new Jo(h + u, p + u, h, p).addToSet(r), d > c)
          break;
        a += 2;
      }
      if (!l)
        return r;
      new Jo(l.fromA, l.toA, l.fromB, l.toB).addToSet(r), o = l.toA, s = l.toB;
    }
  }
}
class ET {
  constructor(e, n, r) {
    this.view = e, this.state = n, this.transactions = r, this.flags = 0, this.startState = e.state, this.changes = Zr.empty(this.startState.doc.length);
    for (let a of r)
      this.changes = this.changes.compose(a.changes);
    let i = [];
    this.changes.iterChangedRanges((a, o, s, l) => i.push(new Jo(a, o, s, l))), this.changedRanges = i;
  }
  /**
  @internal
  */
  static create(e, n, r) {
    return new ET(e, n, r);
  }
  /**
  Tells you whether the [viewport](https://codemirror.net/6/docs/ref/#view.EditorView.viewport) or
  [visible ranges](https://codemirror.net/6/docs/ref/#view.EditorView.visibleRanges) changed in this
  update.
  */
  get viewportChanged() {
    return (this.flags & 4) > 0;
  }
  /**
  Indicates whether the height of a block element in the editor
  changed in this update.
  */
  get heightChanged() {
    return (this.flags & 2) > 0;
  }
  /**
  Returns true when the document was modified or the size of the
  editor, or elements within the editor, changed.
  */
  get geometryChanged() {
    return this.docChanged || (this.flags & 10) > 0;
  }
  /**
  True when this update indicates a focus change.
  */
  get focusChanged() {
    return (this.flags & 1) > 0;
  }
  /**
  Whether the document changed in this update.
  */
  get docChanged() {
    return !this.changes.empty;
  }
  /**
  Whether the selection was explicitly set in this update.
  */
  get selectionSet() {
    return this.transactions.some((e) => e.selection);
  }
  /**
  @internal
  */
  get empty() {
    return this.flags == 0 && this.transactions.length == 0;
  }
}
class SK extends Qn {
  get length() {
    return this.view.state.doc.length;
  }
  constructor(e) {
    super(), this.view = e, this.decorations = [], this.dynamicDecorationMap = [!1], this.domChanged = null, this.hasComposition = null, this.markedForComposition = /* @__PURE__ */ new Set(), this.editContextFormatting = pt.none, this.lastCompositionAfterCursor = !1, this.minWidth = 0, this.minWidthFrom = 0, this.minWidthTo = 0, this.impreciseAnchor = null, this.impreciseHead = null, this.forceSelection = !1, this.lastUpdate = Date.now(), this.setDOM(e.contentDOM), this.children = [new Rr()], this.children[0].setParent(this), this.updateDeco(), this.updateInner([new Jo(0, 0, 0, e.state.doc.length)], 0, null);
  }
  // Update the document view to a given state.
  update(e) {
    var n;
    let r = e.changedRanges;
    this.minWidth > 0 && r.length && (r.every(({ fromA: u, toA: c }) => c < this.minWidthFrom || u > this.minWidthTo) ? (this.minWidthFrom = e.changes.mapPos(this.minWidthFrom, 1), this.minWidthTo = e.changes.mapPos(this.minWidthTo, 1)) : this.minWidth = this.minWidthFrom = this.minWidthTo = 0), this.updateEditContextFormatting(e);
    let i = -1;
    this.view.inputState.composing >= 0 && !this.view.observer.editContext && (!((n = this.domChanged) === null || n === void 0) && n.newSel ? i = this.domChanged.newSel.head : !bxt(e.changes, this.hasComposition) && !e.selectionSet && (i = e.state.selection.main.head));
    let a = i > -1 ? pxt(this.view, e.changes, i) : null;
    if (this.domChanged = null, this.hasComposition) {
      this.markedForComposition.clear();
      let { from: u, to: c } = this.hasComposition;
      r = new Jo(u, c, e.changes.mapPos(u, -1), e.changes.mapPos(c, 1)).addToSet(r.slice());
    }
    this.hasComposition = a ? { from: a.range.fromB, to: a.range.toB } : null, (lt.ie || lt.chrome) && !a && e && e.state.doc.lines != e.startState.doc.lines && (this.forceSelection = !0);
    let o = this.decorations, s = this.updateDeco(), l = mxt(o, s, e.changes);
    return r = Jo.extendWithRanges(r, l), !(this.flags & 7) && r.length == 0 ? !1 : (this.updateInner(r, e.startState.doc.length, a), e.transactions.length && (this.lastUpdate = Date.now()), !0);
  }
  // Used by update and the constructor do perform the actual DOM
  // update
  updateInner(e, n, r) {
    this.view.viewState.mustMeasureContent = !0, this.updateChildren(e, n, r);
    let { observer: i } = this.view;
    i.ignore(() => {
      this.dom.style.height = this.view.viewState.contentHeight / this.view.scaleY + "px", this.dom.style.flexBasis = this.minWidth ? this.minWidth + "px" : "";
      let o = lt.chrome || lt.ios ? { node: i.selectionRange.focusNode, written: !1 } : void 0;
      this.sync(this.view, o), this.flags &= -8, o && (o.written || i.selectionRange.focusNode != o.node) && (this.forceSelection = !0), this.dom.style.height = "";
    }), this.markedForComposition.forEach(
      (o) => o.flags &= -9
      /* ViewFlag.Composition */
    );
    let a = [];
    if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length)
      for (let o of this.children)
        o instanceof Ru && o.widget instanceof xK && a.push(o.dom);
    i.updateGaps(a);
  }
  updateChildren(e, n, r) {
    let i = r ? r.range.addToSet(e.slice()) : e, a = this.childCursor(n);
    for (let o = i.length - 1; ; o--) {
      let s = o >= 0 ? i[o] : null;
      if (!s)
        break;
      let { fromA: l, toA: u, fromB: c, toB: f } = s, d, h, p, v;
      if (r && r.range.fromB < f && r.range.toB > c) {
        let O = gb.build(this.view.state.doc, c, r.range.fromB, this.decorations, this.dynamicDecorationMap), S = gb.build(this.view.state.doc, r.range.toB, f, this.decorations, this.dynamicDecorationMap);
        h = O.breakAtStart, p = O.openStart, v = S.openEnd;
        let x = this.compositionView(r);
        S.breakAtStart ? x.breakAfter = 1 : S.content.length && x.merge(x.length, x.length, S.content[0], !1, S.openStart, 0) && (x.breakAfter = S.content[0].breakAfter, S.content.shift()), O.content.length && x.merge(0, 0, O.content[O.content.length - 1], !0, 0, O.openEnd) && O.content.pop(), d = O.content.concat(x).concat(S.content);
      } else
        ({ content: d, breakAtStart: h, openStart: p, openEnd: v } = gb.build(this.view.state.doc, c, f, this.decorations, this.dynamicDecorationMap));
      let { i: g, off: m } = a.findPos(u, 1), { i: y, off: _ } = a.findPos(l, -1);
      Xpe(this, y, _, g, m, d, h, p, v);
    }
    r && this.fixCompositionDOM(r);
  }
  updateEditContextFormatting(e) {
    this.editContextFormatting = this.editContextFormatting.map(e.changes);
    for (let n of e.transactions)
      for (let r of n.effects)
        r.is(mve) && (this.editContextFormatting = r.value);
  }
  compositionView(e) {
    let n = new Us(e.text.nodeValue);
    n.flags |= 8;
    for (let { deco: i } of e.marks)
      n = new Xu(i, [n], n.length);
    let r = new Rr();
    return r.append(n, 0), r;
  }
  fixCompositionDOM(e) {
    let n = (a, o) => {
      o.flags |= 8 | (o.children.some(
        (l) => l.flags & 7
        /* ViewFlag.Dirty */
      ) ? 1 : 0), this.markedForComposition.add(o);
      let s = Qn.get(a);
      s && s != o && (s.dom = null), o.setDOM(a);
    }, r = this.childPos(e.range.fromB, 1), i = this.children[r.i];
    n(e.line, i);
    for (let a = e.marks.length - 1; a >= -1; a--)
      r = i.childPos(r.off, 1), i = i.children[r.i], n(a >= 0 ? e.marks[a].node : e.text, i);
  }
  // Sync the DOM selection to this.state.selection
  updateSelection(e = !1, n = !1) {
    (e || !this.view.observer.selectionRange.focusNode) && this.view.observer.readSelectionRange();
    let r = this.view.root.activeElement, i = r == this.dom, a = !i && $w(this.dom, this.view.observer.selectionRange) && !(r && this.dom.contains(r));
    if (!(i || n || a))
      return;
    let o = this.forceSelection;
    this.forceSelection = !1;
    let s = this.view.state.selection.main, l = this.moveToLine(this.domAtPos(s.anchor)), u = s.empty ? l : this.moveToLine(this.domAtPos(s.head));
    if (lt.gecko && s.empty && !this.hasComposition && hxt(l)) {
      let f = document.createTextNode("");
      this.view.observer.ignore(() => l.node.insertBefore(f, l.node.childNodes[l.offset] || null)), l = u = new zi(f, 0), o = !0;
    }
    let c = this.view.observer.selectionRange;
    (o || !c.focusNode || (!vb(l.node, l.offset, c.anchorNode, c.anchorOffset) || !vb(u.node, u.offset, c.focusNode, c.focusOffset)) && !this.suppressWidgetCursorChange(c, s)) && (this.view.observer.ignore(() => {
      lt.android && lt.chrome && this.dom.contains(c.focusNode) && yxt(c.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 }));
      let f = y_(this.view.root);
      if (f) if (s.empty) {
        if (lt.gecko) {
          let d = vxt(l.node, l.offset);
          if (d && d != 3) {
            let h = (d == 1 ? jpe : Zpe)(l.node, l.offset);
            h && (l = new zi(h.node, h.offset));
          }
        }
        f.collapse(l.node, l.offset), s.bidiLevel != null && f.caretBidiLevel !== void 0 && (f.caretBidiLevel = s.bidiLevel);
      } else if (f.extend) {
        f.collapse(l.node, l.offset);
        try {
          f.extend(u.node, u.offset);
        } catch {
        }
      } else {
        let d = document.createRange();
        s.anchor > s.head && ([l, u] = [u, l]), d.setEnd(u.node, u.offset), d.setStart(l.node, l.offset), f.removeAllRanges(), f.addRange(d);
      }
      a && this.view.root.activeElement == this.dom && (this.dom.blur(), r && r.focus());
    }), this.view.observer.setSelectionRange(l, u)), this.impreciseAnchor = l.precise ? null : new zi(c.anchorNode, c.anchorOffset), this.impreciseHead = u.precise ? null : new zi(c.focusNode, c.focusOffset);
  }
  // If a zero-length widget is inserted next to the cursor during
  // composition, avoid moving it across it and disrupting the
  // composition.
  suppressWidgetCursorChange(e, n) {
    return this.hasComposition && n.empty && vb(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset) && this.posFromDOM(e.focusNode, e.focusOffset) == n.head;
  }
  enforceCursorAssoc() {
    if (this.hasComposition)
      return;
    let { view: e } = this, n = e.state.selection.main, r = y_(e.root), { anchorNode: i, anchorOffset: a } = e.observer.selectionRange;
    if (!r || !n.empty || !n.assoc || !r.modify)
      return;
    let o = Rr.find(this, n.head);
    if (!o)
      return;
    let s = o.posAtStart;
    if (n.head == s || n.head == s + o.length)
      return;
    let l = this.coordsAt(n.head, -1), u = this.coordsAt(n.head, 1);
    if (!l || !u || l.bottom > u.top)
      return;
    let c = this.domAtPos(n.head + n.assoc);
    r.collapse(c.node, c.offset), r.modify("move", n.assoc < 0 ? "forward" : "backward", "lineboundary"), e.observer.readSelectionRange();
    let f = e.observer.selectionRange;
    e.docView.posFromDOM(f.anchorNode, f.anchorOffset) != n.from && r.collapse(i, a);
  }
  // If a position is in/near a block widget, move it to a nearby text
  // line, since we don't want the cursor inside a block widget.
  moveToLine(e) {
    let n = this.dom, r;
    if (e.node != n)
      return e;
    for (let i = e.offset; !r && i < n.childNodes.length; i++) {
      let a = Qn.get(n.childNodes[i]);
      a instanceof Rr && (r = a.domAtPos(0));
    }
    for (let i = e.offset - 1; !r && i >= 0; i--) {
      let a = Qn.get(n.childNodes[i]);
      a instanceof Rr && (r = a.domAtPos(a.length));
    }
    return r ? new zi(r.node, r.offset, !0) : e;
  }
  nearest(e) {
    for (let n = e; n; ) {
      let r = Qn.get(n);
      if (r && r.rootView == this)
        return r;
      n = n.parentNode;
    }
    return null;
  }
  posFromDOM(e, n) {
    let r = this.nearest(e);
    if (!r)
      throw new RangeError("Trying to find position for a DOM position outside of the document");
    return r.localPosFromDOM(e, n) + r.posAtStart;
  }
  domAtPos(e) {
    let { i: n, off: r } = this.childCursor().findPos(e, -1);
    for (; n < this.children.length - 1; ) {
      let i = this.children[n];
      if (r < i.length || i instanceof Rr)
        break;
      n++, r = 0;
    }
    return this.children[n].domAtPos(r);
  }
  coordsAt(e, n) {
    let r = null, i = 0;
    for (let a = this.length, o = this.children.length - 1; o >= 0; o--) {
      let s = this.children[o], l = a - s.breakAfter, u = l - s.length;
      if (l < e)
        break;
      if (u <= e && (u < e || s.covers(-1)) && (l > e || s.covers(1)) && (!r || s instanceof Rr && !(r instanceof Rr && n >= 0)))
        r = s, i = u;
      else if (r && u == e && l == e && s instanceof Ru && Math.abs(n) < 2) {
        if (s.deco.startSide < 0)
          break;
        o && (r = null);
      }
      a = u;
    }
    return r ? r.coordsAt(e - i, n) : null;
  }
  coordsForChar(e) {
    let { i: n, off: r } = this.childPos(e, 1), i = this.children[n];
    if (!(i instanceof Rr))
      return null;
    for (; i.children.length; ) {
      let { i: s, off: l } = i.childPos(r, 1);
      for (; ; s++) {
        if (s == i.children.length)
          return null;
        if ((i = i.children[s]).length)
          break;
      }
      r = l;
    }
    if (!(i instanceof Us))
      return null;
    let a = wi(i.text, r);
    if (a == r)
      return null;
    let o = ep(i.dom, r, a).getClientRects();
    for (let s = 0; s < o.length; s++) {
      let l = o[s];
      if (s == o.length - 1 || l.top < l.bottom && l.left < l.right)
        return l;
    }
    return null;
  }
  measureVisibleLineHeights(e) {
    let n = [], { from: r, to: i } = e, a = this.view.contentDOM.clientWidth, o = a > Math.max(this.view.scrollDOM.clientWidth, this.minWidth) + 1, s = -1, l = this.view.textDirection == ir.LTR;
    for (let u = 0, c = 0; c < this.children.length; c++) {
      let f = this.children[c], d = u + f.length;
      if (d > i)
        break;
      if (u >= r) {
        let h = f.dom.getBoundingClientRect();
        if (n.push(h.height), o) {
          let p = f.dom.lastChild, v = p ? Kg(p) : [];
          if (v.length) {
            let g = v[v.length - 1], m = l ? g.right - h.left : h.right - g.left;
            m > s && (s = m, this.minWidth = a, this.minWidthFrom = u, this.minWidthTo = d);
          }
        }
      }
      u = d + f.breakAfter;
    }
    return n;
  }
  textDirectionAt(e) {
    let { i: n } = this.childPos(e, 1);
    return getComputedStyle(this.children[n].dom).direction == "rtl" ? ir.RTL : ir.LTR;
  }
  measureTextSize() {
    for (let a of this.children)
      if (a instanceof Rr) {
        let o = a.measureTextSize();
        if (o)
          return o;
      }
    let e = document.createElement("div"), n, r, i;
    return e.className = "cm-line", e.style.width = "99999px", e.style.position = "absolute", e.textContent = "abc def ghi jkl mno pqr stu", this.view.observer.ignore(() => {
      this.dom.appendChild(e);
      let a = Kg(e.firstChild)[0];
      n = e.getBoundingClientRect().height, r = a ? a.width / 27 : 7, i = a ? a.height : n, e.remove();
    }), { lineHeight: n, charWidth: r, textHeight: i };
  }
  childCursor(e = this.length) {
    let n = this.children.length;
    return n && (e -= this.children[--n].length), new Upe(this.children, e, n);
  }
  computeBlockGapDeco() {
    let e = [], n = this.view.viewState;
    for (let r = 0, i = 0; ; i++) {
      let a = i == n.viewports.length ? null : n.viewports[i], o = a ? a.from - 1 : this.length;
      if (o > r) {
        let s = (n.lineBlockAt(o).bottom - n.lineBlockAt(r).top) / this.view.scaleY;
        e.push(pt.replace({
          widget: new xK(s),
          block: !0,
          inclusive: !0,
          isBlockGap: !0
        }).range(r, o));
      }
      if (!a)
        break;
      r = a.to + 1;
    }
    return pt.set(e);
  }
  updateDeco() {
    let e = 1, n = this.view.state.facet(b_).map((a) => (this.dynamicDecorationMap[e++] = typeof a == "function") ? a(this.view) : a), r = !1, i = this.view.state.facet(bve).map((a, o) => {
      let s = typeof a == "function";
      return s && (r = !0), s ? a(this.view) : a;
    });
    for (i.length && (this.dynamicDecorationMap[e++] = r, n.push(On.join(i))), this.decorations = [
      this.editContextFormatting,
      ...n,
      this.computeBlockGapDeco(),
      this.view.viewState.lineGapDeco
    ]; e < this.decorations.length; )
      this.dynamicDecorationMap[e++] = !1;
    return this.decorations;
  }
  scrollIntoView(e) {
    if (e.isSnapshot) {
      let u = this.view.viewState.lineBlockAt(e.range.head);
      this.view.scrollDOM.scrollTop = u.top - e.yMargin, this.view.scrollDOM.scrollLeft = e.xMargin;
      return;
    }
    for (let u of this.view.state.facet(gve))
      try {
        if (u(this.view, e.range, e))
          return !0;
      } catch (c) {
        Ia(this.view.state, c, "scroll handler");
      }
    let { range: n } = e, r = this.coordsAt(n.head, n.empty ? n.assoc : n.head > n.anchor ? -1 : 1), i;
    if (!r)
      return;
    !n.empty && (i = this.coordsAt(n.anchor, n.anchor > n.head ? -1 : 1)) && (r = {
      left: Math.min(r.left, i.left),
      top: Math.min(r.top, i.top),
      right: Math.max(r.right, i.right),
      bottom: Math.max(r.bottom, i.bottom)
    });
    let a = Sve(this.view), o = {
      left: r.left - a.left,
      top: r.top - a.top,
      right: r.right + a.right,
      bottom: r.bottom + a.bottom
    }, { offsetWidth: s, offsetHeight: l } = this.view.scrollDOM;
    ZSt(this.view.scrollDOM, o, n.head < n.anchor ? -1 : 1, e.x, e.y, Math.max(Math.min(e.xMargin, s), -s), Math.max(Math.min(e.yMargin, l), -l), this.view.textDirection == ir.LTR);
  }
}
function hxt(t) {
  return t.node.nodeType == 1 && t.node.firstChild && (t.offset == 0 || t.node.childNodes[t.offset - 1].contentEditable == "false") && (t.offset == t.node.childNodes.length || t.node.childNodes[t.offset].contentEditable == "false");
}
class xK extends Jl {
  constructor(e) {
    super(), this.height = e;
  }
  toDOM() {
    let e = document.createElement("div");
    return e.className = "cm-gap", this.updateDOM(e), e;
  }
  eq(e) {
    return e.height == this.height;
  }
  updateDOM(e) {
    return e.style.height = this.height + "px", !0;
  }
  get editable() {
    return !0;
  }
  get estimatedHeight() {
    return this.height;
  }
  ignoreEvent() {
    return !1;
  }
}
function xve(t, e) {
  let n = t.observer.selectionRange;
  if (!n.focusNode)
    return null;
  let r = jpe(n.focusNode, n.focusOffset), i = Zpe(n.focusNode, n.focusOffset), a = r || i;
  if (i && r && i.node != r.node) {
    let s = Qn.get(i.node);
    if (!s || s instanceof Us && s.text != i.node.nodeValue)
      a = i;
    else if (t.docView.lastCompositionAfterCursor) {
      let l = Qn.get(r.node);
      !l || l instanceof Us && l.text != r.node.nodeValue || (a = i);
    }
  }
  if (t.docView.lastCompositionAfterCursor = a != r, !a)
    return null;
  let o = e - a.offset;
  return { from: o, to: o + a.node.nodeValue.length, node: a.node };
}
function pxt(t, e, n) {
  let r = xve(t, n);
  if (!r)
    return null;
  let { node: i, from: a, to: o } = r, s = i.nodeValue;
  if (/[\n\r]/.test(s) || t.state.doc.sliceString(r.from, r.to) != s)
    return null;
  let l = e.invertedDesc, u = new Jo(l.mapPos(a), l.mapPos(o), a, o), c = [];
  for (let f = i.parentNode; ; f = f.parentNode) {
    let d = Qn.get(f);
    if (d instanceof Xu)
      c.push({ node: f, deco: d.mark });
    else {
      if (d instanceof Rr || f.nodeName == "DIV" && f.parentNode == t.contentDOM)
        return { range: u, text: i, marks: c, line: f };
      if (f != t.contentDOM)
        c.push({ node: f, deco: new A1({
          inclusive: !0,
          attributes: txt(f),
          tagName: f.tagName.toLowerCase()
        }) });
      else
        return null;
    }
  }
}
function vxt(t, e) {
  return t.nodeType != 1 ? 0 : (e && t.childNodes[e - 1].contentEditable == "false" ? 1 : 0) | (e < t.childNodes.length && t.childNodes[e].contentEditable == "false" ? 2 : 0);
}
let gxt = class {
  constructor() {
    this.changes = [];
  }
  compareRange(e, n) {
    m4(e, n, this.changes);
  }
  comparePoint(e, n) {
    m4(e, n, this.changes);
  }
};
function mxt(t, e, n) {
  let r = new gxt();
  return On.compare(t, e, n, r), r.changes;
}
function yxt(t, e) {
  for (let n = t; n && n != e; n = n.assignedSlot || n.parentNode)
    if (n.nodeType == 1 && n.contentEditable == "false")
      return !0;
  return !1;
}
function bxt(t, e) {
  let n = !1;
  return e && t.iterChangedRanges((r, i) => {
    r < e.to && i > e.from && (n = !0);
  }), n;
}
function _xt(t, e, n = 1) {
  let r = t.charCategorizer(e), i = t.doc.lineAt(e), a = e - i.from;
  if (i.length == 0)
    return De.cursor(e);
  a == 0 ? n = 1 : a == i.length && (n = -1);
  let o = a, s = a;
  n < 0 ? o = wi(i.text, a, !1) : s = wi(i.text, a);
  let l = r(i.text.slice(o, s));
  for (; o > 0; ) {
    let u = wi(i.text, o, !1);
    if (r(i.text.slice(u, o)) != l)
      break;
    o = u;
  }
  for (; s < i.length; ) {
    let u = wi(i.text, s);
    if (r(i.text.slice(s, u)) != l)
      break;
    s = u;
  }
  return De.range(o + i.from, s + i.from);
}
function Oxt(t, e) {
  return e.left > t ? e.left - t : Math.max(0, t - e.right);
}
function Sxt(t, e) {
  return e.top > t ? e.top - t : Math.max(0, t - e.bottom);
}
function rD(t, e) {
  return t.top < e.bottom - 1 && t.bottom > e.top + 1;
}
function wK(t, e) {
  return e < t.top ? { top: e, left: t.left, right: t.right, bottom: t.bottom } : t;
}
function CK(t, e) {
  return e > t.bottom ? { top: t.top, left: t.left, right: t.right, bottom: e } : t;
}
function S4(t, e, n) {
  let r, i, a, o, s = !1, l, u, c, f;
  for (let p = t.firstChild; p; p = p.nextSibling) {
    let v = Kg(p);
    for (let g = 0; g < v.length; g++) {
      let m = v[g];
      i && rD(i, m) && (m = wK(CK(m, i.bottom), i.top));
      let y = Oxt(e, m), _ = Sxt(n, m);
      if (y == 0 && _ == 0)
        return p.nodeType == 3 ? TK(p, e, n) : S4(p, e, n);
      if (!r || o > _ || o == _ && a > y) {
        r = p, i = m, a = y, o = _;
        let O = _ ? n < m.top ? -1 : 1 : y ? e < m.left ? -1 : 1 : 0;
        s = !O || (O > 0 ? g < v.length - 1 : g > 0);
      }
      y == 0 ? n > m.bottom && (!c || c.bottom < m.bottom) ? (l = p, c = m) : n < m.top && (!f || f.top > m.top) && (u = p, f = m) : c && rD(c, m) ? c = CK(c, m.bottom) : f && rD(f, m) && (f = wK(f, m.top));
    }
  }
  if (c && c.bottom >= n ? (r = l, i = c) : f && f.top <= n && (r = u, i = f), !r)
    return { node: t, offset: 0 };
  let d = Math.max(i.left, Math.min(i.right, e));
  if (r.nodeType == 3)
    return TK(r, d, n);
  if (s && r.contentEditable != "false")
    return S4(r, d, n);
  let h = Array.prototype.indexOf.call(t.childNodes, r) + (e >= (i.left + i.right) / 2 ? 1 : 0);
  return { node: t, offset: h };
}
function TK(t, e, n) {
  let r = t.nodeValue.length, i = -1, a = 1e9, o = 0;
  for (let s = 0; s < r; s++) {
    let l = ep(t, s, s + 1).getClientRects();
    for (let u = 0; u < l.length; u++) {
      let c = l[u];
      if (c.top == c.bottom)
        continue;
      o || (o = e - c.left);
      let f = (c.top > n ? c.top - n : n - c.bottom) - 1;
      if (c.left - 1 <= e && c.right + 1 >= e && f < a) {
        let d = e >= (c.left + c.right) / 2, h = d;
        if ((lt.chrome || lt.gecko) && ep(t, s).getBoundingClientRect().left == c.right && (h = !d), f <= 0)
          return { node: t, offset: s + (h ? 1 : 0) };
        i = s + (h ? 1 : 0), a = f;
      }
    }
  }
  return { node: t, offset: i > -1 ? i : o > 0 ? t.nodeValue.length : 0 };
}
function wve(t, e, n, r = -1) {
  var i, a;
  let o = t.contentDOM.getBoundingClientRect(), s = o.top + t.viewState.paddingTop, l, { docHeight: u } = t.viewState, { x: c, y: f } = e, d = f - s;
  if (d < 0)
    return 0;
  if (d > u)
    return t.state.doc.length;
  for (let O = t.viewState.heightOracle.textHeight / 2, S = !1; l = t.elementAtHeight(d), l.type != la.Text; )
    for (; d = r > 0 ? l.bottom + O : l.top - O, !(d >= 0 && d <= u); ) {
      if (S)
        return n ? null : 0;
      S = !0, r = -r;
    }
  f = s + d;
  let h = l.from;
  if (h < t.viewport.from)
    return t.viewport.from == 0 ? 0 : n ? null : PK(t, o, l, c, f);
  if (h > t.viewport.to)
    return t.viewport.to == t.state.doc.length ? t.state.doc.length : n ? null : PK(t, o, l, c, f);
  let p = t.dom.ownerDocument, v = t.root.elementFromPoint ? t.root : p, g = v.elementFromPoint(c, f);
  g && !t.contentDOM.contains(g) && (g = null), g || (c = Math.max(o.left + 1, Math.min(o.right - 1, c)), g = v.elementFromPoint(c, f), g && !t.contentDOM.contains(g) && (g = null));
  let m, y = -1;
  if (g && ((i = t.docView.nearest(g)) === null || i === void 0 ? void 0 : i.isEditable) != !1) {
    if (p.caretPositionFromPoint) {
      let O = p.caretPositionFromPoint(c, f);
      O && ({ offsetNode: m, offset: y } = O);
    } else if (p.caretRangeFromPoint) {
      let O = p.caretRangeFromPoint(c, f);
      O && ({ startContainer: m, startOffset: y } = O, (!t.contentDOM.contains(m) || lt.safari && xxt(m, y, c) || lt.chrome && wxt(m, y, c)) && (m = void 0));
    }
  }
  if (!m || !t.docView.dom.contains(m)) {
    let O = Rr.find(t.docView, h);
    if (!O)
      return d > l.top + l.height / 2 ? l.to : l.from;
    ({ node: m, offset: y } = S4(O.dom, c, f));
  }
  let _ = t.docView.nearest(m);
  if (!_)
    return null;
  if (_.isWidget && ((a = _.dom) === null || a === void 0 ? void 0 : a.nodeType) == 1) {
    let O = _.dom.getBoundingClientRect();
    return e.y < O.top || e.y <= O.bottom && e.x <= (O.left + O.right) / 2 ? _.posAtStart : _.posAtEnd;
  } else
    return _.localPosFromDOM(m, y) + _.posAtStart;
}
function PK(t, e, n, r, i) {
  let a = Math.round((r - e.left) * t.defaultCharacterWidth);
  if (t.lineWrapping && n.height > t.defaultLineHeight * 1.5) {
    let s = t.viewState.heightOracle.textHeight, l = Math.floor((i - n.top - (t.defaultLineHeight - s) * 0.5) / s);
    a += l * t.viewState.heightOracle.lineLength;
  }
  let o = t.state.sliceDoc(n.from, n.to);
  return n.from + l4(o, a, t.state.tabSize);
}
function xxt(t, e, n) {
  let r;
  if (t.nodeType != 3 || e != (r = t.nodeValue.length))
    return !1;
  for (let i = t.nextSibling; i; i = i.nextSibling)
    if (i.nodeType != 1 || i.nodeName != "BR")
      return !1;
  return ep(t, r - 1, r).getBoundingClientRect().left > n;
}
function wxt(t, e, n) {
  if (e != 0)
    return !1;
  for (let i = t; ; ) {
    let a = i.parentNode;
    if (!a || a.nodeType != 1 || a.firstChild != i)
      return !1;
    if (a.classList.contains("cm-line"))
      break;
    i = a;
  }
  let r = t.nodeType == 1 ? t.getBoundingClientRect() : ep(t, 0, Math.max(t.nodeValue.length, 1)).getBoundingClientRect();
  return n - r.left > 5;
}
function x4(t, e) {
  let n = t.lineBlockAt(e);
  if (Array.isArray(n.type)) {
    for (let r of n.type)
      if (r.to > e || r.to == e && (r.to == n.to || r.type == la.Text))
        return r;
  }
  return n;
}
function Cxt(t, e, n, r) {
  let i = x4(t, e.head), a = !r || i.type != la.Text || !(t.lineWrapping || i.widgetLineBreaks) ? null : t.coordsAtPos(e.assoc < 0 && e.head > i.from ? e.head - 1 : e.head);
  if (a) {
    let o = t.dom.getBoundingClientRect(), s = t.textDirectionAt(i.from), l = t.posAtCoords({
      x: n == (s == ir.LTR) ? o.right - 1 : o.left + 1,
      y: (a.top + a.bottom) / 2
    });
    if (l != null)
      return De.cursor(l, n ? -1 : 1);
  }
  return De.cursor(n ? i.to : i.from, n ? -1 : 1);
}
function $K(t, e, n, r) {
  let i = t.state.doc.lineAt(e.head), a = t.bidiSpans(i), o = t.textDirectionAt(i.from);
  for (let s = e, l = null; ; ) {
    let u = cxt(i, a, o, s, n), c = sve;
    if (!u) {
      if (i.number == (n ? t.state.doc.lines : 1))
        return s;
      c = `
`, i = t.state.doc.line(i.number + (n ? 1 : -1)), a = t.bidiSpans(i), u = t.visualLineSide(i, !n);
    }
    if (l) {
      if (!l(c))
        return s;
    } else {
      if (!r)
        return u;
      l = r(c);
    }
    s = u;
  }
}
function Txt(t, e, n) {
  let r = t.state.charCategorizer(e), i = r(n);
  return (a) => {
    let o = r(a);
    return i == lr.Space && (i = o), i == o;
  };
}
function Pxt(t, e, n, r) {
  let i = e.head, a = n ? 1 : -1;
  if (i == (n ? t.state.doc.length : 0))
    return De.cursor(i, e.assoc);
  let o = e.goalColumn, s, l = t.contentDOM.getBoundingClientRect(), u = t.coordsAtPos(i, e.assoc || -1), c = t.documentTop;
  if (u)
    o == null && (o = u.left - l.left), s = a < 0 ? u.top : u.bottom;
  else {
    let h = t.viewState.lineBlockAt(i);
    o == null && (o = Math.min(l.right - l.left, t.defaultCharacterWidth * (i - h.from))), s = (a < 0 ? h.top : h.bottom) + c;
  }
  let f = l.left + o, d = r ?? t.viewState.heightOracle.textHeight >> 1;
  for (let h = 0; ; h += 10) {
    let p = s + (d + h) * a, v = wve(t, { x: f, y: p }, !1, a);
    if (p < l.top || p > l.bottom || (a < 0 ? v < i : v > i)) {
      let g = t.docView.coordsForChar(v), m = !g || p < g.top ? -1 : 1;
      return De.cursor(v, m, void 0, o);
    }
  }
}
function Aw(t, e, n) {
  for (; ; ) {
    let r = 0;
    for (let i of t)
      i.between(e - 1, e + 1, (a, o, s) => {
        if (e > a && e < o) {
          let l = r || n || (e - a < o - e ? -1 : 1);
          e = l < 0 ? a : o, r = l;
        }
      });
    if (!r)
      return e;
  }
}
function iD(t, e, n) {
  let r = Aw(t.state.facet(aB).map((i) => i(t)), n.from, e.head > n.from ? -1 : 1);
  return r == n.from ? n : De.cursor(r, r < n.from ? 1 : -1);
}
class $xt {
  setSelectionOrigin(e) {
    this.lastSelectionOrigin = e, this.lastSelectionTime = Date.now();
  }
  constructor(e) {
    this.view = e, this.lastKeyCode = 0, this.lastKeyTime = 0, this.lastTouchTime = 0, this.lastFocusTime = 0, this.lastScrollTop = 0, this.lastScrollLeft = 0, this.pendingIOSKey = void 0, this.tabFocusMode = -1, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastContextMenu = 0, this.scrollHandlers = [], this.handlers = /* @__PURE__ */ Object.create(null), this.composing = -1, this.compositionFirstChange = null, this.compositionEndedAt = 0, this.compositionPendingKey = !1, this.compositionPendingChange = !1, this.mouseSelection = null, this.draggedContent = null, this.handleEvent = this.handleEvent.bind(this), this.notifiedFocused = e.hasFocus, lt.safari && e.contentDOM.addEventListener("input", () => null), lt.gecko && Hxt(e.contentDOM.ownerDocument);
  }
  handleEvent(e) {
    !Lxt(this.view, e) || this.ignoreDuringComposition(e) || e.type == "keydown" && this.keydown(e) || this.runHandlers(e.type, e);
  }
  runHandlers(e, n) {
    let r = this.handlers[e];
    if (r) {
      for (let i of r.observers)
        i(this.view, n);
      for (let i of r.handlers) {
        if (n.defaultPrevented)
          break;
        if (i(this.view, n)) {
          n.preventDefault();
          break;
        }
      }
    }
  }
  ensureHandlers(e) {
    let n = Axt(e), r = this.handlers, i = this.view.contentDOM;
    for (let a in n)
      if (a != "scroll") {
        let o = !n[a].handlers.length, s = r[a];
        s && o != !s.handlers.length && (i.removeEventListener(a, this.handleEvent), s = null), s || i.addEventListener(a, this.handleEvent, { passive: o });
      }
    for (let a in r)
      a != "scroll" && !n[a] && i.removeEventListener(a, this.handleEvent);
    this.handlers = n;
  }
  keydown(e) {
    if (this.lastKeyCode = e.keyCode, this.lastKeyTime = Date.now(), e.keyCode == 9 && this.tabFocusMode > -1 && (!this.tabFocusMode || Date.now() <= this.tabFocusMode))
      return !0;
    if (this.tabFocusMode > 0 && e.keyCode != 27 && Tve.indexOf(e.keyCode) < 0 && (this.tabFocusMode = -1), lt.android && lt.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8))
      return this.view.observer.delayAndroidKey(e.key, e.keyCode), !0;
    let n;
    return lt.ios && !e.synthetic && !e.altKey && !e.metaKey && ((n = Cve.find((r) => r.keyCode == e.keyCode)) && !e.ctrlKey || Ext.indexOf(e.key) > -1 && e.ctrlKey && !e.shiftKey) ? (this.pendingIOSKey = n || e, setTimeout(() => this.flushIOSKey(), 250), !0) : (e.keyCode != 229 && this.view.observer.forceFlush(), !1);
  }
  flushIOSKey(e) {
    let n = this.pendingIOSKey;
    return !n || n.key == "Enter" && e && e.from < e.to && /^\S+$/.test(e.insert.toString()) ? !1 : (this.pendingIOSKey = void 0, ag(this.view.contentDOM, n.key, n.keyCode, n instanceof KeyboardEvent ? n : void 0));
  }
  ignoreDuringComposition(e) {
    return /^key/.test(e.type) ? this.composing > 0 ? !0 : lt.safari && !lt.ios && this.compositionPendingKey && Date.now() - this.compositionEndedAt < 100 ? (this.compositionPendingKey = !1, !0) : !1 : !1;
  }
  startMouseSelection(e) {
    this.mouseSelection && this.mouseSelection.destroy(), this.mouseSelection = e;
  }
  update(e) {
    this.view.observer.update(e), this.mouseSelection && this.mouseSelection.update(e), this.draggedContent && e.docChanged && (this.draggedContent = this.draggedContent.map(e.changes)), e.transactions.length && (this.lastKeyCode = this.lastSelectionTime = 0);
  }
  destroy() {
    this.mouseSelection && this.mouseSelection.destroy();
  }
}
function AK(t, e) {
  return (n, r) => {
    try {
      return e.call(t, r, n);
    } catch (i) {
      Ia(n.state, i);
    }
  };
}
function Axt(t) {
  let e = /* @__PURE__ */ Object.create(null);
  function n(r) {
    return e[r] || (e[r] = { observers: [], handlers: [] });
  }
  for (let r of t) {
    let i = r.spec;
    if (i && i.domEventHandlers)
      for (let a in i.domEventHandlers) {
        let o = i.domEventHandlers[a];
        o && n(a).handlers.push(AK(r.value, o));
      }
    if (i && i.domEventObservers)
      for (let a in i.domEventObservers) {
        let o = i.domEventObservers[a];
        o && n(a).observers.push(AK(r.value, o));
      }
  }
  for (let r in Xs)
    n(r).handlers.push(Xs[r]);
  for (let r in us)
    n(r).observers.push(us[r]);
  return e;
}
const Cve = [
  { key: "Backspace", keyCode: 8, inputType: "deleteContentBackward" },
  { key: "Enter", keyCode: 13, inputType: "insertParagraph" },
  { key: "Enter", keyCode: 13, inputType: "insertLineBreak" },
  { key: "Delete", keyCode: 46, inputType: "deleteContentForward" }
], Ext = "dthko", Tve = [16, 17, 18, 20, 91, 92, 224, 225], cx = 6;
function fx(t) {
  return Math.max(0, t) * 0.7 + 8;
}
function Mxt(t, e) {
  return Math.max(Math.abs(t.clientX - e.clientX), Math.abs(t.clientY - e.clientY));
}
class Ixt {
  constructor(e, n, r, i) {
    this.view = e, this.startEvent = n, this.style = r, this.mustSelect = i, this.scrollSpeed = { x: 0, y: 0 }, this.scrolling = -1, this.lastEvent = n, this.scrollParent = USt(e.contentDOM), this.atoms = e.state.facet(aB).map((o) => o(e));
    let a = e.contentDOM.ownerDocument;
    a.addEventListener("mousemove", this.move = this.move.bind(this)), a.addEventListener("mouseup", this.up = this.up.bind(this)), this.extend = n.shiftKey, this.multiple = e.state.facet(un.allowMultipleSelections) && Dxt(e, n), this.dragging = kxt(e, n) && Eve(n) == 1 ? null : !1;
  }
  start(e) {
    this.dragging === !1 && this.select(e);
  }
  move(e) {
    var n;
    if (e.buttons == 0)
      return this.destroy();
    if (this.dragging || this.dragging == null && Mxt(this.startEvent, e) < 10)
      return;
    this.select(this.lastEvent = e);
    let r = 0, i = 0, a = ((n = this.scrollParent) === null || n === void 0 ? void 0 : n.getBoundingClientRect()) || { left: 0, top: 0, right: this.view.win.innerWidth, bottom: this.view.win.innerHeight }, o = Sve(this.view);
    e.clientX - o.left <= a.left + cx ? r = -fx(a.left - e.clientX) : e.clientX + o.right >= a.right - cx && (r = fx(e.clientX - a.right)), e.clientY - o.top <= a.top + cx ? i = -fx(a.top - e.clientY) : e.clientY + o.bottom >= a.bottom - cx && (i = fx(e.clientY - a.bottom)), this.setScrollSpeed(r, i);
  }
  up(e) {
    this.dragging == null && this.select(this.lastEvent), this.dragging || e.preventDefault(), this.destroy();
  }
  destroy() {
    this.setScrollSpeed(0, 0);
    let e = this.view.contentDOM.ownerDocument;
    e.removeEventListener("mousemove", this.move), e.removeEventListener("mouseup", this.up), this.view.inputState.mouseSelection = this.view.inputState.draggedContent = null;
  }
  setScrollSpeed(e, n) {
    this.scrollSpeed = { x: e, y: n }, e || n ? this.scrolling < 0 && (this.scrolling = setInterval(() => this.scroll(), 50)) : this.scrolling > -1 && (clearInterval(this.scrolling), this.scrolling = -1);
  }
  scroll() {
    this.scrollParent ? (this.scrollParent.scrollLeft += this.scrollSpeed.x, this.scrollParent.scrollTop += this.scrollSpeed.y) : this.view.win.scrollBy(this.scrollSpeed.x, this.scrollSpeed.y), this.dragging === !1 && this.select(this.lastEvent);
  }
  skipAtoms(e) {
    let n = null;
    for (let r = 0; r < e.ranges.length; r++) {
      let i = e.ranges[r], a = null;
      if (i.empty) {
        let o = Aw(this.atoms, i.from, 0);
        o != i.from && (a = De.cursor(o, -1));
      } else {
        let o = Aw(this.atoms, i.from, -1), s = Aw(this.atoms, i.to, 1);
        (o != i.from || s != i.to) && (a = De.range(i.from == i.anchor ? o : s, i.from == i.head ? o : s));
      }
      a && (n || (n = e.ranges.slice()), n[r] = a);
    }
    return n ? De.create(n, e.mainIndex) : e;
  }
  select(e) {
    let { view: n } = this, r = this.skipAtoms(this.style.get(e, this.extend, this.multiple));
    (this.mustSelect || !r.eq(n.state.selection, this.dragging === !1)) && this.view.dispatch({
      selection: r,
      userEvent: "select.pointer"
    }), this.mustSelect = !1;
  }
  update(e) {
    e.transactions.some((n) => n.isUserEvent("input.type")) ? this.destroy() : this.style.update(e) && setTimeout(() => this.select(this.lastEvent), 20);
  }
}
function Dxt(t, e) {
  let n = t.state.facet(lve);
  return n.length ? n[0](e) : lt.mac ? e.metaKey : e.ctrlKey;
}
function Rxt(t, e) {
  let n = t.state.facet(uve);
  return n.length ? n[0](e) : lt.mac ? !e.altKey : !e.ctrlKey;
}
function kxt(t, e) {
  let { main: n } = t.state.selection;
  if (n.empty)
    return !1;
  let r = y_(t.root);
  if (!r || r.rangeCount == 0)
    return !0;
  let i = r.getRangeAt(0).getClientRects();
  for (let a = 0; a < i.length; a++) {
    let o = i[a];
    if (o.left <= e.clientX && o.right >= e.clientX && o.top <= e.clientY && o.bottom >= e.clientY)
      return !0;
  }
  return !1;
}
function Lxt(t, e) {
  if (!e.bubbles)
    return !0;
  if (e.defaultPrevented)
    return !1;
  for (let n = e.target, r; n != t.contentDOM; n = n.parentNode)
    if (!n || n.nodeType == 11 || (r = Qn.get(n)) && r.ignoreEvent(e))
      return !1;
  return !0;
}
const Xs = /* @__PURE__ */ Object.create(null), us = /* @__PURE__ */ Object.create(null), Pve = lt.ie && lt.ie_version < 15 || lt.ios && lt.webkit_version < 604;
function Nxt(t) {
  let e = t.dom.parentNode;
  if (!e)
    return;
  let n = e.appendChild(document.createElement("textarea"));
  n.style.cssText = "position: fixed; left: -10000px; top: 10px", n.focus(), setTimeout(() => {
    t.focus(), n.remove(), $ve(t, n.value);
  }, 50);
}
function $ve(t, e) {
  let { state: n } = t, r, i = 1, a = n.toText(e), o = a.lines == n.selection.ranges.length;
  if (w4 != null && n.selection.ranges.every((l) => l.empty) && w4 == a.toString()) {
    let l = -1;
    r = n.changeByRange((u) => {
      let c = n.doc.lineAt(u.from);
      if (c.from == l)
        return { range: u };
      l = c.from;
      let f = n.toText((o ? a.line(i++).text : e) + n.lineBreak);
      return {
        changes: { from: c.from, insert: f },
        range: De.cursor(u.from + f.length)
      };
    });
  } else o ? r = n.changeByRange((l) => {
    let u = a.line(i++);
    return {
      changes: { from: l.from, to: l.to, insert: u.text },
      range: De.cursor(l.from + u.length)
    };
  }) : r = n.replaceSelection(a);
  t.dispatch(r, {
    userEvent: "input.paste",
    scrollIntoView: !0
  });
}
us.scroll = (t) => {
  t.inputState.lastScrollTop = t.scrollDOM.scrollTop, t.inputState.lastScrollLeft = t.scrollDOM.scrollLeft;
};
Xs.keydown = (t, e) => (t.inputState.setSelectionOrigin("select"), e.keyCode == 27 && t.inputState.tabFocusMode != 0 && (t.inputState.tabFocusMode = Date.now() + 2e3), !1);
us.touchstart = (t, e) => {
  t.inputState.lastTouchTime = Date.now(), t.inputState.setSelectionOrigin("select.pointer");
};
us.touchmove = (t) => {
  t.inputState.setSelectionOrigin("select.pointer");
};
Xs.mousedown = (t, e) => {
  if (t.observer.flush(), t.inputState.lastTouchTime > Date.now() - 2e3)
    return !1;
  let n = null;
  for (let r of t.state.facet(cve))
    if (n = r(t, e), n)
      break;
  if (!n && e.button == 0 && (n = Vxt(t, e)), n) {
    let r = !t.hasFocus;
    t.inputState.startMouseSelection(new Ixt(t, e, n, r)), r && t.observer.ignore(() => {
      Qpe(t.contentDOM);
      let a = t.root.activeElement;
      a && !a.contains(t.contentDOM) && a.blur();
    });
    let i = t.inputState.mouseSelection;
    if (i)
      return i.start(e), i.dragging === !1;
  }
  return !1;
};
function EK(t, e, n, r) {
  if (r == 1)
    return De.cursor(e, n);
  if (r == 2)
    return _xt(t.state, e, n);
  {
    let i = Rr.find(t.docView, e), a = t.state.doc.lineAt(i ? i.posAtEnd : e), o = i ? i.posAtStart : a.from, s = i ? i.posAtEnd : a.to;
    return s < t.state.doc.length && s == a.to && s++, De.range(o, s);
  }
}
let Ave = (t, e) => t >= e.top && t <= e.bottom, MK = (t, e, n) => Ave(e, n) && t >= n.left && t <= n.right;
function Bxt(t, e, n, r) {
  let i = Rr.find(t.docView, e);
  if (!i)
    return 1;
  let a = e - i.posAtStart;
  if (a == 0)
    return 1;
  if (a == i.length)
    return -1;
  let o = i.coordsAt(a, -1);
  if (o && MK(n, r, o))
    return -1;
  let s = i.coordsAt(a, 1);
  return s && MK(n, r, s) ? 1 : o && Ave(r, o) ? -1 : 1;
}
function IK(t, e) {
  let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1);
  return { pos: n, bias: Bxt(t, n, e.clientX, e.clientY) };
}
const zxt = lt.ie && lt.ie_version <= 11;
let DK = null, RK = 0, kK = 0;
function Eve(t) {
  if (!zxt)
    return t.detail;
  let e = DK, n = kK;
  return DK = t, kK = Date.now(), RK = !e || n > Date.now() - 400 && Math.abs(e.clientX - t.clientX) < 2 && Math.abs(e.clientY - t.clientY) < 2 ? (RK + 1) % 3 : 1;
}
function Vxt(t, e) {
  let n = IK(t, e), r = Eve(e), i = t.state.selection;
  return {
    update(a) {
      a.docChanged && (n.pos = a.changes.mapPos(n.pos), i = i.map(a.changes));
    },
    get(a, o, s) {
      let l = IK(t, a), u, c = EK(t, l.pos, l.bias, r);
      if (n.pos != l.pos && !o) {
        let f = EK(t, n.pos, n.bias, r), d = Math.min(f.from, c.from), h = Math.max(f.to, c.to);
        c = d < c.from ? De.range(d, h) : De.range(h, d);
      }
      return o ? i.replaceRange(i.main.extend(c.from, c.to)) : s && r == 1 && i.ranges.length > 1 && (u = Fxt(i, l.pos)) ? u : s ? i.addRange(c) : De.create([c]);
    }
  };
}
function Fxt(t, e) {
  for (let n = 0; n < t.ranges.length; n++) {
    let { from: r, to: i } = t.ranges[n];
    if (r <= e && i >= e)
      return De.create(t.ranges.slice(0, n).concat(t.ranges.slice(n + 1)), t.mainIndex == n ? 0 : t.mainIndex - (t.mainIndex > n ? 1 : 0));
  }
  return null;
}
Xs.dragstart = (t, e) => {
  let { selection: { main: n } } = t.state;
  if (e.target.draggable) {
    let i = t.docView.nearest(e.target);
    if (i && i.isWidget) {
      let a = i.posAtStart, o = a + i.length;
      (a >= n.to || o <= n.from) && (n = De.range(a, o));
    }
  }
  let { inputState: r } = t;
  return r.mouseSelection && (r.mouseSelection.dragging = !0), r.draggedContent = n, e.dataTransfer && (e.dataTransfer.setData("Text", t.state.sliceDoc(n.from, n.to)), e.dataTransfer.effectAllowed = "copyMove"), !1;
};
Xs.dragend = (t) => (t.inputState.draggedContent = null, !1);
function LK(t, e, n, r) {
  if (!n)
    return;
  let i = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), { draggedContent: a } = t.inputState, o = r && a && Rxt(t, e) ? { from: a.from, to: a.to } : null, s = { from: i, insert: n }, l = t.state.changes(o ? [o, s] : s);
  t.focus(), t.dispatch({
    changes: l,
    selection: { anchor: l.mapPos(i, -1), head: l.mapPos(i, 1) },
    userEvent: o ? "move.drop" : "input.drop"
  }), t.inputState.draggedContent = null;
}
Xs.drop = (t, e) => {
  if (!e.dataTransfer)
    return !1;
  if (t.state.readOnly)
    return !0;
  let n = e.dataTransfer.files;
  if (n && n.length) {
    let r = Array(n.length), i = 0, a = () => {
      ++i == n.length && LK(t, e, r.filter((o) => o != null).join(t.state.lineBreak), !1);
    };
    for (let o = 0; o < n.length; o++) {
      let s = new FileReader();
      s.onerror = a, s.onload = () => {
        /[\x00-\x08\x0e-\x1f]{2}/.test(s.result) || (r[o] = s.result), a();
      }, s.readAsText(n[o]);
    }
    return !0;
  } else {
    let r = e.dataTransfer.getData("Text");
    if (r)
      return LK(t, e, r, !0), !0;
  }
  return !1;
};
Xs.paste = (t, e) => {
  if (t.state.readOnly)
    return !0;
  t.observer.flush();
  let n = Pve ? null : e.clipboardData;
  return n ? ($ve(t, n.getData("text/plain") || n.getData("text/uri-list")), !0) : (Nxt(t), !1);
};
function Wxt(t, e) {
  let n = t.dom.parentNode;
  if (!n)
    return;
  let r = n.appendChild(document.createElement("textarea"));
  r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.value = e, r.focus(), r.selectionEnd = e.length, r.selectionStart = 0, setTimeout(() => {
    r.remove(), t.focus();
  }, 50);
}
function Qxt(t) {
  let e = [], n = [], r = !1;
  for (let i of t.selection.ranges)
    i.empty || (e.push(t.sliceDoc(i.from, i.to)), n.push(i));
  if (!e.length) {
    let i = -1;
    for (let { from: a } of t.selection.ranges) {
      let o = t.doc.lineAt(a);
      o.number > i && (e.push(o.text), n.push({ from: o.from, to: Math.min(t.doc.length, o.to + 1) })), i = o.number;
    }
    r = !0;
  }
  return { text: e.join(t.lineBreak), ranges: n, linewise: r };
}
let w4 = null;
Xs.copy = Xs.cut = (t, e) => {
  let { text: n, ranges: r, linewise: i } = Qxt(t.state);
  if (!n && !i)
    return !1;
  w4 = i ? n : null, e.type == "cut" && !t.state.readOnly && t.dispatch({
    changes: r,
    scrollIntoView: !0,
    userEvent: "delete.cut"
  });
  let a = Pve ? null : e.clipboardData;
  return a ? (a.clearData(), a.setData("text/plain", n), !0) : (Wxt(t, n), !1);
};
const Mve = /* @__PURE__ */ ac.define();
function Ive(t, e) {
  let n = [];
  for (let r of t.facet(hve)) {
    let i = r(t, e);
    i && n.push(i);
  }
  return n ? t.update({ effects: n, annotations: Mve.of(!0) }) : null;
}
function Dve(t) {
  setTimeout(() => {
    let e = t.hasFocus;
    if (e != t.inputState.notifiedFocused) {
      let n = Ive(t.state, e);
      n ? t.dispatch(n) : t.update([]);
    }
  }, 10);
}
us.focus = (t) => {
  t.inputState.lastFocusTime = Date.now(), !t.scrollDOM.scrollTop && (t.inputState.lastScrollTop || t.inputState.lastScrollLeft) && (t.scrollDOM.scrollTop = t.inputState.lastScrollTop, t.scrollDOM.scrollLeft = t.inputState.lastScrollLeft), Dve(t);
};
us.blur = (t) => {
  t.observer.clearSelectionRange(), Dve(t);
};
us.compositionstart = us.compositionupdate = (t) => {
  t.observer.editContext || (t.inputState.compositionFirstChange == null && (t.inputState.compositionFirstChange = !0), t.inputState.composing < 0 && (t.inputState.composing = 0));
};
us.compositionend = (t) => {
  t.observer.editContext || (t.inputState.composing = -1, t.inputState.compositionEndedAt = Date.now(), t.inputState.compositionPendingKey = !0, t.inputState.compositionPendingChange = t.observer.pendingRecords().length > 0, t.inputState.compositionFirstChange = null, lt.chrome && lt.android ? t.observer.flushSoon() : t.inputState.compositionPendingChange ? Promise.resolve().then(() => t.observer.flush()) : setTimeout(() => {
    t.inputState.composing < 0 && t.docView.hasComposition && t.update([]);
  }, 50));
};
us.contextmenu = (t) => {
  t.inputState.lastContextMenu = Date.now();
};
Xs.beforeinput = (t, e) => {
  var n;
  let r;
  if (lt.chrome && lt.android && (r = Cve.find((i) => i.inputType == e.inputType)) && (t.observer.delayAndroidKey(r.key, r.keyCode), r.key == "Backspace" || r.key == "Delete")) {
    let i = ((n = window.visualViewport) === null || n === void 0 ? void 0 : n.height) || 0;
    setTimeout(() => {
      var a;
      (((a = window.visualViewport) === null || a === void 0 ? void 0 : a.height) || 0) > i + 10 && t.hasFocus && (t.contentDOM.blur(), t.focus());
    }, 100);
  }
  return lt.ios && e.inputType == "deleteContentForward" && t.observer.flushSoon(), lt.safari && e.inputType == "insertText" && t.inputState.composing >= 0 && setTimeout(() => us.compositionend(t, e), 20), !1;
};
const NK = /* @__PURE__ */ new Set();
function Hxt(t) {
  NK.has(t) || (NK.add(t), t.addEventListener("copy", () => {
  }), t.addEventListener("cut", () => {
  }));
}
const BK = ["pre-wrap", "normal", "pre-line", "break-spaces"];
class Gxt {
  constructor(e) {
    this.lineWrapping = e, this.doc = Sn.empty, this.heightSamples = {}, this.lineHeight = 14, this.charWidth = 7, this.textHeight = 14, this.lineLength = 30, this.heightChanged = !1;
  }
  heightForGap(e, n) {
    let r = this.doc.lineAt(n).number - this.doc.lineAt(e).number + 1;
    return this.lineWrapping && (r += Math.max(0, Math.ceil((n - e - r * this.lineLength * 0.5) / this.lineLength))), this.lineHeight * r;
  }
  heightForLine(e) {
    return this.lineWrapping ? (1 + Math.max(0, Math.ceil((e - this.lineLength) / (this.lineLength - 5)))) * this.lineHeight : this.lineHeight;
  }
  setDoc(e) {
    return this.doc = e, this;
  }
  mustRefreshForWrapping(e) {
    return BK.indexOf(e) > -1 != this.lineWrapping;
  }
  mustRefreshForHeights(e) {
    let n = !1;
    for (let r = 0; r < e.length; r++) {
      let i = e[r];
      i < 0 ? r++ : this.heightSamples[Math.floor(i * 10)] || (n = !0, this.heightSamples[Math.floor(i * 10)] = !0);
    }
    return n;
  }
  refresh(e, n, r, i, a, o) {
    let s = BK.indexOf(e) > -1, l = Math.round(n) != Math.round(this.lineHeight) || this.lineWrapping != s;
    if (this.lineWrapping = s, this.lineHeight = n, this.charWidth = r, this.textHeight = i, this.lineLength = a, l) {
      this.heightSamples = {};
      for (let u = 0; u < o.length; u++) {
        let c = o[u];
        c < 0 ? u++ : this.heightSamples[Math.floor(c * 10)] = !0;
      }
    }
    return l;
  }
}
class jxt {
  constructor(e, n) {
    this.from = e, this.heights = n, this.index = 0;
  }
  get more() {
    return this.index < this.heights.length;
  }
}
class Tl {
  /**
  @internal
  */
  constructor(e, n, r, i, a) {
    this.from = e, this.length = n, this.top = r, this.height = i, this._content = a;
  }
  /**
  The type of element this is. When querying lines, this may be
  an array of all the blocks that make up the line.
  */
  get type() {
    return typeof this._content == "number" ? la.Text : Array.isArray(this._content) ? this._content : this._content.type;
  }
  /**
  The end of the element as a document position.
  */
  get to() {
    return this.from + this.length;
  }
  /**
  The bottom position of the element.
  */
  get bottom() {
    return this.top + this.height;
  }
  /**
  If this is a widget block, this will return the widget
  associated with it.
  */
  get widget() {
    return this._content instanceof Pf ? this._content.widget : null;
  }
  /**
  If this is a textblock, this holds the number of line breaks
  that appear in widgets inside the block.
  */
  get widgetLineBreaks() {
    return typeof this._content == "number" ? this._content : 0;
  }
  /**
  @internal
  */
  join(e) {
    let n = (Array.isArray(this._content) ? this._content : [this]).concat(Array.isArray(e._content) ? e._content : [e]);
    return new Tl(this.from, this.length + e.length, this.top, this.height + e.height, n);
  }
}
var er = /* @__PURE__ */ function(t) {
  return t[t.ByPos = 0] = "ByPos", t[t.ByHeight = 1] = "ByHeight", t[t.ByPosNoHeight = 2] = "ByPosNoHeight", t;
}(er || (er = {}));
const Ew = 1e-3;
class ua {
  constructor(e, n, r = 2) {
    this.length = e, this.height = n, this.flags = r;
  }
  get outdated() {
    return (this.flags & 2) > 0;
  }
  set outdated(e) {
    this.flags = (e ? 2 : 0) | this.flags & -3;
  }
  setHeight(e, n) {
    this.height != n && (Math.abs(this.height - n) > Ew && (e.heightChanged = !0), this.height = n);
  }
  // Base case is to replace a leaf node, which simply builds a tree
  // from the new nodes and returns that (HeightMapBranch and
  // HeightMapGap override this to actually use from/to)
  replace(e, n, r) {
    return ua.of(r);
  }
  // Again, these are base cases, and are overridden for branch and gap nodes.
  decomposeLeft(e, n) {
    n.push(this);
  }
  decomposeRight(e, n) {
    n.push(this);
  }
  applyChanges(e, n, r, i) {
    let a = this, o = r.doc;
    for (let s = i.length - 1; s >= 0; s--) {
      let { fromA: l, toA: u, fromB: c, toB: f } = i[s], d = a.lineAt(l, er.ByPosNoHeight, r.setDoc(n), 0, 0), h = d.to >= u ? d : a.lineAt(u, er.ByPosNoHeight, r, 0, 0);
      for (f += h.to - u, u = h.to; s > 0 && d.from <= i[s - 1].toA; )
        l = i[s - 1].fromA, c = i[s - 1].fromB, s--, l < d.from && (d = a.lineAt(l, er.ByPosNoHeight, r, 0, 0));
      c += d.from - l, l = d.from;
      let p = oB.build(r.setDoc(o), e, c, f);
      a = a.replace(l, u, p);
    }
    return a.updateHeight(r, 0);
  }
  static empty() {
    return new eo(0, 0);
  }
  // nodes uses null values to indicate the position of line breaks.
  // There are never line breaks at the start or end of the array, or
  // two line breaks next to each other, and the array isn't allowed
  // to be empty (same restrictions as return value from the builder).
  static of(e) {
    if (e.length == 1)
      return e[0];
    let n = 0, r = e.length, i = 0, a = 0;
    for (; ; )
      if (n == r)
        if (i > a * 2) {
          let s = e[n - 1];
          s.break ? e.splice(--n, 1, s.left, null, s.right) : e.splice(--n, 1, s.left, s.right), r += 1 + s.break, i -= s.size;
        } else if (a > i * 2) {
          let s = e[r];
          s.break ? e.splice(r, 1, s.left, null, s.right) : e.splice(r, 1, s.left, s.right), r += 2 + s.break, a -= s.size;
        } else
          break;
      else if (i < a) {
        let s = e[n++];
        s && (i += s.size);
      } else {
        let s = e[--r];
        s && (a += s.size);
      }
    let o = 0;
    return e[n - 1] == null ? (o = 1, n--) : e[n] == null && (o = 1, r++), new Zxt(ua.of(e.slice(0, n)), o, ua.of(e.slice(r)));
  }
}
ua.prototype.size = 1;
class Rve extends ua {
  constructor(e, n, r) {
    super(e, n), this.deco = r;
  }
  blockAt(e, n, r, i) {
    return new Tl(i, this.length, r, this.height, this.deco || 0);
  }
  lineAt(e, n, r, i, a) {
    return this.blockAt(0, r, i, a);
  }
  forEachLine(e, n, r, i, a, o) {
    e <= a + this.length && n >= a && o(this.blockAt(0, r, i, a));
  }
  updateHeight(e, n = 0, r = !1, i) {
    return i && i.from <= n && i.more && this.setHeight(e, i.heights[i.index++]), this.outdated = !1, this;
  }
  toString() {
    return `block(${this.length})`;
  }
}
class eo extends Rve {
  constructor(e, n) {
    super(e, n, null), this.collapsed = 0, this.widgetHeight = 0, this.breaks = 0;
  }
  blockAt(e, n, r, i) {
    return new Tl(i, this.length, r, this.height, this.breaks);
  }
  replace(e, n, r) {
    let i = r[0];
    return r.length == 1 && (i instanceof eo || i instanceof vi && i.flags & 4) && Math.abs(this.length - i.length) < 10 ? (i instanceof vi ? i = new eo(i.length, this.height) : i.height = this.height, this.outdated || (i.outdated = !1), i) : ua.of(r);
  }
  updateHeight(e, n = 0, r = !1, i) {
    return i && i.from <= n && i.more ? this.setHeight(e, i.heights[i.index++]) : (r || this.outdated) && this.setHeight(e, Math.max(this.widgetHeight, e.heightForLine(this.length - this.collapsed)) + this.breaks * e.lineHeight), this.outdated = !1, this;
  }
  toString() {
    return `line(${this.length}${this.collapsed ? -this.collapsed : ""}${this.widgetHeight ? ":" + this.widgetHeight : ""})`;
  }
}
class vi extends ua {
  constructor(e) {
    super(e, 0);
  }
  heightMetrics(e, n) {
    let r = e.doc.lineAt(n).number, i = e.doc.lineAt(n + this.length).number, a = i - r + 1, o, s = 0;
    if (e.lineWrapping) {
      let l = Math.min(this.height, e.lineHeight * a);
      o = l / a, this.length > a + 1 && (s = (this.height - l) / (this.length - a - 1));
    } else
      o = this.height / a;
    return { firstLine: r, lastLine: i, perLine: o, perChar: s };
  }
  blockAt(e, n, r, i) {
    let { firstLine: a, lastLine: o, perLine: s, perChar: l } = this.heightMetrics(n, i);
    if (n.lineWrapping) {
      let u = i + (e < n.lineHeight ? 0 : Math.round(Math.max(0, Math.min(1, (e - r) / this.height)) * this.length)), c = n.doc.lineAt(u), f = s + c.length * l, d = Math.max(r, e - f / 2);
      return new Tl(c.from, c.length, d, f, 0);
    } else {
      let u = Math.max(0, Math.min(o - a, Math.floor((e - r) / s))), { from: c, length: f } = n.doc.line(a + u);
      return new Tl(c, f, r + s * u, s, 0);
    }
  }
  lineAt(e, n, r, i, a) {
    if (n == er.ByHeight)
      return this.blockAt(e, r, i, a);
    if (n == er.ByPosNoHeight) {
      let { from: h, to: p } = r.doc.lineAt(e);
      return new Tl(h, p - h, 0, 0, 0);
    }
    let { firstLine: o, perLine: s, perChar: l } = this.heightMetrics(r, a), u = r.doc.lineAt(e), c = s + u.length * l, f = u.number - o, d = i + s * f + l * (u.from - a - f);
    return new Tl(u.from, u.length, Math.max(i, Math.min(d, i + this.height - c)), c, 0);
  }
  forEachLine(e, n, r, i, a, o) {
    e = Math.max(e, a), n = Math.min(n, a + this.length);
    let { firstLine: s, perLine: l, perChar: u } = this.heightMetrics(r, a);
    for (let c = e, f = i; c <= n; ) {
      let d = r.doc.lineAt(c);
      if (c == e) {
        let p = d.number - s;
        f += l * p + u * (e - a - p);
      }
      let h = l + u * d.length;
      o(new Tl(d.from, d.length, f, h, 0)), f += h, c = d.to + 1;
    }
  }
  replace(e, n, r) {
    let i = this.length - n;
    if (i > 0) {
      let a = r[r.length - 1];
      a instanceof vi ? r[r.length - 1] = new vi(a.length + i) : r.push(null, new vi(i - 1));
    }
    if (e > 0) {
      let a = r[0];
      a instanceof vi ? r[0] = new vi(e + a.length) : r.unshift(new vi(e - 1), null);
    }
    return ua.of(r);
  }
  decomposeLeft(e, n) {
    n.push(new vi(e - 1), null);
  }
  decomposeRight(e, n) {
    n.push(null, new vi(this.length - e - 1));
  }
  updateHeight(e, n = 0, r = !1, i) {
    let a = n + this.length;
    if (i && i.from <= n + this.length && i.more) {
      let o = [], s = Math.max(n, i.from), l = -1;
      for (i.from > n && o.push(new vi(i.from - n - 1).updateHeight(e, n)); s <= a && i.more; ) {
        let c = e.doc.lineAt(s).length;
        o.length && o.push(null);
        let f = i.heights[i.index++];
        l == -1 ? l = f : Math.abs(f - l) >= Ew && (l = -2);
        let d = new eo(c, f);
        d.outdated = !1, o.push(d), s += c + 1;
      }
      s <= a && o.push(null, new vi(a - s).updateHeight(e, s));
      let u = ua.of(o);
      return (l < 0 || Math.abs(u.height - this.height) >= Ew || Math.abs(l - this.heightMetrics(e, n).perLine) >= Ew) && (e.heightChanged = !0), u;
    } else (r || this.outdated) && (this.setHeight(e, e.heightForGap(n, n + this.length)), this.outdated = !1);
    return this;
  }
  toString() {
    return `gap(${this.length})`;
  }
}
class Zxt extends ua {
  constructor(e, n, r) {
    super(e.length + n + r.length, e.height + r.height, n | (e.outdated || r.outdated ? 2 : 0)), this.left = e, this.right = r, this.size = e.size + r.size;
  }
  get break() {
    return this.flags & 1;
  }
  blockAt(e, n, r, i) {
    let a = r + this.left.height;
    return e < a ? this.left.blockAt(e, n, r, i) : this.right.blockAt(e, n, a, i + this.left.length + this.break);
  }
  lineAt(e, n, r, i, a) {
    let o = i + this.left.height, s = a + this.left.length + this.break, l = n == er.ByHeight ? e < o : e < s, u = l ? this.left.lineAt(e, n, r, i, a) : this.right.lineAt(e, n, r, o, s);
    if (this.break || (l ? u.to < s : u.from > s))
      return u;
    let c = n == er.ByPosNoHeight ? er.ByPosNoHeight : er.ByPos;
    return l ? u.join(this.right.lineAt(s, c, r, o, s)) : this.left.lineAt(s, c, r, i, a).join(u);
  }
  forEachLine(e, n, r, i, a, o) {
    let s = i + this.left.height, l = a + this.left.length + this.break;
    if (this.break)
      e < l && this.left.forEachLine(e, n, r, i, a, o), n >= l && this.right.forEachLine(e, n, r, s, l, o);
    else {
      let u = this.lineAt(l, er.ByPos, r, i, a);
      e < u.from && this.left.forEachLine(e, u.from - 1, r, i, a, o), u.to >= e && u.from <= n && o(u), n > u.to && this.right.forEachLine(u.to + 1, n, r, s, l, o);
    }
  }
  replace(e, n, r) {
    let i = this.left.length + this.break;
    if (n < i)
      return this.balanced(this.left.replace(e, n, r), this.right);
    if (e > this.left.length)
      return this.balanced(this.left, this.right.replace(e - i, n - i, r));
    let a = [];
    e > 0 && this.decomposeLeft(e, a);
    let o = a.length;
    for (let s of r)
      a.push(s);
    if (e > 0 && zK(a, o - 1), n < this.length) {
      let s = a.length;
      this.decomposeRight(n, a), zK(a, s);
    }
    return ua.of(a);
  }
  decomposeLeft(e, n) {
    let r = this.left.length;
    if (e <= r)
      return this.left.decomposeLeft(e, n);
    n.push(this.left), this.break && (r++, e >= r && n.push(null)), e > r && this.right.decomposeLeft(e - r, n);
  }
  decomposeRight(e, n) {
    let r = this.left.length, i = r + this.break;
    if (e >= i)
      return this.right.decomposeRight(e - i, n);
    e < r && this.left.decomposeRight(e, n), this.break && e < i && n.push(null), n.push(this.right);
  }
  balanced(e, n) {
    return e.size > 2 * n.size || n.size > 2 * e.size ? ua.of(this.break ? [e, null, n] : [e, n]) : (this.left = e, this.right = n, this.height = e.height + n.height, this.outdated = e.outdated || n.outdated, this.size = e.size + n.size, this.length = e.length + this.break + n.length, this);
  }
  updateHeight(e, n = 0, r = !1, i) {
    let { left: a, right: o } = this, s = n + a.length + this.break, l = null;
    return i && i.from <= n + a.length && i.more ? l = a = a.updateHeight(e, n, r, i) : a.updateHeight(e, n, r), i && i.from <= s + o.length && i.more ? l = o = o.updateHeight(e, s, r, i) : o.updateHeight(e, s, r), l ? this.balanced(a, o) : (this.height = this.left.height + this.right.height, this.outdated = !1, this);
  }
  toString() {
    return this.left + (this.break ? " " : "-") + this.right;
  }
}
function zK(t, e) {
  let n, r;
  t[e] == null && (n = t[e - 1]) instanceof vi && (r = t[e + 1]) instanceof vi && t.splice(e - 1, 3, new vi(n.length + 1 + r.length));
}
const Uxt = 5;
class oB {
  constructor(e, n) {
    this.pos = e, this.oracle = n, this.nodes = [], this.lineStart = -1, this.lineEnd = -1, this.covering = null, this.writtenTo = e;
  }
  get isCovered() {
    return this.covering && this.nodes[this.nodes.length - 1] == this.covering;
  }
  span(e, n) {
    if (this.lineStart > -1) {
      let r = Math.min(n, this.lineEnd), i = this.nodes[this.nodes.length - 1];
      i instanceof eo ? i.length += r - this.pos : (r > this.pos || !this.isCovered) && this.nodes.push(new eo(r - this.pos, -1)), this.writtenTo = r, n > r && (this.nodes.push(null), this.writtenTo++, this.lineStart = -1);
    }
    this.pos = n;
  }
  point(e, n, r) {
    if (e < n || r.heightRelevant) {
      let i = r.widget ? r.widget.estimatedHeight : 0, a = r.widget ? r.widget.lineBreaks : 0;
      i < 0 && (i = this.oracle.lineHeight);
      let o = n - e;
      r.block ? this.addBlock(new Rve(o, i, r)) : (o || a || i >= Uxt) && this.addLineDeco(i, a, o);
    } else n > e && this.span(e, n);
    this.lineEnd > -1 && this.lineEnd < this.pos && (this.lineEnd = this.oracle.doc.lineAt(this.pos).to);
  }
  enterLine() {
    if (this.lineStart > -1)
      return;
    let { from: e, to: n } = this.oracle.doc.lineAt(this.pos);
    this.lineStart = e, this.lineEnd = n, this.writtenTo < e && ((this.writtenTo < e - 1 || this.nodes[this.nodes.length - 1] == null) && this.nodes.push(this.blankContent(this.writtenTo, e - 1)), this.nodes.push(null)), this.pos > e && this.nodes.push(new eo(this.pos - e, -1)), this.writtenTo = this.pos;
  }
  blankContent(e, n) {
    let r = new vi(n - e);
    return this.oracle.doc.lineAt(e).to == n && (r.flags |= 4), r;
  }
  ensureLine() {
    this.enterLine();
    let e = this.nodes.length ? this.nodes[this.nodes.length - 1] : null;
    if (e instanceof eo)
      return e;
    let n = new eo(0, -1);
    return this.nodes.push(n), n;
  }
  addBlock(e) {
    this.enterLine();
    let n = e.deco;
    n && n.startSide > 0 && !this.isCovered && this.ensureLine(), this.nodes.push(e), this.writtenTo = this.pos = this.pos + e.length, n && n.endSide > 0 && (this.covering = e);
  }
  addLineDeco(e, n, r) {
    let i = this.ensureLine();
    i.length += r, i.collapsed += r, i.widgetHeight = Math.max(i.widgetHeight, e), i.breaks += n, this.writtenTo = this.pos = this.pos + r;
  }
  finish(e) {
    let n = this.nodes.length == 0 ? null : this.nodes[this.nodes.length - 1];
    this.lineStart > -1 && !(n instanceof eo) && !this.isCovered ? this.nodes.push(new eo(0, -1)) : (this.writtenTo < this.pos || n == null) && this.nodes.push(this.blankContent(this.writtenTo, this.pos));
    let r = e;
    for (let i of this.nodes)
      i instanceof eo && i.updateHeight(this.oracle, r), r += i ? i.length : 1;
    return this.nodes;
  }
  // Always called with a region that on both sides either stretches
  // to a line break or the end of the document.
  // The returned array uses null to indicate line breaks, but never
  // starts or ends in a line break, or has multiple line breaks next
  // to each other.
  static build(e, n, r, i) {
    let a = new oB(r, e);
    return On.spans(n, r, i, a, 0), a.finish(r);
  }
}
function Xxt(t, e, n) {
  let r = new Yxt();
  return On.compare(t, e, n, r, 0), r.changes;
}
class Yxt {
  constructor() {
    this.changes = [];
  }
  compareRange() {
  }
  comparePoint(e, n, r, i) {
    (e < n || r && r.heightRelevant || i && i.heightRelevant) && m4(e, n, this.changes, 5);
  }
}
function qxt(t, e) {
  let n = t.getBoundingClientRect(), r = t.ownerDocument, i = r.defaultView || window, a = Math.max(0, n.left), o = Math.min(i.innerWidth, n.right), s = Math.max(0, n.top), l = Math.min(i.innerHeight, n.bottom);
  for (let u = t.parentNode; u && u != r.body; )
    if (u.nodeType == 1) {
      let c = u, f = window.getComputedStyle(c);
      if ((c.scrollHeight > c.clientHeight || c.scrollWidth > c.clientWidth) && f.overflow != "visible") {
        let d = c.getBoundingClientRect();
        a = Math.max(a, d.left), o = Math.min(o, d.right), s = Math.max(s, d.top), l = u == t.parentNode ? d.bottom : Math.min(l, d.bottom);
      }
      u = f.position == "absolute" || f.position == "fixed" ? c.offsetParent : c.parentNode;
    } else if (u.nodeType == 11)
      u = u.host;
    else
      break;
  return {
    left: a - n.left,
    right: Math.max(a, o) - n.left,
    top: s - (n.top + e),
    bottom: Math.max(s, l) - (n.top + e)
  };
}
function Kxt(t, e) {
  let n = t.getBoundingClientRect();
  return {
    left: 0,
    right: n.right - n.left,
    top: e,
    bottom: n.bottom - (n.top + e)
  };
}
class aD {
  constructor(e, n, r) {
    this.from = e, this.to = n, this.size = r;
  }
  static same(e, n) {
    if (e.length != n.length)
      return !1;
    for (let r = 0; r < e.length; r++) {
      let i = e[r], a = n[r];
      if (i.from != a.from || i.to != a.to || i.size != a.size)
        return !1;
    }
    return !0;
  }
  draw(e, n) {
    return pt.replace({
      widget: new Jxt(this.size * (n ? e.scaleY : e.scaleX), n)
    }).range(this.from, this.to);
  }
}
class Jxt extends Jl {
  constructor(e, n) {
    super(), this.size = e, this.vertical = n;
  }
  eq(e) {
    return e.size == this.size && e.vertical == this.vertical;
  }
  toDOM() {
    let e = document.createElement("div");
    return this.vertical ? e.style.height = this.size + "px" : (e.style.width = this.size + "px", e.style.height = "2px", e.style.display = "inline-block"), e;
  }
  get estimatedHeight() {
    return this.vertical ? this.size : -1;
  }
}
class VK {
  constructor(e) {
    this.state = e, this.pixelViewport = { left: 0, right: window.innerWidth, top: 0, bottom: 0 }, this.inView = !0, this.paddingTop = 0, this.paddingBottom = 0, this.contentDOMWidth = 0, this.contentDOMHeight = 0, this.editorHeight = 0, this.editorWidth = 0, this.scrollTop = 0, this.scrolledToBottom = !1, this.scaleX = 1, this.scaleY = 1, this.scrollAnchorPos = 0, this.scrollAnchorHeight = -1, this.scaler = FK, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = ir.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1;
    let n = e.facet(iB).some((r) => typeof r != "function" && r.class == "cm-lineWrapping");
    this.heightOracle = new Gxt(n), this.stateDeco = e.facet(b_).filter((r) => typeof r != "function"), this.heightMap = ua.empty().applyChanges(this.stateDeco, Sn.empty, this.heightOracle.setDoc(e.doc), [new Jo(0, 0, 0, e.doc.length)]);
    for (let r = 0; r < 2 && (this.viewport = this.getViewport(0, null), !!this.updateForViewport()); r++)
      ;
    this.updateViewportLines(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = pt.set(this.lineGaps.map((r) => r.draw(this, !1))), this.computeVisibleRanges();
  }
  updateForViewport() {
    let e = [this.viewport], { main: n } = this.state.selection;
    for (let r = 0; r <= 1; r++) {
      let i = r ? n.head : n.anchor;
      if (!e.some(({ from: a, to: o }) => i >= a && i <= o)) {
        let { from: a, to: o } = this.lineBlockAt(i);
        e.push(new dx(a, o));
      }
    }
    return this.viewports = e.sort((r, i) => r.from - i.from), this.updateScaler();
  }
  updateScaler() {
    let e = this.scaler;
    return this.scaler = this.heightMap.height <= 7e6 ? FK : new sB(this.heightOracle, this.heightMap, this.viewports), e.eq(this.scaler) ? 0 : 2;
  }
  updateViewportLines() {
    this.viewportLines = [], this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.heightOracle.setDoc(this.state.doc), 0, 0, (e) => {
      this.viewportLines.push($y(e, this.scaler));
    });
  }
  update(e, n = null) {
    this.state = e.state;
    let r = this.stateDeco;
    this.stateDeco = this.state.facet(b_).filter((c) => typeof c != "function");
    let i = e.changedRanges, a = Jo.extendWithRanges(i, Xxt(r, this.stateDeco, e ? e.changes : Zr.empty(this.state.doc.length))), o = this.heightMap.height, s = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop);
    this.heightMap = this.heightMap.applyChanges(this.stateDeco, e.startState.doc, this.heightOracle.setDoc(this.state.doc), a), this.heightMap.height != o && (e.flags |= 2), s ? (this.scrollAnchorPos = e.changes.mapPos(s.from, -1), this.scrollAnchorHeight = s.top) : (this.scrollAnchorPos = -1, this.scrollAnchorHeight = this.heightMap.height);
    let l = a.length ? this.mapViewport(this.viewport, e.changes) : this.viewport;
    (n && (n.range.head < l.from || n.range.head > l.to) || !this.viewportIsAppropriate(l)) && (l = this.getViewport(0, n));
    let u = l.from != this.viewport.from || l.to != this.viewport.to;
    this.viewport = l, e.flags |= this.updateForViewport(), (u || !e.changes.empty || e.flags & 2) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, e.changes))), e.flags |= this.computeVisibleRanges(), n && (this.scrollTarget = n), !this.mustEnforceCursorAssoc && e.selectionSet && e.view.lineWrapping && e.state.selection.main.empty && e.state.selection.main.assoc && !e.state.facet(vve) && (this.mustEnforceCursorAssoc = !0);
  }
  measure(e) {
    let n = e.contentDOM, r = window.getComputedStyle(n), i = this.heightOracle, a = r.whiteSpace;
    this.defaultTextDirection = r.direction == "rtl" ? ir.RTL : ir.LTR;
    let o = this.heightOracle.mustRefreshForWrapping(a), s = n.getBoundingClientRect(), l = o || this.mustMeasureContent || this.contentDOMHeight != s.height;
    this.contentDOMHeight = s.height, this.mustMeasureContent = !1;
    let u = 0, c = 0;
    if (s.width && s.height) {
      let { scaleX: O, scaleY: S } = Wpe(n, s);
      (O > 5e-3 && Math.abs(this.scaleX - O) > 5e-3 || S > 5e-3 && Math.abs(this.scaleY - S) > 5e-3) && (this.scaleX = O, this.scaleY = S, u |= 8, o = l = !0);
    }
    let f = (parseInt(r.paddingTop) || 0) * this.scaleY, d = (parseInt(r.paddingBottom) || 0) * this.scaleY;
    (this.paddingTop != f || this.paddingBottom != d) && (this.paddingTop = f, this.paddingBottom = d, u |= 10), this.editorWidth != e.scrollDOM.clientWidth && (i.lineWrapping && (l = !0), this.editorWidth = e.scrollDOM.clientWidth, u |= 8);
    let h = e.scrollDOM.scrollTop * this.scaleY;
    this.scrollTop != h && (this.scrollAnchorHeight = -1, this.scrollTop = h), this.scrolledToBottom = Gpe(e.scrollDOM);
    let p = (this.printing ? Kxt : qxt)(n, this.paddingTop), v = p.top - this.pixelViewport.top, g = p.bottom - this.pixelViewport.bottom;
    this.pixelViewport = p;
    let m = this.pixelViewport.bottom > this.pixelViewport.top && this.pixelViewport.right > this.pixelViewport.left;
    if (m != this.inView && (this.inView = m, m && (l = !0)), !this.inView && !this.scrollTarget)
      return 0;
    let y = s.width;
    if ((this.contentDOMWidth != y || this.editorHeight != e.scrollDOM.clientHeight) && (this.contentDOMWidth = s.width, this.editorHeight = e.scrollDOM.clientHeight, u |= 8), l) {
      let O = e.docView.measureVisibleLineHeights(this.viewport);
      if (i.mustRefreshForHeights(O) && (o = !0), o || i.lineWrapping && Math.abs(y - this.contentDOMWidth) > i.charWidth) {
        let { lineHeight: S, charWidth: x, textHeight: C } = e.docView.measureTextSize();
        o = S > 0 && i.refresh(a, S, x, C, y / x, O), o && (e.docView.minWidth = 0, u |= 8);
      }
      v > 0 && g > 0 ? c = Math.max(v, g) : v < 0 && g < 0 && (c = Math.min(v, g)), i.heightChanged = !1;
      for (let S of this.viewports) {
        let x = S.from == this.viewport.from ? O : e.docView.measureVisibleLineHeights(S);
        this.heightMap = (o ? ua.empty().applyChanges(this.stateDeco, Sn.empty, this.heightOracle, [new Jo(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, o, new jxt(S.from, x));
      }
      i.heightChanged && (u |= 2);
    }
    let _ = !this.viewportIsAppropriate(this.viewport, c) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to);
    return _ && (u & 2 && (u |= this.updateScaler()), this.viewport = this.getViewport(c, this.scrollTarget), u |= this.updateForViewport()), (u & 2 || _) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(o ? [] : this.lineGaps, e)), u |= this.computeVisibleRanges(), this.mustEnforceCursorAssoc && (this.mustEnforceCursorAssoc = !1, e.docView.enforceCursorAssoc()), u;
  }
  get visibleTop() {
    return this.scaler.fromDOM(this.pixelViewport.top);
  }
  get visibleBottom() {
    return this.scaler.fromDOM(this.pixelViewport.bottom);
  }
  getViewport(e, n) {
    let r = 0.5 - Math.max(-0.5, Math.min(0.5, e / 1e3 / 2)), i = this.heightMap, a = this.heightOracle, { visibleTop: o, visibleBottom: s } = this, l = new dx(i.lineAt(o - r * 1e3, er.ByHeight, a, 0, 0).from, i.lineAt(s + (1 - r) * 1e3, er.ByHeight, a, 0, 0).to);
    if (n) {
      let { head: u } = n.range;
      if (u < l.from || u > l.to) {
        let c = Math.min(this.editorHeight, this.pixelViewport.bottom - this.pixelViewport.top), f = i.lineAt(u, er.ByPos, a, 0, 0), d;
        n.y == "center" ? d = (f.top + f.bottom) / 2 - c / 2 : n.y == "start" || n.y == "nearest" && u < l.from ? d = f.top : d = f.bottom - c, l = new dx(i.lineAt(d - 1e3 / 2, er.ByHeight, a, 0, 0).from, i.lineAt(d + c + 1e3 / 2, er.ByHeight, a, 0, 0).to);
      }
    }
    return l;
  }
  mapViewport(e, n) {
    let r = n.mapPos(e.from, -1), i = n.mapPos(e.to, 1);
    return new dx(this.heightMap.lineAt(r, er.ByPos, this.heightOracle, 0, 0).from, this.heightMap.lineAt(i, er.ByPos, this.heightOracle, 0, 0).to);
  }
  // Checks if a given viewport covers the visible part of the
  // document and not too much beyond that.
  viewportIsAppropriate({ from: e, to: n }, r = 0) {
    if (!this.inView)
      return !0;
    let { top: i } = this.heightMap.lineAt(e, er.ByPos, this.heightOracle, 0, 0), { bottom: a } = this.heightMap.lineAt(n, er.ByPos, this.heightOracle, 0, 0), { visibleTop: o, visibleBottom: s } = this;
    return (e == 0 || i <= o - Math.max(10, Math.min(
      -r,
      250
      /* VP.MaxCoverMargin */
    ))) && (n == this.state.doc.length || a >= s + Math.max(10, Math.min(
      r,
      250
      /* VP.MaxCoverMargin */
    ))) && i > o - 2 * 1e3 && a < s + 2 * 1e3;
  }
  mapLineGaps(e, n) {
    if (!e.length || n.empty)
      return e;
    let r = [];
    for (let i of e)
      n.touchesRange(i.from, i.to) || r.push(new aD(n.mapPos(i.from), n.mapPos(i.to), i.size));
    return r;
  }
  // Computes positions in the viewport where the start or end of a
  // line should be hidden, trying to reuse existing line gaps when
  // appropriate to avoid unneccesary redraws.
  // Uses crude character-counting for the positioning and sizing,
  // since actual DOM coordinates aren't always available and
  // predictable. Relies on generous margins (see LG.Margin) to hide
  // the artifacts this might produce from the user.
  ensureLineGaps(e, n) {
    let r = this.heightOracle.lineWrapping, i = r ? 1e4 : 2e3, a = i >> 1, o = i << 1;
    if (this.defaultTextDirection != ir.LTR && !r)
      return [];
    let s = [], l = (c, f, d, h) => {
      if (f - c < a)
        return;
      let p = this.state.selection.main, v = [p.from];
      p.empty || v.push(p.to);
      for (let m of v)
        if (m > c && m < f) {
          l(c, m - 10, d, h), l(m + 10, f, d, h);
          return;
        }
      let g = twt(e, (m) => m.from >= d.from && m.to <= d.to && Math.abs(m.from - c) < a && Math.abs(m.to - f) < a && !v.some((y) => m.from < y && m.to > y));
      if (!g) {
        if (f < d.to && n && r && n.visibleRanges.some((m) => m.from <= f && m.to >= f)) {
          let m = n.moveToLineBoundary(De.cursor(f), !1, !0).head;
          m > c && (f = m);
        }
        g = new aD(c, f, this.gapSize(d, c, f, h));
      }
      s.push(g);
    }, u = (c) => {
      if (c.length < o || c.type != la.Text)
        return;
      let f = ewt(c.from, c.to, this.stateDeco);
      if (f.total < o)
        return;
      let d = this.scrollTarget ? this.scrollTarget.range.head : null, h, p;
      if (r) {
        let v = i / this.heightOracle.lineLength * this.heightOracle.lineHeight, g, m;
        if (d != null) {
          let y = px(f, d), _ = ((this.visibleBottom - this.visibleTop) / 2 + v) / c.height;
          g = y - _, m = y + _;
        } else
          g = (this.visibleTop - c.top - v) / c.height, m = (this.visibleBottom - c.top + v) / c.height;
        h = hx(f, g), p = hx(f, m);
      } else {
        let v = f.total * this.heightOracle.charWidth, g = i * this.heightOracle.charWidth, m, y;
        if (d != null) {
          let _ = px(f, d), O = ((this.pixelViewport.right - this.pixelViewport.left) / 2 + g) / v;
          m = _ - O, y = _ + O;
        } else
          m = (this.pixelViewport.left - g) / v, y = (this.pixelViewport.right + g) / v;
        h = hx(f, m), p = hx(f, y);
      }
      h > c.from && l(c.from, h, c, f), p < c.to && l(p, c.to, c, f);
    };
    for (let c of this.viewportLines)
      Array.isArray(c.type) ? c.type.forEach(u) : u(c);
    return s;
  }
  gapSize(e, n, r, i) {
    let a = px(i, r) - px(i, n);
    return this.heightOracle.lineWrapping ? e.height * a : i.total * this.heightOracle.charWidth * a;
  }
  updateLineGaps(e) {
    aD.same(e, this.lineGaps) || (this.lineGaps = e, this.lineGapDeco = pt.set(e.map((n) => n.draw(this, this.heightOracle.lineWrapping))));
  }
  computeVisibleRanges() {
    let e = this.stateDeco;
    this.lineGaps.length && (e = e.concat(this.lineGapDeco));
    let n = [];
    On.spans(e, this.viewport.from, this.viewport.to, {
      span(i, a) {
        n.push({ from: i, to: a });
      },
      point() {
      }
    }, 20);
    let r = n.length != this.visibleRanges.length || this.visibleRanges.some((i, a) => i.from != n[a].from || i.to != n[a].to);
    return this.visibleRanges = n, r ? 4 : 0;
  }
  lineBlockAt(e) {
    return e >= this.viewport.from && e <= this.viewport.to && this.viewportLines.find((n) => n.from <= e && n.to >= e) || $y(this.heightMap.lineAt(e, er.ByPos, this.heightOracle, 0, 0), this.scaler);
  }
  lineBlockAtHeight(e) {
    return e >= this.viewportLines[0].top && e <= this.viewportLines[this.viewportLines.length - 1].bottom && this.viewportLines.find((n) => n.top <= e && n.bottom >= e) || $y(this.heightMap.lineAt(this.scaler.fromDOM(e), er.ByHeight, this.heightOracle, 0, 0), this.scaler);
  }
  scrollAnchorAt(e) {
    let n = this.lineBlockAtHeight(e + 8);
    return n.from >= this.viewport.from || this.viewportLines[0].top - e > 200 ? n : this.viewportLines[0];
  }
  elementAtHeight(e) {
    return $y(this.heightMap.blockAt(this.scaler.fromDOM(e), this.heightOracle, 0, 0), this.scaler);
  }
  get docHeight() {
    return this.scaler.toDOM(this.heightMap.height);
  }
  get contentHeight() {
    return this.docHeight + this.paddingTop + this.paddingBottom;
  }
}
class dx {
  constructor(e, n) {
    this.from = e, this.to = n;
  }
}
function ewt(t, e, n) {
  let r = [], i = t, a = 0;
  return On.spans(n, t, e, {
    span() {
    },
    point(o, s) {
      o > i && (r.push({ from: i, to: o }), a += o - i), i = s;
    }
  }, 20), i < e && (r.push({ from: i, to: e }), a += e - i), { total: a, ranges: r };
}
function hx({ total: t, ranges: e }, n) {
  if (n <= 0)
    return e[0].from;
  if (n >= 1)
    return e[e.length - 1].to;
  let r = Math.floor(t * n);
  for (let i = 0; ; i++) {
    let { from: a, to: o } = e[i], s = o - a;
    if (r <= s)
      return a + r;
    r -= s;
  }
}
function px(t, e) {
  let n = 0;
  for (let { from: r, to: i } of t.ranges) {
    if (e <= i) {
      n += e - r;
      break;
    }
    n += i - r;
  }
  return n / t.total;
}
function twt(t, e) {
  for (let n of t)
    if (e(n))
      return n;
}
const FK = {
  toDOM(t) {
    return t;
  },
  fromDOM(t) {
    return t;
  },
  scale: 1,
  eq(t) {
    return t == this;
  }
};
class sB {
  constructor(e, n, r) {
    let i = 0, a = 0, o = 0;
    this.viewports = r.map(({ from: s, to: l }) => {
      let u = n.lineAt(s, er.ByPos, e, 0, 0).top, c = n.lineAt(l, er.ByPos, e, 0, 0).bottom;
      return i += c - u, { from: s, to: l, top: u, bottom: c, domTop: 0, domBottom: 0 };
    }), this.scale = (7e6 - i) / (n.height - i);
    for (let s of this.viewports)
      s.domTop = o + (s.top - a) * this.scale, o = s.domBottom = s.domTop + (s.bottom - s.top), a = s.bottom;
  }
  toDOM(e) {
    for (let n = 0, r = 0, i = 0; ; n++) {
      let a = n < this.viewports.length ? this.viewports[n] : null;
      if (!a || e < a.top)
        return i + (e - r) * this.scale;
      if (e <= a.bottom)
        return a.domTop + (e - a.top);
      r = a.bottom, i = a.domBottom;
    }
  }
  fromDOM(e) {
    for (let n = 0, r = 0, i = 0; ; n++) {
      let a = n < this.viewports.length ? this.viewports[n] : null;
      if (!a || e < a.domTop)
        return r + (e - i) / this.scale;
      if (e <= a.domBottom)
        return a.top + (e - a.domTop);
      r = a.bottom, i = a.domBottom;
    }
  }
  eq(e) {
    return e instanceof sB ? this.scale == e.scale && this.viewports.length == e.viewports.length && this.viewports.every((n, r) => n.from == e.viewports[r].from && n.to == e.viewports[r].to) : !1;
  }
}
function $y(t, e) {
  if (e.scale == 1)
    return t;
  let n = e.toDOM(t.top), r = e.toDOM(t.bottom);
  return new Tl(t.from, t.length, n, r - n, Array.isArray(t._content) ? t._content.map((i) => $y(i, e)) : t._content);
}
const vx = /* @__PURE__ */ ut.define({ combine: (t) => t.join(" ") }), C4 = /* @__PURE__ */ ut.define({ combine: (t) => t.indexOf(!0) > -1 }), T4 = /* @__PURE__ */ Cf.newName(), kve = /* @__PURE__ */ Cf.newName(), Lve = /* @__PURE__ */ Cf.newName(), Nve = { "&light": "." + kve, "&dark": "." + Lve };
function P4(t, e, n) {
  return new Cf(e, {
    finish(r) {
      return /&/.test(r) ? r.replace(/&\w*/, (i) => {
        if (i == "&")
          return t;
        if (!n || !n[i])
          throw new RangeError(`Unsupported selector: ${i}`);
        return n[i];
      }) : t + " " + r;
    }
  });
}
const nwt = /* @__PURE__ */ P4("." + T4, {
  "&": {
    position: "relative !important",
    boxSizing: "border-box",
    "&.cm-focused": {
      // Provide a simple default outline to make sure a focused
      // editor is visually distinct. Can't leave the default behavior
      // because that will apply to the content element, which is
      // inside the scrollable container and doesn't include the
      // gutters. We also can't use an 'auto' outline, since those
      // are, for some reason, drawn behind the element content, which
      // will cause things like the active line background to cover
      // the outline (#297).
      outline: "1px dotted #212121"
    },
    display: "flex !important",
    flexDirection: "column"
  },
  ".cm-scroller": {
    display: "flex !important",
    alignItems: "flex-start !important",
    fontFamily: "monospace",
    lineHeight: 1.4,
    height: "100%",
    overflowX: "auto",
    position: "relative",
    zIndex: 0
  },
  ".cm-content": {
    margin: 0,
    flexGrow: 2,
    flexShrink: 0,
    display: "block",
    whiteSpace: "pre",
    wordWrap: "normal",
    // https://github.com/codemirror/dev/issues/456
    boxSizing: "border-box",
    minHeight: "100%",
    padding: "4px 0",
    outline: "none",
    "&[contenteditable=true]": {
      WebkitUserModify: "read-write-plaintext-only"
    }
  },
  ".cm-lineWrapping": {
    whiteSpace_fallback: "pre-wrap",
    // For IE
    whiteSpace: "break-spaces",
    wordBreak: "break-word",
    // For Safari, which doesn't support overflow-wrap: anywhere
    overflowWrap: "anywhere",
    flexShrink: 1
  },
  "&light .cm-content": { caretColor: "black" },
  "&dark .cm-content": { caretColor: "white" },
  ".cm-line": {
    display: "block",
    padding: "0 2px 0 6px"
  },
  ".cm-layer": {
    position: "absolute",
    left: 0,
    top: 0,
    contain: "size style",
    "& > *": {
      position: "absolute"
    }
  },
  "&light .cm-selectionBackground": {
    background: "#d9d9d9"
  },
  "&dark .cm-selectionBackground": {
    background: "#222"
  },
  "&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
    background: "#d7d4f0"
  },
  "&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
    background: "#233"
  },
  ".cm-cursorLayer": {
    pointerEvents: "none"
  },
  "&.cm-focused > .cm-scroller > .cm-cursorLayer": {
    animation: "steps(1) cm-blink 1.2s infinite"
  },
  // Two animations defined so that we can switch between them to
  // restart the animation without forcing another style
  // recomputation.
  "@keyframes cm-blink": { "0%": {}, "50%": { opacity: 0 }, "100%": {} },
  "@keyframes cm-blink2": { "0%": {}, "50%": { opacity: 0 }, "100%": {} },
  ".cm-cursor, .cm-dropCursor": {
    borderLeft: "1.2px solid black",
    marginLeft: "-0.6px",
    pointerEvents: "none"
  },
  ".cm-cursor": {
    display: "none"
  },
  "&dark .cm-cursor": {
    borderLeftColor: "#444"
  },
  ".cm-dropCursor": {
    position: "absolute"
  },
  "&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor": {
    display: "block"
  },
  ".cm-iso": {
    unicodeBidi: "isolate"
  },
  ".cm-announced": {
    position: "fixed",
    top: "-10000px"
  },
  "@media print": {
    ".cm-announced": { display: "none" }
  },
  "&light .cm-activeLine": { backgroundColor: "#cceeff44" },
  "&dark .cm-activeLine": { backgroundColor: "#99eeff33" },
  "&light .cm-specialChar": { color: "red" },
  "&dark .cm-specialChar": { color: "#f78" },
  ".cm-gutters": {
    flexShrink: 0,
    display: "flex",
    height: "100%",
    boxSizing: "border-box",
    insetInlineStart: 0,
    zIndex: 200
  },
  "&light .cm-gutters": {
    backgroundColor: "#f5f5f5",
    color: "#6c6c6c",
    borderRight: "1px solid #ddd"
  },
  "&dark .cm-gutters": {
    backgroundColor: "#333338",
    color: "#ccc"
  },
  ".cm-gutter": {
    display: "flex !important",
    // Necessary -- prevents margin collapsing
    flexDirection: "column",
    flexShrink: 0,
    boxSizing: "border-box",
    minHeight: "100%",
    overflow: "hidden"
  },
  ".cm-gutterElement": {
    boxSizing: "border-box"
  },
  ".cm-lineNumbers .cm-gutterElement": {
    padding: "0 3px 0 5px",
    minWidth: "20px",
    textAlign: "right",
    whiteSpace: "nowrap"
  },
  "&light .cm-activeLineGutter": {
    backgroundColor: "#e2f2ff"
  },
  "&dark .cm-activeLineGutter": {
    backgroundColor: "#222227"
  },
  ".cm-panels": {
    boxSizing: "border-box",
    position: "sticky",
    left: 0,
    right: 0
  },
  "&light .cm-panels": {
    backgroundColor: "#f5f5f5",
    color: "black"
  },
  "&light .cm-panels-top": {
    borderBottom: "1px solid #ddd"
  },
  "&light .cm-panels-bottom": {
    borderTop: "1px solid #ddd"
  },
  "&dark .cm-panels": {
    backgroundColor: "#333338",
    color: "white"
  },
  ".cm-tab": {
    display: "inline-block",
    overflow: "hidden",
    verticalAlign: "bottom"
  },
  ".cm-widgetBuffer": {
    verticalAlign: "text-top",
    height: "1em",
    width: 0,
    display: "inline"
  },
  ".cm-placeholder": {
    color: "#888",
    display: "inline-block",
    verticalAlign: "top"
  },
  ".cm-highlightSpace:before": {
    content: "attr(data-display)",
    position: "absolute",
    pointerEvents: "none",
    color: "#888"
  },
  ".cm-highlightTab": {
    backgroundImage: `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,
    backgroundSize: "auto 100%",
    backgroundPosition: "right 90%",
    backgroundRepeat: "no-repeat"
  },
  ".cm-trailingSpace": {
    backgroundColor: "#ff332255"
  },
  ".cm-button": {
    verticalAlign: "middle",
    color: "inherit",
    fontSize: "70%",
    padding: ".2em 1em",
    borderRadius: "1px"
  },
  "&light .cm-button": {
    backgroundImage: "linear-gradient(#eff1f5, #d9d9df)",
    border: "1px solid #888",
    "&:active": {
      backgroundImage: "linear-gradient(#b4b4b4, #d0d3d6)"
    }
  },
  "&dark .cm-button": {
    backgroundImage: "linear-gradient(#393939, #111)",
    border: "1px solid #888",
    "&:active": {
      backgroundImage: "linear-gradient(#111, #333)"
    }
  },
  ".cm-textfield": {
    verticalAlign: "middle",
    color: "inherit",
    fontSize: "70%",
    border: "1px solid silver",
    padding: ".2em .5em"
  },
  "&light .cm-textfield": {
    backgroundColor: "white"
  },
  "&dark .cm-textfield": {
    border: "1px solid #555",
    backgroundColor: "inherit"
  }
}, Nve), Ay = "";
class rwt {
  constructor(e, n) {
    this.points = e, this.text = "", this.lineSeparator = n.facet(un.lineSeparator);
  }
  append(e) {
    this.text += e;
  }
  lineBreak() {
    this.text += Ay;
  }
  readRange(e, n) {
    if (!e)
      return this;
    let r = e.parentNode;
    for (let i = e; ; ) {
      this.findPointBefore(r, i);
      let a = this.text.length;
      this.readNode(i);
      let o = i.nextSibling;
      if (o == n)
        break;
      let s = Qn.get(i), l = Qn.get(o);
      (s && l ? s.breakAfter : (s ? s.breakAfter : $T(i)) || $T(o) && (i.nodeName != "BR" || i.cmIgnore) && this.text.length > a) && this.lineBreak(), i = o;
    }
    return this.findPointBefore(r, n), this;
  }
  readTextNode(e) {
    let n = e.nodeValue;
    for (let r of this.points)
      r.node == e && (r.pos = this.text.length + Math.min(r.offset, n.length));
    for (let r = 0, i = this.lineSeparator ? null : /\r\n?|\n/g; ; ) {
      let a = -1, o = 1, s;
      if (this.lineSeparator ? (a = n.indexOf(this.lineSeparator, r), o = this.lineSeparator.length) : (s = i.exec(n)) && (a = s.index, o = s[0].length), this.append(n.slice(r, a < 0 ? n.length : a)), a < 0)
        break;
      if (this.lineBreak(), o > 1)
        for (let l of this.points)
          l.node == e && l.pos > this.text.length && (l.pos -= o - 1);
      r = a + o;
    }
  }
  readNode(e) {
    if (e.cmIgnore)
      return;
    let n = Qn.get(e), r = n && n.overrideDOMText;
    if (r != null) {
      this.findPointInside(e, r.length);
      for (let i = r.iter(); !i.next().done; )
        i.lineBreak ? this.lineBreak() : this.append(i.value);
    } else e.nodeType == 3 ? this.readTextNode(e) : e.nodeName == "BR" ? e.nextSibling && this.lineBreak() : e.nodeType == 1 && this.readRange(e.firstChild, null);
  }
  findPointBefore(e, n) {
    for (let r of this.points)
      r.node == e && e.childNodes[r.offset] == n && (r.pos = this.text.length);
  }
  findPointInside(e, n) {
    for (let r of this.points)
      (e.nodeType == 3 ? r.node == e : e.contains(r.node)) && (r.pos = this.text.length + (iwt(e, r.node, r.offset) ? n : 0));
  }
}
function iwt(t, e, n) {
  for (; ; ) {
    if (!e || n < Uu(e))
      return !1;
    if (e == t)
      return !0;
    n = Jh(e) + 1, e = e.parentNode;
  }
}
class WK {
  constructor(e, n) {
    this.node = e, this.offset = n, this.pos = -1;
  }
}
class awt {
  constructor(e, n, r, i) {
    this.typeOver = i, this.bounds = null, this.text = "", this.domChanged = n > -1;
    let { impreciseHead: a, impreciseAnchor: o } = e.docView;
    if (e.state.readOnly && n > -1)
      this.newSel = null;
    else if (n > -1 && (this.bounds = e.docView.domBoundsAround(n, r, 0))) {
      let s = a || o ? [] : lwt(e), l = new rwt(s, e.state);
      l.readRange(this.bounds.startDOM, this.bounds.endDOM), this.text = l.text, this.newSel = uwt(s, this.bounds.from);
    } else {
      let s = e.observer.selectionRange, l = a && a.node == s.focusNode && a.offset == s.focusOffset || !f4(e.contentDOM, s.focusNode) ? e.state.selection.main.head : e.docView.posFromDOM(s.focusNode, s.focusOffset), u = o && o.node == s.anchorNode && o.offset == s.anchorOffset || !f4(e.contentDOM, s.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(s.anchorNode, s.anchorOffset), c = e.viewport;
      if ((lt.ios || lt.chrome) && e.state.selection.main.empty && l != u && (c.from > 0 || c.to < e.state.doc.length)) {
        let f = Math.min(l, u), d = Math.max(l, u), h = c.from - f, p = c.to - d;
        (h == 0 || h == 1 || f == 0) && (p == 0 || p == -1 || d == e.state.doc.length) && (l = 0, u = e.state.doc.length);
      }
      this.newSel = De.single(u, l);
    }
  }
}
function Bve(t, e) {
  let n, { newSel: r } = e, i = t.state.selection.main, a = t.inputState.lastKeyTime > Date.now() - 100 ? t.inputState.lastKeyCode : -1;
  if (e.bounds) {
    let { from: o, to: s } = e.bounds, l = i.from, u = null;
    (a === 8 || lt.android && e.text.length < s - o) && (l = i.to, u = "end");
    let c = swt(t.state.doc.sliceString(o, s, Ay), e.text, l - o, u);
    c && (lt.chrome && a == 13 && c.toB == c.from + 2 && e.text.slice(c.from, c.toB) == Ay + Ay && c.toB--, n = {
      from: o + c.from,
      to: o + c.toA,
      insert: Sn.of(e.text.slice(c.from, c.toB).split(Ay))
    });
  } else r && (!t.hasFocus && t.state.facet(Nc) || r.main.eq(i)) && (r = null);
  if (!n && !r)
    return !1;
  if (!n && e.typeOver && !i.empty && r && r.main.empty ? n = { from: i.from, to: i.to, insert: t.state.doc.slice(i.from, i.to) } : n && n.from >= i.from && n.to <= i.to && (n.from != i.from || n.to != i.to) && i.to - i.from - (n.to - n.from) <= 4 ? n = {
    from: i.from,
    to: i.to,
    insert: t.state.doc.slice(i.from, n.from).append(n.insert).append(t.state.doc.slice(n.to, i.to))
  } : (lt.mac || lt.android) && n && n.from == n.to && n.from == i.head - 1 && /^\. ?$/.test(n.insert.toString()) && t.contentDOM.getAttribute("autocorrect") == "off" ? (r && n.insert.length == 2 && (r = De.single(r.main.anchor - 1, r.main.head - 1)), n = { from: i.from, to: i.to, insert: Sn.of([" "]) }) : lt.chrome && n && n.from == n.to && n.from == i.head && n.insert.toString() == `
 ` && t.lineWrapping && (r && (r = De.single(r.main.anchor - 1, r.main.head - 1)), n = { from: i.from, to: i.to, insert: Sn.of([" "]) }), n)
    return zve(t, n, r, a);
  if (r && !r.main.eq(i)) {
    let o = !1, s = "select";
    return t.inputState.lastSelectionTime > Date.now() - 50 && (t.inputState.lastSelectionOrigin == "select" && (o = !0), s = t.inputState.lastSelectionOrigin), t.dispatch({ selection: r, scrollIntoView: o, userEvent: s }), !0;
  } else
    return !1;
}
function zve(t, e, n, r = -1) {
  if (lt.ios && t.inputState.flushIOSKey(e))
    return !0;
  let i = t.state.selection.main;
  if (lt.android && (e.to == i.to && // GBoard will sometimes remove a space it just inserted
  // after a completion when you press enter
  (e.from == i.from || e.from == i.from - 1 && t.state.sliceDoc(e.from, i.from) == " ") && e.insert.length == 1 && e.insert.lines == 2 && ag(t.contentDOM, "Enter", 13) || (e.from == i.from - 1 && e.to == i.to && e.insert.length == 0 || r == 8 && e.insert.length < e.to - e.from && e.to > i.head) && ag(t.contentDOM, "Backspace", 8) || e.from == i.from && e.to == i.to + 1 && e.insert.length == 0 && ag(t.contentDOM, "Delete", 46)))
    return !0;
  let a = e.insert.toString();
  t.inputState.composing >= 0 && t.inputState.composing++;
  let o, s = () => o || (o = owt(t, e, n));
  return t.state.facet(dve).some((l) => l(t, e.from, e.to, a, s)) || t.dispatch(s()), !0;
}
function owt(t, e, n) {
  let r, i = t.state, a = i.selection.main;
  if (e.from >= a.from && e.to <= a.to && e.to - e.from >= (a.to - a.from) / 3 && (!n || n.main.empty && n.main.from == e.from + e.insert.length) && t.inputState.composing < 0) {
    let s = a.from < e.from ? i.sliceDoc(a.from, e.from) : "", l = a.to > e.to ? i.sliceDoc(e.to, a.to) : "";
    r = i.replaceSelection(t.state.toText(s + e.insert.sliceString(0, void 0, t.state.lineBreak) + l));
  } else {
    let s = i.changes(e), l = n && n.main.to <= s.newLength ? n.main : void 0;
    if (i.selection.ranges.length > 1 && t.inputState.composing >= 0 && e.to <= a.to && e.to >= a.to - 10) {
      let u = t.state.sliceDoc(e.from, e.to), c, f = n && xve(t, n.main.head);
      if (f) {
        let p = e.insert.length - (e.to - e.from);
        c = { from: f.from, to: f.to - p };
      } else
        c = t.state.doc.lineAt(a.head);
      let d = a.to - e.to, h = a.to - a.from;
      r = i.changeByRange((p) => {
        if (p.from == a.from && p.to == a.to)
          return { changes: s, range: l || p.map(s) };
        let v = p.to - d, g = v - u.length;
        if (p.to - p.from != h || t.state.sliceDoc(g, v) != u || // Unfortunately, there's no way to make multiple
        // changes in the same node work without aborting
        // composition, so cursors in the composition range are
        // ignored.
        p.to >= c.from && p.from <= c.to)
          return { range: p };
        let m = i.changes({ from: g, to: v, insert: e.insert }), y = p.to - a.to;
        return {
          changes: m,
          range: l ? De.range(Math.max(0, l.anchor + y), Math.max(0, l.head + y)) : p.map(m)
        };
      });
    } else
      r = {
        changes: s,
        selection: l && i.selection.replaceRange(l)
      };
  }
  let o = "input.type";
  return (t.composing || t.inputState.compositionPendingChange && t.inputState.compositionEndedAt > Date.now() - 50) && (t.inputState.compositionPendingChange = !1, o += ".compose", t.inputState.compositionFirstChange && (o += ".start", t.inputState.compositionFirstChange = !1)), i.update(r, { userEvent: o, scrollIntoView: !0 });
}
function swt(t, e, n, r) {
  let i = Math.min(t.length, e.length), a = 0;
  for (; a < i && t.charCodeAt(a) == e.charCodeAt(a); )
    a++;
  if (a == i && t.length == e.length)
    return null;
  let o = t.length, s = e.length;
  for (; o > 0 && s > 0 && t.charCodeAt(o - 1) == e.charCodeAt(s - 1); )
    o--, s--;
  if (r == "end") {
    let l = Math.max(0, a - Math.min(o, s));
    n -= o + l - a;
  }
  if (o < a && t.length < e.length) {
    let l = n <= a && n >= o ? a - n : 0;
    a -= l, s = a + (s - o), o = a;
  } else if (s < a) {
    let l = n <= a && n >= s ? a - n : 0;
    a -= l, o = a + (o - s), s = a;
  }
  return { from: a, toA: o, toB: s };
}
function lwt(t) {
  let e = [];
  if (t.root.activeElement != t.contentDOM)
    return e;
  let { anchorNode: n, anchorOffset: r, focusNode: i, focusOffset: a } = t.observer.selectionRange;
  return n && (e.push(new WK(n, r)), (i != n || a != r) && e.push(new WK(i, a))), e;
}
function uwt(t, e) {
  if (t.length == 0)
    return null;
  let n = t[0].pos, r = t.length == 2 ? t[1].pos : n;
  return n > -1 && r > -1 ? De.single(n + e, r + e) : null;
}
const cwt = {
  childList: !0,
  characterData: !0,
  subtree: !0,
  attributes: !0,
  characterDataOldValue: !0
}, oD = lt.ie && lt.ie_version <= 11;
class fwt {
  constructor(e) {
    this.view = e, this.active = !1, this.editContext = null, this.selectionRange = new XSt(), this.selectionChanged = !1, this.delayedFlush = -1, this.resizeTimeout = -1, this.queue = [], this.delayedAndroidKey = null, this.flushingAndroidKey = -1, this.lastChange = 0, this.scrollTargets = [], this.intersection = null, this.resizeScroll = null, this.intersecting = !1, this.gapIntersection = null, this.gaps = [], this.printQuery = null, this.parentCheck = -1, this.dom = e.contentDOM, this.observer = new MutationObserver((n) => {
      for (let r of n)
        this.queue.push(r);
      (lt.ie && lt.ie_version <= 11 || lt.ios && e.composing) && n.some((r) => r.type == "childList" && r.removedNodes.length || r.type == "characterData" && r.oldValue.length > r.target.nodeValue.length) ? this.flushSoon() : this.flush();
    }), window.EditContext && e.constructor.EDIT_CONTEXT !== !1 && // Chrome <126 doesn't support inverted selections in edit context (#1392)
    !(lt.chrome && lt.chrome_version < 126) && (this.editContext = new hwt(e), e.state.facet(Nc) && (e.contentDOM.editContext = this.editContext.editContext)), oD && (this.onCharData = (n) => {
      this.queue.push({
        target: n.target,
        type: "characterData",
        oldValue: n.prevValue
      }), this.flushSoon();
    }), this.onSelectionChange = this.onSelectionChange.bind(this), this.onResize = this.onResize.bind(this), this.onPrint = this.onPrint.bind(this), this.onScroll = this.onScroll.bind(this), window.matchMedia && (this.printQuery = window.matchMedia("print")), typeof ResizeObserver == "function" && (this.resizeScroll = new ResizeObserver(() => {
      var n;
      ((n = this.view.docView) === null || n === void 0 ? void 0 : n.lastUpdate) < Date.now() - 75 && this.onResize();
    }), this.resizeScroll.observe(e.scrollDOM)), this.addWindowListeners(this.win = e.win), this.start(), typeof IntersectionObserver == "function" && (this.intersection = new IntersectionObserver((n) => {
      this.parentCheck < 0 && (this.parentCheck = setTimeout(this.listenForScroll.bind(this), 1e3)), n.length > 0 && n[n.length - 1].intersectionRatio > 0 != this.intersecting && (this.intersecting = !this.intersecting, this.intersecting != this.view.inView && this.onScrollChanged(document.createEvent("Event")));
    }, { threshold: [0, 1e-3] }), this.intersection.observe(this.dom), this.gapIntersection = new IntersectionObserver((n) => {
      n.length > 0 && n[n.length - 1].intersectionRatio > 0 && this.onScrollChanged(document.createEvent("Event"));
    }, {})), this.listenForScroll(), this.readSelectionRange();
  }
  onScrollChanged(e) {
    this.view.inputState.runHandlers("scroll", e), this.intersecting && this.view.measure();
  }
  onScroll(e) {
    this.intersecting && this.flush(!1), this.editContext && this.view.requestMeasure(this.editContext.measureReq), this.onScrollChanged(e);
  }
  onResize() {
    this.resizeTimeout < 0 && (this.resizeTimeout = setTimeout(() => {
      this.resizeTimeout = -1, this.view.requestMeasure();
    }, 50));
  }
  onPrint(e) {
    e.type == "change" && !e.matches || (this.view.viewState.printing = !0, this.view.measure(), setTimeout(() => {
      this.view.viewState.printing = !1, this.view.requestMeasure();
    }, 500));
  }
  updateGaps(e) {
    if (this.gapIntersection && (e.length != this.gaps.length || this.gaps.some((n, r) => n != e[r]))) {
      this.gapIntersection.disconnect();
      for (let n of e)
        this.gapIntersection.observe(n);
      this.gaps = e;
    }
  }
  onSelectionChange(e) {
    let n = this.selectionChanged;
    if (!this.readSelectionRange() || this.delayedAndroidKey)
      return;
    let { view: r } = this, i = this.selectionRange;
    if (r.state.facet(Nc) ? r.root.activeElement != this.dom : !$w(r.dom, i))
      return;
    let a = i.anchorNode && r.docView.nearest(i.anchorNode);
    if (a && a.ignoreEvent(e)) {
      n || (this.selectionChanged = !1);
      return;
    }
    (lt.ie && lt.ie_version <= 11 || lt.android && lt.chrome) && !r.state.selection.main.empty && // (Selection.isCollapsed isn't reliable on IE)
    i.focusNode && vb(i.focusNode, i.focusOffset, i.anchorNode, i.anchorOffset) ? this.flushSoon() : this.flush(!1);
  }
  readSelectionRange() {
    let { view: e } = this, n = y_(e.root);
    if (!n)
      return !1;
    let r = lt.safari && e.root.nodeType == 11 && GSt(this.dom.ownerDocument) == this.dom && dwt(this.view, n) || n;
    if (!r || this.selectionRange.eq(r))
      return !1;
    let i = $w(this.dom, r);
    return i && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && qSt(this.dom, r) ? (this.view.inputState.lastFocusTime = 0, e.docView.updateSelection(), !1) : (this.selectionRange.setRange(r), i && (this.selectionChanged = !0), !0);
  }
  setSelectionRange(e, n) {
    this.selectionRange.set(e.node, e.offset, n.node, n.offset), this.selectionChanged = !1;
  }
  clearSelectionRange() {
    this.selectionRange.set(null, 0, null, 0);
  }
  listenForScroll() {
    this.parentCheck = -1;
    let e = 0, n = null;
    for (let r = this.dom; r; )
      if (r.nodeType == 1)
        !n && e < this.scrollTargets.length && this.scrollTargets[e] == r ? e++ : n || (n = this.scrollTargets.slice(0, e)), n && n.push(r), r = r.assignedSlot || r.parentNode;
      else if (r.nodeType == 11)
        r = r.host;
      else
        break;
    if (e < this.scrollTargets.length && !n && (n = this.scrollTargets.slice(0, e)), n) {
      for (let r of this.scrollTargets)
        r.removeEventListener("scroll", this.onScroll);
      for (let r of this.scrollTargets = n)
        r.addEventListener("scroll", this.onScroll);
    }
  }
  ignore(e) {
    if (!this.active)
      return e();
    try {
      return this.stop(), e();
    } finally {
      this.start(), this.clear();
    }
  }
  start() {
    this.active || (this.observer.observe(this.dom, cwt), oD && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.active = !0);
  }
  stop() {
    this.active && (this.active = !1, this.observer.disconnect(), oD && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData));
  }
  // Throw away any pending changes
  clear() {
    this.processRecords(), this.queue.length = 0, this.selectionChanged = !1;
  }
  // Chrome Android, especially in combination with GBoard, not only
  // doesn't reliably fire regular key events, but also often
  // surrounds the effect of enter or backspace with a bunch of
  // composition events that, when interrupted, cause text duplication
  // or other kinds of corruption. This hack makes the editor back off
  // from handling DOM changes for a moment when such a key is
  // detected (via beforeinput or keydown), and then tries to flush
  // them or, if that has no effect, dispatches the given key.
  delayAndroidKey(e, n) {
    var r;
    if (!this.delayedAndroidKey) {
      let i = () => {
        let a = this.delayedAndroidKey;
        a && (this.clearDelayedAndroidKey(), this.view.inputState.lastKeyCode = a.keyCode, this.view.inputState.lastKeyTime = Date.now(), !this.flush() && a.force && ag(this.dom, a.key, a.keyCode));
      };
      this.flushingAndroidKey = this.view.win.requestAnimationFrame(i);
    }
    (!this.delayedAndroidKey || e == "Enter") && (this.delayedAndroidKey = {
      key: e,
      keyCode: n,
      // Only run the key handler when no changes are detected if
      // this isn't coming right after another change, in which case
      // it is probably part of a weird chain of updates, and should
      // be ignored if it returns the DOM to its previous state.
      force: this.lastChange < Date.now() - 50 || !!(!((r = this.delayedAndroidKey) === null || r === void 0) && r.force)
    });
  }
  clearDelayedAndroidKey() {
    this.win.cancelAnimationFrame(this.flushingAndroidKey), this.delayedAndroidKey = null, this.flushingAndroidKey = -1;
  }
  flushSoon() {
    this.delayedFlush < 0 && (this.delayedFlush = this.view.win.requestAnimationFrame(() => {
      this.delayedFlush = -1, this.flush();
    }));
  }
  forceFlush() {
    this.delayedFlush >= 0 && (this.view.win.cancelAnimationFrame(this.delayedFlush), this.delayedFlush = -1), this.flush();
  }
  pendingRecords() {
    for (let e of this.observer.takeRecords())
      this.queue.push(e);
    return this.queue;
  }
  processRecords() {
    let e = this.pendingRecords();
    e.length && (this.queue = []);
    let n = -1, r = -1, i = !1;
    for (let a of e) {
      let o = this.readMutation(a);
      o && (o.typeOver && (i = !0), n == -1 ? { from: n, to: r } = o : (n = Math.min(o.from, n), r = Math.max(o.to, r)));
    }
    return { from: n, to: r, typeOver: i };
  }
  readChange() {
    let { from: e, to: n, typeOver: r } = this.processRecords(), i = this.selectionChanged && $w(this.dom, this.selectionRange);
    if (e < 0 && !i)
      return null;
    e > -1 && (this.lastChange = Date.now()), this.view.inputState.lastFocusTime = 0, this.selectionChanged = !1;
    let a = new awt(this.view, e, n, r);
    return this.view.docView.domChanged = { newSel: a.newSel ? a.newSel.main : null }, a;
  }
  // Apply pending changes, if any
  flush(e = !0) {
    if (this.delayedFlush >= 0 || this.delayedAndroidKey)
      return !1;
    e && this.readSelectionRange();
    let n = this.readChange();
    if (!n)
      return this.view.requestMeasure(), !1;
    let r = this.view.state, i = Bve(this.view, n);
    return this.view.state == r && (n.domChanged || n.newSel && !n.newSel.main.eq(this.view.state.selection.main)) && this.view.update([]), i;
  }
  readMutation(e) {
    let n = this.view.docView.nearest(e.target);
    if (!n || n.ignoreMutation(e))
      return null;
    if (n.markDirty(e.type == "attributes"), e.type == "attributes" && (n.flags |= 4), e.type == "childList") {
      let r = QK(n, e.previousSibling || e.target.previousSibling, -1), i = QK(n, e.nextSibling || e.target.nextSibling, 1);
      return {
        from: r ? n.posAfter(r) : n.posAtStart,
        to: i ? n.posBefore(i) : n.posAtEnd,
        typeOver: !1
      };
    } else return e.type == "characterData" ? { from: n.posAtStart, to: n.posAtEnd, typeOver: e.target.nodeValue == e.oldValue } : null;
  }
  setWindow(e) {
    e != this.win && (this.removeWindowListeners(this.win), this.win = e, this.addWindowListeners(this.win));
  }
  addWindowListeners(e) {
    e.addEventListener("resize", this.onResize), this.printQuery ? this.printQuery.addEventListener("change", this.onPrint) : e.addEventListener("beforeprint", this.onPrint), e.addEventListener("scroll", this.onScroll), e.document.addEventListener("selectionchange", this.onSelectionChange);
  }
  removeWindowListeners(e) {
    e.removeEventListener("scroll", this.onScroll), e.removeEventListener("resize", this.onResize), this.printQuery ? this.printQuery.removeEventListener("change", this.onPrint) : e.removeEventListener("beforeprint", this.onPrint), e.document.removeEventListener("selectionchange", this.onSelectionChange);
  }
  update(e) {
    this.editContext && (this.editContext.update(e), e.startState.facet(Nc) != e.state.facet(Nc) && (e.view.contentDOM.editContext = e.state.facet(Nc) ? this.editContext.editContext : null));
  }
  destroy() {
    var e, n, r;
    this.stop(), (e = this.intersection) === null || e === void 0 || e.disconnect(), (n = this.gapIntersection) === null || n === void 0 || n.disconnect(), (r = this.resizeScroll) === null || r === void 0 || r.disconnect();
    for (let i of this.scrollTargets)
      i.removeEventListener("scroll", this.onScroll);
    this.removeWindowListeners(this.win), clearTimeout(this.parentCheck), clearTimeout(this.resizeTimeout), this.win.cancelAnimationFrame(this.delayedFlush), this.win.cancelAnimationFrame(this.flushingAndroidKey);
  }
}
function QK(t, e, n) {
  for (; e; ) {
    let r = Qn.get(e);
    if (r && r.parent == t)
      return r;
    let i = e.parentNode;
    e = i != t.dom ? i : n > 0 ? e.nextSibling : e.previousSibling;
  }
  return null;
}
function HK(t, e) {
  let n = e.startContainer, r = e.startOffset, i = e.endContainer, a = e.endOffset, o = t.docView.domAtPos(t.state.selection.main.anchor);
  return vb(o.node, o.offset, i, a) && ([n, r, i, a] = [i, a, n, r]), { anchorNode: n, anchorOffset: r, focusNode: i, focusOffset: a };
}
function dwt(t, e) {
  if (e.getComposedRanges) {
    let i = e.getComposedRanges(t.root)[0];
    if (i)
      return HK(t, i);
  }
  let n = null;
  function r(i) {
    i.preventDefault(), i.stopImmediatePropagation(), n = i.getTargetRanges()[0];
  }
  return t.contentDOM.addEventListener("beforeinput", r, !0), t.dom.ownerDocument.execCommand("indent"), t.contentDOM.removeEventListener("beforeinput", r, !0), n ? HK(t, n) : null;
}
class hwt {
  constructor(e) {
    this.from = 0, this.to = 0, this.pendingContextChange = null, this.resetRange(e.state);
    let n = this.editContext = new window.EditContext({
      text: e.state.doc.sliceString(this.from, this.to),
      selectionStart: this.toContextPos(Math.max(this.from, Math.min(this.to, e.state.selection.main.anchor))),
      selectionEnd: this.toContextPos(e.state.selection.main.head)
    });
    n.addEventListener("textupdate", (r) => {
      let { anchor: i } = e.state.selection.main, a = {
        from: this.toEditorPos(r.updateRangeStart),
        to: this.toEditorPos(r.updateRangeEnd),
        insert: Sn.of(r.text.split(`
`))
      };
      a.from == this.from && i < this.from ? a.from = i : a.to == this.to && i > this.to && (a.to = i), !(a.from == a.to && !a.insert.length) && (this.pendingContextChange = a, zve(e, a, De.single(this.toEditorPos(r.selectionStart), this.toEditorPos(r.selectionEnd))), this.pendingContextChange && this.revertPending(e.state));
    }), n.addEventListener("characterboundsupdate", (r) => {
      let i = [], a = null;
      for (let o = this.toEditorPos(r.rangeStart), s = this.toEditorPos(r.rangeEnd); o < s; o++) {
        let l = e.coordsForChar(o);
        a = l && new DOMRect(l.left, l.top, l.right - l.left, l.bottom - l.top) || a || new DOMRect(), i.push(a);
      }
      n.updateCharacterBounds(r.rangeStart, i);
    }), n.addEventListener("textformatupdate", (r) => {
      let i = [];
      for (let a of r.getTextFormats()) {
        let o = a.underlineStyle, s = a.underlineThickness;
        if (o != "None" && s != "None") {
          let l = `text-decoration: underline ${o == "Dashed" ? "dashed " : o == "Squiggle" ? "wavy " : ""}${s == "Thin" ? 1 : 2}px`;
          i.push(pt.mark({ attributes: { style: l } }).range(this.toEditorPos(a.rangeStart), this.toEditorPos(a.rangeEnd)));
        }
      }
      e.dispatch({ effects: mve.of(pt.set(i)) });
    }), n.addEventListener("compositionstart", () => {
      e.inputState.composing < 0 && (e.inputState.composing = 0, e.inputState.compositionFirstChange = !0);
    }), n.addEventListener("compositionend", () => {
      e.inputState.composing = -1, e.inputState.compositionFirstChange = null;
    }), this.measureReq = { read: (r) => {
      this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());
      let i = y_(r.root);
      i && i.rangeCount && this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect());
    } };
  }
  applyEdits(e) {
    let n = 0, r = !1, i = this.pendingContextChange;
    return e.changes.iterChanges((a, o, s, l, u) => {
      if (r)
        return;
      let c = u.length - (o - a);
      if (i && o >= i.to)
        if (i.from == a && i.to == o && i.insert.eq(u)) {
          i = this.pendingContextChange = null, n += c, this.to += c;
          return;
        } else
          i = null, this.revertPending(e.state);
      if (a += n, o += n, o <= this.from)
        this.from += c, this.to += c;
      else if (a < this.to) {
        if (a < this.from || o > this.to || this.to - this.from + u.length > 3e4) {
          r = !0;
          return;
        }
        this.editContext.updateText(this.toContextPos(a), this.toContextPos(o), u.toString()), this.to += c;
      }
      n += c;
    }), i && !r && this.revertPending(e.state), !r;
  }
  update(e) {
    !this.applyEdits(e) || !this.rangeIsValid(e.state) ? (this.pendingContextChange = null, this.resetRange(e.state), this.editContext.updateText(0, this.editContext.text.length, e.state.doc.sliceString(this.from, this.to)), this.setSelection(e.state)) : (e.docChanged || e.selectionSet) && this.setSelection(e.state), (e.geometryChanged || e.docChanged || e.selectionSet) && e.view.requestMeasure(this.measureReq);
  }
  resetRange(e) {
    let { head: n } = e.selection.main;
    this.from = Math.max(
      0,
      n - 1e4
      /* CxVp.Margin */
    ), this.to = Math.min(
      e.doc.length,
      n + 1e4
      /* CxVp.Margin */
    );
  }
  revertPending(e) {
    let n = this.pendingContextChange;
    this.pendingContextChange = null, this.editContext.updateText(this.toContextPos(n.from), this.toContextPos(n.to + n.insert.length), e.doc.sliceString(n.from, n.to));
  }
  setSelection(e) {
    let { main: n } = e.selection, r = this.toContextPos(Math.max(this.from, Math.min(this.to, n.anchor))), i = this.toContextPos(n.head);
    (this.editContext.selectionStart != r || this.editContext.selectionEnd != i) && this.editContext.updateSelection(r, i);
  }
  rangeIsValid(e) {
    let { head: n } = e.selection.main;
    return !(this.from > 0 && n - this.from < 500 || this.to < e.doc.length && this.to - n < 500 || this.to - this.from > 1e4 * 3);
  }
  toEditorPos(e) {
    return e + this.from;
  }
  toContextPos(e) {
    return e - this.from;
  }
}
class rt {
  /**
  The current editor state.
  */
  get state() {
    return this.viewState.state;
  }
  /**
  To be able to display large documents without consuming too much
  memory or overloading the browser, CodeMirror only draws the
  code that is visible (plus a margin around it) to the DOM. This
  property tells you the extent of the current drawn viewport, in
  document positions.
  */
  get viewport() {
    return this.viewState.viewport;
  }
  /**
  When there are, for example, large collapsed ranges in the
  viewport, its size can be a lot bigger than the actual visible
  content. Thus, if you are doing something like styling the
  content in the viewport, it is preferable to only do so for
  these ranges, which are the subset of the viewport that is
  actually drawn.
  */
  get visibleRanges() {
    return this.viewState.visibleRanges;
  }
  /**
  Returns false when the editor is entirely scrolled out of view
  or otherwise hidden.
  */
  get inView() {
    return this.viewState.inView;
  }
  /**
  Indicates whether the user is currently composing text via
  [IME](https://en.wikipedia.org/wiki/Input_method), and at least
  one change has been made in the current composition.
  */
  get composing() {
    return this.inputState.composing > 0;
  }
  /**
  Indicates whether the user is currently in composing state. Note
  that on some platforms, like Android, this will be the case a
  lot, since just putting the cursor on a word starts a
  composition there.
  */
  get compositionStarted() {
    return this.inputState.composing >= 0;
  }
  /**
  The document or shadow root that the view lives in.
  */
  get root() {
    return this._root;
  }
  /**
  @internal
  */
  get win() {
    return this.dom.ownerDocument.defaultView || window;
  }
  /**
  Construct a new view. You'll want to either provide a `parent`
  option, or put `view.dom` into your document after creating a
  view, so that the user can see the editor.
  */
  constructor(e = {}) {
    this.plugins = [], this.pluginMap = /* @__PURE__ */ new Map(), this.editorAttrs = {}, this.contentAttrs = {}, this.bidiCache = [], this.destroyed = !1, this.updateState = 2, this.measureScheduled = -1, this.measureRequests = [], this.contentDOM = document.createElement("div"), this.scrollDOM = document.createElement("div"), this.scrollDOM.tabIndex = -1, this.scrollDOM.className = "cm-scroller", this.scrollDOM.appendChild(this.contentDOM), this.announceDOM = document.createElement("div"), this.announceDOM.className = "cm-announced", this.announceDOM.setAttribute("aria-live", "polite"), this.dom = document.createElement("div"), this.dom.appendChild(this.announceDOM), this.dom.appendChild(this.scrollDOM), e.parent && e.parent.appendChild(this.dom);
    let { dispatch: n } = e;
    this.dispatchTransactions = e.dispatchTransactions || n && ((r) => r.forEach((i) => n(i, this))) || ((r) => this.update(r)), this.dispatch = this.dispatch.bind(this), this._root = e.root || YSt(e.parent) || document, this.viewState = new VK(e.state || un.create(e)), e.scrollTo && e.scrollTo.is(ux) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(Ty).map((r) => new nD(r));
    for (let r of this.plugins)
      r.update(this);
    this.observer = new fwt(this), this.inputState = new $xt(this), this.inputState.ensureHandlers(this.plugins), this.docView = new SK(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure();
  }
  dispatch(...e) {
    let n = e.length == 1 && e[0] instanceof zr ? e : e.length == 1 && Array.isArray(e[0]) ? e[0] : [this.state.update(...e)];
    this.dispatchTransactions(n, this);
  }
  /**
  Update the view for the given array of transactions. This will
  update the visible document and selection to match the state
  produced by the transactions, and notify view plugins of the
  change. You should usually call
  [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead, which uses this
  as a primitive.
  */
  update(e) {
    if (this.updateState != 0)
      throw new Error("Calls to EditorView.update are not allowed while an update is in progress");
    let n = !1, r = !1, i, a = this.state;
    for (let d of e) {
      if (d.startState != a)
        throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");
      a = d.state;
    }
    if (this.destroyed) {
      this.viewState.state = a;
      return;
    }
    let o = this.hasFocus, s = 0, l = null;
    e.some((d) => d.annotation(Mve)) ? (this.inputState.notifiedFocused = o, s = 1) : o != this.inputState.notifiedFocused && (this.inputState.notifiedFocused = o, l = Ive(a, o), l || (s = 1));
    let u = this.observer.delayedAndroidKey, c = null;
    if (u ? (this.observer.clearDelayedAndroidKey(), c = this.observer.readChange(), (c && !this.state.doc.eq(a.doc) || !this.state.selection.eq(a.selection)) && (c = null)) : this.observer.clear(), a.facet(un.phrases) != this.state.facet(un.phrases))
      return this.setState(a);
    i = ET.create(this, a, e), i.flags |= s;
    let f = this.viewState.scrollTarget;
    try {
      this.updateState = 2;
      for (let d of e) {
        if (f && (f = f.map(d.changes)), d.scrollIntoView) {
          let { main: h } = d.state.selection;
          f = new og(h.empty ? h : De.cursor(h.head, h.head > h.anchor ? -1 : 1));
        }
        for (let h of d.effects)
          h.is(ux) && (f = h.value.clip(this.state));
      }
      this.viewState.update(i, f), this.bidiCache = MT.update(this.bidiCache, i.changes), i.empty || (this.updatePlugins(i), this.inputState.update(i)), n = this.docView.update(i), this.state.facet(Py) != this.styleModules && this.mountStyles(), r = this.updateAttrs(), this.showAnnouncements(e), this.docView.updateSelection(n, e.some((d) => d.isUserEvent("select.pointer")));
    } finally {
      this.updateState = 0;
    }
    if (i.startState.facet(vx) != i.state.facet(vx) && (this.viewState.mustMeasureContent = !0), (n || r || f || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) && this.requestMeasure(), n && this.docViewUpdate(), !i.empty)
      for (let d of this.state.facet(O4))
        try {
          d(i);
        } catch (h) {
          Ia(this.state, h, "update listener");
        }
    (l || c) && Promise.resolve().then(() => {
      l && this.state == l.startState && this.dispatch(l), c && !Bve(this, c) && u.force && ag(this.contentDOM, u.key, u.keyCode);
    });
  }
  /**
  Reset the view to the given state. (This will cause the entire
  document to be redrawn and all view plugins to be reinitialized,
  so you should probably only use it when the new state isn't
  derived from the old state. Otherwise, use
  [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead.)
  */
  setState(e) {
    if (this.updateState != 0)
      throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");
    if (this.destroyed) {
      this.viewState.state = e;
      return;
    }
    this.updateState = 2;
    let n = this.hasFocus;
    try {
      for (let r of this.plugins)
        r.destroy(this);
      this.viewState = new VK(e), this.plugins = e.facet(Ty).map((r) => new nD(r)), this.pluginMap.clear();
      for (let r of this.plugins)
        r.update(this);
      this.docView.destroy(), this.docView = new SK(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = [];
    } finally {
      this.updateState = 0;
    }
    n && this.focus(), this.requestMeasure();
  }
  updatePlugins(e) {
    let n = e.startState.facet(Ty), r = e.state.facet(Ty);
    if (n != r) {
      let i = [];
      for (let a of r) {
        let o = n.indexOf(a);
        if (o < 0)
          i.push(new nD(a));
        else {
          let s = this.plugins[o];
          s.mustUpdate = e, i.push(s);
        }
      }
      for (let a of this.plugins)
        a.mustUpdate != e && a.destroy(this);
      this.plugins = i, this.pluginMap.clear();
    } else
      for (let i of this.plugins)
        i.mustUpdate = e;
    for (let i = 0; i < this.plugins.length; i++)
      this.plugins[i].update(this);
    n != r && this.inputState.ensureHandlers(this.plugins);
  }
  docViewUpdate() {
    for (let e of this.plugins) {
      let n = e.value;
      if (n && n.docViewUpdate)
        try {
          n.docViewUpdate(this);
        } catch (r) {
          Ia(this.state, r, "doc view update listener");
        }
    }
  }
  /**
  @internal
  */
  measure(e = !0) {
    if (this.destroyed)
      return;
    if (this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.observer.delayedAndroidKey) {
      this.measureScheduled = -1, this.requestMeasure();
      return;
    }
    this.measureScheduled = 0, e && this.observer.forceFlush();
    let n = null, r = this.scrollDOM, i = r.scrollTop * this.scaleY, { scrollAnchorPos: a, scrollAnchorHeight: o } = this.viewState;
    Math.abs(i - this.viewState.scrollTop) > 1 && (o = -1), this.viewState.scrollAnchorHeight = -1;
    try {
      for (let s = 0; ; s++) {
        if (o < 0)
          if (Gpe(r))
            a = -1, o = this.viewState.heightMap.height;
          else {
            let h = this.viewState.scrollAnchorAt(i);
            a = h.from, o = h.top;
          }
        this.updateState = 1;
        let l = this.viewState.measure(this);
        if (!l && !this.measureRequests.length && this.viewState.scrollTarget == null)
          break;
        if (s > 5) {
          console.warn(this.measureRequests.length ? "Measure loop restarted more than 5 times" : "Viewport failed to stabilize");
          break;
        }
        let u = [];
        l & 4 || ([this.measureRequests, u] = [u, this.measureRequests]);
        let c = u.map((h) => {
          try {
            return h.read(this);
          } catch (p) {
            return Ia(this.state, p), GK;
          }
        }), f = ET.create(this, this.state, []), d = !1;
        f.flags |= l, n ? n.flags |= l : n = f, this.updateState = 2, f.empty || (this.updatePlugins(f), this.inputState.update(f), this.updateAttrs(), d = this.docView.update(f), d && this.docViewUpdate());
        for (let h = 0; h < u.length; h++)
          if (c[h] != GK)
            try {
              let p = u[h];
              p.write && p.write(c[h], this);
            } catch (p) {
              Ia(this.state, p);
            }
        if (d && this.docView.updateSelection(!0), !f.viewportChanged && this.measureRequests.length == 0) {
          if (this.viewState.editorHeight)
            if (this.viewState.scrollTarget) {
              this.docView.scrollIntoView(this.viewState.scrollTarget), this.viewState.scrollTarget = null, o = -1;
              continue;
            } else {
              let p = (a < 0 ? this.viewState.heightMap.height : this.viewState.lineBlockAt(a).top) - o;
              if (p > 1 || p < -1) {
                i = i + p, r.scrollTop = i / this.scaleY, o = -1;
                continue;
              }
            }
          break;
        }
      }
    } finally {
      this.updateState = 0, this.measureScheduled = -1;
    }
    if (n && !n.empty)
      for (let s of this.state.facet(O4))
        s(n);
  }
  /**
  Get the CSS classes for the currently active editor themes.
  */
  get themeClasses() {
    return T4 + " " + (this.state.facet(C4) ? Lve : kve) + " " + this.state.facet(vx);
  }
  updateAttrs() {
    let e = jK(this, yve, {
      class: "cm-editor" + (this.hasFocus ? " cm-focused " : " ") + this.themeClasses
    }), n = {
      spellcheck: "false",
      autocorrect: "off",
      autocapitalize: "off",
      translate: "no",
      contenteditable: this.state.facet(Nc) ? "true" : "false",
      class: "cm-content",
      style: `${lt.tabSize}: ${this.state.tabSize}`,
      role: "textbox",
      "aria-multiline": "true"
    };
    this.state.readOnly && (n["aria-readonly"] = "true"), jK(this, iB, n);
    let r = this.observer.ignore(() => {
      let i = g4(this.contentDOM, this.contentAttrs, n), a = g4(this.dom, this.editorAttrs, e);
      return i || a;
    });
    return this.editorAttrs = e, this.contentAttrs = n, r;
  }
  showAnnouncements(e) {
    let n = !0;
    for (let r of e)
      for (let i of r.effects)
        if (i.is(rt.announce)) {
          n && (this.announceDOM.textContent = ""), n = !1;
          let a = this.announceDOM.appendChild(document.createElement("div"));
          a.textContent = i.value;
        }
  }
  mountStyles() {
    this.styleModules = this.state.facet(Py);
    let e = this.state.facet(rt.cspNonce);
    Cf.mount(this.root, this.styleModules.concat(nwt).reverse(), e ? { nonce: e } : void 0);
  }
  readMeasured() {
    if (this.updateState == 2)
      throw new Error("Reading the editor layout isn't allowed during an update");
    this.updateState == 0 && this.measureScheduled > -1 && this.measure(!1);
  }
  /**
  Schedule a layout measurement, optionally providing callbacks to
  do custom DOM measuring followed by a DOM write phase. Using
  this is preferable reading DOM layout directly from, for
  example, an event handler, because it'll make sure measuring and
  drawing done by other components is synchronized, avoiding
  unnecessary DOM layout computations.
  */
  requestMeasure(e) {
    if (this.measureScheduled < 0 && (this.measureScheduled = this.win.requestAnimationFrame(() => this.measure())), e) {
      if (this.measureRequests.indexOf(e) > -1)
        return;
      if (e.key != null) {
        for (let n = 0; n < this.measureRequests.length; n++)
          if (this.measureRequests[n].key === e.key) {
            this.measureRequests[n] = e;
            return;
          }
      }
      this.measureRequests.push(e);
    }
  }
  /**
  Get the value of a specific plugin, if present. Note that
  plugins that crash can be dropped from a view, so even when you
  know you registered a given plugin, it is recommended to check
  the return value of this method.
  */
  plugin(e) {
    let n = this.pluginMap.get(e);
    return (n === void 0 || n && n.spec != e) && this.pluginMap.set(e, n = this.plugins.find((r) => r.spec == e) || null), n && n.update(this).value;
  }
  /**
  The top position of the document, in screen coordinates. This
  may be negative when the editor is scrolled down. Points
  directly to the top of the first line, not above the padding.
  */
  get documentTop() {
    return this.contentDOM.getBoundingClientRect().top + this.viewState.paddingTop;
  }
  /**
  Reports the padding above and below the document.
  */
  get documentPadding() {
    return { top: this.viewState.paddingTop, bottom: this.viewState.paddingBottom };
  }
  /**
  If the editor is transformed with CSS, this provides the scale
  along the X axis. Otherwise, it will just be 1. Note that
  transforms other than translation and scaling are not supported.
  */
  get scaleX() {
    return this.viewState.scaleX;
  }
  /**
  Provide the CSS transformed scale along the Y axis.
  */
  get scaleY() {
    return this.viewState.scaleY;
  }
  /**
  Find the text line or block widget at the given vertical
  position (which is interpreted as relative to the [top of the
  document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop)).
  */
  elementAtHeight(e) {
    return this.readMeasured(), this.viewState.elementAtHeight(e);
  }
  /**
  Find the line block (see
  [`lineBlockAt`](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) at the given
  height, again interpreted relative to the [top of the
  document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop).
  */
  lineBlockAtHeight(e) {
    return this.readMeasured(), this.viewState.lineBlockAtHeight(e);
  }
  /**
  Get the extent and vertical position of all [line
  blocks](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) in the viewport. Positions
  are relative to the [top of the
  document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop);
  */
  get viewportLineBlocks() {
    return this.viewState.viewportLines;
  }
  /**
  Find the line block around the given document position. A line
  block is a range delimited on both sides by either a
  non-[hidden](https://codemirror.net/6/docs/ref/#view.Decoration^replace) line breaks, or the
  start/end of the document. It will usually just hold a line of
  text, but may be broken into multiple textblocks by block
  widgets.
  */
  lineBlockAt(e) {
    return this.viewState.lineBlockAt(e);
  }
  /**
  The editor's total content height.
  */
  get contentHeight() {
    return this.viewState.contentHeight;
  }
  /**
  Move a cursor position by [grapheme
  cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak). `forward` determines whether
  the motion is away from the line start, or towards it. In
  bidirectional text, the line is traversed in visual order, using
  the editor's [text direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection).
  When the start position was the last one on the line, the
  returned position will be across the line break. If there is no
  further line, the original position is returned.
  
  By default, this method moves over a single cluster. The
  optional `by` argument can be used to move across more. It will
  be called with the first cluster as argument, and should return
  a predicate that determines, for each subsequent cluster,
  whether it should also be moved over.
  */
  moveByChar(e, n, r) {
    return iD(this, e, $K(this, e, n, r));
  }
  /**
  Move a cursor position across the next group of either
  [letters](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) or non-letter
  non-whitespace characters.
  */
  moveByGroup(e, n) {
    return iD(this, e, $K(this, e, n, (r) => Txt(this, e.head, r)));
  }
  /**
  Get the cursor position visually at the start or end of a line.
  Note that this may differ from the _logical_ position at its
  start or end (which is simply at `line.from`/`line.to`) if text
  at the start or end goes against the line's base text direction.
  */
  visualLineSide(e, n) {
    let r = this.bidiSpans(e), i = this.textDirectionAt(e.from), a = r[n ? r.length - 1 : 0];
    return De.cursor(a.side(n, i) + e.from, a.forward(!n, i) ? 1 : -1);
  }
  /**
  Move to the next line boundary in the given direction. If
  `includeWrap` is true, line wrapping is on, and there is a
  further wrap point on the current line, the wrap point will be
  returned. Otherwise this function will return the start or end
  of the line.
  */
  moveToLineBoundary(e, n, r = !0) {
    return Cxt(this, e, n, r);
  }
  /**
  Move a cursor position vertically. When `distance` isn't given,
  it defaults to moving to the next line (including wrapped
  lines). Otherwise, `distance` should provide a positive distance
  in pixels.
  
  When `start` has a
  [`goalColumn`](https://codemirror.net/6/docs/ref/#state.SelectionRange.goalColumn), the vertical
  motion will use that as a target horizontal position. Otherwise,
  the cursor's own horizontal position is used. The returned
  cursor will have its goal column set to whichever column was
  used.
  */
  moveVertically(e, n, r) {
    return iD(this, e, Pxt(this, e, n, r));
  }
  /**
  Find the DOM parent node and offset (child offset if `node` is
  an element, character offset when it is a text node) at the
  given document position.
  
  Note that for positions that aren't currently in
  `visibleRanges`, the resulting DOM position isn't necessarily
  meaningful (it may just point before or after a placeholder
  element).
  */
  domAtPos(e) {
    return this.docView.domAtPos(e);
  }
  /**
  Find the document position at the given DOM node. Can be useful
  for associating positions with DOM events. Will raise an error
  when `node` isn't part of the editor content.
  */
  posAtDOM(e, n = 0) {
    return this.docView.posFromDOM(e, n);
  }
  posAtCoords(e, n = !0) {
    return this.readMeasured(), wve(this, e, n);
  }
  /**
  Get the screen coordinates at the given document position.
  `side` determines whether the coordinates are based on the
  element before (-1) or after (1) the position (if no element is
  available on the given side, the method will transparently use
  another strategy to get reasonable coordinates).
  */
  coordsAtPos(e, n = 1) {
    this.readMeasured();
    let r = this.docView.coordsAt(e, n);
    if (!r || r.left == r.right)
      return r;
    let i = this.state.doc.lineAt(e), a = this.bidiSpans(i), o = a[qc.find(a, e - i.from, -1, n)];
    return i$(r, o.dir == ir.LTR == n > 0);
  }
  /**
  Return the rectangle around a given character. If `pos` does not
  point in front of a character that is in the viewport and
  rendered (i.e. not replaced, not a line break), this will return
  null. For space characters that are a line wrap point, this will
  return the position before the line break.
  */
  coordsForChar(e) {
    return this.readMeasured(), this.docView.coordsForChar(e);
  }
  /**
  The default width of a character in the editor. May not
  accurately reflect the width of all characters (given variable
  width fonts or styling of invididual ranges).
  */
  get defaultCharacterWidth() {
    return this.viewState.heightOracle.charWidth;
  }
  /**
  The default height of a line in the editor. May not be accurate
  for all lines.
  */
  get defaultLineHeight() {
    return this.viewState.heightOracle.lineHeight;
  }
  /**
  The text direction
  ([`direction`](https://developer.mozilla.org/en-US/docs/Web/CSS/direction)
  CSS property) of the editor's content element.
  */
  get textDirection() {
    return this.viewState.defaultTextDirection;
  }
  /**
  Find the text direction of the block at the given position, as
  assigned by CSS. If
  [`perLineTextDirection`](https://codemirror.net/6/docs/ref/#view.EditorView^perLineTextDirection)
  isn't enabled, or the given position is outside of the viewport,
  this will always return the same as
  [`textDirection`](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection). Note that
  this may trigger a DOM layout.
  */
  textDirectionAt(e) {
    return !this.state.facet(pve) || e < this.viewport.from || e > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e));
  }
  /**
  Whether this editor [wraps lines](https://codemirror.net/6/docs/ref/#view.EditorView.lineWrapping)
  (as determined by the
  [`white-space`](https://developer.mozilla.org/en-US/docs/Web/CSS/white-space)
  CSS property of its content element).
  */
  get lineWrapping() {
    return this.viewState.heightOracle.lineWrapping;
  }
  /**
  Returns the bidirectional text structure of the given line
  (which should be in the current document) as an array of span
  objects. The order of these spans matches the [text
  direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection)—if that is
  left-to-right, the leftmost spans come first, otherwise the
  rightmost spans come first.
  */
  bidiSpans(e) {
    if (e.length > pwt)
      return ove(e.length);
    let n = this.textDirectionAt(e.from), r;
    for (let a of this.bidiCache)
      if (a.from == e.from && a.dir == n && (a.fresh || ave(a.isolates, r = OK(this, e))))
        return a.order;
    r || (r = OK(this, e));
    let i = uxt(e.text, n, r);
    return this.bidiCache.push(new MT(e.from, e.to, n, r, !0, i)), i;
  }
  /**
  Check whether the editor has focus.
  */
  get hasFocus() {
    var e;
    return (this.dom.ownerDocument.hasFocus() || lt.safari && ((e = this.inputState) === null || e === void 0 ? void 0 : e.lastContextMenu) > Date.now() - 3e4) && this.root.activeElement == this.contentDOM;
  }
  /**
  Put focus on the editor.
  */
  focus() {
    this.observer.ignore(() => {
      Qpe(this.contentDOM), this.docView.updateSelection();
    });
  }
  /**
  Update the [root](https://codemirror.net/6/docs/ref/##view.EditorViewConfig.root) in which the editor lives. This is only
  necessary when moving the editor's existing DOM to a new window or shadow root.
  */
  setRoot(e) {
    this._root != e && (this._root = e, this.observer.setWindow((e.nodeType == 9 ? e : e.ownerDocument).defaultView || window), this.mountStyles());
  }
  /**
  Clean up this editor view, removing its element from the
  document, unregistering event handlers, and notifying
  plugins. The view instance can no longer be used after
  calling this.
  */
  destroy() {
    this.root.activeElement == this.contentDOM && this.contentDOM.blur();
    for (let e of this.plugins)
      e.destroy(this);
    this.plugins = [], this.inputState.destroy(), this.docView.destroy(), this.dom.remove(), this.observer.destroy(), this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.destroyed = !0;
  }
  /**
  Returns an effect that can be
  [added](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) to a transaction to
  cause it to scroll the given position or range into view.
  */
  static scrollIntoView(e, n = {}) {
    return ux.of(new og(typeof e == "number" ? De.cursor(e) : e, n.y, n.x, n.yMargin, n.xMargin));
  }
  /**
  Return an effect that resets the editor to its current (at the
  time this method was called) scroll position. Note that this
  only affects the editor's own scrollable element, not parents.
  See also
  [`EditorViewConfig.scrollTo`](https://codemirror.net/6/docs/ref/#view.EditorViewConfig.scrollTo).
  
  The effect should be used with a document identical to the one
  it was created for. Failing to do so is not an error, but may
  not scroll to the expected position. You can
  [map](https://codemirror.net/6/docs/ref/#state.StateEffect.map) the effect to account for changes.
  */
  scrollSnapshot() {
    let { scrollTop: e, scrollLeft: n } = this.scrollDOM, r = this.viewState.scrollAnchorAt(e);
    return ux.of(new og(De.cursor(r.from), "start", "start", r.top - e, n, !0));
  }
  /**
  Enable or disable tab-focus mode, which disables key bindings
  for Tab and Shift-Tab, letting the browser's default
  focus-changing behavior go through instead. This is useful to
  prevent trapping keyboard users in your editor.
  
  Without argument, this toggles the mode. With a boolean, it
  enables (true) or disables it (false). Given a number, it
  temporarily enables the mode until that number of milliseconds
  have passed or another non-Tab key is pressed.
  */
  setTabFocusMode(e) {
    e == null ? this.inputState.tabFocusMode = this.inputState.tabFocusMode < 0 ? 0 : -1 : typeof e == "boolean" ? this.inputState.tabFocusMode = e ? 0 : -1 : this.inputState.tabFocusMode != 0 && (this.inputState.tabFocusMode = Date.now() + e);
  }
  /**
  Returns an extension that can be used to add DOM event handlers.
  The value should be an object mapping event names to handler
  functions. For any given event, such functions are ordered by
  extension precedence, and the first handler to return true will
  be assumed to have handled that event, and no other handlers or
  built-in behavior will be activated for it. These are registered
  on the [content element](https://codemirror.net/6/docs/ref/#view.EditorView.contentDOM), except
  for `scroll` handlers, which will be called any time the
  editor's [scroll element](https://codemirror.net/6/docs/ref/#view.EditorView.scrollDOM) or one of
  its parent nodes is scrolled.
  */
  static domEventHandlers(e) {
    return Ir.define(() => ({}), { eventHandlers: e });
  }
  /**
  Create an extension that registers DOM event observers. Contrary
  to event [handlers](https://codemirror.net/6/docs/ref/#view.EditorView^domEventHandlers),
  observers can't be prevented from running by a higher-precedence
  handler returning true. They also don't prevent other handlers
  and observers from running when they return true, and should not
  call `preventDefault`.
  */
  static domEventObservers(e) {
    return Ir.define(() => ({}), { eventObservers: e });
  }
  /**
  Create a theme extension. The first argument can be a
  [`style-mod`](https://github.com/marijnh/style-mod#documentation)
  style spec providing the styles for the theme. These will be
  prefixed with a generated class for the style.
  
  Because the selectors will be prefixed with a scope class, rule
  that directly match the editor's [wrapper
  element](https://codemirror.net/6/docs/ref/#view.EditorView.dom)—to which the scope class will be
  added—need to be explicitly differentiated by adding an `&` to
  the selector for that element—for example
  `&.cm-focused`.
  
  When `dark` is set to true, the theme will be marked as dark,
  which will cause the `&dark` rules from [base
  themes](https://codemirror.net/6/docs/ref/#view.EditorView^baseTheme) to be used (as opposed to
  `&light` when a light theme is active).
  */
  static theme(e, n) {
    let r = Cf.newName(), i = [vx.of(r), Py.of(P4(`.${r}`, e))];
    return n && n.dark && i.push(C4.of(!0)), i;
  }
  /**
  Create an extension that adds styles to the base theme. Like
  with [`theme`](https://codemirror.net/6/docs/ref/#view.EditorView^theme), use `&` to indicate the
  place of the editor wrapper element when directly targeting
  that. You can also use `&dark` or `&light` instead to only
  target editors with a dark or light theme.
  */
  static baseTheme(e) {
    return Ff.lowest(Py.of(P4("." + T4, e, Nve)));
  }
  /**
  Retrieve an editor view instance from the view's DOM
  representation.
  */
  static findFromDOM(e) {
    var n;
    let r = e.querySelector(".cm-content"), i = r && Qn.get(r) || Qn.get(e);
    return ((n = i == null ? void 0 : i.rootView) === null || n === void 0 ? void 0 : n.view) || null;
  }
}
rt.styleModule = Py;
rt.inputHandler = dve;
rt.scrollHandler = gve;
rt.focusChangeEffect = hve;
rt.perLineTextDirection = pve;
rt.exceptionSink = fve;
rt.updateListener = O4;
rt.editable = Nc;
rt.mouseSelectionStyle = cve;
rt.dragMovesSelection = uve;
rt.clickAddsSelectionRange = lve;
rt.decorations = b_;
rt.outerDecorations = bve;
rt.atomicRanges = aB;
rt.bidiIsolatedRanges = _ve;
rt.scrollMargins = Ove;
rt.darkTheme = C4;
rt.cspNonce = /* @__PURE__ */ ut.define({ combine: (t) => t.length ? t[0] : "" });
rt.contentAttributes = iB;
rt.editorAttributes = yve;
rt.lineWrapping = /* @__PURE__ */ rt.contentAttributes.of({ class: "cm-lineWrapping" });
rt.announce = /* @__PURE__ */ zt.define();
const pwt = 4096, GK = {};
class MT {
  constructor(e, n, r, i, a, o) {
    this.from = e, this.to = n, this.dir = r, this.isolates = i, this.fresh = a, this.order = o;
  }
  static update(e, n) {
    if (n.empty && !e.some((a) => a.fresh))
      return e;
    let r = [], i = e.length ? e[e.length - 1].dir : ir.LTR;
    for (let a = Math.max(0, e.length - 10); a < e.length; a++) {
      let o = e[a];
      o.dir == i && !n.touchesRange(o.from, o.to) && r.push(new MT(n.mapPos(o.from, 1), n.mapPos(o.to, -1), o.dir, o.isolates, !1, o.order));
    }
    return r;
  }
}
function jK(t, e, n) {
  for (let r = t.state.facet(e), i = r.length - 1; i >= 0; i--) {
    let a = r[i], o = typeof a == "function" ? a(t) : a;
    o && v4(o, n);
  }
  return n;
}
const vwt = lt.mac ? "mac" : lt.windows ? "win" : lt.linux ? "linux" : "key";
function gwt(t, e) {
  const n = t.split(/-(?!$)/);
  let r = n[n.length - 1];
  r == "Space" && (r = " ");
  let i, a, o, s;
  for (let l = 0; l < n.length - 1; ++l) {
    const u = n[l];
    if (/^(cmd|meta|m)$/i.test(u))
      s = !0;
    else if (/^a(lt)?$/i.test(u))
      i = !0;
    else if (/^(c|ctrl|control)$/i.test(u))
      a = !0;
    else if (/^s(hift)?$/i.test(u))
      o = !0;
    else if (/^mod$/i.test(u))
      e == "mac" ? s = !0 : a = !0;
    else
      throw new Error("Unrecognized modifier name: " + u);
  }
  return i && (r = "Alt-" + r), a && (r = "Ctrl-" + r), s && (r = "Meta-" + r), o && (r = "Shift-" + r), r;
}
function gx(t, e, n) {
  return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n !== !1 && e.shiftKey && (t = "Shift-" + t), t;
}
const mwt = /* @__PURE__ */ Ff.default(/* @__PURE__ */ rt.domEventHandlers({
  keydown(t, e) {
    return Fve(Vve(e.state), t, e, "editor");
  }
})), M1 = /* @__PURE__ */ ut.define({ enables: mwt }), ZK = /* @__PURE__ */ new WeakMap();
function Vve(t) {
  let e = t.facet(M1), n = ZK.get(e);
  return n || ZK.set(e, n = _wt(e.reduce((r, i) => r.concat(i), []))), n;
}
function ywt(t, e, n) {
  return Fve(Vve(t.state), e, t, n);
}
let Bc = null;
const bwt = 4e3;
function _wt(t, e = vwt) {
  let n = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null), i = (o, s) => {
    let l = r[o];
    if (l == null)
      r[o] = s;
    else if (l != s)
      throw new Error("Key binding " + o + " is used both as a regular binding and as a multi-stroke prefix");
  }, a = (o, s, l, u, c) => {
    var f, d;
    let h = n[o] || (n[o] = /* @__PURE__ */ Object.create(null)), p = s.split(/ (?!$)/).map((m) => gwt(m, e));
    for (let m = 1; m < p.length; m++) {
      let y = p.slice(0, m).join(" ");
      i(y, !0), h[y] || (h[y] = {
        preventDefault: !0,
        stopPropagation: !1,
        run: [(_) => {
          let O = Bc = { view: _, prefix: y, scope: o };
          return setTimeout(() => {
            Bc == O && (Bc = null);
          }, bwt), !0;
        }]
      });
    }
    let v = p.join(" ");
    i(v, !1);
    let g = h[v] || (h[v] = {
      preventDefault: !1,
      stopPropagation: !1,
      run: ((d = (f = h._any) === null || f === void 0 ? void 0 : f.run) === null || d === void 0 ? void 0 : d.slice()) || []
    });
    l && g.run.push(l), u && (g.preventDefault = !0), c && (g.stopPropagation = !0);
  };
  for (let o of t) {
    let s = o.scope ? o.scope.split(" ") : ["editor"];
    if (o.any)
      for (let u of s) {
        let c = n[u] || (n[u] = /* @__PURE__ */ Object.create(null));
        c._any || (c._any = { preventDefault: !1, stopPropagation: !1, run: [] });
        let { any: f } = o;
        for (let d in c)
          c[d].run.push((h) => f(h, $4));
      }
    let l = o[e] || o.key;
    if (l)
      for (let u of s)
        a(u, l, o.run, o.preventDefault, o.stopPropagation), o.shift && a(u, "Shift-" + l, o.shift, o.preventDefault, o.stopPropagation);
  }
  return n;
}
let $4 = null;
function Fve(t, e, n, r) {
  $4 = e;
  let i = HSt(e), a = bi(i, 0), o = jo(a) == i.length && i != " ", s = "", l = !1, u = !1, c = !1;
  Bc && Bc.view == n && Bc.scope == r && (s = Bc.prefix + " ", Tve.indexOf(e.keyCode) < 0 && (u = !0, Bc = null));
  let f = /* @__PURE__ */ new Set(), d = (g) => {
    if (g) {
      for (let m of g.run)
        if (!f.has(m) && (f.add(m), m(n)))
          return g.stopPropagation && (c = !0), !0;
      g.preventDefault && (g.stopPropagation && (c = !0), u = !0);
    }
    return !1;
  }, h = t[r], p, v;
  return h && (d(h[s + gx(i, e, !o)]) ? l = !0 : o && (e.altKey || e.metaKey || e.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
  !(lt.windows && e.ctrlKey && e.altKey) && (p = Tf[e.keyCode]) && p != i ? (d(h[s + gx(p, e, !0)]) || e.shiftKey && (v = m_[e.keyCode]) != i && v != p && d(h[s + gx(v, e, !1)])) && (l = !0) : o && e.shiftKey && d(h[s + gx(i, e, !0)]) && (l = !0), !l && d(h._any) && (l = !0)), u && (l = !0), l && c && e.stopPropagation(), $4 = null, l;
}
class I1 {
  /**
  Create a marker with the given class and dimensions. If `width`
  is null, the DOM element will get no width style.
  */
  constructor(e, n, r, i, a) {
    this.className = e, this.left = n, this.top = r, this.width = i, this.height = a;
  }
  draw() {
    let e = document.createElement("div");
    return e.className = this.className, this.adjust(e), e;
  }
  update(e, n) {
    return n.className != this.className ? !1 : (this.adjust(e), !0);
  }
  adjust(e) {
    e.style.left = this.left + "px", e.style.top = this.top + "px", this.width != null && (e.style.width = this.width + "px"), e.style.height = this.height + "px";
  }
  eq(e) {
    return this.left == e.left && this.top == e.top && this.width == e.width && this.height == e.height && this.className == e.className;
  }
  /**
  Create a set of rectangles for the given selection range,
  assigning them theclass`className`. Will create a single
  rectangle for empty ranges, and a set of selection-style
  rectangles covering the range's content (in a bidi-aware
  way) for non-empty ones.
  */
  static forRange(e, n, r) {
    if (r.empty) {
      let i = e.coordsAtPos(r.head, r.assoc || 1);
      if (!i)
        return [];
      let a = Wve(e);
      return [new I1(n, i.left - a.left, i.top - a.top, null, i.bottom - i.top)];
    } else
      return Owt(e, n, r);
  }
}
function Wve(t) {
  let e = t.scrollDOM.getBoundingClientRect();
  return { left: (t.textDirection == ir.LTR ? e.left : e.right - t.scrollDOM.clientWidth * t.scaleX) - t.scrollDOM.scrollLeft * t.scaleX, top: e.top - t.scrollDOM.scrollTop * t.scaleY };
}
function UK(t, e, n, r) {
  let i = t.coordsAtPos(e, n * 2);
  if (!i)
    return r;
  let a = t.dom.getBoundingClientRect(), o = (i.top + i.bottom) / 2, s = t.posAtCoords({ x: a.left + 1, y: o }), l = t.posAtCoords({ x: a.right - 1, y: o });
  return s == null || l == null ? r : { from: Math.max(r.from, Math.min(s, l)), to: Math.min(r.to, Math.max(s, l)) };
}
function Owt(t, e, n) {
  if (n.to <= t.viewport.from || n.from >= t.viewport.to)
    return [];
  let r = Math.max(n.from, t.viewport.from), i = Math.min(n.to, t.viewport.to), a = t.textDirection == ir.LTR, o = t.contentDOM, s = o.getBoundingClientRect(), l = Wve(t), u = o.querySelector(".cm-line"), c = u && window.getComputedStyle(u), f = s.left + (c ? parseInt(c.paddingLeft) + Math.min(0, parseInt(c.textIndent)) : 0), d = s.right - (c ? parseInt(c.paddingRight) : 0), h = x4(t, r), p = x4(t, i), v = h.type == la.Text ? h : null, g = p.type == la.Text ? p : null;
  if (v && (t.lineWrapping || h.widgetLineBreaks) && (v = UK(t, r, 1, v)), g && (t.lineWrapping || p.widgetLineBreaks) && (g = UK(t, i, -1, g)), v && g && v.from == g.from && v.to == g.to)
    return y(_(n.from, n.to, v));
  {
    let S = v ? _(n.from, null, v) : O(h, !1), x = g ? _(null, n.to, g) : O(p, !0), C = [];
    return (v || h).to < (g || p).from - (v && g ? 1 : 0) || h.widgetLineBreaks > 1 && S.bottom + t.defaultLineHeight / 2 < x.top ? C.push(m(f, S.bottom, d, x.top)) : S.bottom < x.top && t.elementAtHeight((S.bottom + x.top) / 2).type == la.Text && (S.bottom = x.top = (S.bottom + x.top) / 2), y(S).concat(C).concat(y(x));
  }
  function m(S, x, C, P) {
    return new I1(
      e,
      S - l.left,
      x - l.top - 0.01,
      C - S,
      P - x + 0.01
      /* C.Epsilon */
    );
  }
  function y({ top: S, bottom: x, horizontal: C }) {
    let P = [];
    for (let $ = 0; $ < C.length; $ += 2)
      P.push(m(C[$], S, C[$ + 1], x));
    return P;
  }
  function _(S, x, C) {
    let P = 1e9, $ = -1e9, T = [];
    function E(N, I, B, Q, W) {
      let H = t.coordsAtPos(N, N == C.to ? -2 : 2), U = t.coordsAtPos(B, B == C.from ? 2 : -2);
      !H || !U || (P = Math.min(H.top, U.top, P), $ = Math.max(H.bottom, U.bottom, $), W == ir.LTR ? T.push(a && I ? f : H.left, a && Q ? d : U.right) : T.push(!a && Q ? f : U.left, !a && I ? d : H.right));
    }
    let M = S ?? C.from, R = x ?? C.to;
    for (let N of t.visibleRanges)
      if (N.to > M && N.from < R)
        for (let I = Math.max(N.from, M), B = Math.min(N.to, R); ; ) {
          let Q = t.state.doc.lineAt(I);
          for (let W of t.bidiSpans(Q)) {
            let H = W.from + Q.from, U = W.to + Q.from;
            if (H >= B)
              break;
            U > I && E(Math.max(H, I), S == null && H <= M, Math.min(U, B), x == null && U >= R, W.dir);
          }
          if (I = Q.to + 1, I >= B)
            break;
        }
    return T.length == 0 && E(M, S == null, R, x == null, t.textDirection), { top: P, bottom: $, horizontal: T };
  }
  function O(S, x) {
    let C = s.top + (x ? S.top : S.bottom);
    return { top: C, bottom: C, horizontal: [] };
  }
}
function Swt(t, e) {
  return t.constructor == e.constructor && t.eq(e);
}
class xwt {
  constructor(e, n) {
    this.view = e, this.layer = n, this.drawn = [], this.scaleX = 1, this.scaleY = 1, this.measureReq = { read: this.measure.bind(this), write: this.draw.bind(this) }, this.dom = e.scrollDOM.appendChild(document.createElement("div")), this.dom.classList.add("cm-layer"), n.above && this.dom.classList.add("cm-layer-above"), n.class && this.dom.classList.add(n.class), this.scale(), this.dom.setAttribute("aria-hidden", "true"), this.setOrder(e.state), e.requestMeasure(this.measureReq), n.mount && n.mount(this.dom, e);
  }
  update(e) {
    e.startState.facet(Mw) != e.state.facet(Mw) && this.setOrder(e.state), (this.layer.update(e, this.dom) || e.geometryChanged) && (this.scale(), e.view.requestMeasure(this.measureReq));
  }
  docViewUpdate(e) {
    this.layer.updateOnDocViewUpdate !== !1 && e.requestMeasure(this.measureReq);
  }
  setOrder(e) {
    let n = 0, r = e.facet(Mw);
    for (; n < r.length && r[n] != this.layer; )
      n++;
    this.dom.style.zIndex = String((this.layer.above ? 150 : -1) - n);
  }
  measure() {
    return this.layer.markers(this.view);
  }
  scale() {
    let { scaleX: e, scaleY: n } = this.view;
    (e != this.scaleX || n != this.scaleY) && (this.scaleX = e, this.scaleY = n, this.dom.style.transform = `scale(${1 / e}, ${1 / n})`);
  }
  draw(e) {
    if (e.length != this.drawn.length || e.some((n, r) => !Swt(n, this.drawn[r]))) {
      let n = this.dom.firstChild, r = 0;
      for (let i of e)
        i.update && n && i.constructor && this.drawn[r].constructor && i.update(n, this.drawn[r]) ? (n = n.nextSibling, r++) : this.dom.insertBefore(i.draw(), n);
      for (; n; ) {
        let i = n.nextSibling;
        n.remove(), n = i;
      }
      this.drawn = e;
    }
  }
  destroy() {
    this.layer.destroy && this.layer.destroy(this.dom, this.view), this.dom.remove();
  }
}
const Mw = /* @__PURE__ */ ut.define();
function Qve(t) {
  return [
    Ir.define((e) => new xwt(e, t)),
    Mw.of(t)
  ];
}
const Hve = !lt.ios, __ = /* @__PURE__ */ ut.define({
  combine(t) {
    return Kl(t, {
      cursorBlinkRate: 1200,
      drawRangeCursor: !0
    }, {
      cursorBlinkRate: (e, n) => Math.min(e, n),
      drawRangeCursor: (e, n) => e || n
    });
  }
});
function wwt(t = {}) {
  return [
    __.of(t),
    Cwt,
    Twt,
    Pwt,
    vve.of(!0)
  ];
}
function Gve(t) {
  return t.startState.facet(__) != t.state.facet(__);
}
const Cwt = /* @__PURE__ */ Qve({
  above: !0,
  markers(t) {
    let { state: e } = t, n = e.facet(__), r = [];
    for (let i of e.selection.ranges) {
      let a = i == e.selection.main;
      if (i.empty ? !a || Hve : n.drawRangeCursor) {
        let o = a ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", s = i.empty ? i : De.cursor(i.head, i.head > i.anchor ? -1 : 1);
        for (let l of I1.forRange(t, o, s))
          r.push(l);
      }
    }
    return r;
  },
  update(t, e) {
    t.transactions.some((r) => r.selection) && (e.style.animationName = e.style.animationName == "cm-blink" ? "cm-blink2" : "cm-blink");
    let n = Gve(t);
    return n && XK(t.state, e), t.docChanged || t.selectionSet || n;
  },
  mount(t, e) {
    XK(e.state, t);
  },
  class: "cm-cursorLayer"
});
function XK(t, e) {
  e.style.animationDuration = t.facet(__).cursorBlinkRate + "ms";
}
const Twt = /* @__PURE__ */ Qve({
  above: !1,
  markers(t) {
    return t.state.selection.ranges.map((e) => e.empty ? [] : I1.forRange(t, "cm-selectionBackground", e)).reduce((e, n) => e.concat(n));
  },
  update(t, e) {
    return t.docChanged || t.selectionSet || t.viewportChanged || Gve(t);
  },
  class: "cm-selectionLayer"
}), A4 = {
  ".cm-line": {
    "& ::selection, &::selection": { backgroundColor: "transparent !important" }
  },
  ".cm-content": {
    "& :focus": {
      caretColor: "initial !important",
      "&::selection, & ::selection": {
        backgroundColor: "Highlight !important"
      }
    }
  }
};
Hve && (A4[".cm-line"].caretColor = A4[".cm-content"].caretColor = "transparent !important");
const Pwt = /* @__PURE__ */ Ff.highest(/* @__PURE__ */ rt.theme(A4)), jve = /* @__PURE__ */ zt.define({
  map(t, e) {
    return t == null ? null : e.mapPos(t);
  }
}), Ey = /* @__PURE__ */ fi.define({
  create() {
    return null;
  },
  update(t, e) {
    return t != null && (t = e.changes.mapPos(t)), e.effects.reduce((n, r) => r.is(jve) ? r.value : n, t);
  }
}), $wt = /* @__PURE__ */ Ir.fromClass(class {
  constructor(t) {
    this.view = t, this.cursor = null, this.measureReq = { read: this.readPos.bind(this), write: this.drawCursor.bind(this) };
  }
  update(t) {
    var e;
    let n = t.state.field(Ey);
    n == null ? this.cursor != null && ((e = this.cursor) === null || e === void 0 || e.remove(), this.cursor = null) : (this.cursor || (this.cursor = this.view.scrollDOM.appendChild(document.createElement("div")), this.cursor.className = "cm-dropCursor"), (t.startState.field(Ey) != n || t.docChanged || t.geometryChanged) && this.view.requestMeasure(this.measureReq));
  }
  readPos() {
    let { view: t } = this, e = t.state.field(Ey), n = e != null && t.coordsAtPos(e);
    if (!n)
      return null;
    let r = t.scrollDOM.getBoundingClientRect();
    return {
      left: n.left - r.left + t.scrollDOM.scrollLeft * t.scaleX,
      top: n.top - r.top + t.scrollDOM.scrollTop * t.scaleY,
      height: n.bottom - n.top
    };
  }
  drawCursor(t) {
    if (this.cursor) {
      let { scaleX: e, scaleY: n } = this.view;
      t ? (this.cursor.style.left = t.left / e + "px", this.cursor.style.top = t.top / n + "px", this.cursor.style.height = t.height / n + "px") : this.cursor.style.left = "-100000px";
    }
  }
  destroy() {
    this.cursor && this.cursor.remove();
  }
  setDropPos(t) {
    this.view.state.field(Ey) != t && this.view.dispatch({ effects: jve.of(t) });
  }
}, {
  eventObservers: {
    dragover(t) {
      this.setDropPos(this.view.posAtCoords({ x: t.clientX, y: t.clientY }));
    },
    dragleave(t) {
      (t.target == this.view.contentDOM || !this.view.contentDOM.contains(t.relatedTarget)) && this.setDropPos(null);
    },
    dragend() {
      this.setDropPos(null);
    },
    drop() {
      this.setDropPos(null);
    }
  }
});
function Awt() {
  return [Ey, $wt];
}
function YK(t, e, n, r, i) {
  e.lastIndex = 0;
  for (let a = t.iterRange(n, r), o = n, s; !a.next().done; o += a.value.length)
    if (!a.lineBreak)
      for (; s = e.exec(a.value); )
        i(o + s.index, s);
}
function Ewt(t, e) {
  let n = t.visibleRanges;
  if (n.length == 1 && n[0].from == t.viewport.from && n[0].to == t.viewport.to)
    return n;
  let r = [];
  for (let { from: i, to: a } of n)
    i = Math.max(t.state.doc.lineAt(i).from, i - e), a = Math.min(t.state.doc.lineAt(a).to, a + e), r.length && r[r.length - 1].to >= i ? r[r.length - 1].to = a : r.push({ from: i, to: a });
  return r;
}
class Mwt {
  /**
  Create a decorator.
  */
  constructor(e) {
    const { regexp: n, decoration: r, decorate: i, boundary: a, maxLength: o = 1e3 } = e;
    if (!n.global)
      throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");
    if (this.regexp = n, i)
      this.addMatch = (s, l, u, c) => i(c, u, u + s[0].length, s, l);
    else if (typeof r == "function")
      this.addMatch = (s, l, u, c) => {
        let f = r(s, l, u);
        f && c(u, u + s[0].length, f);
      };
    else if (r)
      this.addMatch = (s, l, u, c) => c(u, u + s[0].length, r);
    else
      throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");
    this.boundary = a, this.maxLength = o;
  }
  /**
  Compute the full set of decorations for matches in the given
  view's viewport. You'll want to call this when initializing your
  plugin.
  */
  createDeco(e) {
    let n = new wf(), r = n.add.bind(n);
    for (let { from: i, to: a } of Ewt(e, this.maxLength))
      YK(e.state.doc, this.regexp, i, a, (o, s) => this.addMatch(s, e, o, r));
    return n.finish();
  }
  /**
  Update a set of decorations for a view update. `deco` _must_ be
  the set of decorations produced by _this_ `MatchDecorator` for
  the view state before the update.
  */
  updateDeco(e, n) {
    let r = 1e9, i = -1;
    return e.docChanged && e.changes.iterChanges((a, o, s, l) => {
      l > e.view.viewport.from && s < e.view.viewport.to && (r = Math.min(s, r), i = Math.max(l, i));
    }), e.viewportChanged || i - r > 1e3 ? this.createDeco(e.view) : i > -1 ? this.updateRange(e.view, n.map(e.changes), r, i) : n;
  }
  updateRange(e, n, r, i) {
    for (let a of e.visibleRanges) {
      let o = Math.max(a.from, r), s = Math.min(a.to, i);
      if (s > o) {
        let l = e.state.doc.lineAt(o), u = l.to < s ? e.state.doc.lineAt(s) : l, c = Math.max(a.from, l.from), f = Math.min(a.to, u.to);
        if (this.boundary) {
          for (; o > l.from; o--)
            if (this.boundary.test(l.text[o - 1 - l.from])) {
              c = o;
              break;
            }
          for (; s < u.to; s++)
            if (this.boundary.test(u.text[s - u.from])) {
              f = s;
              break;
            }
        }
        let d = [], h, p = (v, g, m) => d.push(m.range(v, g));
        if (l == u)
          for (this.regexp.lastIndex = c - l.from; (h = this.regexp.exec(l.text)) && h.index < f - l.from; )
            this.addMatch(h, e, h.index + l.from, p);
        else
          YK(e.state.doc, this.regexp, c, f, (v, g) => this.addMatch(g, e, v, p));
        n = n.update({ filterFrom: c, filterTo: f, filter: (v, g) => v < c || g > f, add: d });
      }
    }
    return n;
  }
}
const E4 = /x/.unicode != null ? "gu" : "g", Iwt = /* @__PURE__ */ new RegExp(`[\0-\b
--­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF￹-￼]`, E4), Dwt = {
  0: "null",
  7: "bell",
  8: "backspace",
  10: "newline",
  11: "vertical tab",
  13: "carriage return",
  27: "escape",
  8203: "zero width space",
  8204: "zero width non-joiner",
  8205: "zero width joiner",
  8206: "left-to-right mark",
  8207: "right-to-left mark",
  8232: "line separator",
  8237: "left-to-right override",
  8238: "right-to-left override",
  8294: "left-to-right isolate",
  8295: "right-to-left isolate",
  8297: "pop directional isolate",
  8233: "paragraph separator",
  65279: "zero width no-break space",
  65532: "object replacement"
};
let sD = null;
function Rwt() {
  var t;
  if (sD == null && typeof document < "u" && document.body) {
    let e = document.body.style;
    sD = ((t = e.tabSize) !== null && t !== void 0 ? t : e.MozTabSize) != null;
  }
  return sD || !1;
}
const Iw = /* @__PURE__ */ ut.define({
  combine(t) {
    let e = Kl(t, {
      render: null,
      specialChars: Iwt,
      addSpecialChars: null
    });
    return (e.replaceTabs = !Rwt()) && (e.specialChars = new RegExp("	|" + e.specialChars.source, E4)), e.addSpecialChars && (e.specialChars = new RegExp(e.specialChars.source + "|" + e.addSpecialChars.source, E4)), e;
  }
});
function kwt(t = {}) {
  return [Iw.of(t), Lwt()];
}
let qK = null;
function Lwt() {
  return qK || (qK = Ir.fromClass(class {
    constructor(t) {
      this.view = t, this.decorations = pt.none, this.decorationCache = /* @__PURE__ */ Object.create(null), this.decorator = this.makeDecorator(t.state.facet(Iw)), this.decorations = this.decorator.createDeco(t);
    }
    makeDecorator(t) {
      return new Mwt({
        regexp: t.specialChars,
        decoration: (e, n, r) => {
          let { doc: i } = n.state, a = bi(e[0], 0);
          if (a == 9) {
            let o = i.lineAt(r), s = n.state.tabSize, l = Fm(o.text, s, r - o.from);
            return pt.replace({
              widget: new Vwt((s - l % s) * this.view.defaultCharacterWidth / this.view.scaleX)
            });
          }
          return this.decorationCache[a] || (this.decorationCache[a] = pt.replace({ widget: new zwt(t, a) }));
        },
        boundary: t.replaceTabs ? void 0 : /[^]/
      });
    }
    update(t) {
      let e = t.state.facet(Iw);
      t.startState.facet(Iw) != e ? (this.decorator = this.makeDecorator(e), this.decorations = this.decorator.createDeco(t.view)) : this.decorations = this.decorator.updateDeco(t, this.decorations);
    }
  }, {
    decorations: (t) => t.decorations
  }));
}
const Nwt = "•";
function Bwt(t) {
  return t >= 32 ? Nwt : t == 10 ? "␤" : String.fromCharCode(9216 + t);
}
class zwt extends Jl {
  constructor(e, n) {
    super(), this.options = e, this.code = n;
  }
  eq(e) {
    return e.code == this.code;
  }
  toDOM(e) {
    let n = Bwt(this.code), r = e.state.phrase("Control character") + " " + (Dwt[this.code] || "0x" + this.code.toString(16)), i = this.options.render && this.options.render(this.code, r, n);
    if (i)
      return i;
    let a = document.createElement("span");
    return a.textContent = n, a.title = r, a.setAttribute("aria-label", r), a.className = "cm-specialChar", a;
  }
  ignoreEvent() {
    return !1;
  }
}
class Vwt extends Jl {
  constructor(e) {
    super(), this.width = e;
  }
  eq(e) {
    return e.width == this.width;
  }
  toDOM() {
    let e = document.createElement("span");
    return e.textContent = "	", e.className = "cm-tab", e.style.width = this.width + "px", e;
  }
  ignoreEvent() {
    return !1;
  }
}
function Fwt() {
  return Qwt;
}
const Wwt = /* @__PURE__ */ pt.line({ class: "cm-activeLine" }), Qwt = /* @__PURE__ */ Ir.fromClass(class {
  constructor(t) {
    this.decorations = this.getDeco(t);
  }
  update(t) {
    (t.docChanged || t.selectionSet) && (this.decorations = this.getDeco(t.view));
  }
  getDeco(t) {
    let e = -1, n = [];
    for (let r of t.state.selection.ranges) {
      let i = t.lineBlockAt(r.head);
      i.from > e && (n.push(Wwt.range(i.from)), e = i.from);
    }
    return pt.set(n);
  }
}, {
  decorations: (t) => t.decorations
});
class Hwt extends Jl {
  constructor(e) {
    super(), this.content = e;
  }
  toDOM() {
    let e = document.createElement("span");
    return e.className = "cm-placeholder", e.style.pointerEvents = "none", e.appendChild(typeof this.content == "string" ? document.createTextNode(this.content) : this.content), typeof this.content == "string" ? e.setAttribute("aria-label", "placeholder " + this.content) : e.setAttribute("aria-hidden", "true"), e;
  }
  coordsAt(e) {
    let n = e.firstChild ? Kg(e.firstChild) : [];
    if (!n.length)
      return null;
    let r = window.getComputedStyle(e.parentNode), i = i$(n[0], r.direction != "rtl"), a = parseInt(r.lineHeight);
    return i.bottom - i.top > a * 1.5 ? { left: i.left, right: i.right, top: i.top, bottom: i.top + a } : i;
  }
  ignoreEvent() {
    return !1;
  }
}
function Gwt(t) {
  return Ir.fromClass(class {
    constructor(e) {
      this.view = e, this.placeholder = t ? pt.set([pt.widget({ widget: new Hwt(t), side: 1 }).range(0)]) : pt.none;
    }
    get decorations() {
      return this.view.state.doc.length ? pt.none : this.placeholder;
    }
  }, { decorations: (e) => e.decorations });
}
const M4 = 2e3;
function jwt(t, e, n) {
  let r = Math.min(e.line, n.line), i = Math.max(e.line, n.line), a = [];
  if (e.off > M4 || n.off > M4 || e.col < 0 || n.col < 0) {
    let o = Math.min(e.off, n.off), s = Math.max(e.off, n.off);
    for (let l = r; l <= i; l++) {
      let u = t.doc.line(l);
      u.length <= s && a.push(De.range(u.from + o, u.to + s));
    }
  } else {
    let o = Math.min(e.col, n.col), s = Math.max(e.col, n.col);
    for (let l = r; l <= i; l++) {
      let u = t.doc.line(l), c = l4(u.text, o, t.tabSize, !0);
      if (c < 0)
        a.push(De.cursor(u.to));
      else {
        let f = l4(u.text, s, t.tabSize);
        a.push(De.range(u.from + c, u.from + f));
      }
    }
  }
  return a;
}
function Zwt(t, e) {
  let n = t.coordsAtPos(t.viewport.from);
  return n ? Math.round(Math.abs((n.left - e) / t.defaultCharacterWidth)) : -1;
}
function KK(t, e) {
  let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), r = t.state.doc.lineAt(n), i = n - r.from, a = i > M4 ? -1 : i == r.length ? Zwt(t, e.clientX) : Fm(r.text, t.state.tabSize, n - r.from);
  return { line: r.number, col: a, off: i };
}
function Uwt(t, e) {
  let n = KK(t, e), r = t.state.selection;
  return n ? {
    update(i) {
      if (i.docChanged) {
        let a = i.changes.mapPos(i.startState.doc.line(n.line).from), o = i.state.doc.lineAt(a);
        n = { line: o.number, col: n.col, off: Math.min(n.off, o.length) }, r = r.map(i.changes);
      }
    },
    get(i, a, o) {
      let s = KK(t, i);
      if (!s)
        return r;
      let l = jwt(t.state, n, s);
      return l.length ? o ? De.create(l.concat(r.ranges)) : De.create(l) : r;
    }
  } : null;
}
function Xwt(t) {
  let e = (n) => n.altKey && n.button == 0;
  return rt.mouseSelectionStyle.of((n, r) => e(r) ? Uwt(n, r) : null);
}
const Ywt = {
  Alt: [18, (t) => !!t.altKey],
  Control: [17, (t) => !!t.ctrlKey],
  Shift: [16, (t) => !!t.shiftKey],
  Meta: [91, (t) => !!t.metaKey]
}, qwt = { style: "cursor: crosshair" };
function Kwt(t = {}) {
  let [e, n] = Ywt[t.key || "Alt"], r = Ir.fromClass(class {
    constructor(i) {
      this.view = i, this.isDown = !1;
    }
    set(i) {
      this.isDown != i && (this.isDown = i, this.view.update([]));
    }
  }, {
    eventObservers: {
      keydown(i) {
        this.set(i.keyCode == e || n(i));
      },
      keyup(i) {
        (i.keyCode == e || !n(i)) && this.set(!1);
      },
      mousemove(i) {
        this.set(n(i));
      }
    }
  });
  return [
    r,
    rt.contentAttributes.of((i) => {
      var a;
      return !((a = i.plugin(r)) === null || a === void 0) && a.isDown ? qwt : null;
    })
  ];
}
const ny = "-10000px";
class Zve {
  constructor(e, n, r, i) {
    this.facet = n, this.createTooltipView = r, this.removeTooltipView = i, this.input = e.state.facet(n), this.tooltips = this.input.filter((o) => o);
    let a = null;
    this.tooltipViews = this.tooltips.map((o) => a = r(o, a));
  }
  update(e, n) {
    var r;
    let i = e.state.facet(this.facet), a = i.filter((l) => l);
    if (i === this.input) {
      for (let l of this.tooltipViews)
        l.update && l.update(e);
      return !1;
    }
    let o = [], s = n ? [] : null;
    for (let l = 0; l < a.length; l++) {
      let u = a[l], c = -1;
      if (u) {
        for (let f = 0; f < this.tooltips.length; f++) {
          let d = this.tooltips[f];
          d && d.create == u.create && (c = f);
        }
        if (c < 0)
          o[l] = this.createTooltipView(u, l ? o[l - 1] : null), s && (s[l] = !!u.above);
        else {
          let f = o[l] = this.tooltipViews[c];
          s && (s[l] = n[c]), f.update && f.update(e);
        }
      }
    }
    for (let l of this.tooltipViews)
      o.indexOf(l) < 0 && (this.removeTooltipView(l), (r = l.destroy) === null || r === void 0 || r.call(l));
    return n && (s.forEach((l, u) => n[u] = l), n.length = s.length), this.input = i, this.tooltips = a, this.tooltipViews = o, !0;
  }
}
function Jwt(t) {
  let { win: e } = t;
  return { top: 0, left: 0, bottom: e.innerHeight, right: e.innerWidth };
}
const lD = /* @__PURE__ */ ut.define({
  combine: (t) => {
    var e, n, r;
    return {
      position: lt.ios ? "absolute" : ((e = t.find((i) => i.position)) === null || e === void 0 ? void 0 : e.position) || "fixed",
      parent: ((n = t.find((i) => i.parent)) === null || n === void 0 ? void 0 : n.parent) || null,
      tooltipSpace: ((r = t.find((i) => i.tooltipSpace)) === null || r === void 0 ? void 0 : r.tooltipSpace) || Jwt
    };
  }
}), JK = /* @__PURE__ */ new WeakMap(), lB = /* @__PURE__ */ Ir.fromClass(class {
  constructor(t) {
    this.view = t, this.above = [], this.inView = !0, this.madeAbsolute = !1, this.lastTransaction = 0, this.measureTimeout = -1;
    let e = t.state.facet(lD);
    this.position = e.position, this.parent = e.parent, this.classes = t.themeClasses, this.createContainer(), this.measureReq = { read: this.readMeasure.bind(this), write: this.writeMeasure.bind(this), key: this }, this.resizeObserver = typeof ResizeObserver == "function" ? new ResizeObserver(() => this.measureSoon()) : null, this.manager = new Zve(t, uB, (n, r) => this.createTooltip(n, r), (n) => {
      this.resizeObserver && this.resizeObserver.unobserve(n.dom), n.dom.remove();
    }), this.above = this.manager.tooltips.map((n) => !!n.above), this.intersectionObserver = typeof IntersectionObserver == "function" ? new IntersectionObserver((n) => {
      Date.now() > this.lastTransaction - 50 && n.length > 0 && n[n.length - 1].intersectionRatio < 1 && this.measureSoon();
    }, { threshold: [1] }) : null, this.observeIntersection(), t.win.addEventListener("resize", this.measureSoon = this.measureSoon.bind(this)), this.maybeMeasure();
  }
  createContainer() {
    this.parent ? (this.container = document.createElement("div"), this.container.style.position = "relative", this.container.className = this.view.themeClasses, this.parent.appendChild(this.container)) : this.container = this.view.dom;
  }
  observeIntersection() {
    if (this.intersectionObserver) {
      this.intersectionObserver.disconnect();
      for (let t of this.manager.tooltipViews)
        this.intersectionObserver.observe(t.dom);
    }
  }
  measureSoon() {
    this.measureTimeout < 0 && (this.measureTimeout = setTimeout(() => {
      this.measureTimeout = -1, this.maybeMeasure();
    }, 50));
  }
  update(t) {
    t.transactions.length && (this.lastTransaction = Date.now());
    let e = this.manager.update(t, this.above);
    e && this.observeIntersection();
    let n = e || t.geometryChanged, r = t.state.facet(lD);
    if (r.position != this.position && !this.madeAbsolute) {
      this.position = r.position;
      for (let i of this.manager.tooltipViews)
        i.dom.style.position = this.position;
      n = !0;
    }
    if (r.parent != this.parent) {
      this.parent && this.container.remove(), this.parent = r.parent, this.createContainer();
      for (let i of this.manager.tooltipViews)
        this.container.appendChild(i.dom);
      n = !0;
    } else this.parent && this.view.themeClasses != this.classes && (this.classes = this.container.className = this.view.themeClasses);
    n && this.maybeMeasure();
  }
  createTooltip(t, e) {
    let n = t.create(this.view), r = e ? e.dom : null;
    if (n.dom.classList.add("cm-tooltip"), t.arrow && !n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")) {
      let i = document.createElement("div");
      i.className = "cm-tooltip-arrow", n.dom.appendChild(i);
    }
    return n.dom.style.position = this.position, n.dom.style.top = ny, n.dom.style.left = "0px", this.container.insertBefore(n.dom, r), n.mount && n.mount(this.view), this.resizeObserver && this.resizeObserver.observe(n.dom), n;
  }
  destroy() {
    var t, e, n;
    this.view.win.removeEventListener("resize", this.measureSoon);
    for (let r of this.manager.tooltipViews)
      r.dom.remove(), (t = r.destroy) === null || t === void 0 || t.call(r);
    this.parent && this.container.remove(), (e = this.resizeObserver) === null || e === void 0 || e.disconnect(), (n = this.intersectionObserver) === null || n === void 0 || n.disconnect(), clearTimeout(this.measureTimeout);
  }
  readMeasure() {
    let t = this.view.dom.getBoundingClientRect(), e = 1, n = 1, r = !1;
    if (this.position == "fixed" && this.manager.tooltipViews.length) {
      let { dom: i } = this.manager.tooltipViews[0];
      if (lt.gecko)
        r = i.offsetParent != this.container.ownerDocument.body;
      else if (i.style.top == ny && i.style.left == "0px") {
        let a = i.getBoundingClientRect();
        r = Math.abs(a.top + 1e4) > 1 || Math.abs(a.left) > 1;
      }
    }
    if (r || this.position == "absolute")
      if (this.parent) {
        let i = this.parent.getBoundingClientRect();
        i.width && i.height && (e = i.width / this.parent.offsetWidth, n = i.height / this.parent.offsetHeight);
      } else
        ({ scaleX: e, scaleY: n } = this.view.viewState);
    return {
      editor: t,
      parent: this.parent ? this.container.getBoundingClientRect() : t,
      pos: this.manager.tooltips.map((i, a) => {
        let o = this.manager.tooltipViews[a];
        return o.getCoords ? o.getCoords(i.pos) : this.view.coordsAtPos(i.pos);
      }),
      size: this.manager.tooltipViews.map(({ dom: i }) => i.getBoundingClientRect()),
      space: this.view.state.facet(lD).tooltipSpace(this.view),
      scaleX: e,
      scaleY: n,
      makeAbsolute: r
    };
  }
  writeMeasure(t) {
    var e;
    if (t.makeAbsolute) {
      this.madeAbsolute = !0, this.position = "absolute";
      for (let s of this.manager.tooltipViews)
        s.dom.style.position = "absolute";
    }
    let { editor: n, space: r, scaleX: i, scaleY: a } = t, o = [];
    for (let s = 0; s < this.manager.tooltips.length; s++) {
      let l = this.manager.tooltips[s], u = this.manager.tooltipViews[s], { dom: c } = u, f = t.pos[s], d = t.size[s];
      if (!f || f.bottom <= Math.max(n.top, r.top) || f.top >= Math.min(n.bottom, r.bottom) || f.right < Math.max(n.left, r.left) - 0.1 || f.left > Math.min(n.right, r.right) + 0.1) {
        c.style.top = ny;
        continue;
      }
      let h = l.arrow ? u.dom.querySelector(".cm-tooltip-arrow") : null, p = h ? 7 : 0, v = d.right - d.left, g = (e = JK.get(u)) !== null && e !== void 0 ? e : d.bottom - d.top, m = u.offset || tCt, y = this.view.textDirection == ir.LTR, _ = d.width > r.right - r.left ? y ? r.left : r.right - d.width : y ? Math.min(f.left - (h ? 14 : 0) + m.x, r.right - v) : Math.max(r.left, f.left - v + (h ? 14 : 0) - m.x), O = this.above[s];
      !l.strictSide && (O ? f.top - (d.bottom - d.top) - m.y < r.top : f.bottom + (d.bottom - d.top) + m.y > r.bottom) && O == r.bottom - f.bottom > f.top - r.top && (O = this.above[s] = !O);
      let S = (O ? f.top - r.top : r.bottom - f.bottom) - p;
      if (S < g && u.resize !== !1) {
        if (S < this.view.defaultLineHeight) {
          c.style.top = ny;
          continue;
        }
        JK.set(u, g), c.style.height = (g = S) / a + "px";
      } else c.style.height && (c.style.height = "");
      let x = O ? f.top - g - p - m.y : f.bottom + p + m.y, C = _ + v;
      if (u.overlap !== !0)
        for (let P of o)
          P.left < C && P.right > _ && P.top < x + g && P.bottom > x && (x = O ? P.top - g - 2 - p : P.bottom + p + 2);
      if (this.position == "absolute" ? (c.style.top = (x - t.parent.top) / a + "px", c.style.left = (_ - t.parent.left) / i + "px") : (c.style.top = x / a + "px", c.style.left = _ / i + "px"), h) {
        let P = f.left + (y ? m.x : -m.x) - (_ + 14 - 7);
        h.style.left = P / i + "px";
      }
      u.overlap !== !0 && o.push({ left: _, top: x, right: C, bottom: x + g }), c.classList.toggle("cm-tooltip-above", O), c.classList.toggle("cm-tooltip-below", !O), u.positioned && u.positioned(t.space);
    }
  }
  maybeMeasure() {
    if (this.manager.tooltips.length && (this.view.inView && this.view.requestMeasure(this.measureReq), this.inView != this.view.inView && (this.inView = this.view.inView, !this.inView)))
      for (let t of this.manager.tooltipViews)
        t.dom.style.top = ny;
  }
}, {
  eventObservers: {
    scroll() {
      this.maybeMeasure();
    }
  }
}), eCt = /* @__PURE__ */ rt.baseTheme({
  ".cm-tooltip": {
    zIndex: 100,
    boxSizing: "border-box"
  },
  "&light .cm-tooltip": {
    border: "1px solid #bbb",
    backgroundColor: "#f5f5f5"
  },
  "&light .cm-tooltip-section:not(:first-child)": {
    borderTop: "1px solid #bbb"
  },
  "&dark .cm-tooltip": {
    backgroundColor: "#333338",
    color: "white"
  },
  ".cm-tooltip-arrow": {
    height: "7px",
    width: `${7 * 2}px`,
    position: "absolute",
    zIndex: -1,
    overflow: "hidden",
    "&:before, &:after": {
      content: "''",
      position: "absolute",
      width: 0,
      height: 0,
      borderLeft: "7px solid transparent",
      borderRight: "7px solid transparent"
    },
    ".cm-tooltip-above &": {
      bottom: "-7px",
      "&:before": {
        borderTop: "7px solid #bbb"
      },
      "&:after": {
        borderTop: "7px solid #f5f5f5",
        bottom: "1px"
      }
    },
    ".cm-tooltip-below &": {
      top: "-7px",
      "&:before": {
        borderBottom: "7px solid #bbb"
      },
      "&:after": {
        borderBottom: "7px solid #f5f5f5",
        top: "1px"
      }
    }
  },
  "&dark .cm-tooltip .cm-tooltip-arrow": {
    "&:before": {
      borderTopColor: "#333338",
      borderBottomColor: "#333338"
    },
    "&:after": {
      borderTopColor: "transparent",
      borderBottomColor: "transparent"
    }
  }
}), tCt = { x: 0, y: 0 }, uB = /* @__PURE__ */ ut.define({
  enables: [lB, eCt]
}), IT = /* @__PURE__ */ ut.define({
  combine: (t) => t.reduce((e, n) => e.concat(n), [])
});
class o$ {
  // Needs to be static so that host tooltip instances always match
  static create(e) {
    return new o$(e);
  }
  constructor(e) {
    this.view = e, this.mounted = !1, this.dom = document.createElement("div"), this.dom.classList.add("cm-tooltip-hover"), this.manager = new Zve(e, IT, (n, r) => this.createHostedView(n, r), (n) => n.dom.remove());
  }
  createHostedView(e, n) {
    let r = e.create(this.view);
    return r.dom.classList.add("cm-tooltip-section"), this.dom.insertBefore(r.dom, n ? n.dom.nextSibling : this.dom.firstChild), this.mounted && r.mount && r.mount(this.view), r;
  }
  mount(e) {
    for (let n of this.manager.tooltipViews)
      n.mount && n.mount(e);
    this.mounted = !0;
  }
  positioned(e) {
    for (let n of this.manager.tooltipViews)
      n.positioned && n.positioned(e);
  }
  update(e) {
    this.manager.update(e);
  }
  destroy() {
    var e;
    for (let n of this.manager.tooltipViews)
      (e = n.destroy) === null || e === void 0 || e.call(n);
  }
  passProp(e) {
    let n;
    for (let r of this.manager.tooltipViews) {
      let i = r[e];
      if (i !== void 0) {
        if (n === void 0)
          n = i;
        else if (n !== i)
          return;
      }
    }
    return n;
  }
  get offset() {
    return this.passProp("offset");
  }
  get getCoords() {
    return this.passProp("getCoords");
  }
  get overlap() {
    return this.passProp("overlap");
  }
  get resize() {
    return this.passProp("resize");
  }
}
const nCt = /* @__PURE__ */ uB.compute([IT], (t) => {
  let e = t.facet(IT);
  return e.length === 0 ? null : {
    pos: Math.min(...e.map((n) => n.pos)),
    end: Math.max(...e.map((n) => {
      var r;
      return (r = n.end) !== null && r !== void 0 ? r : n.pos;
    })),
    create: o$.create,
    above: e[0].above,
    arrow: e.some((n) => n.arrow)
  };
});
class rCt {
  constructor(e, n, r, i, a) {
    this.view = e, this.source = n, this.field = r, this.setHover = i, this.hoverTime = a, this.hoverTimeout = -1, this.restartTimeout = -1, this.pending = null, this.lastMove = { x: 0, y: 0, target: e.dom, time: 0 }, this.checkHover = this.checkHover.bind(this), e.dom.addEventListener("mouseleave", this.mouseleave = this.mouseleave.bind(this)), e.dom.addEventListener("mousemove", this.mousemove = this.mousemove.bind(this));
  }
  update() {
    this.pending && (this.pending = null, clearTimeout(this.restartTimeout), this.restartTimeout = setTimeout(() => this.startHover(), 20));
  }
  get active() {
    return this.view.state.field(this.field);
  }
  checkHover() {
    if (this.hoverTimeout = -1, this.active.length)
      return;
    let e = Date.now() - this.lastMove.time;
    e < this.hoverTime ? this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime - e) : this.startHover();
  }
  startHover() {
    clearTimeout(this.restartTimeout);
    let { view: e, lastMove: n } = this, r = e.docView.nearest(n.target);
    if (!r)
      return;
    let i, a = 1;
    if (r instanceof Yc)
      i = r.posAtStart;
    else {
      if (i = e.posAtCoords(n), i == null)
        return;
      let s = e.coordsAtPos(i);
      if (!s || n.y < s.top || n.y > s.bottom || n.x < s.left - e.defaultCharacterWidth || n.x > s.right + e.defaultCharacterWidth)
        return;
      let l = e.bidiSpans(e.state.doc.lineAt(i)).find((c) => c.from <= i && c.to >= i), u = l && l.dir == ir.RTL ? -1 : 1;
      a = n.x < s.left ? -u : u;
    }
    let o = this.source(e, i, a);
    if (o != null && o.then) {
      let s = this.pending = { pos: i };
      o.then((l) => {
        this.pending == s && (this.pending = null, l && !(Array.isArray(l) && !l.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(l) ? l : [l]) }));
      }, (l) => Ia(e.state, l, "hover tooltip"));
    } else o && !(Array.isArray(o) && !o.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(o) ? o : [o]) });
  }
  get tooltip() {
    let e = this.view.plugin(lB), n = e ? e.manager.tooltips.findIndex((r) => r.create == o$.create) : -1;
    return n > -1 ? e.manager.tooltipViews[n] : null;
  }
  mousemove(e) {
    var n, r;
    this.lastMove = { x: e.clientX, y: e.clientY, target: e.target, time: Date.now() }, this.hoverTimeout < 0 && (this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime));
    let { active: i, tooltip: a } = this;
    if (i.length && a && !iCt(a.dom, e) || this.pending) {
      let { pos: o } = i[0] || this.pending, s = (r = (n = i[0]) === null || n === void 0 ? void 0 : n.end) !== null && r !== void 0 ? r : o;
      (o == s ? this.view.posAtCoords(this.lastMove) != o : !aCt(this.view, o, s, e.clientX, e.clientY)) && (this.view.dispatch({ effects: this.setHover.of([]) }), this.pending = null);
    }
  }
  mouseleave(e) {
    clearTimeout(this.hoverTimeout), this.hoverTimeout = -1;
    let { active: n } = this;
    if (n.length) {
      let { tooltip: r } = this;
      r && r.dom.contains(e.relatedTarget) ? this.watchTooltipLeave(r.dom) : this.view.dispatch({ effects: this.setHover.of([]) });
    }
  }
  watchTooltipLeave(e) {
    let n = (r) => {
      e.removeEventListener("mouseleave", n), this.active.length && !this.view.dom.contains(r.relatedTarget) && this.view.dispatch({ effects: this.setHover.of([]) });
    };
    e.addEventListener("mouseleave", n);
  }
  destroy() {
    clearTimeout(this.hoverTimeout), this.view.dom.removeEventListener("mouseleave", this.mouseleave), this.view.dom.removeEventListener("mousemove", this.mousemove);
  }
}
const mx = 4;
function iCt(t, e) {
  let n = t.getBoundingClientRect();
  return e.clientX >= n.left - mx && e.clientX <= n.right + mx && e.clientY >= n.top - mx && e.clientY <= n.bottom + mx;
}
function aCt(t, e, n, r, i, a) {
  let o = t.scrollDOM.getBoundingClientRect(), s = t.documentTop + t.documentPadding.top + t.contentHeight;
  if (o.left > r || o.right < r || o.top > i || Math.min(o.bottom, s) < i)
    return !1;
  let l = t.posAtCoords({ x: r, y: i }, !1);
  return l >= e && l <= n;
}
function oCt(t, e = {}) {
  let n = zt.define(), r = fi.define({
    create() {
      return [];
    },
    update(i, a) {
      if (i.length && (e.hideOnChange && (a.docChanged || a.selection) ? i = [] : e.hideOn && (i = i.filter((o) => !e.hideOn(a, o))), a.docChanged)) {
        let o = [];
        for (let s of i) {
          let l = a.changes.mapPos(s.pos, -1, Oi.TrackDel);
          if (l != null) {
            let u = Object.assign(/* @__PURE__ */ Object.create(null), s);
            u.pos = l, u.end != null && (u.end = a.changes.mapPos(u.end)), o.push(u);
          }
        }
        i = o;
      }
      for (let o of a.effects)
        o.is(n) && (i = o.value), o.is(sCt) && (i = []);
      return i;
    },
    provide: (i) => IT.from(i)
  });
  return [
    r,
    Ir.define((i) => new rCt(
      i,
      t,
      r,
      n,
      e.hoverTime || 300
      /* Hover.Time */
    )),
    nCt
  ];
}
function Uve(t, e) {
  let n = t.plugin(lB);
  if (!n)
    return null;
  let r = n.manager.tooltips.indexOf(e);
  return r < 0 ? null : n.manager.tooltipViews[r];
}
const sCt = /* @__PURE__ */ zt.define(), eJ = /* @__PURE__ */ ut.define({
  combine(t) {
    let e, n;
    for (let r of t)
      e = e || r.topContainer, n = n || r.bottomContainer;
    return { topContainer: e, bottomContainer: n };
  }
});
function O_(t, e) {
  let n = t.plugin(Xve), r = n ? n.specs.indexOf(e) : -1;
  return r > -1 ? n.panels[r] : null;
}
const Xve = /* @__PURE__ */ Ir.fromClass(class {
  constructor(t) {
    this.input = t.state.facet(S_), this.specs = this.input.filter((n) => n), this.panels = this.specs.map((n) => n(t));
    let e = t.state.facet(eJ);
    this.top = new yx(t, !0, e.topContainer), this.bottom = new yx(t, !1, e.bottomContainer), this.top.sync(this.panels.filter((n) => n.top)), this.bottom.sync(this.panels.filter((n) => !n.top));
    for (let n of this.panels)
      n.dom.classList.add("cm-panel"), n.mount && n.mount();
  }
  update(t) {
    let e = t.state.facet(eJ);
    this.top.container != e.topContainer && (this.top.sync([]), this.top = new yx(t.view, !0, e.topContainer)), this.bottom.container != e.bottomContainer && (this.bottom.sync([]), this.bottom = new yx(t.view, !1, e.bottomContainer)), this.top.syncClasses(), this.bottom.syncClasses();
    let n = t.state.facet(S_);
    if (n != this.input) {
      let r = n.filter((l) => l), i = [], a = [], o = [], s = [];
      for (let l of r) {
        let u = this.specs.indexOf(l), c;
        u < 0 ? (c = l(t.view), s.push(c)) : (c = this.panels[u], c.update && c.update(t)), i.push(c), (c.top ? a : o).push(c);
      }
      this.specs = r, this.panels = i, this.top.sync(a), this.bottom.sync(o);
      for (let l of s)
        l.dom.classList.add("cm-panel"), l.mount && l.mount();
    } else
      for (let r of this.panels)
        r.update && r.update(t);
  }
  destroy() {
    this.top.sync([]), this.bottom.sync([]);
  }
}, {
  provide: (t) => rt.scrollMargins.of((e) => {
    let n = e.plugin(t);
    return n && { top: n.top.scrollMargin(), bottom: n.bottom.scrollMargin() };
  })
});
class yx {
  constructor(e, n, r) {
    this.view = e, this.top = n, this.container = r, this.dom = void 0, this.classes = "", this.panels = [], this.syncClasses();
  }
  sync(e) {
    for (let n of this.panels)
      n.destroy && e.indexOf(n) < 0 && n.destroy();
    this.panels = e, this.syncDOM();
  }
  syncDOM() {
    if (this.panels.length == 0) {
      this.dom && (this.dom.remove(), this.dom = void 0);
      return;
    }
    if (!this.dom) {
      this.dom = document.createElement("div"), this.dom.className = this.top ? "cm-panels cm-panels-top" : "cm-panels cm-panels-bottom", this.dom.style[this.top ? "top" : "bottom"] = "0";
      let n = this.container || this.view.dom;
      n.insertBefore(this.dom, this.top ? n.firstChild : null);
    }
    let e = this.dom.firstChild;
    for (let n of this.panels)
      if (n.dom.parentNode == this.dom) {
        for (; e != n.dom; )
          e = tJ(e);
        e = e.nextSibling;
      } else
        this.dom.insertBefore(n.dom, e);
    for (; e; )
      e = tJ(e);
  }
  scrollMargin() {
    return !this.dom || this.container ? 0 : Math.max(0, this.top ? this.dom.getBoundingClientRect().bottom - Math.max(0, this.view.scrollDOM.getBoundingClientRect().top) : Math.min(innerHeight, this.view.scrollDOM.getBoundingClientRect().bottom) - this.dom.getBoundingClientRect().top);
  }
  syncClasses() {
    if (!(!this.container || this.classes == this.view.themeClasses)) {
      for (let e of this.classes.split(" "))
        e && this.container.classList.remove(e);
      for (let e of (this.classes = this.view.themeClasses).split(" "))
        e && this.container.classList.add(e);
    }
  }
}
function tJ(t) {
  let e = t.nextSibling;
  return t.remove(), e;
}
const S_ = /* @__PURE__ */ ut.define({
  enables: Xve
});
class Yu extends Kh {
  /**
  @internal
  */
  compare(e) {
    return this == e || this.constructor == e.constructor && this.eq(e);
  }
  /**
  Compare this marker to another marker of the same type.
  */
  eq(e) {
    return !1;
  }
  /**
  Called if the marker has a `toDOM` method and its representation
  was removed from a gutter.
  */
  destroy(e) {
  }
}
Yu.prototype.elementClass = "";
Yu.prototype.toDOM = void 0;
Yu.prototype.mapMode = Oi.TrackBefore;
Yu.prototype.startSide = Yu.prototype.endSide = -1;
Yu.prototype.point = !0;
const Dw = /* @__PURE__ */ ut.define(), lCt = {
  class: "",
  renderEmptyElements: !1,
  elementStyle: "",
  markers: () => On.empty,
  lineMarker: () => null,
  widgetMarker: () => null,
  lineMarkerChange: null,
  initialSpacer: null,
  updateSpacer: null,
  domEventHandlers: {}
}, mb = /* @__PURE__ */ ut.define();
function uCt(t) {
  return [Yve(), mb.of(Object.assign(Object.assign({}, lCt), t))];
}
const nJ = /* @__PURE__ */ ut.define({
  combine: (t) => t.some((e) => e)
});
function Yve(t) {
  return [
    cCt
  ];
}
const cCt = /* @__PURE__ */ Ir.fromClass(class {
  constructor(t) {
    this.view = t, this.prevViewport = t.viewport, this.dom = document.createElement("div"), this.dom.className = "cm-gutters", this.dom.setAttribute("aria-hidden", "true"), this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px", this.gutters = t.state.facet(mb).map((e) => new iJ(t, e));
    for (let e of this.gutters)
      this.dom.appendChild(e.dom);
    this.fixed = !t.state.facet(nJ), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), t.scrollDOM.insertBefore(this.dom, t.contentDOM);
  }
  update(t) {
    if (this.updateGutters(t)) {
      let e = this.prevViewport, n = t.view.viewport, r = Math.min(e.to, n.to) - Math.max(e.from, n.from);
      this.syncGutters(r < (n.to - n.from) * 0.8);
    }
    t.geometryChanged && (this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px"), this.view.state.facet(nJ) != !this.fixed && (this.fixed = !this.fixed, this.dom.style.position = this.fixed ? "sticky" : ""), this.prevViewport = t.view.viewport;
  }
  syncGutters(t) {
    let e = this.dom.nextSibling;
    t && this.dom.remove();
    let n = On.iter(this.view.state.facet(Dw), this.view.viewport.from), r = [], i = this.gutters.map((a) => new fCt(a, this.view.viewport, -this.view.documentPadding.top));
    for (let a of this.view.viewportLineBlocks)
      if (r.length && (r = []), Array.isArray(a.type)) {
        let o = !0;
        for (let s of a.type)
          if (s.type == la.Text && o) {
            I4(n, r, s.from);
            for (let l of i)
              l.line(this.view, s, r);
            o = !1;
          } else if (s.widget)
            for (let l of i)
              l.widget(this.view, s);
      } else if (a.type == la.Text) {
        I4(n, r, a.from);
        for (let o of i)
          o.line(this.view, a, r);
      } else if (a.widget)
        for (let o of i)
          o.widget(this.view, a);
    for (let a of i)
      a.finish();
    t && this.view.scrollDOM.insertBefore(this.dom, e);
  }
  updateGutters(t) {
    let e = t.startState.facet(mb), n = t.state.facet(mb), r = t.docChanged || t.heightChanged || t.viewportChanged || !On.eq(t.startState.facet(Dw), t.state.facet(Dw), t.view.viewport.from, t.view.viewport.to);
    if (e == n)
      for (let i of this.gutters)
        i.update(t) && (r = !0);
    else {
      r = !0;
      let i = [];
      for (let a of n) {
        let o = e.indexOf(a);
        o < 0 ? i.push(new iJ(this.view, a)) : (this.gutters[o].update(t), i.push(this.gutters[o]));
      }
      for (let a of this.gutters)
        a.dom.remove(), i.indexOf(a) < 0 && a.destroy();
      for (let a of i)
        this.dom.appendChild(a.dom);
      this.gutters = i;
    }
    return r;
  }
  destroy() {
    for (let t of this.gutters)
      t.destroy();
    this.dom.remove();
  }
}, {
  provide: (t) => rt.scrollMargins.of((e) => {
    let n = e.plugin(t);
    return !n || n.gutters.length == 0 || !n.fixed ? null : e.textDirection == ir.LTR ? { left: n.dom.offsetWidth * e.scaleX } : { right: n.dom.offsetWidth * e.scaleX };
  })
});
function rJ(t) {
  return Array.isArray(t) ? t : [t];
}
function I4(t, e, n) {
  for (; t.value && t.from <= n; )
    t.from == n && e.push(t.value), t.next();
}
class fCt {
  constructor(e, n, r) {
    this.gutter = e, this.height = r, this.i = 0, this.cursor = On.iter(e.markers, n.from);
  }
  addElement(e, n, r) {
    let { gutter: i } = this, a = (n.top - this.height) / e.scaleY, o = n.height / e.scaleY;
    if (this.i == i.elements.length) {
      let s = new qve(e, o, a, r);
      i.elements.push(s), i.dom.appendChild(s.dom);
    } else
      i.elements[this.i].update(e, o, a, r);
    this.height = n.bottom, this.i++;
  }
  line(e, n, r) {
    let i = [];
    I4(this.cursor, i, n.from), r.length && (i = i.concat(r));
    let a = this.gutter.config.lineMarker(e, n, i);
    a && i.unshift(a);
    let o = this.gutter;
    i.length == 0 && !o.config.renderEmptyElements || this.addElement(e, n, i);
  }
  widget(e, n) {
    let r = this.gutter.config.widgetMarker(e, n.widget, n);
    r && this.addElement(e, n, [r]);
  }
  finish() {
    let e = this.gutter;
    for (; e.elements.length > this.i; ) {
      let n = e.elements.pop();
      e.dom.removeChild(n.dom), n.destroy();
    }
  }
}
class iJ {
  constructor(e, n) {
    this.view = e, this.config = n, this.elements = [], this.spacer = null, this.dom = document.createElement("div"), this.dom.className = "cm-gutter" + (this.config.class ? " " + this.config.class : "");
    for (let r in n.domEventHandlers)
      this.dom.addEventListener(r, (i) => {
        let a = i.target, o;
        if (a != this.dom && this.dom.contains(a)) {
          for (; a.parentNode != this.dom; )
            a = a.parentNode;
          let l = a.getBoundingClientRect();
          o = (l.top + l.bottom) / 2;
        } else
          o = i.clientY;
        let s = e.lineBlockAtHeight(o - e.documentTop);
        n.domEventHandlers[r](e, s, i) && i.preventDefault();
      });
    this.markers = rJ(n.markers(e)), n.initialSpacer && (this.spacer = new qve(e, 0, 0, [n.initialSpacer(e)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none");
  }
  update(e) {
    let n = this.markers;
    if (this.markers = rJ(this.config.markers(e.view)), this.spacer && this.config.updateSpacer) {
      let i = this.config.updateSpacer(this.spacer.markers[0], e);
      i != this.spacer.markers[0] && this.spacer.update(e.view, 0, 0, [i]);
    }
    let r = e.view.viewport;
    return !On.eq(this.markers, n, r.from, r.to) || (this.config.lineMarkerChange ? this.config.lineMarkerChange(e) : !1);
  }
  destroy() {
    for (let e of this.elements)
      e.destroy();
  }
}
class qve {
  constructor(e, n, r, i) {
    this.height = -1, this.above = 0, this.markers = [], this.dom = document.createElement("div"), this.dom.className = "cm-gutterElement", this.update(e, n, r, i);
  }
  update(e, n, r, i) {
    this.height != n && (this.height = n, this.dom.style.height = n + "px"), this.above != r && (this.dom.style.marginTop = (this.above = r) ? r + "px" : ""), dCt(this.markers, i) || this.setMarkers(e, i);
  }
  setMarkers(e, n) {
    let r = "cm-gutterElement", i = this.dom.firstChild;
    for (let a = 0, o = 0; ; ) {
      let s = o, l = a < n.length ? n[a++] : null, u = !1;
      if (l) {
        let c = l.elementClass;
        c && (r += " " + c);
        for (let f = o; f < this.markers.length; f++)
          if (this.markers[f].compare(l)) {
            s = f, u = !0;
            break;
          }
      } else
        s = this.markers.length;
      for (; o < s; ) {
        let c = this.markers[o++];
        if (c.toDOM) {
          c.destroy(i);
          let f = i.nextSibling;
          i.remove(), i = f;
        }
      }
      if (!l)
        break;
      l.toDOM && (u ? i = i.nextSibling : this.dom.insertBefore(l.toDOM(e), i)), u && o++;
    }
    this.dom.className = r, this.markers = n;
  }
  destroy() {
    this.setMarkers(null, []);
  }
}
function dCt(t, e) {
  if (t.length != e.length)
    return !1;
  for (let n = 0; n < t.length; n++)
    if (!t[n].compare(e[n]))
      return !1;
  return !0;
}
const hCt = /* @__PURE__ */ ut.define(), Lv = /* @__PURE__ */ ut.define({
  combine(t) {
    return Kl(t, { formatNumber: String, domEventHandlers: {} }, {
      domEventHandlers(e, n) {
        let r = Object.assign({}, e);
        for (let i in n) {
          let a = r[i], o = n[i];
          r[i] = a ? (s, l, u) => a(s, l, u) || o(s, l, u) : o;
        }
        return r;
      }
    });
  }
});
class uD extends Yu {
  constructor(e) {
    super(), this.number = e;
  }
  eq(e) {
    return this.number == e.number;
  }
  toDOM() {
    return document.createTextNode(this.number);
  }
}
function cD(t, e) {
  return t.state.facet(Lv).formatNumber(e, t.state);
}
const pCt = /* @__PURE__ */ mb.compute([Lv], (t) => ({
  class: "cm-lineNumbers",
  renderEmptyElements: !1,
  markers(e) {
    return e.state.facet(hCt);
  },
  lineMarker(e, n, r) {
    return r.some((i) => i.toDOM) ? null : new uD(cD(e, e.state.doc.lineAt(n.from).number));
  },
  widgetMarker: () => null,
  lineMarkerChange: (e) => e.startState.facet(Lv) != e.state.facet(Lv),
  initialSpacer(e) {
    return new uD(cD(e, aJ(e.state.doc.lines)));
  },
  updateSpacer(e, n) {
    let r = cD(n.view, aJ(n.view.state.doc.lines));
    return r == e.number ? e : new uD(r);
  },
  domEventHandlers: t.facet(Lv).domEventHandlers
}));
function vCt(t = {}) {
  return [
    Lv.of(t),
    Yve(),
    pCt
  ];
}
function aJ(t) {
  let e = 9;
  for (; e < t; )
    e = e * 10 + 9;
  return e;
}
const gCt = /* @__PURE__ */ new class extends Yu {
  constructor() {
    super(...arguments), this.elementClass = "cm-activeLineGutter";
  }
}(), mCt = /* @__PURE__ */ Dw.compute(["selection"], (t) => {
  let e = [], n = -1;
  for (let r of t.selection.ranges) {
    let i = t.doc.lineAt(r.head).from;
    i > n && (n = i, e.push(gCt.range(i)));
  }
  return On.of(e);
});
function yCt() {
  return mCt;
}
const Kve = 1024;
let bCt = 0;
class fD {
  constructor(e, n) {
    this.from = e, this.to = n;
  }
}
class rn {
  /**
  Create a new node prop type.
  */
  constructor(e = {}) {
    this.id = bCt++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => {
      throw new Error("This node type doesn't define a deserialize function");
    });
  }
  /**
  This is meant to be used with
  [`NodeSet.extend`](#common.NodeSet.extend) or
  [`LRParser.configure`](#lr.ParserConfig.props) to compute
  prop values for each node type in the set. Takes a [match
  object](#common.NodeType^match) or function that returns undefined
  if the node type doesn't get this prop, and the prop's value if
  it does.
  */
  add(e) {
    if (this.perNode)
      throw new RangeError("Can't add per-node props to node types");
    return typeof e != "function" && (e = Va.match(e)), (n) => {
      let r = e(n);
      return r === void 0 ? null : [this, r];
    };
  }
}
rn.closedBy = new rn({ deserialize: (t) => t.split(" ") });
rn.openedBy = new rn({ deserialize: (t) => t.split(" ") });
rn.group = new rn({ deserialize: (t) => t.split(" ") });
rn.isolate = new rn({ deserialize: (t) => {
  if (t && t != "rtl" && t != "ltr" && t != "auto")
    throw new RangeError("Invalid value for isolate: " + t);
  return t || "auto";
} });
rn.contextHash = new rn({ perNode: !0 });
rn.lookAhead = new rn({ perNode: !0 });
rn.mounted = new rn({ perNode: !0 });
class DT {
  constructor(e, n, r) {
    this.tree = e, this.overlay = n, this.parser = r;
  }
  /**
  @internal
  */
  static get(e) {
    return e && e.props && e.props[rn.mounted.id];
  }
}
const _Ct = /* @__PURE__ */ Object.create(null);
class Va {
  /**
  @internal
  */
  constructor(e, n, r, i = 0) {
    this.name = e, this.props = n, this.id = r, this.flags = i;
  }
  /**
  Define a node type.
  */
  static define(e) {
    let n = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : _Ct, r = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), i = new Va(e.name || "", n, e.id, r);
    if (e.props) {
      for (let a of e.props)
        if (Array.isArray(a) || (a = a(i)), a) {
          if (a[0].perNode)
            throw new RangeError("Can't store a per-node prop on a node type");
          n[a[0].id] = a[1];
        }
    }
    return i;
  }
  /**
  Retrieves a node prop for this type. Will return `undefined` if
  the prop isn't present on this node.
  */
  prop(e) {
    return this.props[e.id];
  }
  /**
  True when this is the top node of a grammar.
  */
  get isTop() {
    return (this.flags & 1) > 0;
  }
  /**
  True when this node is produced by a skip rule.
  */
  get isSkipped() {
    return (this.flags & 2) > 0;
  }
  /**
  Indicates whether this is an error node.
  */
  get isError() {
    return (this.flags & 4) > 0;
  }
  /**
  When true, this node type doesn't correspond to a user-declared
  named node, for example because it is used to cache repetition.
  */
  get isAnonymous() {
    return (this.flags & 8) > 0;
  }
  /**
  Returns true when this node's name or one of its
  [groups](#common.NodeProp^group) matches the given string.
  */
  is(e) {
    if (typeof e == "string") {
      if (this.name == e)
        return !0;
      let n = this.prop(rn.group);
      return n ? n.indexOf(e) > -1 : !1;
    }
    return this.id == e;
  }
  /**
  Create a function from node types to arbitrary values by
  specifying an object whose property names are node or
  [group](#common.NodeProp^group) names. Often useful with
  [`NodeProp.add`](#common.NodeProp.add). You can put multiple
  names, separated by spaces, in a single property name to map
  multiple node names to a single value.
  */
  static match(e) {
    let n = /* @__PURE__ */ Object.create(null);
    for (let r in e)
      for (let i of r.split(" "))
        n[i] = e[r];
    return (r) => {
      for (let i = r.prop(rn.group), a = -1; a < (i ? i.length : 0); a++) {
        let o = n[a < 0 ? r.name : i[a]];
        if (o)
          return o;
      }
    };
  }
}
Va.none = new Va(
  "",
  /* @__PURE__ */ Object.create(null),
  0,
  8
  /* NodeFlag.Anonymous */
);
class cB {
  /**
  Create a set with the given types. The `id` property of each
  type should correspond to its position within the array.
  */
  constructor(e) {
    this.types = e;
    for (let n = 0; n < e.length; n++)
      if (e[n].id != n)
        throw new RangeError("Node type ids should correspond to array positions when creating a node set");
  }
  /**
  Create a copy of this set with some node properties added. The
  arguments to this method can be created with
  [`NodeProp.add`](#common.NodeProp.add).
  */
  extend(...e) {
    let n = [];
    for (let r of this.types) {
      let i = null;
      for (let a of e) {
        let o = a(r);
        o && (i || (i = Object.assign({}, r.props)), i[o[0].id] = o[1]);
      }
      n.push(i ? new Va(r.name, i, r.id, r.flags) : r);
    }
    return new cB(n);
  }
}
const bx = /* @__PURE__ */ new WeakMap(), oJ = /* @__PURE__ */ new WeakMap();
var Ur;
(function(t) {
  t[t.ExcludeBuffers = 1] = "ExcludeBuffers", t[t.IncludeAnonymous = 2] = "IncludeAnonymous", t[t.IgnoreMounts = 4] = "IgnoreMounts", t[t.IgnoreOverlays = 8] = "IgnoreOverlays";
})(Ur || (Ur = {}));
class Vr {
  /**
  Construct a new tree. See also [`Tree.build`](#common.Tree^build).
  */
  constructor(e, n, r, i, a) {
    if (this.type = e, this.children = n, this.positions = r, this.length = i, this.props = null, a && a.length) {
      this.props = /* @__PURE__ */ Object.create(null);
      for (let [o, s] of a)
        this.props[typeof o == "number" ? o : o.id] = s;
    }
  }
  /**
  @internal
  */
  toString() {
    let e = DT.get(this);
    if (e && !e.overlay)
      return e.tree.toString();
    let n = "";
    for (let r of this.children) {
      let i = r.toString();
      i && (n && (n += ","), n += i);
    }
    return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (n.length ? "(" + n + ")" : "") : n;
  }
  /**
  Get a [tree cursor](#common.TreeCursor) positioned at the top of
  the tree. Mode can be used to [control](#common.IterMode) which
  nodes the cursor visits.
  */
  cursor(e = 0) {
    return new R4(this.topNode, e);
  }
  /**
  Get a [tree cursor](#common.TreeCursor) pointing into this tree
  at the given position and side (see
  [`moveTo`](#common.TreeCursor.moveTo).
  */
  cursorAt(e, n = 0, r = 0) {
    let i = bx.get(this) || this.topNode, a = new R4(i);
    return a.moveTo(e, n), bx.set(this, a._tree), a;
  }
  /**
  Get a [syntax node](#common.SyntaxNode) object for the top of the
  tree.
  */
  get topNode() {
    return new Ba(this, 0, 0, null);
  }
  /**
  Get the [syntax node](#common.SyntaxNode) at the given position.
  If `side` is -1, this will move into nodes that end at the
  position. If 1, it'll move into nodes that start at the
  position. With 0, it'll only enter nodes that cover the position
  from both sides.
  
  Note that this will not enter
  [overlays](#common.MountedTree.overlay), and you often want
  [`resolveInner`](#common.Tree.resolveInner) instead.
  */
  resolve(e, n = 0) {
    let r = x_(bx.get(this) || this.topNode, e, n, !1);
    return bx.set(this, r), r;
  }
  /**
  Like [`resolve`](#common.Tree.resolve), but will enter
  [overlaid](#common.MountedTree.overlay) nodes, producing a syntax node
  pointing into the innermost overlaid tree at the given position
  (with parent links going through all parent structure, including
  the host trees).
  */
  resolveInner(e, n = 0) {
    let r = x_(oJ.get(this) || this.topNode, e, n, !0);
    return oJ.set(this, r), r;
  }
  /**
  In some situations, it can be useful to iterate through all
  nodes around a position, including those in overlays that don't
  directly cover the position. This method gives you an iterator
  that will produce all nodes, from small to big, around the given
  position.
  */
  resolveStack(e, n = 0) {
    return xCt(this, e, n);
  }
  /**
  Iterate over the tree and its children, calling `enter` for any
  node that touches the `from`/`to` region (if given) before
  running over such a node's children, and `leave` (if given) when
  leaving the node. When `enter` returns `false`, that node will
  not have its children iterated over (or `leave` called).
  */
  iterate(e) {
    let { enter: n, leave: r, from: i = 0, to: a = this.length } = e, o = e.mode || 0, s = (o & Ur.IncludeAnonymous) > 0;
    for (let l = this.cursor(o | Ur.IncludeAnonymous); ; ) {
      let u = !1;
      if (l.from <= a && l.to >= i && (!s && l.type.isAnonymous || n(l) !== !1)) {
        if (l.firstChild())
          continue;
        u = !0;
      }
      for (; u && r && (s || !l.type.isAnonymous) && r(l), !l.nextSibling(); ) {
        if (!l.parent())
          return;
        u = !0;
      }
    }
  }
  /**
  Get the value of the given [node prop](#common.NodeProp) for this
  node. Works with both per-node and per-type props.
  */
  prop(e) {
    return e.perNode ? this.props ? this.props[e.id] : void 0 : this.type.prop(e);
  }
  /**
  Returns the node's [per-node props](#common.NodeProp.perNode) in a
  format that can be passed to the [`Tree`](#common.Tree)
  constructor.
  */
  get propValues() {
    let e = [];
    if (this.props)
      for (let n in this.props)
        e.push([+n, this.props[n]]);
    return e;
  }
  /**
  Balance the direct children of this tree, producing a copy of
  which may have children grouped into subtrees with type
  [`NodeType.none`](#common.NodeType^none).
  */
  balance(e = {}) {
    return this.children.length <= 8 ? this : hB(Va.none, this.children, this.positions, 0, this.children.length, 0, this.length, (n, r, i) => new Vr(this.type, n, r, i, this.propValues), e.makeTree || ((n, r, i) => new Vr(Va.none, n, r, i)));
  }
  /**
  Build a tree from a postfix-ordered buffer of node information,
  or a cursor over such a buffer.
  */
  static build(e) {
    return wCt(e);
  }
}
Vr.empty = new Vr(Va.none, [], [], 0);
class fB {
  constructor(e, n) {
    this.buffer = e, this.index = n;
  }
  get id() {
    return this.buffer[this.index - 4];
  }
  get start() {
    return this.buffer[this.index - 3];
  }
  get end() {
    return this.buffer[this.index - 2];
  }
  get size() {
    return this.buffer[this.index - 1];
  }
  get pos() {
    return this.index;
  }
  next() {
    this.index -= 4;
  }
  fork() {
    return new fB(this.buffer, this.index);
  }
}
class $f {
  /**
  Create a tree buffer.
  */
  constructor(e, n, r) {
    this.buffer = e, this.length = n, this.set = r;
  }
  /**
  @internal
  */
  get type() {
    return Va.none;
  }
  /**
  @internal
  */
  toString() {
    let e = [];
    for (let n = 0; n < this.buffer.length; )
      e.push(this.childString(n)), n = this.buffer[n + 3];
    return e.join(",");
  }
  /**
  @internal
  */
  childString(e) {
    let n = this.buffer[e], r = this.buffer[e + 3], i = this.set.types[n], a = i.name;
    if (/\W/.test(a) && !i.isError && (a = JSON.stringify(a)), e += 4, r == e)
      return a;
    let o = [];
    for (; e < r; )
      o.push(this.childString(e)), e = this.buffer[e + 3];
    return a + "(" + o.join(",") + ")";
  }
  /**
  @internal
  */
  findChild(e, n, r, i, a) {
    let { buffer: o } = this, s = -1;
    for (let l = e; l != n && !(Jve(a, i, o[l + 1], o[l + 2]) && (s = l, r > 0)); l = o[l + 3])
      ;
    return s;
  }
  /**
  @internal
  */
  slice(e, n, r) {
    let i = this.buffer, a = new Uint16Array(n - e), o = 0;
    for (let s = e, l = 0; s < n; ) {
      a[l++] = i[s++], a[l++] = i[s++] - r;
      let u = a[l++] = i[s++] - r;
      a[l++] = i[s++] - e, o = Math.max(o, u);
    }
    return new $f(a, o, this.set);
  }
}
function Jve(t, e, n, r) {
  switch (t) {
    case -2:
      return n < e;
    case -1:
      return r >= e && n < e;
    case 0:
      return n < e && r > e;
    case 1:
      return n <= e && r > e;
    case 2:
      return r > e;
    case 4:
      return !0;
  }
}
function x_(t, e, n, r) {
  for (var i; t.from == t.to || (n < 1 ? t.from >= e : t.from > e) || (n > -1 ? t.to <= e : t.to < e); ) {
    let o = !r && t instanceof Ba && t.index < 0 ? null : t.parent;
    if (!o)
      return t;
    t = o;
  }
  let a = r ? 0 : Ur.IgnoreOverlays;
  if (r)
    for (let o = t, s = o.parent; s; o = s, s = o.parent)
      o instanceof Ba && o.index < 0 && ((i = s.enter(e, n, a)) === null || i === void 0 ? void 0 : i.from) != o.from && (t = s);
  for (; ; ) {
    let o = t.enter(e, n, a);
    if (!o)
      return t;
    t = o;
  }
}
class ege {
  cursor(e = 0) {
    return new R4(this, e);
  }
  getChild(e, n = null, r = null) {
    let i = sJ(this, e, n, r);
    return i.length ? i[0] : null;
  }
  getChildren(e, n = null, r = null) {
    return sJ(this, e, n, r);
  }
  resolve(e, n = 0) {
    return x_(this, e, n, !1);
  }
  resolveInner(e, n = 0) {
    return x_(this, e, n, !0);
  }
  matchContext(e) {
    return D4(this, e);
  }
  enterUnfinishedNodesBefore(e) {
    let n = this.childBefore(e), r = this;
    for (; n; ) {
      let i = n.lastChild;
      if (!i || i.to != n.to)
        break;
      i.type.isError && i.from == i.to ? (r = n, n = i.prevSibling) : n = i;
    }
    return r;
  }
  get node() {
    return this;
  }
  get next() {
    return this.parent;
  }
}
class Ba extends ege {
  constructor(e, n, r, i) {
    super(), this._tree = e, this.from = n, this.index = r, this._parent = i;
  }
  get type() {
    return this._tree.type;
  }
  get name() {
    return this._tree.type.name;
  }
  get to() {
    return this.from + this._tree.length;
  }
  nextChild(e, n, r, i, a = 0) {
    for (let o = this; ; ) {
      for (let { children: s, positions: l } = o._tree, u = n > 0 ? s.length : -1; e != u; e += n) {
        let c = s[e], f = l[e] + o.from;
        if (Jve(i, r, f, f + c.length)) {
          if (c instanceof $f) {
            if (a & Ur.ExcludeBuffers)
              continue;
            let d = c.findChild(0, c.buffer.length, n, r - f, i);
            if (d > -1)
              return new Ml(new OCt(o, c, e, f), null, d);
          } else if (a & Ur.IncludeAnonymous || !c.type.isAnonymous || dB(c)) {
            let d;
            if (!(a & Ur.IgnoreMounts) && (d = DT.get(c)) && !d.overlay)
              return new Ba(d.tree, f, e, o);
            let h = new Ba(c, f, e, o);
            return a & Ur.IncludeAnonymous || !h.type.isAnonymous ? h : h.nextChild(n < 0 ? c.children.length - 1 : 0, n, r, i);
          }
        }
      }
      if (a & Ur.IncludeAnonymous || !o.type.isAnonymous || (o.index >= 0 ? e = o.index + n : e = n < 0 ? -1 : o._parent._tree.children.length, o = o._parent, !o))
        return null;
    }
  }
  get firstChild() {
    return this.nextChild(
      0,
      1,
      0,
      4
      /* Side.DontCare */
    );
  }
  get lastChild() {
    return this.nextChild(
      this._tree.children.length - 1,
      -1,
      0,
      4
      /* Side.DontCare */
    );
  }
  childAfter(e) {
    return this.nextChild(
      0,
      1,
      e,
      2
      /* Side.After */
    );
  }
  childBefore(e) {
    return this.nextChild(
      this._tree.children.length - 1,
      -1,
      e,
      -2
      /* Side.Before */
    );
  }
  enter(e, n, r = 0) {
    let i;
    if (!(r & Ur.IgnoreOverlays) && (i = DT.get(this._tree)) && i.overlay) {
      let a = e - this.from;
      for (let { from: o, to: s } of i.overlay)
        if ((n > 0 ? o <= a : o < a) && (n < 0 ? s >= a : s > a))
          return new Ba(i.tree, i.overlay[0].from + this.from, -1, this);
    }
    return this.nextChild(0, 1, e, n, r);
  }
  nextSignificantParent() {
    let e = this;
    for (; e.type.isAnonymous && e._parent; )
      e = e._parent;
    return e;
  }
  get parent() {
    return this._parent ? this._parent.nextSignificantParent() : null;
  }
  get nextSibling() {
    return this._parent && this.index >= 0 ? this._parent.nextChild(
      this.index + 1,
      1,
      0,
      4
      /* Side.DontCare */
    ) : null;
  }
  get prevSibling() {
    return this._parent && this.index >= 0 ? this._parent.nextChild(
      this.index - 1,
      -1,
      0,
      4
      /* Side.DontCare */
    ) : null;
  }
  get tree() {
    return this._tree;
  }
  toTree() {
    return this._tree;
  }
  /**
  @internal
  */
  toString() {
    return this._tree.toString();
  }
}
function sJ(t, e, n, r) {
  let i = t.cursor(), a = [];
  if (!i.firstChild())
    return a;
  if (n != null) {
    for (let o = !1; !o; )
      if (o = i.type.is(n), !i.nextSibling())
        return a;
  }
  for (; ; ) {
    if (r != null && i.type.is(r))
      return a;
    if (i.type.is(e) && a.push(i.node), !i.nextSibling())
      return r == null ? a : [];
  }
}
function D4(t, e, n = e.length - 1) {
  for (let r = t.parent; n >= 0; r = r.parent) {
    if (!r)
      return !1;
    if (!r.type.isAnonymous) {
      if (e[n] && e[n] != r.name)
        return !1;
      n--;
    }
  }
  return !0;
}
class OCt {
  constructor(e, n, r, i) {
    this.parent = e, this.buffer = n, this.index = r, this.start = i;
  }
}
class Ml extends ege {
  get name() {
    return this.type.name;
  }
  get from() {
    return this.context.start + this.context.buffer.buffer[this.index + 1];
  }
  get to() {
    return this.context.start + this.context.buffer.buffer[this.index + 2];
  }
  constructor(e, n, r) {
    super(), this.context = e, this._parent = n, this.index = r, this.type = e.buffer.set.types[e.buffer.buffer[r]];
  }
  child(e, n, r) {
    let { buffer: i } = this.context, a = i.findChild(this.index + 4, i.buffer[this.index + 3], e, n - this.context.start, r);
    return a < 0 ? null : new Ml(this.context, this, a);
  }
  get firstChild() {
    return this.child(
      1,
      0,
      4
      /* Side.DontCare */
    );
  }
  get lastChild() {
    return this.child(
      -1,
      0,
      4
      /* Side.DontCare */
    );
  }
  childAfter(e) {
    return this.child(
      1,
      e,
      2
      /* Side.After */
    );
  }
  childBefore(e) {
    return this.child(
      -1,
      e,
      -2
      /* Side.Before */
    );
  }
  enter(e, n, r = 0) {
    if (r & Ur.ExcludeBuffers)
      return null;
    let { buffer: i } = this.context, a = i.findChild(this.index + 4, i.buffer[this.index + 3], n > 0 ? 1 : -1, e - this.context.start, n);
    return a < 0 ? null : new Ml(this.context, this, a);
  }
  get parent() {
    return this._parent || this.context.parent.nextSignificantParent();
  }
  externalSibling(e) {
    return this._parent ? null : this.context.parent.nextChild(
      this.context.index + e,
      e,
      0,
      4
      /* Side.DontCare */
    );
  }
  get nextSibling() {
    let { buffer: e } = this.context, n = e.buffer[this.index + 3];
    return n < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new Ml(this.context, this._parent, n) : this.externalSibling(1);
  }
  get prevSibling() {
    let { buffer: e } = this.context, n = this._parent ? this._parent.index + 4 : 0;
    return this.index == n ? this.externalSibling(-1) : new Ml(this.context, this._parent, e.findChild(
      n,
      this.index,
      -1,
      0,
      4
      /* Side.DontCare */
    ));
  }
  get tree() {
    return null;
  }
  toTree() {
    let e = [], n = [], { buffer: r } = this.context, i = this.index + 4, a = r.buffer[this.index + 3];
    if (a > i) {
      let o = r.buffer[this.index + 1];
      e.push(r.slice(i, a, o)), n.push(0);
    }
    return new Vr(this.type, e, n, this.to - this.from);
  }
  /**
  @internal
  */
  toString() {
    return this.context.buffer.childString(this.index);
  }
}
function tge(t) {
  if (!t.length)
    return null;
  let e = 0, n = t[0];
  for (let a = 1; a < t.length; a++) {
    let o = t[a];
    (o.from > n.from || o.to < n.to) && (n = o, e = a);
  }
  let r = n instanceof Ba && n.index < 0 ? null : n.parent, i = t.slice();
  return r ? i[e] = r : i.splice(e, 1), new SCt(i, n);
}
class SCt {
  constructor(e, n) {
    this.heads = e, this.node = n;
  }
  get next() {
    return tge(this.heads);
  }
}
function xCt(t, e, n) {
  let r = t.resolveInner(e, n), i = null;
  for (let a = r instanceof Ba ? r : r.context.parent; a; a = a.parent)
    if (a.index < 0) {
      let o = a.parent;
      (i || (i = [r])).push(o.resolve(e, n)), a = o;
    } else {
      let o = DT.get(a.tree);
      if (o && o.overlay && o.overlay[0].from <= e && o.overlay[o.overlay.length - 1].to >= e) {
        let s = new Ba(o.tree, o.overlay[0].from + a.from, -1, a);
        (i || (i = [r])).push(x_(s, e, n, !1));
      }
    }
  return i ? tge(i) : r;
}
class R4 {
  /**
  Shorthand for `.type.name`.
  */
  get name() {
    return this.type.name;
  }
  /**
  @internal
  */
  constructor(e, n = 0) {
    if (this.mode = n, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, e instanceof Ba)
      this.yieldNode(e);
    else {
      this._tree = e.context.parent, this.buffer = e.context;
      for (let r = e._parent; r; r = r._parent)
        this.stack.unshift(r.index);
      this.bufferNode = e, this.yieldBuf(e.index);
    }
  }
  yieldNode(e) {
    return e ? (this._tree = e, this.type = e.type, this.from = e.from, this.to = e.to, !0) : !1;
  }
  yieldBuf(e, n) {
    this.index = e;
    let { start: r, buffer: i } = this.buffer;
    return this.type = n || i.set.types[i.buffer[e]], this.from = r + i.buffer[e + 1], this.to = r + i.buffer[e + 2], !0;
  }
  /**
  @internal
  */
  yield(e) {
    return e ? e instanceof Ba ? (this.buffer = null, this.yieldNode(e)) : (this.buffer = e.context, this.yieldBuf(e.index, e.type)) : !1;
  }
  /**
  @internal
  */
  toString() {
    return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString();
  }
  /**
  @internal
  */
  enterChild(e, n, r) {
    if (!this.buffer)
      return this.yield(this._tree.nextChild(e < 0 ? this._tree._tree.children.length - 1 : 0, e, n, r, this.mode));
    let { buffer: i } = this.buffer, a = i.findChild(this.index + 4, i.buffer[this.index + 3], e, n - this.buffer.start, r);
    return a < 0 ? !1 : (this.stack.push(this.index), this.yieldBuf(a));
  }
  /**
  Move the cursor to this node's first child. When this returns
  false, the node has no child, and the cursor has not been moved.
  */
  firstChild() {
    return this.enterChild(
      1,
      0,
      4
      /* Side.DontCare */
    );
  }
  /**
  Move the cursor to this node's last child.
  */
  lastChild() {
    return this.enterChild(
      -1,
      0,
      4
      /* Side.DontCare */
    );
  }
  /**
  Move the cursor to the first child that ends after `pos`.
  */
  childAfter(e) {
    return this.enterChild(
      1,
      e,
      2
      /* Side.After */
    );
  }
  /**
  Move to the last child that starts before `pos`.
  */
  childBefore(e) {
    return this.enterChild(
      -1,
      e,
      -2
      /* Side.Before */
    );
  }
  /**
  Move the cursor to the child around `pos`. If side is -1 the
  child may end at that position, when 1 it may start there. This
  will also enter [overlaid](#common.MountedTree.overlay)
  [mounted](#common.NodeProp^mounted) trees unless `overlays` is
  set to false.
  */
  enter(e, n, r = this.mode) {
    return this.buffer ? r & Ur.ExcludeBuffers ? !1 : this.enterChild(1, e, n) : this.yield(this._tree.enter(e, n, r));
  }
  /**
  Move to the node's parent node, if this isn't the top node.
  */
  parent() {
    if (!this.buffer)
      return this.yieldNode(this.mode & Ur.IncludeAnonymous ? this._tree._parent : this._tree.parent);
    if (this.stack.length)
      return this.yieldBuf(this.stack.pop());
    let e = this.mode & Ur.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent();
    return this.buffer = null, this.yieldNode(e);
  }
  /**
  @internal
  */
  sibling(e) {
    if (!this.buffer)
      return this._tree._parent ? this.yield(this._tree.index < 0 ? null : this._tree._parent.nextChild(this._tree.index + e, e, 0, 4, this.mode)) : !1;
    let { buffer: n } = this.buffer, r = this.stack.length - 1;
    if (e < 0) {
      let i = r < 0 ? 0 : this.stack[r] + 4;
      if (this.index != i)
        return this.yieldBuf(n.findChild(
          i,
          this.index,
          -1,
          0,
          4
          /* Side.DontCare */
        ));
    } else {
      let i = n.buffer[this.index + 3];
      if (i < (r < 0 ? n.buffer.length : n.buffer[this.stack[r] + 3]))
        return this.yieldBuf(i);
    }
    return r < 0 ? this.yield(this.buffer.parent.nextChild(this.buffer.index + e, e, 0, 4, this.mode)) : !1;
  }
  /**
  Move to this node's next sibling, if any.
  */
  nextSibling() {
    return this.sibling(1);
  }
  /**
  Move to this node's previous sibling, if any.
  */
  prevSibling() {
    return this.sibling(-1);
  }
  atLastNode(e) {
    let n, r, { buffer: i } = this;
    if (i) {
      if (e > 0) {
        if (this.index < i.buffer.buffer.length)
          return !1;
      } else
        for (let a = 0; a < this.index; a++)
          if (i.buffer.buffer[a + 3] < this.index)
            return !1;
      ({ index: n, parent: r } = i);
    } else
      ({ index: n, _parent: r } = this._tree);
    for (; r; { index: n, _parent: r } = r)
      if (n > -1)
        for (let a = n + e, o = e < 0 ? -1 : r._tree.children.length; a != o; a += e) {
          let s = r._tree.children[a];
          if (this.mode & Ur.IncludeAnonymous || s instanceof $f || !s.type.isAnonymous || dB(s))
            return !1;
        }
    return !0;
  }
  move(e, n) {
    if (n && this.enterChild(
      e,
      0,
      4
      /* Side.DontCare */
    ))
      return !0;
    for (; ; ) {
      if (this.sibling(e))
        return !0;
      if (this.atLastNode(e) || !this.parent())
        return !1;
    }
  }
  /**
  Move to the next node in a
  [pre-order](https://en.wikipedia.org/wiki/Tree_traversal#Pre-order,_NLR)
  traversal, going from a node to its first child or, if the
  current node is empty or `enter` is false, its next sibling or
  the next sibling of the first parent node that has one.
  */
  next(e = !0) {
    return this.move(1, e);
  }
  /**
  Move to the next node in a last-to-first pre-order traveral. A
  node is followed by its last child or, if it has none, its
  previous sibling or the previous sibling of the first parent
  node that has one.
  */
  prev(e = !0) {
    return this.move(-1, e);
  }
  /**
  Move the cursor to the innermost node that covers `pos`. If
  `side` is -1, it will enter nodes that end at `pos`. If it is 1,
  it will enter nodes that start at `pos`.
  */
  moveTo(e, n = 0) {
    for (; (this.from == this.to || (n < 1 ? this.from >= e : this.from > e) || (n > -1 ? this.to <= e : this.to < e)) && this.parent(); )
      ;
    for (; this.enterChild(1, e, n); )
      ;
    return this;
  }
  /**
  Get a [syntax node](#common.SyntaxNode) at the cursor's current
  position.
  */
  get node() {
    if (!this.buffer)
      return this._tree;
    let e = this.bufferNode, n = null, r = 0;
    if (e && e.context == this.buffer)
      e: for (let i = this.index, a = this.stack.length; a >= 0; ) {
        for (let o = e; o; o = o._parent)
          if (o.index == i) {
            if (i == this.index)
              return o;
            n = o, r = a + 1;
            break e;
          }
        i = this.stack[--a];
      }
    for (let i = r; i < this.stack.length; i++)
      n = new Ml(this.buffer, n, this.stack[i]);
    return this.bufferNode = new Ml(this.buffer, n, this.index);
  }
  /**
  Get the [tree](#common.Tree) that represents the current node, if
  any. Will return null when the node is in a [tree
  buffer](#common.TreeBuffer).
  */
  get tree() {
    return this.buffer ? null : this._tree._tree;
  }
  /**
  Iterate over the current node and all its descendants, calling
  `enter` when entering a node and `leave`, if given, when leaving
  one. When `enter` returns `false`, any children of that node are
  skipped, and `leave` isn't called for it.
  */
  iterate(e, n) {
    for (let r = 0; ; ) {
      let i = !1;
      if (this.type.isAnonymous || e(this) !== !1) {
        if (this.firstChild()) {
          r++;
          continue;
        }
        this.type.isAnonymous || (i = !0);
      }
      for (; i && n && n(this), i = this.type.isAnonymous, !this.nextSibling(); ) {
        if (!r)
          return;
        this.parent(), r--, i = !0;
      }
    }
  }
  /**
  Test whether the current node matches a given context—a sequence
  of direct parent node names. Empty strings in the context array
  are treated as wildcards.
  */
  matchContext(e) {
    if (!this.buffer)
      return D4(this.node, e);
    let { buffer: n } = this.buffer, { types: r } = n.set;
    for (let i = e.length - 1, a = this.stack.length - 1; i >= 0; a--) {
      if (a < 0)
        return D4(this.node, e, i);
      let o = r[n.buffer[this.stack[a]]];
      if (!o.isAnonymous) {
        if (e[i] && e[i] != o.name)
          return !1;
        i--;
      }
    }
    return !0;
  }
}
function dB(t) {
  return t.children.some((e) => e instanceof $f || !e.type.isAnonymous || dB(e));
}
function wCt(t) {
  var e;
  let { buffer: n, nodeSet: r, maxBufferLength: i = Kve, reused: a = [], minRepeatType: o = r.types.length } = t, s = Array.isArray(n) ? new fB(n, n.length) : n, l = r.types, u = 0, c = 0;
  function f(S, x, C, P, $, T) {
    let { id: E, start: M, end: R, size: N } = s, I = c;
    for (; N < 0; )
      if (s.next(), N == -1) {
        let U = a[E];
        C.push(U), P.push(M - S);
        return;
      } else if (N == -3) {
        u = E;
        return;
      } else if (N == -4) {
        c = E;
        return;
      } else
        throw new RangeError(`Unrecognized record size: ${N}`);
    let B = l[E], Q, W, H = M - S;
    if (R - M <= i && (W = g(s.pos - x, $))) {
      let U = new Uint16Array(W.size - W.skip), j = s.pos - W.size, Y = U.length;
      for (; s.pos > j; )
        Y = m(W.start, U, Y);
      Q = new $f(U, R - W.start, r), H = W.start - S;
    } else {
      let U = s.pos - N;
      s.next();
      let j = [], Y = [], ne = E >= o ? E : -1, fe = 0, ue = R;
      for (; s.pos > U; )
        ne >= 0 && s.id == ne && s.size >= 0 ? (s.end <= ue - i && (p(j, Y, M, fe, s.end, ue, ne, I), fe = j.length, ue = s.end), s.next()) : T > 2500 ? d(M, U, j, Y) : f(M, U, j, Y, ne, T + 1);
      if (ne >= 0 && fe > 0 && fe < j.length && p(j, Y, M, fe, M, ue, ne, I), j.reverse(), Y.reverse(), ne > -1 && fe > 0) {
        let ye = h(B);
        Q = hB(B, j, Y, 0, j.length, 0, R - M, ye, ye);
      } else
        Q = v(B, j, Y, R - M, I - R);
    }
    C.push(Q), P.push(H);
  }
  function d(S, x, C, P) {
    let $ = [], T = 0, E = -1;
    for (; s.pos > x; ) {
      let { id: M, start: R, end: N, size: I } = s;
      if (I > 4)
        s.next();
      else {
        if (E > -1 && R < E)
          break;
        E < 0 && (E = N - i), $.push(M, R, N), T++, s.next();
      }
    }
    if (T) {
      let M = new Uint16Array(T * 4), R = $[$.length - 2];
      for (let N = $.length - 3, I = 0; N >= 0; N -= 3)
        M[I++] = $[N], M[I++] = $[N + 1] - R, M[I++] = $[N + 2] - R, M[I++] = I;
      C.push(new $f(M, $[2] - R, r)), P.push(R - S);
    }
  }
  function h(S) {
    return (x, C, P) => {
      let $ = 0, T = x.length - 1, E, M;
      if (T >= 0 && (E = x[T]) instanceof Vr) {
        if (!T && E.type == S && E.length == P)
          return E;
        (M = E.prop(rn.lookAhead)) && ($ = C[T] + E.length + M);
      }
      return v(S, x, C, P, $);
    };
  }
  function p(S, x, C, P, $, T, E, M) {
    let R = [], N = [];
    for (; S.length > P; )
      R.push(S.pop()), N.push(x.pop() + C - $);
    S.push(v(r.types[E], R, N, T - $, M - T)), x.push($ - C);
  }
  function v(S, x, C, P, $ = 0, T) {
    if (u) {
      let E = [rn.contextHash, u];
      T = T ? [E].concat(T) : [E];
    }
    if ($ > 25) {
      let E = [rn.lookAhead, $];
      T = T ? [E].concat(T) : [E];
    }
    return new Vr(S, x, C, P, T);
  }
  function g(S, x) {
    let C = s.fork(), P = 0, $ = 0, T = 0, E = C.end - i, M = { size: 0, start: 0, skip: 0 };
    e: for (let R = C.pos - S; C.pos > R; ) {
      let N = C.size;
      if (C.id == x && N >= 0) {
        M.size = P, M.start = $, M.skip = T, T += 4, P += 4, C.next();
        continue;
      }
      let I = C.pos - N;
      if (N < 0 || I < R || C.start < E)
        break;
      let B = C.id >= o ? 4 : 0, Q = C.start;
      for (C.next(); C.pos > I; ) {
        if (C.size < 0)
          if (C.size == -3)
            B += 4;
          else
            break e;
        else C.id >= o && (B += 4);
        C.next();
      }
      $ = Q, P += N, T += B;
    }
    return (x < 0 || P == S) && (M.size = P, M.start = $, M.skip = T), M.size > 4 ? M : void 0;
  }
  function m(S, x, C) {
    let { id: P, start: $, end: T, size: E } = s;
    if (s.next(), E >= 0 && P < o) {
      let M = C;
      if (E > 4) {
        let R = s.pos - (E - 4);
        for (; s.pos > R; )
          C = m(S, x, C);
      }
      x[--C] = M, x[--C] = T - S, x[--C] = $ - S, x[--C] = P;
    } else E == -3 ? u = P : E == -4 && (c = P);
    return C;
  }
  let y = [], _ = [];
  for (; s.pos > 0; )
    f(t.start || 0, t.bufferStart || 0, y, _, -1, 0);
  let O = (e = t.length) !== null && e !== void 0 ? e : y.length ? _[0] + y[0].length : 0;
  return new Vr(l[t.topID], y.reverse(), _.reverse(), O);
}
const lJ = /* @__PURE__ */ new WeakMap();
function Rw(t, e) {
  if (!t.isAnonymous || e instanceof $f || e.type != t)
    return 1;
  let n = lJ.get(e);
  if (n == null) {
    n = 1;
    for (let r of e.children) {
      if (r.type != t || !(r instanceof Vr)) {
        n = 1;
        break;
      }
      n += Rw(t, r);
    }
    lJ.set(e, n);
  }
  return n;
}
function hB(t, e, n, r, i, a, o, s, l) {
  let u = 0;
  for (let p = r; p < i; p++)
    u += Rw(t, e[p]);
  let c = Math.ceil(
    u * 1.5 / 8
    /* Balance.BranchFactor */
  ), f = [], d = [];
  function h(p, v, g, m, y) {
    for (let _ = g; _ < m; ) {
      let O = _, S = v[_], x = Rw(t, p[_]);
      for (_++; _ < m; _++) {
        let C = Rw(t, p[_]);
        if (x + C >= c)
          break;
        x += C;
      }
      if (_ == O + 1) {
        if (x > c) {
          let C = p[O];
          h(C.children, C.positions, 0, C.children.length, v[O] + y);
          continue;
        }
        f.push(p[O]);
      } else {
        let C = v[_ - 1] + p[_ - 1].length - S;
        f.push(hB(t, p, v, O, _, S, C, null, l));
      }
      d.push(S + y - a);
    }
  }
  return h(e, n, r, i, 0), (s || l)(f, d, o);
}
class CCt {
  constructor() {
    this.map = /* @__PURE__ */ new WeakMap();
  }
  setBuffer(e, n, r) {
    let i = this.map.get(e);
    i || this.map.set(e, i = /* @__PURE__ */ new Map()), i.set(n, r);
  }
  getBuffer(e, n) {
    let r = this.map.get(e);
    return r && r.get(n);
  }
  /**
  Set the value for this syntax node.
  */
  set(e, n) {
    e instanceof Ml ? this.setBuffer(e.context.buffer, e.index, n) : e instanceof Ba && this.map.set(e.tree, n);
  }
  /**
  Retrieve value for this syntax node, if it exists in the map.
  */
  get(e) {
    return e instanceof Ml ? this.getBuffer(e.context.buffer, e.index) : e instanceof Ba ? this.map.get(e.tree) : void 0;
  }
  /**
  Set the value for the node that a cursor currently points to.
  */
  cursorSet(e, n) {
    e.buffer ? this.setBuffer(e.buffer.buffer, e.index, n) : this.map.set(e.tree, n);
  }
  /**
  Retrieve the value for the node that a cursor currently points
  to.
  */
  cursorGet(e) {
    return e.buffer ? this.getBuffer(e.buffer.buffer, e.index) : this.map.get(e.tree);
  }
}
class Eh {
  /**
  Construct a tree fragment. You'll usually want to use
  [`addTree`](#common.TreeFragment^addTree) and
  [`applyChanges`](#common.TreeFragment^applyChanges) instead of
  calling this directly.
  */
  constructor(e, n, r, i, a = !1, o = !1) {
    this.from = e, this.to = n, this.tree = r, this.offset = i, this.open = (a ? 1 : 0) | (o ? 2 : 0);
  }
  /**
  Whether the start of the fragment represents the start of a
  parse, or the end of a change. (In the second case, it may not
  be safe to reuse some nodes at the start, depending on the
  parsing algorithm.)
  */
  get openStart() {
    return (this.open & 1) > 0;
  }
  /**
  Whether the end of the fragment represents the end of a
  full-document parse, or the start of a change.
  */
  get openEnd() {
    return (this.open & 2) > 0;
  }
  /**
  Create a set of fragments from a freshly parsed tree, or update
  an existing set of fragments by replacing the ones that overlap
  with a tree with content from the new tree. When `partial` is
  true, the parse is treated as incomplete, and the resulting
  fragment has [`openEnd`](#common.TreeFragment.openEnd) set to
  true.
  */
  static addTree(e, n = [], r = !1) {
    let i = [new Eh(0, e.length, e, 0, !1, r)];
    for (let a of n)
      a.to > e.length && i.push(a);
    return i;
  }
  /**
  Apply a set of edits to an array of fragments, removing or
  splitting fragments as necessary to remove edited ranges, and
  adjusting offsets for fragments that moved.
  */
  static applyChanges(e, n, r = 128) {
    if (!n.length)
      return e;
    let i = [], a = 1, o = e.length ? e[0] : null;
    for (let s = 0, l = 0, u = 0; ; s++) {
      let c = s < n.length ? n[s] : null, f = c ? c.fromA : 1e9;
      if (f - l >= r)
        for (; o && o.from < f; ) {
          let d = o;
          if (l >= d.from || f <= d.to || u) {
            let h = Math.max(d.from, l) - u, p = Math.min(d.to, f) - u;
            d = h >= p ? null : new Eh(h, p, d.tree, d.offset + u, s > 0, !!c);
          }
          if (d && i.push(d), o.to > f)
            break;
          o = a < e.length ? e[a++] : null;
        }
      if (!c)
        break;
      l = c.toA, u = c.toA - c.toB;
    }
    return i;
  }
}
class nge {
  /**
  Start a parse, returning a [partial parse](#common.PartialParse)
  object. [`fragments`](#common.TreeFragment) can be passed in to
  make the parse incremental.
  
  By default, the entire input is parsed. You can pass `ranges`,
  which should be a sorted array of non-empty, non-overlapping
  ranges, to parse only those ranges. The tree returned in that
  case will start at `ranges[0].from`.
  */
  startParse(e, n, r) {
    return typeof e == "string" && (e = new TCt(e)), r = r ? r.length ? r.map((i) => new fD(i.from, i.to)) : [new fD(0, 0)] : [new fD(0, e.length)], this.createParse(e, n || [], r);
  }
  /**
  Run a full parse, returning the resulting tree.
  */
  parse(e, n, r) {
    let i = this.startParse(e, n, r);
    for (; ; ) {
      let a = i.advance();
      if (a)
        return a;
    }
  }
}
class TCt {
  constructor(e) {
    this.string = e;
  }
  get length() {
    return this.string.length;
  }
  chunk(e) {
    return this.string.slice(e);
  }
  get lineChunks() {
    return !1;
  }
  read(e, n) {
    return this.string.slice(e, n);
  }
}
new rn({ perNode: !0 });
let PCt = 0;
class Sl {
  /**
  @internal
  */
  constructor(e, n, r) {
    this.set = e, this.base = n, this.modified = r, this.id = PCt++;
  }
  /**
  Define a new tag. If `parent` is given, the tag is treated as a
  sub-tag of that parent, and
  [highlighters](#highlight.tagHighlighter) that don't mention
  this tag will try to fall back to the parent tag (or grandparent
  tag, etc).
  */
  static define(e) {
    if (e != null && e.base)
      throw new Error("Can not derive from a modified tag");
    let n = new Sl([], null, []);
    if (n.set.push(n), e)
      for (let r of e.set)
        n.set.push(r);
    return n;
  }
  /**
  Define a tag _modifier_, which is a function that, given a tag,
  will return a tag that is a subtag of the original. Applying the
  same modifier to a twice tag will return the same value (`m1(t1)
  == m1(t1)`) and applying multiple modifiers will, regardless or
  order, produce the same tag (`m1(m2(t1)) == m2(m1(t1))`).
  
  When multiple modifiers are applied to a given base tag, each
  smaller set of modifiers is registered as a parent, so that for
  example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
  `m1(m3(t1)`, and so on.
  */
  static defineModifier() {
    let e = new RT();
    return (n) => n.modified.indexOf(e) > -1 ? n : RT.get(n.base || n, n.modified.concat(e).sort((r, i) => r.id - i.id));
  }
}
let $Ct = 0;
class RT {
  constructor() {
    this.instances = [], this.id = $Ct++;
  }
  static get(e, n) {
    if (!n.length)
      return e;
    let r = n[0].instances.find((s) => s.base == e && ACt(n, s.modified));
    if (r)
      return r;
    let i = [], a = new Sl(i, e, n);
    for (let s of n)
      s.instances.push(a);
    let o = ECt(n);
    for (let s of e.set)
      if (!s.modified.length)
        for (let l of o)
          i.push(RT.get(s, l));
    return a;
  }
}
function ACt(t, e) {
  return t.length == e.length && t.every((n, r) => n == e[r]);
}
function ECt(t) {
  let e = [[]];
  for (let n = 0; n < t.length; n++)
    for (let r = 0, i = e.length; r < i; r++)
      e.push(e[r].concat(t[n]));
  return e.sort((n, r) => r.length - n.length);
}
function pB(t) {
  let e = /* @__PURE__ */ Object.create(null);
  for (let n in t) {
    let r = t[n];
    Array.isArray(r) || (r = [r]);
    for (let i of n.split(" "))
      if (i) {
        let a = [], o = 2, s = i;
        for (let f = 0; ; ) {
          if (s == "..." && f > 0 && f + 3 == i.length) {
            o = 1;
            break;
          }
          let d = /^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);
          if (!d)
            throw new RangeError("Invalid path: " + i);
          if (a.push(d[0] == "*" ? "" : d[0][0] == '"' ? JSON.parse(d[0]) : d[0]), f += d[0].length, f == i.length)
            break;
          let h = i[f++];
          if (f == i.length && h == "!") {
            o = 0;
            break;
          }
          if (h != "/")
            throw new RangeError("Invalid path: " + i);
          s = i.slice(f);
        }
        let l = a.length - 1, u = a[l];
        if (!u)
          throw new RangeError("Invalid path: " + i);
        let c = new kT(r, o, l > 0 ? a.slice(0, l) : null);
        e[u] = c.sort(e[u]);
      }
  }
  return rge.add(e);
}
const rge = new rn();
class kT {
  constructor(e, n, r, i) {
    this.tags = e, this.mode = n, this.context = r, this.next = i;
  }
  get opaque() {
    return this.mode == 0;
  }
  get inherit() {
    return this.mode == 1;
  }
  sort(e) {
    return !e || e.depth < this.depth ? (this.next = e, this) : (e.next = this.sort(e.next), e);
  }
  get depth() {
    return this.context ? this.context.length : 0;
  }
}
kT.empty = new kT([], 2, null);
function ige(t, e) {
  let n = /* @__PURE__ */ Object.create(null);
  for (let a of t)
    if (!Array.isArray(a.tag))
      n[a.tag.id] = a.class;
    else
      for (let o of a.tag)
        n[o.id] = a.class;
  let { scope: r, all: i = null } = e || {};
  return {
    style: (a) => {
      let o = i;
      for (let s of a)
        for (let l of s.set) {
          let u = n[l.id];
          if (u) {
            o = o ? o + " " + u : u;
            break;
          }
        }
      return o;
    },
    scope: r
  };
}
function MCt(t, e) {
  let n = null;
  for (let r of t) {
    let i = r.style(e);
    i && (n = n ? n + " " + i : i);
  }
  return n;
}
function ICt(t, e, n, r = 0, i = t.length) {
  let a = new DCt(r, Array.isArray(e) ? e : [e], n);
  a.highlightRange(t.cursor(), r, i, "", a.highlighters), a.flush(i);
}
class DCt {
  constructor(e, n, r) {
    this.at = e, this.highlighters = n, this.span = r, this.class = "";
  }
  startSpan(e, n) {
    n != this.class && (this.flush(e), e > this.at && (this.at = e), this.class = n);
  }
  flush(e) {
    e > this.at && this.class && this.span(this.at, e, this.class);
  }
  highlightRange(e, n, r, i, a) {
    let { type: o, from: s, to: l } = e;
    if (s >= r || l <= n)
      return;
    o.isTop && (a = this.highlighters.filter((h) => !h.scope || h.scope(o)));
    let u = i, c = RCt(e) || kT.empty, f = MCt(a, c.tags);
    if (f && (u && (u += " "), u += f, c.mode == 1 && (i += (i ? " " : "") + f)), this.startSpan(Math.max(n, s), u), c.opaque)
      return;
    let d = e.tree && e.tree.prop(rn.mounted);
    if (d && d.overlay) {
      let h = e.node.enter(d.overlay[0].from + s, 1), p = this.highlighters.filter((g) => !g.scope || g.scope(d.tree.type)), v = e.firstChild();
      for (let g = 0, m = s; ; g++) {
        let y = g < d.overlay.length ? d.overlay[g] : null, _ = y ? y.from + s : l, O = Math.max(n, m), S = Math.min(r, _);
        if (O < S && v)
          for (; e.from < S && (this.highlightRange(e, O, S, i, a), this.startSpan(Math.min(S, e.to), u), !(e.to >= _ || !e.nextSibling())); )
            ;
        if (!y || _ > r)
          break;
        m = y.to + s, m > n && (this.highlightRange(h.cursor(), Math.max(n, y.from + s), Math.min(r, m), "", p), this.startSpan(Math.min(r, m), u));
      }
      v && e.parent();
    } else if (e.firstChild()) {
      d && (i = "");
      do
        if (!(e.to <= n)) {
          if (e.from >= r)
            break;
          this.highlightRange(e, n, r, i, a), this.startSpan(Math.min(r, e.to), u);
        }
      while (e.nextSibling());
      e.parent();
    }
  }
}
function RCt(t) {
  let e = t.type.prop(rge);
  for (; e && e.context && !t.matchContext(e.context); )
    e = e.next;
  return e || null;
}
const Xe = Sl.define, _x = Xe(), Dc = Xe(), uJ = Xe(Dc), cJ = Xe(Dc), Rc = Xe(), Ox = Xe(Rc), dD = Xe(Rc), yl = Xe(), Dd = Xe(yl), hl = Xe(), pl = Xe(), k4 = Xe(), ry = Xe(k4), Sx = Xe(), ce = {
  /**
  A comment.
  */
  comment: _x,
  /**
  A line [comment](#highlight.tags.comment).
  */
  lineComment: Xe(_x),
  /**
  A block [comment](#highlight.tags.comment).
  */
  blockComment: Xe(_x),
  /**
  A documentation [comment](#highlight.tags.comment).
  */
  docComment: Xe(_x),
  /**
  Any kind of identifier.
  */
  name: Dc,
  /**
  The [name](#highlight.tags.name) of a variable.
  */
  variableName: Xe(Dc),
  /**
  A type [name](#highlight.tags.name).
  */
  typeName: uJ,
  /**
  A tag name (subtag of [`typeName`](#highlight.tags.typeName)).
  */
  tagName: Xe(uJ),
  /**
  A property or field [name](#highlight.tags.name).
  */
  propertyName: cJ,
  /**
  An attribute name (subtag of [`propertyName`](#highlight.tags.propertyName)).
  */
  attributeName: Xe(cJ),
  /**
  The [name](#highlight.tags.name) of a class.
  */
  className: Xe(Dc),
  /**
  A label [name](#highlight.tags.name).
  */
  labelName: Xe(Dc),
  /**
  A namespace [name](#highlight.tags.name).
  */
  namespace: Xe(Dc),
  /**
  The [name](#highlight.tags.name) of a macro.
  */
  macroName: Xe(Dc),
  /**
  A literal value.
  */
  literal: Rc,
  /**
  A string [literal](#highlight.tags.literal).
  */
  string: Ox,
  /**
  A documentation [string](#highlight.tags.string).
  */
  docString: Xe(Ox),
  /**
  A character literal (subtag of [string](#highlight.tags.string)).
  */
  character: Xe(Ox),
  /**
  An attribute value (subtag of [string](#highlight.tags.string)).
  */
  attributeValue: Xe(Ox),
  /**
  A number [literal](#highlight.tags.literal).
  */
  number: dD,
  /**
  An integer [number](#highlight.tags.number) literal.
  */
  integer: Xe(dD),
  /**
  A floating-point [number](#highlight.tags.number) literal.
  */
  float: Xe(dD),
  /**
  A boolean [literal](#highlight.tags.literal).
  */
  bool: Xe(Rc),
  /**
  Regular expression [literal](#highlight.tags.literal).
  */
  regexp: Xe(Rc),
  /**
  An escape [literal](#highlight.tags.literal), for example a
  backslash escape in a string.
  */
  escape: Xe(Rc),
  /**
  A color [literal](#highlight.tags.literal).
  */
  color: Xe(Rc),
  /**
  A URL [literal](#highlight.tags.literal).
  */
  url: Xe(Rc),
  /**
  A language keyword.
  */
  keyword: hl,
  /**
  The [keyword](#highlight.tags.keyword) for the self or this
  object.
  */
  self: Xe(hl),
  /**
  The [keyword](#highlight.tags.keyword) for null.
  */
  null: Xe(hl),
  /**
  A [keyword](#highlight.tags.keyword) denoting some atomic value.
  */
  atom: Xe(hl),
  /**
  A [keyword](#highlight.tags.keyword) that represents a unit.
  */
  unit: Xe(hl),
  /**
  A modifier [keyword](#highlight.tags.keyword).
  */
  modifier: Xe(hl),
  /**
  A [keyword](#highlight.tags.keyword) that acts as an operator.
  */
  operatorKeyword: Xe(hl),
  /**
  A control-flow related [keyword](#highlight.tags.keyword).
  */
  controlKeyword: Xe(hl),
  /**
  A [keyword](#highlight.tags.keyword) that defines something.
  */
  definitionKeyword: Xe(hl),
  /**
  A [keyword](#highlight.tags.keyword) related to defining or
  interfacing with modules.
  */
  moduleKeyword: Xe(hl),
  /**
  An operator.
  */
  operator: pl,
  /**
  An [operator](#highlight.tags.operator) that dereferences something.
  */
  derefOperator: Xe(pl),
  /**
  Arithmetic-related [operator](#highlight.tags.operator).
  */
  arithmeticOperator: Xe(pl),
  /**
  Logical [operator](#highlight.tags.operator).
  */
  logicOperator: Xe(pl),
  /**
  Bit [operator](#highlight.tags.operator).
  */
  bitwiseOperator: Xe(pl),
  /**
  Comparison [operator](#highlight.tags.operator).
  */
  compareOperator: Xe(pl),
  /**
  [Operator](#highlight.tags.operator) that updates its operand.
  */
  updateOperator: Xe(pl),
  /**
  [Operator](#highlight.tags.operator) that defines something.
  */
  definitionOperator: Xe(pl),
  /**
  Type-related [operator](#highlight.tags.operator).
  */
  typeOperator: Xe(pl),
  /**
  Control-flow [operator](#highlight.tags.operator).
  */
  controlOperator: Xe(pl),
  /**
  Program or markup punctuation.
  */
  punctuation: k4,
  /**
  [Punctuation](#highlight.tags.punctuation) that separates
  things.
  */
  separator: Xe(k4),
  /**
  Bracket-style [punctuation](#highlight.tags.punctuation).
  */
  bracket: ry,
  /**
  Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
  tokens).
  */
  angleBracket: Xe(ry),
  /**
  Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
  tokens).
  */
  squareBracket: Xe(ry),
  /**
  Parentheses (usually `(` and `)` tokens). Subtag of
  [bracket](#highlight.tags.bracket).
  */
  paren: Xe(ry),
  /**
  Braces (usually `{` and `}` tokens). Subtag of
  [bracket](#highlight.tags.bracket).
  */
  brace: Xe(ry),
  /**
  Content, for example plain text in XML or markup documents.
  */
  content: yl,
  /**
  [Content](#highlight.tags.content) that represents a heading.
  */
  heading: Dd,
  /**
  A level 1 [heading](#highlight.tags.heading).
  */
  heading1: Xe(Dd),
  /**
  A level 2 [heading](#highlight.tags.heading).
  */
  heading2: Xe(Dd),
  /**
  A level 3 [heading](#highlight.tags.heading).
  */
  heading3: Xe(Dd),
  /**
  A level 4 [heading](#highlight.tags.heading).
  */
  heading4: Xe(Dd),
  /**
  A level 5 [heading](#highlight.tags.heading).
  */
  heading5: Xe(Dd),
  /**
  A level 6 [heading](#highlight.tags.heading).
  */
  heading6: Xe(Dd),
  /**
  A prose separator (such as a horizontal rule).
  */
  contentSeparator: Xe(yl),
  /**
  [Content](#highlight.tags.content) that represents a list.
  */
  list: Xe(yl),
  /**
  [Content](#highlight.tags.content) that represents a quote.
  */
  quote: Xe(yl),
  /**
  [Content](#highlight.tags.content) that is emphasized.
  */
  emphasis: Xe(yl),
  /**
  [Content](#highlight.tags.content) that is styled strong.
  */
  strong: Xe(yl),
  /**
  [Content](#highlight.tags.content) that is part of a link.
  */
  link: Xe(yl),
  /**
  [Content](#highlight.tags.content) that is styled as code or
  monospace.
  */
  monospace: Xe(yl),
  /**
  [Content](#highlight.tags.content) that has a strike-through
  style.
  */
  strikethrough: Xe(yl),
  /**
  Inserted text in a change-tracking format.
  */
  inserted: Xe(),
  /**
  Deleted text.
  */
  deleted: Xe(),
  /**
  Changed text.
  */
  changed: Xe(),
  /**
  An invalid or unsyntactic element.
  */
  invalid: Xe(),
  /**
  Metadata or meta-instruction.
  */
  meta: Sx,
  /**
  [Metadata](#highlight.tags.meta) that applies to the entire
  document.
  */
  documentMeta: Xe(Sx),
  /**
  [Metadata](#highlight.tags.meta) that annotates or adds
  attributes to a given syntactic element.
  */
  annotation: Xe(Sx),
  /**
  Processing instruction or preprocessor directive. Subtag of
  [meta](#highlight.tags.meta).
  */
  processingInstruction: Xe(Sx),
  /**
  [Modifier](#highlight.Tag^defineModifier) that indicates that a
  given element is being defined. Expected to be used with the
  various [name](#highlight.tags.name) tags.
  */
  definition: Sl.defineModifier(),
  /**
  [Modifier](#highlight.Tag^defineModifier) that indicates that
  something is constant. Mostly expected to be used with
  [variable names](#highlight.tags.variableName).
  */
  constant: Sl.defineModifier(),
  /**
  [Modifier](#highlight.Tag^defineModifier) used to indicate that
  a [variable](#highlight.tags.variableName) or [property
  name](#highlight.tags.propertyName) is being called or defined
  as a function.
  */
  function: Sl.defineModifier(),
  /**
  [Modifier](#highlight.Tag^defineModifier) that can be applied to
  [names](#highlight.tags.name) to indicate that they belong to
  the language's standard environment.
  */
  standard: Sl.defineModifier(),
  /**
  [Modifier](#highlight.Tag^defineModifier) that indicates a given
  [names](#highlight.tags.name) is local to some scope.
  */
  local: Sl.defineModifier(),
  /**
  A generic variant [modifier](#highlight.Tag^defineModifier) that
  can be used to tag language-specific alternative variants of
  some common tag. It is recommended for themes to define special
  forms of at least the [string](#highlight.tags.string) and
  [variable name](#highlight.tags.variableName) tags, since those
  come up a lot.
  */
  special: Sl.defineModifier()
};
ige([
  { tag: ce.link, class: "tok-link" },
  { tag: ce.heading, class: "tok-heading" },
  { tag: ce.emphasis, class: "tok-emphasis" },
  { tag: ce.strong, class: "tok-strong" },
  { tag: ce.keyword, class: "tok-keyword" },
  { tag: ce.atom, class: "tok-atom" },
  { tag: ce.bool, class: "tok-bool" },
  { tag: ce.url, class: "tok-url" },
  { tag: ce.labelName, class: "tok-labelName" },
  { tag: ce.inserted, class: "tok-inserted" },
  { tag: ce.deleted, class: "tok-deleted" },
  { tag: ce.literal, class: "tok-literal" },
  { tag: ce.string, class: "tok-string" },
  { tag: ce.number, class: "tok-number" },
  { tag: [ce.regexp, ce.escape, ce.special(ce.string)], class: "tok-string2" },
  { tag: ce.variableName, class: "tok-variableName" },
  { tag: ce.local(ce.variableName), class: "tok-variableName tok-local" },
  { tag: ce.definition(ce.variableName), class: "tok-variableName tok-definition" },
  { tag: ce.special(ce.variableName), class: "tok-variableName2" },
  { tag: ce.definition(ce.propertyName), class: "tok-propertyName tok-definition" },
  { tag: ce.typeName, class: "tok-typeName" },
  { tag: ce.namespace, class: "tok-namespace" },
  { tag: ce.className, class: "tok-className" },
  { tag: ce.macroName, class: "tok-macroName" },
  { tag: ce.propertyName, class: "tok-propertyName" },
  { tag: ce.operator, class: "tok-operator" },
  { tag: ce.comment, class: "tok-comment" },
  { tag: ce.meta, class: "tok-meta" },
  { tag: ce.invalid, class: "tok-invalid" },
  { tag: ce.punctuation, class: "tok-punctuation" }
]);
var hD;
const Nv = /* @__PURE__ */ new rn();
function age(t) {
  return ut.define({
    combine: t ? (e) => e.concat(t) : void 0
  });
}
const vB = /* @__PURE__ */ new rn();
class Ds {
  /**
  Construct a language object. If you need to invoke this
  directly, first define a data facet with
  [`defineLanguageFacet`](https://codemirror.net/6/docs/ref/#language.defineLanguageFacet), and then
  configure your parser to [attach](https://codemirror.net/6/docs/ref/#language.languageDataProp) it
  to the language's outer syntax node.
  */
  constructor(e, n, r = [], i = "") {
    this.data = e, this.name = i, un.prototype.hasOwnProperty("tree") || Object.defineProperty(un.prototype, "tree", { get() {
      return ni(this);
    } }), this.parser = n, this.extension = [
      Af.of(this),
      un.languageData.of((a, o, s) => {
        let l = fJ(a, o, s), u = l.type.prop(Nv);
        if (!u)
          return [];
        let c = a.facet(u), f = l.type.prop(vB);
        if (f) {
          let d = l.resolve(o - l.from, s);
          for (let h of f)
            if (h.test(d, a)) {
              let p = a.facet(h.facet);
              return h.type == "replace" ? p : p.concat(c);
            }
        }
        return c;
      })
    ].concat(r);
  }
  /**
  Query whether this language is active at the given position.
  */
  isActiveAt(e, n, r = -1) {
    return fJ(e, n, r).type.prop(Nv) == this.data;
  }
  /**
  Find the document regions that were parsed using this language.
  The returned regions will _include_ any nested languages rooted
  in this language, when those exist.
  */
  findRegions(e) {
    let n = e.facet(Af);
    if ((n == null ? void 0 : n.data) == this.data)
      return [{ from: 0, to: e.doc.length }];
    if (!n || !n.allowsNesting)
      return [];
    let r = [], i = (a, o) => {
      if (a.prop(Nv) == this.data) {
        r.push({ from: o, to: o + a.length });
        return;
      }
      let s = a.prop(rn.mounted);
      if (s) {
        if (s.tree.prop(Nv) == this.data) {
          if (s.overlay)
            for (let l of s.overlay)
              r.push({ from: l.from + o, to: l.to + o });
          else
            r.push({ from: o, to: o + a.length });
          return;
        } else if (s.overlay) {
          let l = r.length;
          if (i(s.tree, s.overlay[0].from + o), r.length > l)
            return;
        }
      }
      for (let l = 0; l < a.children.length; l++) {
        let u = a.children[l];
        u instanceof Vr && i(u, a.positions[l] + o);
      }
    };
    return i(ni(e), 0), r;
  }
  /**
  Indicates whether this language allows nested languages. The
  default implementation returns true.
  */
  get allowsNesting() {
    return !0;
  }
}
Ds.setState = /* @__PURE__ */ zt.define();
function fJ(t, e, n) {
  let r = t.facet(Af), i = ni(t).topNode;
  if (!r || r.allowsNesting)
    for (let a = i; a; a = a.enter(e, n, Ur.ExcludeBuffers))
      a.type.isTop && (i = a);
  return i;
}
class w_ extends Ds {
  constructor(e, n, r) {
    super(e, n, [], r), this.parser = n;
  }
  /**
  Define a language from a parser.
  */
  static define(e) {
    let n = age(e.languageData);
    return new w_(n, e.parser.configure({
      props: [Nv.add((r) => r.isTop ? n : void 0)]
    }), e.name);
  }
  /**
  Create a new instance of this language with a reconfigured
  version of its parser and optionally a new name.
  */
  configure(e, n) {
    return new w_(this.data, this.parser.configure(e), n || this.name);
  }
  get allowsNesting() {
    return this.parser.hasWrappers();
  }
}
function ni(t) {
  let e = t.field(Ds.state, !1);
  return e ? e.tree : Vr.empty;
}
class kCt {
  /**
  Create an input object for the given document.
  */
  constructor(e) {
    this.doc = e, this.cursorPos = 0, this.string = "", this.cursor = e.iter();
  }
  get length() {
    return this.doc.length;
  }
  syncTo(e) {
    return this.string = this.cursor.next(e - this.cursorPos).value, this.cursorPos = e + this.string.length, this.cursorPos - this.string.length;
  }
  chunk(e) {
    return this.syncTo(e), this.string;
  }
  get lineChunks() {
    return !0;
  }
  read(e, n) {
    let r = this.cursorPos - this.string.length;
    return e < r || n >= this.cursorPos ? this.doc.sliceString(e, n) : this.string.slice(e - r, n - r);
  }
}
let iy = null;
class LT {
  constructor(e, n, r = [], i, a, o, s, l) {
    this.parser = e, this.state = n, this.fragments = r, this.tree = i, this.treeLen = a, this.viewport = o, this.skipped = s, this.scheduleOn = l, this.parse = null, this.tempSkipped = [];
  }
  /**
  @internal
  */
  static create(e, n, r) {
    return new LT(e, n, [], Vr.empty, 0, r, [], null);
  }
  startParse() {
    return this.parser.startParse(new kCt(this.state.doc), this.fragments);
  }
  /**
  @internal
  */
  work(e, n) {
    return n != null && n >= this.state.doc.length && (n = void 0), this.tree != Vr.empty && this.isDone(n ?? this.state.doc.length) ? (this.takeTree(), !0) : this.withContext(() => {
      var r;
      if (typeof e == "number") {
        let i = Date.now() + e;
        e = () => Date.now() > i;
      }
      for (this.parse || (this.parse = this.startParse()), n != null && (this.parse.stoppedAt == null || this.parse.stoppedAt > n) && n < this.state.doc.length && this.parse.stopAt(n); ; ) {
        let i = this.parse.advance();
        if (i)
          if (this.fragments = this.withoutTempSkipped(Eh.addTree(i, this.fragments, this.parse.stoppedAt != null)), this.treeLen = (r = this.parse.stoppedAt) !== null && r !== void 0 ? r : this.state.doc.length, this.tree = i, this.parse = null, this.treeLen < (n ?? this.state.doc.length))
            this.parse = this.startParse();
          else
            return !0;
        if (e())
          return !1;
      }
    });
  }
  /**
  @internal
  */
  takeTree() {
    let e, n;
    this.parse && (e = this.parse.parsedPos) >= this.treeLen && ((this.parse.stoppedAt == null || this.parse.stoppedAt > e) && this.parse.stopAt(e), this.withContext(() => {
      for (; !(n = this.parse.advance()); )
        ;
    }), this.treeLen = e, this.tree = n, this.fragments = this.withoutTempSkipped(Eh.addTree(this.tree, this.fragments, !0)), this.parse = null);
  }
  withContext(e) {
    let n = iy;
    iy = this;
    try {
      return e();
    } finally {
      iy = n;
    }
  }
  withoutTempSkipped(e) {
    for (let n; n = this.tempSkipped.pop(); )
      e = dJ(e, n.from, n.to);
    return e;
  }
  /**
  @internal
  */
  changes(e, n) {
    let { fragments: r, tree: i, treeLen: a, viewport: o, skipped: s } = this;
    if (this.takeTree(), !e.empty) {
      let l = [];
      if (e.iterChangedRanges((u, c, f, d) => l.push({ fromA: u, toA: c, fromB: f, toB: d })), r = Eh.applyChanges(r, l), i = Vr.empty, a = 0, o = { from: e.mapPos(o.from, -1), to: e.mapPos(o.to, 1) }, this.skipped.length) {
        s = [];
        for (let u of this.skipped) {
          let c = e.mapPos(u.from, 1), f = e.mapPos(u.to, -1);
          c < f && s.push({ from: c, to: f });
        }
      }
    }
    return new LT(this.parser, n, r, i, a, o, s, this.scheduleOn);
  }
  /**
  @internal
  */
  updateViewport(e) {
    if (this.viewport.from == e.from && this.viewport.to == e.to)
      return !1;
    this.viewport = e;
    let n = this.skipped.length;
    for (let r = 0; r < this.skipped.length; r++) {
      let { from: i, to: a } = this.skipped[r];
      i < e.to && a > e.from && (this.fragments = dJ(this.fragments, i, a), this.skipped.splice(r--, 1));
    }
    return this.skipped.length >= n ? !1 : (this.reset(), !0);
  }
  /**
  @internal
  */
  reset() {
    this.parse && (this.takeTree(), this.parse = null);
  }
  /**
  Notify the parse scheduler that the given region was skipped
  because it wasn't in view, and the parse should be restarted
  when it comes into view.
  */
  skipUntilInView(e, n) {
    this.skipped.push({ from: e, to: n });
  }
  /**
  Returns a parser intended to be used as placeholder when
  asynchronously loading a nested parser. It'll skip its input and
  mark it as not-really-parsed, so that the next update will parse
  it again.
  
  When `until` is given, a reparse will be scheduled when that
  promise resolves.
  */
  static getSkippingParser(e) {
    return new class extends nge {
      createParse(n, r, i) {
        let a = i[0].from, o = i[i.length - 1].to;
        return {
          parsedPos: a,
          advance() {
            let l = iy;
            if (l) {
              for (let u of i)
                l.tempSkipped.push(u);
              e && (l.scheduleOn = l.scheduleOn ? Promise.all([l.scheduleOn, e]) : e);
            }
            return this.parsedPos = o, new Vr(Va.none, [], [], o - a);
          },
          stoppedAt: null,
          stopAt() {
          }
        };
      }
    }();
  }
  /**
  @internal
  */
  isDone(e) {
    e = Math.min(e, this.state.doc.length);
    let n = this.fragments;
    return this.treeLen >= e && n.length && n[0].from == 0 && n[0].to >= e;
  }
  /**
  Get the context for the current parse, or `null` if no editor
  parse is in progress.
  */
  static get() {
    return iy;
  }
}
function dJ(t, e, n) {
  return Eh.applyChanges(t, [{ fromA: e, toA: n, fromB: e, toB: n }]);
}
class tm {
  constructor(e) {
    this.context = e, this.tree = e.tree;
  }
  apply(e) {
    if (!e.docChanged && this.tree == this.context.tree)
      return this;
    let n = this.context.changes(e.changes, e.state), r = this.context.treeLen == e.startState.doc.length ? void 0 : Math.max(e.changes.mapPos(this.context.treeLen), n.viewport.to);
    return n.work(20, r) || n.takeTree(), new tm(n);
  }
  static init(e) {
    let n = Math.min(3e3, e.doc.length), r = LT.create(e.facet(Af).parser, e, { from: 0, to: n });
    return r.work(20, n) || r.takeTree(), new tm(r);
  }
}
Ds.state = /* @__PURE__ */ fi.define({
  create: tm.init,
  update(t, e) {
    for (let n of e.effects)
      if (n.is(Ds.setState))
        return n.value;
    return e.startState.facet(Af) != e.state.facet(Af) ? tm.init(e.state) : t.apply(e);
  }
});
let oge = (t) => {
  let e = setTimeout(
    () => t(),
    500
    /* Work.MaxPause */
  );
  return () => clearTimeout(e);
};
typeof requestIdleCallback < "u" && (oge = (t) => {
  let e = -1, n = setTimeout(
    () => {
      e = requestIdleCallback(t, {
        timeout: 400
        /* Work.MinPause */
      });
    },
    100
    /* Work.MinPause */
  );
  return () => e < 0 ? clearTimeout(n) : cancelIdleCallback(e);
});
const pD = typeof navigator < "u" && (!((hD = navigator.scheduling) === null || hD === void 0) && hD.isInputPending) ? () => navigator.scheduling.isInputPending() : null, LCt = /* @__PURE__ */ Ir.fromClass(class {
  constructor(e) {
    this.view = e, this.working = null, this.workScheduled = 0, this.chunkEnd = -1, this.chunkBudget = -1, this.work = this.work.bind(this), this.scheduleWork();
  }
  update(e) {
    let n = this.view.state.field(Ds.state).context;
    (n.updateViewport(e.view.viewport) || this.view.viewport.to > n.treeLen) && this.scheduleWork(), (e.docChanged || e.selectionSet) && (this.view.hasFocus && (this.chunkBudget += 50), this.scheduleWork()), this.checkAsyncSchedule(n);
  }
  scheduleWork() {
    if (this.working)
      return;
    let { state: e } = this.view, n = e.field(Ds.state);
    (n.tree != n.context.tree || !n.context.isDone(e.doc.length)) && (this.working = oge(this.work));
  }
  work(e) {
    this.working = null;
    let n = Date.now();
    if (this.chunkEnd < n && (this.chunkEnd < 0 || this.view.hasFocus) && (this.chunkEnd = n + 3e4, this.chunkBudget = 3e3), this.chunkBudget <= 0)
      return;
    let { state: r, viewport: { to: i } } = this.view, a = r.field(Ds.state);
    if (a.tree == a.context.tree && a.context.isDone(
      i + 1e5
      /* Work.MaxParseAhead */
    ))
      return;
    let o = Date.now() + Math.min(this.chunkBudget, 100, e && !pD ? Math.max(25, e.timeRemaining() - 5) : 1e9), s = a.context.treeLen < i && r.doc.length > i + 1e3, l = a.context.work(() => pD && pD() || Date.now() > o, i + (s ? 0 : 1e5));
    this.chunkBudget -= Date.now() - n, (l || this.chunkBudget <= 0) && (a.context.takeTree(), this.view.dispatch({ effects: Ds.setState.of(new tm(a.context)) })), this.chunkBudget > 0 && !(l && !s) && this.scheduleWork(), this.checkAsyncSchedule(a.context);
  }
  checkAsyncSchedule(e) {
    e.scheduleOn && (this.workScheduled++, e.scheduleOn.then(() => this.scheduleWork()).catch((n) => Ia(this.view.state, n)).then(() => this.workScheduled--), e.scheduleOn = null);
  }
  destroy() {
    this.working && this.working();
  }
  isWorking() {
    return !!(this.working || this.workScheduled > 0);
  }
}, {
  eventHandlers: { focus() {
    this.scheduleWork();
  } }
}), Af = /* @__PURE__ */ ut.define({
  combine(t) {
    return t.length ? t[0] : null;
  },
  enables: (t) => [
    Ds.state,
    LCt,
    rt.contentAttributes.compute([t], (e) => {
      let n = e.facet(t);
      return n && n.name ? { "data-language": n.name } : {};
    })
  ]
});
class sge {
  /**
  Create a language support object.
  */
  constructor(e, n = []) {
    this.language = e, this.support = n, this.extension = [e, n];
  }
}
const NCt = /* @__PURE__ */ ut.define(), D1 = /* @__PURE__ */ ut.define({
  combine: (t) => {
    if (!t.length)
      return "  ";
    let e = t[0];
    if (!e || /\S/.test(e) || Array.from(e).some((n) => n != e[0]))
      throw new Error("Invalid indent unit: " + JSON.stringify(t[0]));
    return e;
  }
});
function NT(t) {
  let e = t.facet(D1);
  return e.charCodeAt(0) == 9 ? t.tabSize * e.length : e.length;
}
function C_(t, e) {
  let n = "", r = t.tabSize, i = t.facet(D1)[0];
  if (i == "	") {
    for (; e >= r; )
      n += "	", e -= r;
    i = " ";
  }
  for (let a = 0; a < e; a++)
    n += i;
  return n;
}
function gB(t, e) {
  t instanceof un && (t = new s$(t));
  for (let r of t.state.facet(NCt)) {
    let i = r(t, e);
    if (i !== void 0)
      return i;
  }
  let n = ni(t.state);
  return n.length >= e ? BCt(t, n, e) : null;
}
class s$ {
  /**
  Create an indent context.
  */
  constructor(e, n = {}) {
    this.state = e, this.options = n, this.unit = NT(e);
  }
  /**
  Get a description of the line at the given position, taking
  [simulated line
  breaks](https://codemirror.net/6/docs/ref/#language.IndentContext.constructor^options.simulateBreak)
  into account. If there is such a break at `pos`, the `bias`
  argument determines whether the part of the line line before or
  after the break is used.
  */
  lineAt(e, n = 1) {
    let r = this.state.doc.lineAt(e), { simulateBreak: i, simulateDoubleBreak: a } = this.options;
    return i != null && i >= r.from && i <= r.to ? a && i == e ? { text: "", from: e } : (n < 0 ? i < e : i <= e) ? { text: r.text.slice(i - r.from), from: i } : { text: r.text.slice(0, i - r.from), from: r.from } : r;
  }
  /**
  Get the text directly after `pos`, either the entire line
  or the next 100 characters, whichever is shorter.
  */
  textAfterPos(e, n = 1) {
    if (this.options.simulateDoubleBreak && e == this.options.simulateBreak)
      return "";
    let { text: r, from: i } = this.lineAt(e, n);
    return r.slice(e - i, Math.min(r.length, e + 100 - i));
  }
  /**
  Find the column for the given position.
  */
  column(e, n = 1) {
    let { text: r, from: i } = this.lineAt(e, n), a = this.countColumn(r, e - i), o = this.options.overrideIndentation ? this.options.overrideIndentation(i) : -1;
    return o > -1 && (a += o - this.countColumn(r, r.search(/\S|$/))), a;
  }
  /**
  Find the column position (taking tabs into account) of the given
  position in the given string.
  */
  countColumn(e, n = e.length) {
    return Fm(e, this.state.tabSize, n);
  }
  /**
  Find the indentation column of the line at the given point.
  */
  lineIndent(e, n = 1) {
    let { text: r, from: i } = this.lineAt(e, n), a = this.options.overrideIndentation;
    if (a) {
      let o = a(i);
      if (o > -1)
        return o;
    }
    return this.countColumn(r, r.search(/\S|$/));
  }
  /**
  Returns the [simulated line
  break](https://codemirror.net/6/docs/ref/#language.IndentContext.constructor^options.simulateBreak)
  for this context, if any.
  */
  get simulatedBreak() {
    return this.options.simulateBreak || null;
  }
}
const mB = /* @__PURE__ */ new rn();
function BCt(t, e, n) {
  let r = e.resolveStack(n), i = r.node.enterUnfinishedNodesBefore(n);
  if (i != r.node) {
    let a = [];
    for (let o = i; o != r.node; o = o.parent)
      a.push(o);
    for (let o = a.length - 1; o >= 0; o--)
      r = { node: a[o], next: r };
  }
  return lge(r, t, n);
}
function lge(t, e, n) {
  for (let r = t; r; r = r.next) {
    let i = VCt(r.node);
    if (i)
      return i(yB.create(e, n, r));
  }
  return 0;
}
function zCt(t) {
  return t.pos == t.options.simulateBreak && t.options.simulateDoubleBreak;
}
function VCt(t) {
  let e = t.type.prop(mB);
  if (e)
    return e;
  let n = t.firstChild, r;
  if (n && (r = n.type.prop(rn.closedBy))) {
    let i = t.lastChild, a = i && r.indexOf(i.name) > -1;
    return (o) => uge(o, !0, 1, void 0, a && !zCt(o) ? i.from : void 0);
  }
  return t.parent == null ? FCt : null;
}
function FCt() {
  return 0;
}
class yB extends s$ {
  constructor(e, n, r) {
    super(e.state, e.options), this.base = e, this.pos = n, this.context = r;
  }
  /**
  The syntax tree node to which the indentation strategy
  applies.
  */
  get node() {
    return this.context.node;
  }
  /**
  @internal
  */
  static create(e, n, r) {
    return new yB(e, n, r);
  }
  /**
  Get the text directly after `this.pos`, either the entire line
  or the next 100 characters, whichever is shorter.
  */
  get textAfter() {
    return this.textAfterPos(this.pos);
  }
  /**
  Get the indentation at the reference line for `this.node`, which
  is the line on which it starts, unless there is a node that is
  _not_ a parent of this node covering the start of that line. If
  so, the line at the start of that node is tried, again skipping
  on if it is covered by another such node.
  */
  get baseIndent() {
    return this.baseIndentFor(this.node);
  }
  /**
  Get the indentation for the reference line of the given node
  (see [`baseIndent`](https://codemirror.net/6/docs/ref/#language.TreeIndentContext.baseIndent)).
  */
  baseIndentFor(e) {
    let n = this.state.doc.lineAt(e.from);
    for (; ; ) {
      let r = e.resolve(n.from);
      for (; r.parent && r.parent.from == r.from; )
        r = r.parent;
      if (WCt(r, e))
        break;
      n = this.state.doc.lineAt(r.from);
    }
    return this.lineIndent(n.from);
  }
  /**
  Continue looking for indentations in the node's parent nodes,
  and return the result of that.
  */
  continue() {
    return lge(this.context.next, this.base, this.pos);
  }
}
function WCt(t, e) {
  for (let n = e; n; n = n.parent)
    if (t == n)
      return !0;
  return !1;
}
function QCt(t) {
  let e = t.node, n = e.childAfter(e.from), r = e.lastChild;
  if (!n)
    return null;
  let i = t.options.simulateBreak, a = t.state.doc.lineAt(n.from), o = i == null || i <= a.from ? a.to : Math.min(a.to, i);
  for (let s = n.to; ; ) {
    let l = e.childAfter(s);
    if (!l || l == r)
      return null;
    if (!l.type.isSkipped)
      return l.from < o ? n : null;
    s = l.to;
  }
}
function HCt({ closing: t, align: e = !0, units: n = 1 }) {
  return (r) => uge(r, e, n, t);
}
function uge(t, e, n, r, i) {
  let a = t.textAfter, o = a.match(/^\s*/)[0].length, s = r && a.slice(o, o + r.length) == r || i == t.pos + o, l = e ? QCt(t) : null;
  return l ? s ? t.column(l.from) : t.column(l.to) : t.baseIndent + (s ? 0 : t.unit * n);
}
const GCt = (t) => t.baseIndent;
function yb({ except: t, units: e = 1 } = {}) {
  return (n) => {
    let r = t && t.test(n.textAfter);
    return n.baseIndent + (r ? 0 : e * n.unit);
  };
}
const jCt = 200;
function ZCt() {
  return un.transactionFilter.of((t) => {
    if (!t.docChanged || !t.isUserEvent("input.type") && !t.isUserEvent("input.complete"))
      return t;
    let e = t.startState.languageDataAt("indentOnInput", t.startState.selection.main.head);
    if (!e.length)
      return t;
    let n = t.newDoc, { head: r } = t.newSelection.main, i = n.lineAt(r);
    if (r > i.from + jCt)
      return t;
    let a = n.sliceString(i.from, r);
    if (!e.some((u) => u.test(a)))
      return t;
    let { state: o } = t, s = -1, l = [];
    for (let { head: u } of o.selection.ranges) {
      let c = o.doc.lineAt(u);
      if (c.from == s)
        continue;
      s = c.from;
      let f = gB(o, c.from);
      if (f == null)
        continue;
      let d = /^\s*/.exec(c.text)[0], h = C_(o, f);
      d != h && l.push({ from: c.from, to: c.from + d.length, insert: h });
    }
    return l.length ? [t, { changes: l, sequential: !0 }] : t;
  });
}
const UCt = /* @__PURE__ */ ut.define(), bB = /* @__PURE__ */ new rn();
function cge(t) {
  let e = t.firstChild, n = t.lastChild;
  return e && e.to < n.from ? { from: e.to, to: n.type.isError ? t.to : n.from } : null;
}
function XCt(t, e, n) {
  let r = ni(t);
  if (r.length < n)
    return null;
  let i = r.resolveStack(n, 1), a = null;
  for (let o = i; o; o = o.next) {
    let s = o.node;
    if (s.to <= n || s.from > n)
      continue;
    if (a && s.from < e)
      break;
    let l = s.type.prop(bB);
    if (l && (s.to < r.length - 50 || r.length == t.doc.length || !YCt(s))) {
      let u = l(s, t);
      u && u.from <= n && u.from >= e && u.to > n && (a = u);
    }
  }
  return a;
}
function YCt(t) {
  let e = t.lastChild;
  return e && e.to == t.to && e.type.isError;
}
function BT(t, e, n) {
  for (let r of t.facet(UCt)) {
    let i = r(t, e, n);
    if (i)
      return i;
  }
  return XCt(t, e, n);
}
function fge(t, e) {
  let n = e.mapPos(t.from, 1), r = e.mapPos(t.to, -1);
  return n >= r ? void 0 : { from: n, to: r };
}
const l$ = /* @__PURE__ */ zt.define({ map: fge }), R1 = /* @__PURE__ */ zt.define({ map: fge });
function dge(t) {
  let e = [];
  for (let { head: n } of t.state.selection.ranges)
    e.some((r) => r.from <= n && r.to >= n) || e.push(t.lineBlockAt(n));
  return e;
}
const np = /* @__PURE__ */ fi.define({
  create() {
    return pt.none;
  },
  update(t, e) {
    t = t.map(e.changes);
    for (let n of e.effects)
      if (n.is(l$) && !qCt(t, n.value.from, n.value.to)) {
        let { preparePlaceholder: r } = e.state.facet(vge), i = r ? pt.replace({ widget: new iTt(r(e.state, n.value)) }) : hJ;
        t = t.update({ add: [i.range(n.value.from, n.value.to)] });
      } else n.is(R1) && (t = t.update({
        filter: (r, i) => n.value.from != r || n.value.to != i,
        filterFrom: n.value.from,
        filterTo: n.value.to
      }));
    if (e.selection) {
      let n = !1, { head: r } = e.selection.main;
      t.between(r, r, (i, a) => {
        i < r && a > r && (n = !0);
      }), n && (t = t.update({
        filterFrom: r,
        filterTo: r,
        filter: (i, a) => a <= r || i >= r
      }));
    }
    return t;
  },
  provide: (t) => rt.decorations.from(t),
  toJSON(t, e) {
    let n = [];
    return t.between(0, e.doc.length, (r, i) => {
      n.push(r, i);
    }), n;
  },
  fromJSON(t) {
    if (!Array.isArray(t) || t.length % 2)
      throw new RangeError("Invalid JSON for fold state");
    let e = [];
    for (let n = 0; n < t.length; ) {
      let r = t[n++], i = t[n++];
      if (typeof r != "number" || typeof i != "number")
        throw new RangeError("Invalid JSON for fold state");
      e.push(hJ.range(r, i));
    }
    return pt.set(e, !0);
  }
});
function zT(t, e, n) {
  var r;
  let i = null;
  return (r = t.field(np, !1)) === null || r === void 0 || r.between(e, n, (a, o) => {
    (!i || i.from > a) && (i = { from: a, to: o });
  }), i;
}
function qCt(t, e, n) {
  let r = !1;
  return t.between(e, e, (i, a) => {
    i == e && a == n && (r = !0);
  }), r;
}
function hge(t, e) {
  return t.field(np, !1) ? e : e.concat(zt.appendConfig.of(gge()));
}
const KCt = (t) => {
  for (let e of dge(t)) {
    let n = BT(t.state, e.from, e.to);
    if (n)
      return t.dispatch({ effects: hge(t.state, [l$.of(n), pge(t, n)]) }), !0;
  }
  return !1;
}, JCt = (t) => {
  if (!t.state.field(np, !1))
    return !1;
  let e = [];
  for (let n of dge(t)) {
    let r = zT(t.state, n.from, n.to);
    r && e.push(R1.of(r), pge(t, r, !1));
  }
  return e.length && t.dispatch({ effects: e }), e.length > 0;
};
function pge(t, e, n = !0) {
  let r = t.state.doc.lineAt(e.from).number, i = t.state.doc.lineAt(e.to).number;
  return rt.announce.of(`${t.state.phrase(n ? "Folded lines" : "Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`);
}
const eTt = (t) => {
  let { state: e } = t, n = [];
  for (let r = 0; r < e.doc.length; ) {
    let i = t.lineBlockAt(r), a = BT(e, i.from, i.to);
    a && n.push(l$.of(a)), r = (a ? t.lineBlockAt(a.to) : i).to + 1;
  }
  return n.length && t.dispatch({ effects: hge(t.state, n) }), !!n.length;
}, tTt = (t) => {
  let e = t.state.field(np, !1);
  if (!e || !e.size)
    return !1;
  let n = [];
  return e.between(0, t.state.doc.length, (r, i) => {
    n.push(R1.of({ from: r, to: i }));
  }), t.dispatch({ effects: n }), !0;
}, nTt = [
  { key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: KCt },
  { key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: JCt },
  { key: "Ctrl-Alt-[", run: eTt },
  { key: "Ctrl-Alt-]", run: tTt }
], rTt = {
  placeholderDOM: null,
  preparePlaceholder: null,
  placeholderText: "…"
}, vge = /* @__PURE__ */ ut.define({
  combine(t) {
    return Kl(t, rTt);
  }
});
function gge(t) {
  return [np, sTt];
}
function mge(t, e) {
  let { state: n } = t, r = n.facet(vge), i = (o) => {
    let s = t.lineBlockAt(t.posAtDOM(o.target)), l = zT(t.state, s.from, s.to);
    l && t.dispatch({ effects: R1.of(l) }), o.preventDefault();
  };
  if (r.placeholderDOM)
    return r.placeholderDOM(t, i, e);
  let a = document.createElement("span");
  return a.textContent = r.placeholderText, a.setAttribute("aria-label", n.phrase("folded code")), a.title = n.phrase("unfold"), a.className = "cm-foldPlaceholder", a.onclick = i, a;
}
const hJ = /* @__PURE__ */ pt.replace({ widget: /* @__PURE__ */ new class extends Jl {
  toDOM(t) {
    return mge(t, null);
  }
}() });
class iTt extends Jl {
  constructor(e) {
    super(), this.value = e;
  }
  eq(e) {
    return this.value == e.value;
  }
  toDOM(e) {
    return mge(e, this.value);
  }
}
const aTt = {
  openText: "⌄",
  closedText: "›",
  markerDOM: null,
  domEventHandlers: {},
  foldingChanged: () => !1
};
class vD extends Yu {
  constructor(e, n) {
    super(), this.config = e, this.open = n;
  }
  eq(e) {
    return this.config == e.config && this.open == e.open;
  }
  toDOM(e) {
    if (this.config.markerDOM)
      return this.config.markerDOM(this.open);
    let n = document.createElement("span");
    return n.textContent = this.open ? this.config.openText : this.config.closedText, n.title = e.state.phrase(this.open ? "Fold line" : "Unfold line"), n;
  }
}
function oTt(t = {}) {
  let e = Object.assign(Object.assign({}, aTt), t), n = new vD(e, !0), r = new vD(e, !1), i = Ir.fromClass(class {
    constructor(o) {
      this.from = o.viewport.from, this.markers = this.buildMarkers(o);
    }
    update(o) {
      (o.docChanged || o.viewportChanged || o.startState.facet(Af) != o.state.facet(Af) || o.startState.field(np, !1) != o.state.field(np, !1) || ni(o.startState) != ni(o.state) || e.foldingChanged(o)) && (this.markers = this.buildMarkers(o.view));
    }
    buildMarkers(o) {
      let s = new wf();
      for (let l of o.viewportLineBlocks) {
        let u = zT(o.state, l.from, l.to) ? r : BT(o.state, l.from, l.to) ? n : null;
        u && s.add(l.from, l.from, u);
      }
      return s.finish();
    }
  }), { domEventHandlers: a } = e;
  return [
    i,
    uCt({
      class: "cm-foldGutter",
      markers(o) {
        var s;
        return ((s = o.plugin(i)) === null || s === void 0 ? void 0 : s.markers) || On.empty;
      },
      initialSpacer() {
        return new vD(e, !1);
      },
      domEventHandlers: Object.assign(Object.assign({}, a), { click: (o, s, l) => {
        if (a.click && a.click(o, s, l))
          return !0;
        let u = zT(o.state, s.from, s.to);
        if (u)
          return o.dispatch({ effects: R1.of(u) }), !0;
        let c = BT(o.state, s.from, s.to);
        return c ? (o.dispatch({ effects: l$.of(c) }), !0) : !1;
      } })
    }),
    gge()
  ];
}
const sTt = /* @__PURE__ */ rt.baseTheme({
  ".cm-foldPlaceholder": {
    backgroundColor: "#eee",
    border: "1px solid #ddd",
    color: "#888",
    borderRadius: ".2em",
    margin: "0 1px",
    padding: "0 1px",
    cursor: "pointer"
  },
  ".cm-foldGutter span": {
    padding: "0 1px",
    cursor: "pointer"
  }
});
class k1 {
  constructor(e, n) {
    this.specs = e;
    let r;
    function i(s) {
      let l = Cf.newName();
      return (r || (r = /* @__PURE__ */ Object.create(null)))["." + l] = s, l;
    }
    const a = typeof n.all == "string" ? n.all : n.all ? i(n.all) : void 0, o = n.scope;
    this.scope = o instanceof Ds ? (s) => s.prop(Nv) == o.data : o ? (s) => s == o : void 0, this.style = ige(e.map((s) => ({
      tag: s.tag,
      class: s.class || i(Object.assign({}, s, { tag: null }))
    })), {
      all: a
    }).style, this.module = r ? new Cf(r) : null, this.themeType = n.themeType;
  }
  /**
  Create a highlighter style that associates the given styles to
  the given tags. The specs must be objects that hold a style tag
  or array of tags in their `tag` property, and either a single
  `class` property providing a static CSS class (for highlighter
  that rely on external styling), or a
  [`style-mod`](https://github.com/marijnh/style-mod#documentation)-style
  set of CSS properties (which define the styling for those tags).
  
  The CSS rules created for a highlighter will be emitted in the
  order of the spec's properties. That means that for elements that
  have multiple tags associated with them, styles defined further
  down in the list will have a higher CSS precedence than styles
  defined earlier.
  */
  static define(e, n) {
    return new k1(e, n || {});
  }
}
const L4 = /* @__PURE__ */ ut.define(), yge = /* @__PURE__ */ ut.define({
  combine(t) {
    return t.length ? [t[0]] : null;
  }
});
function gD(t) {
  let e = t.facet(L4);
  return e.length ? e : t.facet(yge);
}
function bge(t, e) {
  let n = [uTt], r;
  return t instanceof k1 && (t.module && n.push(rt.styleModule.of(t.module)), r = t.themeType), e != null && e.fallback ? n.push(yge.of(t)) : r ? n.push(L4.computeN([rt.darkTheme], (i) => i.facet(rt.darkTheme) == (r == "dark") ? [t] : [])) : n.push(L4.of(t)), n;
}
class lTt {
  constructor(e) {
    this.markCache = /* @__PURE__ */ Object.create(null), this.tree = ni(e.state), this.decorations = this.buildDeco(e, gD(e.state)), this.decoratedTo = e.viewport.to;
  }
  update(e) {
    let n = ni(e.state), r = gD(e.state), i = r != gD(e.startState), { viewport: a } = e.view, o = e.changes.mapPos(this.decoratedTo, 1);
    n.length < a.to && !i && n.type == this.tree.type && o >= a.to ? (this.decorations = this.decorations.map(e.changes), this.decoratedTo = o) : (n != this.tree || e.viewportChanged || i) && (this.tree = n, this.decorations = this.buildDeco(e.view, r), this.decoratedTo = a.to);
  }
  buildDeco(e, n) {
    if (!n || !this.tree.length)
      return pt.none;
    let r = new wf();
    for (let { from: i, to: a } of e.visibleRanges)
      ICt(this.tree, n, (o, s, l) => {
        r.add(o, s, this.markCache[l] || (this.markCache[l] = pt.mark({ class: l })));
      }, i, a);
    return r.finish();
  }
}
const uTt = /* @__PURE__ */ Ff.high(/* @__PURE__ */ Ir.fromClass(lTt, {
  decorations: (t) => t.decorations
})), cTt = /* @__PURE__ */ k1.define([
  {
    tag: ce.meta,
    color: "#404740"
  },
  {
    tag: ce.link,
    textDecoration: "underline"
  },
  {
    tag: ce.heading,
    textDecoration: "underline",
    fontWeight: "bold"
  },
  {
    tag: ce.emphasis,
    fontStyle: "italic"
  },
  {
    tag: ce.strong,
    fontWeight: "bold"
  },
  {
    tag: ce.strikethrough,
    textDecoration: "line-through"
  },
  {
    tag: ce.keyword,
    color: "#708"
  },
  {
    tag: [ce.atom, ce.bool, ce.url, ce.contentSeparator, ce.labelName],
    color: "#219"
  },
  {
    tag: [ce.literal, ce.inserted],
    color: "#164"
  },
  {
    tag: [ce.string, ce.deleted],
    color: "#a11"
  },
  {
    tag: [ce.regexp, ce.escape, /* @__PURE__ */ ce.special(ce.string)],
    color: "#e40"
  },
  {
    tag: /* @__PURE__ */ ce.definition(ce.variableName),
    color: "#00f"
  },
  {
    tag: /* @__PURE__ */ ce.local(ce.variableName),
    color: "#30a"
  },
  {
    tag: [ce.typeName, ce.namespace],
    color: "#085"
  },
  {
    tag: ce.className,
    color: "#167"
  },
  {
    tag: [/* @__PURE__ */ ce.special(ce.variableName), ce.macroName],
    color: "#256"
  },
  {
    tag: /* @__PURE__ */ ce.definition(ce.propertyName),
    color: "#00c"
  },
  {
    tag: ce.comment,
    color: "#940"
  },
  {
    tag: ce.invalid,
    color: "#f00"
  }
]), fTt = /* @__PURE__ */ rt.baseTheme({
  "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" },
  "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" }
}), _ge = 1e4, Oge = "()[]{}", Sge = /* @__PURE__ */ ut.define({
  combine(t) {
    return Kl(t, {
      afterCursor: !0,
      brackets: Oge,
      maxScanDistance: _ge,
      renderMatch: pTt
    });
  }
}), dTt = /* @__PURE__ */ pt.mark({ class: "cm-matchingBracket" }), hTt = /* @__PURE__ */ pt.mark({ class: "cm-nonmatchingBracket" });
function pTt(t) {
  let e = [], n = t.matched ? dTt : hTt;
  return e.push(n.range(t.start.from, t.start.to)), t.end && e.push(n.range(t.end.from, t.end.to)), e;
}
const vTt = /* @__PURE__ */ fi.define({
  create() {
    return pt.none;
  },
  update(t, e) {
    if (!e.docChanged && !e.selection)
      return t;
    let n = [], r = e.state.facet(Sge);
    for (let i of e.state.selection.ranges) {
      if (!i.empty)
        continue;
      let a = Il(e.state, i.head, -1, r) || i.head > 0 && Il(e.state, i.head - 1, 1, r) || r.afterCursor && (Il(e.state, i.head, 1, r) || i.head < e.state.doc.length && Il(e.state, i.head + 1, -1, r));
      a && (n = n.concat(r.renderMatch(a, e.state)));
    }
    return pt.set(n, !0);
  },
  provide: (t) => rt.decorations.from(t)
}), gTt = [
  vTt,
  fTt
];
function mTt(t = {}) {
  return [Sge.of(t), gTt];
}
const yTt = /* @__PURE__ */ new rn();
function N4(t, e, n) {
  let r = t.prop(e < 0 ? rn.openedBy : rn.closedBy);
  if (r)
    return r;
  if (t.name.length == 1) {
    let i = n.indexOf(t.name);
    if (i > -1 && i % 2 == (e < 0 ? 1 : 0))
      return [n[i + e]];
  }
  return null;
}
function B4(t) {
  let e = t.type.prop(yTt);
  return e ? e(t.node) : t;
}
function Il(t, e, n, r = {}) {
  let i = r.maxScanDistance || _ge, a = r.brackets || Oge, o = ni(t), s = o.resolveInner(e, n);
  for (let l = s; l; l = l.parent) {
    let u = N4(l.type, n, a);
    if (u && l.from < l.to) {
      let c = B4(l);
      if (c && (n > 0 ? e >= c.from && e < c.to : e > c.from && e <= c.to))
        return bTt(t, e, n, l, c, u, a);
    }
  }
  return _Tt(t, e, n, o, s.type, i, a);
}
function bTt(t, e, n, r, i, a, o) {
  let s = r.parent, l = { from: i.from, to: i.to }, u = 0, c = s == null ? void 0 : s.cursor();
  if (c && (n < 0 ? c.childBefore(r.from) : c.childAfter(r.to)))
    do
      if (n < 0 ? c.to <= r.from : c.from >= r.to) {
        if (u == 0 && a.indexOf(c.type.name) > -1 && c.from < c.to) {
          let f = B4(c);
          return { start: l, end: f ? { from: f.from, to: f.to } : void 0, matched: !0 };
        } else if (N4(c.type, n, o))
          u++;
        else if (N4(c.type, -n, o)) {
          if (u == 0) {
            let f = B4(c);
            return {
              start: l,
              end: f && f.from < f.to ? { from: f.from, to: f.to } : void 0,
              matched: !1
            };
          }
          u--;
        }
      }
    while (n < 0 ? c.prevSibling() : c.nextSibling());
  return { start: l, matched: !1 };
}
function _Tt(t, e, n, r, i, a, o) {
  let s = n < 0 ? t.sliceDoc(e - 1, e) : t.sliceDoc(e, e + 1), l = o.indexOf(s);
  if (l < 0 || l % 2 == 0 != n > 0)
    return null;
  let u = { from: n < 0 ? e - 1 : e, to: n > 0 ? e + 1 : e }, c = t.doc.iterRange(e, n > 0 ? t.doc.length : 0), f = 0;
  for (let d = 0; !c.next().done && d <= a; ) {
    let h = c.value;
    n < 0 && (d += h.length);
    let p = e + d * n;
    for (let v = n > 0 ? 0 : h.length - 1, g = n > 0 ? h.length : -1; v != g; v += n) {
      let m = o.indexOf(h[v]);
      if (!(m < 0 || r.resolveInner(p + v, 1).type != i))
        if (m % 2 == 0 == n > 0)
          f++;
        else {
          if (f == 1)
            return { start: u, end: { from: p + v, to: p + v + 1 }, matched: m >> 1 == l >> 1 };
          f--;
        }
    }
    n > 0 && (d += h.length);
  }
  return c.done ? { start: u, matched: !1 } : null;
}
const OTt = /* @__PURE__ */ Object.create(null), pJ = [Va.none], vJ = [], gJ = /* @__PURE__ */ Object.create(null), STt = /* @__PURE__ */ Object.create(null);
for (let [t, e] of [
  ["variable", "variableName"],
  ["variable-2", "variableName.special"],
  ["string-2", "string.special"],
  ["def", "variableName.definition"],
  ["tag", "tagName"],
  ["attribute", "attributeName"],
  ["type", "typeName"],
  ["builtin", "variableName.standard"],
  ["qualifier", "modifier"],
  ["error", "invalid"],
  ["header", "heading"],
  ["property", "propertyName"]
])
  STt[t] = /* @__PURE__ */ xTt(OTt, e);
function mD(t, e) {
  vJ.indexOf(t) > -1 || (vJ.push(t), console.warn(e));
}
function xTt(t, e) {
  let n = [];
  for (let s of e.split(" ")) {
    let l = [];
    for (let u of s.split(".")) {
      let c = t[u] || ce[u];
      c ? typeof c == "function" ? l.length ? l = l.map(c) : mD(u, `Modifier ${u} used at start of tag`) : l.length ? mD(u, `Tag ${u} used as modifier`) : l = Array.isArray(c) ? c : [c] : mD(u, `Unknown highlighting tag ${u}`);
    }
    for (let u of l)
      n.push(u);
  }
  if (!n.length)
    return 0;
  let r = e.replace(/ /g, "_"), i = r + " " + n.map((s) => s.id), a = gJ[i];
  if (a)
    return a.id;
  let o = gJ[i] = Va.define({
    id: pJ.length,
    name: r,
    props: [pB({ [r]: n })]
  });
  return pJ.push(o), o.id;
}
ir.RTL, ir.LTR;
const wTt = (t) => {
  let { state: e } = t, n = e.doc.lineAt(e.selection.main.from), r = OB(t.state, n.from);
  return r.line ? CTt(t) : r.block ? PTt(t) : !1;
};
function _B(t, e) {
  return ({ state: n, dispatch: r }) => {
    if (n.readOnly)
      return !1;
    let i = t(e, n);
    return i ? (r(n.update(i)), !0) : !1;
  };
}
const CTt = /* @__PURE__ */ _B(
  ETt,
  0
  /* CommentOption.Toggle */
), TTt = /* @__PURE__ */ _B(
  xge,
  0
  /* CommentOption.Toggle */
), PTt = /* @__PURE__ */ _B(
  (t, e) => xge(t, e, ATt(e)),
  0
  /* CommentOption.Toggle */
);
function OB(t, e) {
  let n = t.languageDataAt("commentTokens", e);
  return n.length ? n[0] : {};
}
const ay = 50;
function $Tt(t, { open: e, close: n }, r, i) {
  let a = t.sliceDoc(r - ay, r), o = t.sliceDoc(i, i + ay), s = /\s*$/.exec(a)[0].length, l = /^\s*/.exec(o)[0].length, u = a.length - s;
  if (a.slice(u - e.length, u) == e && o.slice(l, l + n.length) == n)
    return {
      open: { pos: r - s, margin: s && 1 },
      close: { pos: i + l, margin: l && 1 }
    };
  let c, f;
  i - r <= 2 * ay ? c = f = t.sliceDoc(r, i) : (c = t.sliceDoc(r, r + ay), f = t.sliceDoc(i - ay, i));
  let d = /^\s*/.exec(c)[0].length, h = /\s*$/.exec(f)[0].length, p = f.length - h - n.length;
  return c.slice(d, d + e.length) == e && f.slice(p, p + n.length) == n ? {
    open: {
      pos: r + d + e.length,
      margin: /\s/.test(c.charAt(d + e.length)) ? 1 : 0
    },
    close: {
      pos: i - h - n.length,
      margin: /\s/.test(f.charAt(p - 1)) ? 1 : 0
    }
  } : null;
}
function ATt(t) {
  let e = [];
  for (let n of t.selection.ranges) {
    let r = t.doc.lineAt(n.from), i = n.to <= r.to ? r : t.doc.lineAt(n.to), a = e.length - 1;
    a >= 0 && e[a].to > r.from ? e[a].to = i.to : e.push({ from: r.from + /^\s*/.exec(r.text)[0].length, to: i.to });
  }
  return e;
}
function xge(t, e, n = e.selection.ranges) {
  let r = n.map((a) => OB(e, a.from).block);
  if (!r.every((a) => a))
    return null;
  let i = n.map((a, o) => $Tt(e, r[o], a.from, a.to));
  if (t != 2 && !i.every((a) => a))
    return { changes: e.changes(n.map((a, o) => i[o] ? [] : [{ from: a.from, insert: r[o].open + " " }, { from: a.to, insert: " " + r[o].close }])) };
  if (t != 1 && i.some((a) => a)) {
    let a = [];
    for (let o = 0, s; o < i.length; o++)
      if (s = i[o]) {
        let l = r[o], { open: u, close: c } = s;
        a.push({ from: u.pos - l.open.length, to: u.pos + u.margin }, { from: c.pos - c.margin, to: c.pos + l.close.length });
      }
    return { changes: a };
  }
  return null;
}
function ETt(t, e, n = e.selection.ranges) {
  let r = [], i = -1;
  for (let { from: a, to: o } of n) {
    let s = r.length, l = 1e9, u = OB(e, a).line;
    if (u) {
      for (let c = a; c <= o; ) {
        let f = e.doc.lineAt(c);
        if (f.from > i && (a == o || o > f.from)) {
          i = f.from;
          let d = /^\s*/.exec(f.text)[0].length, h = d == f.length, p = f.text.slice(d, d + u.length) == u ? d : -1;
          d < f.text.length && d < l && (l = d), r.push({ line: f, comment: p, token: u, indent: d, empty: h, single: !1 });
        }
        c = f.to + 1;
      }
      if (l < 1e9)
        for (let c = s; c < r.length; c++)
          r[c].indent < r[c].line.text.length && (r[c].indent = l);
      r.length == s + 1 && (r[s].single = !0);
    }
  }
  if (t != 2 && r.some((a) => a.comment < 0 && (!a.empty || a.single))) {
    let a = [];
    for (let { line: s, token: l, indent: u, empty: c, single: f } of r)
      (f || !c) && a.push({ from: s.from + u, insert: l + " " });
    let o = e.changes(a);
    return { changes: o, selection: e.selection.map(o, 1) };
  } else if (t != 1 && r.some((a) => a.comment >= 0)) {
    let a = [];
    for (let { line: o, comment: s, token: l } of r)
      if (s >= 0) {
        let u = o.from + s, c = u + l.length;
        o.text[c - o.from] == " " && c++, a.push({ from: u, to: c });
      }
    return { changes: a };
  }
  return null;
}
const z4 = /* @__PURE__ */ ac.define(), MTt = /* @__PURE__ */ ac.define(), ITt = /* @__PURE__ */ ut.define(), wge = /* @__PURE__ */ ut.define({
  combine(t) {
    return Kl(t, {
      minDepth: 100,
      newGroupDelay: 500,
      joinToEvent: (e, n) => n
    }, {
      minDepth: Math.max,
      newGroupDelay: Math.min,
      joinToEvent: (e, n) => (r, i) => e(r, i) || n(r, i)
    });
  }
}), Cge = /* @__PURE__ */ fi.define({
  create() {
    return Dl.empty;
  },
  update(t, e) {
    let n = e.state.facet(wge), r = e.annotation(z4);
    if (r) {
      let l = Da.fromTransaction(e, r.selection), u = r.side, c = u == 0 ? t.undone : t.done;
      return l ? c = VT(c, c.length, n.minDepth, l) : c = $ge(c, e.startState.selection), new Dl(u == 0 ? r.rest : c, u == 0 ? c : r.rest);
    }
    let i = e.annotation(MTt);
    if ((i == "full" || i == "before") && (t = t.isolate()), e.annotation(zr.addToHistory) === !1)
      return e.changes.empty ? t : t.addMapping(e.changes.desc);
    let a = Da.fromTransaction(e), o = e.annotation(zr.time), s = e.annotation(zr.userEvent);
    return a ? t = t.addChanges(a, o, s, n, e) : e.selection && (t = t.addSelection(e.startState.selection, o, s, n.newGroupDelay)), (i == "full" || i == "after") && (t = t.isolate()), t;
  },
  toJSON(t) {
    return { done: t.done.map((e) => e.toJSON()), undone: t.undone.map((e) => e.toJSON()) };
  },
  fromJSON(t) {
    return new Dl(t.done.map(Da.fromJSON), t.undone.map(Da.fromJSON));
  }
});
function DTt(t = {}) {
  return [
    Cge,
    wge.of(t),
    rt.domEventHandlers({
      beforeinput(e, n) {
        let r = e.inputType == "historyUndo" ? Tge : e.inputType == "historyRedo" ? V4 : null;
        return r ? (e.preventDefault(), r(n)) : !1;
      }
    })
  ];
}
function u$(t, e) {
  return function({ state: n, dispatch: r }) {
    if (!e && n.readOnly)
      return !1;
    let i = n.field(Cge, !1);
    if (!i)
      return !1;
    let a = i.pop(t, n, e);
    return a ? (r(a), !0) : !1;
  };
}
const Tge = /* @__PURE__ */ u$(0, !1), V4 = /* @__PURE__ */ u$(1, !1), RTt = /* @__PURE__ */ u$(0, !0), kTt = /* @__PURE__ */ u$(1, !0);
class Da {
  constructor(e, n, r, i, a) {
    this.changes = e, this.effects = n, this.mapped = r, this.startSelection = i, this.selectionsAfter = a;
  }
  setSelAfter(e) {
    return new Da(this.changes, this.effects, this.mapped, this.startSelection, e);
  }
  toJSON() {
    var e, n, r;
    return {
      changes: (e = this.changes) === null || e === void 0 ? void 0 : e.toJSON(),
      mapped: (n = this.mapped) === null || n === void 0 ? void 0 : n.toJSON(),
      startSelection: (r = this.startSelection) === null || r === void 0 ? void 0 : r.toJSON(),
      selectionsAfter: this.selectionsAfter.map((i) => i.toJSON())
    };
  }
  static fromJSON(e) {
    return new Da(e.changes && Zr.fromJSON(e.changes), [], e.mapped && Bl.fromJSON(e.mapped), e.startSelection && De.fromJSON(e.startSelection), e.selectionsAfter.map(De.fromJSON));
  }
  // This does not check `addToHistory` and such, it assumes the
  // transaction needs to be converted to an item. Returns null when
  // there are no changes or effects in the transaction.
  static fromTransaction(e, n) {
    let r = Uo;
    for (let i of e.startState.facet(ITt)) {
      let a = i(e);
      a.length && (r = r.concat(a));
    }
    return !r.length && e.changes.empty ? null : new Da(e.changes.invert(e.startState.doc), r, void 0, n || e.startState.selection, Uo);
  }
  static selection(e) {
    return new Da(void 0, Uo, void 0, void 0, e);
  }
}
function VT(t, e, n, r) {
  let i = e + 1 > n + 20 ? e - n - 1 : 0, a = t.slice(i, e);
  return a.push(r), a;
}
function LTt(t, e) {
  let n = [], r = !1;
  return t.iterChangedRanges((i, a) => n.push(i, a)), e.iterChangedRanges((i, a, o, s) => {
    for (let l = 0; l < n.length; ) {
      let u = n[l++], c = n[l++];
      s >= u && o <= c && (r = !0);
    }
  }), r;
}
function NTt(t, e) {
  return t.ranges.length == e.ranges.length && t.ranges.filter((n, r) => n.empty != e.ranges[r].empty).length === 0;
}
function Pge(t, e) {
  return t.length ? e.length ? t.concat(e) : t : e;
}
const Uo = [], BTt = 200;
function $ge(t, e) {
  if (t.length) {
    let n = t[t.length - 1], r = n.selectionsAfter.slice(Math.max(0, n.selectionsAfter.length - BTt));
    return r.length && r[r.length - 1].eq(e) ? t : (r.push(e), VT(t, t.length - 1, 1e9, n.setSelAfter(r)));
  } else
    return [Da.selection([e])];
}
function zTt(t) {
  let e = t[t.length - 1], n = t.slice();
  return n[t.length - 1] = e.setSelAfter(e.selectionsAfter.slice(0, e.selectionsAfter.length - 1)), n;
}
function yD(t, e) {
  if (!t.length)
    return t;
  let n = t.length, r = Uo;
  for (; n; ) {
    let i = VTt(t[n - 1], e, r);
    if (i.changes && !i.changes.empty || i.effects.length) {
      let a = t.slice(0, n);
      return a[n - 1] = i, a;
    } else
      e = i.mapped, n--, r = i.selectionsAfter;
  }
  return r.length ? [Da.selection(r)] : Uo;
}
function VTt(t, e, n) {
  let r = Pge(t.selectionsAfter.length ? t.selectionsAfter.map((s) => s.map(e)) : Uo, n);
  if (!t.changes)
    return Da.selection(r);
  let i = t.changes.map(e), a = e.mapDesc(t.changes, !0), o = t.mapped ? t.mapped.composeDesc(a) : a;
  return new Da(i, zt.mapEffects(t.effects, e), o, t.startSelection.map(a), r);
}
const FTt = /^(input\.type|delete)($|\.)/;
class Dl {
  constructor(e, n, r = 0, i = void 0) {
    this.done = e, this.undone = n, this.prevTime = r, this.prevUserEvent = i;
  }
  isolate() {
    return this.prevTime ? new Dl(this.done, this.undone) : this;
  }
  addChanges(e, n, r, i, a) {
    let o = this.done, s = o[o.length - 1];
    return s && s.changes && !s.changes.empty && e.changes && (!r || FTt.test(r)) && (!s.selectionsAfter.length && n - this.prevTime < i.newGroupDelay && i.joinToEvent(a, LTt(s.changes, e.changes)) || // For compose (but not compose.start) events, always join with previous event
    r == "input.type.compose") ? o = VT(o, o.length - 1, i.minDepth, new Da(e.changes.compose(s.changes), Pge(e.effects, s.effects), s.mapped, s.startSelection, Uo)) : o = VT(o, o.length, i.minDepth, e), new Dl(o, Uo, n, r);
  }
  addSelection(e, n, r, i) {
    let a = this.done.length ? this.done[this.done.length - 1].selectionsAfter : Uo;
    return a.length > 0 && n - this.prevTime < i && r == this.prevUserEvent && r && /^select($|\.)/.test(r) && NTt(a[a.length - 1], e) ? this : new Dl($ge(this.done, e), this.undone, n, r);
  }
  addMapping(e) {
    return new Dl(yD(this.done, e), yD(this.undone, e), this.prevTime, this.prevUserEvent);
  }
  pop(e, n, r) {
    let i = e == 0 ? this.done : this.undone;
    if (i.length == 0)
      return null;
    let a = i[i.length - 1], o = a.selectionsAfter[0] || n.selection;
    if (r && a.selectionsAfter.length)
      return n.update({
        selection: a.selectionsAfter[a.selectionsAfter.length - 1],
        annotations: z4.of({ side: e, rest: zTt(i), selection: o }),
        userEvent: e == 0 ? "select.undo" : "select.redo",
        scrollIntoView: !0
      });
    if (a.changes) {
      let s = i.length == 1 ? Uo : i.slice(0, i.length - 1);
      return a.mapped && (s = yD(s, a.mapped)), n.update({
        changes: a.changes,
        selection: a.startSelection,
        effects: a.effects,
        annotations: z4.of({ side: e, rest: s, selection: o }),
        filter: !1,
        userEvent: e == 0 ? "undo" : "redo",
        scrollIntoView: !0
      });
    } else
      return null;
  }
}
Dl.empty = /* @__PURE__ */ new Dl(Uo, Uo);
const WTt = [
  { key: "Mod-z", run: Tge, preventDefault: !0 },
  { key: "Mod-y", mac: "Mod-Shift-z", run: V4, preventDefault: !0 },
  { linux: "Ctrl-Shift-z", run: V4, preventDefault: !0 },
  { key: "Mod-u", run: RTt, preventDefault: !0 },
  { key: "Alt-u", mac: "Mod-Shift-u", run: kTt, preventDefault: !0 }
];
function Wm(t, e) {
  return De.create(t.ranges.map(e), t.mainIndex);
}
function eu(t, e) {
  return t.update({ selection: e, scrollIntoView: !0, userEvent: "select" });
}
function nl({ state: t, dispatch: e }, n) {
  let r = Wm(t.selection, n);
  return r.eq(t.selection, !0) ? !1 : (e(eu(t, r)), !0);
}
function c$(t, e) {
  return De.cursor(e ? t.to : t.from);
}
function Age(t, e) {
  return nl(t, (n) => n.empty ? t.moveByChar(n, e) : c$(n, e));
}
function Hi(t) {
  return t.textDirectionAt(t.state.selection.main.head) == ir.LTR;
}
const Ege = (t) => Age(t, !Hi(t)), Mge = (t) => Age(t, Hi(t));
function Ige(t, e) {
  return nl(t, (n) => n.empty ? t.moveByGroup(n, e) : c$(n, e));
}
const QTt = (t) => Ige(t, !Hi(t)), HTt = (t) => Ige(t, Hi(t));
function GTt(t, e, n) {
  if (e.type.prop(n))
    return !0;
  let r = e.to - e.from;
  return r && (r > 2 || /[^\s,.;:]/.test(t.sliceDoc(e.from, e.to))) || e.firstChild;
}
function f$(t, e, n) {
  let r = ni(t).resolveInner(e.head), i = n ? rn.closedBy : rn.openedBy;
  for (let l = e.head; ; ) {
    let u = n ? r.childAfter(l) : r.childBefore(l);
    if (!u)
      break;
    GTt(t, u, i) ? r = u : l = n ? u.to : u.from;
  }
  let a = r.type.prop(i), o, s;
  return a && (o = n ? Il(t, r.from, 1) : Il(t, r.to, -1)) && o.matched ? s = n ? o.end.to : o.end.from : s = n ? r.to : r.from, De.cursor(s, n ? -1 : 1);
}
const jTt = (t) => nl(t, (e) => f$(t.state, e, !Hi(t))), ZTt = (t) => nl(t, (e) => f$(t.state, e, Hi(t)));
function Dge(t, e) {
  return nl(t, (n) => {
    if (!n.empty)
      return c$(n, e);
    let r = t.moveVertically(n, e);
    return r.head != n.head ? r : t.moveToLineBoundary(n, e);
  });
}
const Rge = (t) => Dge(t, !1), kge = (t) => Dge(t, !0);
function Lge(t) {
  let e = t.scrollDOM.clientHeight < t.scrollDOM.scrollHeight - 2, n = 0, r = 0, i;
  if (e) {
    for (let a of t.state.facet(rt.scrollMargins)) {
      let o = a(t);
      o != null && o.top && (n = Math.max(o == null ? void 0 : o.top, n)), o != null && o.bottom && (r = Math.max(o == null ? void 0 : o.bottom, r));
    }
    i = t.scrollDOM.clientHeight - n - r;
  } else
    i = (t.dom.ownerDocument.defaultView || window).innerHeight;
  return {
    marginTop: n,
    marginBottom: r,
    selfScroll: e,
    height: Math.max(t.defaultLineHeight, i - 5)
  };
}
function Nge(t, e) {
  let n = Lge(t), { state: r } = t, i = Wm(r.selection, (o) => o.empty ? t.moveVertically(o, e, n.height) : c$(o, e));
  if (i.eq(r.selection))
    return !1;
  let a;
  if (n.selfScroll) {
    let o = t.coordsAtPos(r.selection.main.head), s = t.scrollDOM.getBoundingClientRect(), l = s.top + n.marginTop, u = s.bottom - n.marginBottom;
    o && o.top > l && o.bottom < u && (a = rt.scrollIntoView(i.main.head, { y: "start", yMargin: o.top - l }));
  }
  return t.dispatch(eu(r, i), { effects: a }), !0;
}
const mJ = (t) => Nge(t, !1), F4 = (t) => Nge(t, !0);
function Wf(t, e, n) {
  let r = t.lineBlockAt(e.head), i = t.moveToLineBoundary(e, n);
  if (i.head == e.head && i.head != (n ? r.to : r.from) && (i = t.moveToLineBoundary(e, n, !1)), !n && i.head == r.from && r.length) {
    let a = /^\s*/.exec(t.state.sliceDoc(r.from, Math.min(r.from + 100, r.to)))[0].length;
    a && e.head != r.from + a && (i = De.cursor(r.from + a));
  }
  return i;
}
const UTt = (t) => nl(t, (e) => Wf(t, e, !0)), XTt = (t) => nl(t, (e) => Wf(t, e, !1)), YTt = (t) => nl(t, (e) => Wf(t, e, !Hi(t))), qTt = (t) => nl(t, (e) => Wf(t, e, Hi(t))), KTt = (t) => nl(t, (e) => De.cursor(t.lineBlockAt(e.head).from, 1)), JTt = (t) => nl(t, (e) => De.cursor(t.lineBlockAt(e.head).to, -1));
function e2t(t, e, n) {
  let r = !1, i = Wm(t.selection, (a) => {
    let o = Il(t, a.head, -1) || Il(t, a.head, 1) || a.head > 0 && Il(t, a.head - 1, 1) || a.head < t.doc.length && Il(t, a.head + 1, -1);
    if (!o || !o.end)
      return a;
    r = !0;
    let s = o.start.from == a.head ? o.end.to : o.end.from;
    return De.cursor(s);
  });
  return r ? (e(eu(t, i)), !0) : !1;
}
const t2t = ({ state: t, dispatch: e }) => e2t(t, e);
function gs(t, e) {
  let n = Wm(t.state.selection, (r) => {
    let i = e(r);
    return De.range(r.anchor, i.head, i.goalColumn, i.bidiLevel || void 0);
  });
  return n.eq(t.state.selection) ? !1 : (t.dispatch(eu(t.state, n)), !0);
}
function Bge(t, e) {
  return gs(t, (n) => t.moveByChar(n, e));
}
const zge = (t) => Bge(t, !Hi(t)), Vge = (t) => Bge(t, Hi(t));
function Fge(t, e) {
  return gs(t, (n) => t.moveByGroup(n, e));
}
const n2t = (t) => Fge(t, !Hi(t)), r2t = (t) => Fge(t, Hi(t)), i2t = (t) => gs(t, (e) => f$(t.state, e, !Hi(t))), a2t = (t) => gs(t, (e) => f$(t.state, e, Hi(t)));
function Wge(t, e) {
  return gs(t, (n) => t.moveVertically(n, e));
}
const Qge = (t) => Wge(t, !1), Hge = (t) => Wge(t, !0);
function Gge(t, e) {
  return gs(t, (n) => t.moveVertically(n, e, Lge(t).height));
}
const yJ = (t) => Gge(t, !1), bJ = (t) => Gge(t, !0), o2t = (t) => gs(t, (e) => Wf(t, e, !0)), s2t = (t) => gs(t, (e) => Wf(t, e, !1)), l2t = (t) => gs(t, (e) => Wf(t, e, !Hi(t))), u2t = (t) => gs(t, (e) => Wf(t, e, Hi(t))), c2t = (t) => gs(t, (e) => De.cursor(t.lineBlockAt(e.head).from)), f2t = (t) => gs(t, (e) => De.cursor(t.lineBlockAt(e.head).to)), _J = ({ state: t, dispatch: e }) => (e(eu(t, { anchor: 0 })), !0), OJ = ({ state: t, dispatch: e }) => (e(eu(t, { anchor: t.doc.length })), !0), SJ = ({ state: t, dispatch: e }) => (e(eu(t, { anchor: t.selection.main.anchor, head: 0 })), !0), xJ = ({ state: t, dispatch: e }) => (e(eu(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), d2t = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), h2t = ({ state: t, dispatch: e }) => {
  let n = d$(t).map(({ from: r, to: i }) => De.range(r, Math.min(i + 1, t.doc.length)));
  return e(t.update({ selection: De.create(n), userEvent: "select" })), !0;
}, p2t = ({ state: t, dispatch: e }) => {
  let n = Wm(t.selection, (r) => {
    var i;
    let a = ni(t).resolveStack(r.from, 1);
    for (let o = a; o; o = o.next) {
      let { node: s } = o;
      if ((s.from < r.from && s.to >= r.to || s.to > r.to && s.from <= r.from) && (!((i = s.parent) === null || i === void 0) && i.parent))
        return De.range(s.to, s.from);
    }
    return r;
  });
  return e(eu(t, n)), !0;
}, v2t = ({ state: t, dispatch: e }) => {
  let n = t.selection, r = null;
  return n.ranges.length > 1 ? r = De.create([n.main]) : n.main.empty || (r = De.create([De.cursor(n.main.head)])), r ? (e(eu(t, r)), !0) : !1;
};
function L1(t, e) {
  if (t.state.readOnly)
    return !1;
  let n = "delete.selection", { state: r } = t, i = r.changeByRange((a) => {
    let { from: o, to: s } = a;
    if (o == s) {
      let l = e(a);
      l < o ? (n = "delete.backward", l = xx(t, l, !1)) : l > o && (n = "delete.forward", l = xx(t, l, !0)), o = Math.min(o, l), s = Math.max(s, l);
    } else
      o = xx(t, o, !1), s = xx(t, s, !0);
    return o == s ? { range: a } : { changes: { from: o, to: s }, range: De.cursor(o, o < a.head ? -1 : 1) };
  });
  return i.changes.empty ? !1 : (t.dispatch(r.update(i, {
    scrollIntoView: !0,
    userEvent: n,
    effects: n == "delete.selection" ? rt.announce.of(r.phrase("Selection deleted")) : void 0
  })), !0);
}
function xx(t, e, n) {
  if (t instanceof rt)
    for (let r of t.state.facet(rt.atomicRanges).map((i) => i(t)))
      r.between(e, e, (i, a) => {
        i < e && a > e && (e = n ? a : i);
      });
  return e;
}
const jge = (t, e, n) => L1(t, (r) => {
  let i = r.from, { state: a } = t, o = a.doc.lineAt(i), s, l;
  if (n && !e && i > o.from && i < o.from + 200 && !/[^ \t]/.test(s = o.text.slice(0, i - o.from))) {
    if (s[s.length - 1] == "	")
      return i - 1;
    let u = Fm(s, a.tabSize), c = u % NT(a) || NT(a);
    for (let f = 0; f < c && s[s.length - 1 - f] == " "; f++)
      i--;
    l = i;
  } else
    l = wi(o.text, i - o.from, e, e) + o.from, l == i && o.number != (e ? a.doc.lines : 1) ? l += e ? 1 : -1 : !e && /[\ufe00-\ufe0f]/.test(o.text.slice(l - o.from, i - o.from)) && (l = wi(o.text, l - o.from, !1, !1) + o.from);
  return l;
}), W4 = (t) => jge(t, !1, !0), Zge = (t) => jge(t, !0, !1), Uge = (t, e) => L1(t, (n) => {
  let r = n.head, { state: i } = t, a = i.doc.lineAt(r), o = i.charCategorizer(r);
  for (let s = null; ; ) {
    if (r == (e ? a.to : a.from)) {
      r == n.head && a.number != (e ? i.doc.lines : 1) && (r += e ? 1 : -1);
      break;
    }
    let l = wi(a.text, r - a.from, e) + a.from, u = a.text.slice(Math.min(r, l) - a.from, Math.max(r, l) - a.from), c = o(u);
    if (s != null && c != s)
      break;
    (u != " " || r != n.head) && (s = c), r = l;
  }
  return r;
}), Xge = (t) => Uge(t, !1), g2t = (t) => Uge(t, !0), m2t = (t) => L1(t, (e) => {
  let n = t.lineBlockAt(e.head).to;
  return e.head < n ? n : Math.min(t.state.doc.length, e.head + 1);
}), y2t = (t) => L1(t, (e) => {
  let n = t.moveToLineBoundary(e, !1).head;
  return e.head > n ? n : Math.max(0, e.head - 1);
}), b2t = (t) => L1(t, (e) => {
  let n = t.moveToLineBoundary(e, !0).head;
  return e.head < n ? n : Math.min(t.state.doc.length, e.head + 1);
}), _2t = ({ state: t, dispatch: e }) => {
  if (t.readOnly)
    return !1;
  let n = t.changeByRange((r) => ({
    changes: { from: r.from, to: r.to, insert: Sn.of(["", ""]) },
    range: De.cursor(r.from)
  }));
  return e(t.update(n, { scrollIntoView: !0, userEvent: "input" })), !0;
}, O2t = ({ state: t, dispatch: e }) => {
  if (t.readOnly)
    return !1;
  let n = t.changeByRange((r) => {
    if (!r.empty || r.from == 0 || r.from == t.doc.length)
      return { range: r };
    let i = r.from, a = t.doc.lineAt(i), o = i == a.from ? i - 1 : wi(a.text, i - a.from, !1) + a.from, s = i == a.to ? i + 1 : wi(a.text, i - a.from, !0) + a.from;
    return {
      changes: { from: o, to: s, insert: t.doc.slice(i, s).append(t.doc.slice(o, i)) },
      range: De.cursor(s)
    };
  });
  return n.changes.empty ? !1 : (e(t.update(n, { scrollIntoView: !0, userEvent: "move.character" })), !0);
};
function d$(t) {
  let e = [], n = -1;
  for (let r of t.selection.ranges) {
    let i = t.doc.lineAt(r.from), a = t.doc.lineAt(r.to);
    if (!r.empty && r.to == a.from && (a = t.doc.lineAt(r.to - 1)), n >= i.number) {
      let o = e[e.length - 1];
      o.to = a.to, o.ranges.push(r);
    } else
      e.push({ from: i.from, to: a.to, ranges: [r] });
    n = a.number + 1;
  }
  return e;
}
function Yge(t, e, n) {
  if (t.readOnly)
    return !1;
  let r = [], i = [];
  for (let a of d$(t)) {
    if (n ? a.to == t.doc.length : a.from == 0)
      continue;
    let o = t.doc.lineAt(n ? a.to + 1 : a.from - 1), s = o.length + 1;
    if (n) {
      r.push({ from: a.to, to: o.to }, { from: a.from, insert: o.text + t.lineBreak });
      for (let l of a.ranges)
        i.push(De.range(Math.min(t.doc.length, l.anchor + s), Math.min(t.doc.length, l.head + s)));
    } else {
      r.push({ from: o.from, to: a.from }, { from: a.to, insert: t.lineBreak + o.text });
      for (let l of a.ranges)
        i.push(De.range(l.anchor - s, l.head - s));
    }
  }
  return r.length ? (e(t.update({
    changes: r,
    scrollIntoView: !0,
    selection: De.create(i, t.selection.mainIndex),
    userEvent: "move.line"
  })), !0) : !1;
}
const S2t = ({ state: t, dispatch: e }) => Yge(t, e, !1), x2t = ({ state: t, dispatch: e }) => Yge(t, e, !0);
function qge(t, e, n) {
  if (t.readOnly)
    return !1;
  let r = [];
  for (let i of d$(t))
    n ? r.push({ from: i.from, insert: t.doc.slice(i.from, i.to) + t.lineBreak }) : r.push({ from: i.to, insert: t.lineBreak + t.doc.slice(i.from, i.to) });
  return e(t.update({ changes: r, scrollIntoView: !0, userEvent: "input.copyline" })), !0;
}
const w2t = ({ state: t, dispatch: e }) => qge(t, e, !1), C2t = ({ state: t, dispatch: e }) => qge(t, e, !0), T2t = (t) => {
  if (t.state.readOnly)
    return !1;
  let { state: e } = t, n = e.changes(d$(e).map(({ from: i, to: a }) => (i > 0 ? i-- : a < e.doc.length && a++, { from: i, to: a }))), r = Wm(e.selection, (i) => {
    let a;
    if (t.lineWrapping) {
      let o = t.lineBlockAt(i.head), s = t.coordsAtPos(i.head, i.assoc || 1);
      s && (a = o.bottom + t.documentTop - s.bottom + t.defaultLineHeight / 2);
    }
    return t.moveVertically(i, !0, a);
  }).map(n);
  return t.dispatch({ changes: n, selection: r, scrollIntoView: !0, userEvent: "delete.line" }), !0;
};
function P2t(t, e) {
  if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1)))
    return { from: e, to: e };
  let n = ni(t).resolveInner(e), r = n.childBefore(e), i = n.childAfter(e), a;
  return r && i && r.to <= e && i.from >= e && (a = r.type.prop(rn.closedBy)) && a.indexOf(i.name) > -1 && t.doc.lineAt(r.to).from == t.doc.lineAt(i.from).from && !/\S/.test(t.sliceDoc(r.to, i.from)) ? { from: r.to, to: i.from } : null;
}
const $2t = /* @__PURE__ */ Kge(!1), A2t = /* @__PURE__ */ Kge(!0);
function Kge(t) {
  return ({ state: e, dispatch: n }) => {
    if (e.readOnly)
      return !1;
    let r = e.changeByRange((i) => {
      let { from: a, to: o } = i, s = e.doc.lineAt(a), l = !t && a == o && P2t(e, a);
      t && (a = o = (o <= s.to ? s : e.doc.lineAt(o)).to);
      let u = new s$(e, { simulateBreak: a, simulateDoubleBreak: !!l }), c = gB(u, a);
      for (c == null && (c = Fm(/^\s*/.exec(e.doc.lineAt(a).text)[0], e.tabSize)); o < s.to && /\s/.test(s.text[o - s.from]); )
        o++;
      l ? { from: a, to: o } = l : a > s.from && a < s.from + 100 && !/\S/.test(s.text.slice(0, a)) && (a = s.from);
      let f = ["", C_(e, c)];
      return l && f.push(C_(e, u.lineIndent(s.from, -1))), {
        changes: { from: a, to: o, insert: Sn.of(f) },
        range: De.cursor(a + 1 + f[1].length)
      };
    });
    return n(e.update(r, { scrollIntoView: !0, userEvent: "input" })), !0;
  };
}
function SB(t, e) {
  let n = -1;
  return t.changeByRange((r) => {
    let i = [];
    for (let o = r.from; o <= r.to; ) {
      let s = t.doc.lineAt(o);
      s.number > n && (r.empty || r.to > s.from) && (e(s, i, r), n = s.number), o = s.to + 1;
    }
    let a = t.changes(i);
    return {
      changes: i,
      range: De.range(a.mapPos(r.anchor, 1), a.mapPos(r.head, 1))
    };
  });
}
const E2t = ({ state: t, dispatch: e }) => {
  if (t.readOnly)
    return !1;
  let n = /* @__PURE__ */ Object.create(null), r = new s$(t, { overrideIndentation: (a) => {
    let o = n[a];
    return o ?? -1;
  } }), i = SB(t, (a, o, s) => {
    let l = gB(r, a.from);
    if (l == null)
      return;
    /\S/.test(a.text) || (l = 0);
    let u = /^\s*/.exec(a.text)[0], c = C_(t, l);
    (u != c || s.from < a.from + u.length) && (n[a.from] = l, o.push({ from: a.from, to: a.from + u.length, insert: c }));
  });
  return i.changes.empty || e(t.update(i, { userEvent: "indent" })), !0;
}, Jge = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(SB(t, (n, r) => {
  r.push({ from: n.from, insert: t.facet(D1) });
}), { userEvent: "input.indent" })), !0), eme = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(SB(t, (n, r) => {
  let i = /^\s*/.exec(n.text)[0];
  if (!i)
    return;
  let a = Fm(i, t.tabSize), o = 0, s = C_(t, Math.max(0, a - NT(t)));
  for (; o < i.length && o < s.length && i.charCodeAt(o) == s.charCodeAt(o); )
    o++;
  r.push({ from: n.from + o, to: n.from + i.length, insert: s.slice(o) });
}), { userEvent: "delete.dedent" })), !0), M2t = (t) => (t.setTabFocusMode(), !0), I2t = [
  { key: "Ctrl-b", run: Ege, shift: zge, preventDefault: !0 },
  { key: "Ctrl-f", run: Mge, shift: Vge },
  { key: "Ctrl-p", run: Rge, shift: Qge },
  { key: "Ctrl-n", run: kge, shift: Hge },
  { key: "Ctrl-a", run: KTt, shift: c2t },
  { key: "Ctrl-e", run: JTt, shift: f2t },
  { key: "Ctrl-d", run: Zge },
  { key: "Ctrl-h", run: W4 },
  { key: "Ctrl-k", run: m2t },
  { key: "Ctrl-Alt-h", run: Xge },
  { key: "Ctrl-o", run: _2t },
  { key: "Ctrl-t", run: O2t },
  { key: "Ctrl-v", run: F4 }
], D2t = /* @__PURE__ */ [
  { key: "ArrowLeft", run: Ege, shift: zge, preventDefault: !0 },
  { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: QTt, shift: n2t, preventDefault: !0 },
  { mac: "Cmd-ArrowLeft", run: YTt, shift: l2t, preventDefault: !0 },
  { key: "ArrowRight", run: Mge, shift: Vge, preventDefault: !0 },
  { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: HTt, shift: r2t, preventDefault: !0 },
  { mac: "Cmd-ArrowRight", run: qTt, shift: u2t, preventDefault: !0 },
  { key: "ArrowUp", run: Rge, shift: Qge, preventDefault: !0 },
  { mac: "Cmd-ArrowUp", run: _J, shift: SJ },
  { mac: "Ctrl-ArrowUp", run: mJ, shift: yJ },
  { key: "ArrowDown", run: kge, shift: Hge, preventDefault: !0 },
  { mac: "Cmd-ArrowDown", run: OJ, shift: xJ },
  { mac: "Ctrl-ArrowDown", run: F4, shift: bJ },
  { key: "PageUp", run: mJ, shift: yJ },
  { key: "PageDown", run: F4, shift: bJ },
  { key: "Home", run: XTt, shift: s2t, preventDefault: !0 },
  { key: "Mod-Home", run: _J, shift: SJ },
  { key: "End", run: UTt, shift: o2t, preventDefault: !0 },
  { key: "Mod-End", run: OJ, shift: xJ },
  { key: "Enter", run: $2t },
  { key: "Mod-a", run: d2t },
  { key: "Backspace", run: W4, shift: W4 },
  { key: "Delete", run: Zge },
  { key: "Mod-Backspace", mac: "Alt-Backspace", run: Xge },
  { key: "Mod-Delete", mac: "Alt-Delete", run: g2t },
  { mac: "Mod-Backspace", run: y2t },
  { mac: "Mod-Delete", run: b2t }
].concat(/* @__PURE__ */ I2t.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), R2t = /* @__PURE__ */ [
  { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: jTt, shift: i2t },
  { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: ZTt, shift: a2t },
  { key: "Alt-ArrowUp", run: S2t },
  { key: "Shift-Alt-ArrowUp", run: w2t },
  { key: "Alt-ArrowDown", run: x2t },
  { key: "Shift-Alt-ArrowDown", run: C2t },
  { key: "Escape", run: v2t },
  { key: "Mod-Enter", run: A2t },
  { key: "Alt-l", mac: "Ctrl-l", run: h2t },
  { key: "Mod-i", run: p2t, preventDefault: !0 },
  { key: "Mod-[", run: eme },
  { key: "Mod-]", run: Jge },
  { key: "Mod-Alt-\\", run: E2t },
  { key: "Shift-Mod-k", run: T2t },
  { key: "Shift-Mod-\\", run: t2t },
  { key: "Mod-/", run: wTt },
  { key: "Alt-A", run: TTt },
  { key: "Ctrl-m", mac: "Shift-Alt-m", run: M2t }
].concat(D2t), k2t = { key: "Tab", run: Jge, shift: eme };
function Yn() {
  var t = arguments[0];
  typeof t == "string" && (t = document.createElement(t));
  var e = 1, n = arguments[1];
  if (n && typeof n == "object" && n.nodeType == null && !Array.isArray(n)) {
    for (var r in n) if (Object.prototype.hasOwnProperty.call(n, r)) {
      var i = n[r];
      typeof i == "string" ? t.setAttribute(r, i) : i != null && (t[r] = i);
    }
    e++;
  }
  for (; e < arguments.length; e++) tme(t, arguments[e]);
  return t;
}
function tme(t, e) {
  if (typeof e == "string")
    t.appendChild(document.createTextNode(e));
  else if (e != null) if (e.nodeType != null)
    t.appendChild(e);
  else if (Array.isArray(e))
    for (var n = 0; n < e.length; n++) tme(t, e[n]);
  else
    throw new RangeError("Unsupported child node: " + e);
}
const wJ = typeof String.prototype.normalize == "function" ? (t) => t.normalize("NFKD") : (t) => t;
class nm {
  /**
  Create a text cursor. The query is the search string, `from` to
  `to` provides the region to search.
  
  When `normalize` is given, it will be called, on both the query
  string and the content it is matched against, before comparing.
  You can, for example, create a case-insensitive search by
  passing `s => s.toLowerCase()`.
  
  Text is always normalized with
  [`.normalize("NFKD")`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
  (when supported).
  */
  constructor(e, n, r = 0, i = e.length, a, o) {
    this.test = o, this.value = { from: 0, to: 0 }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e.iterRange(r, i), this.bufferStart = r, this.normalize = a ? (s) => a(wJ(s)) : wJ, this.query = this.normalize(n);
  }
  peek() {
    if (this.bufferPos == this.buffer.length) {
      if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done)
        return -1;
      this.bufferPos = 0, this.buffer = this.iter.value;
    }
    return bi(this.buffer, this.bufferPos);
  }
  /**
  Look for the next match. Updates the iterator's
  [`value`](https://codemirror.net/6/docs/ref/#search.SearchCursor.value) and
  [`done`](https://codemirror.net/6/docs/ref/#search.SearchCursor.done) properties. Should be called
  at least once before using the cursor.
  */
  next() {
    for (; this.matches.length; )
      this.matches.pop();
    return this.nextOverlapping();
  }
  /**
  The `next` method will ignore matches that partially overlap a
  previous match. This method behaves like `next`, but includes
  such matches.
  */
  nextOverlapping() {
    for (; ; ) {
      let e = this.peek();
      if (e < 0)
        return this.done = !0, this;
      let n = K6(e), r = this.bufferStart + this.bufferPos;
      this.bufferPos += jo(e);
      let i = this.normalize(n);
      for (let a = 0, o = r; ; a++) {
        let s = i.charCodeAt(a), l = this.match(s, o, this.bufferPos + this.bufferStart);
        if (a == i.length - 1) {
          if (l)
            return this.value = l, this;
          break;
        }
        o == r && a < n.length && n.charCodeAt(a) == s && o++;
      }
    }
  }
  match(e, n, r) {
    let i = null;
    for (let a = 0; a < this.matches.length; a += 2) {
      let o = this.matches[a], s = !1;
      this.query.charCodeAt(o) == e && (o == this.query.length - 1 ? i = { from: this.matches[a + 1], to: r } : (this.matches[a]++, s = !0)), s || (this.matches.splice(a, 2), a -= 2);
    }
    return this.query.charCodeAt(0) == e && (this.query.length == 1 ? i = { from: n, to: r } : this.matches.push(1, n)), i && this.test && !this.test(i.from, i.to, this.buffer, this.bufferStart) && (i = null), i;
  }
}
typeof Symbol < "u" && (nm.prototype[Symbol.iterator] = function() {
  return this;
});
const nme = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, xB = "gm" + (/x/.unicode == null ? "" : "u");
class rme {
  /**
  Create a cursor that will search the given range in the given
  document. `query` should be the raw pattern (as you'd pass it to
  `new RegExp`).
  */
  constructor(e, n, r, i = 0, a = e.length) {
    if (this.text = e, this.to = a, this.curLine = "", this.done = !1, this.value = nme, /\\[sWDnr]|\n|\r|\[\^/.test(n))
      return new ime(e, n, r, i, a);
    this.re = new RegExp(n, xB + (r != null && r.ignoreCase ? "i" : "")), this.test = r == null ? void 0 : r.test, this.iter = e.iter();
    let o = e.lineAt(i);
    this.curLineStart = o.from, this.matchPos = FT(e, i), this.getLine(this.curLineStart);
  }
  getLine(e) {
    this.iter.next(e), this.iter.lineBreak ? this.curLine = "" : (this.curLine = this.iter.value, this.curLineStart + this.curLine.length > this.to && (this.curLine = this.curLine.slice(0, this.to - this.curLineStart)), this.iter.next());
  }
  nextLine() {
    this.curLineStart = this.curLineStart + this.curLine.length + 1, this.curLineStart > this.to ? this.curLine = "" : this.getLine(0);
  }
  /**
  Move to the next match, if there is one.
  */
  next() {
    for (let e = this.matchPos - this.curLineStart; ; ) {
      this.re.lastIndex = e;
      let n = this.matchPos <= this.to && this.re.exec(this.curLine);
      if (n) {
        let r = this.curLineStart + n.index, i = r + n[0].length;
        if (this.matchPos = FT(this.text, i + (r == i ? 1 : 0)), r == this.curLineStart + this.curLine.length && this.nextLine(), (r < i || r > this.value.to) && (!this.test || this.test(r, i, n)))
          return this.value = { from: r, to: i, match: n }, this;
        e = this.matchPos - this.curLineStart;
      } else if (this.curLineStart + this.curLine.length < this.to)
        this.nextLine(), e = 0;
      else
        return this.done = !0, this;
    }
  }
}
const bD = /* @__PURE__ */ new WeakMap();
class sg {
  constructor(e, n) {
    this.from = e, this.text = n;
  }
  get to() {
    return this.from + this.text.length;
  }
  static get(e, n, r) {
    let i = bD.get(e);
    if (!i || i.from >= r || i.to <= n) {
      let s = new sg(n, e.sliceString(n, r));
      return bD.set(e, s), s;
    }
    if (i.from == n && i.to == r)
      return i;
    let { text: a, from: o } = i;
    return o > n && (a = e.sliceString(n, o) + a, o = n), i.to < r && (a += e.sliceString(i.to, r)), bD.set(e, new sg(o, a)), new sg(n, a.slice(n - o, r - o));
  }
}
class ime {
  constructor(e, n, r, i, a) {
    this.text = e, this.to = a, this.done = !1, this.value = nme, this.matchPos = FT(e, i), this.re = new RegExp(n, xB + (r != null && r.ignoreCase ? "i" : "")), this.test = r == null ? void 0 : r.test, this.flat = sg.get(e, i, this.chunkEnd(
      i + 5e3
      /* Chunk.Base */
    ));
  }
  chunkEnd(e) {
    return e >= this.to ? this.to : this.text.lineAt(e).to;
  }
  next() {
    for (; ; ) {
      let e = this.re.lastIndex = this.matchPos - this.flat.from, n = this.re.exec(this.flat.text);
      if (n && !n[0] && n.index == e && (this.re.lastIndex = e + 1, n = this.re.exec(this.flat.text)), n) {
        let r = this.flat.from + n.index, i = r + n[0].length;
        if ((this.flat.to >= this.to || n.index + n[0].length <= this.flat.text.length - 10) && (!this.test || this.test(r, i, n)))
          return this.value = { from: r, to: i, match: n }, this.matchPos = FT(this.text, i + (r == i ? 1 : 0)), this;
      }
      if (this.flat.to == this.to)
        return this.done = !0, this;
      this.flat = sg.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
    }
  }
}
typeof Symbol < "u" && (rme.prototype[Symbol.iterator] = ime.prototype[Symbol.iterator] = function() {
  return this;
});
function L2t(t) {
  try {
    return new RegExp(t, xB), !0;
  } catch {
    return !1;
  }
}
function FT(t, e) {
  if (e >= t.length)
    return e;
  let n = t.lineAt(e), r;
  for (; e < n.to && (r = n.text.charCodeAt(e - n.from)) >= 56320 && r < 57344; )
    e++;
  return e;
}
function Q4(t) {
  let e = String(t.state.doc.lineAt(t.state.selection.main.head).number), n = Yn("input", { class: "cm-textfield", name: "line", value: e }), r = Yn("form", {
    class: "cm-gotoLine",
    onkeydown: (a) => {
      a.keyCode == 27 ? (a.preventDefault(), t.dispatch({ effects: WT.of(!1) }), t.focus()) : a.keyCode == 13 && (a.preventDefault(), i());
    },
    onsubmit: (a) => {
      a.preventDefault(), i();
    }
  }, Yn("label", t.state.phrase("Go to line"), ": ", n), " ", Yn("button", { class: "cm-button", type: "submit" }, t.state.phrase("go")));
  function i() {
    let a = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);
    if (!a)
      return;
    let { state: o } = t, s = o.doc.lineAt(o.selection.main.head), [, l, u, c, f] = a, d = c ? +c.slice(1) : 0, h = u ? +u : s.number;
    if (u && f) {
      let g = h / 100;
      l && (g = g * (l == "-" ? -1 : 1) + s.number / o.doc.lines), h = Math.round(o.doc.lines * g);
    } else u && l && (h = h * (l == "-" ? -1 : 1) + s.number);
    let p = o.doc.line(Math.max(1, Math.min(o.doc.lines, h))), v = De.cursor(p.from + Math.max(0, Math.min(d, p.length)));
    t.dispatch({
      effects: [WT.of(!1), rt.scrollIntoView(v.from, { y: "center" })],
      selection: v
    }), t.focus();
  }
  return { dom: r };
}
const WT = /* @__PURE__ */ zt.define(), CJ = /* @__PURE__ */ fi.define({
  create() {
    return !0;
  },
  update(t, e) {
    for (let n of e.effects)
      n.is(WT) && (t = n.value);
    return t;
  },
  provide: (t) => S_.from(t, (e) => e ? Q4 : null)
}), N2t = (t) => {
  let e = O_(t, Q4);
  if (!e) {
    let n = [WT.of(!0)];
    t.state.field(CJ, !1) == null && n.push(zt.appendConfig.of([CJ, B2t])), t.dispatch({ effects: n }), e = O_(t, Q4);
  }
  return e && e.dom.querySelector("input").select(), !0;
}, B2t = /* @__PURE__ */ rt.baseTheme({
  ".cm-panel.cm-gotoLine": {
    padding: "2px 6px 4px",
    "& label": { fontSize: "80%" }
  }
}), z2t = {
  highlightWordAroundCursor: !1,
  minSelectionLength: 1,
  maxMatches: 100,
  wholeWords: !1
}, V2t = /* @__PURE__ */ ut.define({
  combine(t) {
    return Kl(t, z2t, {
      highlightWordAroundCursor: (e, n) => e || n,
      minSelectionLength: Math.min,
      maxMatches: Math.min
    });
  }
});
function F2t(t) {
  return [j2t, G2t];
}
const W2t = /* @__PURE__ */ pt.mark({ class: "cm-selectionMatch" }), Q2t = /* @__PURE__ */ pt.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
function TJ(t, e, n, r) {
  return (n == 0 || t(e.sliceDoc(n - 1, n)) != lr.Word) && (r == e.doc.length || t(e.sliceDoc(r, r + 1)) != lr.Word);
}
function H2t(t, e, n, r) {
  return t(e.sliceDoc(n, n + 1)) == lr.Word && t(e.sliceDoc(r - 1, r)) == lr.Word;
}
const G2t = /* @__PURE__ */ Ir.fromClass(class {
  constructor(t) {
    this.decorations = this.getDeco(t);
  }
  update(t) {
    (t.selectionSet || t.docChanged || t.viewportChanged) && (this.decorations = this.getDeco(t.view));
  }
  getDeco(t) {
    let e = t.state.facet(V2t), { state: n } = t, r = n.selection;
    if (r.ranges.length > 1)
      return pt.none;
    let i = r.main, a, o = null;
    if (i.empty) {
      if (!e.highlightWordAroundCursor)
        return pt.none;
      let l = n.wordAt(i.head);
      if (!l)
        return pt.none;
      o = n.charCategorizer(i.head), a = n.sliceDoc(l.from, l.to);
    } else {
      let l = i.to - i.from;
      if (l < e.minSelectionLength || l > 200)
        return pt.none;
      if (e.wholeWords) {
        if (a = n.sliceDoc(i.from, i.to), o = n.charCategorizer(i.head), !(TJ(o, n, i.from, i.to) && H2t(o, n, i.from, i.to)))
          return pt.none;
      } else if (a = n.sliceDoc(i.from, i.to), !a)
        return pt.none;
    }
    let s = [];
    for (let l of t.visibleRanges) {
      let u = new nm(n.doc, a, l.from, l.to);
      for (; !u.next().done; ) {
        let { from: c, to: f } = u.value;
        if ((!o || TJ(o, n, c, f)) && (i.empty && c <= i.from && f >= i.to ? s.push(Q2t.range(c, f)) : (c >= i.to || f <= i.from) && s.push(W2t.range(c, f)), s.length > e.maxMatches))
          return pt.none;
      }
    }
    return pt.set(s);
  }
}, {
  decorations: (t) => t.decorations
}), j2t = /* @__PURE__ */ rt.baseTheme({
  ".cm-selectionMatch": { backgroundColor: "#99ff7780" },
  ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
}), Z2t = ({ state: t, dispatch: e }) => {
  let { selection: n } = t, r = De.create(n.ranges.map((i) => t.wordAt(i.head) || De.cursor(i.head)), n.mainIndex);
  return r.eq(n) ? !1 : (e(t.update({ selection: r })), !0);
};
function U2t(t, e) {
  let { main: n, ranges: r } = t.selection, i = t.wordAt(n.head), a = i && i.from == n.from && i.to == n.to;
  for (let o = !1, s = new nm(t.doc, e, r[r.length - 1].to); ; )
    if (s.next(), s.done) {
      if (o)
        return null;
      s = new nm(t.doc, e, 0, Math.max(0, r[r.length - 1].from - 1)), o = !0;
    } else {
      if (o && r.some((l) => l.from == s.value.from))
        continue;
      if (a) {
        let l = t.wordAt(s.value.from);
        if (!l || l.from != s.value.from || l.to != s.value.to)
          continue;
      }
      return s.value;
    }
}
const X2t = ({ state: t, dispatch: e }) => {
  let { ranges: n } = t.selection;
  if (n.some((a) => a.from === a.to))
    return Z2t({ state: t, dispatch: e });
  let r = t.sliceDoc(n[0].from, n[0].to);
  if (t.selection.ranges.some((a) => t.sliceDoc(a.from, a.to) != r))
    return !1;
  let i = U2t(t, r);
  return i ? (e(t.update({
    selection: t.selection.addRange(De.range(i.from, i.to), !1),
    effects: rt.scrollIntoView(i.to)
  })), !0) : !1;
}, Qm = /* @__PURE__ */ ut.define({
  combine(t) {
    return Kl(t, {
      top: !1,
      caseSensitive: !1,
      literal: !1,
      regexp: !1,
      wholeWord: !1,
      createPanel: (e) => new sPt(e),
      scrollToMatch: (e) => rt.scrollIntoView(e)
    });
  }
});
class ame {
  /**
  Create a query object.
  */
  constructor(e) {
    this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && (!this.regexp || L2t(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e.wholeWord;
  }
  /**
  @internal
  */
  unquote(e) {
    return this.literal ? e : e.replace(/\\([nrt\\])/g, (n, r) => r == "n" ? `
` : r == "r" ? "\r" : r == "t" ? "	" : "\\");
  }
  /**
  Compare this query to another query.
  */
  eq(e) {
    return this.search == e.search && this.replace == e.replace && this.caseSensitive == e.caseSensitive && this.regexp == e.regexp && this.wholeWord == e.wholeWord;
  }
  /**
  @internal
  */
  create() {
    return this.regexp ? new J2t(this) : new q2t(this);
  }
  /**
  Get a search cursor for this query, searching through the given
  range in the given state.
  */
  getCursor(e, n = 0, r) {
    let i = e.doc ? e : un.create({ doc: e });
    return r == null && (r = i.doc.length), this.regexp ? Tv(this, i, n, r) : Cv(this, i, n, r);
  }
}
class ome {
  constructor(e) {
    this.spec = e;
  }
}
function Cv(t, e, n, r) {
  return new nm(e.doc, t.unquoted, n, r, t.caseSensitive ? void 0 : (i) => i.toLowerCase(), t.wholeWord ? Y2t(e.doc, e.charCategorizer(e.selection.main.head)) : void 0);
}
function Y2t(t, e) {
  return (n, r, i, a) => ((a > n || a + i.length < r) && (a = Math.max(0, n - 2), i = t.sliceString(a, Math.min(t.length, r + 2))), (e(QT(i, n - a)) != lr.Word || e(HT(i, n - a)) != lr.Word) && (e(HT(i, r - a)) != lr.Word || e(QT(i, r - a)) != lr.Word));
}
class q2t extends ome {
  constructor(e) {
    super(e);
  }
  nextMatch(e, n, r) {
    let i = Cv(this.spec, e, r, e.doc.length).nextOverlapping();
    return i.done && (i = Cv(this.spec, e, 0, n).nextOverlapping()), i.done ? null : i.value;
  }
  // Searching in reverse is, rather than implementing an inverted search
  // cursor, done by scanning chunk after chunk forward.
  prevMatchInRange(e, n, r) {
    for (let i = r; ; ) {
      let a = Math.max(n, i - 1e4 - this.spec.unquoted.length), o = Cv(this.spec, e, a, i), s = null;
      for (; !o.nextOverlapping().done; )
        s = o.value;
      if (s)
        return s;
      if (a == n)
        return null;
      i -= 1e4;
    }
  }
  prevMatch(e, n, r) {
    return this.prevMatchInRange(e, 0, n) || this.prevMatchInRange(e, r, e.doc.length);
  }
  getReplacement(e) {
    return this.spec.unquote(this.spec.replace);
  }
  matchAll(e, n) {
    let r = Cv(this.spec, e, 0, e.doc.length), i = [];
    for (; !r.next().done; ) {
      if (i.length >= n)
        return null;
      i.push(r.value);
    }
    return i;
  }
  highlight(e, n, r, i) {
    let a = Cv(this.spec, e, Math.max(0, n - this.spec.unquoted.length), Math.min(r + this.spec.unquoted.length, e.doc.length));
    for (; !a.next().done; )
      i(a.value.from, a.value.to);
  }
}
function Tv(t, e, n, r) {
  return new rme(e.doc, t.search, {
    ignoreCase: !t.caseSensitive,
    test: t.wholeWord ? K2t(e.charCategorizer(e.selection.main.head)) : void 0
  }, n, r);
}
function QT(t, e) {
  return t.slice(wi(t, e, !1), e);
}
function HT(t, e) {
  return t.slice(e, wi(t, e));
}
function K2t(t) {
  return (e, n, r) => !r[0].length || (t(QT(r.input, r.index)) != lr.Word || t(HT(r.input, r.index)) != lr.Word) && (t(HT(r.input, r.index + r[0].length)) != lr.Word || t(QT(r.input, r.index + r[0].length)) != lr.Word);
}
class J2t extends ome {
  nextMatch(e, n, r) {
    let i = Tv(this.spec, e, r, e.doc.length).next();
    return i.done && (i = Tv(this.spec, e, 0, n).next()), i.done ? null : i.value;
  }
  prevMatchInRange(e, n, r) {
    for (let i = 1; ; i++) {
      let a = Math.max(
        n,
        r - i * 1e4
        /* FindPrev.ChunkSize */
      ), o = Tv(this.spec, e, a, r), s = null;
      for (; !o.next().done; )
        s = o.value;
      if (s && (a == n || s.from > a + 10))
        return s;
      if (a == n)
        return null;
    }
  }
  prevMatch(e, n, r) {
    return this.prevMatchInRange(e, 0, n) || this.prevMatchInRange(e, r, e.doc.length);
  }
  getReplacement(e) {
    return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g, (n, r) => r == "$" ? "$" : r == "&" ? e.match[0] : r != "0" && +r < e.match.length ? e.match[r] : n);
  }
  matchAll(e, n) {
    let r = Tv(this.spec, e, 0, e.doc.length), i = [];
    for (; !r.next().done; ) {
      if (i.length >= n)
        return null;
      i.push(r.value);
    }
    return i;
  }
  highlight(e, n, r, i) {
    let a = Tv(this.spec, e, Math.max(
      0,
      n - 250
      /* RegExp.HighlightMargin */
    ), Math.min(r + 250, e.doc.length));
    for (; !a.next().done; )
      i(a.value.from, a.value.to);
  }
}
const T_ = /* @__PURE__ */ zt.define(), wB = /* @__PURE__ */ zt.define(), uf = /* @__PURE__ */ fi.define({
  create(t) {
    return new _D(H4(t).create(), null);
  },
  update(t, e) {
    for (let n of e.effects)
      n.is(T_) ? t = new _D(n.value.create(), t.panel) : n.is(wB) && (t = new _D(t.query, n.value ? CB : null));
    return t;
  },
  provide: (t) => S_.from(t, (e) => e.panel)
});
class _D {
  constructor(e, n) {
    this.query = e, this.panel = n;
  }
}
const ePt = /* @__PURE__ */ pt.mark({ class: "cm-searchMatch" }), tPt = /* @__PURE__ */ pt.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), nPt = /* @__PURE__ */ Ir.fromClass(class {
  constructor(t) {
    this.view = t, this.decorations = this.highlight(t.state.field(uf));
  }
  update(t) {
    let e = t.state.field(uf);
    (e != t.startState.field(uf) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e));
  }
  highlight({ query: t, panel: e }) {
    if (!e || !t.spec.valid)
      return pt.none;
    let { view: n } = this, r = new wf();
    for (let i = 0, a = n.visibleRanges, o = a.length; i < o; i++) {
      let { from: s, to: l } = a[i];
      for (; i < o - 1 && l > a[i + 1].from - 2 * 250; )
        l = a[++i].to;
      t.highlight(n.state, s, l, (u, c) => {
        let f = n.state.selection.ranges.some((d) => d.from == u && d.to == c);
        r.add(u, c, f ? tPt : ePt);
      });
    }
    return r.finish();
  }
}, {
  decorations: (t) => t.decorations
});
function N1(t) {
  return (e) => {
    let n = e.state.field(uf, !1);
    return n && n.query.spec.valid ? t(e, n) : ume(e);
  };
}
const GT = /* @__PURE__ */ N1((t, { query: e }) => {
  let { to: n } = t.state.selection.main, r = e.nextMatch(t.state, n, n);
  if (!r)
    return !1;
  let i = De.single(r.from, r.to), a = t.state.facet(Qm);
  return t.dispatch({
    selection: i,
    effects: [TB(t, r), a.scrollToMatch(i.main, t)],
    userEvent: "select.search"
  }), lme(t), !0;
}), jT = /* @__PURE__ */ N1((t, { query: e }) => {
  let { state: n } = t, { from: r } = n.selection.main, i = e.prevMatch(n, r, r);
  if (!i)
    return !1;
  let a = De.single(i.from, i.to), o = t.state.facet(Qm);
  return t.dispatch({
    selection: a,
    effects: [TB(t, i), o.scrollToMatch(a.main, t)],
    userEvent: "select.search"
  }), lme(t), !0;
}), rPt = /* @__PURE__ */ N1((t, { query: e }) => {
  let n = e.matchAll(t.state, 1e3);
  return !n || !n.length ? !1 : (t.dispatch({
    selection: De.create(n.map((r) => De.range(r.from, r.to))),
    userEvent: "select.search.matches"
  }), !0);
}), iPt = ({ state: t, dispatch: e }) => {
  let n = t.selection;
  if (n.ranges.length > 1 || n.main.empty)
    return !1;
  let { from: r, to: i } = n.main, a = [], o = 0;
  for (let s = new nm(t.doc, t.sliceDoc(r, i)); !s.next().done; ) {
    if (a.length > 1e3)
      return !1;
    s.value.from == r && (o = a.length), a.push(De.range(s.value.from, s.value.to));
  }
  return e(t.update({
    selection: De.create(a, o),
    userEvent: "select.search.matches"
  })), !0;
}, PJ = /* @__PURE__ */ N1((t, { query: e }) => {
  let { state: n } = t, { from: r, to: i } = n.selection.main;
  if (n.readOnly)
    return !1;
  let a = e.nextMatch(n, r, r);
  if (!a)
    return !1;
  let o = [], s, l, u = [];
  if (a.from == r && a.to == i && (l = n.toText(e.getReplacement(a)), o.push({ from: a.from, to: a.to, insert: l }), a = e.nextMatch(n, a.from, a.to), u.push(rt.announce.of(n.phrase("replaced match on line $", n.doc.lineAt(r).number) + "."))), a) {
    let c = o.length == 0 || o[0].from >= a.to ? 0 : a.to - a.from - l.length;
    s = De.single(a.from - c, a.to - c), u.push(TB(t, a)), u.push(n.facet(Qm).scrollToMatch(s.main, t));
  }
  return t.dispatch({
    changes: o,
    selection: s,
    effects: u,
    userEvent: "input.replace"
  }), !0;
}), aPt = /* @__PURE__ */ N1((t, { query: e }) => {
  if (t.state.readOnly)
    return !1;
  let n = e.matchAll(t.state, 1e9).map((i) => {
    let { from: a, to: o } = i;
    return { from: a, to: o, insert: e.getReplacement(i) };
  });
  if (!n.length)
    return !1;
  let r = t.state.phrase("replaced $ matches", n.length) + ".";
  return t.dispatch({
    changes: n,
    effects: rt.announce.of(r),
    userEvent: "input.replace.all"
  }), !0;
});
function CB(t) {
  return t.state.facet(Qm).createPanel(t);
}
function H4(t, e) {
  var n, r, i, a, o;
  let s = t.selection.main, l = s.empty || s.to > s.from + 100 ? "" : t.sliceDoc(s.from, s.to);
  if (e && !l)
    return e;
  let u = t.facet(Qm);
  return new ame({
    search: ((n = e == null ? void 0 : e.literal) !== null && n !== void 0 ? n : u.literal) ? l : l.replace(/\n/g, "\\n"),
    caseSensitive: (r = e == null ? void 0 : e.caseSensitive) !== null && r !== void 0 ? r : u.caseSensitive,
    literal: (i = e == null ? void 0 : e.literal) !== null && i !== void 0 ? i : u.literal,
    regexp: (a = e == null ? void 0 : e.regexp) !== null && a !== void 0 ? a : u.regexp,
    wholeWord: (o = e == null ? void 0 : e.wholeWord) !== null && o !== void 0 ? o : u.wholeWord
  });
}
function sme(t) {
  let e = O_(t, CB);
  return e && e.dom.querySelector("[main-field]");
}
function lme(t) {
  let e = sme(t);
  e && e == t.root.activeElement && e.select();
}
const ume = (t) => {
  let e = t.state.field(uf, !1);
  if (e && e.panel) {
    let n = sme(t);
    if (n && n != t.root.activeElement) {
      let r = H4(t.state, e.query.spec);
      r.valid && t.dispatch({ effects: T_.of(r) }), n.focus(), n.select();
    }
  } else
    t.dispatch({ effects: [
      wB.of(!0),
      e ? T_.of(H4(t.state, e.query.spec)) : zt.appendConfig.of(uPt)
    ] });
  return !0;
}, cme = (t) => {
  let e = t.state.field(uf, !1);
  if (!e || !e.panel)
    return !1;
  let n = O_(t, CB);
  return n && n.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: wB.of(!1) }), !0;
}, oPt = [
  { key: "Mod-f", run: ume, scope: "editor search-panel" },
  { key: "F3", run: GT, shift: jT, scope: "editor search-panel", preventDefault: !0 },
  { key: "Mod-g", run: GT, shift: jT, scope: "editor search-panel", preventDefault: !0 },
  { key: "Escape", run: cme, scope: "editor search-panel" },
  { key: "Mod-Shift-l", run: iPt },
  { key: "Mod-Alt-g", run: N2t },
  { key: "Mod-d", run: X2t, preventDefault: !0 }
];
class sPt {
  constructor(e) {
    this.view = e;
    let n = this.query = e.state.field(uf).query.spec;
    this.commit = this.commit.bind(this), this.searchField = Yn("input", {
      value: n.search,
      placeholder: Ya(e, "Find"),
      "aria-label": Ya(e, "Find"),
      class: "cm-textfield",
      name: "search",
      form: "",
      "main-field": "true",
      onchange: this.commit,
      onkeyup: this.commit
    }), this.replaceField = Yn("input", {
      value: n.replace,
      placeholder: Ya(e, "Replace"),
      "aria-label": Ya(e, "Replace"),
      class: "cm-textfield",
      name: "replace",
      form: "",
      onchange: this.commit,
      onkeyup: this.commit
    }), this.caseField = Yn("input", {
      type: "checkbox",
      name: "case",
      form: "",
      checked: n.caseSensitive,
      onchange: this.commit
    }), this.reField = Yn("input", {
      type: "checkbox",
      name: "re",
      form: "",
      checked: n.regexp,
      onchange: this.commit
    }), this.wordField = Yn("input", {
      type: "checkbox",
      name: "word",
      form: "",
      checked: n.wholeWord,
      onchange: this.commit
    });
    function r(i, a, o) {
      return Yn("button", { class: "cm-button", name: i, onclick: a, type: "button" }, o);
    }
    this.dom = Yn("div", { onkeydown: (i) => this.keydown(i), class: "cm-search" }, [
      this.searchField,
      r("next", () => GT(e), [Ya(e, "next")]),
      r("prev", () => jT(e), [Ya(e, "previous")]),
      r("select", () => rPt(e), [Ya(e, "all")]),
      Yn("label", null, [this.caseField, Ya(e, "match case")]),
      Yn("label", null, [this.reField, Ya(e, "regexp")]),
      Yn("label", null, [this.wordField, Ya(e, "by word")]),
      ...e.state.readOnly ? [] : [
        Yn("br"),
        this.replaceField,
        r("replace", () => PJ(e), [Ya(e, "replace")]),
        r("replaceAll", () => aPt(e), [Ya(e, "replace all")])
      ],
      Yn("button", {
        name: "close",
        onclick: () => cme(e),
        "aria-label": Ya(e, "close"),
        type: "button"
      }, ["×"])
    ]);
  }
  commit() {
    let e = new ame({
      search: this.searchField.value,
      caseSensitive: this.caseField.checked,
      regexp: this.reField.checked,
      wholeWord: this.wordField.checked,
      replace: this.replaceField.value
    });
    e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: T_.of(e) }));
  }
  keydown(e) {
    ywt(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? jT : GT)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), PJ(this.view));
  }
  update(e) {
    for (let n of e.transactions)
      for (let r of n.effects)
        r.is(T_) && !r.value.eq(this.query) && this.setQuery(r.value);
  }
  setQuery(e) {
    this.query = e, this.searchField.value = e.search, this.replaceField.value = e.replace, this.caseField.checked = e.caseSensitive, this.reField.checked = e.regexp, this.wordField.checked = e.wholeWord;
  }
  mount() {
    this.searchField.select();
  }
  get pos() {
    return 80;
  }
  get top() {
    return this.view.state.facet(Qm).top;
  }
}
function Ya(t, e) {
  return t.state.phrase(e);
}
const Cx = 30, Tx = /[\s\.,:;?!]/;
function TB(t, { from: e, to: n }) {
  let r = t.state.doc.lineAt(e), i = t.state.doc.lineAt(n).to, a = Math.max(r.from, e - Cx), o = Math.min(i, n + Cx), s = t.state.sliceDoc(a, o);
  if (a != r.from) {
    for (let l = 0; l < Cx; l++)
      if (!Tx.test(s[l + 1]) && Tx.test(s[l])) {
        s = s.slice(l);
        break;
      }
  }
  if (o != i) {
    for (let l = s.length - 1; l > s.length - Cx; l--)
      if (!Tx.test(s[l - 1]) && Tx.test(s[l])) {
        s = s.slice(0, l);
        break;
      }
  }
  return rt.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`);
}
const lPt = /* @__PURE__ */ rt.baseTheme({
  ".cm-panel.cm-search": {
    padding: "2px 6px 4px",
    position: "relative",
    "& [name=close]": {
      position: "absolute",
      top: "0",
      right: "4px",
      backgroundColor: "inherit",
      border: "none",
      font: "inherit",
      padding: 0,
      margin: 0
    },
    "& input, & button, & label": {
      margin: ".2em .6em .2em 0"
    },
    "& input[type=checkbox]": {
      marginRight: ".2em"
    },
    "& label": {
      fontSize: "80%",
      whiteSpace: "pre"
    }
  },
  "&light .cm-searchMatch": { backgroundColor: "#ffff0054" },
  "&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" },
  "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
  "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
}), uPt = [
  uf,
  /* @__PURE__ */ Ff.low(nPt),
  lPt
];
class fme {
  /**
  Create a new completion context. (Mostly useful for testing
  completion sources—in the editor, the extension will create
  these for you.)
  */
  constructor(e, n, r, i) {
    this.state = e, this.pos = n, this.explicit = r, this.view = i, this.abortListeners = [];
  }
  /**
  Get the extent, content, and (if there is a token) type of the
  token before `this.pos`.
  */
  tokenBefore(e) {
    let n = ni(this.state).resolveInner(this.pos, -1);
    for (; n && e.indexOf(n.name) < 0; )
      n = n.parent;
    return n ? {
      from: n.from,
      to: this.pos,
      text: this.state.sliceDoc(n.from, this.pos),
      type: n.type
    } : null;
  }
  /**
  Get the match of the given expression directly before the
  cursor.
  */
  matchBefore(e) {
    let n = this.state.doc.lineAt(this.pos), r = Math.max(n.from, this.pos - 250), i = n.text.slice(r - n.from, this.pos - n.from), a = i.search(hme(e, !1));
    return a < 0 ? null : { from: r + a, to: this.pos, text: i.slice(a) };
  }
  /**
  Yields true when the query has been aborted. Can be useful in
  asynchronous queries to avoid doing work that will be ignored.
  */
  get aborted() {
    return this.abortListeners == null;
  }
  /**
  Allows you to register abort handlers, which will be called when
  the query is
  [aborted](https://codemirror.net/6/docs/ref/#autocomplete.CompletionContext.aborted).
  */
  addEventListener(e, n) {
    e == "abort" && this.abortListeners && this.abortListeners.push(n);
  }
}
function $J(t) {
  let e = Object.keys(t).join(""), n = /\w/.test(e);
  return n && (e = e.replace(/\w/g, "")), `[${n ? "\\w" : ""}${e.replace(/[^\w\s]/g, "\\$&")}]`;
}
function cPt(t) {
  let e = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
  for (let { label: i } of t) {
    e[i[0]] = !0;
    for (let a = 1; a < i.length; a++)
      n[i[a]] = !0;
  }
  let r = $J(e) + $J(n) + "*$";
  return [new RegExp("^" + r), new RegExp(r)];
}
function dme(t) {
  let e = t.map((i) => typeof i == "string" ? { label: i } : i), [n, r] = e.every((i) => /^\w+$/.test(i.label)) ? [/\w*$/, /\w+$/] : cPt(e);
  return (i) => {
    let a = i.matchBefore(r);
    return a || i.explicit ? { from: a ? a.from : i.pos, options: e, validFor: n } : null;
  };
}
function fPt(t, e) {
  return (n) => {
    for (let r = ni(n.state).resolveInner(n.pos, -1); r; r = r.parent) {
      if (t.indexOf(r.name) > -1)
        return null;
      if (r.type.isTop)
        break;
    }
    return e(n);
  };
}
class AJ {
  constructor(e, n, r, i) {
    this.completion = e, this.source = n, this.match = r, this.score = i;
  }
}
function cf(t) {
  return t.selection.main.from;
}
function hme(t, e) {
  var n;
  let { source: r } = t, i = e && r[0] != "^", a = r[r.length - 1] != "$";
  return !i && !a ? t : new RegExp(`${i ? "^" : ""}(?:${r})${a ? "$" : ""}`, (n = t.flags) !== null && n !== void 0 ? n : t.ignoreCase ? "i" : "");
}
const PB = /* @__PURE__ */ ac.define();
function dPt(t, e, n, r) {
  let { main: i } = t.selection, a = n - i.from, o = r - i.from;
  return Object.assign(Object.assign({}, t.changeByRange((s) => s != i && n != r && t.sliceDoc(s.from + a, s.from + o) != t.sliceDoc(n, r) ? { range: s } : {
    changes: { from: s.from + a, to: r == i.from ? s.to : s.from + o, insert: e },
    range: De.cursor(s.from + a + e.length)
  })), { scrollIntoView: !0, userEvent: "input.complete" });
}
const EJ = /* @__PURE__ */ new WeakMap();
function hPt(t) {
  if (!Array.isArray(t))
    return t;
  let e = EJ.get(t);
  return e || EJ.set(t, e = dme(t)), e;
}
const ZT = /* @__PURE__ */ zt.define(), P_ = /* @__PURE__ */ zt.define();
class pPt {
  constructor(e) {
    this.pattern = e, this.chars = [], this.folded = [], this.any = [], this.precise = [], this.byWord = [], this.score = 0, this.matched = [];
    for (let n = 0; n < e.length; ) {
      let r = bi(e, n), i = jo(r);
      this.chars.push(r);
      let a = e.slice(n, n + i), o = a.toUpperCase();
      this.folded.push(bi(o == a ? a.toLowerCase() : o, 0)), n += i;
    }
    this.astral = e.length != this.chars.length;
  }
  ret(e, n) {
    return this.score = e, this.matched = n, this;
  }
  // Matches a given word (completion) against the pattern (input).
  // Will return a boolean indicating whether there was a match and,
  // on success, set `this.score` to the score, `this.matched` to an
  // array of `from, to` pairs indicating the matched parts of `word`.
  //
  // The score is a number that is more negative the worse the match
  // is. See `Penalty` above.
  match(e) {
    if (this.pattern.length == 0)
      return this.ret(-100, []);
    if (e.length < this.pattern.length)
      return null;
    let { chars: n, folded: r, any: i, precise: a, byWord: o } = this;
    if (n.length == 1) {
      let y = bi(e, 0), _ = jo(y), O = _ == e.length ? 0 : -100;
      if (y != n[0]) if (y == r[0])
        O += -200;
      else
        return null;
      return this.ret(O, [0, _]);
    }
    let s = e.indexOf(this.pattern);
    if (s == 0)
      return this.ret(e.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
    let l = n.length, u = 0;
    if (s < 0) {
      for (let y = 0, _ = Math.min(e.length, 200); y < _ && u < l; ) {
        let O = bi(e, y);
        (O == n[u] || O == r[u]) && (i[u++] = y), y += jo(O);
      }
      if (u < l)
        return null;
    }
    let c = 0, f = 0, d = !1, h = 0, p = -1, v = -1, g = /[a-z]/.test(e), m = !0;
    for (let y = 0, _ = Math.min(e.length, 200), O = 0; y < _ && f < l; ) {
      let S = bi(e, y);
      s < 0 && (c < l && S == n[c] && (a[c++] = y), h < l && (S == n[h] || S == r[h] ? (h == 0 && (p = y), v = y + 1, h++) : h = 0));
      let x, C = S < 255 ? S >= 48 && S <= 57 || S >= 97 && S <= 122 ? 2 : S >= 65 && S <= 90 ? 1 : 0 : (x = K6(S)) != x.toLowerCase() ? 1 : x != x.toUpperCase() ? 2 : 0;
      (!y || C == 1 && g || O == 0 && C != 0) && (n[f] == S || r[f] == S && (d = !0) ? o[f++] = y : o.length && (m = !1)), O = C, y += jo(S);
    }
    return f == l && o[0] == 0 && m ? this.result(-100 + (d ? -200 : 0), o, e) : h == l && p == 0 ? this.ret(-200 - e.length + (v == e.length ? 0 : -100), [0, v]) : s > -1 ? this.ret(-700 - e.length, [s, s + this.pattern.length]) : h == l ? this.ret(-900 - e.length, [p, v]) : f == l ? this.result(-100 + (d ? -200 : 0) + -700 + (m ? 0 : -1100), o, e) : n.length == 2 ? null : this.result((i[0] ? -700 : 0) + -200 + -1100, i, e);
  }
  result(e, n, r) {
    let i = [], a = 0;
    for (let o of n) {
      let s = o + (this.astral ? jo(bi(r, o)) : 1);
      a && i[a - 1] == o ? i[a - 1] = s : (i[a++] = o, i[a++] = s);
    }
    return this.ret(e - r.length, i);
  }
}
class vPt {
  constructor(e) {
    this.pattern = e, this.matched = [], this.score = 0, this.folded = e.toLowerCase();
  }
  match(e) {
    if (e.length < this.pattern.length)
      return null;
    let n = e.slice(0, this.pattern.length), r = n == this.pattern ? 0 : n.toLowerCase() == this.folded ? -200 : null;
    return r == null ? null : (this.matched = [0, n.length], this.score = r + (e.length == this.pattern.length ? 0 : -100), this);
  }
}
const Si = /* @__PURE__ */ ut.define({
  combine(t) {
    return Kl(t, {
      activateOnTyping: !0,
      activateOnCompletion: () => !1,
      activateOnTypingDelay: 100,
      selectOnOpen: !0,
      override: null,
      closeOnBlur: !0,
      maxRenderedOptions: 100,
      defaultKeymap: !0,
      tooltipClass: () => "",
      optionClass: () => "",
      aboveCursor: !1,
      icons: !0,
      addToOptions: [],
      positionInfo: gPt,
      filterStrict: !1,
      compareCompletions: (e, n) => e.label.localeCompare(n.label),
      interactionDelay: 75,
      updateSyncTime: 100
    }, {
      defaultKeymap: (e, n) => e && n,
      closeOnBlur: (e, n) => e && n,
      icons: (e, n) => e && n,
      tooltipClass: (e, n) => (r) => MJ(e(r), n(r)),
      optionClass: (e, n) => (r) => MJ(e(r), n(r)),
      addToOptions: (e, n) => e.concat(n),
      filterStrict: (e, n) => e || n
    });
  }
});
function MJ(t, e) {
  return t ? e ? t + " " + e : t : e;
}
function gPt(t, e, n, r, i, a) {
  let o = t.textDirection == ir.RTL, s = o, l = !1, u = "top", c, f, d = e.left - i.left, h = i.right - e.right, p = r.right - r.left, v = r.bottom - r.top;
  if (s && d < Math.min(p, h) ? s = !1 : !s && h < Math.min(p, d) && (s = !0), p <= (s ? d : h))
    c = Math.max(i.top, Math.min(n.top, i.bottom - v)) - e.top, f = Math.min(400, s ? d : h);
  else {
    l = !0, f = Math.min(
      400,
      (o ? e.right : i.right - e.left) - 30
      /* Info.Margin */
    );
    let y = i.bottom - e.bottom;
    y >= v || y > e.top ? c = n.bottom - e.top : (u = "bottom", c = e.bottom - n.top);
  }
  let g = (e.bottom - e.top) / a.offsetHeight, m = (e.right - e.left) / a.offsetWidth;
  return {
    style: `${u}: ${c / g}px; max-width: ${f / m}px`,
    class: "cm-completionInfo-" + (l ? o ? "left-narrow" : "right-narrow" : s ? "left" : "right")
  };
}
function mPt(t) {
  let e = t.addToOptions.slice();
  return t.icons && e.push({
    render(n) {
      let r = document.createElement("div");
      return r.classList.add("cm-completionIcon"), n.type && r.classList.add(...n.type.split(/\s+/g).map((i) => "cm-completionIcon-" + i)), r.setAttribute("aria-hidden", "true"), r;
    },
    position: 20
  }), e.push({
    render(n, r, i, a) {
      let o = document.createElement("span");
      o.className = "cm-completionLabel";
      let s = n.displayLabel || n.label, l = 0;
      for (let u = 0; u < a.length; ) {
        let c = a[u++], f = a[u++];
        c > l && o.appendChild(document.createTextNode(s.slice(l, c)));
        let d = o.appendChild(document.createElement("span"));
        d.appendChild(document.createTextNode(s.slice(c, f))), d.className = "cm-completionMatchedText", l = f;
      }
      return l < s.length && o.appendChild(document.createTextNode(s.slice(l))), o;
    },
    position: 50
  }, {
    render(n) {
      if (!n.detail)
        return null;
      let r = document.createElement("span");
      return r.className = "cm-completionDetail", r.textContent = n.detail, r;
    },
    position: 80
  }), e.sort((n, r) => n.position - r.position).map((n) => n.render);
}
function OD(t, e, n) {
  if (t <= n)
    return { from: 0, to: t };
  if (e < 0 && (e = 0), e <= t >> 1) {
    let i = Math.floor(e / n);
    return { from: i * n, to: (i + 1) * n };
  }
  let r = Math.floor((t - e) / n);
  return { from: t - (r + 1) * n, to: t - r * n };
}
class yPt {
  constructor(e, n, r) {
    this.view = e, this.stateField = n, this.applyCompletion = r, this.info = null, this.infoDestroy = null, this.placeInfoReq = {
      read: () => this.measureInfo(),
      write: (l) => this.placeInfo(l),
      key: this
    }, this.space = null, this.currentClass = "";
    let i = e.state.field(n), { options: a, selected: o } = i.open, s = e.state.facet(Si);
    this.optionContent = mPt(s), this.optionClass = s.optionClass, this.tooltipClass = s.tooltipClass, this.range = OD(a.length, o, s.maxRenderedOptions), this.dom = document.createElement("div"), this.dom.className = "cm-tooltip-autocomplete", this.updateTooltipClass(e.state), this.dom.addEventListener("mousedown", (l) => {
      let { options: u } = e.state.field(n).open;
      for (let c = l.target, f; c && c != this.dom; c = c.parentNode)
        if (c.nodeName == "LI" && (f = /-(\d+)$/.exec(c.id)) && +f[1] < u.length) {
          this.applyCompletion(e, u[+f[1]]), l.preventDefault();
          return;
        }
    }), this.dom.addEventListener("focusout", (l) => {
      let u = e.state.field(this.stateField, !1);
      u && u.tooltip && e.state.facet(Si).closeOnBlur && l.relatedTarget != e.contentDOM && e.dispatch({ effects: P_.of(null) });
    }), this.showOptions(a, i.id);
  }
  mount() {
    this.updateSel();
  }
  showOptions(e, n) {
    this.list && this.list.remove(), this.list = this.dom.appendChild(this.createListBox(e, n, this.range)), this.list.addEventListener("scroll", () => {
      this.info && this.view.requestMeasure(this.placeInfoReq);
    });
  }
  update(e) {
    var n;
    let r = e.state.field(this.stateField), i = e.startState.field(this.stateField);
    if (this.updateTooltipClass(e.state), r != i) {
      let { options: a, selected: o, disabled: s } = r.open;
      (!i.open || i.open.options != a) && (this.range = OD(a.length, o, e.state.facet(Si).maxRenderedOptions), this.showOptions(a, r.id)), this.updateSel(), s != ((n = i.open) === null || n === void 0 ? void 0 : n.disabled) && this.dom.classList.toggle("cm-tooltip-autocomplete-disabled", !!s);
    }
  }
  updateTooltipClass(e) {
    let n = this.tooltipClass(e);
    if (n != this.currentClass) {
      for (let r of this.currentClass.split(" "))
        r && this.dom.classList.remove(r);
      for (let r of n.split(" "))
        r && this.dom.classList.add(r);
      this.currentClass = n;
    }
  }
  positioned(e) {
    this.space = e, this.info && this.view.requestMeasure(this.placeInfoReq);
  }
  updateSel() {
    let e = this.view.state.field(this.stateField), n = e.open;
    if ((n.selected > -1 && n.selected < this.range.from || n.selected >= this.range.to) && (this.range = OD(n.options.length, n.selected, this.view.state.facet(Si).maxRenderedOptions), this.showOptions(n.options, e.id)), this.updateSelectedOption(n.selected)) {
      this.destroyInfo();
      let { completion: r } = n.options[n.selected], { info: i } = r;
      if (!i)
        return;
      let a = typeof i == "string" ? document.createTextNode(i) : i(r);
      if (!a)
        return;
      "then" in a ? a.then((o) => {
        o && this.view.state.field(this.stateField, !1) == e && this.addInfoPane(o, r);
      }).catch((o) => Ia(this.view.state, o, "completion info")) : this.addInfoPane(a, r);
    }
  }
  addInfoPane(e, n) {
    this.destroyInfo();
    let r = this.info = document.createElement("div");
    if (r.className = "cm-tooltip cm-completionInfo", e.nodeType != null)
      r.appendChild(e), this.infoDestroy = null;
    else {
      let { dom: i, destroy: a } = e;
      r.appendChild(i), this.infoDestroy = a || null;
    }
    this.dom.appendChild(r), this.view.requestMeasure(this.placeInfoReq);
  }
  updateSelectedOption(e) {
    let n = null;
    for (let r = this.list.firstChild, i = this.range.from; r; r = r.nextSibling, i++)
      r.nodeName != "LI" || !r.id ? i-- : i == e ? r.hasAttribute("aria-selected") || (r.setAttribute("aria-selected", "true"), n = r) : r.hasAttribute("aria-selected") && r.removeAttribute("aria-selected");
    return n && _Pt(this.list, n), n;
  }
  measureInfo() {
    let e = this.dom.querySelector("[aria-selected]");
    if (!e || !this.info)
      return null;
    let n = this.dom.getBoundingClientRect(), r = this.info.getBoundingClientRect(), i = e.getBoundingClientRect(), a = this.space;
    if (!a) {
      let o = this.dom.ownerDocument.defaultView || window;
      a = { left: 0, top: 0, right: o.innerWidth, bottom: o.innerHeight };
    }
    return i.top > Math.min(a.bottom, n.bottom) - 10 || i.bottom < Math.max(a.top, n.top) + 10 ? null : this.view.state.facet(Si).positionInfo(this.view, n, i, r, a, this.dom);
  }
  placeInfo(e) {
    this.info && (e ? (e.style && (this.info.style.cssText = e.style), this.info.className = "cm-tooltip cm-completionInfo " + (e.class || "")) : this.info.style.cssText = "top: -1e6px");
  }
  createListBox(e, n, r) {
    const i = document.createElement("ul");
    i.id = n, i.setAttribute("role", "listbox"), i.setAttribute("aria-expanded", "true"), i.setAttribute("aria-label", this.view.state.phrase("Completions"));
    let a = null;
    for (let o = r.from; o < r.to; o++) {
      let { completion: s, match: l } = e[o], { section: u } = s;
      if (u) {
        let d = typeof u == "string" ? u : u.name;
        if (d != a && (o > r.from || r.from == 0))
          if (a = d, typeof u != "string" && u.header)
            i.appendChild(u.header(u));
          else {
            let h = i.appendChild(document.createElement("completion-section"));
            h.textContent = d;
          }
      }
      const c = i.appendChild(document.createElement("li"));
      c.id = n + "-" + o, c.setAttribute("role", "option");
      let f = this.optionClass(s);
      f && (c.className = f);
      for (let d of this.optionContent) {
        let h = d(s, this.view.state, this.view, l);
        h && c.appendChild(h);
      }
    }
    return r.from && i.classList.add("cm-completionListIncompleteTop"), r.to < e.length && i.classList.add("cm-completionListIncompleteBottom"), i;
  }
  destroyInfo() {
    this.info && (this.infoDestroy && this.infoDestroy(), this.info.remove(), this.info = null);
  }
  destroy() {
    this.destroyInfo();
  }
}
function bPt(t, e) {
  return (n) => new yPt(n, t, e);
}
function _Pt(t, e) {
  let n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i = n.height / t.offsetHeight;
  r.top < n.top ? t.scrollTop -= (n.top - r.top) / i : r.bottom > n.bottom && (t.scrollTop += (r.bottom - n.bottom) / i);
}
function IJ(t) {
  return (t.boost || 0) * 100 + (t.apply ? 10 : 0) + (t.info ? 5 : 0) + (t.type ? 1 : 0);
}
function OPt(t, e) {
  let n = [], r = null, i = (u) => {
    n.push(u);
    let { section: c } = u.completion;
    if (c) {
      r || (r = []);
      let f = typeof c == "string" ? c : c.name;
      r.some((d) => d.name == f) || r.push(typeof c == "string" ? { name: f } : c);
    }
  }, a = e.facet(Si);
  for (let u of t)
    if (u.hasResult()) {
      let c = u.result.getMatch;
      if (u.result.filter === !1)
        for (let f of u.result.options)
          i(new AJ(f, u.source, c ? c(f) : [], 1e9 - n.length));
      else {
        let f = e.sliceDoc(u.from, u.to), d, h = a.filterStrict ? new vPt(f) : new pPt(f);
        for (let p of u.result.options)
          if (d = h.match(p.label)) {
            let v = p.displayLabel ? c ? c(p, d.matched) : [] : d.matched;
            i(new AJ(p, u.source, v, d.score + (p.boost || 0)));
          }
      }
    }
  if (r) {
    let u = /* @__PURE__ */ Object.create(null), c = 0, f = (d, h) => {
      var p, v;
      return ((p = d.rank) !== null && p !== void 0 ? p : 1e9) - ((v = h.rank) !== null && v !== void 0 ? v : 1e9) || (d.name < h.name ? -1 : 1);
    };
    for (let d of r.sort(f))
      c -= 1e5, u[d.name] = c;
    for (let d of n) {
      let { section: h } = d.completion;
      h && (d.score += u[typeof h == "string" ? h : h.name]);
    }
  }
  let o = [], s = null, l = a.compareCompletions;
  for (let u of n.sort((c, f) => f.score - c.score || l(c.completion, f.completion))) {
    let c = u.completion;
    !s || s.label != c.label || s.detail != c.detail || s.type != null && c.type != null && s.type != c.type || s.apply != c.apply || s.boost != c.boost ? o.push(u) : IJ(u.completion) > IJ(s) && (o[o.length - 1] = u), s = u.completion;
  }
  return o;
}
class Bv {
  constructor(e, n, r, i, a, o) {
    this.options = e, this.attrs = n, this.tooltip = r, this.timestamp = i, this.selected = a, this.disabled = o;
  }
  setSelected(e, n) {
    return e == this.selected || e >= this.options.length ? this : new Bv(this.options, DJ(n, e), this.tooltip, this.timestamp, e, this.disabled);
  }
  static build(e, n, r, i, a) {
    let o = OPt(e, n);
    if (!o.length)
      return i && e.some(
        (l) => l.state == 1
        /* State.Pending */
      ) ? new Bv(i.options, i.attrs, i.tooltip, i.timestamp, i.selected, !0) : null;
    let s = n.facet(Si).selectOnOpen ? 0 : -1;
    if (i && i.selected != s && i.selected != -1) {
      let l = i.options[i.selected].completion;
      for (let u = 0; u < o.length; u++)
        if (o[u].completion == l) {
          s = u;
          break;
        }
    }
    return new Bv(o, DJ(r, s), {
      pos: e.reduce((l, u) => u.hasResult() ? Math.min(l, u.from) : l, 1e8),
      create: PPt,
      above: a.aboveCursor
    }, i ? i.timestamp : Date.now(), s, !1);
  }
  map(e) {
    return new Bv(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: e.mapPos(this.tooltip.pos) }), this.timestamp, this.selected, this.disabled);
  }
}
class UT {
  constructor(e, n, r) {
    this.active = e, this.id = n, this.open = r;
  }
  static start() {
    return new UT(CPt, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null);
  }
  update(e) {
    let { state: n } = e, r = n.facet(Si), a = (r.override || n.languageDataAt("autocomplete", cf(n)).map(hPt)).map((s) => (this.active.find((u) => u.source == s) || new ro(
      s,
      this.active.some(
        (u) => u.state != 0
        /* State.Inactive */
      ) ? 1 : 0
      /* State.Inactive */
    )).update(e, r));
    a.length == this.active.length && a.every((s, l) => s == this.active[l]) && (a = this.active);
    let o = this.open;
    o && e.docChanged && (o = o.map(e.changes)), e.selection || a.some((s) => s.hasResult() && e.changes.touchesRange(s.from, s.to)) || !SPt(a, this.active) ? o = Bv.build(a, n, this.id, o, r) : o && o.disabled && !a.some(
      (s) => s.state == 1
      /* State.Pending */
    ) && (o = null), !o && a.every(
      (s) => s.state != 1
      /* State.Pending */
    ) && a.some((s) => s.hasResult()) && (a = a.map((s) => s.hasResult() ? new ro(
      s.source,
      0
      /* State.Inactive */
    ) : s));
    for (let s of e.effects)
      s.is(gme) && (o = o && o.setSelected(s.value, this.id));
    return a == this.active && o == this.open ? this : new UT(a, this.id, o);
  }
  get tooltip() {
    return this.open ? this.open.tooltip : null;
  }
  get attrs() {
    return this.open ? this.open.attrs : this.active.length ? xPt : wPt;
  }
}
function SPt(t, e) {
  if (t == e)
    return !0;
  for (let n = 0, r = 0; ; ) {
    for (; n < t.length && !t[n].hasResult; )
      n++;
    for (; r < e.length && !e[r].hasResult; )
      r++;
    let i = n == t.length, a = r == e.length;
    if (i || a)
      return i == a;
    if (t[n++].result != e[r++].result)
      return !1;
  }
}
const xPt = {
  "aria-autocomplete": "list"
}, wPt = {};
function DJ(t, e) {
  let n = {
    "aria-autocomplete": "list",
    "aria-haspopup": "listbox",
    "aria-controls": t
  };
  return e > -1 && (n["aria-activedescendant"] = t + "-" + e), n;
}
const CPt = [];
function pme(t, e) {
  if (t.isUserEvent("input.complete")) {
    let r = t.annotation(PB);
    if (r && e.activateOnCompletion(r))
      return 12;
  }
  let n = t.isUserEvent("input.type");
  return n && e.activateOnTyping ? 5 : n ? 1 : t.isUserEvent("delete.backward") ? 2 : t.selection ? 8 : t.docChanged ? 16 : 0;
}
class ro {
  constructor(e, n, r = -1) {
    this.source = e, this.state = n, this.explicitPos = r;
  }
  hasResult() {
    return !1;
  }
  update(e, n) {
    let r = pme(e, n), i = this;
    (r & 8 || r & 16 && this.touches(e)) && (i = new ro(
      i.source,
      0
      /* State.Inactive */
    )), r & 4 && i.state == 0 && (i = new ro(
      this.source,
      1
      /* State.Pending */
    )), i = i.updateFor(e, r);
    for (let a of e.effects)
      if (a.is(ZT))
        i = new ro(i.source, 1, a.value ? cf(e.state) : -1);
      else if (a.is(P_))
        i = new ro(
          i.source,
          0
          /* State.Inactive */
        );
      else if (a.is(vme))
        for (let o of a.value)
          o.source == i.source && (i = o);
    return i;
  }
  updateFor(e, n) {
    return this.map(e.changes);
  }
  map(e) {
    return e.empty || this.explicitPos < 0 ? this : new ro(this.source, this.state, e.mapPos(this.explicitPos));
  }
  touches(e) {
    return e.changes.touchesRange(cf(e.state));
  }
}
class lg extends ro {
  constructor(e, n, r, i, a) {
    super(e, 2, n), this.result = r, this.from = i, this.to = a;
  }
  hasResult() {
    return !0;
  }
  updateFor(e, n) {
    var r;
    if (!(n & 3))
      return this.map(e.changes);
    let i = this.result;
    i.map && !e.changes.empty && (i = i.map(i, e.changes));
    let a = e.changes.mapPos(this.from), o = e.changes.mapPos(this.to, 1), s = cf(e.state);
    if ((this.explicitPos < 0 ? s <= a : s < this.from) || s > o || !i || n & 2 && cf(e.startState) == this.from)
      return new ro(
        this.source,
        n & 4 ? 1 : 0
        /* State.Inactive */
      );
    let l = this.explicitPos < 0 ? -1 : e.changes.mapPos(this.explicitPos);
    return TPt(i.validFor, e.state, a, o) ? new lg(this.source, l, i, a, o) : i.update && (i = i.update(i, a, o, new fme(e.state, s, l >= 0))) ? new lg(this.source, l, i, i.from, (r = i.to) !== null && r !== void 0 ? r : cf(e.state)) : new ro(this.source, 1, l);
  }
  map(e) {
    return e.empty ? this : (this.result.map ? this.result.map(this.result, e) : this.result) ? new lg(this.source, this.explicitPos < 0 ? -1 : e.mapPos(this.explicitPos), this.result, e.mapPos(this.from), e.mapPos(this.to, 1)) : new ro(
      this.source,
      0
      /* State.Inactive */
    );
  }
  touches(e) {
    return e.changes.touchesRange(this.from, this.to);
  }
}
function TPt(t, e, n, r) {
  if (!t)
    return !1;
  let i = e.sliceDoc(n, r);
  return typeof t == "function" ? t(i, n, r, e) : hme(t, !0).test(i);
}
const vme = /* @__PURE__ */ zt.define({
  map(t, e) {
    return t.map((n) => n.map(e));
  }
}), gme = /* @__PURE__ */ zt.define(), Ea = /* @__PURE__ */ fi.define({
  create() {
    return UT.start();
  },
  update(t, e) {
    return t.update(e);
  },
  provide: (t) => [
    uB.from(t, (e) => e.tooltip),
    rt.contentAttributes.from(t, (e) => e.attrs)
  ]
});
function $B(t, e) {
  const n = e.completion.apply || e.completion.label;
  let r = t.state.field(Ea).active.find((i) => i.source == e.source);
  return r instanceof lg ? (typeof n == "string" ? t.dispatch(Object.assign(Object.assign({}, dPt(t.state, n, r.from, r.to)), { annotations: PB.of(e.completion) })) : n(t, e.completion, r.from, r.to), !0) : !1;
}
const PPt = /* @__PURE__ */ bPt(Ea, $B);
function Px(t, e = "option") {
  return (n) => {
    let r = n.state.field(Ea, !1);
    if (!r || !r.open || r.open.disabled || Date.now() - r.open.timestamp < n.state.facet(Si).interactionDelay)
      return !1;
    let i = 1, a;
    e == "page" && (a = Uve(n, r.open.tooltip)) && (i = Math.max(2, Math.floor(a.dom.offsetHeight / a.dom.querySelector("li").offsetHeight) - 1));
    let { length: o } = r.open.options, s = r.open.selected > -1 ? r.open.selected + i * (t ? 1 : -1) : t ? 0 : o - 1;
    return s < 0 ? s = e == "page" ? 0 : o - 1 : s >= o && (s = e == "page" ? o - 1 : 0), n.dispatch({ effects: gme.of(s) }), !0;
  };
}
const $Pt = (t) => {
  let e = t.state.field(Ea, !1);
  return t.state.readOnly || !e || !e.open || e.open.selected < 0 || e.open.disabled || Date.now() - e.open.timestamp < t.state.facet(Si).interactionDelay ? !1 : $B(t, e.open.options[e.open.selected]);
}, APt = (t) => t.state.field(Ea, !1) ? (t.dispatch({ effects: ZT.of(!0) }), !0) : !1, EPt = (t) => {
  let e = t.state.field(Ea, !1);
  return !e || !e.active.some(
    (n) => n.state != 0
    /* State.Inactive */
  ) ? !1 : (t.dispatch({ effects: P_.of(null) }), !0);
};
class MPt {
  constructor(e, n) {
    this.active = e, this.context = n, this.time = Date.now(), this.updates = [], this.done = void 0;
  }
}
const IPt = 50, DPt = 1e3, RPt = /* @__PURE__ */ Ir.fromClass(class {
  constructor(t) {
    this.view = t, this.debounceUpdate = -1, this.running = [], this.debounceAccept = -1, this.pendingStart = !1, this.composing = 0;
    for (let e of t.state.field(Ea).active)
      e.state == 1 && this.startQuery(e);
  }
  update(t) {
    let e = t.state.field(Ea), n = t.state.facet(Si);
    if (!t.selectionSet && !t.docChanged && t.startState.field(Ea) == e)
      return;
    let r = t.transactions.some((a) => {
      let o = pme(a, n);
      return o & 8 || (a.selection || a.docChanged) && !(o & 3);
    });
    for (let a = 0; a < this.running.length; a++) {
      let o = this.running[a];
      if (r || o.updates.length + t.transactions.length > IPt && Date.now() - o.time > DPt) {
        for (let s of o.context.abortListeners)
          try {
            s();
          } catch (l) {
            Ia(this.view.state, l);
          }
        o.context.abortListeners = null, this.running.splice(a--, 1);
      } else
        o.updates.push(...t.transactions);
    }
    this.debounceUpdate > -1 && clearTimeout(this.debounceUpdate), t.transactions.some((a) => a.effects.some((o) => o.is(ZT))) && (this.pendingStart = !0);
    let i = this.pendingStart ? 50 : n.activateOnTypingDelay;
    if (this.debounceUpdate = e.active.some((a) => a.state == 1 && !this.running.some((o) => o.active.source == a.source)) ? setTimeout(() => this.startUpdate(), i) : -1, this.composing != 0)
      for (let a of t.transactions)
        a.isUserEvent("input.type") ? this.composing = 2 : this.composing == 2 && a.selection && (this.composing = 3);
  }
  startUpdate() {
    this.debounceUpdate = -1, this.pendingStart = !1;
    let { state: t } = this.view, e = t.field(Ea);
    for (let n of e.active)
      n.state == 1 && !this.running.some((r) => r.active.source == n.source) && this.startQuery(n);
  }
  startQuery(t) {
    let { state: e } = this.view, n = cf(e), r = new fme(e, n, t.explicitPos == n, this.view), i = new MPt(t, r);
    this.running.push(i), Promise.resolve(t.source(r)).then((a) => {
      i.context.aborted || (i.done = a || null, this.scheduleAccept());
    }, (a) => {
      this.view.dispatch({ effects: P_.of(null) }), Ia(this.view.state, a);
    });
  }
  scheduleAccept() {
    this.running.every((t) => t.done !== void 0) ? this.accept() : this.debounceAccept < 0 && (this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(Si).updateSyncTime));
  }
  // For each finished query in this.running, try to create a result
  // or, if appropriate, restart the query.
  accept() {
    var t;
    this.debounceAccept > -1 && clearTimeout(this.debounceAccept), this.debounceAccept = -1;
    let e = [], n = this.view.state.facet(Si);
    for (let r = 0; r < this.running.length; r++) {
      let i = this.running[r];
      if (i.done === void 0)
        continue;
      if (this.running.splice(r--, 1), i.done) {
        let o = new lg(i.active.source, i.active.explicitPos, i.done, i.done.from, (t = i.done.to) !== null && t !== void 0 ? t : cf(i.updates.length ? i.updates[0].startState : this.view.state));
        for (let s of i.updates)
          o = o.update(s, n);
        if (o.hasResult()) {
          e.push(o);
          continue;
        }
      }
      let a = this.view.state.field(Ea).active.find((o) => o.source == i.active.source);
      if (a && a.state == 1)
        if (i.done == null) {
          let o = new ro(
            i.active.source,
            0
            /* State.Inactive */
          );
          for (let s of i.updates)
            o = o.update(s, n);
          o.state != 1 && e.push(o);
        } else
          this.startQuery(a);
    }
    e.length && this.view.dispatch({ effects: vme.of(e) });
  }
}, {
  eventHandlers: {
    blur(t) {
      let e = this.view.state.field(Ea, !1);
      if (e && e.tooltip && this.view.state.facet(Si).closeOnBlur) {
        let n = e.open && Uve(this.view, e.open.tooltip);
        (!n || !n.dom.contains(t.relatedTarget)) && setTimeout(() => this.view.dispatch({ effects: P_.of(null) }), 10);
      }
    },
    compositionstart() {
      this.composing = 1;
    },
    compositionend() {
      this.composing == 3 && setTimeout(() => this.view.dispatch({ effects: ZT.of(!1) }), 20), this.composing = 0;
    }
  }
}), kPt = typeof navigator == "object" && /* @__PURE__ */ /Win/.test(navigator.platform), LPt = /* @__PURE__ */ Ff.highest(/* @__PURE__ */ rt.domEventHandlers({
  keydown(t, e) {
    let n = e.state.field(Ea, !1);
    if (!n || !n.open || n.open.disabled || n.open.selected < 0 || t.key.length > 1 || t.ctrlKey && !(kPt && t.altKey) || t.metaKey)
      return !1;
    let r = n.open.options[n.open.selected], i = n.active.find((o) => o.source == r.source), a = r.completion.commitCharacters || i.result.commitCharacters;
    return a && a.indexOf(t.key) > -1 && $B(e, r), !1;
  }
})), mme = /* @__PURE__ */ rt.baseTheme({
  ".cm-tooltip.cm-tooltip-autocomplete": {
    "& > ul": {
      fontFamily: "monospace",
      whiteSpace: "nowrap",
      overflow: "hidden auto",
      maxWidth_fallback: "700px",
      maxWidth: "min(700px, 95vw)",
      minWidth: "250px",
      maxHeight: "10em",
      height: "100%",
      listStyle: "none",
      margin: 0,
      padding: 0,
      "& > li, & > completion-section": {
        padding: "1px 3px",
        lineHeight: 1.2
      },
      "& > li": {
        overflowX: "hidden",
        textOverflow: "ellipsis",
        cursor: "pointer"
      },
      "& > completion-section": {
        display: "list-item",
        borderBottom: "1px solid silver",
        paddingLeft: "0.5em",
        opacity: 0.7
      }
    }
  },
  "&light .cm-tooltip-autocomplete ul li[aria-selected]": {
    background: "#17c",
    color: "white"
  },
  "&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
    background: "#777"
  },
  "&dark .cm-tooltip-autocomplete ul li[aria-selected]": {
    background: "#347",
    color: "white"
  },
  "&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
    background: "#444"
  },
  ".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after": {
    content: '"···"',
    opacity: 0.5,
    display: "block",
    textAlign: "center"
  },
  ".cm-tooltip.cm-completionInfo": {
    position: "absolute",
    padding: "3px 9px",
    width: "max-content",
    maxWidth: "400px",
    boxSizing: "border-box"
  },
  ".cm-completionInfo.cm-completionInfo-left": { right: "100%" },
  ".cm-completionInfo.cm-completionInfo-right": { left: "100%" },
  ".cm-completionInfo.cm-completionInfo-left-narrow": { right: "30px" },
  ".cm-completionInfo.cm-completionInfo-right-narrow": { left: "30px" },
  "&light .cm-snippetField": { backgroundColor: "#00000022" },
  "&dark .cm-snippetField": { backgroundColor: "#ffffff22" },
  ".cm-snippetFieldPosition": {
    verticalAlign: "text-top",
    width: 0,
    height: "1.15em",
    display: "inline-block",
    margin: "0 -0.7px -.7em",
    borderLeft: "1.4px dotted #888"
  },
  ".cm-completionMatchedText": {
    textDecoration: "underline"
  },
  ".cm-completionDetail": {
    marginLeft: "0.5em",
    fontStyle: "italic"
  },
  ".cm-completionIcon": {
    fontSize: "90%",
    width: ".8em",
    display: "inline-block",
    textAlign: "center",
    paddingRight: ".6em",
    opacity: "0.6",
    boxSizing: "content-box"
  },
  ".cm-completionIcon-function, .cm-completionIcon-method": {
    "&:after": { content: "'ƒ'" }
  },
  ".cm-completionIcon-class": {
    "&:after": { content: "'○'" }
  },
  ".cm-completionIcon-interface": {
    "&:after": { content: "'◌'" }
  },
  ".cm-completionIcon-variable": {
    "&:after": { content: "'𝑥'" }
  },
  ".cm-completionIcon-constant": {
    "&:after": { content: "'𝐶'" }
  },
  ".cm-completionIcon-type": {
    "&:after": { content: "'𝑡'" }
  },
  ".cm-completionIcon-enum": {
    "&:after": { content: "'∪'" }
  },
  ".cm-completionIcon-property": {
    "&:after": { content: "'□'" }
  },
  ".cm-completionIcon-keyword": {
    "&:after": { content: "'🔑︎'" }
    // Disable emoji rendering
  },
  ".cm-completionIcon-namespace": {
    "&:after": { content: "'▢'" }
  },
  ".cm-completionIcon-text": {
    "&:after": { content: "'abc'", fontSize: "50%", verticalAlign: "middle" }
  }
});
class NPt {
  constructor(e, n, r, i) {
    this.field = e, this.line = n, this.from = r, this.to = i;
  }
}
class AB {
  constructor(e, n, r) {
    this.field = e, this.from = n, this.to = r;
  }
  map(e) {
    let n = e.mapPos(this.from, -1, Oi.TrackDel), r = e.mapPos(this.to, 1, Oi.TrackDel);
    return n == null || r == null ? null : new AB(this.field, n, r);
  }
}
class EB {
  constructor(e, n) {
    this.lines = e, this.fieldPositions = n;
  }
  instantiate(e, n) {
    let r = [], i = [n], a = e.doc.lineAt(n), o = /^\s*/.exec(a.text)[0];
    for (let l of this.lines) {
      if (r.length) {
        let u = o, c = /^\t*/.exec(l)[0].length;
        for (let f = 0; f < c; f++)
          u += e.facet(D1);
        i.push(n + u.length - c), l = u + l.slice(c);
      }
      r.push(l), n += l.length + 1;
    }
    let s = this.fieldPositions.map((l) => new AB(l.field, i[l.line] + l.from, i[l.line] + l.to));
    return { text: r, ranges: s };
  }
  static parse(e) {
    let n = [], r = [], i = [], a;
    for (let o of e.split(/\r\n?|\n/)) {
      for (; a = /[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o); ) {
        let s = a[1] ? +a[1] : null, l = a[2] || a[3] || "", u = -1, c = l.replace(/\\[{}]/g, (f) => f[1]);
        for (let f = 0; f < n.length; f++)
          (s != null ? n[f].seq == s : c && n[f].name == c) && (u = f);
        if (u < 0) {
          let f = 0;
          for (; f < n.length && (s == null || n[f].seq != null && n[f].seq < s); )
            f++;
          n.splice(f, 0, { seq: s, name: c }), u = f;
          for (let d of i)
            d.field >= u && d.field++;
        }
        i.push(new NPt(u, r.length, a.index, a.index + c.length)), o = o.slice(0, a.index) + l + o.slice(a.index + a[0].length);
      }
      o = o.replace(/\\([{}])/g, (s, l, u) => {
        for (let c of i)
          c.line == r.length && c.from > u && (c.from--, c.to--);
        return l;
      }), r.push(o);
    }
    return new EB(r, i);
  }
}
let BPt = /* @__PURE__ */ pt.widget({ widget: /* @__PURE__ */ new class extends Jl {
  toDOM() {
    let t = document.createElement("span");
    return t.className = "cm-snippetFieldPosition", t;
  }
  ignoreEvent() {
    return !1;
  }
}() }), zPt = /* @__PURE__ */ pt.mark({ class: "cm-snippetField" });
class Hm {
  constructor(e, n) {
    this.ranges = e, this.active = n, this.deco = pt.set(e.map((r) => (r.from == r.to ? BPt : zPt).range(r.from, r.to)));
  }
  map(e) {
    let n = [];
    for (let r of this.ranges) {
      let i = r.map(e);
      if (!i)
        return null;
      n.push(i);
    }
    return new Hm(n, this.active);
  }
  selectionInsideField(e) {
    return e.ranges.every((n) => this.ranges.some((r) => r.field == this.active && r.from <= n.from && r.to >= n.to));
  }
}
const B1 = /* @__PURE__ */ zt.define({
  map(t, e) {
    return t && t.map(e);
  }
}), VPt = /* @__PURE__ */ zt.define(), $_ = /* @__PURE__ */ fi.define({
  create() {
    return null;
  },
  update(t, e) {
    for (let n of e.effects) {
      if (n.is(B1))
        return n.value;
      if (n.is(VPt) && t)
        return new Hm(t.ranges, n.value);
    }
    return t && e.docChanged && (t = t.map(e.changes)), t && e.selection && !t.selectionInsideField(e.selection) && (t = null), t;
  },
  provide: (t) => rt.decorations.from(t, (e) => e ? e.deco : pt.none)
});
function MB(t, e) {
  return De.create(t.filter((n) => n.field == e).map((n) => De.range(n.from, n.to)));
}
function FPt(t) {
  let e = EB.parse(t);
  return (n, r, i, a) => {
    let { text: o, ranges: s } = e.instantiate(n.state, i), l = {
      changes: { from: i, to: a, insert: Sn.of(o) },
      scrollIntoView: !0,
      annotations: r ? [PB.of(r), zr.userEvent.of("input.complete")] : void 0
    };
    if (s.length && (l.selection = MB(s, 0)), s.some((u) => u.field > 0)) {
      let u = new Hm(s, 0), c = l.effects = [B1.of(u)];
      n.state.field($_, !1) === void 0 && c.push(zt.appendConfig.of([$_, jPt, ZPt, mme]));
    }
    n.dispatch(n.state.update(l));
  };
}
function yme(t) {
  return ({ state: e, dispatch: n }) => {
    let r = e.field($_, !1);
    if (!r || t < 0 && r.active == 0)
      return !1;
    let i = r.active + t, a = t > 0 && !r.ranges.some((o) => o.field == i + t);
    return n(e.update({
      selection: MB(r.ranges, i),
      effects: B1.of(a ? null : new Hm(r.ranges, i)),
      scrollIntoView: !0
    })), !0;
  };
}
const WPt = ({ state: t, dispatch: e }) => t.field($_, !1) ? (e(t.update({ effects: B1.of(null) })), !0) : !1, QPt = /* @__PURE__ */ yme(1), HPt = /* @__PURE__ */ yme(-1), GPt = [
  { key: "Tab", run: QPt, shift: HPt },
  { key: "Escape", run: WPt }
], RJ = /* @__PURE__ */ ut.define({
  combine(t) {
    return t.length ? t[0] : GPt;
  }
}), jPt = /* @__PURE__ */ Ff.highest(/* @__PURE__ */ M1.compute([RJ], (t) => t.facet(RJ)));
function xa(t, e) {
  return Object.assign(Object.assign({}, e), { apply: FPt(t) });
}
const ZPt = /* @__PURE__ */ rt.domEventHandlers({
  mousedown(t, e) {
    let n = e.state.field($_, !1), r;
    if (!n || (r = e.posAtCoords({ x: t.clientX, y: t.clientY })) == null)
      return !1;
    let i = n.ranges.find((a) => a.from <= r && a.to >= r);
    return !i || i.field == n.active ? !1 : (e.dispatch({
      selection: MB(n.ranges, i.field),
      effects: B1.of(n.ranges.some((a) => a.field > i.field) ? new Hm(n.ranges, i.field) : null),
      scrollIntoView: !0
    }), !0);
  }
}), A_ = {
  brackets: ["(", "[", "{", "'", '"'],
  before: ")]}:;>",
  stringPrefixes: []
}, dh = /* @__PURE__ */ zt.define({
  map(t, e) {
    let n = e.mapPos(t, -1, Oi.TrackAfter);
    return n ?? void 0;
  }
}), IB = /* @__PURE__ */ new class extends Kh {
}();
IB.startSide = 1;
IB.endSide = -1;
const bme = /* @__PURE__ */ fi.define({
  create() {
    return On.empty;
  },
  update(t, e) {
    if (t = t.map(e.changes), e.selection) {
      let n = e.state.doc.lineAt(e.selection.main.head);
      t = t.update({ filter: (r) => r >= n.from && r <= n.to });
    }
    for (let n of e.effects)
      n.is(dh) && (t = t.update({ add: [IB.range(n.value, n.value + 1)] }));
    return t;
  }
});
function UPt() {
  return [YPt, bme];
}
const SD = "()[]{}<>";
function _me(t) {
  for (let e = 0; e < SD.length; e += 2)
    if (SD.charCodeAt(e) == t)
      return SD.charAt(e + 1);
  return K6(t < 128 ? t : t + 1);
}
function Ome(t, e) {
  return t.languageDataAt("closeBrackets", e)[0] || A_;
}
const XPt = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), YPt = /* @__PURE__ */ rt.inputHandler.of((t, e, n, r) => {
  if ((XPt ? t.composing : t.compositionStarted) || t.state.readOnly)
    return !1;
  let i = t.state.selection.main;
  if (r.length > 2 || r.length == 2 && jo(bi(r, 0)) == 1 || e != i.from || n != i.to)
    return !1;
  let a = JPt(t.state, r);
  return a ? (t.dispatch(a), !0) : !1;
}), qPt = ({ state: t, dispatch: e }) => {
  if (t.readOnly)
    return !1;
  let r = Ome(t, t.selection.main.head).brackets || A_.brackets, i = null, a = t.changeByRange((o) => {
    if (o.empty) {
      let s = e$t(t.doc, o.head);
      for (let l of r)
        if (l == s && h$(t.doc, o.head) == _me(bi(l, 0)))
          return {
            changes: { from: o.head - l.length, to: o.head + l.length },
            range: De.cursor(o.head - l.length)
          };
    }
    return { range: i = o };
  });
  return i || e(t.update(a, { scrollIntoView: !0, userEvent: "delete.backward" })), !i;
}, KPt = [
  { key: "Backspace", run: qPt }
];
function JPt(t, e) {
  let n = Ome(t, t.selection.main.head), r = n.brackets || A_.brackets;
  for (let i of r) {
    let a = _me(bi(i, 0));
    if (e == i)
      return a == i ? r$t(t, i, r.indexOf(i + i + i) > -1, n) : t$t(t, i, a, n.before || A_.before);
    if (e == a && Sme(t, t.selection.main.from))
      return n$t(t, i, a);
  }
  return null;
}
function Sme(t, e) {
  let n = !1;
  return t.field(bme).between(0, t.doc.length, (r) => {
    r == e && (n = !0);
  }), n;
}
function h$(t, e) {
  let n = t.sliceString(e, e + 2);
  return n.slice(0, jo(bi(n, 0)));
}
function e$t(t, e) {
  let n = t.sliceString(e - 2, e);
  return jo(bi(n, 0)) == n.length ? n : n.slice(1);
}
function t$t(t, e, n, r) {
  let i = null, a = t.changeByRange((o) => {
    if (!o.empty)
      return {
        changes: [{ insert: e, from: o.from }, { insert: n, from: o.to }],
        effects: dh.of(o.to + e.length),
        range: De.range(o.anchor + e.length, o.head + e.length)
      };
    let s = h$(t.doc, o.head);
    return !s || /\s/.test(s) || r.indexOf(s) > -1 ? {
      changes: { insert: e + n, from: o.head },
      effects: dh.of(o.head + e.length),
      range: De.cursor(o.head + e.length)
    } : { range: i = o };
  });
  return i ? null : t.update(a, {
    scrollIntoView: !0,
    userEvent: "input.type"
  });
}
function n$t(t, e, n) {
  let r = null, i = t.changeByRange((a) => a.empty && h$(t.doc, a.head) == n ? {
    changes: { from: a.head, to: a.head + n.length, insert: n },
    range: De.cursor(a.head + n.length)
  } : r = { range: a });
  return r ? null : t.update(i, {
    scrollIntoView: !0,
    userEvent: "input.type"
  });
}
function r$t(t, e, n, r) {
  let i = r.stringPrefixes || A_.stringPrefixes, a = null, o = t.changeByRange((s) => {
    if (!s.empty)
      return {
        changes: [{ insert: e, from: s.from }, { insert: e, from: s.to }],
        effects: dh.of(s.to + e.length),
        range: De.range(s.anchor + e.length, s.head + e.length)
      };
    let l = s.head, u = h$(t.doc, l), c;
    if (u == e) {
      if (kJ(t, l))
        return {
          changes: { insert: e + e, from: l },
          effects: dh.of(l + e.length),
          range: De.cursor(l + e.length)
        };
      if (Sme(t, l)) {
        let d = n && t.sliceDoc(l, l + e.length * 3) == e + e + e ? e + e + e : e;
        return {
          changes: { from: l, to: l + d.length, insert: d },
          range: De.cursor(l + d.length)
        };
      }
    } else {
      if (n && t.sliceDoc(l - 2 * e.length, l) == e + e && (c = LJ(t, l - 2 * e.length, i)) > -1 && kJ(t, c))
        return {
          changes: { insert: e + e + e + e, from: l },
          effects: dh.of(l + e.length),
          range: De.cursor(l + e.length)
        };
      if (t.charCategorizer(l)(u) != lr.Word && LJ(t, l, i) > -1 && !i$t(t, l, e, i))
        return {
          changes: { insert: e + e, from: l },
          effects: dh.of(l + e.length),
          range: De.cursor(l + e.length)
        };
    }
    return { range: a = s };
  });
  return a ? null : t.update(o, {
    scrollIntoView: !0,
    userEvent: "input.type"
  });
}
function kJ(t, e) {
  let n = ni(t).resolveInner(e + 1);
  return n.parent && n.from == e;
}
function i$t(t, e, n, r) {
  let i = ni(t).resolveInner(e, -1), a = r.reduce((o, s) => Math.max(o, s.length), 0);
  for (let o = 0; o < 5; o++) {
    let s = t.sliceDoc(i.from, Math.min(i.to, i.from + n.length + a)), l = s.indexOf(n);
    if (!l || l > -1 && r.indexOf(s.slice(0, l)) > -1) {
      let c = i.firstChild;
      for (; c && c.from == i.from && c.to - c.from > n.length + l; ) {
        if (t.sliceDoc(c.to - n.length, c.to) == n)
          return !1;
        c = c.firstChild;
      }
      return !0;
    }
    let u = i.to == e && i.parent;
    if (!u)
      break;
    i = u;
  }
  return !1;
}
function LJ(t, e, n) {
  let r = t.charCategorizer(e);
  if (r(t.sliceDoc(e - 1, e)) != lr.Word)
    return e;
  for (let i of n) {
    let a = e - i.length;
    if (t.sliceDoc(a, e) == i && r(t.sliceDoc(a - 1, a)) != lr.Word)
      return a;
  }
  return -1;
}
function a$t(t = {}) {
  return [
    LPt,
    Ea,
    Si.of(t),
    RPt,
    o$t,
    mme
  ];
}
const xme = [
  { key: "Ctrl-Space", run: APt },
  { key: "Escape", run: EPt },
  { key: "ArrowDown", run: /* @__PURE__ */ Px(!0) },
  { key: "ArrowUp", run: /* @__PURE__ */ Px(!1) },
  { key: "PageDown", run: /* @__PURE__ */ Px(!0, "page") },
  { key: "PageUp", run: /* @__PURE__ */ Px(!1, "page") },
  { key: "Enter", run: $Pt }
], o$t = /* @__PURE__ */ Ff.highest(/* @__PURE__ */ M1.computeN([Si], (t) => t.facet(Si).defaultKeymap ? [xme] : []));
class s$t {
  constructor(e, n, r) {
    this.from = e, this.to = n, this.diagnostic = r;
  }
}
class qd {
  constructor(e, n, r) {
    this.diagnostics = e, this.panel = n, this.selected = r;
  }
  static init(e, n, r) {
    let i = e, a = r.facet(E_).markerFilter;
    a && (i = a(i, r));
    let o = pt.set(i.map((s) => s.from == s.to || s.from == s.to - 1 && r.doc.lineAt(s.from).to == s.from ? pt.widget({
      widget: new g$t(s),
      diagnostic: s
    }).range(s.from) : pt.mark({
      attributes: { class: "cm-lintRange cm-lintRange-" + s.severity + (s.markClass ? " " + s.markClass : "") },
      diagnostic: s
    }).range(s.from, s.to)), !0);
    return new qd(o, n, rm(o));
  }
}
function rm(t, e = null, n = 0) {
  let r = null;
  return t.between(n, 1e9, (i, a, { spec: o }) => {
    if (!(e && o.diagnostic != e))
      return r = new s$t(i, a, o.diagnostic), !1;
  }), r;
}
function l$t(t, e) {
  let n = e.pos, r = e.end || n, i = t.state.facet(E_).hideOn(t, n, r);
  if (i != null)
    return i;
  let a = t.startState.doc.lineAt(e.pos);
  return !!(t.effects.some((o) => o.is(wme)) || t.changes.touchesRange(a.from, Math.max(a.to, r)));
}
function u$t(t, e) {
  return t.field(so, !1) ? e : e.concat(zt.appendConfig.of(b$t));
}
const wme = /* @__PURE__ */ zt.define(), DB = /* @__PURE__ */ zt.define(), Cme = /* @__PURE__ */ zt.define(), so = /* @__PURE__ */ fi.define({
  create() {
    return new qd(pt.none, null, null);
  },
  update(t, e) {
    if (e.docChanged && t.diagnostics.size) {
      let n = t.diagnostics.map(e.changes), r = null, i = t.panel;
      if (t.selected) {
        let a = e.changes.mapPos(t.selected.from, 1);
        r = rm(n, t.selected.diagnostic, a) || rm(n, null, a);
      }
      !n.size && i && e.state.facet(E_).autoPanel && (i = null), t = new qd(n, i, r);
    }
    for (let n of e.effects)
      if (n.is(wme)) {
        let r = e.state.facet(E_).autoPanel ? n.value.length ? M_.open : null : t.panel;
        t = qd.init(n.value, r, e.state);
      } else n.is(DB) ? t = new qd(t.diagnostics, n.value ? M_.open : null, t.selected) : n.is(Cme) && (t = new qd(t.diagnostics, t.panel, n.value));
    return t;
  },
  provide: (t) => [
    S_.from(t, (e) => e.panel),
    rt.decorations.from(t, (e) => e.diagnostics)
  ]
}), c$t = /* @__PURE__ */ pt.mark({ class: "cm-lintRange cm-lintRange-active" });
function f$t(t, e, n) {
  let { diagnostics: r } = t.state.field(so), i = [], a = 2e8, o = 0;
  r.between(e - (n < 0 ? 1 : 0), e + (n > 0 ? 1 : 0), (l, u, { spec: c }) => {
    e >= l && e <= u && (l == u || (e > l || n > 0) && (e < u || n < 0)) && (i.push(c.diagnostic), a = Math.min(l, a), o = Math.max(u, o));
  });
  let s = t.state.facet(E_).tooltipFilter;
  return s && (i = s(i, t.state)), i.length ? {
    pos: a,
    end: o,
    above: t.state.doc.lineAt(a).to < o,
    create() {
      return { dom: d$t(t, i) };
    }
  } : null;
}
function d$t(t, e) {
  return Yn("ul", { class: "cm-tooltip-lint" }, e.map((n) => Pme(t, n, !1)));
}
const h$t = (t) => {
  let e = t.state.field(so, !1);
  (!e || !e.panel) && t.dispatch({ effects: u$t(t.state, [DB.of(!0)]) });
  let n = O_(t, M_.open);
  return n && n.dom.querySelector(".cm-panel-lint ul").focus(), !0;
}, NJ = (t) => {
  let e = t.state.field(so, !1);
  return !e || !e.panel ? !1 : (t.dispatch({ effects: DB.of(!1) }), !0);
}, p$t = (t) => {
  let e = t.state.field(so, !1);
  if (!e)
    return !1;
  let n = t.state.selection.main, r = e.diagnostics.iter(n.to + 1);
  return !r.value && (r = e.diagnostics.iter(0), !r.value || r.from == n.from && r.to == n.to) ? !1 : (t.dispatch({ selection: { anchor: r.from, head: r.to }, scrollIntoView: !0 }), !0);
}, v$t = [
  { key: "Mod-Shift-m", run: h$t, preventDefault: !0 },
  { key: "F8", run: p$t }
], E_ = /* @__PURE__ */ ut.define({
  combine(t) {
    return Object.assign({ sources: t.map((e) => e.source).filter((e) => e != null) }, Kl(t.map((e) => e.config), {
      delay: 750,
      markerFilter: null,
      tooltipFilter: null,
      needsRefresh: null,
      hideOn: () => null
    }, {
      needsRefresh: (e, n) => e ? n ? (r) => e(r) || n(r) : e : n
    }));
  }
});
function Tme(t) {
  let e = [];
  if (t)
    e: for (let { name: n } of t) {
      for (let r = 0; r < n.length; r++) {
        let i = n[r];
        if (/[a-zA-Z]/.test(i) && !e.some((a) => a.toLowerCase() == i.toLowerCase())) {
          e.push(i);
          continue e;
        }
      }
      e.push("");
    }
  return e;
}
function Pme(t, e, n) {
  var r;
  let i = n ? Tme(e.actions) : [];
  return Yn("li", { class: "cm-diagnostic cm-diagnostic-" + e.severity }, Yn("span", { class: "cm-diagnosticText" }, e.renderMessage ? e.renderMessage(t) : e.message), (r = e.actions) === null || r === void 0 ? void 0 : r.map((a, o) => {
    let s = !1, l = (d) => {
      if (d.preventDefault(), s)
        return;
      s = !0;
      let h = rm(t.state.field(so).diagnostics, e);
      h && a.apply(t, h.from, h.to);
    }, { name: u } = a, c = i[o] ? u.indexOf(i[o]) : -1, f = c < 0 ? u : [
      u.slice(0, c),
      Yn("u", u.slice(c, c + 1)),
      u.slice(c + 1)
    ];
    return Yn("button", {
      type: "button",
      class: "cm-diagnosticAction",
      onclick: l,
      onmousedown: l,
      "aria-label": ` Action: ${u}${c < 0 ? "" : ` (access key "${i[o]})"`}.`
    }, f);
  }), e.source && Yn("div", { class: "cm-diagnosticSource" }, e.source));
}
class g$t extends Jl {
  constructor(e) {
    super(), this.diagnostic = e;
  }
  eq(e) {
    return e.diagnostic == this.diagnostic;
  }
  toDOM() {
    return Yn("span", { class: "cm-lintPoint cm-lintPoint-" + this.diagnostic.severity });
  }
}
class BJ {
  constructor(e, n) {
    this.diagnostic = n, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = Pme(e, n, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option");
  }
}
class M_ {
  constructor(e) {
    this.view = e, this.items = [];
    let n = (i) => {
      if (i.keyCode == 27)
        NJ(this.view), this.view.focus();
      else if (i.keyCode == 38 || i.keyCode == 33)
        this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length);
      else if (i.keyCode == 40 || i.keyCode == 34)
        this.moveSelection((this.selectedIndex + 1) % this.items.length);
      else if (i.keyCode == 36)
        this.moveSelection(0);
      else if (i.keyCode == 35)
        this.moveSelection(this.items.length - 1);
      else if (i.keyCode == 13)
        this.view.focus();
      else if (i.keyCode >= 65 && i.keyCode <= 90 && this.selectedIndex >= 0) {
        let { diagnostic: a } = this.items[this.selectedIndex], o = Tme(a.actions);
        for (let s = 0; s < o.length; s++)
          if (o[s].toUpperCase().charCodeAt(0) == i.keyCode) {
            let l = rm(this.view.state.field(so).diagnostics, a);
            l && a.actions[s].apply(e, l.from, l.to);
          }
      } else
        return;
      i.preventDefault();
    }, r = (i) => {
      for (let a = 0; a < this.items.length; a++)
        this.items[a].dom.contains(i.target) && this.moveSelection(a);
    };
    this.list = Yn("ul", {
      tabIndex: 0,
      role: "listbox",
      "aria-label": this.view.state.phrase("Diagnostics"),
      onkeydown: n,
      onclick: r
    }), this.dom = Yn("div", { class: "cm-panel-lint" }, this.list, Yn("button", {
      type: "button",
      name: "close",
      "aria-label": this.view.state.phrase("close"),
      onclick: () => NJ(this.view)
    }, "×")), this.update();
  }
  get selectedIndex() {
    let e = this.view.state.field(so).selected;
    if (!e)
      return -1;
    for (let n = 0; n < this.items.length; n++)
      if (this.items[n].diagnostic == e.diagnostic)
        return n;
    return -1;
  }
  update() {
    let { diagnostics: e, selected: n } = this.view.state.field(so), r = 0, i = !1, a = null;
    for (e.between(0, this.view.state.doc.length, (o, s, { spec: l }) => {
      let u = -1, c;
      for (let f = r; f < this.items.length; f++)
        if (this.items[f].diagnostic == l.diagnostic) {
          u = f;
          break;
        }
      u < 0 ? (c = new BJ(this.view, l.diagnostic), this.items.splice(r, 0, c), i = !0) : (c = this.items[u], u > r && (this.items.splice(r, u - r), i = !0)), n && c.diagnostic == n.diagnostic ? c.dom.hasAttribute("aria-selected") || (c.dom.setAttribute("aria-selected", "true"), a = c) : c.dom.hasAttribute("aria-selected") && c.dom.removeAttribute("aria-selected"), r++;
    }); r < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0); )
      i = !0, this.items.pop();
    this.items.length == 0 && (this.items.push(new BJ(this.view, {
      from: -1,
      to: -1,
      severity: "info",
      message: this.view.state.phrase("No diagnostics")
    })), i = !0), a ? (this.list.setAttribute("aria-activedescendant", a.id), this.view.requestMeasure({
      key: this,
      read: () => ({ sel: a.dom.getBoundingClientRect(), panel: this.list.getBoundingClientRect() }),
      write: ({ sel: o, panel: s }) => {
        let l = s.height / this.list.offsetHeight;
        o.top < s.top ? this.list.scrollTop -= (s.top - o.top) / l : o.bottom > s.bottom && (this.list.scrollTop += (o.bottom - s.bottom) / l);
      }
    })) : this.selectedIndex < 0 && this.list.removeAttribute("aria-activedescendant"), i && this.sync();
  }
  sync() {
    let e = this.list.firstChild;
    function n() {
      let r = e;
      e = r.nextSibling, r.remove();
    }
    for (let r of this.items)
      if (r.dom.parentNode == this.list) {
        for (; e != r.dom; )
          n();
        e = r.dom.nextSibling;
      } else
        this.list.insertBefore(r.dom, e);
    for (; e; )
      n();
  }
  moveSelection(e) {
    if (this.selectedIndex < 0)
      return;
    let n = this.view.state.field(so), r = rm(n.diagnostics, this.items[e].diagnostic);
    r && this.view.dispatch({
      selection: { anchor: r.from, head: r.to },
      scrollIntoView: !0,
      effects: Cme.of(r)
    });
  }
  static open(e) {
    return new M_(e);
  }
}
function m$t(t, e = 'viewBox="0 0 40 40"') {
  return `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`;
}
function $x(t) {
  return m$t(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`, 'width="6" height="3"');
}
const y$t = /* @__PURE__ */ rt.baseTheme({
  ".cm-diagnostic": {
    padding: "3px 6px 3px 8px",
    marginLeft: "-1px",
    display: "block",
    whiteSpace: "pre-wrap"
  },
  ".cm-diagnostic-error": { borderLeft: "5px solid #d11" },
  ".cm-diagnostic-warning": { borderLeft: "5px solid orange" },
  ".cm-diagnostic-info": { borderLeft: "5px solid #999" },
  ".cm-diagnostic-hint": { borderLeft: "5px solid #66d" },
  ".cm-diagnosticAction": {
    font: "inherit",
    border: "none",
    padding: "2px 4px",
    backgroundColor: "#444",
    color: "white",
    borderRadius: "3px",
    marginLeft: "8px",
    cursor: "pointer"
  },
  ".cm-diagnosticSource": {
    fontSize: "70%",
    opacity: 0.7
  },
  ".cm-lintRange": {
    backgroundPosition: "left bottom",
    backgroundRepeat: "repeat-x",
    paddingBottom: "0.7px"
  },
  ".cm-lintRange-error": { backgroundImage: /* @__PURE__ */ $x("#d11") },
  ".cm-lintRange-warning": { backgroundImage: /* @__PURE__ */ $x("orange") },
  ".cm-lintRange-info": { backgroundImage: /* @__PURE__ */ $x("#999") },
  ".cm-lintRange-hint": { backgroundImage: /* @__PURE__ */ $x("#66d") },
  ".cm-lintRange-active": { backgroundColor: "#ffdd9980" },
  ".cm-tooltip-lint": {
    padding: 0,
    margin: 0
  },
  ".cm-lintPoint": {
    position: "relative",
    "&:after": {
      content: '""',
      position: "absolute",
      bottom: 0,
      left: "-2px",
      borderLeft: "3px solid transparent",
      borderRight: "3px solid transparent",
      borderBottom: "4px solid #d11"
    }
  },
  ".cm-lintPoint-warning": {
    "&:after": { borderBottomColor: "orange" }
  },
  ".cm-lintPoint-info": {
    "&:after": { borderBottomColor: "#999" }
  },
  ".cm-lintPoint-hint": {
    "&:after": { borderBottomColor: "#66d" }
  },
  ".cm-panel.cm-panel-lint": {
    position: "relative",
    "& ul": {
      maxHeight: "100px",
      overflowY: "auto",
      "& [aria-selected]": {
        backgroundColor: "#ddd",
        "& u": { textDecoration: "underline" }
      },
      "&:focus [aria-selected]": {
        background_fallback: "#bdf",
        backgroundColor: "Highlight",
        color_fallback: "white",
        color: "HighlightText"
      },
      "& u": { textDecoration: "none" },
      padding: 0,
      margin: 0
    },
    "& [name=close]": {
      position: "absolute",
      top: "0",
      right: "2px",
      background: "inherit",
      border: "none",
      font: "inherit",
      padding: 0,
      margin: 0
    }
  }
}), b$t = [
  so,
  /* @__PURE__ */ rt.decorations.compute([so], (t) => {
    let { selected: e, panel: n } = t.field(so);
    return !e || !n || e.from == e.to ? pt.none : pt.set([
      c$t.range(e.from, e.to)
    ]);
  }),
  /* @__PURE__ */ oCt(f$t, { hideOn: l$t }),
  y$t
], _$t = [
  vCt(),
  yCt(),
  kwt(),
  DTt(),
  oTt(),
  wwt(),
  Awt(),
  un.allowMultipleSelections.of(!0),
  ZCt(),
  bge(cTt, { fallback: !0 }),
  mTt(),
  UPt(),
  a$t(),
  Xwt(),
  Kwt(),
  Fwt(),
  F2t(),
  M1.of([
    ...KPt,
    ...R2t,
    ...oPt,
    ...WTt,
    ...nTt,
    ...xme,
    ...v$t
  ])
];
/*!
* VueCodemirror v6.1.1
* Copyright (c) Surmon. All rights reserved.
* Released under the MIT License.
* Surmon
*/
var O$t = Object.freeze({ autofocus: !1, disabled: !1, indentWithTab: !0, tabSize: 2, placeholder: "", autoDestroy: !0, extensions: [_$t] }), S$t = Symbol("vue-codemirror-global-config"), ta, x$t = function(t) {
  var e = t.onUpdate, n = t.onChange, r = t.onFocus, i = t.onBlur, a = function(o, s) {
    var l = {};
    for (var u in o) Object.prototype.hasOwnProperty.call(o, u) && s.indexOf(u) < 0 && (l[u] = o[u]);
    if (o != null && typeof Object.getOwnPropertySymbols == "function") {
      var c = 0;
      for (u = Object.getOwnPropertySymbols(o); c < u.length; c++) s.indexOf(u[c]) < 0 && Object.prototype.propertyIsEnumerable.call(o, u[c]) && (l[u[c]] = o[u[c]]);
    }
    return l;
  }(t, ["onUpdate", "onChange", "onFocus", "onBlur"]);
  return un.create({ doc: a.doc, selection: a.selection, extensions: (Array.isArray(a.extensions) ? a.extensions : [a.extensions]).concat([rt.updateListener.of(function(o) {
    e(o), o.docChanged && n(o.state.doc.toString(), o), o.focusChanged && (o.view.hasFocus ? r(o) : i(o));
  })]) });
}, Pv = function(t) {
  var e = new $1();
  return { compartment: e, run: function(n) {
    e.get(t.state) ? t.dispatch({ effects: e.reconfigure(n) }) : t.dispatch({ effects: zt.appendConfig.of(e.of(n)) });
  } };
}, zJ = function(t, e) {
  var n = Pv(t), r = n.compartment, i = n.run;
  return function(a) {
    var o = r.get(t.state);
    i(a ?? o !== e ? e : []);
  };
}, Ax = { type: Boolean, default: void 0 }, w$t = { autofocus: Ax, disabled: Ax, indentWithTab: Ax, tabSize: Number, placeholder: String, style: Object, autoDestroy: Ax, phrases: Object, root: Object, extensions: Array, selection: Object }, C$t = { modelValue: { type: String, default: "" } }, T$t = Object.assign(Object.assign({}, w$t), C$t);
(function(t) {
  t.Change = "change", t.Update = "update", t.Focus = "focus", t.Blur = "blur", t.Ready = "ready", t.ModelUpdate = "update:modelValue";
})(ta || (ta = {}));
var Kd = {};
Kd[ta.Change] = function(t, e) {
  return !0;
}, Kd[ta.Update] = function(t) {
  return !0;
}, Kd[ta.Focus] = function(t) {
  return !0;
}, Kd[ta.Blur] = function(t) {
  return !0;
}, Kd[ta.Ready] = function(t) {
  return !0;
};
var $me = {};
$me[ta.ModelUpdate] = Kd[ta.Change];
var P$t = Object.assign(Object.assign({}, Kd), $me), $$t = ae({ name: "VueCodemirror", props: Object.assign({}, T$t), emits: Object.assign({}, P$t), setup: function(t, e) {
  var n = ve(), r = ve(), i = ve(), a = Object.assign(Object.assign({}, O$t), et(S$t, {})), o = V(function() {
    var s = {};
    return Object.keys(es(t)).forEach(function(l) {
      var u;
      l !== "modelValue" && (s[l] = (u = t[l]) !== null && u !== void 0 ? u : a[l]);
    }), s;
  });
  return _t(function() {
    var s;
    r.value = x$t({ doc: t.modelValue, selection: o.value.selection, extensions: (s = a.extensions) !== null && s !== void 0 ? s : [], onFocus: function(u) {
      return e.emit(ta.Focus, u);
    }, onBlur: function(u) {
      return e.emit(ta.Blur, u);
    }, onUpdate: function(u) {
      return e.emit(ta.Update, u);
    }, onChange: function(u, c) {
      u !== t.modelValue && (e.emit(ta.Change, u, c), e.emit(ta.ModelUpdate, u, c));
    } }), i.value = function(u) {
      return new rt(Object.assign({}, u));
    }({ state: r.value, parent: n.value, root: o.value.root });
    var l = function(u) {
      var c = function() {
        return u.state.doc.toString();
      }, f = Pv(u).run, d = zJ(u, [rt.editable.of(!1), un.readOnly.of(!0)]), h = zJ(u, M1.of([k2t])), p = Pv(u).run, v = Pv(u).run, g = Pv(u).run, m = Pv(u).run;
      return { focus: function() {
        return u.focus();
      }, getDoc: c, setDoc: function(y) {
        y !== c() && u.dispatch({ changes: { from: 0, to: u.state.doc.length, insert: y } });
      }, reExtensions: f, toggleDisabled: d, toggleIndentWithTab: h, setTabSize: function(y) {
        p([un.tabSize.of(y), D1.of(" ".repeat(y))]);
      }, setPhrases: function(y) {
        v([un.phrases.of(y)]);
      }, setPlaceholder: function(y) {
        g(Gwt(y));
      }, setStyle: function(y) {
        y === void 0 && (y = {}), m(rt.theme({ "&": Object.assign({}, y) }));
      } };
    }(i.value);
    me(function() {
      return t.modelValue;
    }, function(u) {
      u !== l.getDoc() && l.setDoc(u);
    }), me(function() {
      return t.extensions;
    }, function(u) {
      return l.reExtensions(u || []);
    }, { immediate: !0 }), me(function() {
      return o.value.disabled;
    }, function(u) {
      return l.toggleDisabled(u);
    }, { immediate: !0 }), me(function() {
      return o.value.indentWithTab;
    }, function(u) {
      return l.toggleIndentWithTab(u);
    }, { immediate: !0 }), me(function() {
      return o.value.tabSize;
    }, function(u) {
      return l.setTabSize(u);
    }, { immediate: !0 }), me(function() {
      return o.value.phrases;
    }, function(u) {
      return l.setPhrases(u || {});
    }, { immediate: !0 }), me(function() {
      return o.value.placeholder;
    }, function(u) {
      return l.setPlaceholder(u);
    }, { immediate: !0 }), me(function() {
      return o.value.style;
    }, function(u) {
      return l.setStyle(u);
    }, { immediate: !0 }), o.value.autofocus && l.focus(), e.emit(ta.Ready, { state: r.value, view: i.value, container: n.value });
  }), Qt(function() {
    o.value.autoDestroy && i.value && function(s) {
      s.destroy();
    }(i.value);
  }), function() {
    return ff("div", { class: "v-codemirror", style: { display: "contents" }, ref: n });
  };
} }), A$t = $$t;
const E$t = "#e5c07b", VJ = "#e06c75", M$t = "#56b6c2", I$t = "#ffffff", kw = "#abb2bf", G4 = "#7d8799", D$t = "#61afef", R$t = "#98c379", FJ = "#d19a66", k$t = "#c678dd", L$t = "#21252b", WJ = "#2c313a", QJ = "#282c34", xD = "#353a42", N$t = "#3E4451", HJ = "#528bff", B$t = /* @__PURE__ */ rt.theme({
  "&": {
    color: kw,
    backgroundColor: QJ
  },
  ".cm-content": {
    caretColor: HJ
  },
  ".cm-cursor, .cm-dropCursor": { borderLeftColor: HJ },
  "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: N$t },
  ".cm-panels": { backgroundColor: L$t, color: kw },
  ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
  ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
  ".cm-searchMatch": {
    backgroundColor: "#72a1ff59",
    outline: "1px solid #457dff"
  },
  ".cm-searchMatch.cm-searchMatch-selected": {
    backgroundColor: "#6199ff2f"
  },
  ".cm-activeLine": { backgroundColor: "#6699ff0b" },
  ".cm-selectionMatch": { backgroundColor: "#aafe661a" },
  "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": {
    backgroundColor: "#bad0f847"
  },
  ".cm-gutters": {
    backgroundColor: QJ,
    color: G4,
    border: "none"
  },
  ".cm-activeLineGutter": {
    backgroundColor: WJ
  },
  ".cm-foldPlaceholder": {
    backgroundColor: "transparent",
    border: "none",
    color: "#ddd"
  },
  ".cm-tooltip": {
    border: "none",
    backgroundColor: xD
  },
  ".cm-tooltip .cm-tooltip-arrow:before": {
    borderTopColor: "transparent",
    borderBottomColor: "transparent"
  },
  ".cm-tooltip .cm-tooltip-arrow:after": {
    borderTopColor: xD,
    borderBottomColor: xD
  },
  ".cm-tooltip-autocomplete": {
    "& > ul > li[aria-selected]": {
      backgroundColor: WJ,
      color: kw
    }
  }
}, { dark: !0 }), z$t = /* @__PURE__ */ k1.define([
  {
    tag: ce.keyword,
    color: k$t
  },
  {
    tag: [ce.name, ce.deleted, ce.character, ce.propertyName, ce.macroName],
    color: VJ
  },
  {
    tag: [/* @__PURE__ */ ce.function(ce.variableName), ce.labelName],
    color: D$t
  },
  {
    tag: [ce.color, /* @__PURE__ */ ce.constant(ce.name), /* @__PURE__ */ ce.standard(ce.name)],
    color: FJ
  },
  {
    tag: [/* @__PURE__ */ ce.definition(ce.name), ce.separator],
    color: kw
  },
  {
    tag: [ce.typeName, ce.className, ce.number, ce.changed, ce.annotation, ce.modifier, ce.self, ce.namespace],
    color: E$t
  },
  {
    tag: [ce.operator, ce.operatorKeyword, ce.url, ce.escape, ce.regexp, ce.link, /* @__PURE__ */ ce.special(ce.string)],
    color: M$t
  },
  {
    tag: [ce.meta, ce.comment],
    color: G4
  },
  {
    tag: ce.strong,
    fontWeight: "bold"
  },
  {
    tag: ce.emphasis,
    fontStyle: "italic"
  },
  {
    tag: ce.strikethrough,
    textDecoration: "line-through"
  },
  {
    tag: ce.link,
    color: G4,
    textDecoration: "underline"
  },
  {
    tag: ce.heading,
    fontWeight: "bold",
    color: VJ
  },
  {
    tag: [ce.atom, ce.bool, /* @__PURE__ */ ce.special(ce.variableName)],
    color: FJ
  },
  {
    tag: [ce.processingInstruction, ce.string, ce.inserted],
    color: R$t
  },
  {
    tag: ce.invalid,
    color: I$t
  }
]), V$t = [B$t, /* @__PURE__ */ bge(z$t)];
class XT {
  /**
  @internal
  */
  constructor(e, n, r, i, a, o, s, l, u, c = 0, f) {
    this.p = e, this.stack = n, this.state = r, this.reducePos = i, this.pos = a, this.score = o, this.buffer = s, this.bufferBase = l, this.curContext = u, this.lookAhead = c, this.parent = f;
  }
  /**
  @internal
  */
  toString() {
    return `[${this.stack.filter((e, n) => n % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
  }
  // Start an empty stack
  /**
  @internal
  */
  static start(e, n, r = 0) {
    let i = e.parser.context;
    return new XT(e, [], n, r, r, 0, [], 0, i ? new GJ(i, i.start) : null, 0, null);
  }
  /**
  The stack's current [context](#lr.ContextTracker) value, if
  any. Its type will depend on the context tracker's type
  parameter, or it will be `null` if there is no context
  tracker.
  */
  get context() {
    return this.curContext ? this.curContext.context : null;
  }
  // Push a state onto the stack, tracking its start position as well
  // as the buffer base at that point.
  /**
  @internal
  */
  pushState(e, n) {
    this.stack.push(this.state, n, this.bufferBase + this.buffer.length), this.state = e;
  }
  // Apply a reduce action
  /**
  @internal
  */
  reduce(e) {
    var n;
    let r = e >> 19, i = e & 65535, { parser: a } = this.p;
    this.reducePos < this.pos - 25 && this.setLookAhead(this.pos);
    let o = a.dynamicPrecedence(i);
    if (o && (this.score += o), r == 0) {
      this.pushState(a.getGoto(this.state, i, !0), this.reducePos), i < a.minRepeatTerm && this.storeNode(i, this.reducePos, this.reducePos, 4, !0), this.reduceContext(i, this.reducePos);
      return;
    }
    let s = this.stack.length - (r - 1) * 3 - (e & 262144 ? 6 : 0), l = s ? this.stack[s - 2] : this.p.ranges[0].from, u = this.reducePos - l;
    u >= 2e3 && !(!((n = this.p.parser.nodeSet.types[i]) === null || n === void 0) && n.isAnonymous) && (l == this.p.lastBigReductionStart ? (this.p.bigReductionCount++, this.p.lastBigReductionSize = u) : this.p.lastBigReductionSize < u && (this.p.bigReductionCount = 1, this.p.lastBigReductionStart = l, this.p.lastBigReductionSize = u));
    let c = s ? this.stack[s - 1] : 0, f = this.bufferBase + this.buffer.length - c;
    if (i < a.minRepeatTerm || e & 131072) {
      let d = a.stateFlag(
        this.state,
        1
        /* StateFlag.Skipped */
      ) ? this.pos : this.reducePos;
      this.storeNode(i, l, d, f + 4, !0);
    }
    if (e & 262144)
      this.state = this.stack[s];
    else {
      let d = this.stack[s - 3];
      this.state = a.getGoto(d, i, !0);
    }
    for (; this.stack.length > s; )
      this.stack.pop();
    this.reduceContext(i, l);
  }
  // Shift a value into the buffer
  /**
  @internal
  */
  storeNode(e, n, r, i = 4, a = !1) {
    if (e == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
      let o = this, s = this.buffer.length;
      if (s == 0 && o.parent && (s = o.bufferBase - o.parent.bufferBase, o = o.parent), s > 0 && o.buffer[s - 4] == 0 && o.buffer[s - 1] > -1) {
        if (n == r)
          return;
        if (o.buffer[s - 2] >= n) {
          o.buffer[s - 2] = r;
          return;
        }
      }
    }
    if (!a || this.pos == r)
      this.buffer.push(e, n, r, i);
    else {
      let o = this.buffer.length;
      if (o > 0 && this.buffer[o - 4] != 0)
        for (; o > 0 && this.buffer[o - 2] > r; )
          this.buffer[o] = this.buffer[o - 4], this.buffer[o + 1] = this.buffer[o - 3], this.buffer[o + 2] = this.buffer[o - 2], this.buffer[o + 3] = this.buffer[o - 1], o -= 4, i > 4 && (i -= 4);
      this.buffer[o] = e, this.buffer[o + 1] = n, this.buffer[o + 2] = r, this.buffer[o + 3] = i;
    }
  }
  // Apply a shift action
  /**
  @internal
  */
  shift(e, n, r, i) {
    if (e & 131072)
      this.pushState(e & 65535, this.pos);
    else if (e & 262144)
      this.pos = i, this.shiftContext(n, r), n <= this.p.parser.maxNode && this.buffer.push(n, r, i, 4);
    else {
      let a = e, { parser: o } = this.p;
      (i > this.pos || n <= o.maxNode) && (this.pos = i, o.stateFlag(
        a,
        1
        /* StateFlag.Skipped */
      ) || (this.reducePos = i)), this.pushState(a, r), this.shiftContext(n, r), n <= o.maxNode && this.buffer.push(n, r, i, 4);
    }
  }
  // Apply an action
  /**
  @internal
  */
  apply(e, n, r, i) {
    e & 65536 ? this.reduce(e) : this.shift(e, n, r, i);
  }
  // Add a prebuilt (reused) node into the buffer.
  /**
  @internal
  */
  useNode(e, n) {
    let r = this.p.reused.length - 1;
    (r < 0 || this.p.reused[r] != e) && (this.p.reused.push(e), r++);
    let i = this.pos;
    this.reducePos = this.pos = i + e.length, this.pushState(n, i), this.buffer.push(
      r,
      i,
      this.reducePos,
      -1
      /* size == -1 means this is a reused value */
    ), this.curContext && this.updateContext(this.curContext.tracker.reuse(this.curContext.context, e, this, this.p.stream.reset(this.pos - e.length)));
  }
  // Split the stack. Due to the buffer sharing and the fact
  // that `this.stack` tends to stay quite shallow, this isn't very
  // expensive.
  /**
  @internal
  */
  split() {
    let e = this, n = e.buffer.length;
    for (; n > 0 && e.buffer[n - 2] > e.reducePos; )
      n -= 4;
    let r = e.buffer.slice(n), i = e.bufferBase + n;
    for (; e && i == e.bufferBase; )
      e = e.parent;
    return new XT(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, r, i, this.curContext, this.lookAhead, e);
  }
  // Try to recover from an error by 'deleting' (ignoring) one token.
  /**
  @internal
  */
  recoverByDelete(e, n) {
    let r = e <= this.p.parser.maxNode;
    r && this.storeNode(e, this.pos, n, 4), this.storeNode(0, this.pos, n, r ? 8 : 4), this.pos = this.reducePos = n, this.score -= 190;
  }
  /**
  Check if the given term would be able to be shifted (optionally
  after some reductions) on this stack. This can be useful for
  external tokenizers that want to make sure they only provide a
  given token when it applies.
  */
  canShift(e) {
    for (let n = new F$t(this); ; ) {
      let r = this.p.parser.stateSlot(
        n.state,
        4
        /* ParseState.DefaultReduce */
      ) || this.p.parser.hasAction(n.state, e);
      if (r == 0)
        return !1;
      if (!(r & 65536))
        return !0;
      n.reduce(r);
    }
  }
  // Apply up to Recover.MaxNext recovery actions that conceptually
  // inserts some missing token or rule.
  /**
  @internal
  */
  recoverByInsert(e) {
    if (this.stack.length >= 300)
      return [];
    let n = this.p.parser.nextStates(this.state);
    if (n.length > 8 || this.stack.length >= 120) {
      let i = [];
      for (let a = 0, o; a < n.length; a += 2)
        (o = n[a + 1]) != this.state && this.p.parser.hasAction(o, e) && i.push(n[a], o);
      if (this.stack.length < 120)
        for (let a = 0; i.length < 8 && a < n.length; a += 2) {
          let o = n[a + 1];
          i.some((s, l) => l & 1 && s == o) || i.push(n[a], o);
        }
      n = i;
    }
    let r = [];
    for (let i = 0; i < n.length && r.length < 4; i += 2) {
      let a = n[i + 1];
      if (a == this.state)
        continue;
      let o = this.split();
      o.pushState(a, this.pos), o.storeNode(0, o.pos, o.pos, 4, !0), o.shiftContext(n[i], this.pos), o.reducePos = this.pos, o.score -= 200, r.push(o);
    }
    return r;
  }
  // Force a reduce, if possible. Return false if that can't
  // be done.
  /**
  @internal
  */
  forceReduce() {
    let { parser: e } = this.p, n = e.stateSlot(
      this.state,
      5
      /* ParseState.ForcedReduce */
    );
    if (!(n & 65536))
      return !1;
    if (!e.validAction(this.state, n)) {
      let r = n >> 19, i = n & 65535, a = this.stack.length - r * 3;
      if (a < 0 || e.getGoto(this.stack[a], i, !1) < 0) {
        let o = this.findForcedReduction();
        if (o == null)
          return !1;
        n = o;
      }
      this.storeNode(0, this.pos, this.pos, 4, !0), this.score -= 100;
    }
    return this.reducePos = this.pos, this.reduce(n), !0;
  }
  /**
  Try to scan through the automaton to find some kind of reduction
  that can be applied. Used when the regular ForcedReduce field
  isn't a valid action. @internal
  */
  findForcedReduction() {
    let { parser: e } = this.p, n = [], r = (i, a) => {
      if (!n.includes(i))
        return n.push(i), e.allActions(i, (o) => {
          if (!(o & 393216)) if (o & 65536) {
            let s = (o >> 19) - a;
            if (s > 1) {
              let l = o & 65535, u = this.stack.length - s * 3;
              if (u >= 0 && e.getGoto(this.stack[u], l, !1) >= 0)
                return s << 19 | 65536 | l;
            }
          } else {
            let s = r(o, a + 1);
            if (s != null)
              return s;
          }
        });
    };
    return r(this.state, 0);
  }
  /**
  @internal
  */
  forceAll() {
    for (; !this.p.parser.stateFlag(
      this.state,
      2
      /* StateFlag.Accepting */
    ); )
      if (!this.forceReduce()) {
        this.storeNode(0, this.pos, this.pos, 4, !0);
        break;
      }
    return this;
  }
  /**
  Check whether this state has no further actions (assumed to be a direct descendant of the
  top state, since any other states must be able to continue
  somehow). @internal
  */
  get deadEnd() {
    if (this.stack.length != 3)
      return !1;
    let { parser: e } = this.p;
    return e.data[e.stateSlot(
      this.state,
      1
      /* ParseState.Actions */
    )] == 65535 && !e.stateSlot(
      this.state,
      4
      /* ParseState.DefaultReduce */
    );
  }
  /**
  Restart the stack (put it back in its start state). Only safe
  when this.stack.length == 3 (state is directly below the top
  state). @internal
  */
  restart() {
    this.storeNode(0, this.pos, this.pos, 4, !0), this.state = this.stack[0], this.stack.length = 0;
  }
  /**
  @internal
  */
  sameState(e) {
    if (this.state != e.state || this.stack.length != e.stack.length)
      return !1;
    for (let n = 0; n < this.stack.length; n += 3)
      if (this.stack[n] != e.stack[n])
        return !1;
    return !0;
  }
  /**
  Get the parser used by this stack.
  */
  get parser() {
    return this.p.parser;
  }
  /**
  Test whether a given dialect (by numeric ID, as exported from
  the terms file) is enabled.
  */
  dialectEnabled(e) {
    return this.p.parser.dialect.flags[e];
  }
  shiftContext(e, n) {
    this.curContext && this.updateContext(this.curContext.tracker.shift(this.curContext.context, e, this, this.p.stream.reset(n)));
  }
  reduceContext(e, n) {
    this.curContext && this.updateContext(this.curContext.tracker.reduce(this.curContext.context, e, this, this.p.stream.reset(n)));
  }
  /**
  @internal
  */
  emitContext() {
    let e = this.buffer.length - 1;
    (e < 0 || this.buffer[e] != -3) && this.buffer.push(this.curContext.hash, this.pos, this.pos, -3);
  }
  /**
  @internal
  */
  emitLookAhead() {
    let e = this.buffer.length - 1;
    (e < 0 || this.buffer[e] != -4) && this.buffer.push(this.lookAhead, this.pos, this.pos, -4);
  }
  updateContext(e) {
    if (e != this.curContext.context) {
      let n = new GJ(this.curContext.tracker, e);
      n.hash != this.curContext.hash && this.emitContext(), this.curContext = n;
    }
  }
  /**
  @internal
  */
  setLookAhead(e) {
    e > this.lookAhead && (this.emitLookAhead(), this.lookAhead = e);
  }
  /**
  @internal
  */
  close() {
    this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead();
  }
}
class GJ {
  constructor(e, n) {
    this.tracker = e, this.context = n, this.hash = e.strict ? e.hash(n) : 0;
  }
}
class F$t {
  constructor(e) {
    this.start = e, this.state = e.state, this.stack = e.stack, this.base = this.stack.length;
  }
  reduce(e) {
    let n = e & 65535, r = e >> 19;
    r == 0 ? (this.stack == this.start.stack && (this.stack = this.stack.slice()), this.stack.push(this.state, 0, 0), this.base += 3) : this.base -= (r - 1) * 3;
    let i = this.start.p.parser.getGoto(this.stack[this.base - 3], n, !0);
    this.state = i;
  }
}
class YT {
  constructor(e, n, r) {
    this.stack = e, this.pos = n, this.index = r, this.buffer = e.buffer, this.index == 0 && this.maybeNext();
  }
  static create(e, n = e.bufferBase + e.buffer.length) {
    return new YT(e, n, n - e.bufferBase);
  }
  maybeNext() {
    let e = this.stack.parent;
    e != null && (this.index = this.stack.bufferBase - e.bufferBase, this.stack = e, this.buffer = e.buffer);
  }
  get id() {
    return this.buffer[this.index - 4];
  }
  get start() {
    return this.buffer[this.index - 3];
  }
  get end() {
    return this.buffer[this.index - 2];
  }
  get size() {
    return this.buffer[this.index - 1];
  }
  next() {
    this.index -= 4, this.pos -= 4, this.index == 0 && this.maybeNext();
  }
  fork() {
    return new YT(this.stack, this.pos, this.index);
  }
}
function My(t, e = Uint16Array) {
  if (typeof t != "string")
    return t;
  let n = null;
  for (let r = 0, i = 0; r < t.length; ) {
    let a = 0;
    for (; ; ) {
      let o = t.charCodeAt(r++), s = !1;
      if (o == 126) {
        a = 65535;
        break;
      }
      o >= 92 && o--, o >= 34 && o--;
      let l = o - 32;
      if (l >= 46 && (l -= 46, s = !0), a += l, s)
        break;
      a *= 46;
    }
    n ? n[i++] = a : n = new e(a);
  }
  return n;
}
class Lw {
  constructor() {
    this.start = -1, this.value = -1, this.end = -1, this.extended = -1, this.lookAhead = 0, this.mask = 0, this.context = 0;
  }
}
const jJ = new Lw();
class W$t {
  /**
  @internal
  */
  constructor(e, n) {
    this.input = e, this.ranges = n, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = jJ, this.rangeIndex = 0, this.pos = this.chunkPos = n[0].from, this.range = n[0], this.end = n[n.length - 1].to, this.readNext();
  }
  /**
  @internal
  */
  resolveOffset(e, n) {
    let r = this.range, i = this.rangeIndex, a = this.pos + e;
    for (; a < r.from; ) {
      if (!i)
        return null;
      let o = this.ranges[--i];
      a -= r.from - o.to, r = o;
    }
    for (; n < 0 ? a > r.to : a >= r.to; ) {
      if (i == this.ranges.length - 1)
        return null;
      let o = this.ranges[++i];
      a += o.from - r.to, r = o;
    }
    return a;
  }
  /**
  @internal
  */
  clipPos(e) {
    if (e >= this.range.from && e < this.range.to)
      return e;
    for (let n of this.ranges)
      if (n.to > e)
        return Math.max(e, n.from);
    return this.end;
  }
  /**
  Look at a code unit near the stream position. `.peek(0)` equals
  `.next`, `.peek(-1)` gives you the previous character, and so
  on.
  
  Note that looking around during tokenizing creates dependencies
  on potentially far-away content, which may reduce the
  effectiveness incremental parsing—when looking forward—or even
  cause invalid reparses when looking backward more than 25 code
  units, since the library does not track lookbehind.
  */
  peek(e) {
    let n = this.chunkOff + e, r, i;
    if (n >= 0 && n < this.chunk.length)
      r = this.pos + e, i = this.chunk.charCodeAt(n);
    else {
      let a = this.resolveOffset(e, 1);
      if (a == null)
        return -1;
      if (r = a, r >= this.chunk2Pos && r < this.chunk2Pos + this.chunk2.length)
        i = this.chunk2.charCodeAt(r - this.chunk2Pos);
      else {
        let o = this.rangeIndex, s = this.range;
        for (; s.to <= r; )
          s = this.ranges[++o];
        this.chunk2 = this.input.chunk(this.chunk2Pos = r), r + this.chunk2.length > s.to && (this.chunk2 = this.chunk2.slice(0, s.to - r)), i = this.chunk2.charCodeAt(0);
      }
    }
    return r >= this.token.lookAhead && (this.token.lookAhead = r + 1), i;
  }
  /**
  Accept a token. By default, the end of the token is set to the
  current stream position, but you can pass an offset (relative to
  the stream position) to change that.
  */
  acceptToken(e, n = 0) {
    let r = n ? this.resolveOffset(n, -1) : this.pos;
    if (r == null || r < this.token.start)
      throw new RangeError("Token end out of bounds");
    this.token.value = e, this.token.end = r;
  }
  /**
  Accept a token ending at a specific given position.
  */
  acceptTokenTo(e, n) {
    this.token.value = e, this.token.end = n;
  }
  getChunk() {
    if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
      let { chunk: e, chunkPos: n } = this;
      this.chunk = this.chunk2, this.chunkPos = this.chunk2Pos, this.chunk2 = e, this.chunk2Pos = n, this.chunkOff = this.pos - this.chunkPos;
    } else {
      this.chunk2 = this.chunk, this.chunk2Pos = this.chunkPos;
      let e = this.input.chunk(this.pos), n = this.pos + e.length;
      this.chunk = n > this.range.to ? e.slice(0, this.range.to - this.pos) : e, this.chunkPos = this.pos, this.chunkOff = 0;
    }
  }
  readNext() {
    return this.chunkOff >= this.chunk.length && (this.getChunk(), this.chunkOff == this.chunk.length) ? this.next = -1 : this.next = this.chunk.charCodeAt(this.chunkOff);
  }
  /**
  Move the stream forward N (defaults to 1) code units. Returns
  the new value of [`next`](#lr.InputStream.next).
  */
  advance(e = 1) {
    for (this.chunkOff += e; this.pos + e >= this.range.to; ) {
      if (this.rangeIndex == this.ranges.length - 1)
        return this.setDone();
      e -= this.range.to - this.pos, this.range = this.ranges[++this.rangeIndex], this.pos = this.range.from;
    }
    return this.pos += e, this.pos >= this.token.lookAhead && (this.token.lookAhead = this.pos + 1), this.readNext();
  }
  setDone() {
    return this.pos = this.chunkPos = this.end, this.range = this.ranges[this.rangeIndex = this.ranges.length - 1], this.chunk = "", this.next = -1;
  }
  /**
  @internal
  */
  reset(e, n) {
    if (n ? (this.token = n, n.start = e, n.lookAhead = e + 1, n.value = n.extended = -1) : this.token = jJ, this.pos != e) {
      if (this.pos = e, e == this.end)
        return this.setDone(), this;
      for (; e < this.range.from; )
        this.range = this.ranges[--this.rangeIndex];
      for (; e >= this.range.to; )
        this.range = this.ranges[++this.rangeIndex];
      e >= this.chunkPos && e < this.chunkPos + this.chunk.length ? this.chunkOff = e - this.chunkPos : (this.chunk = "", this.chunkOff = 0), this.readNext();
    }
    return this;
  }
  /**
  @internal
  */
  read(e, n) {
    if (e >= this.chunkPos && n <= this.chunkPos + this.chunk.length)
      return this.chunk.slice(e - this.chunkPos, n - this.chunkPos);
    if (e >= this.chunk2Pos && n <= this.chunk2Pos + this.chunk2.length)
      return this.chunk2.slice(e - this.chunk2Pos, n - this.chunk2Pos);
    if (e >= this.range.from && n <= this.range.to)
      return this.input.read(e, n);
    let r = "";
    for (let i of this.ranges) {
      if (i.from >= n)
        break;
      i.to > e && (r += this.input.read(Math.max(i.from, e), Math.min(i.to, n)));
    }
    return r;
  }
}
class ug {
  constructor(e, n) {
    this.data = e, this.id = n;
  }
  token(e, n) {
    let { parser: r } = n.p;
    Ame(this.data, e, n, this.id, r.data, r.tokenPrecTable);
  }
}
ug.prototype.contextual = ug.prototype.fallback = ug.prototype.extend = !1;
class j4 {
  constructor(e, n, r) {
    this.precTable = n, this.elseToken = r, this.data = typeof e == "string" ? My(e) : e;
  }
  token(e, n) {
    let r = e.pos, i = 0;
    for (; ; ) {
      let a = e.next < 0, o = e.resolveOffset(1, 1);
      if (Ame(this.data, e, n, 0, this.data, this.precTable), e.token.value > -1)
        break;
      if (this.elseToken == null)
        return;
      if (a || i++, o == null)
        break;
      e.reset(o, e.token);
    }
    i && (e.reset(r, e.token), e.acceptToken(this.elseToken, i));
  }
}
j4.prototype.contextual = ug.prototype.fallback = ug.prototype.extend = !1;
class p$ {
  /**
  Create a tokenizer. The first argument is the function that,
  given an input stream, scans for the types of tokens it
  recognizes at the stream's position, and calls
  [`acceptToken`](#lr.InputStream.acceptToken) when it finds
  one.
  */
  constructor(e, n = {}) {
    this.token = e, this.contextual = !!n.contextual, this.fallback = !!n.fallback, this.extend = !!n.extend;
  }
}
function Ame(t, e, n, r, i, a) {
  let o = 0, s = 1 << r, { dialect: l } = n.p.parser;
  e: for (; s & t[o]; ) {
    let u = t[o + 1];
    for (let h = o + 3; h < u; h += 2)
      if ((t[h + 1] & s) > 0) {
        let p = t[h];
        if (l.allows(p) && (e.token.value == -1 || e.token.value == p || Q$t(p, e.token.value, i, a))) {
          e.acceptToken(p);
          break;
        }
      }
    let c = e.next, f = 0, d = t[o + 2];
    if (e.next < 0 && d > f && t[u + d * 3 - 3] == 65535) {
      o = t[u + d * 3 - 1];
      continue e;
    }
    for (; f < d; ) {
      let h = f + d >> 1, p = u + h + (h << 1), v = t[p], g = t[p + 1] || 65536;
      if (c < v)
        d = h;
      else if (c >= g)
        f = h + 1;
      else {
        o = t[p + 2], e.advance();
        continue e;
      }
    }
    break;
  }
}
function ZJ(t, e, n) {
  for (let r = e, i; (i = t[r]) != 65535; r++)
    if (i == n)
      return r - e;
  return -1;
}
function Q$t(t, e, n, r) {
  let i = ZJ(n, r, e);
  return i < 0 || ZJ(n, r, t) < i;
}
const qa = typeof process < "u" && process.env && /\bparse\b/.test(process.env.LOG);
let wD = null;
function UJ(t, e, n) {
  let r = t.cursor(Ur.IncludeAnonymous);
  for (r.moveTo(e); ; )
    if (!(n < 0 ? r.childBefore(e) : r.childAfter(e)))
      for (; ; ) {
        if ((n < 0 ? r.to < e : r.from > e) && !r.type.isError)
          return n < 0 ? Math.max(0, Math.min(
            r.to - 1,
            e - 25
            /* Lookahead.Margin */
          )) : Math.min(t.length, Math.max(
            r.from + 1,
            e + 25
            /* Lookahead.Margin */
          ));
        if (n < 0 ? r.prevSibling() : r.nextSibling())
          break;
        if (!r.parent())
          return n < 0 ? 0 : t.length;
      }
}
class H$t {
  constructor(e, n) {
    this.fragments = e, this.nodeSet = n, this.i = 0, this.fragment = null, this.safeFrom = -1, this.safeTo = -1, this.trees = [], this.start = [], this.index = [], this.nextFragment();
  }
  nextFragment() {
    let e = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
    if (e) {
      for (this.safeFrom = e.openStart ? UJ(e.tree, e.from + e.offset, 1) - e.offset : e.from, this.safeTo = e.openEnd ? UJ(e.tree, e.to + e.offset, -1) - e.offset : e.to; this.trees.length; )
        this.trees.pop(), this.start.pop(), this.index.pop();
      this.trees.push(e.tree), this.start.push(-e.offset), this.index.push(0), this.nextStart = this.safeFrom;
    } else
      this.nextStart = 1e9;
  }
  // `pos` must be >= any previously given `pos` for this cursor
  nodeAt(e) {
    if (e < this.nextStart)
      return null;
    for (; this.fragment && this.safeTo <= e; )
      this.nextFragment();
    if (!this.fragment)
      return null;
    for (; ; ) {
      let n = this.trees.length - 1;
      if (n < 0)
        return this.nextFragment(), null;
      let r = this.trees[n], i = this.index[n];
      if (i == r.children.length) {
        this.trees.pop(), this.start.pop(), this.index.pop();
        continue;
      }
      let a = r.children[i], o = this.start[n] + r.positions[i];
      if (o > e)
        return this.nextStart = o, null;
      if (a instanceof Vr) {
        if (o == e) {
          if (o < this.safeFrom)
            return null;
          let s = o + a.length;
          if (s <= this.safeTo) {
            let l = a.prop(rn.lookAhead);
            if (!l || s + l < this.fragment.to)
              return a;
          }
        }
        this.index[n]++, o + a.length >= Math.max(this.safeFrom, e) && (this.trees.push(a), this.start.push(o), this.index.push(0));
      } else
        this.index[n]++, this.nextStart = o + a.length;
    }
  }
}
class G$t {
  constructor(e, n) {
    this.stream = n, this.tokens = [], this.mainToken = null, this.actions = [], this.tokens = e.tokenizers.map((r) => new Lw());
  }
  getActions(e) {
    let n = 0, r = null, { parser: i } = e.p, { tokenizers: a } = i, o = i.stateSlot(
      e.state,
      3
      /* ParseState.TokenizerMask */
    ), s = e.curContext ? e.curContext.hash : 0, l = 0;
    for (let u = 0; u < a.length; u++) {
      if (!(1 << u & o))
        continue;
      let c = a[u], f = this.tokens[u];
      if (!(r && !c.fallback) && ((c.contextual || f.start != e.pos || f.mask != o || f.context != s) && (this.updateCachedToken(f, c, e), f.mask = o, f.context = s), f.lookAhead > f.end + 25 && (l = Math.max(f.lookAhead, l)), f.value != 0)) {
        let d = n;
        if (f.extended > -1 && (n = this.addActions(e, f.extended, f.end, n)), n = this.addActions(e, f.value, f.end, n), !c.extend && (r = f, n > d))
          break;
      }
    }
    for (; this.actions.length > n; )
      this.actions.pop();
    return l && e.setLookAhead(l), !r && e.pos == this.stream.end && (r = new Lw(), r.value = e.p.parser.eofTerm, r.start = r.end = e.pos, n = this.addActions(e, r.value, r.end, n)), this.mainToken = r, this.actions;
  }
  getMainToken(e) {
    if (this.mainToken)
      return this.mainToken;
    let n = new Lw(), { pos: r, p: i } = e;
    return n.start = r, n.end = Math.min(r + 1, i.stream.end), n.value = r == i.stream.end ? i.parser.eofTerm : 0, n;
  }
  updateCachedToken(e, n, r) {
    let i = this.stream.clipPos(r.pos);
    if (n.token(this.stream.reset(i, e), r), e.value > -1) {
      let { parser: a } = r.p;
      for (let o = 0; o < a.specialized.length; o++)
        if (a.specialized[o] == e.value) {
          let s = a.specializers[o](this.stream.read(e.start, e.end), r);
          if (s >= 0 && r.p.parser.dialect.allows(s >> 1)) {
            s & 1 ? e.extended = s >> 1 : e.value = s >> 1;
            break;
          }
        }
    } else
      e.value = 0, e.end = this.stream.clipPos(i + 1);
  }
  putAction(e, n, r, i) {
    for (let a = 0; a < i; a += 3)
      if (this.actions[a] == e)
        return i;
    return this.actions[i++] = e, this.actions[i++] = n, this.actions[i++] = r, i;
  }
  addActions(e, n, r, i) {
    let { state: a } = e, { parser: o } = e.p, { data: s } = o;
    for (let l = 0; l < 2; l++)
      for (let u = o.stateSlot(
        a,
        l ? 2 : 1
        /* ParseState.Actions */
      ); ; u += 3) {
        if (s[u] == 65535)
          if (s[u + 1] == 1)
            u = Ou(s, u + 2);
          else {
            i == 0 && s[u + 1] == 2 && (i = this.putAction(Ou(s, u + 2), n, r, i));
            break;
          }
        s[u] == n && (i = this.putAction(Ou(s, u + 1), n, r, i));
      }
    return i;
  }
}
class j$t {
  constructor(e, n, r, i) {
    this.parser = e, this.input = n, this.ranges = i, this.recovering = 0, this.nextStackID = 9812, this.minStackPos = 0, this.reused = [], this.stoppedAt = null, this.lastBigReductionStart = -1, this.lastBigReductionSize = 0, this.bigReductionCount = 0, this.stream = new W$t(n, i), this.tokens = new G$t(e, this.stream), this.topTerm = e.top[1];
    let { from: a } = i[0];
    this.stacks = [XT.start(this, e.top[0], a)], this.fragments = r.length && this.stream.end - a > e.bufferLength * 4 ? new H$t(r, e.nodeSet) : null;
  }
  get parsedPos() {
    return this.minStackPos;
  }
  // Move the parser forward. This will process all parse stacks at
  // `this.pos` and try to advance them to a further position. If no
  // stack for such a position is found, it'll start error-recovery.
  //
  // When the parse is finished, this will return a syntax tree. When
  // not, it returns `null`.
  advance() {
    let e = this.stacks, n = this.minStackPos, r = this.stacks = [], i, a;
    if (this.bigReductionCount > 300 && e.length == 1) {
      let [o] = e;
      for (; o.forceReduce() && o.stack.length && o.stack[o.stack.length - 2] >= this.lastBigReductionStart; )
        ;
      this.bigReductionCount = this.lastBigReductionSize = 0;
    }
    for (let o = 0; o < e.length; o++) {
      let s = e[o];
      for (; ; ) {
        if (this.tokens.mainToken = null, s.pos > n)
          r.push(s);
        else {
          if (this.advanceStack(s, r, e))
            continue;
          {
            i || (i = [], a = []), i.push(s);
            let l = this.tokens.getMainToken(s);
            a.push(l.value, l.end);
          }
        }
        break;
      }
    }
    if (!r.length) {
      let o = i && X$t(i);
      if (o)
        return qa && console.log("Finish with " + this.stackID(o)), this.stackToTree(o);
      if (this.parser.strict)
        throw qa && i && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + n);
      this.recovering || (this.recovering = 5);
    }
    if (this.recovering && i) {
      let o = this.stoppedAt != null && i[0].pos > this.stoppedAt ? i[0] : this.runRecovery(i, a, r);
      if (o)
        return qa && console.log("Force-finish " + this.stackID(o)), this.stackToTree(o.forceAll());
    }
    if (this.recovering) {
      let o = this.recovering == 1 ? 1 : this.recovering * 3;
      if (r.length > o)
        for (r.sort((s, l) => l.score - s.score); r.length > o; )
          r.pop();
      r.some((s) => s.reducePos > n) && this.recovering--;
    } else if (r.length > 1) {
      e: for (let o = 0; o < r.length - 1; o++) {
        let s = r[o];
        for (let l = o + 1; l < r.length; l++) {
          let u = r[l];
          if (s.sameState(u) || s.buffer.length > 500 && u.buffer.length > 500)
            if ((s.score - u.score || s.buffer.length - u.buffer.length) > 0)
              r.splice(l--, 1);
            else {
              r.splice(o--, 1);
              continue e;
            }
        }
      }
      r.length > 12 && r.splice(
        12,
        r.length - 12
        /* Rec.MaxStackCount */
      );
    }
    this.minStackPos = r[0].pos;
    for (let o = 1; o < r.length; o++)
      r[o].pos < this.minStackPos && (this.minStackPos = r[o].pos);
    return null;
  }
  stopAt(e) {
    if (this.stoppedAt != null && this.stoppedAt < e)
      throw new RangeError("Can't move stoppedAt forward");
    this.stoppedAt = e;
  }
  // Returns an updated version of the given stack, or null if the
  // stack can't advance normally. When `split` and `stacks` are
  // given, stacks split off by ambiguous operations will be pushed to
  // `split`, or added to `stacks` if they move `pos` forward.
  advanceStack(e, n, r) {
    let i = e.pos, { parser: a } = this, o = qa ? this.stackID(e) + " -> " : "";
    if (this.stoppedAt != null && i > this.stoppedAt)
      return e.forceReduce() ? e : null;
    if (this.fragments) {
      let u = e.curContext && e.curContext.tracker.strict, c = u ? e.curContext.hash : 0;
      for (let f = this.fragments.nodeAt(i); f; ) {
        let d = this.parser.nodeSet.types[f.type.id] == f.type ? a.getGoto(e.state, f.type.id) : -1;
        if (d > -1 && f.length && (!u || (f.prop(rn.contextHash) || 0) == c))
          return e.useNode(f, d), qa && console.log(o + this.stackID(e) + ` (via reuse of ${a.getName(f.type.id)})`), !0;
        if (!(f instanceof Vr) || f.children.length == 0 || f.positions[0] > 0)
          break;
        let h = f.children[0];
        if (h instanceof Vr && f.positions[0] == 0)
          f = h;
        else
          break;
      }
    }
    let s = a.stateSlot(
      e.state,
      4
      /* ParseState.DefaultReduce */
    );
    if (s > 0)
      return e.reduce(s), qa && console.log(o + this.stackID(e) + ` (via always-reduce ${a.getName(
        s & 65535
        /* Action.ValueMask */
      )})`), !0;
    if (e.stack.length >= 8400)
      for (; e.stack.length > 6e3 && e.forceReduce(); )
        ;
    let l = this.tokens.getActions(e);
    for (let u = 0; u < l.length; ) {
      let c = l[u++], f = l[u++], d = l[u++], h = u == l.length || !r, p = h ? e : e.split(), v = this.tokens.mainToken;
      if (p.apply(c, f, v ? v.start : p.pos, d), qa && console.log(o + this.stackID(p) + ` (via ${c & 65536 ? `reduce of ${a.getName(
        c & 65535
        /* Action.ValueMask */
      )}` : "shift"} for ${a.getName(f)} @ ${i}${p == e ? "" : ", split"})`), h)
        return !0;
      p.pos > i ? n.push(p) : r.push(p);
    }
    return !1;
  }
  // Advance a given stack forward as far as it will go. Returns the
  // (possibly updated) stack if it got stuck, or null if it moved
  // forward and was given to `pushStackDedup`.
  advanceFully(e, n) {
    let r = e.pos;
    for (; ; ) {
      if (!this.advanceStack(e, null, null))
        return !1;
      if (e.pos > r)
        return XJ(e, n), !0;
    }
  }
  runRecovery(e, n, r) {
    let i = null, a = !1;
    for (let o = 0; o < e.length; o++) {
      let s = e[o], l = n[o << 1], u = n[(o << 1) + 1], c = qa ? this.stackID(s) + " -> " : "";
      if (s.deadEnd && (a || (a = !0, s.restart(), qa && console.log(c + this.stackID(s) + " (restarted)"), this.advanceFully(s, r))))
        continue;
      let f = s.split(), d = c;
      for (let h = 0; f.forceReduce() && h < 10 && (qa && console.log(d + this.stackID(f) + " (via force-reduce)"), !this.advanceFully(f, r)); h++)
        qa && (d = this.stackID(f) + " -> ");
      for (let h of s.recoverByInsert(l))
        qa && console.log(c + this.stackID(h) + " (via recover-insert)"), this.advanceFully(h, r);
      this.stream.end > s.pos ? (u == s.pos && (u++, l = 0), s.recoverByDelete(l, u), qa && console.log(c + this.stackID(s) + ` (via recover-delete ${this.parser.getName(l)})`), XJ(s, r)) : (!i || i.score < s.score) && (i = s);
    }
    return i;
  }
  // Convert the stack's buffer to a syntax tree.
  stackToTree(e) {
    return e.close(), Vr.build({
      buffer: YT.create(e),
      nodeSet: this.parser.nodeSet,
      topID: this.topTerm,
      maxBufferLength: this.parser.bufferLength,
      reused: this.reused,
      start: this.ranges[0].from,
      length: e.pos - this.ranges[0].from,
      minRepeatType: this.parser.minRepeatTerm
    });
  }
  stackID(e) {
    let n = (wD || (wD = /* @__PURE__ */ new WeakMap())).get(e);
    return n || wD.set(e, n = String.fromCodePoint(this.nextStackID++)), n + e;
  }
}
function XJ(t, e) {
  for (let n = 0; n < e.length; n++) {
    let r = e[n];
    if (r.pos == t.pos && r.sameState(t)) {
      e[n].score < t.score && (e[n] = t);
      return;
    }
  }
  e.push(t);
}
class Z$t {
  constructor(e, n, r) {
    this.source = e, this.flags = n, this.disabled = r;
  }
  allows(e) {
    return !this.disabled || this.disabled[e] == 0;
  }
}
const CD = (t) => t;
class U$t {
  /**
  Define a context tracker.
  */
  constructor(e) {
    this.start = e.start, this.shift = e.shift || CD, this.reduce = e.reduce || CD, this.reuse = e.reuse || CD, this.hash = e.hash || (() => 0), this.strict = e.strict !== !1;
  }
}
class I_ extends nge {
  /**
  @internal
  */
  constructor(e) {
    if (super(), this.wrappers = [], e.version != 14)
      throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);
    let n = e.nodeNames.split(" ");
    this.minRepeatTerm = n.length;
    for (let s = 0; s < e.repeatNodeCount; s++)
      n.push("");
    let r = Object.keys(e.topRules).map((s) => e.topRules[s][1]), i = [];
    for (let s = 0; s < n.length; s++)
      i.push([]);
    function a(s, l, u) {
      i[s].push([l, l.deserialize(String(u))]);
    }
    if (e.nodeProps)
      for (let s of e.nodeProps) {
        let l = s[0];
        typeof l == "string" && (l = rn[l]);
        for (let u = 1; u < s.length; ) {
          let c = s[u++];
          if (c >= 0)
            a(c, l, s[u++]);
          else {
            let f = s[u + -c];
            for (let d = -c; d > 0; d--)
              a(s[u++], l, f);
            u++;
          }
        }
      }
    this.nodeSet = new cB(n.map((s, l) => Va.define({
      name: l >= this.minRepeatTerm ? void 0 : s,
      id: l,
      props: i[l],
      top: r.indexOf(l) > -1,
      error: l == 0,
      skipped: e.skippedNodes && e.skippedNodes.indexOf(l) > -1
    }))), e.propSources && (this.nodeSet = this.nodeSet.extend(...e.propSources)), this.strict = !1, this.bufferLength = Kve;
    let o = My(e.tokenData);
    this.context = e.context, this.specializerSpecs = e.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length);
    for (let s = 0; s < this.specializerSpecs.length; s++)
      this.specialized[s] = this.specializerSpecs[s].term;
    this.specializers = this.specializerSpecs.map(YJ), this.states = My(e.states, Uint32Array), this.data = My(e.stateData), this.goto = My(e.goto), this.maxTerm = e.maxTerm, this.tokenizers = e.tokenizers.map((s) => typeof s == "number" ? new ug(o, s) : s), this.topRules = e.topRules, this.dialects = e.dialects || {}, this.dynamicPrecedences = e.dynamicPrecedences || null, this.tokenPrecTable = e.tokenPrec, this.termNames = e.termNames || null, this.maxNode = this.nodeSet.types.length - 1, this.dialect = this.parseDialect(), this.top = this.topRules[Object.keys(this.topRules)[0]];
  }
  createParse(e, n, r) {
    let i = new j$t(this, e, n, r);
    for (let a of this.wrappers)
      i = a(i, e, n, r);
    return i;
  }
  /**
  Get a goto table entry @internal
  */
  getGoto(e, n, r = !1) {
    let i = this.goto;
    if (n >= i[0])
      return -1;
    for (let a = i[n + 1]; ; ) {
      let o = i[a++], s = o & 1, l = i[a++];
      if (s && r)
        return l;
      for (let u = a + (o >> 1); a < u; a++)
        if (i[a] == e)
          return l;
      if (s)
        return -1;
    }
  }
  /**
  Check if this state has an action for a given terminal @internal
  */
  hasAction(e, n) {
    let r = this.data;
    for (let i = 0; i < 2; i++)
      for (let a = this.stateSlot(
        e,
        i ? 2 : 1
        /* ParseState.Actions */
      ), o; ; a += 3) {
        if ((o = r[a]) == 65535)
          if (r[a + 1] == 1)
            o = r[a = Ou(r, a + 2)];
          else {
            if (r[a + 1] == 2)
              return Ou(r, a + 2);
            break;
          }
        if (o == n || o == 0)
          return Ou(r, a + 1);
      }
    return 0;
  }
  /**
  @internal
  */
  stateSlot(e, n) {
    return this.states[e * 6 + n];
  }
  /**
  @internal
  */
  stateFlag(e, n) {
    return (this.stateSlot(
      e,
      0
      /* ParseState.Flags */
    ) & n) > 0;
  }
  /**
  @internal
  */
  validAction(e, n) {
    return !!this.allActions(e, (r) => r == n ? !0 : null);
  }
  /**
  @internal
  */
  allActions(e, n) {
    let r = this.stateSlot(
      e,
      4
      /* ParseState.DefaultReduce */
    ), i = r ? n(r) : void 0;
    for (let a = this.stateSlot(
      e,
      1
      /* ParseState.Actions */
    ); i == null; a += 3) {
      if (this.data[a] == 65535)
        if (this.data[a + 1] == 1)
          a = Ou(this.data, a + 2);
        else
          break;
      i = n(Ou(this.data, a + 1));
    }
    return i;
  }
  /**
  Get the states that can follow this one through shift actions or
  goto jumps. @internal
  */
  nextStates(e) {
    let n = [];
    for (let r = this.stateSlot(
      e,
      1
      /* ParseState.Actions */
    ); ; r += 3) {
      if (this.data[r] == 65535)
        if (this.data[r + 1] == 1)
          r = Ou(this.data, r + 2);
        else
          break;
      if (!(this.data[r + 2] & 1)) {
        let i = this.data[r + 1];
        n.some((a, o) => o & 1 && a == i) || n.push(this.data[r], i);
      }
    }
    return n;
  }
  /**
  Configure the parser. Returns a new parser instance that has the
  given settings modified. Settings not provided in `config` are
  kept from the original parser.
  */
  configure(e) {
    let n = Object.assign(Object.create(I_.prototype), this);
    if (e.props && (n.nodeSet = this.nodeSet.extend(...e.props)), e.top) {
      let r = this.topRules[e.top];
      if (!r)
        throw new RangeError(`Invalid top rule name ${e.top}`);
      n.top = r;
    }
    return e.tokenizers && (n.tokenizers = this.tokenizers.map((r) => {
      let i = e.tokenizers.find((a) => a.from == r);
      return i ? i.to : r;
    })), e.specializers && (n.specializers = this.specializers.slice(), n.specializerSpecs = this.specializerSpecs.map((r, i) => {
      let a = e.specializers.find((s) => s.from == r.external);
      if (!a)
        return r;
      let o = Object.assign(Object.assign({}, r), { external: a.to });
      return n.specializers[i] = YJ(o), o;
    })), e.contextTracker && (n.context = e.contextTracker), e.dialect && (n.dialect = this.parseDialect(e.dialect)), e.strict != null && (n.strict = e.strict), e.wrap && (n.wrappers = n.wrappers.concat(e.wrap)), e.bufferLength != null && (n.bufferLength = e.bufferLength), n;
  }
  /**
  Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
  are registered for this parser.
  */
  hasWrappers() {
    return this.wrappers.length > 0;
  }
  /**
  Returns the name associated with a given term. This will only
  work for all terms when the parser was generated with the
  `--names` option. By default, only the names of tagged terms are
  stored.
  */
  getName(e) {
    return this.termNames ? this.termNames[e] : String(e <= this.maxNode && this.nodeSet.types[e].name || e);
  }
  /**
  The eof term id is always allocated directly after the node
  types. @internal
  */
  get eofTerm() {
    return this.maxNode + 1;
  }
  /**
  The type of top node produced by the parser.
  */
  get topNode() {
    return this.nodeSet.types[this.top[1]];
  }
  /**
  @internal
  */
  dynamicPrecedence(e) {
    let n = this.dynamicPrecedences;
    return n == null ? 0 : n[e] || 0;
  }
  /**
  @internal
  */
  parseDialect(e) {
    let n = Object.keys(this.dialects), r = n.map(() => !1);
    if (e)
      for (let a of e.split(" ")) {
        let o = n.indexOf(a);
        o >= 0 && (r[o] = !0);
      }
    let i = null;
    for (let a = 0; a < n.length; a++)
      if (!r[a])
        for (let o = this.dialects[n[a]], s; (s = this.data[o++]) != 65535; )
          (i || (i = new Uint8Array(this.maxTerm + 1)))[s] = 1;
    return new Z$t(e, r, i);
  }
  /**
  Used by the output of the parser generator. Not available to
  user code. @hide
  */
  static deserialize(e) {
    return new I_(e);
  }
}
function Ou(t, e) {
  return t[e] | t[e + 1] << 16;
}
function X$t(t) {
  let e = null;
  for (let n of t) {
    let r = n.p.stoppedAt;
    (n.pos == n.p.stream.end || r != null && n.pos > r) && n.p.parser.stateFlag(
      n.state,
      2
      /* StateFlag.Accepting */
    ) && (!e || e.score < n.score) && (e = n);
  }
  return e;
}
function YJ(t) {
  if (t.external) {
    let e = t.extend ? 1 : 0;
    return (n, r) => t.external(n, r) << 1 | e;
  }
  return t.get;
}
const Y$t = 312, qJ = 1, q$t = 2, K$t = 3, J$t = 4, eAt = 313, tAt = 315, nAt = 316, rAt = 5, iAt = 6, aAt = 0, Z4 = [
  9,
  10,
  11,
  12,
  13,
  32,
  133,
  160,
  5760,
  8192,
  8193,
  8194,
  8195,
  8196,
  8197,
  8198,
  8199,
  8200,
  8201,
  8202,
  8232,
  8233,
  8239,
  8287,
  12288
], Eme = 125, oAt = 59, U4 = 47, sAt = 42, lAt = 43, uAt = 45, cAt = 60, fAt = 44, dAt = 63, hAt = 46, pAt = new U$t({
  start: !1,
  shift(t, e) {
    return e == rAt || e == iAt || e == tAt ? t : e == nAt;
  },
  strict: !1
}), vAt = new p$((t, e) => {
  let { next: n } = t;
  (n == Eme || n == -1 || e.context) && t.acceptToken(eAt);
}, { contextual: !0, fallback: !0 }), gAt = new p$((t, e) => {
  let { next: n } = t, r;
  Z4.indexOf(n) > -1 || n == U4 && ((r = t.peek(1)) == U4 || r == sAt) || n != Eme && n != oAt && n != -1 && !e.context && t.acceptToken(Y$t);
}, { contextual: !0 }), mAt = new p$((t, e) => {
  let { next: n } = t;
  if (n == lAt || n == uAt) {
    if (t.advance(), n == t.next) {
      t.advance();
      let r = !e.context && e.canShift(qJ);
      t.acceptToken(r ? qJ : q$t);
    }
  } else n == dAt && t.peek(1) == hAt && (t.advance(), t.advance(), (t.next < 48 || t.next > 57) && t.acceptToken(K$t));
}, { contextual: !0 });
function TD(t, e) {
  return t >= 65 && t <= 90 || t >= 97 && t <= 122 || t == 95 || t >= 192 || !e && t >= 48 && t <= 57;
}
const yAt = new p$((t, e) => {
  if (t.next != cAt || !e.dialectEnabled(aAt) || (t.advance(), t.next == U4)) return;
  let n = 0;
  for (; Z4.indexOf(t.next) > -1; )
    t.advance(), n++;
  if (TD(t.next, !0)) {
    for (t.advance(), n++; TD(t.next, !1); )
      t.advance(), n++;
    for (; Z4.indexOf(t.next) > -1; )
      t.advance(), n++;
    if (t.next == fAt) return;
    for (let r = 0; ; r++) {
      if (r == 7) {
        if (!TD(t.next, !0)) return;
        break;
      }
      if (t.next != "extends".charCodeAt(r)) break;
      t.advance(), n++;
    }
  }
  t.acceptToken(J$t, -n);
}), bAt = pB({
  "get set async static": ce.modifier,
  "for while do if else switch try catch finally return throw break continue default case": ce.controlKeyword,
  "in of await yield void typeof delete instanceof": ce.operatorKeyword,
  "let var const using function class extends": ce.definitionKeyword,
  "import export from": ce.moduleKeyword,
  "with debugger as new": ce.keyword,
  TemplateString: ce.special(ce.string),
  super: ce.atom,
  BooleanLiteral: ce.bool,
  this: ce.self,
  null: ce.null,
  Star: ce.modifier,
  VariableName: ce.variableName,
  "CallExpression/VariableName TaggedTemplateExpression/VariableName": ce.function(ce.variableName),
  VariableDefinition: ce.definition(ce.variableName),
  Label: ce.labelName,
  PropertyName: ce.propertyName,
  PrivatePropertyName: ce.special(ce.propertyName),
  "CallExpression/MemberExpression/PropertyName": ce.function(ce.propertyName),
  "FunctionDeclaration/VariableDefinition": ce.function(ce.definition(ce.variableName)),
  "ClassDeclaration/VariableDefinition": ce.definition(ce.className),
  PropertyDefinition: ce.definition(ce.propertyName),
  PrivatePropertyDefinition: ce.definition(ce.special(ce.propertyName)),
  UpdateOp: ce.updateOperator,
  "LineComment Hashbang": ce.lineComment,
  BlockComment: ce.blockComment,
  Number: ce.number,
  String: ce.string,
  Escape: ce.escape,
  ArithOp: ce.arithmeticOperator,
  LogicOp: ce.logicOperator,
  BitOp: ce.bitwiseOperator,
  CompareOp: ce.compareOperator,
  RegExp: ce.regexp,
  Equals: ce.definitionOperator,
  Arrow: ce.function(ce.punctuation),
  ": Spread": ce.punctuation,
  "( )": ce.paren,
  "[ ]": ce.squareBracket,
  "{ }": ce.brace,
  "InterpolationStart InterpolationEnd": ce.special(ce.brace),
  ".": ce.derefOperator,
  ", ;": ce.separator,
  "@": ce.meta,
  TypeName: ce.typeName,
  TypeDefinition: ce.definition(ce.typeName),
  "type enum interface implements namespace module declare": ce.definitionKeyword,
  "abstract global Privacy readonly override": ce.modifier,
  "is keyof unique infer": ce.operatorKeyword,
  JSXAttributeValue: ce.attributeValue,
  JSXText: ce.content,
  "JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag": ce.angleBracket,
  "JSXIdentifier JSXNameSpacedName": ce.tagName,
  "JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName": ce.attributeName,
  "JSXBuiltin/JSXIdentifier": ce.standard(ce.tagName)
}), _At = { __proto__: null, export: 20, as: 25, from: 33, default: 36, async: 41, function: 42, extends: 54, this: 58, true: 66, false: 66, null: 78, void: 82, typeof: 86, super: 102, new: 136, delete: 148, yield: 157, await: 161, class: 166, public: 229, private: 229, protected: 229, readonly: 231, instanceof: 250, satisfies: 253, in: 254, const: 256, import: 290, keyof: 345, unique: 349, infer: 355, is: 391, abstract: 411, implements: 413, type: 415, let: 418, var: 420, using: 423, interface: 429, enum: 433, namespace: 439, module: 441, declare: 445, global: 449, for: 468, of: 477, while: 480, with: 484, do: 488, if: 492, else: 494, switch: 498, case: 504, try: 510, catch: 514, finally: 518, return: 522, throw: 526, break: 530, continue: 534, debugger: 538 }, OAt = { __proto__: null, async: 123, get: 125, set: 127, declare: 189, public: 191, private: 191, protected: 191, static: 193, abstract: 195, override: 197, readonly: 203, accessor: 205, new: 395 }, SAt = { __proto__: null, "<": 187 }, xAt = I_.deserialize({
  version: 14,
  states: "$@QO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU'#KZ'#KZO9cQWO'#IUO9hQ?MxO'#IVOOQU'#JZ'#JZOOQU'#IZ'#IZQ`Q^OOO`Q^OOO9pQMnO'#DsO9wQ^O'#D{O:OQ^O'#D}O9^QWO'#GpO:VQ7[O'#CoO:eQWO'#EkO:pQWO'#EvO:uQ7[O'#FdO;dQWO'#GpOOQO'#K['#K[O;iQWO'#K[O;wQWO'#GxO;wQWO'#GyO;wQWO'#G{O9^QWO'#HOO<nQWO'#HRO>VQWO'#CeO>gQWO'#H_O>oQWO'#HeO>oQWO'#HgO`Q^O'#HiO>oQWO'#HkO>oQWO'#HnO>tQWO'#HtO>yQ?MyO'#HzO%[Q^O'#H|O?UQ?MyO'#IOO?aQ?MyO'#IQO9hQ?MxO'#ISO?lQ?NdO'#CiO@nQ`O'#DiQOQWOOO%[Q^O'#D}OAUQWO'#EQO:VQ7[O'#EkOAaQWO'#EkOAlQpO'#FdOOQU'#Cg'#CgOOQ?Mp'#Dn'#DnOOQ?Mp'#Jq'#JqO%[Q^O'#JqOOQO'#Jt'#JtOOQO'#Id'#IdOBlQ`O'#EdOOQ?Mp'#Ec'#EcOOQ?Mp'#Jx'#JxOChQ?NQO'#EdOCrQ`O'#ETOOQO'#Js'#JsODWQ`O'#JtOEeQ`O'#ETOCrQ`O'#EdPErO#@ItO'#CbPOOO)CDx)CDxOOOO'#I['#I[OE}O!bO,59UOOQ?Mr,59U,59UOOOO'#I]'#I]OF]O#tO,59UO%[Q^O'#D`OOOO'#I_'#I_OFkO!0LbO,59xOOQ?Mr,59x,59xOFyQ^O'#I`OG^QWO'#JoOI]QrO'#JoO+}Q^O'#JoOIdQWO,5:OOIzQWO'#EmOJXQWO'#KOOJdQWO'#J}OJdQWO'#J}OJlQWO,5;ZOJqQWO'#J|OOQ?Mv,5:Z,5:ZOJxQ^O,5:ZOLvQ?NdO,5:cOMgQWO,5:kONQQ?MxO'#J{ONXQWO'#JzO9WQWO'#JzONmQWO'#JzONuQWO,5;YONzQWO'#JzO!#PQrO'#JnOOQ?Mr'#Ci'#CiO%[Q^O'#EPO!#oQrO,5:pOOQQ'#Ju'#JuOOQO-E<f-E<fO9^QWO,5=[O!$VQWO,5=[O!$[Q^O,5;WO!&_Q7[O'#EhO!'xQWO,5;WO!'}Q^O'#DvO!(XQ`O,5;aO!(aQ`O,5;aO%[Q^O,5;aOOQU'#FS'#FSOOQU'#FU'#FUO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bOOQU'#FY'#FYO!(oQ^O,5;sOOQ?Mr,5;x,5;xOOQ?Mr,5;y,5;yOOQ?Mr,5;{,5;{O%[Q^O'#IlO!*rQ?MxO,5<gO%[Q^O,5;bO!&_Q7[O,5;bO!+aQ7[O,5;bO!-RQ7[O'#EZO%[Q^O,5;vOOQ?Mr,5;z,5;zO!-YQ&jO'#FiO!.VQ&jO'#KSO!-qQ&jO'#KSO!.^Q&jO'#KSOOQO'#KS'#KSO!.rQ&jO,5<ROOOS,5<_,5<_O!/TQ^O'#FuOOOS'#Ik'#IkO7VO,YO,5<PO!/[Q&jO'#FwOOQ?Mr,5<P,5<PO!/{Q!LQO'#CvOOQ?Mr'#Cz'#CzO!0`O!0LbO'#DOO!0|Q7[O,5<dO!1TQWO,5<fO!2pQ$ISO'#GVO!2}QWO'#GWO!3SQWO'#GWO!4rQ$ISO'#G[O!5nQ`O'#G`OOQO'#Gk'#GkO!+hQ7[O'#GjOOQO'#Gm'#GmO!+hQ7[O'#GlO!6aQ!LQO'#JgOOQ?Mr'#Jg'#JgO!6kQWO'#JfO!6yQWO'#JeO!7RQWO'#CuOOQ?Mr'#Cx'#CxO!7ZQWO'#CzOOQ?Mr'#DS'#DSOOQ?Mr'#DU'#DUO1SQWO'#DWO!+hQ7[O'#F}O!+hQ7[O'#GPO!7`QWO'#GRO!7eQWO'#GSO!3SQWO'#GYO!+hQ7[O'#G_O!7jQWO'#EnO!8XQWO,5<eOOQ?Mp'#Cr'#CrO!8aQWO'#EoO!9ZQ`O'#EpOOQ?Mp'#J|'#J|O!9bQ?MxO'#K]O9hQ?MxO,5=`O`Q^O,5>pOOQU'#Jc'#JcOOQU,5>q,5>qOOQU-E<X-E<XO!;aQ?NdO,5:_O!9UQ`O,5:]O!=zQ?NdO,5:gO%[Q^O,5:gO!@bQ?NdO,5:iOOQO,5@v,5@vO!ARQ7[O,5=[O!AaQ?MxO'#JdO9RQWO'#JdO!ArQ?MxO,59ZO!A}Q`O,59ZO!BVQ7[O,59ZO:VQ7[O,59ZO!BbQWO,5;WO!BjQWO'#H^O!COQWO'#K`O%[Q^O,5;|O!9UQ`O,5<OO!CWQWO,5=wO!C]QWO,5=wO!CbQWO,5=wO9hQ?MxO,5=wO;wQWO,5=gOOQO'#Cv'#CvO!CpQ`O,5=dO!CxQ7[O,5=eO!DTQWO,5=gO!DYQpO,5=jO!DbQWO'#K[O>tQWO'#HTO9^QWO'#HVO!DgQWO'#HVO:VQ7[O'#HXO!DlQWO'#HXOOQU,5=m,5=mO!DqQWO'#HYO!ESQWO'#CoO!EXQWO,59PO!EcQWO,59PO!GhQ^O,59POOQU,59P,59PO!GxQ?MxO,59PO%[Q^O,59PO!JTQ^O'#HaOOQU'#Hb'#HbOOQU'#Hc'#HcO`Q^O,5=yO!JkQWO,5=yO`Q^O,5>PO`Q^O,5>RO!JpQWO,5>TO`Q^O,5>VO!JuQWO,5>YO!JzQ^O,5>`OOQU,5>f,5>fO%[Q^O,5>fO9hQ?MxO,5>hOOQU,5>j,5>jO# UQWO,5>jOOQU,5>l,5>lO# UQWO,5>lOOQU,5>n,5>nO# rQ`O'#D[O%[Q^O'#JqO# |Q`O'#JqO#!kQ`O'#DjO#!|Q`O'#DjO#%_Q^O'#DjO#%fQWO'#JpO#%nQWO,5:TO#%sQWO'#EqO#&RQWO'#KPO#&ZQWO,5;[O#&`Q`O'#DjO#&mQ`O'#ESOOQ?Mr,5:l,5:lO%[Q^O,5:lO#&tQWO,5:lO>tQWO,5;VO!A}Q`O,5;VO!BVQ7[O,5;VO:VQ7[O,5;VO#&|QWO,5@]O#'RQ(CYO,5:pOOQO-E<b-E<bO#(XQ?NQO,5;OOCrQ`O,5:oO#(cQ`O,5:oOCrQ`O,5;OO!ArQ?MxO,5:oOOQ?Mp'#Eg'#EgOOQO,5;O,5;OO%[Q^O,5;OO#(pQ?MxO,5;OO#({Q?MxO,5;OO!A}Q`O,5:oOOQO,5;U,5;UO#)ZQ?MxO,5;OPOOO'#IY'#IYP#)oO#@ItO,58|POOO,58|,58|OOOO-E<Y-E<YOOQ?Mr1G.p1G.pOOOO-E<Z-E<ZO#)zQpO,59zOOOO-E<]-E<]OOQ?Mr1G/d1G/dO#*PQrO,5>zO+}Q^O,5>zOOQO,5?Q,5?QO#*ZQ^O'#I`OOQO-E<^-E<^O#*hQWO,5@ZO#*pQrO,5@ZO#*wQWO,5@iOOQ?Mr1G/j1G/jO%[Q^O,5@jO#+PQWO'#IfOOQO-E<d-E<dO#*wQWO,5@iOOQ?Mp1G0u1G0uOOQ?Mv1G/u1G/uOOQ?Mv1G0V1G0VO%[Q^O,5@gO#+eQ?MxO,5@gO#+vQ?MxO,5@gO#+}QWO,5@fO9WQWO,5@fO#,VQWO,5@fO#,eQWO'#IiO#+}QWO,5@fOOQ?Mp1G0t1G0tO!(XQ`O,5:rO!(dQ`O,5:rOOQQ,5:t,5:tO#-VQYO,5:tO#-_Q7[O1G2vO9^QWO1G2vOOQ?Mr1G0r1G0rO#-mQ?NdO1G0rO#.rQ?NbO,5;SOOQ?Mr'#GU'#GUO#/`Q?NdO'#JgO!$[Q^O1G0rO#1hQrO'#JrO%[Q^O'#JrO#1rQWO,5:bOOQ?Mr'#D['#D[OOQ?Mr1G0{1G0{O%[Q^O1G0{OOQ?Mr1G1e1G1eO#1wQWO1G0{O#4]Q?NdO1G0|O#4dQ?NdO1G0|O#6zQ?NdO1G0|O#7RQ?NdO1G0|O#9iQ?NdO1G0|O#<PQ?NdO1G0|O#<WQ?NdO1G0|O#<_Q?NdO1G0|O#>uQ?NdO1G0|O#>|Q?NdO1G0|O#AZQ07bO'#CiO#CUQ07bO1G1_O#C]Q07bO'#JnO#CpQ?NdO,5?WOOQ?Mp-E<j-E<jO#E}Q?NdO1G0|O#FzQ?NdO1G0|OOQ?Mr1G0|1G0|O#GzQ7[O'#JwO#HUQWO,5:uO#HZQ?NdO1G1bO#H}Q&jO,5<VO#IVQ&jO,5<WO#I_Q&jO'#FnO#IvQWO'#FmOOQO'#KT'#KTOOQO'#Ij'#IjO#I{Q&jO1G1mOOQ?Mr1G1m1G1mOOOS1G1x1G1xO#J^Q07bO'#JmO#JhQWO,5<aO!(oQ^O,5<aOOOS-E<i-E<iOOQ?Mr1G1k1G1kO#JmQ`O'#KSOOQ?Mr,5<c,5<cO#JuQ`O,5<cO!&_Q7[O'#DQOOOO'#I^'#I^O#JzO!0LbO,59jOOQ?Mr,59j,59jO%[Q^O1G2OO!7eQWO'#InO#KVQ7[O,5<xOOQ?Mr,5<u,5<uO!+hQ7[O'#IqO#KuQ7[O,5=UO!+hQ7[O'#IsO#LhQ7[O,5=WO!&_Q7[O,5=YOOQO1G2Q1G2QO#LrQpO'#CrO#MVQ$ISO'#EoO#NUQ`O'#G`O#NrQpO,5<qO#NyQWO'#KWO9WQWO'#KWO$ XQWO,5<sO!+hQ7[O,5<rO$ ^QWO'#GXO$ oQWO,5<rO$ tQpO'#GUO$!RQpO'#KXO$!]QWO'#KXO!&_Q7[O'#KXO$!bQWO,5<vO$!gQ`O'#GaO!5iQ`O'#GaO$!xQWO'#GcO$!}QWO'#GeO!3SQWO'#GhO$#SQ?MxO'#IpO$#_Q`O,5<zOOQ?Mv,5<z,5<zO$#fQ`O'#GaO$#tQ`O'#GbO$#|Q`O'#GbO$$RQ7[O,5=UO$$cQ7[O,5=WOOQ?Mr,5=Z,5=ZO!+hQ7[O,5@QO!+hQ7[O,5@QO$$sQWO'#IuO$%OQWO,5@PO$%WQWO,59aOOQ?Mr,59f,59fO$%zQ!LSO,59rOOQ?Mr'#Jk'#JkO$&mQ7[O,5<iO$'`Q7[O,5<kO@fQWO,5<mOOQ?Mr,5<n,5<nO$'jQWO,5<tO$'oQ7[O,5<yO$(PQWO'#JzO!$[Q^O1G2PO$(UQWO1G2PO9WQWO'#J}O9WQWO'#EqO%[Q^O'#EqO9WQWO'#IwO$(ZQ?MxO,5@wOOQU1G2z1G2zOOQU1G4[1G4[OOQ?Mr1G/y1G/yOOQ?Mr1G/w1G/wO$*]Q?NdO1G0ROOQU1G2v1G2vO!&_Q7[O1G2vO%[Q^O1G2vO#-bQWO1G2vO$,aQ7[O'#EhOOQ?Mp,5@O,5@OO$,kQ?MxO,5@OOOQU1G.u1G.uO!ArQ?MxO1G.uO!A}Q`O1G.uO!BVQ7[O1G.uO$,|QWO1G0rO$-RQWO'#CiO$-^QWO'#KaO$-fQWO,5=xO$-kQWO'#KaO$-pQWO'#KaO$.OQWO'#I}O$.^QWO,5@zO$.fQrO1G1hOOQ?Mr1G1j1G1jO9^QWO1G3cO@fQWO1G3cO$.mQWO1G3cO$.rQWO1G3cOOQU1G3c1G3cO!DTQWO1G3RO!&_Q7[O1G3OO$.wQWO1G3OOOQU1G3P1G3PO!&_Q7[O1G3PO$.|QWO1G3PO$/UQ`O'#G}OOQU1G3R1G3RO!5iQ`O'#IyO!DYQpO1G3UOOQU1G3U1G3UOOQU,5=o,5=oO$/^Q7[O,5=qO9^QWO,5=qO$!}QWO,5=sO9RQWO,5=sO!A}Q`O,5=sO!BVQ7[O,5=sO:VQ7[O,5=sO$/lQWO'#K_O$/wQWO,5=tOOQU1G.k1G.kO$/|Q?MxO1G.kO@fQWO1G.kO$0XQWO1G.kO9hQ?MxO1G.kO$2aQrO,5@|O$2nQWO,5@|O9WQWO,5@|O$2yQ^O,5={O$3QQWO,5={OOQU1G3e1G3eO`Q^O1G3eOOQU1G3k1G3kOOQU1G3m1G3mO>oQWO1G3oO$3VQ^O1G3qO$7ZQ^O'#HpOOQU1G3t1G3tO$7hQWO'#HvO>tQWO'#HxOOQU1G3z1G3zO$7pQ^O1G3zO9hQ?MxO1G4QOOQU1G4S1G4SOOQ?Mp'#G]'#G]O9hQ?MxO1G4UO9hQ?MxO1G4WO$;wQWO,5@]O!(oQ^O,5;]O9WQWO,5;]O>tQWO,5:UO!(oQ^O,5:UO!A}Q`O,5:UO$;|Q07bO,5:UOOQO,5;],5;]O$<WQ`O'#IaO$<nQWO,5@[OOQ?Mr1G/o1G/oO$<vQ`O'#IgO$=QQWO,5@kOOQ?Mp1G0v1G0vO#!|Q`O,5:UOOQO'#Ic'#IcO$=YQ`O,5:nOOQ?Mv,5:n,5:nO#&wQWO1G0WOOQ?Mr1G0W1G0WO%[Q^O1G0WOOQ?Mr1G0q1G0qO>tQWO1G0qO!A}Q`O1G0qO!BVQ7[O1G0qOOQ?Mp1G5w1G5wO!ArQ?MxO1G0ZOOQO1G0j1G0jO%[Q^O1G0jO$=aQ?MxO1G0jO$=lQ?MxO1G0jO!A}Q`O1G0ZOCrQ`O1G0ZO$=zQ?MxO1G0jOOQO1G0Z1G0ZO$>`Q?NdO1G0jPOOO-E<W-E<WPOOO1G.h1G.hOOOO1G/f1G/fO$>jQpO,5<gO$>rQrO1G4fOOQO1G4l1G4lO%[Q^O,5>zO$>|QWO1G5uO$?UQWO1G6TO$?^QrO1G6UO9WQWO,5?QO$?hQ?NdO1G6RO%[Q^O1G6RO$?xQ?MxO1G6RO$@ZQWO1G6QO$@ZQWO1G6QO9WQWO1G6QO$@cQWO,5?TO9WQWO,5?TOOQO,5?T,5?TO$@wQWO,5?TO$(PQWO,5?TOOQO-E<g-E<gOOQQ1G0^1G0^OOQQ1G0`1G0`O#-YQWO1G0`OOQU7+(b7+(bO!&_Q7[O7+(bO%[Q^O7+(bO$AVQWO7+(bO$AbQ7[O7+(bO$ApQ?NdO,5=UO$CxQ?NdO,5=WO$FQQ?NdO,5=UO$H`Q?NdO,5=WO$JnQ?NdO,59rO$LsQ?NdO,5<iO$N{Q?NdO,5<kO%#TQ?NdO,5<yOOQ?Mr7+&^7+&^O%%cQ?NdO7+&^O%&VQ^O'#IbO%&dQWO,5@^O%&lQrO,5@^OOQ?Mr1G/|1G/|O%&vQWO7+&gOOQ?Mr7+&g7+&gO%&{Q07bO,5:cO%[Q^O7+&yO%'VQ07bO,5:_O%'dQ07bO,5:gO%'nQ07bO,5:iO%'xQ7[O'#IeO%(SQWO,5@cOOQ?Mr1G0a1G0aOOQO1G1q1G1qOOQO1G1r1G1rO%([QtO,5<YO!(oQ^O,5<XOOQO-E<h-E<hOOQ?Mr7+'X7+'XOOOS7+'d7+'dOOOS1G1{1G1{O%(gQWO1G1{OOQ?Mr1G1}1G1}O%(lQpO,59lOOOO-E<[-E<[OOQ?Mr1G/U1G/UO%(sQ?NdO7+'jOOQ?Mr,5?Y,5?YO%)gQpO,5?YOOQ?Mr1G2d1G2dP!&_Q7[O'#InPOQ?Mr-E<l-E<lO%*VQ7[O,5?]OOQ?Mr-E<o-E<oO%*xQ7[O,5?_OOQ?Mr-E<q-E<qO%+SQpO1G2tO%+ZQpO'#CrO%+qQ7[O'#J}O%+xQ^O'#EqOOQ?Mr1G2]1G2]O%,SQWO'#ImO%,hQWO,5@rO%,hQWO,5@rO%,pQWO,5@rO%,{QWO,5@rOOQO1G2_1G2_O%-ZQ7[O1G2^O!+hQ7[O1G2^O%-kQ$ISO'#IoO%-xQWO,5@sO!&_Q7[O,5@sO%.QQpO,5@sOOQ?Mr1G2b1G2bOOQ?Mp,5<{,5<{OOQ?Mp,5<|,5<|O$(PQWO,5<|OCcQWO,5<|O!A}Q`O,5<{OOQO'#Gd'#GdO%.[QWO,5<}OOQ?Mp,5=P,5=PO$(PQWO,5=SOOQO,5?[,5?[OOQO-E<n-E<nOOQ?Mv1G2f1G2fO!5iQ`O,5<{O%.dQWO,5<|O$!xQWO,5<}O%.oQ`O,5<|O!+hQ7[O'#IqO%/`Q7[O1G2pO!+hQ7[O'#IsO%0RQ7[O1G2rO%0]Q7[O1G5lO%0gQ7[O1G5lOOQO,5?a,5?aOOQO-E<s-E<sOOQO1G.{1G.{O!9UQ`O,59tO%[Q^O,59tOOQ?Mr,5<h,5<hO%0tQWO1G2XO!+hQ7[O1G2`O%0yQ?NdO7+'kOOQ?Mr7+'k7+'kO!$[Q^O7+'kO%1mQWO,5;]OOQ?Mp,5?c,5?cOOQ?Mp-E<u-E<uO%1rQpO'#KYO#&wQWO7+(bO4UQrO7+(bO$AYQWO7+(bO%1|Q?NbO'#CiO%2aQ?NbO,5=QO%3RQWO,5=QOOQ?Mp1G5j1G5jOOQU7+$a7+$aO!ArQ?MxO7+$aO!A}Q`O7+$aO!$[Q^O7+&^O%3WQWO'#I|O%3oQWO,5@{OOQO1G3d1G3dO9^QWO,5@{O%3oQWO,5@{O%3wQWO,5@{OOQO,5?i,5?iOOQO-E<{-E<{OOQ?Mr7+'S7+'SO%3|QWO7+(}O9hQ?MxO7+(}O9^QWO7+(}O@fQWO7+(}OOQU7+(m7+(mO%4RQ?NbO7+(jO!&_Q7[O7+(jO%4]QpO7+(kOOQU7+(k7+(kO!&_Q7[O7+(kO%4dQWO'#K^O%4oQWO,5=iOOQO,5?e,5?eOOQO-E<w-E<wOOQU7+(p7+(pO%6RQ`O'#HWOOQU1G3]1G3]O!&_Q7[O1G3]O%[Q^O1G3]O%6YQWO1G3]O%6eQ7[O1G3]O9hQ?MxO1G3_O$!}QWO1G3_O9RQWO1G3_O!A}Q`O1G3_O!BVQ7[O1G3_O%6sQWO'#I{O%7XQWO,5@yO%7aQ`O,5@yOOQ?Mp1G3`1G3`OOQU7+$V7+$VO@fQWO7+$VO9hQ?MxO7+$VO%7lQWO7+$VO%[Q^O1G6hO%[Q^O1G6iO%7qQ?MxO1G6hO%7{Q^O1G3gO%8SQWO1G3gO%8XQ^O1G3gOOQU7+)P7+)PO9hQ?MxO7+)ZO`Q^O7+)]OOQU'#Kd'#KdOOQU'#JO'#JOO%8`Q^O,5>[OOQU,5>[,5>[O%[Q^O'#HqO%8mQWO'#HsOOQU,5>b,5>bO9WQWO,5>bOOQU,5>d,5>dOOQU7+)f7+)fOOQU7+)l7+)lOOQU7+)p7+)pOOQU7+)r7+)rO%8rQ`O1G5wO%9WQ07bO1G0wO%9bQWO1G0wOOQO1G/p1G/pO%9mQ07bO1G/pO>tQWO1G/pO!(oQ^O'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-E<e-E<eO!A}Q`O1G/pOOQO-E<a-E<aOOQ?Mv1G0Y1G0YOOQ?Mr7+%r7+%rO#&wQWO7+%rOOQ?Mr7+&]7+&]O>tQWO7+&]O!A}Q`O7+&]OOQO7+%u7+%uO$>`Q?NdO7+&UOOQO7+&U7+&UO%[Q^O7+&UO%9wQ?MxO7+&UO!ArQ?MxO7+%uO!A}Q`O7+%uO%:SQ?MxO7+&UO%:bQ?NdO7++mO%[Q^O7++mO%:rQWO7++lO%:rQWO7++lOOQO1G4o1G4oO9WQWO1G4oO%:zQWO1G4oOOQQ7+%z7+%zO#&wQWO<<K|O4UQrO<<K|O%;YQWO<<K|OOQU<<K|<<K|O!&_Q7[O<<K|O%[Q^O<<K|O%;bQWO<<K|O%;mQ?NdO,5?]O%=uQ?NdO,5?_O%?}Q?NdO1G2^O%B]Q?NdO1G2pO%DeQ?NdO1G2rO%FmQrO,5>|O%[Q^O,5>|OOQO-E<`-E<`O%FwQWO1G5xOOQ?Mr<<JR<<JRO%GPQ07bO1G0rO%IWQ07bO1G0|O%I_Q07bO1G0|O%K`Q07bO1G0|O%KgQ07bO1G0|O%MhQ07bO1G0|O& iQ07bO1G0|O& pQ07bO1G0|O& wQ07bO1G0|O&#xQ07bO1G0|O&$PQ07bO1G0|O&$WQ?NdO<<JeO&&OQ07bO1G0|O&&{Q07bO1G0|O&'{Q07bO'#JgO&*OQ07bO1G1bO&*]Q07bO1G0RO&*gQ7[O,5?POOQO-E<c-E<cO!(oQ^O'#FpOOQO'#KU'#KUOOQO1G1t1G1tO&*qQWO1G1sO&*vQ07bO,5?WOOOS7+'g7+'gOOOO1G/W1G/WOOQ?Mr1G4t1G4tO!+hQ7[O7+(`O&-WQrO'#CiO&-bQWO,5?XO9WQWO,5?XOOQO-E<k-E<kO&-pQWO1G6^O&-pQWO1G6^O&-xQWO1G6^O&.TQ7[O7+'xO&.eQpO,5?ZO&.oQWO,5?ZO!&_Q7[O,5?ZOOQO-E<m-E<mO&.tQpO1G6_O&/OQWO1G6_OOQ?Mp1G2h1G2hO$(PQWO1G2hOOQ?Mp1G2g1G2gO&/WQWO1G2iO!&_Q7[O1G2iOOQ?Mp1G2n1G2nO!A}Q`O1G2gOCcQWO1G2hO&/]QWO1G2iO&/eQWO1G2hO$!xQWO1G2iO&0XQ7[O,5?]OOQ?Mr-E<p-E<pO&0zQ7[O,5?_OOQ?Mr-E<r-E<rO!+hQ7[O7++WOOQ?Mr1G/`1G/`O&1UQWO1G/`OOQ?Mr7+'s7+'sO&1ZQ7[O7+'zO&1kQ?NdO<<KVOOQ?Mr<<KV<<KVO&2_QWO1G0wO!&_Q7[O'#IvO&2dQWO,5@tO&4fQrO<<K|O!&_Q7[O1G2lOOQU<<G{<<G{O!ArQ?MxO<<G{O&4mQ?NdO<<IxOOQ?Mr<<Ix<<IxOOQO,5?h,5?hO&5aQWO,5?hO&5fQWO,5?hOOQO-E<z-E<zO&5tQWO1G6gO&5tQWO1G6gO9^QWO1G6gO@fQWO<<LiOOQU<<Li<<LiO&5|QWO<<LiO9hQ?MxO<<LiOOQU<<LU<<LUO%4RQ?NbO<<LUOOQU<<LV<<LVO%4]QpO<<LVO&6RQ`O'#IxO&6^QWO,5@xO!(oQ^O,5@xOOQU1G3T1G3TO%+xQ^O'#JqOOQO'#Iz'#IzO9hQ?MxO'#IzO&6fQ`O,5=rOOQU,5=r,5=rO&6mQ`O'#EdO&7RQ`O'#GcO&7WQWO7+(wO&7]QWO7+(wOOQU7+(w7+(wO!&_Q7[O7+(wO%[Q^O7+(wO&7eQWO7+(wOOQU7+(y7+(yO9hQ?MxO7+(yO$!}QWO7+(yO9RQWO7+(yO!A}Q`O7+(yO&7pQWO,5?gOOQO-E<y-E<yOOQO'#HZ'#HZO&7{QWO1G6eO9hQ?MxO<<GqOOQU<<Gq<<GqO@fQWO<<GqO&8TQWO7+,SO&8YQWO7+,TO%[Q^O7+,SO%[Q^O7+,TOOQU7+)R7+)RO&8_QWO7+)RO&8dQ^O7+)RO&8kQWO7+)ROOQU<<Lu<<LuOOQU<<Lw<<LwOOQU-E<|-E<|OOQU1G3v1G3vO&8pQWO,5>]OOQU,5>_,5>_O&8uQWO1G3|O9WQWO7+&cO!(oQ^O7+&cOOQO7+%[7+%[O&8zQ07bO1G6UO>tQWO7+%[OOQ?Mr<<I^<<I^OOQ?Mr<<Iw<<IwO>tQWO<<IwOOQO<<Ip<<IpO$>`Q?NdO<<IpO%[Q^O<<IpOOQO<<Ia<<IaO!ArQ?MxO<<IaO&9UQ?MxO<<IpO&9aQ?NdO<= XO&9qQWO<= WOOQO7+*Z7+*ZO9WQWO7+*ZOOQUANAhANAhO&9yQrOANAhO!&_Q7[OANAhO#&wQWOANAhO4UQrOANAhO&:QQWOANAhO%[Q^OANAhO&:YQ?NdO7+'xO&<hQ?NdO,5?]O&>pQ?NdO,5?_O&@xQ?NdO7+'zO&CWQrO1G4hO&CbQ07bO7+&^O&EcQ07bO,5=UO&GgQ07bO,5=WO&GwQ07bO,5=UO&HXQ07bO,5=WO&HiQ07bO,59rO&JlQ07bO,5<iO&LlQ07bO,5<kO&N}Q07bO,5<yO'!pQ07bO7+'jO'!}Q07bO7+'kO'#[QWO,5<[OOQO7+'_7+'_O'#aQ7[O<<KzOOQO1G4s1G4sO'#hQWO1G4sO'#sQWO1G4sO'$RQWO7++xO'$RQWO7++xO!&_Q7[O1G4uO'$ZQpO1G4uO'$eQWO7++yOOQ?Mp7+(S7+(SO'$mQWO7+(TO'$xQpO7+(TOOQ?Mp7+(R7+(RO$(PQWO7+(SO'%PQWO7+(TO!&_Q7[O7+(TOCcQWO7+(SO'%UQWO7+(TO'%^Q7[O<<NrOOQ?Mr7+$z7+$zO'%hQpO,5?bOOQO-E<t-E<tO'%rQ?NbO7+(WOOQUAN=gAN=gO9^QWO1G5SOOQO1G5S1G5SO'&SQWO1G5SO'&XQWO7+,RO'&XQWO7+,RO9hQ?MxOANBTO@fQWOANBTOOQUANBTANBTOOQUANApANApOOQUANAqANAqO'&aQWO,5?dOOQO-E<v-E<vO'&lQ07bO1G6dOOQO,5?f,5?fOOQO-E<x-E<xOOQU1G3^1G3^O%+xQ^O,5<}O'&vQWO,5<}OOQU<<Lc<<LcO!&_Q7[O<<LcO&7WQWO<<LcO'&{QWO<<LcO%[Q^O<<LcOOQU<<Le<<LeO9hQ?MxO<<LeO$!}QWO<<LeO9RQWO<<LeO''TQ`O1G5RO''`QWO7+,POOQUAN=]AN=]O9hQ?MxOAN=]OOQU<= n<= nOOQU<= o<= oO''hQWO<= nO''mQWO<= oOOQU<<Lm<<LmO''rQWO<<LmO''wQ^O<<LmOOQU1G3w1G3wO>tQWO7+)hO'(OQWO<<I}O'(ZQ07bO<<I}OOQO<<Hv<<HvOOQ?MrAN?cAN?cOOQOAN?[AN?[O$>`Q?NdOAN?[OOQOAN>{AN>{O%[Q^OAN?[OOQO<<Mu<<MuOOQUG27SG27SO!&_Q7[OG27SO#&wQWOG27SO'(eQrOG27SO4UQrOG27SO'(lQWOG27SO'(tQ07bO<<JeO')RQ07bO1G2^O'*tQ07bO,5?]O',tQ07bO,5?_O'.tQ07bO1G2pO'0tQ07bO1G2rO'2tQ07bO<<KVO'3RQ07bO<<IxOOQO1G1v1G1vO!+hQ7[OANAfOOQO7+*_7+*_O'3`QWO7+*_O'3kQWO<= dO'3sQpO7+*aOOQ?Mp<<Ko<<KoO$(PQWO<<KoOCcQWO<<KoO'3}QWO<<KoOOQ?Mp<<Kn<<KnO'4YQpO<<KoO$(PQWO<<KnO'4aQWO<<KoO!&_Q7[O<<KoOOQO7+*n7+*nO9^QWO7+*nO'4fQWO<= mOOQUG27oG27oO9hQ?MxOG27oO!(oQ^O1G5OO'4nQWO7+,OO&7WQWOANA}OOQUANA}ANA}O!&_Q7[OANA}O'4vQWOANA}OOQUANBPANBPO9hQ?MxOANBPO$!}QWOANBPOOQO'#H['#H[OOQO7+*m7+*mOOQUG22wG22wOOQUANEYANEYOOQUANEZANEZOOQUANBXANBXO'5OQWOANBXOOQU<<MS<<MSO!(oQ^OAN?iOOQOG24vG24vO$>`Q?NdOG24vO#&wQWOLD,nOOQULD,nLD,nO!&_Q7[OLD,nO'5TQrOLD,nO'5[Q07bO7+'xO'6}Q07bO,5?]O'8}Q07bO,5?_O':}Q07bO7+'zO'<pQ7[OG27QOOQO<<My<<MyOOQ?MpANAZANAZO$(PQWOANAZOCcQWOANAZO'=QQWOANAZOOQ?MpANAYANAYO'=]QpOANAZOOQO<<NY<<NYOOQULD-ZLD-ZO'=dQ07bO7+*jOOQUG27iG27iO&7WQWOG27iO!&_Q7[OG27iOOQUG27kG27kO9hQ?MxOG27kOOQUG27sG27sO'=nQ07bOG25TOOQOLD*bLD*bOOQU!$(!Y!$(!YO#&wQWO!$(!YO!&_Q7[O!$(!YO'=xQ?NdOG27QOOQ?MpG26uG26uO$(PQWOG26uOCcQWOG26uO'@WQWOG26uOOQULD-TLD-TO&7WQWOLD-TOOQULD-VLD-VOOQU!)9Et!)9EtO#&wQWO!)9EtOOQ?MpLD,aLD,aO$(PQWOLD,aOCcQWOLD,aOOQU!$(!o!$(!oOOQU!.K;`!.K;`O'@cQ07bOG27QOOQ?Mp!$( {!$( {O$(PQWO!$( {OOQ?Mp!)9Eg!)9EgO!(oQ^O'#DwO1PQWO'#EUO'BUQrO'#JmO'B]QMnO'#DsO'BdQ^O'#D{O'BkQrO'#CiO'ERQrO'#CiO!(oQ^O'#D}O'EcQ^O,5;WO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O'#IlO'GfQWO,5<gO!(oQ^O,5;bO'GnQ7[O,5;bO'IXQ7[O,5;bO!(oQ^O,5;vO!&_Q7[O'#GjO'GnQ7[O'#GjO!&_Q7[O'#GlO'GnQ7[O'#GlO1SQWO'#DWO1SQWO'#DWO!&_Q7[O'#F}O'GnQ7[O'#F}O!&_Q7[O'#GPO'GnQ7[O'#GPO!&_Q7[O'#G_O'GnQ7[O'#G_O!(oQ^O,5:gO'I`Q`O'#D[O!(oQ^O,5@jO'EcQ^O1G0rO'IjQ07bO'#CiO!(oQ^O1G2OO!&_Q7[O'#IqO'GnQ7[O'#IqO!&_Q7[O'#IsO'GnQ7[O'#IsO'ItQpO'#CrO!&_Q7[O,5<rO'GnQ7[O,5<rO'EcQ^O1G2PO!(oQ^O7+&yO!&_Q7[O1G2^O'GnQ7[O1G2^O!&_Q7[O'#IqO'GnQ7[O'#IqO!&_Q7[O'#IsO'GnQ7[O'#IsO!&_Q7[O1G2`O'GnQ7[O1G2`O'EcQ^O7+'kO'EcQ^O7+&^O!&_Q7[OANAfO'GnQ7[OANAfO'JXQWO'#ElO'J^QWO'#ElO'JfQWO'#F[O'JkQWO'#EvO'JpQWO'#KOO'J{QWO'#J|O'KWQWO,5;WO'K]Q7[O,5<dO'KdQWO'#GWO'KiQWO'#GWO'KnQWO,5<eO'KvQWO,5;WO'LOQ07bO1G1_O'LVQWO,5<rO'L[QWO,5<rO'LaQWO,5<tO'LfQWO,5<tO'LkQWO1G2PO'LpQWO1G0rO'LuQ7[O<<KzO'L|Q7[O<<KzO7eQ7[O'#FzO9RQWO'#FyOAaQWO'#EkO!(oQ^O,5;sO!3SQWO'#GWO!3SQWO'#GWO!3SQWO'#GYO!3SQWO'#GYO!+hQ7[O7+(`O!+hQ7[O7+(`O%+SQpO1G2tO%+SQpO1G2tO!&_Q7[O,5=YO!&_Q7[O,5=Y",
  stateData: "'NQ~O'wOS'xOSTOS'yRQ~OPYOQYOSfOY!VOaqOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![XO!fuO!iZO!lYO!mYO!nYO!pvO!rwO!uxO!y]O#t!PO$V|O%e}O%g!QO%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO%v!UO&S!WO&Y!XO&[!YO&^!ZO&`![O&c!]O&i!^O&o!_O&q!`O&s!aO&u!bO&w!cO(OSO(QTO(TUO([VO(j[O(yiO~OWtO~P`OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa!wOp!nO!P!oO!_!yO!`!vO!a!vO!y;QO#Q!pO#R!pO#S!xO#T!pO#U!pO#X!zO#Y!zO(P!lO(QTO(TUO(`!mO(j!sO~O'y!{O~OP]XR]X[]Xa]Xo]X}]X!P]X!Y]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X'u]X([]X(m]X(t]X(u]X~O!d%PX~P(qO_!}O(Q#PO(R!}O(S#PO~O_#QO(S#PO(T#PO(U#QO~Ou#SO!R#TO(]#TO(^#VO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(O;UO(QTO(TUO([VO(j[O(yiO~O!X#ZO!Y#WO!V(cP!V(qP~P+}O!Z#cO~P`OPYOQYOSfOd!jOe!iOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(QTO(TUO([VO(j[O(yiO~Om#mO!X#iO!y]O#f#lO#g#iO(O;VO!h(nP~P.iO!i#oO(O#nO~O!u#sO!y]O%e#tO~O#h#uO~O!d#vO#h#uO~OP$[OR#zO[$cOo$aO}#yO!P#{O!Y$_O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~Oa(aX'u(aX's(aX!h(aX!V(aX![(aX%f(aX!d(aX~P1qO#P$dO#]$eO$P$eOP(bXR(bX[(bXo(bX}(bX!P(bX!Y(bX!i(bX!m(bX#O(bX#k(bX#l(bX#m(bX#n(bX#o(bX#p(bX#q(bX#r(bX#s(bX#u(bX#w(bX#y(bX#z(bX([(bX(m(bX(t(bX(u(bX![(bX%f(bX~Oa(bX'u(bX's(bX!V(bX!h(bXs(bX!d(bX~P4UO#]$eO~O$[$hO$^$gO$e$mO~OSfO![$nO$h$oO$j$qO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{%[O!P${O![$|O!f%aO!i$xO#g%bO$V%_O$r%]O$t%^O$w%`O(O$sO(QTO(TUO([$uO(t$}O(u%POg(XP~O!i%cO~O!P%fO![%gO(O%eO~O!d%kO~Oa%lO'u%lO~O}%pO~P%[O(P!lO~P%[O%k%tO~P%[Oh%VO!i%cO(O%eO(P!lO~Oe%{O!i%cO(O%eO~O#s$RO~O}&QO![%}O!i&PO%g&TO(O%eO(P!lO(QTO(TUO`)SP~O!u#sO~O%p&VO!P)OX![)OX(O)OX~O(O&WO~O!r&]O#t!PO%g!QO%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO~Od&bOe&aO!u&_O%e&`O%x&^O~P;|Od&eOeyO![&dO!r&]O!uxO!y]O#t!PO%e}O%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO%v!UO~Ob&hO#]&kO%g&fO(P!lO~P=RO!i&lO!r&pO~O!i#oO~O![XO~Oa%lO't&xO'u%lO~Oa%lO't&{O'u%lO~Oa%lO't&}O'u%lO~O's]X!V]Xs]X!h]X&W]X![]X%f]X!d]X~P(qO!_'[O!`'TO!a'TO(P!lO(QTO(TUO~Op'RO!P'QO!X'UO(`'PO!Z(dP!Z(sP~P@YOk'_O![']O(O%eO~Oe'dO!i%cO(O%eO~O}&QO!i&PO~Op!nO!P!oO!y;QO#Q!pO#R!pO#T!pO#U!pO(P!lO(QTO(TUO(`!mO(j!sO~O!_'jO!`'iO!a'iO#S!pO#X'kO#Y'kO~PAtOa%lOh%VO!d#vO!i%cO'u%lO(m'mO~O!m'qO#]'oO~PCSOp!nO!P!oO(QTO(TUO(`!mO(j!sO~O![XOp(hX!P(hX!_(hX!`(hX!a(hX!y(hX#Q(hX#R(hX#S(hX#T(hX#U(hX#X(hX#Y(hX(P(hX(Q(hX(T(hX(`(hX(j(hX~O!`'iO!a'iO(P!lO~PCrO'z'uO'{'uO'|'wO~O_!}O(Q'yO(R!}O(S'yO~O_#QO(S'yO(T'yO(U#QO~Ou#SO!R#TO(]#TO(^'}O~O!X(PO!V'SX!V'YX!Y'SX!Y'YX~P+}O!Y(RO!V(cX~OP$[OR#zO[$cOo$aO}#yO!P#{O!Y(RO!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~O!V(cX~PGfO!V(WO~O!V(pX!Y(pX!d(pX!h(pX(m(pX~O#](pX#h#aX!Z(pX~PIiO#](XO!V(rX!Y(rX~O!Y(YO!V(qX~O!V(]O~O#]$eO~PIiO!Z(^O~P`OR#zO}#yO!P#{O!i#xO([VOP!ka[!kao!ka!Y!ka!m!ka#O!ka#k!ka#l!ka#m!ka#n!ka#o!ka#p!ka#q!ka#r!ka#s!ka#u!ka#w!ka#y!ka#z!ka(m!ka(t!ka(u!ka~Oa!ka'u!ka's!ka!V!ka!h!kas!ka![!ka%f!ka!d!ka~PKPO!h(_O~O!d#vO#](`O(m'mO!Y(oXa(oX'u(oX~O!h(oX~PMlO!P%fO![%gO!y]O#f(eO#g(dO(O%eO~O!Y(fO!h(nX~O!h(hO~O!P%fO![%gO#g(dO(O%eO~OP(bXR(bX[(bXo(bX}(bX!P(bX!Y(bX!i(bX!m(bX#O(bX#k(bX#l(bX#m(bX#n(bX#o(bX#p(bX#q(bX#r(bX#s(bX#u(bX#w(bX#y(bX#z(bX([(bX(m(bX(t(bX(u(bX~O!d#vO!h(bX~P! YOR(jO}(iO!i#xO#P$dO!y!xa!P!xa~O!u!xa%e!xa![!xa#f!xa#g!xa(O!xa~P!#ZO!u(nO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![XO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;nO!P${O![$|O!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(O(rO(QTO(TUO([$uO(t$}O(u%PO~O#h(tO~O!X(vO!h(fP~P%[O(`(xO(j[O~O!P(zO!i#xO(`(xO(j[O~OP;POQ;POSfOd<zOe!iOmkOo;POpkOqkOwkOy;PO{;PO!PWO!TkO!UkO![!eO!f;SO!iZO!l;PO!m;PO!n;PO!p;TO!r;WO!u!hO$V!kO(O)XO(QTO(TUO([VO(j[O(y<xO~O!Y$_Oa$oa'u$oa's$oa!h$oa!V$oa![$oa%f$oa!d$oa~O#t)`O~P!&_Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{%[O!P${O![$|O!f%aO!i$xO#g%bO$V%_O$r%]O$t%^O$w%`O(O(rO(QTO(TUO([$uO(t$}O(u%PO~Og(kP~P!+hO})eO!d)dO![$]X$Y$]X$[$]X$^$]X$e$]X~O!d)dO![(vX$Y(vX$[(vX$^(vX$e(vX~O})eO~P!-qO})eO![(vX$Y(vX$[(vX$^(vX$e(vX~O![)gO$Y)kO$[)fO$^)fO$e)lO~O!X)oO~P!(oO$[$hO$^$gO$e)sO~Ok$xX}$xX!P$xX#P$xX(t$xX(u$xX~OgjXg$xXkjX!YjX#]jX~P!/gOu)uO(])vO(^)xO~Ok*RO})zO!P){O(t$}O(u%PO~Og)yO~P!0kOg*SO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;nO!P*UO![*VO!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(QTO(TUO([$uO(t$}O(u%PO~O!X*YO(O*TO!h(zP~P!1YO#h*[O~O!i*]O~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;nO!P${O![$|O!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(O*_O(QTO(TUO([$uO(t$}O(u%PO~O!X*bO!V({P~P!3XOo*nO!P*fO!_*lO!`*eO!a*eO!i*]O#X*mO%]*hO(P!lO(`!mO~O!Z*kO~P!4|O#P$dOk(ZX}(ZX!P(ZX(t(ZX(u(ZX!Y(ZX#](ZX~Og(ZX#}(ZX~P!5uOk*sO#]*rOg(YX!Y(YX~O!Y*tOg(XX~O(O&WOg(XP~Op*wO~O!i*|O~O(O(rO~Om+QO!P%fO!X#iO![%gO!y]O#f#lO#g#iO(O%eO!h(nP~O!d#vO#h+RO~O!P%fO!X+TO!Y(YO![%gO(O%eO!V(qP~Op'XO!P+VO!X+UO(QTO(TUO(`(xO~O!Z(sP~P!8uO!Y+WOa)PX'u)PX~OP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~Oa!ga!Y!ga'u!ga's!ga!V!ga!h!gas!ga![!ga%f!ga!d!ga~P!9mOR#zO}#yO!P#{O!i#xO([VOP!oa[!oao!oa!Y!oa!m!oa#O!oa#k!oa#l!oa#m!oa#n!oa#o!oa#p!oa#q!oa#r!oa#s!oa#u!oa#w!oa#y!oa#z!oa(m!oa(t!oa(u!oa~Oa!oa'u!oa's!oa!V!oa!h!oas!oa![!oa%f!oa!d!oa~P!<TOR#zO}#yO!P#{O!i#xO([VOP!qa[!qao!qa!Y!qa!m!qa#O!qa#k!qa#l!qa#m!qa#n!qa#o!qa#p!qa#q!qa#r!qa#s!qa#u!qa#w!qa#y!qa#z!qa(m!qa(t!qa(u!qa~Oa!qa'u!qa's!qa!V!qa!h!qas!qa![!qa%f!qa!d!qa~P!>kOh%VOk+aO![']O%f+`O~O!d+cOa(WX![(WX'u(WX!Y(WX~Oa%lO![XO'u%lO~Oh%VO!i%cO~Oh%VO!i%cO(O%eO~O!d#vO#h(tO~Ob+nO%g+oO(O+kO(QTO(TUO!Z)TP~O!Y+pO`)SX~O[+tO~O`+uO~O![%}O(O%eO(P!lO`)SP~Oh%VO#]+zO~Oh%VOk+}O![$|O~O![,PO~O},RO![XO~O%k%tO~O!u,WO~Oe,]O~Ob,^O(O#nO(QTO(TUO!Z)RP~Oe%{O~O%g!QO(O&WO~P=RO[,cO`,bO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(QTO(TUO([VO(j[O(yiO~O![!eO!r!gO$V!kO(O!dO~P!EkO`,bOa%lO'u%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa,hO!rwO#t!OO%i!OO%j!OO%k!OO~P!HTO!i&lO~O&Y,nO~O![,pO~O&k,rO&m,sOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(O&ha(Q&ha(T&ha([&ha(j&ha(y&ha!Z&ha&a&hab&ha&f&ha~O(O,xO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# ZO!d,}O#],|Oh(eX!Y#eX!Y(eX!Z#eX!Z(eX!d(eX!i(eX~Oh%VO!d-PO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(QTO(TUO(`!mO~OP;POQ;POSfOd<zOe!iOmkOo;POpkOqkOwkOy;PO{;PO!PWO!TkO!UkO![!eO!f;SO!iZO!l;PO!m;PO!n;PO!p;TO!r;WO!u!hO$V!kO(QTO(TUO([VO(j[O(y<xO~O(O;zO~P##_O!Y-TO!Z(dX~O!Z-VO~O!d,}O#],|O!Y#eX!Z#eX~O!Y-WO!Z(sX~O!Z-YO~O!`-ZO!a-ZO(P!lO~P#!|O!Z-^O~P'_Ok-aO![']O~O!V-fO~Op!xa!_!xa!`!xa!a!xa#Q!xa#R!xa#S!xa#T!xa#U!xa#X!xa#Y!xa(P!xa(Q!xa(T!xa(`!xa(j!xa~P!#ZO!m-kO#]-iO~PCSO!`-mO!a-mO(P!lO~PCrOa%lO#]-iO'u%lO~Oa%lO!d#vO#]-iO'u%lO~Oa%lO!d#vO!m-kO#]-iO'u%lO(m'mO~O'z'uO'{'uO'|-rO~Os-sO~O!V'Sa!Y'Sa~P!9mO!X-wO!V'SX!Y'SX~P%[O!Y(RO!V(ca~O!V(ca~PGfO!Y(YO!V(qa~O!P%fO!X-{O![%gO(O%eO!V'YX!Y'YX~O#]-}O!Y(oa!h(oaa(oa'u(oa~O!d#vO~P#+eO!Y(fO!h(na~O!P%fO![%gO#g.RO(O%eO~Om.WO!P%fO!X.TO![%gO!y]O#f.VO#g.TO(O%eO!Y']X!h']X~OR.[O!i#xO~Oh%VOk._O![']O%f.^O~Oa#`i!Y#`i'u#`i's#`i!V#`i!h#`is#`i![#`i%f#`i!d#`i~P!9mOk=UO})zO!P){O(t$}O(u%PO~O#h#[aa#[a#]#[a'u#[a!Y#[a!h#[a![#[a!V#[a~P#.aO#h(ZXP(ZXR(ZX[(ZXa(ZXo(ZX!i(ZX!m(ZX#O(ZX#k(ZX#l(ZX#m(ZX#n(ZX#o(ZX#p(ZX#q(ZX#r(ZX#s(ZX#u(ZX#w(ZX#y(ZX#z(ZX'u(ZX([(ZX(m(ZX!h(ZX!V(ZX's(ZXs(ZX![(ZX%f(ZX!d(ZX~P!5uO!Y.lO!h(fX~P!9mO!h.oO~O!V.qO~OP$[OR#zO}#yO!P#{O!i#xO!m$[O([VO[#jia#jio#ji!Y#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#k#ji~P#1|O#k$OO~P#1|OP$[OR#zOo$aO}#yO!P#{O!i#xO!m$[O#k$OO#l$PO#m$PO#n$PO([VO[#jia#ji!Y#ji#O#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#o#ji~P#4kO#o$QO~P#4kOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO([VOa#ji!Y#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#u#ji~P#7YOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO([VO(u#}Oa#ji!Y#ji#y#ji#z#ji'u#ji(m#ji(t#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#w$UO~P#9pO#w#ji~P#9pO#u$SO~P#7YOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO([VO(t#|O(u#}Oa#ji!Y#ji#z#ji'u#ji(m#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#y#ji~P#<fO#y$WO~P#<fOP]XR]X[]Xo]X}]X!P]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X!Y]X!Z]X~O#}]X~P#?TOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O#u;^O#w;`O#y;bO#z;cO([VO(m$YO(t#|O(u#}O~O#}.sO~P#AbO#P$dO#];iO$P;iO#}(bX!Z(bX~P! YOa'`a!Y'`a'u'`a's'`a!h'`a!V'`as'`a!['`a%f'`a!d'`a~P!9mO[#jia#jio#ji!Y#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~OP$[OR#zO}#yO!P#{O!i#xO!m$[O#k$OO#l$PO#m$PO#n$PO([VO(t#ji(u#ji~P#DdOk=UO})zO!P){O(t$}O(u%POP#jiR#ji!i#ji!m#ji#k#ji#l#ji#m#ji#n#ji([#ji~P#DdO!Y.wOg(kX~P!0kOg.yO~Oa$Oi!Y$Oi'u$Oi's$Oi!V$Oi!h$Ois$Oi![$Oi%f$Oi!d$Oi~P!9mO$[.zO$^.zO~O$[.{O$^.{O~O!d)dO#].|O![$bX$Y$bX$[$bX$^$bX$e$bX~O!X.}O~O![)gO$Y/PO$[)fO$^)fO$e/QO~O!Y;dO!Z(aX~P#AbO!Z/RO~O!d)dO$e(vX~O$e/TO~Ou)uO(])vO(^/WO~O!V/[O~P!&_O(t$}Ok%^a}%^a!P%^a(u%^a!Y%^a#]%^a~Og%^a#}%^a~P#K^O(u%POk%`a}%`a!P%`a(t%`a!Y%`a#]%`a~Og%`a#}%`a~P#LPO!YfX!dfX!hfX!h$xX(mfX~P!/gO!X/eO!Y(YO(O/dO!V(qP!V({P~P!1YOo*nO!_*lO!`*eO!a*eO!i*]O#X*mO%]*hO(P!lO~Op'XO!P/fO!X+UO!Z*kO(QTO(TUO(`;wO!Z(sP~P#MjO!h/gO~P#.aO!Y/hO!d#vO(m'mO!h(zX~O!h/mO~O!P%fO!X*YO![%gO(O%eO!h(zP~O#h/oO~O!V$xX!Y$xX!d%PX~P!/gO!Y/pO!V({X~P#.aO!d/rO~O!V/tO~Oh%VOo/xO!d#vO!i%cO(m'mO~O(O/zO~O!d+cO~Oa%lO!Y0OO'u%lO~O!Z0QO~P!4|O!`0RO!a0RO(P!lO(`!mO~O!P0TO(`!mO~O#X0UO~Og%^a!Y%^a#]%^a#}%^a~P!0kOg%`a!Y%`a#]%`a#}%`a~P!0kO(O&WOg'iX!Y'iX~O!Y*tOg(Xa~Og0_O~OR0`O}0`O!P0aO#P$dOkza(tza(uza!Yza#]za~Ogza#}za~P$%]O})zO!P){Ok$qa(t$qa(u$qa!Y$qa#]$qa~Og$qa#}$qa~P$&UO})zO!P){Ok$sa(t$sa(u$sa!Y$sa#]$sa~Og$sa#}$sa~P$&wO#h0dO~Og%Ra!Y%Ra#]%Ra#}%Ra~P!0kO!d#vO~O#h0gO~O!Y+WOa)Pa'u)Pa~OR#zO}#yO!P#{O!i#xO([VOP!oi[!oio!oi!Y!oi!m!oi#O!oi#k!oi#l!oi#m!oi#n!oi#o!oi#p!oi#q!oi#r!oi#s!oi#u!oi#w!oi#y!oi#z!oi(m!oi(t!oi(u!oi~Oa!oi'u!oi's!oi!V!oi!h!ois!oi![!oi%f!oi!d!oi~P$(fOh%VOo%XOp$tOq$tOw%YOy%ZO{;nO!P${O![$|O!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(QTO(TUO([$uO(t$}O(u%PO~Om0pO(O0oO~P$*|O!d+cOa(Wa![(Wa'u(Wa!Y(Wa~O#h0vO~O[]X!YfX!ZfX~O!Y0wO!Z)TX~O!Z0yO~O[0zO~Ob0|O(O+kO(QTO(TUO~O![%}O(O%eO`'qX!Y'qX~O!Y+pO`)Sa~O!h1PO~P!9mO[1SO~O`1TO~O#]1WO~Ok1ZO![$|O~O(`(xO!Z)QP~Oh%VOk1dO![1aO%f1cO~O[1nO!Y1lO!Z)RX~O!Z1oO~O`1qOa%lO'u%lO~O(O#nO(QTO(TUO~O#P$dO#]$eO$P$eOP(bXR(bX[(bXo(bX}(bX!P(bX!Y(bX!i(bX!m(bX#O(bX#k(bX#l(bX#m(bX#n(bX#o(bX#p(bX#q(bX#r(bX#u(bX#w(bX#y(bX#z(bX([(bX(m(bX(t(bX(u(bX~O#s1tO&W1uOa(bX~P$0dO#]$eO#s1tO&W1uO~Oa1wO~P%[Oa1yO~O&a1|OP&_iQ&_iS&_iY&_ia&_id&_ie&_im&_io&_ip&_iq&_iw&_iy&_i{&_i!P&_i!T&_i!U&_i![&_i!f&_i!i&_i!l&_i!m&_i!n&_i!p&_i!r&_i!u&_i!y&_i#t&_i$V&_i%e&_i%g&_i%i&_i%j&_i%k&_i%n&_i%p&_i%s&_i%t&_i%v&_i&S&_i&Y&_i&[&_i&^&_i&`&_i&c&_i&i&_i&o&_i&q&_i&s&_i&u&_i&w&_i's&_i(O&_i(Q&_i(T&_i([&_i(j&_i(y&_i!Z&_ib&_i&f&_i~Ob2SO!Z2QO&f2RO~P`O![XO!i2UO~O&m,sOP&hiQ&hiS&hiY&hia&hid&hie&him&hio&hip&hiq&hiw&hiy&hi{&hi!P&hi!T&hi!U&hi![&hi!f&hi!i&hi!l&hi!m&hi!n&hi!p&hi!r&hi!u&hi!y&hi#t&hi$V&hi%e&hi%g&hi%i&hi%j&hi%k&hi%n&hi%p&hi%s&hi%t&hi%v&hi&S&hi&Y&hi&[&hi&^&hi&`&hi&c&hi&i&hi&o&hi&q&hi&s&hi&u&hi&w&hi's&hi(O&hi(Q&hi(T&hi([&hi(j&hi(y&hi!Z&hi&a&hib&hi&f&hi~O!V2[O~O!Y!^a!Z!^a~P#AbOp!nO!P!oO!X2bO(`!mO!Y'TX!Z'TX~P@YO!Y-TO!Z(da~O!Y'ZX!Z'ZX~P!8uO!Y-WO!Z(sa~O!Z2iO~P'_Oa%lO#]2rO'u%lO~Oa%lO!d#vO#]2rO'u%lO~Oa%lO!d#vO!m2vO#]2rO'u%lO(m'mO~Oa%lO'u%lO~P!9mO!Y$_Os$oa~O!V'Si!Y'Si~P!9mO!Y(RO!V(ci~O!Y(YO!V(qi~O!V(ri!Y(ri~P!9mO!Y(oi!h(oia(oi'u(oi~P!9mO#]2xO!Y(oi!h(oia(oi'u(oi~O!Y(fO!h(ni~O!P%fO![%gO!y]O#f2}O#g2|O(O%eO~O!P%fO![%gO#g2|O(O%eO~Ok3UO![']O%f3TO~Oh%VOk3UO![']O%f3TO~O#h%^aP%^aR%^a[%^aa%^ao%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a'u%^a([%^a(m%^a!h%^a!V%^a's%^as%^a![%^a%f%^a!d%^a~P#K^O#h%`aP%`aR%`a[%`aa%`ao%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a'u%`a([%`a(m%`a!h%`a!V%`a's%`as%`a![%`a%f%`a!d%`a~P#LPO#h%^aP%^aR%^a[%^aa%^ao%^a!Y%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a'u%^a([%^a(m%^a!h%^a!V%^a's%^a#]%^as%^a![%^a%f%^a!d%^a~P#.aO#h%`aP%`aR%`a[%`aa%`ao%`a!Y%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a'u%`a([%`a(m%`a!h%`a!V%`a's%`a#]%`as%`a![%`a%f%`a!d%`a~P#.aO#hzaPza[zaazaoza!iza!mza#Oza#kza#lza#mza#nza#oza#pza#qza#rza#sza#uza#wza#yza#zza'uza([za(mza!hza!Vza'szasza![za%fza!dza~P$%]O#h$qaP$qaR$qa[$qaa$qao$qa!i$qa!m$qa#O$qa#k$qa#l$qa#m$qa#n$qa#o$qa#p$qa#q$qa#r$qa#s$qa#u$qa#w$qa#y$qa#z$qa'u$qa([$qa(m$qa!h$qa!V$qa's$qas$qa![$qa%f$qa!d$qa~P$&UO#h$saP$saR$sa[$saa$sao$sa!i$sa!m$sa#O$sa#k$sa#l$sa#m$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#u$sa#w$sa#y$sa#z$sa'u$sa([$sa(m$sa!h$sa!V$sa's$sas$sa![$sa%f$sa!d$sa~P$&wO#h%RaP%RaR%Ra[%Raa%Rao%Ra!Y%Ra!i%Ra!m%Ra#O%Ra#k%Ra#l%Ra#m%Ra#n%Ra#o%Ra#p%Ra#q%Ra#r%Ra#s%Ra#u%Ra#w%Ra#y%Ra#z%Ra'u%Ra([%Ra(m%Ra!h%Ra!V%Ra's%Ra#]%Ras%Ra![%Ra%f%Ra!d%Ra~P#.aOa#`q!Y#`q'u#`q's#`q!V#`q!h#`qs#`q![#`q%f#`q!d#`q~P!9mO!X3^O!Y'UX!h'UX~P%[O!Y.lO!h(fa~O!Y.lO!h(fa~P!9mO!V3aO~O#}!ka!Z!ka~PKPO#}!ga!Y!ga!Z!ga~P#AbO#}!oa!Z!oa~P!<TO#}!qa!Z!qa~P!>kOg'XX!Y'XX~P!+hO!Y.wOg(ka~OSfO![3uO$c3vO~O!Z3zO~Os3{O~P#.aOa$lq!Y$lq'u$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9mO!V3|O~P#.aO})zO!P){O(u%POk'ea(t'ea!Y'ea#]'ea~Og'ea#}'ea~P%)nO})zO!P){Ok'ga(t'ga(u'ga!Y'ga#]'ga~Og'ga#}'ga~P%*aO(m$YO~P#.aO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/gO(O<QO~P!1YOmkO(O4OO~P.iO!P%fO!X4QO![%gO(O%eO!Y'aX!h'aX~O!Y/hO!h(za~O!Y/hO!d#vO!h(za~O!Y/hO!d#vO(m'mO!h(za~Og$zi!Y$zi#]$zi#}$zi~P!0kO!X4YO!V'cX!Y'cX~P!3XO!Y/pO!V({a~O!Y/pO!V({a~P#.aO!d#vO#s4bO~Oo4eO!d#vO(m'mO~O!P4hO(`!mO~O(t$}Ok%^i}%^i!P%^i(u%^i!Y%^i#]%^i~Og%^i#}%^i~P%.wO(u%POk%`i}%`i!P%`i(t%`i!Y%`i#]%`i~Og%`i#}%`i~P%/jOg(Yi!Y(Yi~P!0kO#]4mOg(Yi!Y(Yi~P!0kO!h4pO~Oa$mq!Y$mq'u$mq's$mq!V$mq!h$mqs$mq![$mq%f$mq!d$mq~P!9mO!V4tO~O!Y4uO![(|X~P#.aOa$xX![$xX%Z]X'u$xX!Y$xX~P!/gO%Z4xOalXklX}lX!PlX![lX'ulX(tlX(ulX!YlX~O%Z4xO~Ob5OO%g5PO(O+kO(QTO(TUO!Y'pX!Z'pX~O!Y0wO!Z)Ta~O[5TO~O`5UO~Oa%lO'u%lO~P#.aO![$|O~P#.aO!Y5^O#]5`O!Z)QX~O!Z5aO~Oo5hOp!nO!P5bO!_!yO!`!vO!a!vO!y;QO#Q!pO#R!pO#S!pO#T!pO#U!pO#X5gO#Y!zO(P!lO(QTO(TUO(`!mO(j!sO~O!Z5fO~P%4tOk5mO![1aO%f5lO~Oh%VOk5mO![1aO%f5lO~Ob5tO(O#nO(QTO(TUO!Y'oX!Z'oX~O!Y1lO!Z)Ra~O(QTO(TUO(`5vO~O`5zO~O#s5}O&W6OO~PMlO!h6PO~P%[Oa6RO~Oa6RO~P%[Ob2SO!Z6WO&f2RO~P`O!d6YO~O!d6[Oh(ei!Y(ei!Z(ei!d(ei!i(ei~O!Y#ei!Z#ei~P#AbO#]6]O!Y#ei!Z#ei~O!Y!^i!Z!^i~P#AbOa%lO#]6fO'u%lO~Oa%lO!d#vO#]6fO'u%lO~O!Y(oq!h(oqa(oq'u(oq~P!9mO!Y(fO!h(nq~O!P%fO![%gO#g6mO(O%eO~O![']O%f6pO~Ok6tO![']O%f6pO~O#h'eaP'eaR'ea['eaa'eao'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea'u'ea(['ea(m'ea!h'ea!V'ea's'eas'ea!['ea%f'ea!d'ea~P%)nO#h'gaP'gaR'ga['gaa'gao'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga'u'ga(['ga(m'ga!h'ga!V'ga's'gas'ga!['ga%f'ga!d'ga~P%*aO#h$ziP$ziR$zi[$zia$zio$zi!Y$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi'u$zi([$zi(m$zi!h$zi!V$zi's$zi#]$zis$zi![$zi%f$zi!d$zi~P#.aO#h%^iP%^iR%^i[%^ia%^io%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i'u%^i([%^i(m%^i!h%^i!V%^i's%^is%^i![%^i%f%^i!d%^i~P%.wO#h%`iP%`iR%`i[%`ia%`io%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i'u%`i([%`i(m%`i!h%`i!V%`i's%`is%`i![%`i%f%`i!d%`i~P%/jO!Y'Ua!h'Ua~P!9mO!Y.lO!h(fi~O#}#`i!Y#`i!Z#`i~P#AbOP$[OR#zO}#yO!P#{O!i#xO!m$[O([VO[#jio#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#k#ji~P%G^O#k;YO~P%G^OP$[OR#zOo;fO}#yO!P#{O!i#xO!m$[O#k;YO#l;ZO#m;ZO#n;ZO([VO[#ji#O#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#o#ji~P%IfO#o;[O~P%IfOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O([VO#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#u#ji~P%KnOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O#u;^O([VO(u#}O#y#ji#z#ji#}#ji(m#ji(t#ji!Y#ji!Z#ji~O#w;`O~P%MoO#w#ji~P%MoO#u;^O~P%KnOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O#u;^O#w;`O([VO(t#|O(u#}O#z#ji#}#ji(m#ji!Y#ji!Z#ji~O#y#ji~P&!OO#y;bO~P&!OOa#{y!Y#{y'u#{y's#{y!V#{y!h#{ys#{y![#{y%f#{y!d#{y~P!9mO[#jio#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji!Y#ji!Z#ji~OP$[OR#zO}#yO!P#{O!i#xO!m$[O#k;YO#l;ZO#m;ZO#n;ZO([VO(t#ji(u#ji~P&$zOk=VO})zO!P){O(t$}O(u%POP#jiR#ji!i#ji!m#ji#k#ji#l#ji#m#ji#n#ji([#ji~P&$zO#P$dOP(ZXR(ZX[(ZXk(ZXo(ZX}(ZX!P(ZX!i(ZX!m(ZX#O(ZX#k(ZX#l(ZX#m(ZX#n(ZX#o(ZX#p(ZX#q(ZX#r(ZX#s(ZX#u(ZX#w(ZX#y(ZX#z(ZX#}(ZX([(ZX(m(ZX(t(ZX(u(ZX!Y(ZX!Z(ZX~O#}$Oi!Y$Oi!Z$Oi~P#AbO#}!oi!Z!oi~P$(fOg'Xa!Y'Xa~P!0kO!Z7WO~O!Y'`a!Z'`a~P#AbOP]XR]X[]Xo]X}]X!P]X!V]X!Y]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X~O!d%WX#s%WX~P&+QO!d#vO(m'mO!Y'aa!h'aa~O!Y/hO!h(zi~O!Y/hO!d#vO!h(zi~Og$zq!Y$zq#]$zq#}$zq~P!0kO!V'ca!Y'ca~P#.aO!d7_O~O!Y/pO!V({i~P#.aO!Y/pO!V({i~O!V7cO~O!d#vO#s7hO~Oo7iO!d#vO(m'mO~O})zO!P){O(u%POk'fa(t'fa!Y'fa#]'fa~Og'fa#}'fa~P&/pO})zO!P){Ok'ha(t'ha(u'ha!Y'ha#]'ha~Og'ha#}'ha~P&0cO!V7lO~Og$|q!Y$|q#]$|q#}$|q~P!0kOa$my!Y$my'u$my's$my!V$my!h$mys$my![$my%f$my!d$my~P!9mO!d6[O~O!Y4uO![(|a~O![']OP$SaR$Sa[$Sao$Sa}$Sa!P$Sa!Y$Sa!i$Sa!m$Sa#O$Sa#k$Sa#l$Sa#m$Sa#n$Sa#o$Sa#p$Sa#q$Sa#r$Sa#s$Sa#u$Sa#w$Sa#y$Sa#z$Sa([$Sa(m$Sa(t$Sa(u$Sa~O%f6pO~P&2lOa#`y!Y#`y'u#`y's#`y!V#`y!h#`ys#`y![#`y%f#`y!d#`y~P!9mO[7qO~Ob7sO(O+kO(QTO(TUO~O!Y0wO!Z)Ti~O`7wO~O(`(xO!Y'lX!Z'lX~O!Y5^O!Z)Qa~O!Z8QO~P%4tOp!nO!P8RO(QTO(TUO(`!mO(j!sO~O#X8SO~O![1aO~O![1aO%f8UO~Ok8XO![1aO%f8UO~O[8^O!Y'oa!Z'oa~O!Y1lO!Z)Ri~O!h8bO~O!h8cO~O!h8fO~O!h8fO~P%[Oa8hO~O!d8iO~O!h8jO~O!Y(ri!Z(ri~P#AbOa%lO#]8rO'u%lO~O!Y(oy!h(oya(oy'u(oy~P!9mO!Y(fO!h(ny~O%f8uO~P&2lO![']O%f8uO~O#h$zqP$zqR$zq[$zqa$zqo$zq!Y$zq!i$zq!m$zq#O$zq#k$zq#l$zq#m$zq#n$zq#o$zq#p$zq#q$zq#r$zq#s$zq#u$zq#w$zq#y$zq#z$zq'u$zq([$zq(m$zq!h$zq!V$zq's$zq#]$zqs$zq![$zq%f$zq!d$zq~P#.aO#h'faP'faR'fa['faa'fao'fa!i'fa!m'fa#O'fa#k'fa#l'fa#m'fa#n'fa#o'fa#p'fa#q'fa#r'fa#s'fa#u'fa#w'fa#y'fa#z'fa'u'fa(['fa(m'fa!h'fa!V'fa's'fas'fa!['fa%f'fa!d'fa~P&/pO#h'haP'haR'ha['haa'hao'ha!i'ha!m'ha#O'ha#k'ha#l'ha#m'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#u'ha#w'ha#y'ha#z'ha'u'ha(['ha(m'ha!h'ha!V'ha's'has'ha!['ha%f'ha!d'ha~P&0cO#h$|qP$|qR$|q[$|qa$|qo$|q!Y$|q!i$|q!m$|q#O$|q#k$|q#l$|q#m$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#u$|q#w$|q#y$|q#z$|q'u$|q([$|q(m$|q!h$|q!V$|q's$|q#]$|qs$|q![$|q%f$|q!d$|q~P#.aO!Y'Ui!h'Ui~P!9mO#}#`q!Y#`q!Z#`q~P#AbO(t$}OP%^aR%^a[%^ao%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a#}%^a([%^a(m%^a!Y%^a!Z%^a~Ok%^a}%^a!P%^a(u%^a~P&CoO(u%POP%`aR%`a[%`ao%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a#}%`a([%`a(m%`a!Y%`a!Z%`a~Ok%`a}%`a!P%`a(t%`a~P&EsOk=VO})zO!P){O(u%PO~P&CoOk=VO})zO!P){O(t$}O~P&EsOR0`O}0`O!P0aO#P$dOPza[zakzaoza!iza!mza#Oza#kza#lza#mza#nza#oza#pza#qza#rza#sza#uza#wza#yza#zza#}za([za(mza(tza(uza!Yza!Zza~O})zO!P){OP$qaR$qa[$qak$qao$qa!i$qa!m$qa#O$qa#k$qa#l$qa#m$qa#n$qa#o$qa#p$qa#q$qa#r$qa#s$qa#u$qa#w$qa#y$qa#z$qa#}$qa([$qa(m$qa(t$qa(u$qa!Y$qa!Z$qa~O})zO!P){OP$saR$sa[$sak$sao$sa!i$sa!m$sa#O$sa#k$sa#l$sa#m$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#u$sa#w$sa#y$sa#z$sa#}$sa([$sa(m$sa(t$sa(u$sa!Y$sa!Z$sa~Ok=VO})zO!P){O(t$}O(u%PO~OP%RaR%Ra[%Rao%Ra!i%Ra!m%Ra#O%Ra#k%Ra#l%Ra#m%Ra#n%Ra#o%Ra#p%Ra#q%Ra#r%Ra#s%Ra#u%Ra#w%Ra#y%Ra#z%Ra#}%Ra([%Ra(m%Ra!Y%Ra!Z%Ra~P&NlO#}$lq!Y$lq!Z$lq~P#AbO#}$mq!Y$mq!Z$mq~P#AbO!Z9SO~O#}9TO~P!0kO!d#vO!Y'ai!h'ai~O!d#vO(m'mO!Y'ai!h'ai~O!Y/hO!h(zq~O!V'ci!Y'ci~P#.aO!Y/pO!V({q~Oo9[O!d#vO(m'mO~O!V9]O~P#.aO!V9]O~O!d#vO#s9bO~Og(Yy!Y(Yy~P!0kO!Y'ja!['ja~P#.aOa%Yq![%Yq'u%Yq!Y%Yq~P#.aO[9dO~O!Y0wO!Z)Tq~O#]9hO!Y'la!Z'la~O!Y5^O!Z)Qi~P#AbO!P4hO~O![1aO%f9lO~O(QTO(TUO(`9qO~O!Y1lO!Z)Rq~O!h9tO~O!h9uO~O!h9vO~O!h9vO~P%[O#]9yO!Y#ey!Z#ey~O!Y#ey!Z#ey~P#AbO%f:OO~P&2lO![']O%f:OO~O#}#{y!Y#{y!Z#{y~P#AbOP$ziR$zi[$zio$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi#}$zi([$zi(m$zi!Y$zi!Z$zi~P&NlO})zO!P){O(u%POP'eaR'ea['eak'eao'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea#}'ea(['ea(m'ea(t'ea!Y'ea!Z'ea~O})zO!P){OP'gaR'ga['gak'gao'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga#}'ga(['ga(m'ga(t'ga(u'ga!Y'ga!Z'ga~O(t$}OP%^iR%^i[%^ik%^io%^i}%^i!P%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i#}%^i([%^i(m%^i(u%^i!Y%^i!Z%^i~O(u%POP%`iR%`i[%`ik%`io%`i}%`i!P%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i#}%`i([%`i(m%`i(t%`i!Y%`i!Z%`i~O#}$my!Y$my!Z$my~P#AbO#}#`y!Y#`y!Z#`y~P#AbO!d#vO!Y'aq!h'aq~O!Y/hO!h(zy~O!V'cq!Y'cq~P#.aOo:YO!d#vO(m'mO~O!V:ZO~P#.aO!V:ZO~O!Y0wO!Z)Ty~O!Y5^O!Z)Qq~O![1aO%f:cO~O!h:fO~O%f:kO~P&2lOP$zqR$zq[$zqo$zq!i$zq!m$zq#O$zq#k$zq#l$zq#m$zq#n$zq#o$zq#p$zq#q$zq#r$zq#s$zq#u$zq#w$zq#y$zq#z$zq#}$zq([$zq(m$zq!Y$zq!Z$zq~P&NlO})zO!P){O(u%POP'faR'fa['fak'fao'fa!i'fa!m'fa#O'fa#k'fa#l'fa#m'fa#n'fa#o'fa#p'fa#q'fa#r'fa#s'fa#u'fa#w'fa#y'fa#z'fa#}'fa(['fa(m'fa(t'fa!Y'fa!Z'fa~O})zO!P){OP'haR'ha['hak'hao'ha!i'ha!m'ha#O'ha#k'ha#l'ha#m'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#u'ha#w'ha#y'ha#z'ha#}'ha(['ha(m'ha(t'ha(u'ha!Y'ha!Z'ha~OP$|qR$|q[$|qo$|q!i$|q!m$|q#O$|q#k$|q#l$|q#m$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#u$|q#w$|q#y$|q#z$|q#}$|q([$|q(m$|q!Y$|q!Z$|q~P&NlOg%b!Z!Y%b!Z#]%b!Z#}%b!Z~P!0kOo:oO!d#vO(m'mO~O!V:pO~P#.aO!Y'lq!Z'lq~P#AbO!Y#e!Z!Z#e!Z~P#AbO#h%b!ZP%b!ZR%b!Z[%b!Za%b!Zo%b!Z!Y%b!Z!i%b!Z!m%b!Z#O%b!Z#k%b!Z#l%b!Z#m%b!Z#n%b!Z#o%b!Z#p%b!Z#q%b!Z#r%b!Z#s%b!Z#u%b!Z#w%b!Z#y%b!Z#z%b!Z'u%b!Z([%b!Z(m%b!Z!h%b!Z!V%b!Z's%b!Z#]%b!Zs%b!Z![%b!Z%f%b!Z!d%b!Z~P#.aOo:xO!d#vO(m'mO~OP%b!ZR%b!Z[%b!Zo%b!Z!i%b!Z!m%b!Z#O%b!Z#k%b!Z#l%b!Z#m%b!Z#n%b!Z#o%b!Z#p%b!Z#q%b!Z#r%b!Z#s%b!Z#u%b!Z#w%b!Z#y%b!Z#z%b!Z#}%b!Z([%b!Z(m%b!Z!Y%b!Z!Z%b!Z~P&NlOs(aX~P1qO}%pO~P!(oO(P!lO~P!(oO!VfX!YfX#]fX~P&+QOP]XR]X[]Xo]X}]X!P]X!Y]X!YfX!i]X!m]X#O]X#P]X#]]X#]fX#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X~O!dfX!h]X!hfX(mfX~P'BxOP;POQ;POSfOd<zOe!iOmkOo;POpkOqkOwkOy;PO{;PO!PWO!TkO!UkO![XO!f;SO!iZO!l;PO!m;PO!n;PO!p;TO!r;WO!u!hO$V!kO(O)XO(QTO(TUO([VO(j[O(y<xO~O!Y;dO!Z$oa~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;oO!P${O![$|O!f=PO!i$xO#g;uO$V%_O$r;qO$t;sO$w%`O(O(rO(QTO(TUO([$uO(t$}O(u%PO~O#t)`O~P'GnOo!bX(m!bX~P# ZO!Z]X!ZfX~P'BxO!VfX!V$xX!YfX!Y$xX#]fX~P!/gO#h;XO~O!d#vO#h;XO~O#];iO~O#s;]O~O#];xO!Y(rX!Z(rX~O#];iO!Y(pX!Z(pX~O#h;yO~Og;{O~P!0kO#h<RO~O#h<SO~O!d#vO#h<TO~O!d#vO#h;yO~O#}<UO~P#AbO#h<VO~O#h<WO~O#h<]O~O#h<^O~O#h<_O~O#h<`O~O#}<aO~P!0kO#}<bO~P!0kO#P#Q#R#T#U#X#f#g#r(y$r$t$w%Z%e%f%g%n%p%s%t%v%x~'yT#l!U'w(P#mp#k#no}'x$['x(O$^(`~",
  goto: "$4Q)XPPPPPP)YPP)]P)nP+O/PPPPP5xPP6`PP<V?mP@QP@QPPP@QPBRP@QP@QP@QPBVPB[PByPGrPPPGvPPPPGvJxPPPKOKzPGvPGvPPNYGvPPPGvPGvP!!aGvP!%v!&{!'UP!'x!'|!'x!+YPPPPPPP!+y!&{PP!,Z!-gP!0jGvGv!0o!3z!8b!8b!<`PPP!<hGvPPPPPPPPPPP!?vP!ATPPGv!BfPGvPGvGvGvGvGvPGv!CxP!GRP!JWP!J[!Jf!Jj!JjP!GOP!Jn!JnP!MsP!MwGvGv!M}##RBV@QP@QP@Q@QP#$_@Q@Q#&j@Q#)Z@Q#+`@Q@Q#,O#.]#.]#.b#.k#.]#.wP#.]P@Q#/a@Q#3S@Q@Q5xPPP#6{PPP#7f#7fP#7fP#7|#7fPP#8SP#7yP#7y#8g#7y#9R#9X5u)]#9[)]P#9c#9c#9cP)]P)]P)]P)]PP)]P#9i#9lP#9l)]P#9pP#9sP)]P)]P)]P)]P)]P)])]PP#9y#:P#:[#:b#:h#:n#:t#;S#;Y#;d#;j#;t#;z#<[#<b#=S#=f#=l#=r#>Q#>g#@V#@e#@l#BR#Ba#C|#D[#Db#Dh#Dn#Dx#EO#EU#E`#Er#ExPPPPPPPPPP#FOPPPPPPP#Fs#Iz#KZ#Kb#KjPPP$!sP$!|$%t$,^$,a$,d$-P$-S$-Z$-cP$-i$-lP$.Y$.^$/U$0d$0i$1PPP$1U$1[$1`P$1c$1g$1k$2a$2x$3a$3e$3h$3k$3q$3t$3x$3|R!|RoqOXst!Z#d%k&o&q&r&t,k,p1|2PY!vQ']-]1a5eQ%rvQ%zyQ&R|Q&g!VS'T!e-TQ'c!iS'i!r!yU*e$|*V*jQ+i%{Q+v&TQ,[&aQ-Z'[Q-e'dQ-m'jQ0R*lQ1k,]R;v;T%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V,h,k,p-a-i-w-}.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3^5b5m5}6O6R6f8R8X8h8rS#q];Q!r)Z$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{U*y%[;n;oQ+n%}Q,^&dQ,e&lQ0m+aQ0q+cQ0|+oQ1s,cQ3Q._Q5O0wQ5t1lQ6r3UQ7s5PR8x6t'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{t!nQ!r!v!y!z'T'[']'i'j'k-T-Z-]-m1a5e5g$|$ti#v$b$c$d$x${%O%Q%]%^%b)u){)}*P*R*U*[*b*r*s+`+c+z+}.^.w/]/e/o/p/r0V0X0d1W1Z1c3T3}4Y4b4m4u4x5l6p7_7h8U8u9T9b9l:O:c:k;g;h;j;k;l;m;p;q;r;s;t;u;|;}<O<P<R<S<V<W<X<Y<Z<[<]<^<a<b<x=Q=R=U=VQ&U|Q'R!eU'X%g*V-WQ+n%}Q,^&dQ0c*|Q0|+oQ1R+uQ1r,bQ1s,cQ5O0wQ5X1TQ5t1lQ5w1nQ5x1qQ7s5PQ7v5UQ8a5zQ9g7wR9r8^rnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PR,`&h&x^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<z<{[#]WZ#W#Z'U(P!b%hm#h#i#l$x%c%f(Y(d(e(f*U*Y*]+T+U+W,g,}-{.R.S.T.V/e/h2U2|2}4Q6[6mQ%uxQ%yyS&O|&TQ&[!TQ'`!hQ'b!iQ(m#sS+h%z%{Q+l%}Q,V&_Q,Z&aS-d'c'dQ.a(nQ0u+iQ0{+oQ0}+pQ1Q+tQ1f,WS1j,[,]Q2n-eQ4}0wQ5R0zQ5W1SQ5s1kQ7r5PQ7u5TQ9c7qR:^9d!O$zi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=R!S%wy!i!u%y%z%{'S'b'c'd'h'r*d+h+i-Q-d-e-l/y0u2g2n2u4dQ+b%uQ+{&XQ,O&YQ,Y&aQ.`(mQ1e,VU1i,Z,[,]Q3V.aQ5n1fS5r1j1kQ8]5s#^<|#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vo<};g;h;k;m;q;s;u;}<P<S<W<Y<[<^<bW%Ti%V*t<xS&X!Q&fQ&Y!RQ&Z!SR+y&V$}%Si#v$b$c$d$x${%O%Q%]%^%b)u){)}*P*R*U*[*b*r*s+`+c+z+}.^.w/]/e/o/p/r0V0X0d1W1Z1c3T3}4Y4b4m4u4x5l6p7_7h8U8u9T9b9l:O:c:k;g;h;j;k;l;m;p;q;r;s;t;u;|;}<O<P<R<S<V<W<X<Y<Z<[<]<^<a<b<x=Q=R=U=VT)v$u)wV*y%[;n;oW'X!e%g*V-WS(y#y#zQ+]%pQ+s&QS.Y(i(jQ1[,PQ4n0`R7{5^'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{$i$^c#Y#e%o%q%s(O(U(p(u(})O)P)Q)R)S)T)U)V)W)Y)[)^)c)m+^+r-R-p-u-z-|.k.n.r.t.u.v/X0e2]2`2p2w3]3b3c3d3e3f3g3h3i3j3k3l3m3n3q3r3y4r4{6_6e6j6y6z7T7U7}8l8p8z9Q9R9{:`:g;R<oT#TV#U'PkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{Q'V!eR2c-Tv!nQ!e!r!v!y!z'T'[']'i'j'k-T-Z-]-m1a5e5gU*d$|*V*jS/y*e*lQ0S*mQ1^,RQ4d0RR4g0UnqOXst!Z#d%k&o&q&r&t,k,p1|2PQ&v!^Q's!xS(o#u;XQ+f%xQ,T&[Q,U&^Q-b'aQ-o'lS.j(t;yS0f+R<TQ0s+gQ1`,SQ2T,rQ2V,sQ2_-OQ2l-cQ2o-gS4s0g<_Q4y0tS4|0v<`Q6^2aQ6b2mQ6g2tQ7p4zQ8m6`Q8n6cQ8q6hR9x8j$d$]c#Y#e%q%s(O(U(p(u(})O)P)Q)R)S)T)U)V)W)Y)[)^)c)m+^+r-R-p-u-z-|.k.n.r.u.v/X0e2]2`2p2w3]3b3c3d3e3f3g3h3i3j3k3l3m3n3q3r3y4r4{6_6e6j6y6z7T7U7}8l8p8z9Q9R9{:`:g;R<oS(k#p'fQ({#zS+[%o.tS.Z(j(lR3O.['OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{S#q];QQ&q!XQ&r!YQ&t![Q&u!]R1{,nQ'^!hQ+_%uQ-`'`S.](m+bQ2j-_W3S.`.a0l0nQ6a2kW6n3P3R3V4wU8t6o6q6sU9}8v8w8yS:i9|:PQ:t:jR:z:uU!wQ']-]T5c1a5e!Q_OXZ`st!V!Z#d#h%c%k&f&h&o&q&r&t(f,k,p.S1|2P]!pQ!r']-]1a5eT#q];Q%[{OPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rS(y#y#zS.Y(i(j!s<f$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{U$fd)Z,eS(l#p'fU*q%R(s3pU0b*x.f7PQ4w0mQ6o3QQ8w6rR:P8xm!tQ!r!v!y!z']'i'j'k-]-m1a5e5gQ'q!uS(b#g1vS-k'h'tQ/k*XQ/w*dQ2v-nQ4U/lS4_/x0SQ7Z4PS7f4e4gQ9V7[Q9Z7cQ9`7iS:X9[9]S:n:Y:ZS:w:o:pR:}:xQ#wbQ'p!uS(a#g1vS(c#m+QQ+S%dQ+d%vQ+j%|U-j'h'q'tQ.O(bQ/j*XQ/v*dQ/|*gQ0r+eQ1g,XS2s-k-nQ2{.WS4T/k/lS4^/w0SQ4a/{Q4c/}Q5p1hQ6i2vQ7Y4PQ7^4US7b4_4gQ7g4fQ8Z5qS9U7Z7[Q9Y7cQ9^7fQ9a7jQ9o8[Q:V9VS:W9Z9]Q:[9`Q:e9pS:m:X:ZS:v:n:pQ:|:wQ;O:}Q<i<dQ<t<mR<u<nV!wQ']-]%[aOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rS#wz!j!r<c$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{R<i<z%[bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rQ%dj!S%vy!i!u%y%z%{'S'b'c'd'h'r*d+h+i-Q-d-e-l/y0u2g2n2u4dS%|z!jQ+e%wQ,X&aW1h,Y,Z,[,]U5q1i1j1kS8[5r5sQ9p8]!r<d$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{Q<m<yR<n<z%OeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rY#bWZ#W#Z(P!b%hm#h#i#l$x%c%f(Y(d(e(f*U*Y*]+T+U+W,g,}-{.R.S.T.V/e/h2U2|2}4Q6[6mQ,f&l!p<e$Z$n)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{R<h'UU'Y!e%g*VR2e-W%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V,h,k,p-a-i-w-}.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3^5b5m5}6O6R6f8R8X8h8r!r)Z$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{Q,e&lQ0m+aQ3Q._Q6r3UR8x6t!b$Tc#Y%o(O(U(p(u)V)W)[)c+r-p-u-z-|.k.n/X0e2p2w3]3m4r4{6e6j6y8p9{;R!P;_)Y)m-R.t2]2`3b3k3l3q3y6_6z7T7U7}8l8z9Q9R:`:g<o!f$Vc#Y%o(O(U(p(u)S)T)V)W)[)c+r-p-u-z-|.k.n/X0e2p2w3]3m4r4{6e6j6y8p9{;R!T;a)Y)m-R.t2]2`3b3h3i3k3l3q3y6_6z7T7U7}8l8z9Q9R:`:g<o!^$Zc#Y%o(O(U(p(u)[)c+r-p-u-z-|.k.n/X0e2p2w3]3m4r4{6e6j6y8p9{;RQ3}/cz<{)Y)m-R.t2]2`3b3q3y6_6z7T7U7}8l8z9Q9R:`:g<oQ=Q=SR=R=T'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{S$oh$pR3v.|'VgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.|.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{T$kf$qQ$ifS)f$l)jR)r$qT$jf$qT)h$l)j'VhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.|.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{T$oh$pQ$rhR)q$p%[jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8r!s<y$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{#elOPXZst!Z!`!o#S#d#o#{$n%k&h&k&l&o&q&r&t&x'Q'_(z)o+V+a,h,k,p-a._.}/f0a1d1t1u1w1y1|2P2R3U3u5b5m5}6O6R6t8R8X8h!O%Ri$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=R#^(s#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=VQ*}%`Q/Y)zo3p;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<b!O$yi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=RQ*^$zU*g$|*V*jQ+O%aQ/}*h#^<k#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vn<l;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<bQ<p<|Q<q<}Q<r=OR<s=P!O%Ri$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=R#^(s#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vo3p;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<bnoOXst!Z#d%k&o&q&r&t,k,p1|2PS*a${*UQ,y&{Q,z&}R4X/p$|%Si#v$b$c$d$x${%O%Q%]%^%b)u){)}*P*R*U*[*b*r*s+`+c+z+}.^.w/]/e/o/p/r0V0X0d1W1Z1c3T3}4Y4b4m4u4x5l6p7_7h8U8u9T9b9l:O:c:k;g;h;j;k;l;m;p;q;r;s;t;u;|;}<O<P<R<S<V<W<X<Y<Z<[<]<^<a<b<x=Q=R=U=VQ+|&YQ1Y,OQ5[1XR7z5]V*i$|*V*jU*i$|*V*jT5d1a5eU/{*f/f5bS4f0T8RR7j4hQ+d%vQ/|*gQ0r+eQ1g,XQ5p1hQ8Z5qQ9o8[R:e9p!O%Oi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=Rr)}$v)a*O*p+P/n0Z0[3s4V4q7X7k:U<j<v<wS0V*o0W#^;j#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vn;k;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<b!`;|(q)_*W*`.b.e.i/U/Z/c/s0k1V1X3Y4W4[5Z5]6u6x7`7d7m7o9X9_:]:l=S=T`;}3o6{7O7S8{:Q:T:{S<X.d3ZT<Y6}9O!O%Qi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=Rv*P$v)a*Q*o+P/_/n0Z0[3s4V4i4q7X7k:U<j<v<wS0X*p0Y#^;l#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vn;m;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<b!d<O(q)_*W*`.c.d.i/U/Z/c/s0k1V1X3W3Y4W4[5Z5]6u6v6x7`7d7m7o9X9_:]:l=S=Td<P3o6|6}7S8{8|:Q:R:T:{S<Z.e3[T<[7O9PrnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PQ&c!UR,h&lrnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PR&c!UQ,Q&ZR1U+ysnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PQ1b,VS5k1e1fU8T5i5j5nS9k8V8WS:a9j9mQ:q:bR:y:rQ&j!VR,a&fR5w1nS&O|&TR0}+pQ&o!WR,k&pR,q&uT1},p2PR,u&vQ,t&vR2W,uQ'v!{R-q'vSsOtQ#dXT%ns#dQ#OTR'x#OQ#RUR'z#RQ)w$uR/V)wQ#UVR'|#UQ#XWU(S#X(T-xQ(T#YR-x(UQ-U'VR2d-UQ.m(uS3_.m3`R3`.nQ-]']R2h-]Y!rQ']-]1a5eR'g!rQ.x)aR3t.xU#_W%f*UU(Z#_([-yQ([#`R-y(VQ-X'YR2f-Xt`OXst!V!Z#d%k&f&h&o&q&r&t,k,p1|2PS#hZ%cU#r`#h.SR.S(fQ(g#jQ.P(cW.X(g.P2y6kQ2y.QR6k2zQ)j$lR/O)jQ$phR)p$pQ$`cU)]$`-t;eQ-t;RR;e)mQ/i*XW4R/i4S7]9WU4S/j/k/lS7]4T4UR9W7^$Z)|$v(q)_)a*W*`*o*p*z*{+P.d.e.g.h.i/U/Z/_/a/c/n/s0Z0[0k1V1X3W3X3Y3o3s4V4W4[4i4k4q5Z5]6u6v6w6x6}7O7Q7R7S7X7`7d7k7m7o8{8|8}9X9_:Q:R:S:T:U:]:l:{<j<v<w=S=TQ/q*`U4Z/q4]7aQ4]/sR7a4[S*j$|*VR0P*jr*O$v)a*o*p+P/n0Z0[3s4V4q7X7k:U<j<v<w!`.b(q)_*W*`.d.e.i/U/Z/c/s0k1V1X3Y4W4[5Z5]6u6x7`7d7m7o9X9_:]:l=S=TU/`*O.b6{a6{3o6}7O7S8{:Q:T:{Q0W*oQ3Z.dU4j0W3Z9OR9O6}v*Q$v)a*o*p+P/_/n0Z0[3s4V4i4q7X7k:U<j<v<w!d.c(q)_*W*`.d.e.i/U/Z/c/s0k1V1X3W3Y4W4[5Z5]6u6v6x7`7d7m7o9X9_:]:l=S=TU/b*Q.c6|e6|3o6}7O7S8{8|:Q:R:T:{Q0Y*pQ3[.eU4l0Y3[9PR9P7OQ*u%UR0^*uQ4v0kR7n4vQ+X%iR0j+XQ5_1[S7|5_9iR9i7}Q,S&[R1_,SQ5e1aR8P5eQ1m,^S5u1m8_R8_5wQ0x+lW5Q0x5S7t9eQ5S0{Q7t5RR9e7uQ+q&OR1O+qQ2P,pR6V2PYrOXst#dQ&s!ZQ+Z%kQ,j&oQ,l&qQ,m&rQ,o&tQ1z,kS1},p2PR6U1|Q%mpQ&w!_Q&z!aQ&|!bQ'O!cQ'n!uQ+Y%jQ+f%xQ+x&UQ,`&jQ,w&yW-h'h'p'q'tQ-o'lQ0O*iQ0s+gS1p,a,dQ2X,vQ2Y,yQ2Z,zQ2o-gW2q-j-k-n-pQ4y0tQ5V1RQ5Y1VQ5o1gQ5y1rQ6T1{U6d2p2s2vQ6g2tQ7p4zQ7x5XQ7y5ZQ8O5dQ8Y5pQ8`5xS8o6e6iQ8q6hQ9f7vQ9n8ZQ9s8aQ9z8pQ:_9gQ:d9oQ:h9{R:s:eQ%xyQ'a!iQ'l!uU+g%y%z%{Q-O'SU-c'b'c'dS-g'h'rQ/u*dS0t+h+iQ2a-QS2m-d-eQ2t-lQ4`/yQ4z0uQ6`2gQ6c2nQ6h2uR7e4dS$wi<xR*v%VU%Ui%V<xR0]*tQ$viS(q#v+cS)_$b$cQ)a$dQ*W$xS*`${*UQ*o%OQ*p%QQ*z%]Q*{%^Q+P%bQ.d;jQ.e;lQ.g;pQ.h;rQ.i;tQ/U)uS/Z){/]Q/_)}Q/a*PQ/c*RQ/n*[S/s*b/eQ0Z*rQ0[*sh0k+`.^1c3T5l6p8U8u9l:O:c:kQ1V+zQ1X+}Q3W;|Q3X<OQ3Y<RS3o;g;hQ3s.wQ4V/oQ4W/pQ4[/rQ4i0VQ4k0XQ4q0dQ5Z1WQ5]1ZQ6u<VQ6v<XQ6w<ZQ6x<]Q6};kQ7O;mQ7Q;qQ7R;sQ7S;uQ7X3}Q7`4YQ7d4bQ7k4mQ7m4uQ7o4xQ8{<SQ8|;}Q8}<PQ9X7_Q9_7hQ:Q<WQ:R<YQ:S<[Q:T<^Q:U9TQ:]9bQ:l<aQ:{<bQ<j<xQ<v=QQ<w=RQ=S=UR=T=VQ*x%[Q.f;nR7P;onpOXst!Z#d%k&o&q&r&t,k,p1|2PQ!fPS#fZ#oQ&y!`U'e!o5b8RQ'{#SQ(|#{Q)n$nS,d&h&kQ,i&lQ,v&xQ,{'QQ-_'_Q.p(zQ/S)oS0h+V/fQ0n+aQ1x,hQ2k-aQ3R._Q3x.}Q4o0aQ5j1dQ5{1tQ5|1uQ6Q1wQ6S1yQ6X2RQ6s3UQ7V3uQ8W5mQ8d5}Q8e6OQ8g6RQ8y6tQ9m8XR9w8h#YcOPXZst!Z!`!o#d#o#{%k&h&k&l&o&q&r&t&x'Q'_(z+V+a,h,k,p-a._/f0a1d1t1u1w1y1|2P2R3U5b5m5}6O6R6t8R8X8hQ#YWQ#eYQ%ouQ%qvS%sw!gS(O#W(RQ(U#ZQ(p#uQ(u#xQ(}$OQ)O$PQ)P$QQ)Q$RQ)R$SQ)S$TQ)T$UQ)U$VQ)V$WQ)W$XQ)Y$ZQ)[$_Q)^$aQ)c$eW)m$n)o.}3uQ+^%rQ+r&PS-R'U2bQ-p'oS-u(P-wQ-z(XQ-|(`Q.k(tQ.n(vQ.r;PQ.t;SQ.u;TQ.v;WQ/X)yQ0e+RQ2],|Q2`-PQ2p-iQ2w-}Q3].lQ3b;XQ3c;YQ3d;ZQ3e;[Q3f;]Q3g;^Q3h;_Q3i;`Q3j;aQ3k;bQ3l;cQ3m.sQ3n;fQ3q;iQ3r;vQ3y;dQ4r0gQ4{0vQ6_;xQ6e2rQ6j2xQ6y3^Q6z;yQ7T;{Q7U<TQ7}5`Q8l6]Q8p6fQ8z<UQ9Q<_Q9R<`Q9{8rQ:`9hQ:g9yQ;R#SR<o<{R#[WR'W!el!tQ!r!v!y!z']'i'j'k-]-m1a5e5gS'S!e-TS-Q'T'[R2g-ZR(w#xQ!fQT-[']-]]!qQ!r']-]1a5eQ#p]R'f;QR)b$dY!uQ']-]1a5eQ'h!rS'r!v!yS't!z5gS-l'i'jQ-n'kR2u-mT#kZ%cS#jZ%cS%im,gU(c#h#i#lS.Q(d(eQ.U(fQ0i+WQ2z.RU2{.S.T.VS6l2|2}R8s6md#^W#W#Z%f(P(Y*U+T-{/er#gZm#h#i#l%c(d(e(f+W.R.S.T.V2|2}6mS*X$x*]Q/l*YQ1v,gQ2^,}Q4P/hQ6Z2UQ7[4QQ8k6[T<g'U+UV#aW%f*UU#`W%f*US(Q#W(YU(V#Z+T/eS-S'U+UT-v(P-{V'Z!e%g*VQ$lfR)t$qT)i$l)jR3w.|T*Z$x*]T*c${*UQ0l+`Q3P.^Q5i1cQ6q3TQ8V5lQ8v6pQ9j8UQ9|8uQ:b9lQ:j:OQ:r:cR:u:knqOXst!Z#d%k&o&q&r&t,k,p1|2PQ&i!VR,`&ftmOXst!U!V!Z#d%k&f&o&q&r&t,k,p1|2PR,g&lT%jm,gR1],PR,_&dQ&S|R+w&TR+m%}T&m!W&pT&n!W&pT2O,p2P",
  nodeNames: "⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",
  maxTerm: 376,
  context: pAt,
  nodeProps: [
    ["isolate", -8, 5, 6, 14, 34, 36, 48, 50, 52, ""],
    ["group", -26, 9, 17, 19, 65, 204, 208, 212, 213, 215, 218, 221, 231, 233, 239, 241, 243, 245, 248, 254, 260, 262, 264, 266, 268, 270, 271, "Statement", -34, 13, 14, 29, 32, 33, 39, 48, 51, 52, 54, 59, 67, 69, 73, 77, 79, 81, 82, 107, 108, 117, 118, 135, 138, 140, 141, 142, 143, 144, 146, 147, 166, 167, 169, "Expression", -23, 28, 30, 34, 38, 40, 42, 171, 173, 175, 176, 178, 179, 180, 182, 183, 184, 186, 187, 188, 198, 200, 202, 203, "Type", -3, 85, 100, 106, "ClassItem"],
    ["openedBy", 23, "<", 35, "InterpolationStart", 53, "[", 57, "{", 70, "(", 159, "JSXStartCloseTag"],
    ["closedBy", 24, ">", 37, "InterpolationEnd", 47, "]", 58, "}", 71, ")", 164, "JSXEndTag"]
  ],
  propSources: [bAt],
  skippedNodes: [0, 5, 6, 274],
  repeatNodeCount: 37,
  tokenData: "$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Rp(U!b'w0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(S#S$h&j'x0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Rp(U!b'x0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(Q':f$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(U!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Rp(U!bOY%ZYZ&cZq%Zqr<Srs&}st%ZtuCruw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr(r<__WS$h&j(Rp(U!bOY<SYZ&cZr<Srs=^sw<Swx@nx!^<S!^!_Bm!_#O<S#O#P>`#P#o<S#o#pBm#p;'S<S;'S;=`Cl<%lO<S(Q=g]WS$h&j(U!bOY=^YZ&cZw=^wx>`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(U!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(RpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(RpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Rp(U!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l<S%9[C}i$h&j(j%1l(Rp(U!bOY%ZYZ&cZr%Zrs&}st%ZtuCruw%Zwx(rx!Q%Z!Q![Cr![!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr%9[EoP;=`<%lCr07[FRk$h&j(Rp(U!b$[#t(O,2j(`$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr+dHRk$h&j(Rp(U!b$[#tOY%ZYZ&cZr%Zrs&}st%ZtuGvuw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Gv![!^%Z!^!_*g!_!c%Z!c!}Gv!}#O%Z#O#P&c#P#R%Z#R#SGv#S#T%Z#T#oGv#o#p*g#p$g%Z$g;'SGv;'S;=`Iv<%lOGv+dIyP;=`<%lGv07[JPP;=`<%lEr(KWJ_`$h&j(Rp(U!b#m(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWKl_$h&j$P(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,#xLva(u+JY$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sv%ZvwM{wx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWNW`$h&j#y(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At! c_(T';W$h&j(RpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b'l!!i_$h&j(RpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b&z!#mX$h&jOw!#hwx6cx!^!#h!^!_!$Y!_#o!#h#o#p!$Y#p;'S!#h;'S;=`!$r<%lO!#h`!$]TOw!$Ywx7]x;'S!$Y;'S;=`!$l<%lO!$Y`!$oP;=`<%l!$Y&z!$uP;=`<%l!#h'l!%R]$c`$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r!Q!&PZ(RpOY!%zYZ!$YZr!%zrs!$Ysw!%zwx!&rx#O!%z#O#P!$Y#P;'S!%z;'S;=`!']<%lO!%z!Q!&yU$c`(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r!Q!'`P;=`<%l!%z'l!'fP;=`<%l!!b/5|!'t_!i/.^$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&U!)O_!h!Lf$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z-!n!*[b$h&j(Rp(U!b(P%&f#n(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!+d{!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW!+o`$h&j(Rp(U!b#k(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;x!,|`$h&j(Rp(U!bo+4YOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,$U!.Z_!Y+Jf$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!/ec$h&j(Rp(U!b}.2^OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!0p!P!Q%Z!Q![!3Y![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!0ya$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!2O!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!2Z_!X!L^$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!3eg$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!3Y![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S!3Y#S#X%Z#X#Y!4|#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!5Vg$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!6n|}%Z}!O!6n!O!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!6wc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!8_c$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!9uf$h&j(Rp(U!b#l(ChOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcxz!;Zz{#-}{!P!;Z!P!Q#/d!Q!^!;Z!^!_#(i!_!`#7S!`!a#8i!a!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z?O!;fb$h&j(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z>^!<w`$h&j(U!b!U7`OY!<nYZ&cZw!<nwx!=yx!P!<n!P!Q!Eq!Q!^!<n!^!_!Gr!_!}!<n!}#O!KS#O#P!Dy#P#o!<n#o#p!Gr#p;'S!<n;'S;=`!L]<%lO!<n<z!>Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!?Td$h&j!U7`O!^&c!_#W&c#W#X!>|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c<z!C][$h&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#O!CW#O#P!DR#P#Q!=y#Q#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DWX$h&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DvP;=`<%l!CW<z!EOX$h&jOY!=yYZ&cZ!^!=y!^!_!@c!_#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!EnP;=`<%l!=y>^!Ezl$h&j(U!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(U!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(U!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(U!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(U!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!<n#Q#o!KS#o#p!JU#p;'S!KS;'S;=`!LV<%lO!KS>^!LYP;=`<%l!KS>^!L`P;=`<%l!<n=l!Ll`$h&j(Rp!U7`OY!LcYZ&cZr!Lcrs!=ys!P!Lc!P!Q!Mn!Q!^!Lc!^!_# o!_!}!Lc!}#O#%P#O#P!Dy#P#o!Lc#o#p# o#p;'S!Lc;'S;=`#&Y<%lO!Lc=l!Mwl$h&j(Rp!U7`OY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#W(r#W#X!Mn#X#Z(r#Z#[!Mn#[#](r#]#^!Mn#^#a(r#a#b!Mn#b#g(r#g#h!Mn#h#i(r#i#j!Mn#j#k!Mn#k#m(r#m#n!Mn#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r8Q# vZ(Rp!U7`OY# oZr# ors!@cs!P# o!P!Q#!i!Q!}# o!}#O#$R#O#P!Bq#P;'S# o;'S;=`#$y<%lO# o8Q#!pe(Rp!U7`OY)rZr)rs#O)r#P#W)r#W#X#!i#X#Z)r#Z#[#!i#[#])r#]#^#!i#^#a)r#a#b#!i#b#g)r#g#h#!i#h#i)r#i#j#!i#j#k#!i#k#m)r#m#n#!i#n;'S)r;'S;=`*Z<%lO)r8Q#$WX(RpOY#$RZr#$Rrs!Ars#O#$R#O#P!B[#P#Q# o#Q;'S#$R;'S;=`#$s<%lO#$R8Q#$vP;=`<%l#$R8Q#$|P;=`<%l# o=l#%W^$h&j(RpOY#%PYZ&cZr#%Prs!CWs!^#%P!^!_#$R!_#O#%P#O#P!DR#P#Q!Lc#Q#o#%P#o#p#$R#p;'S#%P;'S;=`#&S<%lO#%P=l#&VP;=`<%l#%P=l#&]P;=`<%l!Lc?O#&kn$h&j(Rp(U!b!U7`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#W%Z#W#X#&`#X#Z%Z#Z#[#&`#[#]%Z#]#^#&`#^#a%Z#a#b#&`#b#g%Z#g#h#&`#h#i%Z#i#j#&`#j#k#&`#k#m%Z#m#n#&`#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z9d#(r](Rp(U!b!U7`OY#(iZr#(irs!Grsw#(iwx# ox!P#(i!P!Q#)k!Q!}#(i!}#O#+`#O#P!Bq#P;'S#(i;'S;=`#,`<%lO#(i9d#)th(Rp(U!b!U7`OY*gZr*grs'}sw*gwx)rx#O*g#P#W*g#W#X#)k#X#Z*g#Z#[#)k#[#]*g#]#^#)k#^#a*g#a#b#)k#b#g*g#g#h#)k#h#i*g#i#j#)k#j#k#)k#k#m*g#m#n#)k#n;'S*g;'S;=`+Z<%lO*g9d#+gZ(Rp(U!bOY#+`Zr#+`rs!JUsw#+`wx#$Rx#O#+`#O#P!B[#P#Q#(i#Q;'S#+`;'S;=`#,Y<%lO#+`9d#,]P;=`<%l#+`9d#,cP;=`<%l#(i?O#,o`$h&j(Rp(U!bOY#,fYZ&cZr#,frs!KSsw#,fwx#%Px!^#,f!^!_#+`!_#O#,f#O#P!DR#P#Q!;Z#Q#o#,f#o#p#+`#p;'S#,f;'S;=`#-q<%lO#,f?O#-tP;=`<%l#,f?O#-zP;=`<%l!;Z07[#.[b$h&j(Rp(U!b'y0/l!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z07[#/o_$h&j(Rp(U!bT0/lOY#/dYZ&cZr#/drs#0nsw#/dwx#4Ox!^#/d!^!_#5}!_#O#/d#O#P#1p#P#o#/d#o#p#5}#p;'S#/d;'S;=`#6|<%lO#/d06j#0w]$h&j(U!bT0/lOY#0nYZ&cZw#0nwx#1px!^#0n!^!_#3R!_#O#0n#O#P#1p#P#o#0n#o#p#3R#p;'S#0n;'S;=`#3x<%lO#0n05W#1wX$h&jT0/lOY#1pYZ&cZ!^#1p!^!_#2d!_#o#1p#o#p#2d#p;'S#1p;'S;=`#2{<%lO#1p0/l#2iST0/lOY#2dZ;'S#2d;'S;=`#2u<%lO#2d0/l#2xP;=`<%l#2d05W#3OP;=`<%l#1p01O#3YW(U!bT0/lOY#3RZw#3Rwx#2dx#O#3R#O#P#2d#P;'S#3R;'S;=`#3r<%lO#3R01O#3uP;=`<%l#3R06j#3{P;=`<%l#0n05x#4X]$h&j(RpT0/lOY#4OYZ&cZr#4Ors#1ps!^#4O!^!_#5Q!_#O#4O#O#P#1p#P#o#4O#o#p#5Q#p;'S#4O;'S;=`#5w<%lO#4O00^#5XW(RpT0/lOY#5QZr#5Qrs#2ds#O#5Q#O#P#2d#P;'S#5Q;'S;=`#5q<%lO#5Q00^#5tP;=`<%l#5Q05x#5zP;=`<%l#4O01p#6WY(Rp(U!bT0/lOY#5}Zr#5}rs#3Rsw#5}wx#5Qx#O#5}#O#P#2d#P;'S#5};'S;=`#6v<%lO#5}01p#6yP;=`<%l#5}07[#7PP;=`<%l#/d)3h#7ab$h&j$P(Ch(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;ZAt#8vb$Y#t$h&j(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z'Ad#:Zp$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#U%Z#U#V#?i#V#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#<jk$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-<U(Rp(U!b(y7`OY*gZr*grs'}sw*gwx)rx!P*g!P!Q#MO!Q!^*g!^!_#Mt!_!`$ f!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#MXX$j&j(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El#M}Z#o(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#Np!`#O*g#P;'S*g;'S;=`+Z<%lO*g(El#NyX$P(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El$ oX#p(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g*)x$!ga#]*!Y$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a$#l!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(K[$#w_#h(Cl$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x$%Vag!*r#p(Ch$e#|$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`$&[!`!a$'f!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$&g_#p(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$'qa#o(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`!a$(v!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$)R`#o(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(Kd$*`a(m(Ct$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!a%Z!a!b$+e!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$+p`$h&j#z(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`$,}_!y$Ip$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f$.X_!P0,v$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$/]Z$h&jO!^$0O!^!_$0f!_#i$0O#i#j$0k#j#l$0O#l#m$2^#m#o$0O#o#p$0f#p;'S$0O;'S;=`$4i<%lO$0O(n$0VT_#S$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$0kO_#S(n$0p[$h&jO!Q&c!Q![$1f![!^&c!_!c&c!c!i$1f!i#T&c#T#Z$1f#Z#o&c#o#p$3|#p;'S&c;'S;=`&w<%lO&c(n$1kZ$h&jO!Q&c!Q![$2^![!^&c!_!c&c!c!i$2^!i#T&c#T#Z$2^#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$2cZ$h&jO!Q&c!Q![$3U![!^&c!_!c&c!c!i$3U!i#T&c#T#Z$3U#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$3ZZ$h&jO!Q&c!Q![$0O![!^&c!_!c&c!c!i$0O!i#T&c#T#Z$0O#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$4PR!Q![$4Y!c!i$4Y#T#Z$4Y#S$4]S!Q![$4Y!c!i$4Y#T#Z$4Y#q#r$0f(n$4lP;=`<%l$0O#1[$4z_!V#)l$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$6U`#w(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;p$7c_$h&j(Rp(U!b([+4QOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$8qk$h&j(Rp(U!b(O,2j$^#t(`$I[OY%ZYZ&cZr%Zrs&}st%Ztu$8buw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$8b![!^%Z!^!_*g!_!c%Z!c!}$8b!}#O%Z#O#P&c#P#R%Z#R#S$8b#S#T%Z#T#o$8b#o#p*g#p$g%Z$g;'S$8b;'S;=`$<l<%lO$8b+d$:qk$h&j(Rp(U!b$^#tOY%ZYZ&cZr%Zrs&}st%Ztu$:fuw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$:f![!^%Z!^!_*g!_!c%Z!c!}$:f!}#O%Z#O#P&c#P#R%Z#R#S$:f#S#T%Z#T#o$:f#o#p*g#p$g%Z$g;'S$:f;'S;=`$<f<%lO$:f+d$<iP;=`<%l$:f07[$<oP;=`<%l$8b#Jf$<{X![#Hb(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g,#x$=sa(t+JY$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$+e#q;'S%Z;'S;=`+a<%lO%Z(Kd$?V_!Z(Cds`$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Rp(U!b'w0/l$[#t(O,2j(`$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Rp(U!b'x0/l$[#t(O,2j(`$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",
  tokenizers: [gAt, mAt, yAt, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, vAt, new j4("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(^~~", 141, 335), new j4("j~RQYZXz{^~^O'{~~aP!P!Qd~iO'|~~", 25, 318)],
  topRules: { Script: [0, 7], SingleExpression: [1, 272], SingleClassItem: [2, 273] },
  dialects: { jsx: 0, ts: 14725 },
  dynamicPrecedences: { 77: 1, 79: 1, 91: 1, 167: 1, 196: 1 },
  specialized: [{ term: 322, get: (t) => _At[t] || -1 }, { term: 338, get: (t) => OAt[t] || -1 }, { term: 92, get: (t) => SAt[t] || -1 }],
  tokenPrec: 14749
}), Mme = [
  /* @__PURE__ */ xa("function ${name}(${params}) {\n	${}\n}", {
    label: "function",
    detail: "definition",
    type: "keyword"
  }),
  /* @__PURE__ */ xa("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n	${}\n}", {
    label: "for",
    detail: "loop",
    type: "keyword"
  }),
  /* @__PURE__ */ xa("for (let ${name} of ${collection}) {\n	${}\n}", {
    label: "for",
    detail: "of loop",
    type: "keyword"
  }),
  /* @__PURE__ */ xa("do {\n	${}\n} while (${})", {
    label: "do",
    detail: "loop",
    type: "keyword"
  }),
  /* @__PURE__ */ xa("while (${}) {\n	${}\n}", {
    label: "while",
    detail: "loop",
    type: "keyword"
  }),
  /* @__PURE__ */ xa(`try {
	\${}
} catch (\${error}) {
	\${}
}`, {
    label: "try",
    detail: "/ catch block",
    type: "keyword"
  }),
  /* @__PURE__ */ xa("if (${}) {\n	${}\n}", {
    label: "if",
    detail: "block",
    type: "keyword"
  }),
  /* @__PURE__ */ xa(`if (\${}) {
	\${}
} else {
	\${}
}`, {
    label: "if",
    detail: "/ else block",
    type: "keyword"
  }),
  /* @__PURE__ */ xa(`class \${name} {
	constructor(\${params}) {
		\${}
	}
}`, {
    label: "class",
    detail: "definition",
    type: "keyword"
  }),
  /* @__PURE__ */ xa('import {${names}} from "${module}"\n${}', {
    label: "import",
    detail: "named",
    type: "keyword"
  }),
  /* @__PURE__ */ xa('import ${name} from "${module}"\n${}', {
    label: "import",
    detail: "default",
    type: "keyword"
  })
], wAt = /* @__PURE__ */ Mme.concat([
  /* @__PURE__ */ xa("interface ${name} {\n	${}\n}", {
    label: "interface",
    detail: "definition",
    type: "keyword"
  }),
  /* @__PURE__ */ xa("type ${name} = ${type}", {
    label: "type",
    detail: "definition",
    type: "keyword"
  }),
  /* @__PURE__ */ xa("enum ${name} {\n	${}\n}", {
    label: "enum",
    detail: "definition",
    type: "keyword"
  })
]), KJ = /* @__PURE__ */ new CCt(), Ime = /* @__PURE__ */ new Set([
  "Script",
  "Block",
  "FunctionExpression",
  "FunctionDeclaration",
  "ArrowFunction",
  "MethodDeclaration",
  "ForStatement"
]);
function oy(t) {
  return (e, n) => {
    let r = e.node.getChild("VariableDefinition");
    return r && n(r, t), !0;
  };
}
const CAt = ["FunctionDeclaration"], TAt = {
  FunctionDeclaration: /* @__PURE__ */ oy("function"),
  ClassDeclaration: /* @__PURE__ */ oy("class"),
  ClassExpression: () => !0,
  EnumDeclaration: /* @__PURE__ */ oy("constant"),
  TypeAliasDeclaration: /* @__PURE__ */ oy("type"),
  NamespaceDeclaration: /* @__PURE__ */ oy("namespace"),
  VariableDefinition(t, e) {
    t.matchContext(CAt) || e(t, "variable");
  },
  TypeDefinition(t, e) {
    e(t, "type");
  },
  __proto__: null
};
function Dme(t, e) {
  let n = KJ.get(e);
  if (n)
    return n;
  let r = [], i = !0;
  function a(o, s) {
    let l = t.sliceString(o.from, o.to);
    r.push({ label: l, type: s });
  }
  return e.cursor(Ur.IncludeAnonymous).iterate((o) => {
    if (i)
      i = !1;
    else if (o.name) {
      let s = TAt[o.name];
      if (s && s(o, a) || Ime.has(o.name))
        return !1;
    } else if (o.to - o.from > 8192) {
      for (let s of Dme(t, o.node))
        r.push(s);
      return !1;
    }
  }), KJ.set(e, r), r;
}
const JJ = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, Rme = [
  "TemplateString",
  "String",
  "RegExp",
  "LineComment",
  "BlockComment",
  "VariableDefinition",
  "TypeDefinition",
  "Label",
  "PropertyDefinition",
  "PropertyName",
  "PrivatePropertyDefinition",
  "PrivatePropertyName",
  ".",
  "?."
];
function PAt(t) {
  let e = ni(t.state).resolveInner(t.pos, -1);
  if (Rme.indexOf(e.name) > -1)
    return null;
  let n = e.name == "VariableName" || e.to - e.from < 20 && JJ.test(t.state.sliceDoc(e.from, e.to));
  if (!n && !t.explicit)
    return null;
  let r = [];
  for (let i = e; i; i = i.parent)
    Ime.has(i.name) && (r = r.concat(Dme(t.state.doc, i)));
  return {
    options: r,
    from: n ? e.from : t.pos,
    validFor: JJ
  };
}
const Mh = /* @__PURE__ */ w_.define({
  name: "javascript",
  parser: /* @__PURE__ */ xAt.configure({
    props: [
      /* @__PURE__ */ mB.add({
        IfStatement: /* @__PURE__ */ yb({ except: /^\s*({|else\b)/ }),
        TryStatement: /* @__PURE__ */ yb({ except: /^\s*({|catch\b|finally\b)/ }),
        LabeledStatement: GCt,
        SwitchBody: (t) => {
          let e = t.textAfter, n = /^\s*\}/.test(e), r = /^\s*(case|default)\b/.test(e);
          return t.baseIndent + (n ? 0 : r ? 1 : 2) * t.unit;
        },
        Block: /* @__PURE__ */ HCt({ closing: "}" }),
        ArrowFunction: (t) => t.baseIndent + t.unit,
        "TemplateString BlockComment": () => null,
        "Statement Property": /* @__PURE__ */ yb({ except: /^{/ }),
        JSXElement(t) {
          let e = /^\s*<\//.test(t.textAfter);
          return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
        },
        JSXEscape(t) {
          let e = /\s*\}/.test(t.textAfter);
          return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
        },
        "JSXOpenTag JSXSelfClosingTag"(t) {
          return t.column(t.node.from) + t.unit;
        }
      }),
      /* @__PURE__ */ bB.add({
        "Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType": cge,
        BlockComment(t) {
          return { from: t.from + 2, to: t.to - 2 };
        }
      })
    ]
  }),
  languageData: {
    closeBrackets: { brackets: ["(", "[", "{", "'", '"', "`"] },
    commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
    indentOnInput: /^\s*(?:case |default:|\{|\}|<\/)$/,
    wordChars: "$"
  }
}), kme = {
  test: (t) => /^JSX/.test(t.name),
  facet: /* @__PURE__ */ age({ commentTokens: { block: { open: "{/*", close: "*/}" } } })
}, $At = /* @__PURE__ */ Mh.configure({ dialect: "ts" }, "typescript"), AAt = /* @__PURE__ */ Mh.configure({
  dialect: "jsx",
  props: [/* @__PURE__ */ vB.add((t) => t.isTop ? [kme] : void 0)]
}), EAt = /* @__PURE__ */ Mh.configure({
  dialect: "jsx ts",
  props: [/* @__PURE__ */ vB.add((t) => t.isTop ? [kme] : void 0)]
}, "typescript");
let Lme = (t) => ({ label: t, type: "keyword" });
const Nme = /* @__PURE__ */ "break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Lme), MAt = /* @__PURE__ */ Nme.concat(/* @__PURE__ */ ["declare", "implements", "private", "protected", "public"].map(Lme));
function IAt(t = {}) {
  let e = t.jsx ? t.typescript ? EAt : AAt : t.typescript ? $At : Mh, n = t.typescript ? wAt.concat(MAt) : Mme.concat(Nme);
  return new sge(e, [
    Mh.data.of({
      autocomplete: fPt(Rme, dme(n))
    }),
    Mh.data.of({
      autocomplete: PAt
    }),
    t.jsx ? kAt : []
  ]);
}
function DAt(t) {
  for (; ; ) {
    if (t.name == "JSXOpenTag" || t.name == "JSXSelfClosingTag" || t.name == "JSXFragmentTag")
      return t;
    if (t.name == "JSXEscape" || !t.parent)
      return null;
    t = t.parent;
  }
}
function eee(t, e, n = t.length) {
  for (let r = e == null ? void 0 : e.firstChild; r; r = r.nextSibling)
    if (r.name == "JSXIdentifier" || r.name == "JSXBuiltin" || r.name == "JSXNamespacedName" || r.name == "JSXMemberExpression")
      return t.sliceString(r.from, Math.min(r.to, n));
  return "";
}
const RAt = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), kAt = /* @__PURE__ */ rt.inputHandler.of((t, e, n, r, i) => {
  if ((RAt ? t.composing : t.compositionStarted) || t.state.readOnly || e != n || r != ">" && r != "/" || !Mh.isActiveAt(t.state, e, -1))
    return !1;
  let a = i(), { state: o } = a, s = o.changeByRange((l) => {
    var u;
    let { head: c } = l, f = ni(o).resolveInner(c - 1, -1), d;
    if (f.name == "JSXStartTag" && (f = f.parent), !(o.doc.sliceString(c - 1, c) != r || f.name == "JSXAttributeValue" && f.to > c)) {
      if (r == ">" && f.name == "JSXFragmentTag")
        return { range: l, changes: { from: c, insert: "</>" } };
      if (r == "/" && f.name == "JSXStartCloseTag") {
        let h = f.parent, p = h.parent;
        if (p && h.from == c - 2 && ((d = eee(o.doc, p.firstChild, c)) || ((u = p.firstChild) === null || u === void 0 ? void 0 : u.name) == "JSXFragmentTag")) {
          let v = `${d}>`;
          return { range: De.cursor(c + v.length, -1), changes: { from: c, insert: v } };
        }
      } else if (r == ">") {
        let h = DAt(f);
        if (h && h.name == "JSXOpenTag" && !/^\/?>|^<\//.test(o.doc.sliceString(c, c + 2)) && (d = eee(o.doc, h, c)))
          return { range: l, changes: { from: c, insert: `</${d}>` } };
      }
    }
    return { range: l };
  });
  return s.changes.empty ? !1 : (t.dispatch([
    a,
    o.update(s, { userEvent: "input.complete", scrollIntoView: !0 })
  ]), !0);
}), LAt = pB({
  String: ce.string,
  Number: ce.number,
  "True False": ce.bool,
  PropertyName: ce.propertyName,
  Null: ce.null,
  ",": ce.separator,
  "[ ]": ce.squareBracket,
  "{ }": ce.brace
}), NAt = I_.deserialize({
  version: 14,
  states: "$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",
  stateData: "#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",
  goto: "!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",
  nodeNames: "⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",
  maxTerm: 25,
  nodeProps: [
    ["isolate", -2, 6, 11, ""],
    ["openedBy", 7, "{", 12, "["],
    ["closedBy", 8, "}", 13, "]"]
  ],
  propSources: [LAt],
  skippedNodes: [0],
  repeatNodeCount: 2,
  tokenData: "(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",
  tokenizers: [0],
  topRules: { JsonText: [0, 1] },
  tokenPrec: 0
}), BAt = /* @__PURE__ */ w_.define({
  name: "json",
  parser: /* @__PURE__ */ NAt.configure({
    props: [
      /* @__PURE__ */ mB.add({
        Object: /* @__PURE__ */ yb({ except: /^\s*\}/ }),
        Array: /* @__PURE__ */ yb({ except: /^\s*\]/ })
      }),
      /* @__PURE__ */ bB.add({
        "Object Array": cge
      })
    ]
  }),
  languageData: {
    closeBrackets: { brackets: ["[", "{", '"'] },
    indentOnInput: /^\s*[\}\]]$/
  }
});
function zAt() {
  return new sge(BAt);
}
var Bme = { exports: {} }, sy = {}, Ex = { exports: {} }, PD = {}, $D = {}, tee;
function RB() {
  if (tee) return $D;
  tee = 1;
  function t(r) {
    this.__parent = r, this.__character_count = 0, this.__indent_count = -1, this.__alignment_count = 0, this.__wrap_point_index = 0, this.__wrap_point_character_count = 0, this.__wrap_point_indent_count = -1, this.__wrap_point_alignment_count = 0, this.__items = [];
  }
  t.prototype.clone_empty = function() {
    var r = new t(this.__parent);
    return r.set_indent(this.__indent_count, this.__alignment_count), r;
  }, t.prototype.item = function(r) {
    return r < 0 ? this.__items[this.__items.length + r] : this.__items[r];
  }, t.prototype.has_match = function(r) {
    for (var i = this.__items.length - 1; i >= 0; i--)
      if (this.__items[i].match(r))
        return !0;
    return !1;
  }, t.prototype.set_indent = function(r, i) {
    this.is_empty() && (this.__indent_count = r || 0, this.__alignment_count = i || 0, this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count));
  }, t.prototype._set_wrap_point = function() {
    this.__parent.wrap_line_length && (this.__wrap_point_index = this.__items.length, this.__wrap_point_character_count = this.__character_count, this.__wrap_point_indent_count = this.__parent.next_line.__indent_count, this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count);
  }, t.prototype._should_wrap = function() {
    return this.__wrap_point_index && this.__character_count > this.__parent.wrap_line_length && this.__wrap_point_character_count > this.__parent.next_line.__character_count;
  }, t.prototype._allow_wrap = function() {
    if (this._should_wrap()) {
      this.__parent.add_new_line();
      var r = this.__parent.current_line;
      return r.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count), r.__items = this.__items.slice(this.__wrap_point_index), this.__items = this.__items.slice(0, this.__wrap_point_index), r.__character_count += this.__character_count - this.__wrap_point_character_count, this.__character_count = this.__wrap_point_character_count, r.__items[0] === " " && (r.__items.splice(0, 1), r.__character_count -= 1), !0;
    }
    return !1;
  }, t.prototype.is_empty = function() {
    return this.__items.length === 0;
  }, t.prototype.last = function() {
    return this.is_empty() ? null : this.__items[this.__items.length - 1];
  }, t.prototype.push = function(r) {
    this.__items.push(r);
    var i = r.lastIndexOf(`
`);
    i !== -1 ? this.__character_count = r.length - i : this.__character_count += r.length;
  }, t.prototype.pop = function() {
    var r = null;
    return this.is_empty() || (r = this.__items.pop(), this.__character_count -= r.length), r;
  }, t.prototype._remove_indent = function() {
    this.__indent_count > 0 && (this.__indent_count -= 1, this.__character_count -= this.__parent.indent_size);
  }, t.prototype._remove_wrap_indent = function() {
    this.__wrap_point_indent_count > 0 && (this.__wrap_point_indent_count -= 1);
  }, t.prototype.trim = function() {
    for (; this.last() === " "; )
      this.__items.pop(), this.__character_count -= 1;
  }, t.prototype.toString = function() {
    var r = "";
    return this.is_empty() ? this.__parent.indent_empty_lines && (r = this.__parent.get_indent_string(this.__indent_count)) : (r = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count), r += this.__items.join("")), r;
  };
  function e(r, i) {
    this.__cache = [""], this.__indent_size = r.indent_size, this.__indent_string = r.indent_char, r.indent_with_tabs || (this.__indent_string = new Array(r.indent_size + 1).join(r.indent_char)), i = i || "", r.indent_level > 0 && (i = new Array(r.indent_level + 1).join(this.__indent_string)), this.__base_string = i, this.__base_string_length = i.length;
  }
  e.prototype.get_indent_size = function(r, i) {
    var a = this.__base_string_length;
    return i = i || 0, r < 0 && (a = 0), a += r * this.__indent_size, a += i, a;
  }, e.prototype.get_indent_string = function(r, i) {
    var a = this.__base_string;
    return i = i || 0, r < 0 && (r = 0, a = ""), i += r * this.__indent_size, this.__ensure_cache(i), a += this.__cache[i], a;
  }, e.prototype.__ensure_cache = function(r) {
    for (; r >= this.__cache.length; )
      this.__add_column();
  }, e.prototype.__add_column = function() {
    var r = this.__cache.length, i = 0, a = "";
    this.__indent_size && r >= this.__indent_size && (i = Math.floor(r / this.__indent_size), r -= i * this.__indent_size, a = new Array(i + 1).join(this.__indent_string)), r && (a += new Array(r + 1).join(" ")), this.__cache.push(a);
  };
  function n(r, i) {
    this.__indent_cache = new e(r, i), this.raw = !1, this._end_with_newline = r.end_with_newline, this.indent_size = r.indent_size, this.wrap_line_length = r.wrap_line_length, this.indent_empty_lines = r.indent_empty_lines, this.__lines = [], this.previous_line = null, this.current_line = null, this.next_line = new t(this), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = !1, this.__add_outputline();
  }
  return n.prototype.__add_outputline = function() {
    this.previous_line = this.current_line, this.current_line = this.next_line.clone_empty(), this.__lines.push(this.current_line);
  }, n.prototype.get_line_number = function() {
    return this.__lines.length;
  }, n.prototype.get_indent_string = function(r, i) {
    return this.__indent_cache.get_indent_string(r, i);
  }, n.prototype.get_indent_size = function(r, i) {
    return this.__indent_cache.get_indent_size(r, i);
  }, n.prototype.is_empty = function() {
    return !this.previous_line && this.current_line.is_empty();
  }, n.prototype.add_new_line = function(r) {
    return this.is_empty() || !r && this.just_added_newline() ? !1 : (this.raw || this.__add_outputline(), !0);
  }, n.prototype.get_code = function(r) {
    this.trim(!0);
    var i = this.current_line.pop();
    i && (i[i.length - 1] === `
` && (i = i.replace(/\n+$/g, "")), this.current_line.push(i)), this._end_with_newline && this.__add_outputline();
    var a = this.__lines.join(`
`);
    return r !== `
` && (a = a.replace(/[\n]/g, r)), a;
  }, n.prototype.set_wrap_point = function() {
    this.current_line._set_wrap_point();
  }, n.prototype.set_indent = function(r, i) {
    return r = r || 0, i = i || 0, this.next_line.set_indent(r, i), this.__lines.length > 1 ? (this.current_line.set_indent(r, i), !0) : (this.current_line.set_indent(), !1);
  }, n.prototype.add_raw_token = function(r) {
    for (var i = 0; i < r.newlines; i++)
      this.__add_outputline();
    this.current_line.set_indent(-1), this.current_line.push(r.whitespace_before), this.current_line.push(r.text), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = !1;
  }, n.prototype.add_token = function(r) {
    this.__add_space_before_token(), this.current_line.push(r), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = this.current_line._allow_wrap();
  }, n.prototype.__add_space_before_token = function() {
    this.space_before_token && !this.just_added_newline() && (this.non_breaking_space || this.set_wrap_point(), this.current_line.push(" "));
  }, n.prototype.remove_indent = function(r) {
    for (var i = this.__lines.length; r < i; )
      this.__lines[r]._remove_indent(), r++;
    this.current_line._remove_wrap_indent();
  }, n.prototype.trim = function(r) {
    for (r = r === void 0 ? !1 : r, this.current_line.trim(); r && this.__lines.length > 1 && this.current_line.is_empty(); )
      this.__lines.pop(), this.current_line = this.__lines[this.__lines.length - 1], this.current_line.trim();
    this.previous_line = this.__lines.length > 1 ? this.__lines[this.__lines.length - 2] : null;
  }, n.prototype.just_added_newline = function() {
    return this.current_line.is_empty();
  }, n.prototype.just_added_blankline = function() {
    return this.is_empty() || this.current_line.is_empty() && this.previous_line.is_empty();
  }, n.prototype.ensure_empty_line_above = function(r, i) {
    for (var a = this.__lines.length - 2; a >= 0; ) {
      var o = this.__lines[a];
      if (o.is_empty())
        break;
      if (o.item(0).indexOf(r) !== 0 && o.item(-1) !== i) {
        this.__lines.splice(a + 1, 0, new t(this)), this.previous_line = this.__lines[this.__lines.length - 2];
        break;
      }
      a--;
    }
  }, $D.Output = n, $D;
}
var AD = {}, nee;
function zme() {
  if (nee) return AD;
  nee = 1;
  function t(e, n, r, i) {
    this.type = e, this.text = n, this.comments_before = null, this.newlines = r || 0, this.whitespace_before = i || "", this.parent = null, this.next = null, this.previous = null, this.opened = null, this.closed = null, this.directives = null;
  }
  return AD.Token = t, AD;
}
var ED = {}, ree;
function Vme() {
  return ree || (ree = 1, function(t) {
    var e = "\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a", n = "\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a", r = "\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc", i = "\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f", a = "\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}", o = "(?:" + a + "|[" + e + r + "])", s = "(?:" + a + "|[" + n + r + i + "])*";
    t.identifier = new RegExp(o + s, "g"), t.identifierStart = new RegExp(o), t.identifierMatch = new RegExp("(?:" + a + "|[" + n + r + i + "])+"), t.newline = /[\n\r\u2028\u2029]/, t.lineBreak = new RegExp(`\r
|` + t.newline.source), t.allLineBreaks = new RegExp(t.lineBreak.source, "g");
  }(ED)), ED;
}
var MD = {}, ly = {}, iee;
function kB() {
  if (iee) return ly;
  iee = 1;
  function t(r, i) {
    this.raw_options = e(r, i), this.disabled = this._get_boolean("disabled"), this.eol = this._get_characters("eol", "auto"), this.end_with_newline = this._get_boolean("end_with_newline"), this.indent_size = this._get_number("indent_size", 4), this.indent_char = this._get_characters("indent_char", " "), this.indent_level = this._get_number("indent_level"), this.preserve_newlines = this._get_boolean("preserve_newlines", !0), this.max_preserve_newlines = this._get_number("max_preserve_newlines", 32786), this.preserve_newlines || (this.max_preserve_newlines = 0), this.indent_with_tabs = this._get_boolean("indent_with_tabs", this.indent_char === "	"), this.indent_with_tabs && (this.indent_char = "	", this.indent_size === 1 && (this.indent_size = 4)), this.wrap_line_length = this._get_number("wrap_line_length", this._get_number("max_char")), this.indent_empty_lines = this._get_boolean("indent_empty_lines"), this.templating = this._get_selection_list("templating", ["auto", "none", "angular", "django", "erb", "handlebars", "php", "smarty"], ["auto"]);
  }
  t.prototype._get_array = function(r, i) {
    var a = this.raw_options[r], o = i || [];
    return typeof a == "object" ? a !== null && typeof a.concat == "function" && (o = a.concat()) : typeof a == "string" && (o = a.split(/[^a-zA-Z0-9_\/\-]+/)), o;
  }, t.prototype._get_boolean = function(r, i) {
    var a = this.raw_options[r], o = a === void 0 ? !!i : !!a;
    return o;
  }, t.prototype._get_characters = function(r, i) {
    var a = this.raw_options[r], o = i || "";
    return typeof a == "string" && (o = a.replace(/\\r/, "\r").replace(/\\n/, `
`).replace(/\\t/, "	")), o;
  }, t.prototype._get_number = function(r, i) {
    var a = this.raw_options[r];
    i = parseInt(i, 10), isNaN(i) && (i = 0);
    var o = parseInt(a, 10);
    return isNaN(o) && (o = i), o;
  }, t.prototype._get_selection = function(r, i, a) {
    var o = this._get_selection_list(r, i, a);
    if (o.length !== 1)
      throw new Error(
        "Invalid Option Value: The option '" + r + `' can only be one of the following values:
` + i + `
You passed in: '` + this.raw_options[r] + "'"
      );
    return o[0];
  }, t.prototype._get_selection_list = function(r, i, a) {
    if (!i || i.length === 0)
      throw new Error("Selection list cannot be empty.");
    if (a = a || [i[0]], !this._is_valid_selection(a, i))
      throw new Error("Invalid Default Value!");
    var o = this._get_array(r, a);
    if (!this._is_valid_selection(o, i))
      throw new Error(
        "Invalid Option Value: The option '" + r + `' can contain only the following values:
` + i + `
You passed in: '` + this.raw_options[r] + "'"
      );
    return o;
  }, t.prototype._is_valid_selection = function(r, i) {
    return r.length && i.length && !r.some(function(a) {
      return i.indexOf(a) === -1;
    });
  };
  function e(r, i) {
    var a = {};
    r = n(r);
    var o;
    for (o in r)
      o !== i && (a[o] = r[o]);
    if (i && r[i])
      for (o in r[i])
        a[o] = r[i][o];
    return a;
  }
  function n(r) {
    var i = {}, a;
    for (a in r) {
      var o = a.replace(/-/g, "_");
      i[o] = r[a];
    }
    return i;
  }
  return ly.Options = t, ly.normalizeOpts = n, ly.mergeOpts = e, ly;
}
var aee;
function Fme() {
  if (aee) return MD;
  aee = 1;
  var t = kB().Options, e = ["before-newline", "after-newline", "preserve-newline"];
  function n(r) {
    t.call(this, r, "js");
    var i = this.raw_options.brace_style || null;
    i === "expand-strict" ? this.raw_options.brace_style = "expand" : i === "collapse-preserve-inline" ? this.raw_options.brace_style = "collapse,preserve-inline" : this.raw_options.braces_on_own_line !== void 0 && (this.raw_options.brace_style = this.raw_options.braces_on_own_line ? "expand" : "collapse");
    var a = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
    this.brace_preserve_inline = !1, this.brace_style = "collapse";
    for (var o = 0; o < a.length; o++)
      a[o] === "preserve-inline" ? this.brace_preserve_inline = !0 : this.brace_style = a[o];
    this.unindent_chained_methods = this._get_boolean("unindent_chained_methods"), this.break_chained_methods = this._get_boolean("break_chained_methods"), this.space_in_paren = this._get_boolean("space_in_paren"), this.space_in_empty_paren = this._get_boolean("space_in_empty_paren"), this.jslint_happy = this._get_boolean("jslint_happy"), this.space_after_anon_function = this._get_boolean("space_after_anon_function"), this.space_after_named_function = this._get_boolean("space_after_named_function"), this.keep_array_indentation = this._get_boolean("keep_array_indentation"), this.space_before_conditional = this._get_boolean("space_before_conditional", !0), this.unescape_strings = this._get_boolean("unescape_strings"), this.e4x = this._get_boolean("e4x"), this.comma_first = this._get_boolean("comma_first"), this.operator_position = this._get_selection("operator_position", e), this.test_output_raw = this._get_boolean("test_output_raw"), this.jslint_happy && (this.space_after_anon_function = !0);
  }
  return n.prototype = new t(), MD.Options = n, MD;
}
var gv = {}, ID = {}, oee;
function LB() {
  if (oee) return ID;
  oee = 1;
  var t = RegExp.prototype.hasOwnProperty("sticky");
  function e(n) {
    this.__input = n || "", this.__input_length = this.__input.length, this.__position = 0;
  }
  return e.prototype.restart = function() {
    this.__position = 0;
  }, e.prototype.back = function() {
    this.__position > 0 && (this.__position -= 1);
  }, e.prototype.hasNext = function() {
    return this.__position < this.__input_length;
  }, e.prototype.next = function() {
    var n = null;
    return this.hasNext() && (n = this.__input.charAt(this.__position), this.__position += 1), n;
  }, e.prototype.peek = function(n) {
    var r = null;
    return n = n || 0, n += this.__position, n >= 0 && n < this.__input_length && (r = this.__input.charAt(n)), r;
  }, e.prototype.__match = function(n, r) {
    n.lastIndex = r;
    var i = n.exec(this.__input);
    return i && !(t && n.sticky) && i.index !== r && (i = null), i;
  }, e.prototype.test = function(n, r) {
    return r = r || 0, r += this.__position, r >= 0 && r < this.__input_length ? !!this.__match(n, r) : !1;
  }, e.prototype.testChar = function(n, r) {
    var i = this.peek(r);
    return n.lastIndex = 0, i !== null && n.test(i);
  }, e.prototype.match = function(n) {
    var r = this.__match(n, this.__position);
    return r ? this.__position += r[0].length : r = null, r;
  }, e.prototype.read = function(n, r, i) {
    var a = "", o;
    return n && (o = this.match(n), o && (a += o[0])), r && (o || !n) && (a += this.readUntil(r, i)), a;
  }, e.prototype.readUntil = function(n, r) {
    var i = "", a = this.__position;
    n.lastIndex = this.__position;
    var o = n.exec(this.__input);
    return o ? (a = o.index, r && (a += o[0].length)) : a = this.__input_length, i = this.__input.substring(this.__position, a), this.__position = a, i;
  }, e.prototype.readUntilAfter = function(n) {
    return this.readUntil(n, !0);
  }, e.prototype.get_regexp = function(n, r) {
    var i = null, a = "g";
    return r && t && (a = "y"), typeof n == "string" && n !== "" ? i = new RegExp(n, a) : n && (i = new RegExp(n.source, a)), i;
  }, e.prototype.get_literal_regexp = function(n) {
    return RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"));
  }, e.prototype.peekUntilAfter = function(n) {
    var r = this.__position, i = this.readUntilAfter(n);
    return this.__position = r, i;
  }, e.prototype.lookBack = function(n) {
    var r = this.__position - 1;
    return r >= n.length && this.__input.substring(r - n.length, r).toLowerCase() === n;
  }, ID.InputScanner = e, ID;
}
var Mx = {}, DD = {}, see;
function VAt() {
  if (see) return DD;
  see = 1;
  function t(e) {
    this.__tokens = [], this.__tokens_length = this.__tokens.length, this.__position = 0, this.__parent_token = e;
  }
  return t.prototype.restart = function() {
    this.__position = 0;
  }, t.prototype.isEmpty = function() {
    return this.__tokens_length === 0;
  }, t.prototype.hasNext = function() {
    return this.__position < this.__tokens_length;
  }, t.prototype.next = function() {
    var e = null;
    return this.hasNext() && (e = this.__tokens[this.__position], this.__position += 1), e;
  }, t.prototype.peek = function(e) {
    var n = null;
    return e = e || 0, e += this.__position, e >= 0 && e < this.__tokens_length && (n = this.__tokens[e]), n;
  }, t.prototype.add = function(e) {
    this.__parent_token && (e.parent = this.__parent_token), this.__tokens.push(e), this.__tokens_length += 1;
  }, DD.TokenStream = t, DD;
}
var RD = {}, kD = {}, lee;
function v$() {
  if (lee) return kD;
  lee = 1;
  function t(e, n) {
    this._input = e, this._starting_pattern = null, this._match_pattern = null, this._until_pattern = null, this._until_after = !1, n && (this._starting_pattern = this._input.get_regexp(n._starting_pattern, !0), this._match_pattern = this._input.get_regexp(n._match_pattern, !0), this._until_pattern = this._input.get_regexp(n._until_pattern), this._until_after = n._until_after);
  }
  return t.prototype.read = function() {
    var e = this._input.read(this._starting_pattern);
    return (!this._starting_pattern || e) && (e += this._input.read(this._match_pattern, this._until_pattern, this._until_after)), e;
  }, t.prototype.read_match = function() {
    return this._input.match(this._match_pattern);
  }, t.prototype.until_after = function(e) {
    var n = this._create();
    return n._until_after = !0, n._until_pattern = this._input.get_regexp(e), n._update(), n;
  }, t.prototype.until = function(e) {
    var n = this._create();
    return n._until_after = !1, n._until_pattern = this._input.get_regexp(e), n._update(), n;
  }, t.prototype.starting_with = function(e) {
    var n = this._create();
    return n._starting_pattern = this._input.get_regexp(e, !0), n._update(), n;
  }, t.prototype.matching = function(e) {
    var n = this._create();
    return n._match_pattern = this._input.get_regexp(e, !0), n._update(), n;
  }, t.prototype._create = function() {
    return new t(this._input, this);
  }, t.prototype._update = function() {
  }, kD.Pattern = t, kD;
}
var uee;
function FAt() {
  if (uee) return RD;
  uee = 1;
  var t = v$().Pattern;
  function e(n, r) {
    t.call(this, n, r), r ? this._line_regexp = this._input.get_regexp(r._line_regexp) : this.__set_whitespace_patterns("", ""), this.newline_count = 0, this.whitespace_before_token = "";
  }
  return e.prototype = new t(), e.prototype.__set_whitespace_patterns = function(n, r) {
    n += "\\t ", r += "\\n\\r", this._match_pattern = this._input.get_regexp(
      "[" + n + r + "]+",
      !0
    ), this._newline_regexp = this._input.get_regexp(
      "\\r\\n|[" + r + "]"
    );
  }, e.prototype.read = function() {
    this.newline_count = 0, this.whitespace_before_token = "";
    var n = this._input.read(this._match_pattern);
    if (n === " ")
      this.whitespace_before_token = " ";
    else if (n) {
      var r = this.__split(this._newline_regexp, n);
      this.newline_count = r.length - 1, this.whitespace_before_token = r[this.newline_count];
    }
    return n;
  }, e.prototype.matching = function(n, r) {
    var i = this._create();
    return i.__set_whitespace_patterns(n, r), i._update(), i;
  }, e.prototype._create = function() {
    return new e(this._input, this);
  }, e.prototype.__split = function(n, r) {
    n.lastIndex = 0;
    for (var i = 0, a = [], o = n.exec(r); o; )
      a.push(r.substring(i, o.index)), i = o.index + o[0].length, o = n.exec(r);
    return i < r.length ? a.push(r.substring(i, r.length)) : a.push(""), a;
  }, RD.WhitespacePattern = e, RD;
}
var cee;
function qT() {
  if (cee) return Mx;
  cee = 1;
  var t = LB().InputScanner, e = zme().Token, n = VAt().TokenStream, r = FAt().WhitespacePattern, i = {
    START: "TK_START",
    RAW: "TK_RAW",
    EOF: "TK_EOF"
  }, a = function(o, s) {
    this._input = new t(o), this._options = s || {}, this.__tokens = null, this._patterns = {}, this._patterns.whitespace = new r(this._input);
  };
  return a.prototype.tokenize = function() {
    this._input.restart(), this.__tokens = new n(), this._reset();
    for (var o, s = new e(i.START, ""), l = null, u = [], c = new n(); s.type !== i.EOF; ) {
      for (o = this._get_next_token(s, l); this._is_comment(o); )
        c.add(o), o = this._get_next_token(s, l);
      c.isEmpty() || (o.comments_before = c, c = new n()), o.parent = l, this._is_opening(o) ? (u.push(l), l = o) : l && this._is_closing(o, l) && (o.opened = l, l.closed = o, l = u.pop(), o.parent = l), o.previous = s, s.next = o, this.__tokens.add(o), s = o;
    }
    return this.__tokens;
  }, a.prototype._is_first_token = function() {
    return this.__tokens.isEmpty();
  }, a.prototype._reset = function() {
  }, a.prototype._get_next_token = function(o, s) {
    this._readWhitespace();
    var l = this._input.read(/.+/g);
    return l ? this._create_token(i.RAW, l) : this._create_token(i.EOF, "");
  }, a.prototype._is_comment = function(o) {
    return !1;
  }, a.prototype._is_opening = function(o) {
    return !1;
  }, a.prototype._is_closing = function(o, s) {
    return !1;
  }, a.prototype._create_token = function(o, s) {
    var l = new e(
      o,
      s,
      this._patterns.whitespace.newline_count,
      this._patterns.whitespace.whitespace_before_token
    );
    return l;
  }, a.prototype._readWhitespace = function() {
    return this._patterns.whitespace.read();
  }, Mx.Tokenizer = a, Mx.TOKEN = i, Mx;
}
var LD = {}, fee;
function NB() {
  if (fee) return LD;
  fee = 1;
  function t(e, n) {
    e = typeof e == "string" ? e : e.source, n = typeof n == "string" ? n : n.source, this.__directives_block_pattern = new RegExp(e + / beautify( \w+[:]\w+)+ /.source + n, "g"), this.__directive_pattern = / (\w+)[:](\w+)/g, this.__directives_end_ignore_pattern = new RegExp(e + /\sbeautify\signore:end\s/.source + n, "g");
  }
  return t.prototype.get_directives = function(e) {
    if (!e.match(this.__directives_block_pattern))
      return null;
    var n = {};
    this.__directive_pattern.lastIndex = 0;
    for (var r = this.__directive_pattern.exec(e); r; )
      n[r[1]] = r[2], r = this.__directive_pattern.exec(e);
    return n;
  }, t.prototype.readIgnored = function(e) {
    return e.readUntilAfter(this.__directives_end_ignore_pattern);
  }, LD.Directives = t, LD;
}
var ND = {}, dee;
function Wme() {
  if (dee) return ND;
  dee = 1;
  var t = v$().Pattern, e = {
    django: !1,
    erb: !1,
    handlebars: !1,
    php: !1,
    smarty: !1,
    angular: !1
  };
  function n(r, i) {
    t.call(this, r, i), this.__template_pattern = null, this._disabled = Object.assign({}, e), this._excluded = Object.assign({}, e), i && (this.__template_pattern = this._input.get_regexp(i.__template_pattern), this._excluded = Object.assign(this._excluded, i._excluded), this._disabled = Object.assign(this._disabled, i._disabled));
    var a = new t(r);
    this.__patterns = {
      handlebars_comment: a.starting_with(/{{!--/).until_after(/--}}/),
      handlebars_unescaped: a.starting_with(/{{{/).until_after(/}}}/),
      handlebars: a.starting_with(/{{/).until_after(/}}/),
      php: a.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),
      erb: a.starting_with(/<%[^%]/).until_after(/[^%]%>/),
      // django coflicts with handlebars a bit.
      django: a.starting_with(/{%/).until_after(/%}/),
      django_value: a.starting_with(/{{/).until_after(/}}/),
      django_comment: a.starting_with(/{#/).until_after(/#}/),
      smarty: a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),
      smarty_comment: a.starting_with(/{\*/).until_after(/\*}/),
      smarty_literal: a.starting_with(/{literal}/).until_after(/{\/literal}/)
    };
  }
  return n.prototype = new t(), n.prototype._create = function() {
    return new n(this._input, this);
  }, n.prototype._update = function() {
    this.__set_templated_pattern();
  }, n.prototype.disable = function(r) {
    var i = this._create();
    return i._disabled[r] = !0, i._update(), i;
  }, n.prototype.read_options = function(r) {
    var i = this._create();
    for (var a in e)
      i._disabled[a] = r.templating.indexOf(a) === -1;
    return i._update(), i;
  }, n.prototype.exclude = function(r) {
    var i = this._create();
    return i._excluded[r] = !0, i._update(), i;
  }, n.prototype.read = function() {
    var r = "";
    this._match_pattern ? r = this._input.read(this._starting_pattern) : r = this._input.read(this._starting_pattern, this.__template_pattern);
    for (var i = this._read_template(); i; )
      this._match_pattern ? i += this._input.read(this._match_pattern) : i += this._input.readUntil(this.__template_pattern), r += i, i = this._read_template();
    return this._until_after && (r += this._input.readUntilAfter(this._until_pattern)), r;
  }, n.prototype.__set_templated_pattern = function() {
    var r = [];
    this._disabled.php || r.push(this.__patterns.php._starting_pattern.source), this._disabled.handlebars || r.push(this.__patterns.handlebars._starting_pattern.source), this._disabled.erb || r.push(this.__patterns.erb._starting_pattern.source), this._disabled.django || (r.push(this.__patterns.django._starting_pattern.source), r.push(this.__patterns.django_value._starting_pattern.source), r.push(this.__patterns.django_comment._starting_pattern.source)), this._disabled.smarty || r.push(this.__patterns.smarty._starting_pattern.source), this._until_pattern && r.push(this._until_pattern.source), this.__template_pattern = this._input.get_regexp("(?:" + r.join("|") + ")");
  }, n.prototype._read_template = function() {
    var r = "", i = this._input.peek();
    if (i === "<") {
      var a = this._input.peek(1);
      !this._disabled.php && !this._excluded.php && a === "?" && (r = r || this.__patterns.php.read()), !this._disabled.erb && !this._excluded.erb && a === "%" && (r = r || this.__patterns.erb.read());
    } else i === "{" && (!this._disabled.handlebars && !this._excluded.handlebars && (r = r || this.__patterns.handlebars_comment.read(), r = r || this.__patterns.handlebars_unescaped.read(), r = r || this.__patterns.handlebars.read()), this._disabled.django || (!this._excluded.django && !this._excluded.handlebars && (r = r || this.__patterns.django_value.read()), this._excluded.django || (r = r || this.__patterns.django_comment.read(), r = r || this.__patterns.django.read())), this._disabled.smarty || this._disabled.django && this._disabled.handlebars && (r = r || this.__patterns.smarty_comment.read(), r = r || this.__patterns.smarty_literal.read(), r = r || this.__patterns.smarty.read()));
    return r;
  }, ND.TemplatablePattern = n, ND;
}
var hee;
function Ix() {
  if (hee) return gv;
  hee = 1;
  var t = LB().InputScanner, e = qT().Tokenizer, n = qT().TOKEN, r = NB().Directives, i = Vme(), a = v$().Pattern, o = Wme().TemplatablePattern;
  function s(x, C) {
    return C.indexOf(x) !== -1;
  }
  var l = {
    START_EXPR: "TK_START_EXPR",
    END_EXPR: "TK_END_EXPR",
    START_BLOCK: "TK_START_BLOCK",
    END_BLOCK: "TK_END_BLOCK",
    WORD: "TK_WORD",
    RESERVED: "TK_RESERVED",
    SEMICOLON: "TK_SEMICOLON",
    STRING: "TK_STRING",
    EQUALS: "TK_EQUALS",
    OPERATOR: "TK_OPERATOR",
    COMMA: "TK_COMMA",
    BLOCK_COMMENT: "TK_BLOCK_COMMENT",
    COMMENT: "TK_COMMENT",
    DOT: "TK_DOT",
    UNKNOWN: "TK_UNKNOWN",
    START: n.START,
    RAW: n.RAW,
    EOF: n.EOF
  }, u = new r(/\/\*/, /\*\//), c = /0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/, f = /[0-9]/, d = /[^\d\.]/, h = ">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "), p = ">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";
  p = p.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"), p = "\\?\\.(?!\\d) " + p, p = p.replace(/ /g, "|");
  var v = new RegExp(p), g = "continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","), m = g.concat(["do", "in", "of", "else", "get", "set", "new", "catch", "finally", "typeof", "yield", "async", "await", "from", "as", "class", "extends"]), y = new RegExp("^(?:" + m.join("|") + ")$"), _, O = function(x, C) {
    e.call(this, x, C), this._patterns.whitespace = this._patterns.whitespace.matching(
      /\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,
      /\u2028\u2029/.source
    );
    var P = new a(this._input), $ = new o(this._input).read_options(this._options);
    this.__patterns = {
      template: $,
      identifier: $.starting_with(i.identifier).matching(i.identifierMatch),
      number: P.matching(c),
      punct: P.matching(v),
      // comment ends just before nearest linefeed or end of file
      comment: P.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),
      //  /* ... */ comment ends with nearest */ or end of file
      block_comment: P.starting_with(/\/\*/).until_after(/\*\//),
      html_comment_start: P.matching(/<!--/),
      html_comment_end: P.matching(/-->/),
      include: P.starting_with(/#include/).until_after(i.lineBreak),
      shebang: P.starting_with(/#!/).until_after(i.lineBreak),
      xml: P.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),
      single_quote: $.until(/['\\\n\r\u2028\u2029]/),
      double_quote: $.until(/["\\\n\r\u2028\u2029]/),
      template_text: $.until(/[`\\$]/),
      template_expression: $.until(/[`}\\]/)
    };
  };
  O.prototype = new e(), O.prototype._is_comment = function(x) {
    return x.type === l.COMMENT || x.type === l.BLOCK_COMMENT || x.type === l.UNKNOWN;
  }, O.prototype._is_opening = function(x) {
    return x.type === l.START_BLOCK || x.type === l.START_EXPR;
  }, O.prototype._is_closing = function(x, C) {
    return (x.type === l.END_BLOCK || x.type === l.END_EXPR) && C && (x.text === "]" && C.text === "[" || x.text === ")" && C.text === "(" || x.text === "}" && C.text === "{");
  }, O.prototype._reset = function() {
    _ = !1;
  }, O.prototype._get_next_token = function(x, C) {
    var P = null;
    this._readWhitespace();
    var $ = this._input.peek();
    return $ === null ? this._create_token(l.EOF, "") : (P = P || this._read_non_javascript($), P = P || this._read_string($), P = P || this._read_pair($, this._input.peek(1)), P = P || this._read_word(x), P = P || this._read_singles($), P = P || this._read_comment($), P = P || this._read_regexp($, x), P = P || this._read_xml($, x), P = P || this._read_punctuation(), P = P || this._create_token(l.UNKNOWN, this._input.next()), P);
  }, O.prototype._read_word = function(x) {
    var C;
    if (C = this.__patterns.identifier.read(), C !== "")
      return C = C.replace(i.allLineBreaks, `
`), !(x.type === l.DOT || x.type === l.RESERVED && (x.text === "set" || x.text === "get")) && y.test(C) ? (C === "in" || C === "of") && (x.type === l.WORD || x.type === l.STRING) ? this._create_token(l.OPERATOR, C) : this._create_token(l.RESERVED, C) : this._create_token(l.WORD, C);
    if (C = this.__patterns.number.read(), C !== "")
      return this._create_token(l.WORD, C);
  }, O.prototype._read_singles = function(x) {
    var C = null;
    return x === "(" || x === "[" ? C = this._create_token(l.START_EXPR, x) : x === ")" || x === "]" ? C = this._create_token(l.END_EXPR, x) : x === "{" ? C = this._create_token(l.START_BLOCK, x) : x === "}" ? C = this._create_token(l.END_BLOCK, x) : x === ";" ? C = this._create_token(l.SEMICOLON, x) : x === "." && d.test(this._input.peek(1)) ? C = this._create_token(l.DOT, x) : x === "," && (C = this._create_token(l.COMMA, x)), C && this._input.next(), C;
  }, O.prototype._read_pair = function(x, C) {
    var P = null;
    return x === "#" && C === "{" && (P = this._create_token(l.START_BLOCK, x + C)), P && (this._input.next(), this._input.next()), P;
  }, O.prototype._read_punctuation = function() {
    var x = this.__patterns.punct.read();
    if (x !== "")
      return x === "=" ? this._create_token(l.EQUALS, x) : x === "?." ? this._create_token(l.DOT, x) : this._create_token(l.OPERATOR, x);
  }, O.prototype._read_non_javascript = function(x) {
    var C = "";
    if (x === "#") {
      if (this._is_first_token() && (C = this.__patterns.shebang.read(), C))
        return this._create_token(l.UNKNOWN, C.trim() + `
`);
      if (C = this.__patterns.include.read(), C)
        return this._create_token(l.UNKNOWN, C.trim() + `
`);
      x = this._input.next();
      var P = "#";
      if (this._input.hasNext() && this._input.testChar(f)) {
        do
          x = this._input.next(), P += x;
        while (this._input.hasNext() && x !== "#" && x !== "=");
        return x === "#" || (this._input.peek() === "[" && this._input.peek(1) === "]" ? (P += "[]", this._input.next(), this._input.next()) : this._input.peek() === "{" && this._input.peek(1) === "}" && (P += "{}", this._input.next(), this._input.next())), this._create_token(l.WORD, P);
      }
      this._input.back();
    } else if (x === "<" && this._is_first_token()) {
      if (C = this.__patterns.html_comment_start.read(), C) {
        for (; this._input.hasNext() && !this._input.testChar(i.newline); )
          C += this._input.next();
        return _ = !0, this._create_token(l.COMMENT, C);
      }
    } else if (_ && x === "-" && (C = this.__patterns.html_comment_end.read(), C))
      return _ = !1, this._create_token(l.COMMENT, C);
    return null;
  }, O.prototype._read_comment = function(x) {
    var C = null;
    if (x === "/") {
      var P = "";
      if (this._input.peek(1) === "*") {
        P = this.__patterns.block_comment.read();
        var $ = u.get_directives(P);
        $ && $.ignore === "start" && (P += u.readIgnored(this._input)), P = P.replace(i.allLineBreaks, `
`), C = this._create_token(l.BLOCK_COMMENT, P), C.directives = $;
      } else this._input.peek(1) === "/" && (P = this.__patterns.comment.read(), C = this._create_token(l.COMMENT, P));
    }
    return C;
  }, O.prototype._read_string = function(x) {
    if (x === "`" || x === "'" || x === '"') {
      var C = this._input.next();
      return this.has_char_escapes = !1, x === "`" ? C += this._read_string_recursive("`", !0, "${") : C += this._read_string_recursive(x), this.has_char_escapes && this._options.unescape_strings && (C = S(C)), this._input.peek() === x && (C += this._input.next()), C = C.replace(i.allLineBreaks, `
`), this._create_token(l.STRING, C);
    }
    return null;
  }, O.prototype._allow_regexp_or_xml = function(x) {
    return x.type === l.RESERVED && s(x.text, ["return", "case", "throw", "else", "do", "typeof", "yield"]) || x.type === l.END_EXPR && x.text === ")" && x.opened.previous.type === l.RESERVED && s(x.opened.previous.text, ["if", "while", "for"]) || s(x.type, [
      l.COMMENT,
      l.START_EXPR,
      l.START_BLOCK,
      l.START,
      l.END_BLOCK,
      l.OPERATOR,
      l.EQUALS,
      l.EOF,
      l.SEMICOLON,
      l.COMMA
    ]);
  }, O.prototype._read_regexp = function(x, C) {
    if (x === "/" && this._allow_regexp_or_xml(C)) {
      for (var P = this._input.next(), $ = !1, T = !1; this._input.hasNext() && ($ || T || this._input.peek() !== x) && !this._input.testChar(i.newline); )
        P += this._input.peek(), $ ? $ = !1 : ($ = this._input.peek() === "\\", this._input.peek() === "[" ? T = !0 : this._input.peek() === "]" && (T = !1)), this._input.next();
      return this._input.peek() === x && (P += this._input.next(), P += this._input.read(i.identifier)), this._create_token(l.STRING, P);
    }
    return null;
  }, O.prototype._read_xml = function(x, C) {
    if (this._options.e4x && x === "<" && this._allow_regexp_or_xml(C)) {
      var P = "", $ = this.__patterns.xml.read_match();
      if ($) {
        for (var T = $[2].replace(/^{\s+/, "{").replace(/\s+}$/, "}"), E = T.indexOf("{") === 0, M = 0; $; ) {
          var R = !!$[1], N = $[2], I = !!$[$.length - 1] || N.slice(0, 8) === "![CDATA[";
          if (!I && (N === T || E && N.replace(/^{\s+/, "{").replace(/\s+}$/, "}")) && (R ? --M : ++M), P += $[0], M <= 0)
            break;
          $ = this.__patterns.xml.read_match();
        }
        return $ || (P += this._input.match(/[\s\S]*/g)[0]), P = P.replace(i.allLineBreaks, `
`), this._create_token(l.STRING, P);
      }
    }
    return null;
  };
  function S(x) {
    for (var C = "", P = 0, $ = new t(x), T = null; $.hasNext(); )
      if (T = $.match(/([\s]|[^\\]|\\\\)+/g), T && (C += T[0]), $.peek() === "\\") {
        if ($.next(), $.peek() === "x")
          T = $.match(/x([0-9A-Fa-f]{2})/g);
        else if ($.peek() === "u")
          T = $.match(/u([0-9A-Fa-f]{4})/g), T || (T = $.match(/u\{([0-9A-Fa-f]+)\}/g));
        else {
          C += "\\", $.hasNext() && (C += $.next());
          continue;
        }
        if (!T || (P = parseInt(T[1], 16), P > 126 && P <= 255 && T[0].indexOf("x") === 0))
          return x;
        P >= 0 && P < 32 || P > 1114111 ? C += "\\" + T[0] : P === 34 || P === 39 || P === 92 ? C += "\\" + String.fromCharCode(P) : C += String.fromCharCode(P);
      }
    return C;
  }
  return O.prototype._read_string_recursive = function(x, C, P) {
    var $, T;
    x === "'" ? T = this.__patterns.single_quote : x === '"' ? T = this.__patterns.double_quote : x === "`" ? T = this.__patterns.template_text : x === "}" && (T = this.__patterns.template_expression);
    for (var E = T.read(), M = ""; this._input.hasNext(); ) {
      if (M = this._input.next(), M === x || !C && i.newline.test(M)) {
        this._input.back();
        break;
      } else M === "\\" && this._input.hasNext() ? ($ = this._input.peek(), $ === "x" || $ === "u" ? this.has_char_escapes = !0 : $ === "\r" && this._input.peek(1) === `
` && this._input.next(), M += this._input.next()) : P && (P === "${" && M === "$" && this._input.peek() === "{" && (M += this._input.next()), P === M && (x === "`" ? M += this._read_string_recursive("}", C, "`") : M += this._read_string_recursive("`", C, "${"), this._input.hasNext() && (M += this._input.next())));
      M += T.read(), E += M;
    }
    return E;
  }, gv.Tokenizer = O, gv.TOKEN = l, gv.positionable_operators = h.slice(), gv.line_starters = g.slice(), gv;
}
var pee;
function WAt() {
  if (pee) return PD;
  pee = 1;
  var t = RB().Output, e = zme().Token, n = Vme(), r = Fme().Options, i = Ix().Tokenizer, a = Ix().line_starters, o = Ix().positionable_operators, s = Ix().TOKEN;
  function l(T, E) {
    return E.indexOf(T) !== -1;
  }
  function u(T) {
    return T.replace(/^\s+/g, "");
  }
  function c(T) {
    for (var E = {}, M = 0; M < T.length; M++)
      E[T[M].replace(/-/g, "_")] = T[M];
    return E;
  }
  function f(T, E) {
    return T && T.type === s.RESERVED && T.text === E;
  }
  function d(T, E) {
    return T && T.type === s.RESERVED && l(T.text, E);
  }
  var h = ["case", "return", "do", "if", "throw", "else", "await", "break", "continue", "async"], p = ["before-newline", "after-newline", "preserve-newline"], v = c(p), g = [v.before_newline, v.preserve_newline], m = {
    BlockStatement: "BlockStatement",
    // 'BLOCK'
    Statement: "Statement",
    // 'STATEMENT'
    ObjectLiteral: "ObjectLiteral",
    // 'OBJECT',
    ArrayLiteral: "ArrayLiteral",
    //'[EXPRESSION]',
    ForInitializer: "ForInitializer",
    //'(FOR-EXPRESSION)',
    Conditional: "Conditional",
    //'(COND-EXPRESSION)',
    Expression: "Expression"
    //'(EXPRESSION)'
  };
  function y(T, E) {
    E.multiline_frame || E.mode === m.ForInitializer || E.mode === m.Conditional || T.remove_indent(E.start_line_index);
  }
  function _(T) {
    T = T.replace(n.allLineBreaks, `
`);
    for (var E = [], M = T.indexOf(`
`); M !== -1; )
      E.push(T.substring(0, M)), T = T.substring(M + 1), M = T.indexOf(`
`);
    return T.length && E.push(T), E;
  }
  function O(T) {
    return T === m.ArrayLiteral;
  }
  function S(T) {
    return l(T, [m.Expression, m.ForInitializer, m.Conditional]);
  }
  function x(T, E) {
    for (var M = 0; M < T.length; M++) {
      var R = T[M].trim();
      if (R.charAt(0) !== E)
        return !1;
    }
    return !0;
  }
  function C(T, E) {
    for (var M = 0, R = T.length, N; M < R; M++)
      if (N = T[M], N && N.indexOf(E) !== 0)
        return !1;
    return !0;
  }
  function P(T, E) {
    E = E || {}, this._source_text = T || "", this._output = null, this._tokens = null, this._last_last_text = null, this._flags = null, this._previous_flags = null, this._flag_store = null, this._options = new r(E);
  }
  P.prototype.create_flags = function(T, E) {
    var M = 0;
    T && (M = T.indentation_level, !this._output.just_added_newline() && T.line_indent_level > M && (M = T.line_indent_level));
    var R = {
      mode: E,
      parent: T,
      last_token: T ? T.last_token : new e(s.START_BLOCK, ""),
      // last token text
      last_word: T ? T.last_word : "",
      // last TOKEN.WORD passed
      declaration_statement: !1,
      declaration_assignment: !1,
      multiline_frame: !1,
      inline_frame: !1,
      if_block: !1,
      else_block: !1,
      class_start_block: !1,
      // class A { INSIDE HERE } or class B extends C { INSIDE HERE }
      do_block: !1,
      do_while: !1,
      import_block: !1,
      in_case_statement: !1,
      // switch(..){ INSIDE HERE }
      in_case: !1,
      // we're on the exact line with "case 0:"
      case_body: !1,
      // the indented case-action block
      case_block: !1,
      // the indented case-action block is wrapped with {}
      indentation_level: M,
      alignment: 0,
      line_indent_level: T ? T.line_indent_level : M,
      start_line_index: this._output.get_line_number(),
      ternary_depth: 0
    };
    return R;
  }, P.prototype._reset = function(T) {
    var E = T.match(/^[\t ]*/)[0];
    this._last_last_text = "", this._output = new t(this._options, E), this._output.raw = this._options.test_output_raw, this._flag_store = [], this.set_mode(m.BlockStatement);
    var M = new i(T, this._options);
    return this._tokens = M.tokenize(), T;
  }, P.prototype.beautify = function() {
    if (this._options.disabled)
      return this._source_text;
    var T, E = this._reset(this._source_text), M = this._options.eol;
    this._options.eol === "auto" && (M = `
`, E && n.lineBreak.test(E || "") && (M = E.match(n.lineBreak)[0]));
    for (var R = this._tokens.next(); R; )
      this.handle_token(R), this._last_last_text = this._flags.last_token.text, this._flags.last_token = R, R = this._tokens.next();
    return T = this._output.get_code(M), T;
  }, P.prototype.handle_token = function(T, E) {
    T.type === s.START_EXPR ? this.handle_start_expr(T) : T.type === s.END_EXPR ? this.handle_end_expr(T) : T.type === s.START_BLOCK ? this.handle_start_block(T) : T.type === s.END_BLOCK ? this.handle_end_block(T) : T.type === s.WORD ? this.handle_word(T) : T.type === s.RESERVED ? this.handle_word(T) : T.type === s.SEMICOLON ? this.handle_semicolon(T) : T.type === s.STRING ? this.handle_string(T) : T.type === s.EQUALS ? this.handle_equals(T) : T.type === s.OPERATOR ? this.handle_operator(T) : T.type === s.COMMA ? this.handle_comma(T) : T.type === s.BLOCK_COMMENT ? this.handle_block_comment(T, E) : T.type === s.COMMENT ? this.handle_comment(T, E) : T.type === s.DOT ? this.handle_dot(T) : T.type === s.EOF ? this.handle_eof(T) : T.type === s.UNKNOWN ? this.handle_unknown(T, E) : this.handle_unknown(T, E);
  }, P.prototype.handle_whitespace_and_comments = function(T, E) {
    var M = T.newlines, R = this._options.keep_array_indentation && O(this._flags.mode);
    if (T.comments_before)
      for (var N = T.comments_before.next(); N; )
        this.handle_whitespace_and_comments(N, E), this.handle_token(N, E), N = T.comments_before.next();
    if (R)
      for (var I = 0; I < M; I += 1)
        this.print_newline(I > 0, E);
    else if (this._options.max_preserve_newlines && M > this._options.max_preserve_newlines && (M = this._options.max_preserve_newlines), this._options.preserve_newlines && M > 1) {
      this.print_newline(!1, E);
      for (var B = 1; B < M; B += 1)
        this.print_newline(!0, E);
    }
  };
  var $ = ["async", "break", "continue", "return", "throw", "yield"];
  return P.prototype.allow_wrap_or_preserved_newline = function(T, E) {
    if (E = E === void 0 ? !1 : E, !this._output.just_added_newline()) {
      var M = this._options.preserve_newlines && T.newlines || E, R = l(this._flags.last_token.text, o) || l(T.text, o);
      if (R) {
        var N = l(this._flags.last_token.text, o) && l(this._options.operator_position, g) || l(T.text, o);
        M = M && N;
      }
      if (M)
        this.print_newline(!1, !0);
      else if (this._options.wrap_line_length) {
        if (d(this._flags.last_token, $))
          return;
        this._output.set_wrap_point();
      }
    }
  }, P.prototype.print_newline = function(T, E) {
    if (!E && this._flags.last_token.text !== ";" && this._flags.last_token.text !== "," && this._flags.last_token.text !== "=" && (this._flags.last_token.type !== s.OPERATOR || this._flags.last_token.text === "--" || this._flags.last_token.text === "++"))
      for (var M = this._tokens.peek(); this._flags.mode === m.Statement && !(this._flags.if_block && f(M, "else")) && !this._flags.do_block; )
        this.restore_mode();
    this._output.add_new_line(T) && (this._flags.multiline_frame = !0);
  }, P.prototype.print_token_line_indentation = function(T) {
    this._output.just_added_newline() && (this._options.keep_array_indentation && T.newlines && (T.text === "[" || O(this._flags.mode)) ? (this._output.current_line.set_indent(-1), this._output.current_line.push(T.whitespace_before), this._output.space_before_token = !1) : this._output.set_indent(this._flags.indentation_level, this._flags.alignment) && (this._flags.line_indent_level = this._flags.indentation_level));
  }, P.prototype.print_token = function(T) {
    if (this._output.raw) {
      this._output.add_raw_token(T);
      return;
    }
    if (this._options.comma_first && T.previous && T.previous.type === s.COMMA && this._output.just_added_newline() && this._output.previous_line.last() === ",") {
      var E = this._output.previous_line.pop();
      this._output.previous_line.is_empty() && (this._output.previous_line.push(E), this._output.trim(!0), this._output.current_line.pop(), this._output.trim()), this.print_token_line_indentation(T), this._output.add_token(","), this._output.space_before_token = !0;
    }
    this.print_token_line_indentation(T), this._output.non_breaking_space = !0, this._output.add_token(T.text), this._output.previous_token_wrapped && (this._flags.multiline_frame = !0);
  }, P.prototype.indent = function() {
    this._flags.indentation_level += 1, this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
  }, P.prototype.deindent = function() {
    this._flags.indentation_level > 0 && (!this._flags.parent || this._flags.indentation_level > this._flags.parent.indentation_level) && (this._flags.indentation_level -= 1, this._output.set_indent(this._flags.indentation_level, this._flags.alignment));
  }, P.prototype.set_mode = function(T) {
    this._flags ? (this._flag_store.push(this._flags), this._previous_flags = this._flags) : this._previous_flags = this.create_flags(null, T), this._flags = this.create_flags(this._previous_flags, T), this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
  }, P.prototype.restore_mode = function() {
    this._flag_store.length > 0 && (this._previous_flags = this._flags, this._flags = this._flag_store.pop(), this._previous_flags.mode === m.Statement && y(this._output, this._previous_flags), this._output.set_indent(this._flags.indentation_level, this._flags.alignment));
  }, P.prototype.start_of_object_property = function() {
    return this._flags.parent.mode === m.ObjectLiteral && this._flags.mode === m.Statement && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || d(this._flags.last_token, ["get", "set"]));
  }, P.prototype.start_of_statement = function(T) {
    var E = !1;
    return E = E || d(this._flags.last_token, ["var", "let", "const"]) && T.type === s.WORD, E = E || f(this._flags.last_token, "do"), E = E || !(this._flags.parent.mode === m.ObjectLiteral && this._flags.mode === m.Statement) && d(this._flags.last_token, $) && !T.newlines, E = E || f(this._flags.last_token, "else") && !(f(T, "if") && !T.comments_before), E = E || this._flags.last_token.type === s.END_EXPR && (this._previous_flags.mode === m.ForInitializer || this._previous_flags.mode === m.Conditional), E = E || this._flags.last_token.type === s.WORD && this._flags.mode === m.BlockStatement && !this._flags.in_case && !(T.text === "--" || T.text === "++") && this._last_last_text !== "function" && T.type !== s.WORD && T.type !== s.RESERVED, E = E || this._flags.mode === m.ObjectLiteral && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || d(this._flags.last_token, ["get", "set"])), E ? (this.set_mode(m.Statement), this.indent(), this.handle_whitespace_and_comments(T, !0), this.start_of_object_property() || this.allow_wrap_or_preserved_newline(
      T,
      d(T, ["do", "for", "if", "while"])
    ), !0) : !1;
  }, P.prototype.handle_start_expr = function(T) {
    this.start_of_statement(T) || this.handle_whitespace_and_comments(T);
    var E = m.Expression;
    if (T.text === "[") {
      if (this._flags.last_token.type === s.WORD || this._flags.last_token.text === ")") {
        d(this._flags.last_token, a) && (this._output.space_before_token = !0), this.print_token(T), this.set_mode(E), this.indent(), this._options.space_in_paren && (this._output.space_before_token = !0);
        return;
      }
      E = m.ArrayLiteral, O(this._flags.mode) && (this._flags.last_token.text === "[" || this._flags.last_token.text === "," && (this._last_last_text === "]" || this._last_last_text === "}")) && (this._options.keep_array_indentation || this.print_newline()), l(this._flags.last_token.type, [s.START_EXPR, s.END_EXPR, s.WORD, s.OPERATOR, s.DOT]) || (this._output.space_before_token = !0);
    } else {
      if (this._flags.last_token.type === s.RESERVED)
        this._flags.last_token.text === "for" ? (this._output.space_before_token = this._options.space_before_conditional, E = m.ForInitializer) : l(this._flags.last_token.text, ["if", "while", "switch"]) ? (this._output.space_before_token = this._options.space_before_conditional, E = m.Conditional) : l(this._flags.last_word, ["await", "async"]) ? this._output.space_before_token = !0 : this._flags.last_token.text === "import" && T.whitespace_before === "" ? this._output.space_before_token = !1 : (l(this._flags.last_token.text, a) || this._flags.last_token.text === "catch") && (this._output.space_before_token = !0);
      else if (this._flags.last_token.type === s.EQUALS || this._flags.last_token.type === s.OPERATOR)
        this.start_of_object_property() || this.allow_wrap_or_preserved_newline(T);
      else if (this._flags.last_token.type === s.WORD) {
        this._output.space_before_token = !1;
        var M = this._tokens.peek(-3);
        if (this._options.space_after_named_function && M) {
          var R = this._tokens.peek(-4);
          d(M, ["async", "function"]) || M.text === "*" && d(R, ["async", "function"]) ? this._output.space_before_token = !0 : this._flags.mode === m.ObjectLiteral ? (M.text === "{" || M.text === "," || M.text === "*" && (R.text === "{" || R.text === ",")) && (this._output.space_before_token = !0) : this._flags.parent && this._flags.parent.class_start_block && (this._output.space_before_token = !0);
        }
      } else
        this.allow_wrap_or_preserved_newline(T);
      (this._flags.last_token.type === s.RESERVED && (this._flags.last_word === "function" || this._flags.last_word === "typeof") || this._flags.last_token.text === "*" && (l(this._last_last_text, ["function", "yield"]) || this._flags.mode === m.ObjectLiteral && l(this._last_last_text, ["{", ","]))) && (this._output.space_before_token = this._options.space_after_anon_function);
    }
    this._flags.last_token.text === ";" || this._flags.last_token.type === s.START_BLOCK ? this.print_newline() : (this._flags.last_token.type === s.END_EXPR || this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.END_BLOCK || this._flags.last_token.text === "." || this._flags.last_token.type === s.COMMA) && this.allow_wrap_or_preserved_newline(T, T.newlines), this.print_token(T), this.set_mode(E), this._options.space_in_paren && (this._output.space_before_token = !0), this.indent();
  }, P.prototype.handle_end_expr = function(T) {
    for (; this._flags.mode === m.Statement; )
      this.restore_mode();
    this.handle_whitespace_and_comments(T), this._flags.multiline_frame && this.allow_wrap_or_preserved_newline(
      T,
      T.text === "]" && O(this._flags.mode) && !this._options.keep_array_indentation
    ), this._options.space_in_paren && (this._flags.last_token.type === s.START_EXPR && !this._options.space_in_empty_paren ? (this._output.trim(), this._output.space_before_token = !1) : this._output.space_before_token = !0), this.deindent(), this.print_token(T), this.restore_mode(), y(this._output, this._previous_flags), this._flags.do_while && this._previous_flags.mode === m.Conditional && (this._previous_flags.mode = m.Expression, this._flags.do_block = !1, this._flags.do_while = !1);
  }, P.prototype.handle_start_block = function(T) {
    this.handle_whitespace_and_comments(T);
    var E = this._tokens.peek(), M = this._tokens.peek(1);
    this._flags.last_word === "switch" && this._flags.last_token.type === s.END_EXPR ? (this.set_mode(m.BlockStatement), this._flags.in_case_statement = !0) : this._flags.case_body ? this.set_mode(m.BlockStatement) : M && (l(M.text, [":", ","]) && l(E.type, [s.STRING, s.WORD, s.RESERVED]) || l(E.text, ["get", "set", "..."]) && l(M.type, [s.WORD, s.RESERVED])) ? l(this._last_last_text, ["class", "interface"]) && !l(M.text, [":", ","]) ? this.set_mode(m.BlockStatement) : this.set_mode(m.ObjectLiteral) : this._flags.last_token.type === s.OPERATOR && this._flags.last_token.text === "=>" ? this.set_mode(m.BlockStatement) : l(this._flags.last_token.type, [s.EQUALS, s.START_EXPR, s.COMMA, s.OPERATOR]) || d(this._flags.last_token, ["return", "throw", "import", "default"]) ? this.set_mode(m.ObjectLiteral) : this.set_mode(m.BlockStatement), this._flags.last_token && d(this._flags.last_token.previous, ["class", "extends"]) && (this._flags.class_start_block = !0);
    var R = !E.comments_before && E.text === "}", N = R && this._flags.last_word === "function" && this._flags.last_token.type === s.END_EXPR;
    if (this._options.brace_preserve_inline) {
      var I = 0, B = null;
      this._flags.inline_frame = !0;
      do
        if (I += 1, B = this._tokens.peek(I - 1), B.newlines) {
          this._flags.inline_frame = !1;
          break;
        }
      while (B.type !== s.EOF && !(B.type === s.END_BLOCK && B.opened === T));
    }
    (this._options.brace_style === "expand" || this._options.brace_style === "none" && T.newlines) && !this._flags.inline_frame ? this._flags.last_token.type !== s.OPERATOR && (N || this._flags.last_token.type === s.EQUALS || d(this._flags.last_token, h) && this._flags.last_token.text !== "else") ? this._output.space_before_token = !0 : this.print_newline(!1, !0) : (O(this._previous_flags.mode) && (this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.COMMA) && ((this._flags.last_token.type === s.COMMA || this._options.space_in_paren) && (this._output.space_before_token = !0), (this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR && this._flags.inline_frame) && (this.allow_wrap_or_preserved_newline(T), this._previous_flags.multiline_frame = this._previous_flags.multiline_frame || this._flags.multiline_frame, this._flags.multiline_frame = !1)), this._flags.last_token.type !== s.OPERATOR && this._flags.last_token.type !== s.START_EXPR && (l(this._flags.last_token.type, [s.START_BLOCK, s.SEMICOLON]) && !this._flags.inline_frame ? this.print_newline() : this._output.space_before_token = !0)), this.print_token(T), this.indent(), !R && !(this._options.brace_preserve_inline && this._flags.inline_frame) && this.print_newline();
  }, P.prototype.handle_end_block = function(T) {
    for (this.handle_whitespace_and_comments(T); this._flags.mode === m.Statement; )
      this.restore_mode();
    var E = this._flags.last_token.type === s.START_BLOCK;
    this._flags.inline_frame && !E ? this._output.space_before_token = !0 : this._options.brace_style === "expand" ? E || this.print_newline() : E || (O(this._flags.mode) && this._options.keep_array_indentation ? (this._options.keep_array_indentation = !1, this.print_newline(), this._options.keep_array_indentation = !0) : this.print_newline()), this.restore_mode(), this.print_token(T);
  }, P.prototype.handle_word = function(T) {
    if (T.type === s.RESERVED) {
      if (l(T.text, ["set", "get"]) && this._flags.mode !== m.ObjectLiteral)
        T.type = s.WORD;
      else if (T.text === "import" && l(this._tokens.peek().text, ["(", "."]))
        T.type = s.WORD;
      else if (l(T.text, ["as", "from"]) && !this._flags.import_block)
        T.type = s.WORD;
      else if (this._flags.mode === m.ObjectLiteral) {
        var E = this._tokens.peek();
        E.text === ":" && (T.type = s.WORD);
      }
    }
    if (this.start_of_statement(T) ? d(this._flags.last_token, ["var", "let", "const"]) && T.type === s.WORD && (this._flags.declaration_statement = !0) : T.newlines && !S(this._flags.mode) && (this._flags.last_token.type !== s.OPERATOR || this._flags.last_token.text === "--" || this._flags.last_token.text === "++") && this._flags.last_token.type !== s.EQUALS && (this._options.preserve_newlines || !d(this._flags.last_token, ["var", "let", "const", "set", "get"])) ? (this.handle_whitespace_and_comments(T), this.print_newline()) : this.handle_whitespace_and_comments(T), this._flags.do_block && !this._flags.do_while)
      if (f(T, "while")) {
        this._output.space_before_token = !0, this.print_token(T), this._output.space_before_token = !0, this._flags.do_while = !0;
        return;
      } else
        this.print_newline(), this._flags.do_block = !1;
    if (this._flags.if_block)
      if (!this._flags.else_block && f(T, "else"))
        this._flags.else_block = !0;
      else {
        for (; this._flags.mode === m.Statement; )
          this.restore_mode();
        this._flags.if_block = !1, this._flags.else_block = !1;
      }
    if (this._flags.in_case_statement && d(T, ["case", "default"])) {
      this.print_newline(), !this._flags.case_block && (this._flags.case_body || this._options.jslint_happy) && this.deindent(), this._flags.case_body = !1, this.print_token(T), this._flags.in_case = !0;
      return;
    }
    if ((this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.EQUALS || this._flags.last_token.type === s.OPERATOR) && !this.start_of_object_property() && !// start of object property is different for numeric values with +/- prefix operators
    (l(this._flags.last_token.text, ["+", "-"]) && this._last_last_text === ":" && this._flags.parent.mode === m.ObjectLiteral) && this.allow_wrap_or_preserved_newline(T), f(T, "function")) {
      (l(this._flags.last_token.text, ["}", ";"]) || this._output.just_added_newline() && !(l(this._flags.last_token.text, ["(", "[", "{", ":", "=", ","]) || this._flags.last_token.type === s.OPERATOR)) && !this._output.just_added_blankline() && !T.comments_before && (this.print_newline(), this.print_newline(!0)), this._flags.last_token.type === s.RESERVED || this._flags.last_token.type === s.WORD ? d(this._flags.last_token, ["get", "set", "new", "export"]) || d(this._flags.last_token, $) ? this._output.space_before_token = !0 : f(this._flags.last_token, "default") && this._last_last_text === "export" ? this._output.space_before_token = !0 : this._flags.last_token.text === "declare" ? this._output.space_before_token = !0 : this.print_newline() : this._flags.last_token.type === s.OPERATOR || this._flags.last_token.text === "=" ? this._output.space_before_token = !0 : !this._flags.multiline_frame && (S(this._flags.mode) || O(this._flags.mode)) || this.print_newline(), this.print_token(T), this._flags.last_word = T.text;
      return;
    }
    var M = "NONE";
    if (this._flags.last_token.type === s.END_BLOCK ? this._previous_flags.inline_frame ? M = "SPACE" : d(T, ["else", "catch", "finally", "from"]) ? this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && T.newlines ? M = "NEWLINE" : (M = "SPACE", this._output.space_before_token = !0) : M = "NEWLINE" : this._flags.last_token.type === s.SEMICOLON && this._flags.mode === m.BlockStatement ? M = "NEWLINE" : this._flags.last_token.type === s.SEMICOLON && S(this._flags.mode) ? M = "SPACE" : this._flags.last_token.type === s.STRING ? M = "NEWLINE" : this._flags.last_token.type === s.RESERVED || this._flags.last_token.type === s.WORD || this._flags.last_token.text === "*" && (l(this._last_last_text, ["function", "yield"]) || this._flags.mode === m.ObjectLiteral && l(this._last_last_text, ["{", ","])) ? M = "SPACE" : this._flags.last_token.type === s.START_BLOCK ? this._flags.inline_frame ? M = "SPACE" : M = "NEWLINE" : this._flags.last_token.type === s.END_EXPR && (this._output.space_before_token = !0, M = "NEWLINE"), d(T, a) && this._flags.last_token.text !== ")" && (this._flags.inline_frame || this._flags.last_token.text === "else" || this._flags.last_token.text === "export" ? M = "SPACE" : M = "NEWLINE"), d(T, ["else", "catch", "finally"]))
      if ((!(this._flags.last_token.type === s.END_BLOCK && this._previous_flags.mode === m.BlockStatement) || this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && T.newlines) && !this._flags.inline_frame)
        this.print_newline();
      else {
        this._output.trim(!0);
        var R = this._output.current_line;
        R.last() !== "}" && this.print_newline(), this._output.space_before_token = !0;
      }
    else M === "NEWLINE" ? d(this._flags.last_token, h) ? this._output.space_before_token = !0 : this._flags.last_token.text === "declare" && d(T, ["var", "let", "const"]) ? this._output.space_before_token = !0 : this._flags.last_token.type !== s.END_EXPR ? (this._flags.last_token.type !== s.START_EXPR || !d(T, ["var", "let", "const"])) && this._flags.last_token.text !== ":" && (f(T, "if") && f(T.previous, "else") ? this._output.space_before_token = !0 : this.print_newline()) : d(T, a) && this._flags.last_token.text !== ")" && this.print_newline() : this._flags.multiline_frame && O(this._flags.mode) && this._flags.last_token.text === "," && this._last_last_text === "}" ? this.print_newline() : M === "SPACE" && (this._output.space_before_token = !0);
    T.previous && (T.previous.type === s.WORD || T.previous.type === s.RESERVED) && (this._output.space_before_token = !0), this.print_token(T), this._flags.last_word = T.text, T.type === s.RESERVED && (T.text === "do" ? this._flags.do_block = !0 : T.text === "if" ? this._flags.if_block = !0 : T.text === "import" ? this._flags.import_block = !0 : this._flags.import_block && f(T, "from") && (this._flags.import_block = !1));
  }, P.prototype.handle_semicolon = function(T) {
    this.start_of_statement(T) ? this._output.space_before_token = !1 : this.handle_whitespace_and_comments(T);
    for (var E = this._tokens.peek(); this._flags.mode === m.Statement && !(this._flags.if_block && f(E, "else")) && !this._flags.do_block; )
      this.restore_mode();
    this._flags.import_block && (this._flags.import_block = !1), this.print_token(T);
  }, P.prototype.handle_string = function(T) {
    T.text.startsWith("`") && T.newlines === 0 && T.whitespace_before === "" && (T.previous.text === ")" || this._flags.last_token.type === s.WORD) || (this.start_of_statement(T) ? this._output.space_before_token = !0 : (this.handle_whitespace_and_comments(T), this._flags.last_token.type === s.RESERVED || this._flags.last_token.type === s.WORD || this._flags.inline_frame ? this._output.space_before_token = !0 : this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.EQUALS || this._flags.last_token.type === s.OPERATOR ? this.start_of_object_property() || this.allow_wrap_or_preserved_newline(T) : T.text.startsWith("`") && this._flags.last_token.type === s.END_EXPR && (T.previous.text === "]" || T.previous.text === ")") && T.newlines === 0 ? this._output.space_before_token = !0 : this.print_newline())), this.print_token(T);
  }, P.prototype.handle_equals = function(T) {
    this.start_of_statement(T) || this.handle_whitespace_and_comments(T), this._flags.declaration_statement && (this._flags.declaration_assignment = !0), this._output.space_before_token = !0, this.print_token(T), this._output.space_before_token = !0;
  }, P.prototype.handle_comma = function(T) {
    this.handle_whitespace_and_comments(T, !0), this.print_token(T), this._output.space_before_token = !0, this._flags.declaration_statement ? (S(this._flags.parent.mode) && (this._flags.declaration_assignment = !1), this._flags.declaration_assignment ? (this._flags.declaration_assignment = !1, this.print_newline(!1, !0)) : this._options.comma_first && this.allow_wrap_or_preserved_newline(T)) : this._flags.mode === m.ObjectLiteral || this._flags.mode === m.Statement && this._flags.parent.mode === m.ObjectLiteral ? (this._flags.mode === m.Statement && this.restore_mode(), this._flags.inline_frame || this.print_newline()) : this._options.comma_first && this.allow_wrap_or_preserved_newline(T);
  }, P.prototype.handle_operator = function(T) {
    var E = T.text === "*" && (d(this._flags.last_token, ["function", "yield"]) || l(this._flags.last_token.type, [s.START_BLOCK, s.COMMA, s.END_BLOCK, s.SEMICOLON])), M = l(T.text, ["-", "+"]) && (l(this._flags.last_token.type, [s.START_BLOCK, s.START_EXPR, s.EQUALS, s.OPERATOR]) || l(this._flags.last_token.text, a) || this._flags.last_token.text === ",");
    if (!this.start_of_statement(T)) {
      var R = !E;
      this.handle_whitespace_and_comments(T, R);
    }
    if (T.text === "*" && this._flags.last_token.type === s.DOT) {
      this.print_token(T);
      return;
    }
    if (T.text === "::") {
      this.print_token(T);
      return;
    }
    if (l(T.text, ["-", "+"]) && this.start_of_object_property()) {
      this.print_token(T);
      return;
    }
    if (this._flags.last_token.type === s.OPERATOR && l(this._options.operator_position, g) && this.allow_wrap_or_preserved_newline(T), T.text === ":" && this._flags.in_case) {
      this.print_token(T), this._flags.in_case = !1, this._flags.case_body = !0, this._tokens.peek().type !== s.START_BLOCK ? (this.indent(), this.print_newline(), this._flags.case_block = !1) : (this._flags.case_block = !0, this._output.space_before_token = !0);
      return;
    }
    var N = !0, I = !0, B = !1;
    if (T.text === ":" ? this._flags.ternary_depth === 0 ? N = !1 : (this._flags.ternary_depth -= 1, B = !0) : T.text === "?" && (this._flags.ternary_depth += 1), !M && !E && this._options.preserve_newlines && l(T.text, o)) {
      var Q = T.text === ":", W = Q && B, H = Q && !B;
      switch (this._options.operator_position) {
        case v.before_newline:
          this._output.space_before_token = !H, this.print_token(T), (!Q || W) && this.allow_wrap_or_preserved_newline(T), this._output.space_before_token = !0;
          return;
        case v.after_newline:
          this._output.space_before_token = !0, !Q || W ? this._tokens.peek().newlines ? this.print_newline(!1, !0) : this.allow_wrap_or_preserved_newline(T) : this._output.space_before_token = !1, this.print_token(T), this._output.space_before_token = !0;
          return;
        case v.preserve_newline:
          H || this.allow_wrap_or_preserved_newline(T), N = !(this._output.just_added_newline() || H), this._output.space_before_token = N, this.print_token(T), this._output.space_before_token = !0;
          return;
      }
    }
    if (E) {
      this.allow_wrap_or_preserved_newline(T), N = !1;
      var U = this._tokens.peek();
      I = U && l(U.type, [s.WORD, s.RESERVED]);
    } else if (T.text === "...")
      this.allow_wrap_or_preserved_newline(T), N = this._flags.last_token.type === s.START_BLOCK, I = !1;
    else if (l(T.text, ["--", "++", "!", "~"]) || M) {
      if ((this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR) && this.allow_wrap_or_preserved_newline(T), N = !1, I = !1, T.newlines && (T.text === "--" || T.text === "++" || T.text === "~")) {
        var j = d(this._flags.last_token, h) && T.newlines;
        j && (this._previous_flags.if_block || this._previous_flags.else_block) && this.restore_mode(), this.print_newline(j, !0);
      }
      this._flags.last_token.text === ";" && S(this._flags.mode) && (N = !0), this._flags.last_token.type === s.RESERVED ? N = !0 : this._flags.last_token.type === s.END_EXPR ? N = !(this._flags.last_token.text === "]" && (T.text === "--" || T.text === "++")) : this._flags.last_token.type === s.OPERATOR && (N = l(T.text, ["--", "-", "++", "+"]) && l(this._flags.last_token.text, ["--", "-", "++", "+"]), l(T.text, ["+", "-"]) && l(this._flags.last_token.text, ["--", "++"]) && (I = !0)), (this._flags.mode === m.BlockStatement && !this._flags.inline_frame || this._flags.mode === m.Statement) && (this._flags.last_token.text === "{" || this._flags.last_token.text === ";") && this.print_newline();
    }
    this._output.space_before_token = this._output.space_before_token || N, this.print_token(T), this._output.space_before_token = I;
  }, P.prototype.handle_block_comment = function(T, E) {
    if (this._output.raw) {
      this._output.add_raw_token(T), T.directives && T.directives.preserve === "end" && (this._output.raw = this._options.test_output_raw);
      return;
    }
    if (T.directives) {
      this.print_newline(!1, E), this.print_token(T), T.directives.preserve === "start" && (this._output.raw = !0), this.print_newline(!1, !0);
      return;
    }
    if (!n.newline.test(T.text) && !T.newlines) {
      this._output.space_before_token = !0, this.print_token(T), this._output.space_before_token = !0;
      return;
    } else
      this.print_block_commment(T, E);
  }, P.prototype.print_block_commment = function(T, E) {
    var M = _(T.text), R, N = !1, I = !1, B = T.whitespace_before, Q = B.length;
    if (this.print_newline(!1, E), this.print_token_line_indentation(T), this._output.add_token(M[0]), this.print_newline(!1, E), M.length > 1) {
      for (M = M.slice(1), N = x(M, "*"), I = C(M, B), N && (this._flags.alignment = 1), R = 0; R < M.length; R++)
        N ? (this.print_token_line_indentation(T), this._output.add_token(u(M[R]))) : I && M[R] ? (this.print_token_line_indentation(T), this._output.add_token(M[R].substring(Q))) : (this._output.current_line.set_indent(-1), this._output.add_token(M[R])), this.print_newline(!1, E);
      this._flags.alignment = 0;
    }
  }, P.prototype.handle_comment = function(T, E) {
    T.newlines ? this.print_newline(!1, E) : this._output.trim(!0), this._output.space_before_token = !0, this.print_token(T), this.print_newline(!1, E);
  }, P.prototype.handle_dot = function(T) {
    this.start_of_statement(T) || this.handle_whitespace_and_comments(T, !0), this._flags.last_token.text.match("^[0-9]+$") && (this._output.space_before_token = !0), d(this._flags.last_token, h) ? this._output.space_before_token = !1 : this.allow_wrap_or_preserved_newline(
      T,
      this._flags.last_token.text === ")" && this._options.break_chained_methods
    ), this._options.unindent_chained_methods && this._output.just_added_newline() && this.deindent(), this.print_token(T);
  }, P.prototype.handle_unknown = function(T, E) {
    this.print_token(T), T.text[T.text.length - 1] === `
` && this.print_newline(!1, E);
  }, P.prototype.handle_eof = function(T) {
    for (; this._flags.mode === m.Statement; )
      this.restore_mode();
    this.handle_whitespace_and_comments(T);
  }, PD.Beautifier = P, PD;
}
var vee;
function QAt() {
  if (vee) return Ex.exports;
  vee = 1;
  var t = WAt().Beautifier, e = Fme().Options;
  function n(r, i) {
    var a = new t(r, i);
    return a.beautify();
  }
  return Ex.exports = n, Ex.exports.defaultOptions = function() {
    return new e();
  }, Ex.exports;
}
var Dx = { exports: {} }, BD = {}, zD = {}, gee;
function Qme() {
  if (gee) return zD;
  gee = 1;
  var t = kB().Options;
  function e(n) {
    t.call(this, n, "css"), this.selector_separator_newline = this._get_boolean("selector_separator_newline", !0), this.newline_between_rules = this._get_boolean("newline_between_rules", !0);
    var r = this._get_boolean("space_around_selector_separator");
    this.space_around_combinator = this._get_boolean("space_around_combinator") || r;
    var i = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
    this.brace_style = "collapse";
    for (var a = 0; a < i.length; a++)
      i[a] !== "expand" ? this.brace_style = "collapse" : this.brace_style = i[a];
  }
  return e.prototype = new t(), zD.Options = e, zD;
}
var mee;
function HAt() {
  if (mee) return BD;
  mee = 1;
  var t = Qme().Options, e = RB().Output, n = LB().InputScanner, r = NB().Directives, i = new r(/\/\*/, /\*\//), a = /\r\n|[\r\n]/, o = /\r\n|[\r\n]/g, s = /\s/, l = /(?:\s|\n)+/g, u = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g, c = /\/\/(?:[^\n\r\u2028\u2029]*)/g;
  function f(d, h) {
    this._source_text = d || "", this._options = new t(h), this._ch = null, this._input = null, this.NESTED_AT_RULE = {
      page: !0,
      "font-face": !0,
      keyframes: !0,
      // also in CONDITIONAL_GROUP_RULE below
      media: !0,
      supports: !0,
      document: !0
    }, this.CONDITIONAL_GROUP_RULE = {
      media: !0,
      supports: !0,
      document: !0
    }, this.NON_SEMICOLON_NEWLINE_PROPERTY = [
      "grid-template-areas",
      "grid-template"
    ];
  }
  return f.prototype.eatString = function(d) {
    var h = "";
    for (this._ch = this._input.next(); this._ch; ) {
      if (h += this._ch, this._ch === "\\")
        h += this._input.next();
      else if (d.indexOf(this._ch) !== -1 || this._ch === `
`)
        break;
      this._ch = this._input.next();
    }
    return h;
  }, f.prototype.eatWhitespace = function(d) {
    for (var h = s.test(this._input.peek()), p = 0; s.test(this._input.peek()); )
      this._ch = this._input.next(), d && this._ch === `
` && (p === 0 || p < this._options.max_preserve_newlines) && (p++, this._output.add_new_line(!0));
    return h;
  }, f.prototype.foundNestedPseudoClass = function() {
    for (var d = 0, h = 1, p = this._input.peek(h); p; ) {
      if (p === "{")
        return !0;
      if (p === "(")
        d += 1;
      else if (p === ")") {
        if (d === 0)
          return !1;
        d -= 1;
      } else if (p === ";" || p === "}")
        return !1;
      h++, p = this._input.peek(h);
    }
    return !1;
  }, f.prototype.print_string = function(d) {
    this._output.set_indent(this._indentLevel), this._output.non_breaking_space = !0, this._output.add_token(d);
  }, f.prototype.preserveSingleSpace = function(d) {
    d && (this._output.space_before_token = !0);
  }, f.prototype.indent = function() {
    this._indentLevel++;
  }, f.prototype.outdent = function() {
    this._indentLevel > 0 && this._indentLevel--;
  }, f.prototype.beautify = function() {
    if (this._options.disabled)
      return this._source_text;
    var d = this._source_text, h = this._options.eol;
    h === "auto" && (h = `
`, d && a.test(d || "") && (h = d.match(a)[0])), d = d.replace(o, `
`);
    var p = d.match(/^[\t ]*/)[0];
    this._output = new e(this._options, p), this._input = new n(d), this._indentLevel = 0, this._nestedLevel = 0, this._ch = null;
    for (var v = 0, g = !1, m = !1, y = !1, _ = !1, O = !1, S = this._ch, x = !1, C, P, $; C = this._input.read(l), P = C !== "", $ = S, this._ch = this._input.next(), this._ch === "\\" && this._input.hasNext() && (this._ch += this._input.next()), S = this._ch, this._ch; )
      if (this._ch === "/" && this._input.peek() === "*") {
        this._output.add_new_line(), this._input.back();
        var T = this._input.read(u), E = i.get_directives(T);
        E && E.ignore === "start" && (T += i.readIgnored(this._input)), this.print_string(T), this.eatWhitespace(!0), this._output.add_new_line();
      } else if (this._ch === "/" && this._input.peek() === "/")
        this._output.space_before_token = !0, this._input.back(), this.print_string(this._input.read(c)), this.eatWhitespace(!0);
      else if (this._ch === "$") {
        this.preserveSingleSpace(P), this.print_string(this._ch);
        var M = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
        M.match(/[ :]$/) && (M = this.eatString(": ").replace(/\s+$/, ""), this.print_string(M), this._output.space_before_token = !0), v === 0 && M.indexOf(":") !== -1 && (m = !0, this.indent());
      } else if (this._ch === "@")
        if (this.preserveSingleSpace(P), this._input.peek() === "{")
          this.print_string(this._ch + this.eatString("}"));
        else {
          this.print_string(this._ch);
          var R = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
          R.match(/[ :]$/) && (R = this.eatString(": ").replace(/\s+$/, ""), this.print_string(R), this._output.space_before_token = !0), v === 0 && R.indexOf(":") !== -1 ? (m = !0, this.indent()) : R in this.NESTED_AT_RULE ? (this._nestedLevel += 1, R in this.CONDITIONAL_GROUP_RULE && (y = !0)) : v === 0 && !m && (_ = !0);
        }
      else if (this._ch === "#" && this._input.peek() === "{")
        this.preserveSingleSpace(P), this.print_string(this._ch + this.eatString("}"));
      else if (this._ch === "{")
        m && (m = !1, this.outdent()), _ = !1, y ? (y = !1, g = this._indentLevel >= this._nestedLevel) : g = this._indentLevel >= this._nestedLevel - 1, this._options.newline_between_rules && g && this._output.previous_line && this._output.previous_line.item(-1) !== "{" && this._output.ensure_empty_line_above("/", ","), this._output.space_before_token = !0, this._options.brace_style === "expand" ? (this._output.add_new_line(), this.print_string(this._ch), this.indent(), this._output.set_indent(this._indentLevel)) : ($ === "(" ? this._output.space_before_token = !1 : $ !== "," && this.indent(), this.print_string(this._ch)), this.eatWhitespace(!0), this._output.add_new_line();
      else if (this._ch === "}")
        this.outdent(), this._output.add_new_line(), $ === "{" && this._output.trim(!0), m && (this.outdent(), m = !1), this.print_string(this._ch), g = !1, this._nestedLevel && this._nestedLevel--, this.eatWhitespace(!0), this._output.add_new_line(), this._options.newline_between_rules && !this._output.just_added_blankline() && this._input.peek() !== "}" && this._output.add_new_line(!0), this._input.peek() === ")" && (this._output.trim(!0), this._options.brace_style === "expand" && this._output.add_new_line(!0));
      else if (this._ch === ":") {
        for (var N = 0; N < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; N++)
          if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[N])) {
            x = !0;
            break;
          }
        (g || y) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !_ && v === 0 ? (this.print_string(":"), m || (m = !0, this._output.space_before_token = !0, this.eatWhitespace(!0), this.indent())) : (this._input.lookBack(" ") && (this._output.space_before_token = !0), this._input.peek() === ":" ? (this._ch = this._input.next(), this.print_string("::")) : this.print_string(":"));
      } else if (this._ch === '"' || this._ch === "'") {
        var I = $ === '"' || $ === "'";
        this.preserveSingleSpace(I || P), this.print_string(this._ch + this.eatString(this._ch)), this.eatWhitespace(!0);
      } else if (this._ch === ";")
        x = !1, v === 0 ? (m && (this.outdent(), m = !1), _ = !1, this.print_string(this._ch), this.eatWhitespace(!0), this._input.peek() !== "/" && this._output.add_new_line()) : (this.print_string(this._ch), this.eatWhitespace(!0), this._output.space_before_token = !0);
      else if (this._ch === "(")
        if (this._input.lookBack("url"))
          this.print_string(this._ch), this.eatWhitespace(), v++, this.indent(), this._ch = this._input.next(), this._ch === ")" || this._ch === '"' || this._ch === "'" ? this._input.back() : this._ch && (this.print_string(this._ch + this.eatString(")")), v && (v--, this.outdent()));
        else {
          var B = !1;
          this._input.lookBack("with") && (B = !0), this.preserveSingleSpace(P || B), this.print_string(this._ch), m && $ === "$" && this._options.selector_separator_newline ? (this._output.add_new_line(), O = !0) : (this.eatWhitespace(), v++, this.indent());
        }
      else if (this._ch === ")")
        v && (v--, this.outdent()), O && this._input.peek() === ";" && this._options.selector_separator_newline && (O = !1, this.outdent(), this._output.add_new_line()), this.print_string(this._ch);
      else if (this._ch === ",")
        this.print_string(this._ch), this.eatWhitespace(!0), this._options.selector_separator_newline && (!m || O) && v === 0 && !_ ? this._output.add_new_line() : this._output.space_before_token = !0;
      else if ((this._ch === ">" || this._ch === "+" || this._ch === "~") && !m && v === 0)
        this._options.space_around_combinator ? (this._output.space_before_token = !0, this.print_string(this._ch), this._output.space_before_token = !0) : (this.print_string(this._ch), this.eatWhitespace(), this._ch && s.test(this._ch) && (this._ch = ""));
      else if (this._ch === "]")
        this.print_string(this._ch);
      else if (this._ch === "[")
        this.preserveSingleSpace(P), this.print_string(this._ch);
      else if (this._ch === "=")
        this.eatWhitespace(), this.print_string("="), s.test(this._ch) && (this._ch = "");
      else if (this._ch === "!" && !this._input.lookBack("\\"))
        this._output.space_before_token = !0, this.print_string(this._ch);
      else {
        var Q = $ === '"' || $ === "'";
        this.preserveSingleSpace(Q || P), this.print_string(this._ch), !this._output.just_added_newline() && this._input.peek() === `
` && x && this._output.add_new_line();
      }
    var W = this._output.get_code(h);
    return W;
  }, BD.Beautifier = f, BD;
}
var yee;
function GAt() {
  if (yee) return Dx.exports;
  yee = 1;
  var t = HAt().Beautifier, e = Qme().Options;
  function n(r, i) {
    var a = new t(r, i);
    return a.beautify();
  }
  return Dx.exports = n, Dx.exports.defaultOptions = function() {
    return new e();
  }, Dx.exports;
}
var Rx = { exports: {} }, VD = {}, FD = {}, bee;
function Hme() {
  if (bee) return FD;
  bee = 1;
  var t = kB().Options;
  function e(n) {
    t.call(this, n, "html"), this.templating.length === 1 && this.templating[0] === "auto" && (this.templating = ["django", "erb", "handlebars", "php"]), this.indent_inner_html = this._get_boolean("indent_inner_html"), this.indent_body_inner_html = this._get_boolean("indent_body_inner_html", !0), this.indent_head_inner_html = this._get_boolean("indent_head_inner_html", !0), this.indent_handlebars = this._get_boolean("indent_handlebars", !0), this.wrap_attributes = this._get_selection(
      "wrap_attributes",
      ["auto", "force", "force-aligned", "force-expand-multiline", "aligned-multiple", "preserve", "preserve-aligned"]
    ), this.wrap_attributes_min_attrs = this._get_number("wrap_attributes_min_attrs", 2), this.wrap_attributes_indent_size = this._get_number("wrap_attributes_indent_size", this.indent_size), this.extra_liners = this._get_array("extra_liners", ["head", "body", "/html"]), this.inline = this._get_array("inline", [
      "a",
      "abbr",
      "area",
      "audio",
      "b",
      "bdi",
      "bdo",
      "br",
      "button",
      "canvas",
      "cite",
      "code",
      "data",
      "datalist",
      "del",
      "dfn",
      "em",
      "embed",
      "i",
      "iframe",
      "img",
      "input",
      "ins",
      "kbd",
      "keygen",
      "label",
      "map",
      "mark",
      "math",
      "meter",
      "noscript",
      "object",
      "output",
      "progress",
      "q",
      "ruby",
      "s",
      "samp",
      /* 'script', */
      "select",
      "small",
      "span",
      "strong",
      "sub",
      "sup",
      "svg",
      "template",
      "textarea",
      "time",
      "u",
      "var",
      "video",
      "wbr",
      "text",
      // obsolete inline tags
      "acronym",
      "big",
      "strike",
      "tt"
    ]), this.inline_custom_elements = this._get_boolean("inline_custom_elements", !0), this.void_elements = this._get_array("void_elements", [
      // HTLM void elements - aka self-closing tags - aka singletons
      // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
      "area",
      "base",
      "br",
      "col",
      "embed",
      "hr",
      "img",
      "input",
      "keygen",
      "link",
      "menuitem",
      "meta",
      "param",
      "source",
      "track",
      "wbr",
      // NOTE: Optional tags are too complex for a simple list
      // they are hard coded in _do_optional_end_element
      // Doctype and xml elements
      "!doctype",
      "?xml",
      // obsolete tags
      // basefont: https://www.computerhope.com/jargon/h/html-basefont-tag.htm
      // isndex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/isindex
      "basefont",
      "isindex"
    ]), this.unformatted = this._get_array("unformatted", []), this.content_unformatted = this._get_array("content_unformatted", [
      "pre",
      "textarea"
    ]), this.unformatted_content_delimiter = this._get_characters("unformatted_content_delimiter"), this.indent_scripts = this._get_selection("indent_scripts", ["normal", "keep", "separate"]);
  }
  return e.prototype = new t(), FD.Options = e, FD;
}
var kx = {}, _ee;
function Oee() {
  if (_ee) return kx;
  _ee = 1;
  var t = qT().Tokenizer, e = qT().TOKEN, n = NB().Directives, r = Wme().TemplatablePattern, i = v$().Pattern, a = {
    TAG_OPEN: "TK_TAG_OPEN",
    TAG_CLOSE: "TK_TAG_CLOSE",
    CONTROL_FLOW_OPEN: "TK_CONTROL_FLOW_OPEN",
    CONTROL_FLOW_CLOSE: "TK_CONTROL_FLOW_CLOSE",
    ATTRIBUTE: "TK_ATTRIBUTE",
    EQUALS: "TK_EQUALS",
    VALUE: "TK_VALUE",
    COMMENT: "TK_COMMENT",
    TEXT: "TK_TEXT",
    UNKNOWN: "TK_UNKNOWN",
    START: e.START,
    RAW: e.RAW,
    EOF: e.EOF
  }, o = new n(/<\!--/, /-->/), s = function(l, u) {
    t.call(this, l, u), this._current_tag_name = "";
    var c = new r(this._input).read_options(this._options), f = new i(this._input);
    if (this.__patterns = {
      word: c.until(/[\n\r\t <]/),
      word_control_flow_close_excluded: c.until(/[\n\r\t <}]/),
      single_quote: c.until_after(/'/),
      double_quote: c.until_after(/"/),
      attribute: c.until(/[\n\r\t =>]|\/>/),
      element_name: c.until(/[\n\r\t >\/]/),
      angular_control_flow_start: f.matching(/\@[a-zA-Z]+[^({]*[({]/),
      handlebars_comment: f.starting_with(/{{!--/).until_after(/--}}/),
      handlebars: f.starting_with(/{{/).until_after(/}}/),
      handlebars_open: f.until(/[\n\r\t }]/),
      handlebars_raw_close: f.until(/}}/),
      comment: f.starting_with(/<!--/).until_after(/-->/),
      cdata: f.starting_with(/<!\[CDATA\[/).until_after(/]]>/),
      // https://en.wikipedia.org/wiki/Conditional_comment
      conditional_comment: f.starting_with(/<!\[/).until_after(/]>/),
      processing: f.starting_with(/<\?/).until_after(/\?>/)
    }, this._options.indent_handlebars && (this.__patterns.word = this.__patterns.word.exclude("handlebars"), this.__patterns.word_control_flow_close_excluded = this.__patterns.word_control_flow_close_excluded.exclude("handlebars")), this._unformatted_content_delimiter = null, this._options.unformatted_content_delimiter) {
      var d = this._input.get_literal_regexp(this._options.unformatted_content_delimiter);
      this.__patterns.unformatted_content_delimiter = f.matching(d).until_after(d);
    }
  };
  return s.prototype = new t(), s.prototype._is_comment = function(l) {
    return !1;
  }, s.prototype._is_opening = function(l) {
    return l.type === a.TAG_OPEN || l.type === a.CONTROL_FLOW_OPEN;
  }, s.prototype._is_closing = function(l, u) {
    return l.type === a.TAG_CLOSE && u && ((l.text === ">" || l.text === "/>") && u.text[0] === "<" || l.text === "}}" && u.text[0] === "{" && u.text[1] === "{") || l.type === a.CONTROL_FLOW_CLOSE && l.text === "}" && u.text.endsWith("{");
  }, s.prototype._reset = function() {
    this._current_tag_name = "";
  }, s.prototype._get_next_token = function(l, u) {
    var c = null;
    this._readWhitespace();
    var f = this._input.peek();
    return f === null ? this._create_token(a.EOF, "") : (c = c || this._read_open_handlebars(f, u), c = c || this._read_attribute(f, l, u), c = c || this._read_close(f, u), c = c || this._read_control_flows(f, u), c = c || this._read_raw_content(f, l, u), c = c || this._read_content_word(f, u), c = c || this._read_comment_or_cdata(f), c = c || this._read_processing(f), c = c || this._read_open(f, u), c = c || this._create_token(a.UNKNOWN, this._input.next()), c);
  }, s.prototype._read_comment_or_cdata = function(l) {
    var u = null, c = null, f = null;
    if (l === "<") {
      var d = this._input.peek(1);
      d === "!" && (c = this.__patterns.comment.read(), c ? (f = o.get_directives(c), f && f.ignore === "start" && (c += o.readIgnored(this._input))) : c = this.__patterns.cdata.read()), c && (u = this._create_token(a.COMMENT, c), u.directives = f);
    }
    return u;
  }, s.prototype._read_processing = function(l) {
    var u = null, c = null, f = null;
    if (l === "<") {
      var d = this._input.peek(1);
      (d === "!" || d === "?") && (c = this.__patterns.conditional_comment.read(), c = c || this.__patterns.processing.read()), c && (u = this._create_token(a.COMMENT, c), u.directives = f);
    }
    return u;
  }, s.prototype._read_open = function(l, u) {
    var c = null, f = null;
    return (!u || u.type === a.CONTROL_FLOW_OPEN) && l === "<" && (c = this._input.next(), this._input.peek() === "/" && (c += this._input.next()), c += this.__patterns.element_name.read(), f = this._create_token(a.TAG_OPEN, c)), f;
  }, s.prototype._read_open_handlebars = function(l, u) {
    var c = null, f = null;
    return (!u || u.type === a.CONTROL_FLOW_OPEN) && this._options.indent_handlebars && l === "{" && this._input.peek(1) === "{" && (this._input.peek(2) === "!" ? (c = this.__patterns.handlebars_comment.read(), c = c || this.__patterns.handlebars.read(), f = this._create_token(a.COMMENT, c)) : (c = this.__patterns.handlebars_open.read(), f = this._create_token(a.TAG_OPEN, c))), f;
  }, s.prototype._read_control_flows = function(l, u) {
    var c = "", f = null;
    if (!this._options.templating.includes("angular") || !this._options.indent_handlebars)
      return f;
    if (l === "@") {
      if (c = this.__patterns.angular_control_flow_start.read(), c === "")
        return f;
      for (var d = c.endsWith("(") ? 1 : 0, h = 0; !(c.endsWith("{") && d === h); ) {
        var p = this._input.next();
        if (p === null)
          break;
        p === "(" ? d++ : p === ")" && h++, c += p;
      }
      f = this._create_token(a.CONTROL_FLOW_OPEN, c);
    } else l === "}" && u && u.type === a.CONTROL_FLOW_OPEN && (c = this._input.next(), f = this._create_token(a.CONTROL_FLOW_CLOSE, c));
    return f;
  }, s.prototype._read_close = function(l, u) {
    var c = null, f = null;
    return u && u.type === a.TAG_OPEN && (u.text[0] === "<" && (l === ">" || l === "/" && this._input.peek(1) === ">") ? (c = this._input.next(), l === "/" && (c += this._input.next()), f = this._create_token(a.TAG_CLOSE, c)) : u.text[0] === "{" && l === "}" && this._input.peek(1) === "}" && (this._input.next(), this._input.next(), f = this._create_token(a.TAG_CLOSE, "}}"))), f;
  }, s.prototype._read_attribute = function(l, u, c) {
    var f = null, d = "";
    if (c && c.text[0] === "<")
      if (l === "=")
        f = this._create_token(a.EQUALS, this._input.next());
      else if (l === '"' || l === "'") {
        var h = this._input.next();
        l === '"' ? h += this.__patterns.double_quote.read() : h += this.__patterns.single_quote.read(), f = this._create_token(a.VALUE, h);
      } else
        d = this.__patterns.attribute.read(), d && (u.type === a.EQUALS ? f = this._create_token(a.VALUE, d) : f = this._create_token(a.ATTRIBUTE, d));
    return f;
  }, s.prototype._is_content_unformatted = function(l) {
    return this._options.void_elements.indexOf(l) === -1 && (this._options.content_unformatted.indexOf(l) !== -1 || this._options.unformatted.indexOf(l) !== -1);
  }, s.prototype._read_raw_content = function(l, u, c) {
    var f = "";
    if (c && c.text[0] === "{")
      f = this.__patterns.handlebars_raw_close.read();
    else if (u.type === a.TAG_CLOSE && u.opened.text[0] === "<" && u.text[0] !== "/") {
      var d = u.opened.text.substr(1).toLowerCase();
      if (d === "script" || d === "style") {
        var h = this._read_comment_or_cdata(l);
        if (h)
          return h.type = a.TEXT, h;
        f = this._input.readUntil(new RegExp("</" + d + "[\\n\\r\\t ]*?>", "ig"));
      } else this._is_content_unformatted(d) && (f = this._input.readUntil(new RegExp("</" + d + "[\\n\\r\\t ]*?>", "ig")));
    }
    return f ? this._create_token(a.TEXT, f) : null;
  }, s.prototype._read_content_word = function(l, u) {
    var c = "";
    if (this._options.unformatted_content_delimiter && l === this._options.unformatted_content_delimiter[0] && (c = this.__patterns.unformatted_content_delimiter.read()), c || (c = u && u.type === a.CONTROL_FLOW_OPEN ? this.__patterns.word_control_flow_close_excluded.read() : this.__patterns.word.read()), c)
      return this._create_token(a.TEXT, c);
  }, kx.Tokenizer = s, kx.TOKEN = a, kx;
}
var See;
function jAt() {
  if (See) return VD;
  See = 1;
  var t = Hme().Options, e = RB().Output, n = Oee().Tokenizer, r = Oee().TOKEN, i = /\r\n|[\r\n]/, a = /\r\n|[\r\n]/g, o = function(g, m) {
    this.indent_level = 0, this.alignment_size = 0, this.max_preserve_newlines = g.max_preserve_newlines, this.preserve_newlines = g.preserve_newlines, this._output = new e(g, m);
  };
  o.prototype.current_line_has_match = function(g) {
    return this._output.current_line.has_match(g);
  }, o.prototype.set_space_before_token = function(g, m) {
    this._output.space_before_token = g, this._output.non_breaking_space = m;
  }, o.prototype.set_wrap_point = function() {
    this._output.set_indent(this.indent_level, this.alignment_size), this._output.set_wrap_point();
  }, o.prototype.add_raw_token = function(g) {
    this._output.add_raw_token(g);
  }, o.prototype.print_preserved_newlines = function(g) {
    var m = 0;
    g.type !== r.TEXT && g.previous.type !== r.TEXT && (m = g.newlines ? 1 : 0), this.preserve_newlines && (m = g.newlines < this.max_preserve_newlines + 1 ? g.newlines : this.max_preserve_newlines + 1);
    for (var y = 0; y < m; y++)
      this.print_newline(y > 0);
    return m !== 0;
  }, o.prototype.traverse_whitespace = function(g) {
    return g.whitespace_before || g.newlines ? (this.print_preserved_newlines(g) || (this._output.space_before_token = !0), !0) : !1;
  }, o.prototype.previous_token_wrapped = function() {
    return this._output.previous_token_wrapped;
  }, o.prototype.print_newline = function(g) {
    this._output.add_new_line(g);
  }, o.prototype.print_token = function(g) {
    g.text && (this._output.set_indent(this.indent_level, this.alignment_size), this._output.add_token(g.text));
  }, o.prototype.indent = function() {
    this.indent_level++;
  }, o.prototype.deindent = function() {
    this.indent_level > 0 && (this.indent_level--, this._output.set_indent(this.indent_level, this.alignment_size));
  }, o.prototype.get_full_indent = function(g) {
    return g = this.indent_level + (g || 0), g < 1 ? "" : this._output.get_indent_string(g);
  };
  var s = function(g) {
    for (var m = null, y = g.next; y.type !== r.EOF && g.closed !== y; ) {
      if (y.type === r.ATTRIBUTE && y.text === "type") {
        y.next && y.next.type === r.EQUALS && y.next.next && y.next.next.type === r.VALUE && (m = y.next.next.text);
        break;
      }
      y = y.next;
    }
    return m;
  }, l = function(g, m) {
    var y = null, _ = null;
    return m.closed ? (g === "script" ? y = "text/javascript" : g === "style" && (y = "text/css"), y = s(m) || y, y.search("text/css") > -1 ? _ = "css" : y.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/) > -1 ? _ = "javascript" : y.search(/(text|application|dojo)\/(x-)?(html)/) > -1 ? _ = "html" : y.search(/test\/null/) > -1 && (_ = "null"), _) : null;
  };
  function u(g, m) {
    return m.indexOf(g) !== -1;
  }
  function c(g, m, y) {
    this.parent = g || null, this.tag = m ? m.tag_name : "", this.indent_level = y || 0, this.parser_token = m || null;
  }
  function f(g) {
    this._printer = g, this._current_frame = null;
  }
  f.prototype.get_parser_token = function() {
    return this._current_frame ? this._current_frame.parser_token : null;
  }, f.prototype.record_tag = function(g) {
    var m = new c(this._current_frame, g, this._printer.indent_level);
    this._current_frame = m;
  }, f.prototype._try_pop_frame = function(g) {
    var m = null;
    return g && (m = g.parser_token, this._printer.indent_level = g.indent_level, this._current_frame = g.parent), m;
  }, f.prototype._get_frame = function(g, m) {
    for (var y = this._current_frame; y && g.indexOf(y.tag) === -1; ) {
      if (m && m.indexOf(y.tag) !== -1) {
        y = null;
        break;
      }
      y = y.parent;
    }
    return y;
  }, f.prototype.try_pop = function(g, m) {
    var y = this._get_frame([g], m);
    return this._try_pop_frame(y);
  }, f.prototype.indent_to_tag = function(g) {
    var m = this._get_frame(g);
    m && (this._printer.indent_level = m.indent_level);
  };
  function d(g, m, y, _) {
    this._source_text = g || "", m = m || {}, this._js_beautify = y, this._css_beautify = _, this._tag_stack = null;
    var O = new t(m, "html");
    this._options = O, this._is_wrap_attributes_force = this._options.wrap_attributes.substr(0, 5) === "force", this._is_wrap_attributes_force_expand_multiline = this._options.wrap_attributes === "force-expand-multiline", this._is_wrap_attributes_force_aligned = this._options.wrap_attributes === "force-aligned", this._is_wrap_attributes_aligned_multiple = this._options.wrap_attributes === "aligned-multiple", this._is_wrap_attributes_preserve = this._options.wrap_attributes.substr(0, 8) === "preserve", this._is_wrap_attributes_preserve_aligned = this._options.wrap_attributes === "preserve-aligned";
  }
  d.prototype.beautify = function() {
    if (this._options.disabled)
      return this._source_text;
    var g = this._source_text, m = this._options.eol;
    this._options.eol === "auto" && (m = `
`, g && i.test(g) && (m = g.match(i)[0])), g = g.replace(a, `
`);
    var y = g.match(/^[\t ]*/)[0], _ = {
      text: "",
      type: ""
    }, O = new h(), S = new o(this._options, y), x = new n(g, this._options).tokenize();
    this._tag_stack = new f(S);
    for (var C = null, P = x.next(); P.type !== r.EOF; )
      P.type === r.TAG_OPEN || P.type === r.COMMENT ? (C = this._handle_tag_open(S, P, O, _, x), O = C) : P.type === r.ATTRIBUTE || P.type === r.EQUALS || P.type === r.VALUE || P.type === r.TEXT && !O.tag_complete ? C = this._handle_inside_tag(S, P, O, _) : P.type === r.TAG_CLOSE ? C = this._handle_tag_close(S, P, O) : P.type === r.TEXT ? C = this._handle_text(S, P, O) : P.type === r.CONTROL_FLOW_OPEN ? C = this._handle_control_flow_open(S, P) : P.type === r.CONTROL_FLOW_CLOSE ? C = this._handle_control_flow_close(S, P) : S.add_raw_token(P), _ = C, P = x.next();
    var $ = S._output.get_code(m);
    return $;
  }, d.prototype._handle_control_flow_open = function(g, m) {
    var y = {
      text: m.text,
      type: m.type
    };
    return g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), m.newlines ? g.print_preserved_newlines(m) : g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), g.print_token(m), g.indent(), y;
  }, d.prototype._handle_control_flow_close = function(g, m) {
    var y = {
      text: m.text,
      type: m.type
    };
    return g.deindent(), m.newlines ? g.print_preserved_newlines(m) : g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), g.print_token(m), y;
  }, d.prototype._handle_tag_close = function(g, m, y) {
    var _ = {
      text: m.text,
      type: m.type
    };
    return g.alignment_size = 0, y.tag_complete = !0, g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), y.is_unformatted ? g.add_raw_token(m) : (y.tag_start_char === "<" && (g.set_space_before_token(m.text[0] === "/", !0), this._is_wrap_attributes_force_expand_multiline && y.has_wrapped_attrs && g.print_newline(!1)), g.print_token(m)), y.indent_content && !(y.is_unformatted || y.is_content_unformatted) && (g.indent(), y.indent_content = !1), !y.is_inline_element && !(y.is_unformatted || y.is_content_unformatted) && g.set_wrap_point(), _;
  }, d.prototype._handle_inside_tag = function(g, m, y, _) {
    var O = y.has_wrapped_attrs, S = {
      text: m.text,
      type: m.type
    };
    return g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), y.is_unformatted ? g.add_raw_token(m) : y.tag_start_char === "{" && m.type === r.TEXT ? g.print_preserved_newlines(m) ? (m.newlines = 0, g.add_raw_token(m)) : g.print_token(m) : (m.type === r.ATTRIBUTE ? g.set_space_before_token(!0) : (m.type === r.EQUALS || m.type === r.VALUE && m.previous.type === r.EQUALS) && g.set_space_before_token(!1), m.type === r.ATTRIBUTE && y.tag_start_char === "<" && ((this._is_wrap_attributes_preserve || this._is_wrap_attributes_preserve_aligned) && (g.traverse_whitespace(m), O = O || m.newlines !== 0), this._is_wrap_attributes_force && y.attr_count >= this._options.wrap_attributes_min_attrs && (_.type !== r.TAG_OPEN || // ie. second attribute and beyond
    this._is_wrap_attributes_force_expand_multiline) && (g.print_newline(!1), O = !0)), g.print_token(m), O = O || g.previous_token_wrapped(), y.has_wrapped_attrs = O), S;
  }, d.prototype._handle_text = function(g, m, y) {
    var _ = {
      text: m.text,
      type: "TK_CONTENT"
    };
    return y.custom_beautifier_name ? this._print_custom_beatifier_text(g, m, y) : y.is_unformatted || y.is_content_unformatted ? g.add_raw_token(m) : (g.traverse_whitespace(m), g.print_token(m)), _;
  }, d.prototype._print_custom_beatifier_text = function(g, m, y) {
    var _ = this;
    if (m.text !== "") {
      var O = m.text, S, x = 1, C = "", P = "";
      y.custom_beautifier_name === "javascript" && typeof this._js_beautify == "function" ? S = this._js_beautify : y.custom_beautifier_name === "css" && typeof this._css_beautify == "function" ? S = this._css_beautify : y.custom_beautifier_name === "html" && (S = function(N, I) {
        var B = new d(N, I, _._js_beautify, _._css_beautify);
        return B.beautify();
      }), this._options.indent_scripts === "keep" ? x = 0 : this._options.indent_scripts === "separate" && (x = -g.indent_level);
      var $ = g.get_full_indent(x);
      if (O = O.replace(/\n[ \t]*$/, ""), y.custom_beautifier_name !== "html" && O[0] === "<" && O.match(/^(<!--|<!\[CDATA\[)/)) {
        var T = /^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(O);
        if (!T) {
          g.add_raw_token(m);
          return;
        }
        C = $ + T[1] + `
`, O = T[4], T[5] && (P = $ + T[5]), O = O.replace(/\n[ \t]*$/, ""), (T[2] || T[3].indexOf(`
`) !== -1) && (T = T[3].match(/[ \t]+$/), T && (m.whitespace_before = T[0]));
      }
      if (O)
        if (S) {
          var E = function() {
            this.eol = `
`;
          };
          E.prototype = this._options.raw_options;
          var M = new E();
          O = S($ + O, M);
        } else {
          var R = m.whitespace_before;
          R && (O = O.replace(new RegExp(`
(` + R + ")?", "g"), `
`)), O = $ + O.replace(/\n/g, `
` + $);
        }
      C && (O ? O = C + O + `
` + P : O = C + P), g.print_newline(!1), O && (m.text = O, m.whitespace_before = "", m.newlines = 0, g.add_raw_token(m), g.print_newline(!0));
    }
  }, d.prototype._handle_tag_open = function(g, m, y, _, O) {
    var S = this._get_tag_open_token(m);
    if ((y.is_unformatted || y.is_content_unformatted) && !y.is_empty_element && m.type === r.TAG_OPEN && !S.is_start_tag ? (g.add_raw_token(m), S.start_tag_token = this._tag_stack.try_pop(S.tag_name)) : (g.traverse_whitespace(m), this._set_tag_position(g, m, S, y, _), S.is_inline_element || g.set_wrap_point(), g.print_token(m)), S.is_start_tag && this._is_wrap_attributes_force) {
      var x = 0, C;
      do
        C = O.peek(x), C.type === r.ATTRIBUTE && (S.attr_count += 1), x += 1;
      while (C.type !== r.EOF && C.type !== r.TAG_CLOSE);
    }
    return (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) && (S.alignment_size = m.text.length + 1), !S.tag_complete && !S.is_unformatted && (g.alignment_size = S.alignment_size), S;
  };
  var h = function(g, m) {
    if (this.parent = g || null, this.text = "", this.type = "TK_TAG_OPEN", this.tag_name = "", this.is_inline_element = !1, this.is_unformatted = !1, this.is_content_unformatted = !1, this.is_empty_element = !1, this.is_start_tag = !1, this.is_end_tag = !1, this.indent_content = !1, this.multiline_content = !1, this.custom_beautifier_name = null, this.start_tag_token = null, this.attr_count = 0, this.has_wrapped_attrs = !1, this.alignment_size = 0, this.tag_complete = !1, this.tag_start_char = "", this.tag_check = "", !m)
      this.tag_complete = !0;
    else {
      var y;
      this.tag_start_char = m.text[0], this.text = m.text, this.tag_start_char === "<" ? (y = m.text.match(/^<([^\s>]*)/), this.tag_check = y ? y[1] : "") : (y = m.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/), this.tag_check = y ? y[1] : "", (m.text.startsWith("{{#>") || m.text.startsWith("{{~#>")) && this.tag_check[0] === ">" && (this.tag_check === ">" && m.next !== null ? this.tag_check = m.next.text.split(" ")[0] : this.tag_check = m.text.split(">")[1])), this.tag_check = this.tag_check.toLowerCase(), m.type === r.COMMENT && (this.tag_complete = !0), this.is_start_tag = this.tag_check.charAt(0) !== "/", this.tag_name = this.is_start_tag ? this.tag_check : this.tag_check.substr(1), this.is_end_tag = !this.is_start_tag || m.closed && m.closed.text === "/>";
      var _ = 2;
      this.tag_start_char === "{" && this.text.length >= 3 && this.text.charAt(2) === "~" && (_ = 3), this.is_end_tag = this.is_end_tag || this.tag_start_char === "{" && (this.text.length < 3 || /[^#\^]/.test(this.text.charAt(_)));
    }
  };
  d.prototype._get_tag_open_token = function(g) {
    var m = new h(this._tag_stack.get_parser_token(), g);
    return m.alignment_size = this._options.wrap_attributes_indent_size, m.is_end_tag = m.is_end_tag || u(m.tag_check, this._options.void_elements), m.is_empty_element = m.tag_complete || m.is_start_tag && m.is_end_tag, m.is_unformatted = !m.tag_complete && u(m.tag_check, this._options.unformatted), m.is_content_unformatted = !m.is_empty_element && u(m.tag_check, this._options.content_unformatted), m.is_inline_element = u(m.tag_name, this._options.inline) || this._options.inline_custom_elements && m.tag_name.includes("-") || m.tag_start_char === "{", m;
  }, d.prototype._set_tag_position = function(g, m, y, _, O) {
    if (y.is_empty_element || (y.is_end_tag ? y.start_tag_token = this._tag_stack.try_pop(y.tag_name) : (this._do_optional_end_element(y) && (y.is_inline_element || g.print_newline(!1)), this._tag_stack.record_tag(y), (y.tag_name === "script" || y.tag_name === "style") && !(y.is_unformatted || y.is_content_unformatted) && (y.custom_beautifier_name = l(y.tag_check, m)))), u(y.tag_check, this._options.extra_liners) && (g.print_newline(!1), g._output.just_added_blankline() || g.print_newline(!0)), y.is_empty_element) {
      if (y.tag_start_char === "{" && y.tag_check === "else") {
        this._tag_stack.indent_to_tag(["if", "unless", "each"]), y.indent_content = !0;
        var S = g.current_line_has_match(/{{#if/);
        S || g.print_newline(!1);
      }
      y.tag_name === "!--" && O.type === r.TAG_CLOSE && _.is_end_tag && y.text.indexOf(`
`) === -1 || (y.is_inline_element || y.is_unformatted || g.print_newline(!1), this._calcluate_parent_multiline(g, y));
    } else if (y.is_end_tag) {
      var x = !1;
      x = y.start_tag_token && y.start_tag_token.multiline_content, x = x || !y.is_inline_element && !(_.is_inline_element || _.is_unformatted) && !(O.type === r.TAG_CLOSE && y.start_tag_token === _) && O.type !== "TK_CONTENT", (y.is_content_unformatted || y.is_unformatted) && (x = !1), x && g.print_newline(!1);
    } else
      y.indent_content = !y.custom_beautifier_name, y.tag_start_char === "<" && (y.tag_name === "html" ? y.indent_content = this._options.indent_inner_html : y.tag_name === "head" ? y.indent_content = this._options.indent_head_inner_html : y.tag_name === "body" && (y.indent_content = this._options.indent_body_inner_html)), !(y.is_inline_element || y.is_unformatted) && (O.type !== "TK_CONTENT" || y.is_content_unformatted) && g.print_newline(!1), this._calcluate_parent_multiline(g, y);
  }, d.prototype._calcluate_parent_multiline = function(g, m) {
    m.parent && g._output.just_added_newline() && !((m.is_inline_element || m.is_unformatted) && m.parent.is_inline_element) && (m.parent.multiline_content = !0);
  };
  var p = ["address", "article", "aside", "blockquote", "details", "div", "dl", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hr", "main", "menu", "nav", "ol", "p", "pre", "section", "table", "ul"], v = ["a", "audio", "del", "ins", "map", "noscript", "video"];
  return d.prototype._do_optional_end_element = function(g) {
    var m = null;
    if (!(g.is_empty_element || !g.is_start_tag || !g.parent)) {
      if (g.tag_name === "body")
        m = m || this._tag_stack.try_pop("head");
      else if (g.tag_name === "li")
        m = m || this._tag_stack.try_pop("li", ["ol", "ul", "menu"]);
      else if (g.tag_name === "dd" || g.tag_name === "dt")
        m = m || this._tag_stack.try_pop("dt", ["dl"]), m = m || this._tag_stack.try_pop("dd", ["dl"]);
      else if (g.parent.tag_name === "p" && p.indexOf(g.tag_name) !== -1) {
        var y = g.parent.parent;
        (!y || v.indexOf(y.tag_name) === -1) && (m = m || this._tag_stack.try_pop("p"));
      } else g.tag_name === "rp" || g.tag_name === "rt" ? (m = m || this._tag_stack.try_pop("rt", ["ruby", "rtc"]), m = m || this._tag_stack.try_pop("rp", ["ruby", "rtc"])) : g.tag_name === "optgroup" ? m = m || this._tag_stack.try_pop("optgroup", ["select"]) : g.tag_name === "option" ? m = m || this._tag_stack.try_pop("option", ["select", "datalist", "optgroup"]) : g.tag_name === "colgroup" ? m = m || this._tag_stack.try_pop("caption", ["table"]) : g.tag_name === "thead" ? (m = m || this._tag_stack.try_pop("caption", ["table"]), m = m || this._tag_stack.try_pop("colgroup", ["table"])) : g.tag_name === "tbody" || g.tag_name === "tfoot" ? (m = m || this._tag_stack.try_pop("caption", ["table"]), m = m || this._tag_stack.try_pop("colgroup", ["table"]), m = m || this._tag_stack.try_pop("thead", ["table"]), m = m || this._tag_stack.try_pop("tbody", ["table"])) : g.tag_name === "tr" ? (m = m || this._tag_stack.try_pop("caption", ["table"]), m = m || this._tag_stack.try_pop("colgroup", ["table"]), m = m || this._tag_stack.try_pop("tr", ["table", "thead", "tbody", "tfoot"])) : (g.tag_name === "th" || g.tag_name === "td") && (m = m || this._tag_stack.try_pop("td", ["table", "thead", "tbody", "tfoot", "tr"]), m = m || this._tag_stack.try_pop("th", ["table", "thead", "tbody", "tfoot", "tr"]));
      return g.parent = this._tag_stack.get_parser_token(), m;
    }
  }, VD.Beautifier = d, VD;
}
var xee;
function ZAt() {
  if (xee) return Rx.exports;
  xee = 1;
  var t = jAt().Beautifier, e = Hme().Options;
  function n(r, i, a, o) {
    var s = new t(r, i, a, o);
    return s.beautify();
  }
  return Rx.exports = n, Rx.exports.defaultOptions = function() {
    return new e();
  }, Rx.exports;
}
var wee;
function UAt() {
  if (wee) return sy;
  wee = 1;
  var t = QAt(), e = GAt(), n = ZAt();
  function r(i, a, o, s) {
    return o = o || t, s = s || e, n(i, a, o, s);
  }
  return r.defaultOptions = n.defaultOptions, sy.js = t, sy.css = e, sy.html = r, sy;
}
(function(t) {
  function e(n, r, i) {
    var a = function(o, s) {
      return n.js_beautify(o, s);
    };
    return a.js = n.js_beautify, a.css = r.css_beautify, a.html = i.html_beautify, a.js_beautify = n.js_beautify, a.css_beautify = r.css_beautify, a.html_beautify = i.html_beautify, a;
  }
  (function(n) {
    var r = UAt();
    r.js_beautify = r.js, r.css_beautify = r.css, r.html_beautify = r.html, n.exports = e(r, r, r);
  })(t);
})(Bme);
var XAt = Bme.exports;
const YAt = /* @__PURE__ */ g2(XAt), qAt = {
  indent_size: "2",
  indent_char: " ",
  max_preserve_newlines: "5",
  preserve_newlines: !0,
  keep_array_indentation: !1,
  break_chained_methods: !1,
  indent_scripts: "normal",
  brace_style: "collapse",
  space_before_conditional: !0,
  unescape_strings: !1,
  jslint_happy: !1,
  end_with_newline: !0,
  wrap_line_length: "0",
  indent_inner_html: !1,
  comma_first: !1,
  e4x: !1,
  indent_empty_lines: !1
}, KAt = ae({
  name: "DEditor",
  components: { Codemirror: A$t },
  props: {
    code: {
      type: String,
      default: ""
    }
  },
  emits: ["update:code", "change"],
  setup(t, { emit: e }) {
    const n = ee(null), r = ee(YAt(t.code, qAt));
    return {
      editorRef: n,
      modelValue: r,
      handleCodeChange: (a) => {
        try {
          e("update:code", a), e("change", a);
        } catch (o) {
          console.error(o);
          return;
        }
      },
      oneDark: V$t,
      javascript: IAt,
      json: zAt
    };
  }
});
function JAt(t, e, n, r, i, a) {
  const o = $r("Codemirror");
  return be(), Je(o, {
    ref: "editorRef",
    placeholder: "请输入",
    style: { height: "500px" },
    "model-value": t.modelValue,
    "tab-size": 2,
    "auto-focus": !1,
    "indent-with-tabs": !0,
    extensions: [
      t.oneDark,
      t.javascript(),
      t.json()
    ],
    onChange: t.handleCodeChange
  }, null, 8, ["model-value", "extensions", "onChange"]);
}
const eEt = /* @__PURE__ */ ui(KAt, [["render", JAt]]), tEt = ae({
  name: "DEditorModal",
  components: {
    Modal: uo,
    Editor: eEt
  },
  props: {
    title: {
      type: String,
      default: "编辑"
    },
    width: {
      type: Number,
      default: 800
    }
  },
  emits: ["ok"],
  setup(t, { emit: e }) {
    const n = ee(!1), r = ee("");
    return {
      open: (s) => {
        n.value = !0, r.value = s;
      },
      close: () => {
        n.value = !1;
      },
      code: r,
      handleOk: () => {
        e("ok", r.value), n.value = !1;
      },
      show: n
    };
  }
});
function nEt(t, e, n, r, i, a) {
  const o = $r("Editor"), s = $r("Modal");
  return be(), Je(s, {
    open: t.show,
    "onUpdate:open": e[1] || (e[1] = (l) => t.show = l),
    title: t.title,
    width: t.width,
    destroyOnClose: !0,
    onOk: t.handleOk
  }, {
    default: ke(() => [
      D(o, {
        code: t.code,
        "onUpdate:code": e[0] || (e[0] = (l) => t.code = l)
      }, null, 8, ["code"])
    ]),
    _: 1
  }, 8, ["open", "title", "width", "onOk"]);
}
const Nw = /* @__PURE__ */ ui(tEt, [["render", nEt]]);
Nw.install = (t) => (t.component(Nw.name, Nw), t);
const rEt = /* @__PURE__ */ tt("span", { class: "text-gray-500" }, "秒", -1), BB = /* @__PURE__ */ ae({
  __name: "DataConfig",
  props: {
    dataSource: {}
  },
  emits: ["change"],
  setup(t, { emit: e }) {
    const n = e, r = t, i = ee({
      sourceType: kr.STATIC,
      // 静态数据相关
      data: "",
      // 接口相关
      url: "",
      method: "",
      params: {},
      headers: {},
      refreshTime: 0,
      // 数据处理
      dataProcess: "",
      // 基础数据源
      basicPath: "",
      // 视图源
      viewCode: ""
    }), a = (f) => {
      i.value.refreshTime = f === 0 || f >= 60 ? f : 60;
    };
    let o;
    const s = ee(null), l = (f) => {
      var d;
      o = f, (d = s.value) == null || d.open(
        typeof i.value[f] == "string" ? i.value[f] : JSON.stringify(i.value[f])
      );
    }, u = (f) => {
      try {
        i.value[o] = JSON.parse(f);
      } catch {
        i.value[o] = f;
      }
    }, c = async (f) => {
      const d = await _He(f);
      console.log(d), f === "table" ? (i.value.basicPath = d.value, i.value.viewCode = "") : (i.value.viewCode = d.value, i.value.basicPath = "");
    };
    return me(
      () => r.dataSource,
      (f) => {
        Object.assign(i.value, f || {});
      },
      { immediate: !0 }
    ), me(
      () => i.value,
      (f) => {
        n("change", f);
      },
      { deep: !0 }
    ), (f, d) => (be(), Ue(Wt, null, [
      D(z(Gr), {
        size: "small",
        layout: "horizontal",
        model: i.value,
        "label-col": { span: 8 },
        "wrapper-col": { span: 16 }
      }, {
        default: ke(() => [
          D(z(Gr).Item, {
            label: "数据源",
            name: "sourceType"
          }, {
            default: ke(() => [
              D(z(Ca), {
                value: i.value.sourceType,
                "onUpdate:value": d[0] || (d[0] = (h) => i.value.sourceType = h)
              }, {
                default: ke(() => [
                  D(z(Ev), {
                    value: z(kr).STATIC
                  }, {
                    default: ke(() => [
                      Pn("静态数据")
                    ]),
                    _: 1
                  }, 8, ["value"]),
                  D(z(Ev), {
                    value: z(kr).API
                  }, {
                    default: ke(() => [
                      Pn("API")
                    ]),
                    _: 1
                  }, 8, ["value"]),
                  D(z(Ev), {
                    value: z(kr).BASIC_PATH
                  }, {
                    default: ke(() => [
                      Pn("基础数据源")
                    ]),
                    _: 1
                  }, 8, ["value"]),
                  D(z(Ev), {
                    value: z(kr).VIEW_CODE
                  }, {
                    default: ke(() => [
                      Pn("视图源")
                    ]),
                    _: 1
                  }, 8, ["value"])
                ]),
                _: 1
              }, 8, ["value"])
            ]),
            _: 1
          }),
          i.value.sourceType === z(kr).STATIC ? (be(), Je(z(Gr).Item, {
            key: 0,
            label: "数据",
            name: "data"
          }, {
            default: ke(() => [
              D(z(ra), {
                type: "default",
                size: "small",
                onClick: d[1] || (d[1] = (h) => l("data"))
              }, {
                default: ke(() => [
                  Pn("编辑")
                ]),
                _: 1
              })
            ]),
            _: 1
          })) : i.value.sourceType === z(kr).API ? (be(), Ue(Wt, { key: 1 }, [
            D(z(Gr).Item, {
              label: "接口地址",
              name: "url"
            }, {
              default: ke(() => [
                D(z(Cr).TextArea, {
                  "auto-size": { minRows: 5 },
                  placeholder: "请输入接口地址",
                  value: i.value.url,
                  "onUpdate:value": d[2] || (d[2] = (h) => i.value.url = h)
                }, null, 8, ["value"])
              ]),
              _: 1
            }),
            D(z(Gr).Item, {
              label: "请求方式",
              name: "method"
            }, {
              default: ke(() => [
                D(z(Fh), {
                  value: i.value.method,
                  "onUpdate:value": d[3] || (d[3] = (h) => i.value.method = h)
                }, {
                  default: ke(() => [
                    D(z(Ta), { value: "GET" }, {
                      default: ke(() => [
                        Pn("GET")
                      ]),
                      _: 1
                    }),
                    D(z(Ta), { value: "POST" }, {
                      default: ke(() => [
                        Pn("POST")
                      ]),
                      _: 1
                    })
                  ]),
                  _: 1
                }, 8, ["value"])
              ]),
              _: 1
            }),
            D(z(Gr).Item, {
              label: "刷新时间",
              name: "refreshTime"
            }, {
              default: ke(() => [
                D(z(Y_), {
                  value: i.value.refreshTime,
                  "onUpdate:value": d[4] || (d[4] = (h) => i.value.refreshTime = h),
                  step: 1,
                  style: { width: "100%" },
                  onChange: a
                }, {
                  addonAfter: ke(() => [
                    rEt
                  ]),
                  _: 1
                }, 8, ["value"])
              ]),
              _: 1
            }),
            D(z(Gr).Item, {
              label: "请求参数",
              name: "params"
            }, {
              default: ke(() => [
                D(z(ra), {
                  type: "default",
                  size: "small",
                  onClick: d[5] || (d[5] = (h) => l("params"))
                }, {
                  default: ke(() => [
                    Pn("编辑")
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }),
            D(z(Gr).Item, {
              label: "请求头",
              name: "headers"
            }, {
              default: ke(() => [
                D(z(ra), {
                  type: "default",
                  size: "small",
                  onClick: d[6] || (d[6] = (h) => l("headers"))
                }, {
                  default: ke(() => [
                    Pn("编辑")
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }),
            D(z(Gr).Item, {
              label: "数据处理",
              name: "dataProcess"
            }, {
              default: ke(() => [
                D(z(ra), {
                  type: "default",
                  size: "small",
                  onClick: d[7] || (d[7] = (h) => l("dataProcess"))
                }, {
                  default: ke(() => [
                    Pn("编辑")
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ], 64)) : i.value.sourceType === z(kr).BASIC_PATH ? (be(), Je(z(Gr).Item, {
            key: 2,
            label: "基础数据源",
            name: "basicPath"
          }, {
            default: ke(() => [
              D(z(Cr), {
                placeholder: "请输入或选择",
                value: i.value.basicPath,
                "onUpdate:value": d[9] || (d[9] = (h) => i.value.basicPath = h)
              }, {
                addonAfter: ke(() => [
                  D(z(vC), {
                    onClick: d[8] || (d[8] = (h) => c("table"))
                  })
                ]),
                _: 1
              }, 8, ["value"])
            ]),
            _: 1
          })) : i.value.sourceType === z(kr).VIEW_CODE ? (be(), Je(z(Gr).Item, {
            key: 3,
            label: "视图源",
            name: "viewCode"
          }, {
            default: ke(() => [
              D(z(Cr), {
                placeholder: "请输入或选择",
                value: i.value.viewCode,
                "onUpdate:value": d[11] || (d[11] = (h) => i.value.viewCode = h)
              }, {
                addonAfter: ke(() => [
                  D(z(vC), {
                    onClick: d[10] || (d[10] = (h) => c("view"))
                  })
                ]),
                _: 1
              }, 8, ["value"])
            ]),
            _: 1
          })) : Ot("", !0)
        ]),
        _: 1
      }, 8, ["model"]),
      D(z(Nw), {
        ref_key: "codeEditorRef",
        ref: s,
        title: "编辑",
        onOk: u
      }, null, 512)
    ], 64));
  }
}), Ar = {
  /* 标题 */
  title: {
    label: "标题",
    prop: "title",
    type: "group",
    children: [
      {
        label: " ",
        prop: "title.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "标题可见", value: !0 }]
        },
        defaultValue: [],
        format: (t, e) => {
          t.value["title.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        type: "dependency",
        label: "",
        prop: "",
        name: ["title.show"],
        children: (t) => t["title.show"].length ? [
          {
            label: "文本",
            prop: "title.text",
            type: "input",
            defaultValue: "图表标题"
          },
          {
            label: "位置",
            prop: "title.left",
            type: "position",
            defaultValue: "center"
          },
          {
            label: "样式",
            prop: "title.textStyle",
            type: "fontStyle",
            defaultValue: {
              color: "#ffffffff",
              size: 18,
              bold: !0,
              italic: !1
            },
            format: (e, n) => {
              e.value["title.textStyle"] = {
                color: n.color,
                fontSize: n.size,
                fontWeight: n.bold ? "bold" : "normal",
                fontStyle: n.italic ? "italic" : "normal"
              };
            },
            valueToForm: (e, n) => ({
              color: vn(n, "title.textStyle.color", "#FFFFFF"),
              size: vn(n, "title.textStyle.size", 16),
              bold: vn(n, "title.textStyle.fontWeight") === "bold",
              italic: vn(n, "title.textStyle.fontStyle") === "italic"
            })
          },
          {
            label: "背景",
            prop: "",
            type: "divider"
          },
          {
            label: "填充",
            prop: "title.backgroundColor",
            type: "backgroundSelect",
            fieldProps: {
              filterOptions: ["image"]
            },
            defaultValue: {
              type: "color",
              color: "#FFFFFF00"
            },
            format: (e, n) => {
              e.value["title.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
            },
            valueToForm: (e) => !e || e === "none" ? {
              type: "none",
              color: "#000000ff"
            } : {
              type: "color",
              color: e.color
            }
          },
          {
            label: "圆角",
            prop: "title.borderRadius",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 0
          }
        ] : []
      }
    ]
  },
  /* 图例 */
  legend: {
    label: "图例",
    prop: "legend",
    type: "group",
    children: [
      {
        label: " ",
        prop: "legend.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "图例可见", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          t.value["legend.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        type: "dependency",
        label: "",
        prop: "",
        name: ["legend.show"],
        children: (t) => t["legend.show"].length ? [
          {
            label: "位置",
            prop: "legend.position",
            type: "position",
            fieldProps: {
              type: "round"
            },
            defaultValue: "top",
            format: (e, n) => {
              switch (["left", "right"].includes(n) ? e.value["legend.orient"] = "vertical" : e.value["legend.orient"] = "horizontal", n) {
                case "bottom":
                  e.value["legend.top"] = "auto", e.value["legend.right"] = "auto", e.value["legend.bottom"] = 8, e.value["legend.left"] = "center";
                  break;
                case "left":
                  e.value["legend.bottom"] = "auto", e.value["legend.right"] = "auto", e.value["legend.left"] = 8, e.value["legend.top"] = "center";
                  break;
                case "right":
                  e.value["legend.bottom"] = "auto", e.value["legend.left"] = "auto", e.value["legend.right"] = 8, e.value["legend.top"] = "center";
                  break;
                default:
                  e.value["legend.bottom"] = "auto", e.value["legend.right"] = "auto", e.value["legend.top"] = 32, e.value["legend.left"] = "center";
              }
            },
            valueToForm: (e, n) => vn(n, "legend.orient") === "vertical" ? e === "top" ? "top" : e === "bottom" ? "bottom" : "left" : vn(n, "legend.bottom") === 8 && vn(n, "legend.left") === "center" ? "bottom" : "top"
          },
          {
            label: "样式",
            prop: "legend.textStyle",
            type: "fontStyle",
            defaultValue: {
              color: "#000000ff",
              size: 12,
              bold: !1,
              italic: !1
            },
            format: (e, n) => {
              e.value["legend.textStyle"] = {
                color: n.color,
                fontSize: n.size,
                fontWeight: n.bold ? "bold" : "normal",
                fontStyle: n.italic ? "italic" : "normal"
              };
            },
            valueToForm: (e, n) => ({
              color: vn(n, "legend.textStyle.color", "#000000ff"),
              size: vn(n, "legend.textStyle.fontSize", 12),
              bold: vn(n, "legend.textStyle.fontWeight") === "bold",
              italic: vn(n, "legend.textStyle.fontStyle") === "italic"
            })
          },
          {
            label: "边框",
            prop: "",
            type: "divider"
          },
          {
            label: "线宽",
            prop: "legend.borderWidth",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 0
          },
          {
            label: "颜色",
            prop: "legend.borderColor",
            type: "colorSelect",
            defaultValue: "#ccc"
          },
          {
            label: "圆角",
            prop: "legend.borderRadius",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 0
          },
          {
            label: "背景",
            prop: "",
            type: "divider"
          },
          {
            label: "背景",
            prop: "legend.backgroundColor",
            type: "backgroundSelect",
            fieldProps: {
              filterOptions: ["image"]
            },
            defaultValue: {
              type: "color",
              color: "#fff"
            },
            format: (e, n) => {
              e.value["legend.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
            },
            valueToForm: (e) => !e || e === "none" ? {
              type: "none"
            } : {
              type: "color",
              color: e.color
            }
          },
          {
            label: "阴影",
            prop: "legend.shadowBlur",
            type: "radioGroup",
            fieldProps: {
              options: [
                { label: "开启", value: !0 },
                { label: "关闭", value: !1 }
              ]
            },
            defaultValue: !1,
            format: (e, n) => {
              n ? (e.value["legend.shadowBlur"] = 10, e.value["legend.shadowColor"] = e.value["legend.backgroundColor"] || "#000000ff", e.value["legend.shadowOffsetX"] = 3, e.value["legend.shadowOffsetY"] = 3) : (e.value["legend.shadowBlur"] = 0, e.value["legend.shadowColor"] = "transparent", e.value["legend.shadowOffsetX"] = 0, e.value["legend.shadowOffsetY"] = 0);
            },
            valueToForm: (e) => !!e
          }
        ] : []
      }
    ]
  },
  /* 系列 */
  series: {
    label: "系列",
    prop: "series",
    type: "group",
    children: [
      {
        label: "配色",
        prop: "color",
        type: "colorScheme",
        defaultValue: bC[0].color
      }
    ]
  },
  /* X轴 */
  xAxis: {
    label: "X 轴",
    prop: "xAxis",
    type: "group",
    children: [
      {
        label: "类型",
        prop: "xAxis.type",
        type: "select",
        fieldProps: {
          options: [
            { label: "类目坐标轴", value: "category" },
            { label: "数值坐标轴", value: "value" },
            { label: "时间坐标轴", value: "time" }
          ]
        },
        defaultValue: "category"
      },
      {
        label: " ",
        prop: "xAxis.showName",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "显示轴标题", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          e != null && e.length ? (t.value["xAxis.showName"] = !0, t.value["xAxis.name"] = "X轴标题", t.value["xAxis.nameGap"] = 25) : (t.value["xAxis.showName"] = !1, t.value["xAxis.name"] = "", t.value["xAxis.nameGap"] = 15, t.value["xAxis.nameGap"] = 15);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["xAxis.showName"],
        children: (t) => t["xAxis.showName"].length ? [
          {
            label: "标题内容",
            prop: "xAxis.name",
            type: "input",
            defaultValue: "X 轴标题",
            format: (e, n) => {
              e.value["xAxis.showName"] && (e.value["xAxis.name"] = n, e.value["xAxis.nameGap"] = 25);
            },
            valueToForm: (e) => e || "X 轴标题"
          },
          {
            label: "标题位置",
            prop: "xAxis.nameLocation",
            type: "position",
            defaultValue: "center",
            format: (e, n) => {
              const r = {
                left: "start",
                center: "middle",
                right: "end"
              };
              e.value["xAxis.nameLocation"] = n ? r[n] : "middle";
            },
            valueToForm: (e) => ({
              start: "left",
              middle: "center",
              end: "right"
            })[e] || "center"
          },
          {
            label: "标题样式",
            prop: "xAxis.nameTextStyle",
            type: "fontStyle",
            defaultValue: {
              color: "#000000ff",
              size: 12,
              bold: !1,
              italic: !1
            },
            format: (e, n) => {
              e.value["xAxis.nameTextStyle"] = {
                color: n.color,
                fontSize: n.size,
                fontWeight: n.bold ? "bold" : "normal",
                fontStyle: n.italic ? "italic" : "normal"
              };
            },
            valueToForm: (e) => ({
              color: (e == null ? void 0 : e.color) || "#000000ff",
              size: (e == null ? void 0 : e.fontSize) || 12,
              bold: (e == null ? void 0 : e.fontWeight) === "bold" || !1,
              italic: (e == null ? void 0 : e.fontStyle) === "italic" || !1
            })
          }
        ] : []
      },
      {
        label: "轴线",
        prop: "",
        type: "divider"
      },
      {
        label: "线宽",
        prop: "xAxis.axisLine.lineStyle.width",
        type: "inputNumber",
        fieldProps: {
          addonAfter: "px"
        },
        defaultValue: 1
      },
      {
        label: "颜色",
        prop: "xAxis.axisLine.lineStyle.color",
        type: "colorSelect",
        defaultValue: "#ccc"
      },
      {
        label: "刻度",
        prop: "",
        type: "divider"
      },
      {
        label: " ",
        prop: "xAxis.axisTick.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "显示刻度", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          t.value["xAxis.axisTick.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["xAxis.axisTick.show"],
        children: (t) => t["xAxis.axisTick.show"].length ? [
          {
            label: "刻度宽度",
            prop: "xAxis.axisTick.lineStyle.width",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 5
          },
          {
            label: "刻度颜色",
            prop: "xAxis.axisTick.lineStyle.color",
            type: "colorSelect",
            defaultValue: "#ccc"
          }
        ] : []
      },
      {
        label: "标签",
        prop: "",
        type: "divider"
      },
      {
        label: " ",
        prop: "xAxis.axisLabel.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "显示标签", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          t.value["xAxis.axisLabel.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["xAxis.axisLabel.show"],
        children: (t) => t["xAxis.axisLabel.show"].length ? [
          {
            label: "样式",
            prop: "xAxis.axisLabel",
            type: "fontStyle",
            defaultValue: {
              color: "#000000ff",
              size: 12,
              bold: !1,
              italic: !1
            },
            format: (e, n) => {
              e.value["xAxis.axisLabel.color"] = n == null ? void 0 : n.color, e.value["xAxis.axisLabel.fontSize"] = n.size, e.value["xAxis.axisLabel.fontWeight"] = n.bold ? "bold" : "normal", e.value["xAxis.axisLabel.fontStyle"] = n.italic ? "italic" : "normal";
            },
            valueToForm: (e, n) => ({
              color: vn(n, "xAxis.axisLabel.color", "#000000ff"),
              size: vn(n, "xAxis.axisLabel.fontSize", 12),
              bold: vn(n, "xAxis.axisLabel.fontWeight") === "bold",
              italic: vn(n, "xAxis.axisLabel.fontStyle") === "italic"
            })
          }
        ] : []
      }
    ]
  },
  /* Y 轴 */
  yAxis: {
    label: "Y 轴",
    prop: "yAxis",
    type: "group",
    children: [
      {
        label: " ",
        prop: "yAxis.showName",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "显示轴标题", value: !0 }]
        },
        defaultValue: [],
        format: (t, e) => {
          e != null && e.length ? (t.value["yAxis.showName"] = !0, t.value["yAxis.name"] = "Y轴标题", t.value["yAxis.nameGap"] = 25) : (t.value["yAxis.showName"] = !1, t.value["yAxis.name"] = "", t.value["yAxis.nameGap"] = 15);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["yAxis.showName"],
        children: (t) => t["yAxis.showName"].length ? [
          {
            label: "标题内容",
            prop: "yAxis.name",
            type: "input",
            defaultValue: "Y 轴标题",
            format: (e, n) => {
              e.value["yAxis.showName"] ? (e.value["yAxis.name"] = n, e.value["yAxis.nameGap"] = 25) : (e.value["yAxis.name"] = "", e.value["yAxis.nameGap"] = 15);
            },
            valueToForm: (e) => e || "Y 轴标题"
          },
          {
            label: "标题位置",
            prop: "yAxis.nameLocation",
            type: "position",
            defaultValue: "center",
            format: (e, n) => {
              const r = {
                left: "start",
                center: "middle",
                right: "end"
              };
              e.value["yAxis.nameLocation"] = n ? r[n] : "middle";
            },
            valueToForm: (e) => ({
              start: "left",
              middle: "center",
              end: "right"
            })[e] || "center "
          },
          {
            label: "标题样式",
            prop: "yAxis.nameTextStyle",
            type: "fontStyle",
            defaultValue: {
              color: "#FFFFFFFF",
              size: 12,
              bold: !1,
              italic: !1
            },
            format: (e, n) => {
              e.value["yAxis.nameTextStyle"] = {
                color: n.color,
                fontSize: n.size,
                fontWeight: n.bold ? "bold" : "normal",
                fontStyle: n.italic ? "italic" : "normal"
              };
            },
            valueToForm: (e) => ({
              color: (e == null ? void 0 : e.color) || "#000000ff",
              size: (e == null ? void 0 : e.fontSize) || 12,
              bold: (e == null ? void 0 : e.fontWeight) === "bold" || !1,
              italic: (e == null ? void 0 : e.fontStyle) === "italic" || !1
            })
          }
        ] : []
      },
      {
        label: "轴线",
        prop: "",
        type: "divider"
      },
      {
        label: " ",
        prop: "yAxis.axisLine.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "显示轴线", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          t.value["yAxis.axisLine.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["yAxis.axisLine.show"],
        children: (t) => t["yAxis.axisLine.show"].length ? [
          {
            label: "线宽",
            prop: "yAxis.axisLine.lineStyle.width",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 1
          },
          {
            label: "颜色",
            prop: "yAxis.axisLine.lineStyle.color",
            type: "colorSelect",
            defaultValue: "#ccc"
          }
        ] : []
      },
      {
        label: "刻度",
        prop: "",
        type: "divider"
      },
      {
        label: " ",
        prop: "yAxis.axisTick.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "显示刻度", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          t.value["yAxis.axisTick.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["yAxis.axisTick.show"],
        children: (t) => t["yAxis.axisTick.show"].length ? [
          {
            label: "刻度长度",
            prop: "yAxis.axisTick.lineStyle.width",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 5
          },
          {
            label: "刻度颜色",
            prop: "yAxis.axisTick.lineStyle.color",
            type: "colorSelect",
            defaultValue: "#ccc"
          }
        ] : []
      },
      {
        label: "标签",
        prop: "",
        type: "divider"
      },
      {
        label: " ",
        prop: "yAxis.axisLabel.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "显示标签", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          t.value["yAxis.axisLabel.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["yAxis.axisLabel.show"],
        children: (t) => t["yAxis.axisLabel.show"].length ? [
          {
            label: "样式",
            prop: "yAxis.axisLabel",
            type: "fontStyle",
            defaultValue: {
              color: "#000000ff",
              size: 12,
              bold: !1,
              italic: !1
            },
            format: (e, n) => {
              e.value["yAxis.axisLabel.color"] = n == null ? void 0 : n.color, e.value["yAxis.axisLabel.fontSize"] = n.size, e.value["yAxis.axisLabel.fontWeight"] = n.bold ? "bold" : "normal", e.value["yAxis.axisLabel.fontStyle"] = n.italic ? "italic" : "normal";
            },
            valueToForm: (e, n) => ({
              color: vn(n, "yAxis.axisLabel.color", "#000000ff"),
              size: vn(n, "yAxis.axisLabel.fontSize", 12),
              bold: vn(n, "yAxis.axisLabel.fontWeight") === "bold",
              italic: vn(n, "yAxis.axisLabel.fontStyle") === "italic"
            })
          },
          {
            label: "旋转角度",
            prop: "yAxis.axisLabel.rotate",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "°",
              min: -90,
              max: 90,
              step: 1
            }
          }
        ] : []
      }
    ]
  },
  /* 提示 */
  tooltip: {
    label: "提示",
    prop: "tooltip",
    type: "group",
    children: [
      {
        label: " ",
        prop: "tooltip.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "提示可见", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          t.value["tooltip.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["tooltip.show"],
        children: (t) => t["tooltip.show"].length ? [
          {
            label: "文本",
            prop: "tooltip.formatter",
            type: "checkboxGroup",
            fieldProps: {
              options: [
                { label: "分类名", value: "b" },
                { label: "系列名", value: "a" },
                { label: "数值", value: "c" }
              ]
            },
            defaultValue: ["b"],
            format: (e, n) => {
              e.value["tooltip.formatter"] = n.map((r) => `{${r}}`).join(" ");
            },
            valueToForm: (e, n) => {
              var r, i;
              return (i = (r = vn(n, "tooltip.formatter")) == null ? void 0 : r.replace(/\{|\}/g, "")) == null ? void 0 : i.split(" ");
            }
          },
          // {
          //   label: "格式化",
          //   prop: "tooltip.valueFormatter",
          //   type: "input",
          //   tip: "支持字符串模板和回调函数",
          //   defaultValue: "(value, dataIndex) => value",
          // },
          {
            label: "样式",
            prop: "tooltip.textStyle",
            type: "fontStyle",
            defaultValue: {
              color: "#000000ff",
              size: 12,
              bold: !1,
              italic: !1
            },
            format: (e, n) => {
              e.value["tooltip.textStyle"] = {
                color: n.color,
                fontSize: n.size,
                fontWeight: n.bold ? "bold" : "normal",
                fontStyle: n.italic ? "italic" : "normal"
              };
            },
            valueToForm: (e, n) => ({
              color: vn(n, "tooltip.textStyle.color", "#000000ff"),
              size: vn(n, "tooltip.textStyle.fontSize", 12),
              bold: vn(n, "tooltip.textStyle.fontWeight") === "bold",
              italic: vn(n, "tooltip.textStyle.fontStyle") === "italic"
            })
          },
          {
            label: "边框",
            prop: "",
            type: "divider"
          },
          {
            label: "线宽",
            prop: "tooltip.borderWidth",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 1
          },
          {
            label: "颜色",
            prop: "tooltip.borderColor",
            type: "colorSelect",
            defaultValue: "#ccc"
          },
          {
            label: "圆角",
            prop: "tooltip.borderRadius",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 4
          },
          {
            label: "背景",
            prop: "",
            type: "divider"
          },
          {
            label: "填充",
            prop: "tooltip.backgroundColor",
            type: "backgroundSelect",
            fieldProps: {
              filterOptions: ["image"]
            },
            defaultValue: {
              type: "color",
              color: "#fff"
            },
            format: (e, n) => {
              e.value["tooltip.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
            },
            valueToForm: (e) => !e || e === "none" ? {
              type: "none"
            } : {
              type: "color",
              color: e
            }
          },
          {
            label: "阴影",
            prop: "tooltip.extraCssText",
            type: "radioGroup",
            fieldProps: {
              options: [
                { label: "开启", value: !0 },
                { label: "关闭", value: !1 }
              ]
            },
            defaultValue: !1,
            format: (e, n) => {
              e.value["tooltip.extraCssText"] = n ? "box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);" : "";
            },
            valueToForm: (e, n) => !!vn(n, "tooltip.extraCssText")
          }
        ] : []
      }
    ]
  },
  /* 标签 */
  label: {
    label: "标签",
    prop: "label",
    type: "group",
    children: [
      {
        label: " ",
        prop: "label.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "标签可见", value: !0 }]
        },
        defaultValue: [],
        format: (t, e) => {
          t.value["label.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["label.show"],
        children: (t) => t["label.show"].length ? [
          {
            label: "文本",
            prop: "label.formatter",
            type: "checkboxGroup",
            fieldProps: {
              options: [
                { label: "分类名", value: "b" },
                { label: "系列名", value: "a" },
                { label: "数值", value: "c" }
                // { label: "百分比", value: "percent" },
              ]
            },
            defaultValue: ["a"],
            format: (e, n) => {
              e.value["label.formatter"] = `{${n}}`;
            },
            valueToForm: (e, n) => {
              var r, i;
              return (i = (r = vn(n, "label.formatter")) == null ? void 0 : r.replace(/\{|\}/g, "")) == null ? void 0 : i.split(" ");
            }
          },
          {
            label: "样式",
            prop: "label.fontStyle",
            type: "fontStyle",
            defaultValue: {
              color: "#000000ff",
              size: 12,
              bold: !1,
              italic: !1
            },
            format: (e, n) => {
              e.value["label.color"] = n == null ? void 0 : n.color, e.value["label.fontSize"] = n.size, e.value["label.fontWeight"] = n.bold ? "bold" : "normal", e.value["label.fontStyle"] = n.italic ? "italic" : "normal";
            },
            valueToForm: (e, n) => ({
              color: vn(n, "label.color", "#000000ff"),
              size: vn(n, "label.fontSize", 12),
              bold: vn(n, "label.fontWeight") === "bold",
              italic: vn(n, "label.fontStyle") === "italic"
            })
          },
          {
            label: "布局",
            prop: "",
            type: "divider"
          },
          {
            label: "位置",
            prop: "label.position",
            type: "radioGroup",
            fieldProps: {
              options: [
                { label: "顶部", value: "top" },
                { label: "左侧", value: "left" },
                { label: "右侧", value: "right" },
                { label: "底部", value: "bottom" },
                { label: "内部", value: "inside" },
                { label: "内部左侧", value: "insideLeft" },
                { label: "内部右侧", value: "insideRight" },
                { label: "内部顶部", value: "insideTop" },
                { label: "内部底部", value: "insideBottom" }
              ]
            },
            defaultValue: "top"
          },
          {
            label: "文本方向",
            prop: "label.rotate",
            type: "radioGroup",
            fieldProps: {
              options: [
                { label: "水平", value: "horizontal" },
                { label: "垂直", value: "vertical" }
              ]
            },
            defaultValue: "horizontal",
            format: (e, n) => {
              e.value["label.rotate"] = n === "horizontal" ? 0 : 90;
            },
            valueToForm: (e) => e === 0 ? "horizontal" : "vertical"
          },
          {
            label: "边框",
            prop: "",
            type: "divider"
          },
          {
            label: "线宽",
            prop: "label.borderWidth",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 0
          },
          {
            label: "颜色",
            prop: "label.borderColor",
            type: "colorSelect",
            defaultValue: "#ccc"
          },
          {
            label: "圆角",
            prop: "label.borderRadius",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 0
          }
        ] : []
      }
    ]
  }
}, Gme = (t) => (JT("data-v-0b356b47"), t = t(), e2(), t), iEt = { class: "chart-config" }, aEt = { class: "config-tab" }, oEt = /* @__PURE__ */ Gme(() => /* @__PURE__ */ tt("span", null, "数据设置", -1)), sEt = /* @__PURE__ */ Gme(() => /* @__PURE__ */ tt("span", null, "样式设置", -1)), lEt = /* @__PURE__ */ ae({
  __name: "Config",
  props: L6,
  emits: ["change"],
  setup(t, { emit: e }) {
    const n = t, r = ee("1"), i = e, a = [
      {
        label: "线",
        prop: "",
        type: "divider"
      },
      {
        label: "线条样式",
        prop: "series.line.lineStyle.type",
        type: "select",
        fieldProps: {
          options: [
            { label: "实线", value: "solid" },
            { label: "虚线", value: "dashed" },
            { label: "点线", value: "dotted" }
          ]
        }
      },
      {
        label: "线宽",
        prop: "series.line.lineStyle.width",
        type: "inputNumber",
        fieldProps: {
          min: 0,
          addonAfter: "px"
        }
      },
      {
        label: "形态",
        prop: "series.line.lineType",
        type: "radioGroupButton",
        fieldProps: {
          options: [
            { label: "普通", value: "normal" },
            { label: "平滑", value: "smooth" },
            { label: "阶梯", value: "step" }
          ]
        },
        format: (u, c) => {
          switch (c) {
            case "smooth":
              u.value["series.line.smooth"] = !0, u.value["series.line.step"] = !1;
              break;
            case "step":
              u.value["series.line.smooth"] = !1, u.value["series.line.step"] = "end";
              break;
            default:
              u.value["series.line.smooth"] = !1, u.value["series.line.step"] = !1;
          }
        },
        valueToForm: (u, c) => {
          const f = vn(c, "series.line.step"), d = vn(c, "series.line.smooth");
          return f ? "step" : d ? "smooth" : "normal";
        }
      },
      {
        label: "标记点",
        prop: "",
        type: "divider"
      },
      {
        label: "图形",
        prop: "series.line.symbol",
        type: "select",
        fieldProps: {
          options: [
            { label: "圆", value: "circle" },
            { label: "方", value: "rect" },
            { label: "三角", value: "triangle" },
            { label: "菱形", value: "diamond" },
            { label: "标记", value: "pin" },
            { label: "箭头", value: "arrow" },
            { label: "无", value: "none" }
          ]
        }
      },
      {
        label: "大小",
        prop: "series.line.symbolSize",
        type: "inputNumber",
        fieldProps: {
          min: 0,
          addonAfter: "px"
        }
      },
      {
        label: "旋转",
        prop: "series.line.symbolRotate",
        type: "inputNumber",
        fieldProps: {
          min: 0,
          addonAfter: "°"
        }
      }
    ], o = [
      Ar.title,
      Ar.legend,
      Ar.label,
      {
        ...Ar.series,
        children: Ar.series.children.concat(
          a
        )
      },
      Ar.tooltip,
      Ar.background
    ], s = (u) => {
      i("change", {
        ...n,
        dataSource: u
      });
    }, l = (u) => {
      const c = ph(n);
      Object.keys(u).forEach((f) => {
        vN(c, f, u[f]);
      }), i("change", c);
    };
    return (u, c) => (be(), Ue("div", iEt, [
      tt("div", aEt, [
        D(z(_h), {
          activeKey: r.value,
          "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
          size: "small",
          centered: ""
        }, {
          default: ke(() => [
            D(z(zu), { key: "1" }, {
              tab: ke(() => [
                D(z(K_)),
                oEt
              ]),
              _: 1
            }),
            D(z(zu), { key: "2" }, {
              tab: ke(() => [
                D(z(J_)),
                sEt
              ]),
              _: 1
            })
          ]),
          _: 1
        }, 8, ["activeKey"])
      ]),
      r.value === "1" ? (be(), Je(BB, {
        key: 0,
        dataSource: u.dataSource,
        onChange: s
      }, null, 8, ["dataSource"])) : Ot("", !0),
      r.value === "2" ? (be(), Je(z(Sh), {
        key: 1,
        columns: o,
        formModel: n,
        onChange: l
      }, null, 8, ["formModel"])) : Ot("", !0)
    ]));
  }
}), jme = /* @__PURE__ */ ui(lEt, [["__scopeId", "data-v-0b356b47"]]);
ng.Config = jme;
ng.install = (t) => (t.component(ng.name, ng), t);
const uEt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Config: jme,
  basicLineProps: L6,
  default: ng,
  defaultPropsValue: Udt
}, Symbol.toStringTag, { value: "Module" })), zB = {
  width: {
    type: Number,
    default: 400
  },
  height: {
    type: Number,
    default: 260
  },
  dataSource: k6,
  // 标题
  title: {
    type: Object
  },
  // 图例
  legend: {
    type: Object
  },
  // 背景
  backgroundColor: {
    type: String
  },
  // 边框
  grid: {
    type: Object
  },
  // 提示框
  tooltip: {
    type: Object
  },
  // x轴数据
  xAxis: {
    type: Object
  },
  // y轴数据
  yAxis: {
    type: Object
  },
  // 折线
  series: {
    type: Array
  },
  // color
  color: {
    type: Object
  }
}, Zme = [];
Zme.bar = {
  // @ts-ignore
  fixedBarWidth: !1,
  barWidth: "auto",
  barGap: "10%",
  barCategoryGap: "20%",
  itemStyle: {
    borderColor: "#ccc",
    borderRadius: 0,
    borderWidth: 0
  }
};
const cEt = R6({
  title: {
    text: "柱状图标题"
  },
  xAxis: {
    data: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"]
  },
  series: Zme
}), fEt = {
  // 组件容器默认属性
  container: {
    props: {
      width: 400,
      height: 260
    }
  },
  // 图表默认属性
  props: {
    // 数据源
    dataSource: {
      sourceType: kr.STATIC,
      data: {
        series: [
          {
            type: "bar",
            name: "系列1",
            data: [10, 30, 20, 40]
          },
          {
            type: "bar",
            name: "系列2",
            data: [15, 35, 25, 45]
          }
        ]
      },
      url: location.origin + "/mock/api/get/example/bar",
      method: "POST",
      params: {},
      headers: {},
      refreshTime: 0,
      dataProcess: `
        (res) => {
          // 取出列表
          const data = res.data;
          // x轴数据
          const xData = data.map((item) => item.name); 
          // 系列数据
          const series = [
            { type: 'bar', name: '价格', data: data.map(item => item.price) },
            { type: 'bar', name: '总量', data: data.map(item => item.count) },
          ];

          // 返回图表数据
          return { xData, series };
        }
      `
    },
    ...cEt
  }
}, dEt = ae({
  name: "DBasicBar",
  components: { Charts: D6 },
  props: zB,
  setup(t) {
    const { options: e, loading: n } = q6(t);
    return {
      options: e,
      loading: n
    };
  }
});
function hEt(t, e, n, r, i, a) {
  const o = $r("Charts");
  return be(), Je(o, {
    width: t.width,
    height: t.height,
    "echarts-options": t.options,
    loading: t.loading
  }, null, 8, ["width", "height", "echarts-options", "loading"]);
}
const cg = /* @__PURE__ */ ui(dEt, [["render", hEt]]), Ume = (t) => (JT("data-v-d6923dbc"), t = t(), e2(), t), pEt = { class: "chart-config" }, vEt = { class: "config-tab" }, gEt = /* @__PURE__ */ Ume(() => /* @__PURE__ */ tt("span", null, "数据设置", -1)), mEt = /* @__PURE__ */ Ume(() => /* @__PURE__ */ tt("span", null, "样式设置", -1)), yEt = /* @__PURE__ */ ae({
  __name: "Config",
  props: zB,
  emits: ["change"],
  setup(t, { emit: e }) {
    const n = t, r = ee("1"), i = e, a = [
      {
        label: "样式",
        prop: "",
        type: "divider"
      },
      {
        label: "固定柱宽",
        prop: "series.bar.fixedBarWidth",
        type: "radioGroup",
        fieldProps: {
          options: [
            { label: "是", value: !0 },
            { label: "否", value: !1 }
          ]
        },
        defaultValue: !1,
        format: (u, c) => {
          var f, d;
          u.value["series.bar.barWidth"] = c && ((f = u.value) == null ? void 0 : f["series.bar.barWidth"]) !== "auto" ? ((d = u.value) == null ? void 0 : d["series.bar.barWidth"]) || 20 : "auto";
        }
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["series.bar.fixedBarWidth"],
        children: (u) => u["series.bar.fixedBarWidth"] ? [
          {
            label: "柱宽",
            prop: "series.bar.barWidth",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 20
          }
        ] : []
      },
      {
        label: "系列间隔",
        prop: "series.bar.barGap",
        type: "slider",
        defaultValue: 30,
        format: (u, c) => {
          u.value["series.bar.barGap"] = c + "%";
        },
        valueToForm: (u) => +((u == null ? void 0 : u.replace("%", "")) || 0)
      },
      {
        label: "分类间隔",
        prop: "series.bar.barCategoryGap",
        type: "slider",
        defaultValue: 20,
        format: (u, c) => {
          u.value["series.bar.barCategoryGap"] = c + "%";
        },
        valueToForm: (u) => +((u == null ? void 0 : u.replace("%", "")) || 0)
      },
      {
        label: "边框",
        prop: "",
        type: "divider"
      },
      {
        label: "线宽",
        prop: "series.bar.itemStyle.borderWidth",
        type: "inputNumber",
        fieldProps: {
          addonAfter: "px"
        },
        defaultValue: 0
      },
      {
        label: "颜色",
        prop: "series.bar.itemStyle.borderColor",
        type: "colorSelect",
        defaultValue: "#ccc"
      },
      {
        label: "圆角",
        prop: "series.bar.itemStyle.borderRadius",
        type: "inputNumber",
        fieldProps: {
          addonAfter: "px"
        },
        defaultValue: 0
      }
    ], o = [
      Ar.title,
      Ar.legend,
      Ar.label,
      {
        ...Ar.series,
        children: Ar.series.children.concat(
          a
        )
      },
      Ar.xAxis,
      Ar.yAxis,
      Ar.tooltip
    ], s = (u) => {
      i("change", {
        ...n,
        dataSource: u
      });
    }, l = (u) => {
      const c = ph(n);
      Object.keys(u).forEach((f) => {
        vN(c, f, u[f]);
      }), i("change", c);
    };
    return (u, c) => (be(), Ue("div", pEt, [
      tt("div", vEt, [
        D(z(_h), {
          activeKey: r.value,
          "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
          size: "small",
          centered: ""
        }, {
          default: ke(() => [
            D(z(zu), { key: "1" }, {
              tab: ke(() => [
                D(z(K_)),
                gEt
              ]),
              _: 1
            }),
            D(z(zu), { key: "2" }, {
              tab: ke(() => [
                D(z(J_)),
                mEt
              ]),
              _: 1
            })
          ]),
          _: 1
        }, 8, ["activeKey"])
      ]),
      r.value === "1" ? (be(), Je(BB, {
        key: 0,
        dataSource: u.dataSource,
        onChange: s
      }, null, 8, ["dataSource"])) : Ot("", !0),
      r.value === "2" ? (be(), Je(z(Sh), {
        key: 1,
        columns: o,
        formModel: n,
        onChange: l
      }, null, 8, ["formModel"])) : Ot("", !0)
    ]));
  }
}), Xme = /* @__PURE__ */ ui(yEt, [["__scopeId", "data-v-d6923dbc"]]);
cg.Config = Xme;
cg.install = (t) => (t.component(cg.name, cg), t);
const bEt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Config: Xme,
  basicBarProps: zB,
  default: cg,
  defaultPropsValue: fEt
}, Symbol.toStringTag, { value: "Module" })), VB = {
  width: {
    type: Number,
    default: 400
  },
  height: {
    type: Number,
    default: 260
  },
  dataSource: k6,
  // 标题
  title: {
    type: Object
  },
  // 图例
  legend: {
    type: Object
  },
  // 背景
  backgroundColor: {
    type: String
  },
  // 边框
  grid: {
    type: Object
  },
  // 提示框
  tooltip: {
    type: Object
  },
  // 饼图数据
  series: {
    type: Array
  },
  // color
  color: {
    type: Object
  }
}, Yme = [];
Yme.pie = {
  top: 70,
  startAngle: 0,
  endAngle: 360,
  radius: ["0%", "75%"]
};
const _Et = R6({
  title: {
    text: "饼图标题"
  },
  grid: {
    show: !1
  },
  xAxis: {
    show: !1
  },
  yAxis: {
    show: !1
  },
  series: Yme
}), OEt = {
  // 组件容器默认属性
  container: {
    props: {
      width: 400,
      height: 260
    }
  },
  // 图表默认属性
  props: {
    // 数据源
    dataSource: {
      sourceType: kr.STATIC,
      data: {
        series: [
          {
            type: "pie",
            name: "系列1",
            data: [
              { value: 335, name: "直接访问" },
              { value: 310, name: "邮件营销" },
              { value: 234, name: "联盟广告" },
              { value: 135, name: "视频广告" }
            ]
          }
        ]
      },
      url: location.origin + "/mock/api/get/example/pie",
      method: "POST",
      params: {},
      headers: {},
      refreshTime: 0,
      dataProcess: `
        (res) => {
          // 取出列表
          const data = res.data;
          
          // 系列数据
          const series = [
            { type: 'pie', name: '月份', data: data.map(item => ({value: item.apple, name: item.name})) }
          ];

          // 返回图表数据
          return { series };
        }
      `
    },
    ..._Et
  }
}, SEt = ae({
  name: "DBasicPie",
  components: { Charts: D6 },
  props: VB,
  setup(t) {
    const { options: e, loading: n } = q6(t);
    return {
      options: e,
      loading: n
    };
  }
});
function xEt(t, e, n, r, i, a) {
  const o = $r("Charts");
  return be(), Je(o, {
    width: t.width,
    height: t.height,
    "echarts-options": t.options,
    loading: t.loading
  }, null, 8, ["width", "height", "echarts-options", "loading"]);
}
const fg = /* @__PURE__ */ ui(SEt, [["render", xEt]]), qme = (t) => (JT("data-v-bd423688"), t = t(), e2(), t), wEt = { class: "chart-config" }, CEt = { class: "config-tab" }, TEt = /* @__PURE__ */ qme(() => /* @__PURE__ */ tt("span", null, "数据设置", -1)), PEt = /* @__PURE__ */ qme(() => /* @__PURE__ */ tt("span", null, "样式设置", -1)), $Et = /* @__PURE__ */ ae({
  __name: "Config",
  props: VB,
  emits: ["change"],
  setup(t, { emit: e }) {
    const n = t, r = ee("1"), i = e, a = [
      {
        label: "样式",
        prop: "",
        type: "divider"
      },
      {
        label: "起始角度",
        prop: "series.pie.startAngle",
        type: "inputNumber",
        fieldProps: {
          min: 0,
          max: 360,
          addonAfter: "°"
        }
      },
      {
        label: "完结角度",
        prop: "series.pie.endAngle",
        type: "inputNumber",
        fieldProps: {
          min: 0,
          max: 360,
          addonAfter: "°"
        }
      },
      {
        label: "内径占比",
        prop: "series.pie.radius",
        type: "slider",
        format: (u, c) => {
          console.log("formatModel", u);
          const f = c * 0.75;
          return u.value["series.pie.radius"] = [f + "%", "75%"], c * 100;
        },
        valueToForm: (u) => (u || ["0%", "75%"])[0].replace("%", "") / 0.75
      }
    ], o = [
      Ar.title,
      Ar.legend,
      Ar.label,
      {
        ...Ar.series,
        children: Ar.series.children.concat(
          a
        )
      },
      Ar.tooltip
    ], s = (u) => {
      i("change", {
        ...n,
        dataSource: u
      });
    }, l = (u) => {
      const c = ph(n);
      Object.keys(u).forEach((f) => {
        vN(c, f, u[f]);
      }), i("change", c);
    };
    return (u, c) => (be(), Ue("div", wEt, [
      tt("div", CEt, [
        D(z(_h), {
          activeKey: r.value,
          "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
          size: "small",
          centered: ""
        }, {
          default: ke(() => [
            D(z(zu), { key: "1" }, {
              tab: ke(() => [
                D(z(K_)),
                TEt
              ]),
              _: 1
            }),
            D(z(zu), { key: "2" }, {
              tab: ke(() => [
                D(z(J_)),
                PEt
              ]),
              _: 1
            })
          ]),
          _: 1
        }, 8, ["activeKey"])
      ]),
      r.value === "1" ? (be(), Je(BB, {
        key: 0,
        dataSource: u.dataSource,
        onChange: s
      }, null, 8, ["dataSource"])) : Ot("", !0),
      r.value === "2" ? (be(), Je(z(Sh), {
        key: 1,
        columns: o,
        formModel: n,
        onChange: l
      }, null, 8, ["formModel"])) : Ot("", !0)
    ]));
  }
}), Kme = /* @__PURE__ */ ui($Et, [["__scopeId", "data-v-bd423688"]]);
fg.Config = Kme;
fg.install = (t) => (t.component(fg.name, fg), t);
const AEt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Config: Kme,
  basicPieProps: VB,
  default: fg,
  defaultPropsValue: OEt
}, Symbol.toStringTag, { value: "Module" })), REt = {
  Title: () => Promise.resolve().then(() => r9e),
  BasicLine: () => Promise.resolve().then(() => uEt),
  BasicBar: () => Promise.resolve().then(() => bEt),
  BasicPie: () => Promise.resolve().then(() => AEt),
  Container: () => Promise.resolve().then(() => xHe)
}, Cee = {
  BasicLine: ng,
  BasicBar: cg,
  Title: Zv,
  BasicPie: fg,
  Container: jv
}, EEt = function(t) {
  return Object.keys(Cee).forEach((e) => {
    const n = Cee[e];
    n != null && n.install && (console.log("注册组件：", e), t.use(n));
  }), t;
}, kEt = {
  version: "1.0.0",
  install: EEt
};
export {
  cg as BasicBar,
  Xme as BasicBarConfig,
  fEt as BasicBarDefaultProps,
  zB as BasicBarProps,
  ng as BasicLine,
  jme as BasicLineConfig,
  Udt as BasicLineDefaultProps,
  L6 as BasicLineProps,
  fg as BasicPie,
  Kme as BasicPieConfig,
  OEt as BasicPieDefaultProps,
  VB as BasicPieProps,
  jv as Container,
  Sh as CusForm,
  kr as DataSourceType,
  Zv as Title,
  REt as asyncComponentAll,
  Cee as components,
  kEt as default,
  EEt as install
};
//# sourceMappingURL=shalu-dashboard-ui.js.map
